Author Topic: SoundEngine loop stream sound  (Read 22839 times)

Offline Paul

  • Administrator
  • double
  • *****
  • Posts: 3499
  • Developer
    • View Profile
    • PaulsCode.Com
Re: SoundEngine loop stream sound
« Reply #30 on: February 26, 2018, 03:08:08 PM »
What exactly do you mean? Should the StreamThread add a commend queue to cleanup the source or are you suggesting a completely different way?

Yes, my thought is that all actions performed on a source should be done from the command thread, with callbacks for when various processes are complete, like shutting down, started playing, etc.  This may be the only area that consistently leads to a problem, there are potentially others with the current design (I was quite new to Java when I wrote this, so things could definitely be improved).  On the other hand, if it is working well, maybe not an issue.
Device: Samsung Galaxy Nexus i515
CPU: TI OMAP4460, 1.2 GHz (dual core, ARM Cortex-A9)
GPU: PowerVR SGX540, 307 MHz
RAM: 1 GB
Resolution: 720 x 1280
Rom: omni-4.4.4-20141014-toro-FML KitKat 4.4.4, rooted

Device: Eee PC 1015PEM
CPU: Intel Atom N550, 1.5 GHz (dual core, x86)
GPU: Intel GMA 3150, 200 MHz (dual core)
RAM: 2GB
Resolution: 1024 x 600
Rom: android-x86-4.3-20130725 Jelly Bean 4.3, rooted

Offline CreativeMD

  • byte
  • *
  • Posts: 23
    • View Profile
Re: SoundEngine loop stream sound
« Reply #31 on: February 26, 2018, 04:13:05 PM »
Yes, my thought is that all actions performed on a source should be done from the command thread, with callbacks for when various processes are complete, like shutting down, started playing, etc.  This may be the only area that consistently leads to a problem, there are potentially others with the current design (I was quite new to Java when I wrote this, so things could definitely be improved).  On the other hand, if it is working well, maybe not an issue.

The source will be marked as being removed and deleted from the 'sourceMap', so once the StreamThread is cleaning it up there is no way other components could know about it or access it.
« Last Edit: February 26, 2018, 04:22:18 PM by CreativeMD »