Core Audio output: Change end of file timing

Reduce the timing at which an end of file notification is sent to the
main thread from 16384 bytes to 8192 bytes. This may help with playback
of a lot of really small files, and skipping tracks.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
CQTexperiment
Christopher Snowhill 2022-01-25 21:55:08 -08:00
parent 708c7dc721
commit c7c3c82c18
1 changed files with 2 additions and 2 deletions

View File

@ -277,10 +277,10 @@ default_device_changed(AudioObjectID inObjectID, UInt32 inNumberAddresses, const
bytesBuffered += atomic_load_explicit(&bytesRendered, memory_order_relaxed);
if ([outputController chainQueueHasTracks])
{
if (bytesBuffered < CHUNK_SIZE)
if (bytesBuffered < CHUNK_SIZE / 2)
bytesBuffered = 0;
else
bytesBuffered -= CHUNK_SIZE;
bytesBuffered -= CHUNK_SIZE / 2;
}
else {
stopNext = YES;