mirror of https://github.com/mpv-player/mpv
ao_coreaudio: simplify digital render callback
It was reported that it also works by not setting the read size in the AudioBuffer (now idea how, but I will discover it later).
This commit is contained in:
parent
8cf36cf950
commit
c4bed92280
|
@ -124,11 +124,10 @@ static OSStatus render_cb_digital(
|
|||
AudioBuffer buf = out_data->mBuffers[p->i_stream_index];
|
||||
int requested = buf.mDataByteSize;
|
||||
|
||||
if (p->b_muted) {
|
||||
if (p->b_muted)
|
||||
mp_ring_drain(p->buffer, requested);
|
||||
} else {
|
||||
buf.mDataByteSize = mp_ring_read(p->buffer, buf.mData, requested);
|
||||
}
|
||||
else
|
||||
mp_ring_read(p->buffer, buf.mData, requested);
|
||||
|
||||
return noErr;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue