1
mirror of https://github.com/mpv-player/mpv synced 2024-09-09 01:16:56 +02:00

Default to audiodump.pcm with nowaveheader again, but document it in the manpage this time.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14328 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2005-01-03 14:16:07 +00:00
parent 8f3e5a996c
commit 60f4241a6d
2 changed files with 8 additions and 2 deletions

View File

@ -1909,6 +1909,7 @@ When not included, raw PCM will be generated.
.IPs file=<filename>
Write the sound to <filename> instead of the default
audiodump.wav.
If nowaveheader is specified, the default is audiodump.pcm.
.REss
.PD 1
.RS

View File

@ -88,14 +88,19 @@ static int init(int rate,int channels,int format,int flags){
};
// set defaults
ao_pcm_waveheader = 1;
file.str = "audiodump.wav";
file.len = 13;
file.str = NULL;
file.len = 0;
if (subopt_parse(ao_subdevice, subopts) != 0) {
return 0;
}
if (file.len > 0) {
ao_outputfilename = malloc(file.len + 1);
memcpy(ao_outputfilename, file.str, file.len);
ao_outputfilename[file.len] = 0;
}
else
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