Commit dc43660d authored by Michel Kaempf's avatar Michel Kaempf

* audio_decoder/audio_decoder.c :

- l'ancienne m�thode de synchro �tait buggu�e, la nouvelle rewlz... Sam,
j'esp�re que tu me pardonneras un jour ;

* audio_output/audio_output.c :
- suppression des messages de debug, � la demande de Polux, qui veut
squatter seul la console de debug avec ses messages de fps ;
parent 4a8a63dd
......@@ -817,27 +817,10 @@ static void RunThread( adec_thread_t * p_adec )
}
else
{
// i_header = p_adec->bit_stream.fifo.buffer;
// i_framesize = pi_framesize[ 128*((i_header & ADEC_HEADER_LAYER_MASK) >> ADEC_HEADER_LAYER_SHIFT) +
// 64*((i_header & ADEC_HEADER_PADDING_BIT_MASK) >> ADEC_HEADER_PADDING_BIT_SHIFT) +
// 16*((i_header & ADEC_HEADER_SAMPLING_FREQUENCY_MASK) >> ADEC_HEADER_SAMPLING_FREQUENCY_SHIFT) +
// 1*((i_header & ADEC_HEADER_BITRATE_INDEX_MASK) >> ADEC_HEADER_BITRATE_INDEX_SHIFT) ];
// for ( i_dummy = 0; i_dummy < i_framesize; i_dummy++ )
// {
// GetByte( &p_adec->bit_stream );
// }
// for ( i_dummy = 0; i_dummy < 512; i_dummy++ )
// {
// p_adec->bank_0.v1[ i_dummy ] = .0;
// p_adec->bank_1.v1[ i_dummy ] = .0;
// p_adec->bank_0.v2[ i_dummy ] = .0;
// p_adec->bank_1.v2[ i_dummy ] = .0;
// }
/* Waiting until there is enough free space in the audio output fifo
* in order to store the new decoded frames */
vlc_mutex_lock( &p_adec->p_aout_fifo->data_lock );
/* adec_Layer2_Stereo() produces 6 output frames (2*1152/384)...
/* adec_Layer2_Stereo() produces 6 output frames (2*1152/384)...
* If these 6 frames were recorded in the audio output fifo, the
* l_end_frame index would be incremented 6 times. But, if after
* this operation the audio output fifo contains less than 6 frames,
......@@ -846,33 +829,22 @@ static void RunThread( adec_thread_t * p_adec )
{
vlc_cond_wait( &p_adec->p_aout_fifo->data_wait, &p_adec->p_aout_fifo->data_lock );
}
if ( DECODER_FIFO_START(p_adec->fifo)->b_has_pts )
{
p_adec->p_aout_fifo->date[p_adec->p_aout_fifo->l_end_frame] = DECODER_FIFO_START(p_adec->fifo)->i_pts;
DECODER_FIFO_START(p_adec->fifo)->b_has_pts = 0;
}
else
{
p_adec->p_aout_fifo->date[p_adec->p_aout_fifo->l_end_frame] = LAST_MDATE;
}
if ( DECODER_FIFO_START(p_adec->fifo)->b_has_pts )
{
p_adec->p_aout_fifo->date[p_adec->p_aout_fifo->l_end_frame] = DECODER_FIFO_START(p_adec->fifo)->i_pts;
DECODER_FIFO_START(p_adec->fifo)->b_has_pts = 0;
}
else
{
p_adec->p_aout_fifo->date[p_adec->p_aout_fifo->l_end_frame] = LAST_MDATE;
}
vlc_mutex_unlock( &p_adec->p_aout_fifo->data_lock );
/* Decoding the frames */
/* Decoding the frames */
if ( adec_Layer2_Stereo(p_adec) )
{
vlc_mutex_lock( &p_adec->p_aout_fifo->data_lock );
/* Frame 1 */
/*
if ( DECODER_FIFO_START(p_adec->fifo)->b_has_pts )
{
p_adec->p_aout_fifo->date[p_adec->p_aout_fifo->l_end_frame] = DECODER_FIFO_START(p_adec->fifo)->i_pts;
DECODER_FIFO_START(p_adec->fifo)->b_has_pts = 0;
}
else
{
p_adec->p_aout_fifo->date[p_adec->p_aout_fifo->l_end_frame] = LAST_MDATE;
}
*/
p_adec->p_aout_fifo->l_end_frame = (p_adec->p_aout_fifo->l_end_frame + 1) & AOUT_FIFO_SIZE;
/* Frame 2 */
p_adec->p_aout_fifo->date[p_adec->p_aout_fifo->l_end_frame] = LAST_MDATE;
......
......@@ -506,11 +506,6 @@ static __inline__ int NextFrame( aout_thread_t * p_aout, aout_fifo_t * p_fifo/*,
l_rate = (long)( ((mtime_t)l_units * 1000000)
/ (p_fifo->date[p_fifo->l_next_frame] - p_fifo->date[p_fifo->l_start_frame]) );
intf_DbgMsg( "aout debug: %li frame(s), %lli s, %li Hz\n",
(p_fifo->l_next_frame - p_fifo->l_start_frame) & AOUT_FIFO_SIZE,
p_fifo->date[p_fifo->l_next_frame] - p_fifo->date[p_fifo->l_start_frame],
l_rate );
InitializeIncrement( &p_fifo->unit_increment, l_rate, p_aout->dsp.l_rate );
p_fifo->l_units = (((l_units - (p_fifo->l_unit -
......
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