(iOS)Why use AudioQueue instead of AudioUnit |
(iOS)Why use AudioQueue instead of AudioUnit |
Alex Szpakowski
Guest
|
The commit message shares some insights: https://hg.libsdl.org/SDL/rev/38583cb96c1a
|
|||||||||||||
|
(iOS)Why use AudioQueue instead of AudioUnit |
Sik
|
After doing a quick search, I guess this?
https://forums.libsdl.org/viewtopic.php?p=48857&sid=714b89c8259cd941f2933655840e4ab7 _______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||
|
(iOS)Why use AudioQueue instead of AudioUnit |
ancientli
|
I think audio module on iOS has fault. In general, app opens playback at
startup, and works all time when app are runing. That is to say, outputCallback in SDL_coreaudio.m will be called even if no sound require to play. It will result to extra power consumption. In previous version that using AudioUnit, I call AudioOutputUnitStop when no sound require to play. When requiring, call AudioOutputUnitStart. This method can avoid extra power consumption. SDL2.0.5 use AudioQueue, it seems to be new way to avoid this problem. _______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||
|
(iOS)Why use AudioQueue instead of AudioUnit |
eclectocrat
|
Sorry if I'm missing something obvious, but are AudioQueueStop() AudioQueueDispose() not good enough to prevent this, or or they not being called at the right times?
Regards, Jeremy J. On Thu, Nov 17, 2016 at 6:59 AM, leagor wrote:
|
|||||||||||||
|
(iOS)Why use AudioQueue instead of AudioUnit |
Ryan C. Gordon
Guest
|
Is SDL_PauseAudioDevice() not an option? Talking directly to system APIs for stuff SDL is handling for you tends to be dangerous, for just this reason. --ryan. _______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||||
|
(iOS)Why use AudioQueue instead of AudioUnit |
ancientli
|
I think SDL_PauseAudioDevice() can not achieve this purpose.
Even if the play is paused, SDL will still call AudioQueueEnqueueBuffer, just to set desired data to 0. By the way, I implemented to "Pause" based on AudioQueue. Below is code. ----------------------------------- static void COREAUDIO_PauseDevice(_THIS, int pause_on) { if (pause_on) { AudioQueueStop(this->hidden->audioQueue, 1); } else { OSStatus result = AudioQueueStart(this->hidden->audioQueue, NULL); } } -----Original Message----- From: SDL [mailto:] On Behalf Of Ryan C. Gordon Sent: Sunday, November 27, 2016 1:20 PM To: SDL Development List Subject: Re: [SDL] (iOS)Why use AudioQueue instead of AudioUnit
Is SDL_PauseAudioDevice() not an option? Talking directly to system APIs for stuff SDL is handling for you tends to be dangerous, for just this reason. --ryan. _______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org _______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||||
|