KnoooW / naclports

Automatically exported from code.google.com/p/naclports
0 stars 0 forks source link

SDL_PauseAudio doesn't work #96

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
SDL_PauseAudio should prevent the user callback from being called, but it 
doesn't.

The problem is that the normal SDL audio thread is bypassed in the NaCl port. 
Instead, the user callback is called directly by the Pepper audio callback.

One simple solution for this problem is to check for audio->paused in the 
pepper callback.

Another solution is to use the SDL audio thread. This has its own issues, 
though. It will require creating another buffer that is filled by the audio 
thread and drained by the Pepper audio callback. It's possible that this will 
lead to overflow, underflow, and latency issues.

Original issue reported on code.google.com by binji@chromium.org on 9 Dec 2013 at 5:42