# 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
# 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.
/* 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
}
/* 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;
{
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;
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 )
}
}
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