From aa657df525afced0ebaf6b921e009bd6a01d7330 Mon Sep 17 00:00:00 2001 From: uau Date: Thu, 1 Nov 2007 06:52:32 +0000 Subject: Make output samplerate independent of -speed The samplerate requested from the audio out depended on the initial value of playback speed on startup. Changing speed later at runtime does not affect output samplerate; audio is always resampled instead. Change the init code so that speed does not affect the samplerate requested and behavior matches what you'd get by starting the file with speed 1 and then changing it. The previous behavior could be desirable when using a constant speed value. However it means that if you start with a low speed and later switch to normal speed then audio will be resampled to a low output frequency. You can still use -srate to explicitly select the frequency. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24923 b3059339-0415-0410-9bf9-f77b7e298cf2 --- mplayer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mplayer.c') diff --git a/mplayer.c b/mplayer.c index ad9f3d7231..ff98a71b20 100644 --- a/mplayer.c +++ b/mplayer.c @@ -1495,7 +1495,7 @@ if(mpctx->sh_audio){ // first init to detect best values if(!init_audio_filters(mpctx->sh_audio, // preliminary init // input: - (int)(mpctx->sh_audio->samplerate*playback_speed), + mpctx->sh_audio->samplerate, // output: &ao_data.samplerate, &ao_data.channels, &ao_data.format)){ mp_msg(MSGT_CPLAYER,MSGL_ERR,MSGTR_AudioFilterChainPreinitError); -- cgit v1.2.3