mirror of
https://github.com/mauiaaron/apple2.git
synced 2025-01-16 01:31:06 +00:00
Refactor : simplify check for available buffers
This commit is contained in:
parent
9a7090c3a4
commit
2839e92ce4
@ -326,17 +326,9 @@ static long ALUnlockBuffer(AudioBuffer_s *_this, unsigned long audio_bytes) {
|
||||
break;
|
||||
}
|
||||
|
||||
{
|
||||
bool queued_buffers_count = 0;
|
||||
ALPlayBuf *node = voice->queued_buffers;
|
||||
while (node) {
|
||||
++queued_buffers_count;
|
||||
node = node->next;
|
||||
}
|
||||
if (queued_buffers_count >= OPENAL_NUM_BUFFERS) {
|
||||
//LOG("no free audio buffers"); // keep accumulating ...
|
||||
break;
|
||||
}
|
||||
if (voice->avail_buffers == NULL) {
|
||||
LOG("no free audio buffers"); // keep accumulating ...
|
||||
break;
|
||||
}
|
||||
|
||||
// Submit working buffer to OpenAL
|
||||
|
Loading…
x
Reference in New Issue
Block a user