Re: (iOS)Why use AudioQueue instead of AudioUnit

"leagor" <[email protected]>
Newsgroups gmane.comp.lib.sdl
Message-ID <[email protected]>
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:[email protected]] On Behalf Of Ryan C. Gordon
Sent: Sunday, November 27, 2016 1:20 PM
To: SDL Development List <[email protected]>
Subject: Re: [SDL] (iOS)Why use AudioQueue instead of AudioUnit


> 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.

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
[email protected]
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.