# HG changeset patch # User diego # Date 1147547079 0 # Node ID b23c0e341e3ef25cdb3bbabe6af6d405617f4f7c # Parent d8083c152f3eb666e13602c114176b055526b9c1 Move setting the output filename after the suboption parsing, otherwise it cannot take the suboptions that were set into account. diff -r d8083c152f3e -r b23c0e341e3e libao2/ao_pcm.c --- 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 */