Fixed a deadlock in CoreAudioOut when resetting the sample rate mid-stream.

This commit is contained in:
Casey Langen 2017-02-22 22:59:10 -08:00
parent 8242eda806
commit e65d56ac8c

View File

@ -113,7 +113,9 @@ int CoreAudioOut::Play(IBuffer *buffer, IBufferProvider *provider) {
this->audioFormat.mBytesPerFrame = (this->audioFormat.mBitsPerChannel / 8) * this->audioFormat.mChannelsPerFrame;
this->audioFormat.mBytesPerPacket = this->audioFormat.mBytesPerFrame * this->audioFormat.mFramesPerPacket;
lock.unlock();
this->Stop();
lock.lock();
result = AudioQueueNewOutput(
&this->audioFormat,