From f69f48b200dd058feeebab0a69eeee741d1a55ff Mon Sep 17 00:00:00 2001 From: rfelker Date: Tue, 27 Jan 2004 06:45:43 +0000 Subject: [PATCH] if the user wants fast, use fast code! otherwise the user has to put af=resample=44100:0:0 in the config file, which will resample all files, not just ones that need it. libaf still sux! git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@11860 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libaf/af.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libaf/af.c b/libaf/af.c index 3b8293c141..1a8513b6b4 100644 --- a/libaf/af.c +++ b/libaf/af.c @@ -383,6 +383,12 @@ int af_init(af_stream_t* s, int force_output) if(!af || (AF_OK != af->control(af,AF_CONTROL_RESAMPLE_RATE, &(s->output.rate)))) return -1; + // Use lin int if the user wants fast + if ((AF_INIT_TYPE_MASK & s->cfg.force) == AF_INIT_FAST) { + char args[32]; + sprintf(args, "%d:0:0", s->output.rate); + af->control(af, AF_CONTROL_COMMAND_LINE, args); + } if(AF_OK != af_reinit(s,af)) return -1; }