change default extension for ogg flac from .ogg to .oga (SF#1762492: http://sourceforge.net/tracker/index.php?func=detail&aid=1762492&group_id=13478&atid=113478)
This commit is contained in:
parent
05f710f4e0
commit
12d3a41896
@ -73,13 +73,14 @@
|
||||
<li>
|
||||
Ogg FLAC format:
|
||||
<ul>
|
||||
<li>(none)</li>
|
||||
<li>This is not a format change, but changed default extension for Ogg FLAC from .ogg to .oga, according to new Xiph <a href="http://wiki.xiph.org/index.php/MIME_Types_and_File_Extensions">specification</a> (<a href="https://sourceforge.net/tracker/index.php?func=detail&aid=1762492&group_id=13478&atid=113478">SF #1762492</a> </li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
flac:
|
||||
<ul>
|
||||
<li>Added a new option <span class="argument"><a href="documentation_tools_flac.html#flac_options_no_utf8_convert">--no-utf8-convert</a></span> which works like it does in <span class="commandname">metaflac</span> (<a href="https://sourceforge.net/tracker/index.php?func=detail&aid=973740&group_id=13478&atid=363478">SF #973740</a>).</li>
|
||||
<li>Changed default extension for Ogg FLAC from .ogg to .oga, according to new Xiph <a href="http://wiki.xiph.org/index.php/MIME_Types_and_File_Extensions">specification</a> (<a href="https://sourceforge.net/tracker/index.php?func=detail&aid=1762492&group_id=13478&atid=113478">SF #1762492</a> </li>
|
||||
<li>Fixed bug where using <span class="argument">--replay-gain</span> without any padding option caused only a small PADDING block to be created (<a href="https://sourceforge.net/tracker/index.php?func=detail&aid=1760790&group_id=13478&atid=113478">SF #1760790</a>).</li>
|
||||
<li>Fixed bug where importing non-CDDA cuesheets would cause an invalid lead-out track number (<a href="https://sourceforge.net/tracker/index.php?func=detail&aid=1764105&group_id=13478&atid=113478">SF #1764105</a>).</li>
|
||||
</ul>
|
||||
@ -88,6 +89,7 @@
|
||||
metaflac:
|
||||
<ul>
|
||||
<li>Fixed bug where importing non-CDDA cuesheets would cause an invalid lead-out track number (<a href="https://sourceforge.net/tracker/index.php?func=detail&aid=1764105&group_id=13478&atid=113478">SF #1764105</a>).</li>
|
||||
<li>Changed default extension for Ogg FLAC from .ogg to .oga, according to new Xiph <a href="http://wiki.xiph.org/index.php/MIME_Types_and_File_Extensions">specification</a> (<a href="https://sourceforge.net/tracker/index.php?func=detail&aid=1762492&group_id=13478&atid=113478">SF #1762492</a> </li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
|
@ -64,7 +64,7 @@
|
||||
<br />
|
||||
<span class="commandname">flac</span> is the command-line file encoder/decoder. The encoder currently supports as input RIFF WAVE, AIFF, FLAC or Ogg FLAC format, or raw interleaved samples. The decoder currently can output to RIFF WAVE or AIFF format, or raw interleaved samples. <span class="commandname">flac</span> only supports linear PCM samples (in other words, no A-LAW, uLAW, etc.), and the input must be between 4 and 24 bits per sample. This is not a limitation of the FLAC format, just the reference encoder/decoder.<br />
|
||||
<br />
|
||||
<span class="commandname">flac</span> assumes that files ending in ".wav" or that have the RIFF WAVE header present are WAVE files, files ending in ".aif" or ".aiff" or have the AIFF header present are AIFF files, and files ending in ".flac" or have the FLAC header present are FLAC files. This assumption may be overridden with a command-line option. It also assumes that files ending in ".ogg" of have the Ogg FLAC header present are Ogg FLAC files. Other than this, <span class="commandname">flac</span> makes no assumptions about file extensions, though the convention is that FLAC files have the extension ".flac" (or ".fla" on ancient "8.3" file systems like FAT-16).<br />
|
||||
<span class="commandname">flac</span> assumes that files ending in ".wav" or that have the RIFF WAVE header present are WAVE files, files ending in ".aif" or ".aiff" or have the AIFF header present are AIFF files, and files ending in ".flac" or have the FLAC header present are FLAC files. This assumption may be overridden with a command-line option. It also assumes that files ending in ".oga" or ".ogg" or have the Ogg FLAC header present are Ogg FLAC files. Other than this, <span class="commandname">flac</span> makes no assumptions about file extensions, though the convention is that FLAC files have the extension ".flac" (or ".fla" on ancient "8.3" file systems like FAT-16).<br />
|
||||
<br />
|
||||
Before going into the full command-line description, a few other things help to sort it out: 1) <span class="commandname">flac</span> encodes by default, so you must use <b>-d</b> to decode; 2) the options <span class="argument">-0</span> .. <span class="argument">-8</span> (or <span class="argument">--fast</span> and <span class="argument">--best</span>) that control the compression level actually are just synonyms for different groups of specific encoding options (described later) and you can get the same effect by using the same options; 3) <span class="commandname">flac</span> behaves similarly to gzip in the way it handles input and output files.<br />
|
||||
<br />
|
||||
@ -301,9 +301,9 @@
|
||||
<span class="argument">--ogg</span>
|
||||
</td>
|
||||
<td>
|
||||
When encoding, generate Ogg FLAC output instead of native FLAC. Ogg FLAC streams are FLAC streams wrapped in an Ogg transport layer. The resulting file should have an '.ogg' extension and will still be decodable by <span class="commandname">flac</span>.<br />
|
||||
When encoding, generate Ogg FLAC output instead of native FLAC. Ogg FLAC streams are FLAC streams wrapped in an Ogg transport layer. The resulting file should have an '.oga' extension and will still be decodable by <span class="commandname">flac</span>.<br />
|
||||
<br />
|
||||
When decoding, force the input to be treated as Ogg FLAC. This is useful when piping input from stdin or when the filename does not end in '.ogg'.<br />
|
||||
When decoding, force the input to be treated as Ogg FLAC. This is useful when piping input from stdin or when the filename does not end in '.oga' or '.ogg'.<br />
|
||||
<br />
|
||||
<b>NOTE:</b> Ogg FLAC files created prior to <span class="commandname">flac</span> 1.1.1 used an ad-hoc mapping and do not support seeking. They should be decoded and re-encoded with <span class="commandname">flac</span> 1.1.1 or later.
|
||||
</td>
|
||||
|
@ -51,6 +51,7 @@
|
||||
<arg><replaceable>infile.aiff</replaceable></arg>
|
||||
<arg><replaceable>infile.raw</replaceable></arg>
|
||||
<arg><replaceable>infile.flac</replaceable></arg>
|
||||
<arg><replaceable>infile.oga</replaceable></arg>
|
||||
<arg><replaceable>infile.ogg</replaceable></arg>
|
||||
<arg>-</arg>
|
||||
</group>
|
||||
@ -65,6 +66,7 @@
|
||||
<arg choice=opt><replaceable>OPTIONS</replaceable></arg>
|
||||
<group rep=repeat>
|
||||
<arg><replaceable>infile.flac</replaceable></arg>
|
||||
<arg><replaceable>infile.oga</replaceable></arg>
|
||||
<arg><replaceable>infile.ogg</replaceable></arg>
|
||||
<arg>-</arg>
|
||||
</group>
|
||||
@ -221,8 +223,8 @@
|
||||
<term><option>--ogg</option></term>
|
||||
|
||||
<listitem>
|
||||
<para>When encoding, generate Ogg FLAC output instead of native FLAC. Ogg FLAC streams are FLAC streams wrapped in an Ogg transport layer. The resulting file should have an '.ogg' extension and will still be decodable by flac.</para>
|
||||
<para>When decoding, force the input to be treated as Ogg FLAC. This is useful when piping input from stdin or when the filename does not end in '.ogg'.</para>
|
||||
<para>When encoding, generate Ogg FLAC output instead of native FLAC. Ogg FLAC streams are FLAC streams wrapped in an Ogg transport layer. The resulting file should have an '.oga' extension and will still be decodable by flac.</para>
|
||||
<para>When decoding, force the input to be treated as Ogg FLAC. This is useful when piping input from stdin or when the filename does not end in '.oga' or '.ogg'.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
|
@ -1330,12 +1330,12 @@ void show_explain(void)
|
||||
printf(" --ogg When encoding, generate Ogg FLAC output instead\n");
|
||||
printf(" of native FLAC. Ogg FLAC streams are FLAC\n");
|
||||
printf(" streams wrapped in an Ogg transport layer. The\n");
|
||||
printf(" resulting file should have an '.ogg' extension\n");
|
||||
printf(" resulting file should have an '.oga' extension\n");
|
||||
printf(" and will still be decodable by flac. When\n");
|
||||
printf(" decoding, force the input to be treated as\n");
|
||||
printf(" Ogg FLAC. This is useful when piping input\n");
|
||||
printf(" from stdin or when the filename does not end in\n");
|
||||
printf(" '.ogg'.\n");
|
||||
printf(" '.oga' or '.ogg'.\n");
|
||||
printf(" --serial-number Serial number to use for the FLAC stream. When\n");
|
||||
printf(" encoding and no serial number is given, flac\n");
|
||||
printf(" uses a random one. If encoding to multiple files\n");
|
||||
@ -1625,6 +1625,8 @@ int encode_file(const char *infilename, FLAC__bool is_first_file, FLAC__bool is_
|
||||
fmt= AIF;
|
||||
else if(strlen(infilename) >= 5 && 0 == FLAC__STRCASECMP(infilename+(strlen(infilename)-5), ".flac"))
|
||||
fmt= FLAC;
|
||||
else if(strlen(infilename) >= 4 && 0 == FLAC__STRCASECMP(infilename+(strlen(infilename)-4), ".oga"))
|
||||
fmt= OGGFLAC;
|
||||
else if(strlen(infilename) >= 4 && 0 == FLAC__STRCASECMP(infilename+(strlen(infilename)-4), ".ogg"))
|
||||
fmt= OGGFLAC;
|
||||
|
||||
@ -1913,6 +1915,8 @@ int decode_file(const char *infilename)
|
||||
|
||||
if(option_values.use_ogg)
|
||||
treat_as_ogg = true;
|
||||
else if(strlen(infilename) >= 4 && 0 == FLAC__STRCASECMP(infilename+(strlen(infilename)-4), ".oga"))
|
||||
treat_as_ogg = true;
|
||||
else if(strlen(infilename) >= 4 && 0 == FLAC__STRCASECMP(infilename+(strlen(infilename)-4), ".ogg"))
|
||||
treat_as_ogg = true;
|
||||
else
|
||||
@ -1988,7 +1992,7 @@ int decode_file(const char *infilename)
|
||||
|
||||
const char *get_encoded_outfilename(const char *infilename)
|
||||
{
|
||||
const char *suffix = (option_values.use_ogg? ".ogg" : ".flac");
|
||||
const char *suffix = (option_values.use_ogg? ".oga" : ".flac");
|
||||
return get_outfilename(infilename, suffix);
|
||||
}
|
||||
|
||||
|
@ -117,7 +117,7 @@ FLAC__bool do_major_operation_on_file(const char *filename, const CommandLineOpt
|
||||
die("out of memory allocating chain");
|
||||
|
||||
/*@@@@ lame way of guessing the file type */
|
||||
if(strlen(filename) >= 4 && 0 == strcmp(filename+strlen(filename)-4, ".ogg"))
|
||||
if(strlen(filename) >= 4 && (0 == strcmp(filename+strlen(filename)-4, ".oga") || 0 == strcmp(filename+strlen(filename)-4, ".ogg")))
|
||||
is_ogg = true;
|
||||
|
||||
if(! (is_ogg? FLAC__metadata_chain_read_ogg(chain, filename) : FLAC__metadata_chain_read(chain, filename)) ) {
|
||||
|
@ -66,7 +66,7 @@ static off_t flacfilesize_;
|
||||
|
||||
static const char *flacfilename(bool is_ogg)
|
||||
{
|
||||
return is_ogg? "metadata.ogg" : "metadata.flac";
|
||||
return is_ogg? "metadata.oga" : "metadata.flac";
|
||||
}
|
||||
|
||||
static bool die_(const char *msg)
|
||||
|
@ -49,7 +49,7 @@ static const unsigned num_metadata_ = sizeof(metadata_sequence_) / sizeof(metada
|
||||
|
||||
static const char *flacfilename(bool is_ogg)
|
||||
{
|
||||
return is_ogg? "metadata.ogg" : "metadata.flac";
|
||||
return is_ogg? "metadata.oga" : "metadata.flac";
|
||||
}
|
||||
|
||||
static bool die_(const char *msg)
|
||||
|
@ -80,7 +80,7 @@ static unsigned mc_our_block_number_ = 0;
|
||||
|
||||
static const char *flacfilename(bool is_ogg)
|
||||
{
|
||||
return is_ogg? "metadata.ogg" : "metadata.flac";
|
||||
return is_ogg? "metadata.oga" : "metadata.flac";
|
||||
}
|
||||
|
||||
static bool die_(const char *msg)
|
||||
|
@ -66,7 +66,7 @@ static off_t flacfilesize_;
|
||||
|
||||
static const char *flacfilename(FLAC__bool is_ogg)
|
||||
{
|
||||
return is_ogg? "metadata.ogg" : "metadata.flac";
|
||||
return is_ogg? "metadata.oga" : "metadata.flac";
|
||||
}
|
||||
|
||||
static FLAC__bool die_(const char *msg)
|
||||
|
@ -51,7 +51,7 @@ static const unsigned num_metadata_ = sizeof(metadata_sequence_) / sizeof(metada
|
||||
|
||||
static const char *flacfilename(FLAC__bool is_ogg)
|
||||
{
|
||||
return is_ogg? "metadata.ogg" : "metadata.flac";
|
||||
return is_ogg? "metadata.oga" : "metadata.flac";
|
||||
}
|
||||
|
||||
static FLAC__bool die_(const char *msg)
|
||||
|
@ -73,7 +73,7 @@ static unsigned mc_our_block_number_ = 0;
|
||||
|
||||
static const char *flacfilename(FLAC__bool is_ogg)
|
||||
{
|
||||
return is_ogg? "metadata.ogg" : "metadata.flac";
|
||||
return is_ogg? "metadata.oga" : "metadata.flac";
|
||||
}
|
||||
|
||||
static FLAC__bool die_(const char *msg)
|
||||
|
@ -480,7 +480,7 @@ int main(int argc, char *argv[])
|
||||
/* no need to do "decode all" read_mode if PCM checking is available */
|
||||
if (rawfilename && read_mode > 1)
|
||||
continue;
|
||||
if (strlen(flacfilename) > 4 && 0 == strcmp(flacfilename+strlen(flacfilename)-4, ".ogg")) {
|
||||
if (strlen(flacfilename) > 4 && (0 == strcmp(flacfilename+strlen(flacfilename)-4, ".oga") || 0 == strcmp(flacfilename+strlen(flacfilename)-4, ".ogg"))) {
|
||||
#if FLAC__HAS_OGG
|
||||
ok = seek_barrage(/*is_ogg=*/true, flacfilename, flacfilesize, count, samples, read_mode, rawfilename? pcm : 0);
|
||||
#else
|
||||
|
@ -46,6 +46,7 @@ EXTRA_DIST = \
|
||||
CLEANFILES = \
|
||||
$(wildcard *.raw) \
|
||||
$(wildcard *.flac) \
|
||||
$(wildcard *.oga) \
|
||||
$(wildcard *.ogg) \
|
||||
$(wildcard *.cmp) \
|
||||
$(wildcard *.aiff) \
|
||||
|
@ -52,4 +52,4 @@ valgrind: all
|
||||
release : all
|
||||
|
||||
clean:
|
||||
rm -f *.raw *.flac *.ogg *.cmp *.aiff *.wav *.diff *.log *.cue core flac-to-flac-metadata-test-files/out.* metaflac-test-files/out.*
|
||||
rm -f *.raw *.flac *.oga *.ogg *.cmp *.aiff *.wav *.diff *.log *.cue core flac-to-flac-metadata-test-files/out.* metaflac-test-files/out.*
|
||||
|
@ -242,15 +242,15 @@ rt_test_ogg_flac ()
|
||||
{
|
||||
f="$1"
|
||||
echo -n "round-trip test ($f->oggflac->oggflac->wav) encode... "
|
||||
run_flac $SILENT --force --verify --channel-map=none --no-padding --lax -o rt.ogg --ogg $f || die "ERROR"
|
||||
run_flac $SILENT --force --verify --channel-map=none --no-padding --lax -o rt.oga --ogg $f || die "ERROR"
|
||||
echo -n "re-encode... "
|
||||
run_flac $SILENT --force --verify --lax -o rt2.ogg --ogg rt.ogg || die "ERROR"
|
||||
run_flac $SILENT --force --verify --lax -o rt2.oga --ogg rt.oga || die "ERROR"
|
||||
echo -n "decode... "
|
||||
run_flac $SILENT --force --decode --channel-map=none -o rt.wav rt2.ogg || die "ERROR"
|
||||
run_flac $SILENT --force --decode --channel-map=none -o rt.wav rt2.oga || die "ERROR"
|
||||
echo -n "compare... "
|
||||
cmp $f rt.wav || die "ERROR: file mismatch"
|
||||
echo "OK"
|
||||
rm -f rt.wav rt.ogg rt2.ogg
|
||||
rm -f rt.wav rt.oga rt2.oga
|
||||
}
|
||||
|
||||
for f in rt-*.raw ; do
|
||||
@ -1040,7 +1040,7 @@ test_multifile ()
|
||||
fi
|
||||
|
||||
if [ $streamtype = ogg ] ; then
|
||||
suffix=ogg
|
||||
suffix=oga
|
||||
encode_options="$encode_options --ogg"
|
||||
else
|
||||
suffix=flac
|
||||
|
@ -136,20 +136,20 @@ done
|
||||
if [ $has_ogg = "yes" ] ; then
|
||||
|
||||
echo "generating Ogg FLAC files for seeking:"
|
||||
run_flac --verify --force --silent --force-raw-format --endian=big --sign=signed --sample-rate=44100 --bps=8 --channels=1 --blocksize=576 --output-name=tiny.ogg --ogg noise8m32.raw || die "ERROR generating Ogg FLAC file"
|
||||
run_flac --verify --force --silent --force-raw-format --endian=big --sign=signed --sample-rate=44100 --bps=16 --channels=2 --blocksize=576 --output-name=small.ogg --ogg noise.raw || die "ERROR generating Ogg FLAC file"
|
||||
run_flac --verify --force --silent --force-raw-format --endian=big --sign=signed --sample-rate=44100 --bps=8 --channels=1 --blocksize=576 --output-name=tiny.oga --ogg noise8m32.raw || die "ERROR generating Ogg FLAC file"
|
||||
run_flac --verify --force --silent --force-raw-format --endian=big --sign=signed --sample-rate=44100 --bps=16 --channels=2 --blocksize=576 --output-name=small.oga --ogg noise.raw || die "ERROR generating Ogg FLAC file"
|
||||
# seek tables are not used in Ogg FLAC
|
||||
|
||||
echo "testing tiny.ogg:"
|
||||
if run_test_seeking tiny.ogg $tiny_seek_count $tiny_samples noise8m32.raw ; then : ; else
|
||||
echo "testing tiny.oga:"
|
||||
if run_test_seeking tiny.oga $tiny_seek_count $tiny_samples noise8m32.raw ; then : ; else
|
||||
die "ERROR: during test_seeking"
|
||||
fi
|
||||
|
||||
echo "testing small.ogg:"
|
||||
if run_test_seeking small.ogg $small_seek_count $small_samples noise.raw ; then : ; else
|
||||
echo "testing small.oga:"
|
||||
if run_test_seeking small.oga $small_seek_count $small_samples noise.raw ; then : ; else
|
||||
die "ERROR: during test_seeking"
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
rm -f tiny.flac tiny.ogg small.flac small.ogg tiny-s.flac small-s.flac
|
||||
rm -f tiny.flac tiny.oga small.flac small.oga tiny-s.flac small-s.flac
|
||||
|
Loading…
Reference in New Issue
Block a user