queueDataSource shold let playback thread automatically start the audio unit

This commit is contained in:
Thong Nguyen 2014-01-31 23:19:29 +00:00
parent c4a7251d19
commit a9b1e143a0
1 changed files with 2 additions and 5 deletions

View File

@ -497,11 +497,6 @@ static void AudioFileStreamPacketsProc(void* clientData, UInt32 numberBytes, UIn
pthread_mutex_lock(&playerMutex);
{
[upcomingQueue enqueue:[[STKQueueEntry alloc] initWithDataSource:dataSourceIn andQueueItemId:queueItemId]];
if (self.internalState == STKAudioPlayerInternalStateStopped && stopReason == STKAudioPlayerStopReasonEof)
{
[self startAudioUnit];
}
}
pthread_mutex_unlock(&playerMutex);
@ -1714,6 +1709,8 @@ static BOOL GetHardwareCodecClassDesc(UInt32 formatId, AudioClassDescription* cl
{
OSStatus status;
[self resetPcmBuffers];
status = AudioOutputUnitStart(audioUnit);
if (status)