diff options
author | Heiko Schaefer <heikos@users.sourceforge.net> | 2002-07-28 21:37:35 +0000 |
---|---|---|
committer | Heiko Schaefer <heikos@users.sourceforge.net> | 2002-07-28 21:37:35 +0000 |
commit | d18ad5e4e7bcbef62d7e8facd1ee401dc5d7e39c (patch) | |
tree | 10da0fe32a11d3cf4136bd6f08d7ebd695b7863f | |
parent | 7a52017633920bf7b1981e4558c31100c809a3b9 (diff) | |
download | xine-lib-d18ad5e4e7bcbef62d7e8facd1ee401dc5d7e39c.tar.gz xine-lib-d18ad5e4e7bcbef62d7e8facd1ee401dc5d7e39c.tar.bz2 |
introduce a config option for passthough offset
CVS patchset: 2362
CVS date: 2002/07/28 21:37:35
-rw-r--r-- | src/xine-engine/audio_out.c | 12 | ||||
-rw-r--r-- | src/xine-engine/audio_out.h | 4 |
2 files changed, 12 insertions, 4 deletions
diff --git a/src/xine-engine/audio_out.c b/src/xine-engine/audio_out.c index d8dc863ab..49f5fe4d7 100644 --- a/src/xine-engine/audio_out.c +++ b/src/xine-engine/audio_out.c @@ -17,7 +17,7 @@ * along with self program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: audio_out.c,v 1.61 2002/07/02 00:11:56 jcdutton Exp $ + * $Id: audio_out.c,v 1.62 2002/07/28 21:37:35 heikos Exp $ * * 22-8-2001 James imported some useful AC3 sections from the previous alsa driver. * (c) 2001 Andy Lo A Foe <andy@alsaplayer.org> @@ -290,7 +290,7 @@ static void *ao_loop (void *this_gen) { int64_t hw_vpts; audio_buffer_t *buf, *in_buf; int64_t gap; - int delay; + int64_t delay; int64_t cur_time; int num_output_frames ; int paused_wait; @@ -330,7 +330,7 @@ static void *ao_loop (void *this_gen) { /* External A52 decoder delay correction */ if ((this->output.mode==AO_CAP_MODE_A52) || (this->output.mode==AO_CAP_MODE_AC5)) - delay+=10; + delay += this->passthrough_offset; hw_vpts += delay * 1024 / this->frames_per_kpts; @@ -828,6 +828,12 @@ ao_instance_t *ao_new_instance (ao_driver_t *driver, xine_t *xine) { _("if !=0 always resample to given rate"), NULL, NULL, NULL); + this->passthrough_offset = config->register_num (config, + "audio.passthrough_offset", + 10000, + _("adjust if audio is offsync"), + NULL, NULL, NULL); + /* * pre-allocate memory for samples */ diff --git a/src/xine-engine/audio_out.h b/src/xine-engine/audio_out.h index d7a345ac9..b3aa50f85 100644 --- a/src/xine-engine/audio_out.h +++ b/src/xine-engine/audio_out.h @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: audio_out.h,v 1.31 2002/07/01 13:51:28 miguelfreitas Exp $ + * $Id: audio_out.h,v 1.32 2002/07/28 21:37:35 heikos Exp $ */ #ifndef HAVE_AUDIO_OUT_H #define HAVE_AUDIO_OUT_H @@ -229,6 +229,8 @@ struct ao_instance_s { audio_buffer_t *frame_buf[2]; /* two buffers for "stackable" conversions */ int16_t *zero_space; + + int64_t passthrough_offset; }; /* This initiates the audio_out sync routines |