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.*\.\.\."
# 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.
......@@ -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
......
......@@ -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 )
}
}
......
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