Commit 8818a1b1 authored by Thomas Guillem's avatar Thomas Guillem

aout: add more debug checks

parent 1e921210
......@@ -445,6 +445,7 @@ int aout_OutputNew (audio_output_t *aout, audio_sample_format_t *restrict fmt)
}
aout_FormatPrepare (fmt);
assert (fmt->i_bytes_per_frame > 0 && fmt->i_frame_length > 0);
aout_FormatPrint (aout, "output", fmt);
return 0;
}
......@@ -480,6 +481,12 @@ int aout_OutputTimeGet (audio_output_t *aout, mtime_t *delay)
void aout_OutputPlay (audio_output_t *aout, block_t *block)
{
aout_OutputAssertLocked (aout);
#ifndef NDEBUG
aout_owner_t *owner = aout_owner (aout);
assert (block->i_buffer / block->i_nb_samples ==
owner->mixer_format.i_bytes_per_frame /
owner->mixer_format.i_frame_length);
#endif
aout->play (aout, block);
}
......
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