createAudioQueue creates queues that start off paused by defualt to keep correct time if buffering is required befor the first buffers are rendered

This commit is contained in:
Thong Nguyen 2014-01-26 22:09:21 +00:00
parent 7608a42d29
commit 5b629665d6
1 changed files with 4 additions and 0 deletions

View File

@ -1670,6 +1670,8 @@ static void AudioQueueIsRunningCallbackProc(void* userData, AudioQueueRef audioQ
return;
}
AudioQueuePause(audioQueue);
error = AudioQueueAddPropertyListener(audioQueue, kAudioQueueProperty_IsRunning, AudioQueueIsRunningCallbackProc, (__bridge void*)self);
if (error)
@ -2406,6 +2408,8 @@ static void AudioQueueIsRunningCallbackProc(void* userData, AudioQueueRef audioQ
{
OSStatus error;
LOGINFO(@"Called");
AudioQueueSetParameter(audioQueue, kAudioQueueParam_Volume, 1);
error = AudioQueueStart(audioQueue, NULL);