First reason: It has been that way since ten years or so.
Second reason: It is how the command line parsing works, -w <filename> is one item, storing <filename> as WAV output file, thus enabling WAV output.
This is the simple approach to command line parsing... we parse all options / parameters and the rest is input files. Similar to C compilers, where you usually have
cc -o output.bin source.c
Programs that usually operate on an input file and an output file adopt a syntax where you name them both, input file first. But for mpg123 WAV writing is just one mode of operation among many, the default one being sound output to some device.
Oh, by the way, would you also prefer
mpg123 -o alsa -a input.mp3 hw:0,0
instead of
mpg123 -o alsa -a hw:0,0 input.mp3
?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
First reason: It has been that way since ten years or so.
Second reason: It is how the command line parsing works, -w <filename> is one item, storing <filename> as WAV output file, thus enabling WAV output.
This is the simple approach to command line parsing... we parse all options / parameters and the rest is input files. Similar to C compilers, where you usually have
cc -o output.bin source.c
Programs that usually operate on an input file and an output file adopt a syntax where you name them both, input file first. But for mpg123 WAV writing is just one mode of operation among many, the default one being sound output to some device.
Oh, by the way, would you also prefer
mpg123 -o alsa -a input.mp3 hw:0,0
instead of
mpg123 -o alsa -a hw:0,0 input.mp3
?