Author Topic: Sound question  (Read 3265 times)

Offline scorpio16v

  • long
  • ***
  • Posts: 203
    • View Profile
Sound question
« on: December 18, 2011, 10:18:16 AM »
A short question relatedto to sound.  :)
If I disable the sound plugin and let play an MP3 in background, there seemds no framedrop and no sound stuttering, even with rice plugin.
Is it possible to let the ingame sound play as a separate thread ?
On "the other emu ", yongzh must be doing something in these way, because there are only minor soundbugs. Even if the framerate goes low.
« Last Edit: December 18, 2011, 01:09:01 PM by Paul »

Offline Paul

  • Administrator
  • double
  • *****
  • Posts: 3495
  • Developer
    • View Profile
    • PaulsCode.Com
Re: Sound question
« Reply #1 on: December 18, 2011, 11:08:47 AM »
A short question relatedto to sound.  :)
If I disable the sound plugin and let play an MP3 in background, there seemds no framedrop and no sound stuttering, even with rice plugin.
Is it possible to let the ingame sound play as a separate thread ?
Hmm, I don't think that would help in any case when the emulation was slowed down (which is the most likely cause of auto stuttering).  The problem is the audio is produced real-time, so if emulation is running slower than it should, it runs out of audio to play, and has to wait for the emulation to catch up (resulting in a stutter).  Buffering wouldn't help either, for the same reason (eventually the buffer would run out, and have to wait for emulation to catch up again to refill the buffer, resulting in larger stutters further apart from each other).  The only improvement I can think of for minor stuttering is to dynamically change the sample-rate of playback to match the emulation speed.  This would also change the pitch of the audio, so it would be very bad in cases where the emulation was super slow, but might not be noticable at all for minor cases.  Really the only ultimate solution is to improve the emulation speed (which is likely why N64oid doesn't have the problem - it is better optimized and emulates faster than AE does).
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 scorpio16v

  • long
  • ***
  • Posts: 203
    • View Profile
Re: Sound question
« Reply #2 on: December 28, 2011, 02:51:02 AM »
One more question

Do you use notaz's actual soundplugin or an older one ?
No, logcat says SDL-plugin. So the question must be : Can you make another plugin from Notaz version ?

(I'm not to lazy to find it out for myself, but most times I'm on my tablet. That makes an direct comparsion of code not easy.  ;) )
I think about it, because the stuttering sound and read someting here. Notaz posted his source for version r2.
http://www.gp32x.com/board/index.php?/topic/53683-mupen64plus/page__st__690

another thing,I don't know if it's helpfull are some archieved and compiled .pnd versions of the Pandora port.

http://boards.openpandora.org/index.php?/topic/5405-best-most-playable-n64-games/

« Last Edit: December 28, 2011, 03:35:51 AM by scorpio16v »

Offline Paul

  • Administrator
  • double
  • *****
  • Posts: 3495
  • Developer
    • View Profile
    • PaulsCode.Com
Re: Sound question
« Reply #3 on: December 28, 2011, 07:42:08 AM »
Excellent, thanks a lot - I'll look into those!
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