mirror of
https://github.com/clangen/musikcube.git
synced 2024-10-02 13:02:35 +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);
|
boost::recursive_mutex::scoped_lock lock(this->mutex);
|
||||||
|
|
||||||
|
bool found = false;
|
||||||
auto it = this->buffers.begin();
|
auto it = this->buffers.begin();
|
||||||
while (it != this->buffers.end()) {
|
while (!found && it != this->buffers.end()) {
|
||||||
if (*it == context) {
|
if (*it == context) {
|
||||||
this->buffers.erase(it);
|
this->buffers.erase(it);
|
||||||
|
found = true;
|
||||||
}
|
}
|
||||||
++it;
|
++it;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user