Commit f48ce6f6 authored by Michel Kaempf's avatar Michel Kaempf

* Makefile :

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