MultiAudioNode: Print a message when rejecting buffers.

This file just uses fprintf(stderr, ). Probably it should be
converted to use macros...

This allows for easy debugging of silence by restarting the media addon
server in a terminal. Eventually we should fix #17245.
This commit is contained in:
Augustin Cavalier 2021-09-09 16:08:00 -04:00
parent 37ea891aad
commit 5433e7e27d

View File

@ -2003,12 +2003,13 @@ MultiAudioNode::_FillNextBuffer(node_input& input, BBuffer* buffer)
uint32 bufferSize = fDevice->BufferList().return_playback_buffer_size; uint32 bufferSize = fDevice->BufferList().return_playback_buffer_size;
if (buffer->SizeUsed() / inputSampleSize / channelCount != bufferSize) { if (buffer->SizeUsed() / inputSampleSize / channelCount != bufferSize) {
fprintf(stderr, "MultiAudioNode: Rejecting buffer: size is different\n");
_WriteZeros(input, input.fBufferCycle); _WriteZeros(input, input.fBufferCycle);
return; return;
} }
if (channelCount != input.fFormat.u.raw_audio.channel_count) { if (channelCount != input.fFormat.u.raw_audio.channel_count) {
PRINT(("Channel count is different")); fprintf(stderr, "MultiAudioNode: Rejecting buffer: channel count is different\n");
return; return;
} }