]> git.sesse.net Git - vlc/commitdiff
* Makefile :
authorMichel Kaempf <maxx@videolan.org>
Fri, 1 Oct 1999 15:44:31 +0000 (15:44 +0000)
committerMichel Kaempf <maxx@videolan.org>
Fri, 1 Oct 1999 15:44:31 +0000 (15:44 +0000)
- Rajout de l'option -pg maintenant que le %*!&#@ de bug est corrig�, et en
attendant qu'on trouve le moyen de releaser proprement le lock des
decoder_fifos :-)

* audio_decoder/audio_decoder.c :
- Correction d'un bug qui entrainait une d�rivation du son ;

* include/audio_output.h :
- Passage du nb max de fifos audio de 4 � 2 pour augmenter le niveau sonore ;

* interface/main.c :
- Typo ;

--
MaXX

Makefile
include/audio_output.h
src/audio_decoder/audio_decoder.c
src/interface/main.c

index 7c0474272ebc3f66c85ac68241627f0bc06b7d8d..468ea0a435647530401b8b5eb830be6ac384c056 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -89,7 +89,7 @@ FFILTER = grep -v "intf_.*Msg.*\.\.\."
 # Debugging settings: electric fence, debuging symbols and profiling support. 
 # Note that electric fence and accurate profiling are quite uncompatible.
 CCFLAGS += -g
-#CCFLAGS += -pg
+CCFLAGS += -pg
 #LIB += -ldmalloc
 #LIB += -lefence
 
@@ -213,5 +213,5 @@ $(OBJ): %.o: %.c
 # Two makefiles are used: the main one (this one) has regular generic rules,
 # except for .o files, for which it calls the object Makefile. Dependancies
 # are not included in this file.
-# The object Makefile known how to make a .o from a .c, and includes dependancies
-# for the target, but only those required.
+# The object Makefile known how to make a .o from a .c, and includes
+# dependancies for the target, but only those required.
index 5ec00f15d2e51630fd410167af558b4205533f51..994becc968c7e2c97d6d9de2a6fe0ccb2279a9ca 100644 (file)
@@ -50,7 +50,7 @@
 /* Maximum number of audio fifos. The value of AOUT_MAX_FIFOS should be a power
  * of two, in order to optimize the '/AOUT_MAX_FIFOS' and '*AOUT_MAX_FIFOS'
  * operations with '>>' and '<<' (gcc changes this at compilation-time) */
-#define AOUT_MAX_FIFOS          4
+#define AOUT_MAX_FIFOS          2
 
 /* Duration (in microseconds) of an audio output buffer should be :
  * - short, in order to be able to play a new song very quickly (especially a
index 92b598a0973fb839f07dd0f855ad72a0fc8e39c6..103010d7a3cac3cd6c3eede62be740a41bb19917 100644 (file)
@@ -809,18 +809,17 @@ static void RunThread( adec_thread_t * p_adec )
     }
 
     /* Initializing date_increment */
+    s64_denominator = (s64)p_adec->p_aout_fifo->l_rate;
     switch ( (p_adec->bit_stream.fifo.buffer & ADEC_HEADER_LAYER_MASK) >> ADEC_HEADER_LAYER_SHIFT )
     {
         /* Layer 2 */
         case 2:
             s64_numerator = 1152 * 1000000;
-            s64_denominator = (s64)p_adec->p_aout->dsp.l_rate;
             break;
 
         /* Layer 1 */
         case 3:
             s64_numerator = 384 * 1000000;
-            s64_denominator = (s64)p_adec->p_aout->dsp.l_rate;
             break;
     }
     date_increment.l_remainder = -(long)s64_denominator;
@@ -895,7 +894,8 @@ static void RunThread( adec_thread_t * p_adec )
                     {
                         pthread_mutex_lock( &p_adec->p_aout_fifo->data_lock );
                         /* Frame 1 */
-                        p_adec->p_aout_fifo->date[p_adec->p_aout_fifo->l_end_frame] = date;
+                        p_adec->p_aout_fifo->date[p_adec->p_aout_fifo->l_end_frame] = date; /* DECODER_FIFO_START(p_adec->fifo)->i_pts; */
+                        /* DECODER_FIFO_START(p_adec->fifo)->i_pts = 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;
@@ -913,9 +913,6 @@ static void RunThread( adec_thread_t * p_adec )
                         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;
                         pthread_mutex_unlock( &p_adec->p_aout_fifo->data_lock );
-/*
-                        date += 24000;
-*/
                         UPDATE_INCREMENT( date_increment, date )
                     }
                 }
index dd914573f3da1b825a603109530710c9ac44f647..6b56366716244b4e05647dec816fb28e8773f7dd 100644 (file)
@@ -201,14 +201,14 @@ int main( int i_argc, char *ppsz_argv[], char *ppsz_env[] )
     intf_Run( &program_data.intf_thread );
     intf_DbgMsg("intf debug: interface terminated\n");
 
-    /* 
+    /*
      * Close audio device
      */
-    if( program_data.cfg.b_audio )                 
+    if( program_data.cfg.b_audio )
     {
         aout_CancelThread( &program_data.aout_thread );
         aout_Close( &program_data.aout_thread );
-    }    
+    }
 
     /*
      * Free shared resources and libraries