Commit fa45d63f authored by Rafaël Carré's avatar Rafaël Carré

alsa: add some verbose debug (enabled only if ALSA_DEBUG is defined) due to...

alsa: add some verbose debug (enabled only if ALSA_DEBUG is defined) due to some regressions introduced by changeset [23022]
parent 560da457
......@@ -40,6 +40,8 @@
#define ALSA_PCM_NEW_SW_PARAMS_API
#include <alsa/asoundlib.h>
/*#define ALSA_DEBUG*/
/*****************************************************************************
* aout_sys_t: ALSA audio output method descriptor
*****************************************************************************
......@@ -832,6 +834,20 @@ static void ALSAFill( aout_instance_t * p_aout )
/ p_aout->output.output.i_bytes_per_frame
/ p_aout->output.output.i_rate
* p_aout->output.output.i_frame_length );
#ifdef ALSA_DEBUG
snd_pcm_state_t state = snd_pcm_status_get_state( p_status );
if( state != SND_PCM_STATE_RUNNING )
msg_Err( p_aout, "pcm status (%d) != RUNNING", state );
msg_Dbg( p_aout, "Delay is %ld frames (%d bytes)", delay, i_bytes );
msg_Dbg( p_aout, "Bytes per frame: %d", p_aout->output.output.i_bytes_per_frame );
msg_Dbg( p_aout, "Rate: %d", p_aout->output.output.i_rate );
msg_Dbg( p_aout, "Frame length: %d", p_aout->output.output.i_frame_length );
msg_Dbg( p_aout, "Next date is in %d microseconds", (int)(next_date - mdate()) );
#endif
}
p_buffer = aout_OutputNextBuffer( p_aout, next_date,
......
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