mirror of
https://github.com/clangen/musikcube.git
synced 2024-11-19 20:13:36 +00:00
One of those "how did this ever work?" bugs. Fixed CoreAudioOut buffer notification logic.
This commit is contained in:
parent
d25f2a1633
commit
31e28d2f53
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user