]> git.sesse.net Git - vlc/commitdiff
* audio_decoder/audio_decoder.c :
authorMichel Kaempf <maxx@videolan.org>
Wed, 15 Dec 1999 19:01:41 +0000 (19:01 +0000)
committerMichel Kaempf <maxx@videolan.org>
Wed, 15 Dec 1999 19:01:41 +0000 (19:01 +0000)
- 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 ;

src/audio_decoder/audio_decoder.c
src/audio_output/audio_output.c

index 7cebb0bd2e895c872f3cef75352f8f312aac63ff..f408299093ecf07cf8a692c0b9d71d4efb40eeb1 100644 (file)
@@ -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;
index 2673bbea1c3b4e450dd029a6ac55b8d66820babd..d4bf1534f2a6ece29a3c814da6895840031059b2 100644 (file)
@@ -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 -