[Vorbis] oggdec.exe not using album gain stdout option
Ian Malone
ibmalone at gmail.com
Tue Oct 24 13:29:19 PDT 2006
Jeremy R. Donnell wrote:
>
>
> line 775 of oggdec.c
>
> if(!send_to_stdout && audiophile || radio)
> {
> fprintf(stderr, audiophile
> ? " Running in Album/Audiophile mode\n\n"
> : " Running in Track/Radio mode\n\n");
> /* We are using ReplayGain tags, so get the scale for gain
> adjustment. */
> scale = get_scale(file_names[i], audiophile, radio);
> }
> else
> scale = 1.0;
>
> It seems to me from looking at that code that it shouldn't do either track
> or album gain when stdout is selected, but that contradicts the actual
> results that I've obtained. Perhaps I don't fully grasp the logical
> operator
> rules in C? In C# this would dump to the else as soon as !send_to_stdout
> evaluated as false, and the audiophile and radio operands would not even be
> evaluated. I'm thinking that the correct solution would be to take the
> !send_to_stdout out of the first if statement and add it in before the
> fprintf() call. In fact, I've seen the "Running in Track/Radio mode"
> message
> when using the options "-r -o".
'&&' binds more tightly than '||', is this actually different in C#?
This if clause is equivalent to
((!send_to_stdout && audiophile) || radio)
--
imalone
More information about the Vorbis
mailing list