diff options
Diffstat (limited to 'src/xine-engine')
-rw-r--r-- | src/xine-engine/audio_out.c | 5 | ||||
-rw-r--r-- | src/xine-engine/audio_out.h | 3 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/xine-engine/audio_out.c b/src/xine-engine/audio_out.c index 442e0c388..ab5cb40f4 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.22 2001/10/16 17:57:31 joachim_koenig Exp $ + * $Id: audio_out.c,v 1.23 2001/11/04 22:49:38 guenter Exp $ * * 22-8-2001 James imported some useful AC3 sections from the previous alsa driver. * (c) 2001 Andy Lo A Foe <andy@alsaplayer.org> @@ -126,7 +126,7 @@ static int ao_open(ao_instance_t *this, uint32_t bits, uint32_t rate, int mode) { int output_sample_rate; - if ((output_sample_rate=this->driver->open(this->driver,bits,rate,mode)) == 0) { + if ((output_sample_rate=this->driver->open(this->driver,bits,(this->force_rate ? this->force_rate : rate),mode)) == 0) { printf("audio_out: open failed!\n"); return 0; }; @@ -460,6 +460,7 @@ ao_instance_t *ao_new_instance (ao_driver_t *driver, metronom_t *metronom, this->gap_tolerance = driver->get_gap_tolerance (this->driver); this->resample_conf = config->lookup_int (config, "audio_resample_mode", 0); + this->force_rate = config->lookup_int (config, "audio_force_rate", 0); return this; } diff --git a/src/xine-engine/audio_out.h b/src/xine-engine/audio_out.h index 501eac29a..b167f1563 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.18 2001/10/01 23:04:57 f1rmb Exp $ + * $Id: audio_out.h,v 1.19 2001/11/04 22:49:38 guenter Exp $ */ #ifndef HAVE_AUDIO_OUT_H #define HAVE_AUDIO_OUT_H @@ -175,6 +175,7 @@ struct ao_instance_s { int audio_started; uint32_t last_audio_vpts; int resample_conf; + int force_rate; /* force audio output rate to this value if non-zero */ int do_resample; int mode; int bits; |