Commit 5fe4d5a7 authored by Simon Morlat's avatar Simon Morlat

fix suspect code. Not filling the audio-unit buffer entirely is not good,...

fix suspect code. Not filling the audio-unit buffer entirely is not good, given that there was nothing to tell it that it was not entirely filled.
parent c8325395
......@@ -405,8 +405,8 @@ static OSStatus au_write_cb (
if (d!=NULL){
unsigned int size;
ms_mutex_lock(&d->mutex);
size = MIN(inNumberFrames*d->base.card->bits/8, ms_flow_controlled_bufferizer_get_avail(d->bufferizer));
if (size > 0) {
size = inNumberFrames*d->base.card->bits/8;
if (ms_flow_controlled_bufferizer_get_avail(d->bufferizer) >= size) {
ms_flow_controlled_bufferizer_read(d->bufferizer, ioData->mBuffers[0].mData, size);
} else {
//writing silence;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment