One of those "how did this ever work?" bugs. Fixed CoreAudioOut buffer notification logic.

This commit is contained in:
Casey Langen 2016-07-12 10:25:33 -07:00
parent d25f2a1633
commit 31e28d2f53

View File

@ -72,10 +72,12 @@ void CoreAudioOut::NotifyBufferCompleted(BufferContext *context) {
{
boost::recursive_mutex::scoped_lock lock(this->mutex);
bool found = false;
auto it = this->buffers.begin();
while (it != this->buffers.end()) {
while (!found && it != this->buffers.end()) {
if (*it == context) {
this->buffers.erase(it);
found = true;
}
++it;
}