# HG changeset patch # User uau # Date 1193899952 0 # Node ID 463e96055996e5386055ce1b96b917c449552d0e # Parent 2bfc75674b7165e6c0684035aa8ff73a2786fa96 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. diff -r 2bfc75674b71 -r 463e96055996 mplayer.c --- a/mplayer.c Thu Nov 01 06:52:28 2007 +0000 +++ b/mplayer.c Thu Nov 01 06:52:32 2007 +0000 @@ -1495,7 +1495,7 @@ // 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);