summaryrefslogtreecommitdiffstats
path: root/libao2
diff options
context:
space:
mode:
Diffstat (limited to 'libao2')
-rw-r--r--libao2/ao_pcm.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libao2/ao_pcm.c b/libao2/ao_pcm.c
index 36acf5e703..1c30d2d08f 100644
--- a/libao2/ao_pcm.c
+++ b/libao2/ao_pcm.c
@@ -89,12 +89,14 @@ static int init(int rate,int channels,int format,int flags){
};
// 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 */