changeset 11859:b8bee4f4b8bb

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!
author rfelker
date Tue, 27 Jan 2004 06:45:43 +0000
parents 456c9ab6c211
children 10fc83e1a86d
files libaf/af.c
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libaf/af.c	Tue Jan 27 06:43:37 2004 +0000
+++ b/libaf/af.c	Tue Jan 27 06:45:43 2004 +0000
@@ -383,6 +383,12 @@
       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;
     }