changeset 18488:b23c0e341e3e

Move setting the output filename after the suboption parsing, otherwise it cannot take the suboptions that were set into account.
author diego
date Sat, 13 May 2006 19:04:39 +0000
parents d8083c152f3e
children adfadb4a26b5
files libao2/ao_pcm.c
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libao2/ao_pcm.c	Sat May 13 19:03:20 2006 +0000
+++ b/libao2/ao_pcm.c	Sat May 13 19:04:39 2006 +0000
@@ -89,12 +89,14 @@
 	};
 	// set defaults
 	ao_pcm_waveheader = 1;
-	ao_outputfilename =
-	      strdup((ao_pcm_waveheader)?"audiodump.wav":"audiodump.pcm");
+
 	if (subopt_parse(ao_subdevice, subopts) != 0) {
 	  return 0;
 	}
 
+	ao_outputfilename =
+	      strdup((ao_pcm_waveheader)?"audiodump.wav":"audiodump.pcm");
+
 	/* bits is only equal to format if (format == 8) or (format == 16);
 	   this means that the following "if" is a kludge and should
 	   really be a switch to be correct in all cases */