summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorErik de Castro Lopo <erikd@mega-nerd.com>2017-05-27 16:07:35 +1000
committerErik de Castro Lopo <erikd@mega-nerd.com>2017-05-27 17:22:19 +1000
commitbb750734287a4079ca3de9ff85c71cc62160ac46 (patch)
tree0f66793f371634a4b75a4c8639230dfbfd481257 /test
parentb762a20ace7c7771f87f63478bcee3cf51268cff (diff)
downloadflac-bb750734287a4079ca3de9ff85c71cc62160ac46.tar.gz
flac: Use WAVEFORMATEXTENSIBLE when bps != (8|16)
When decoding to WAV, the legacy wFormatTag of WAVE_FORMAT_PCM should only be used if the bitwidth is 8 or 16. For all other bitwidths, use WAVEFORMATEXTENSIBLE. Two of the test programs/scripts also needed updating.
Diffstat (limited to 'test')
-rwxr-xr-xtest/write_iff.pl2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/write_iff.pl b/test/write_iff.pl
index b423ab31..f9efa74d 100755
--- a/test/write_iff.pl
+++ b/test/write_iff.pl
@@ -40,7 +40,7 @@ my $bigdatasize = $bigsamples * $bps * $channels;
my $padding = int($bigdatasize & 1); # for aiff/wave/rf64 chunk alignment
my $padding8 = 8 - int($bigdatasize & 7); $padding8 = 0 if $padding8 == 8; # for wave64 alignment
# wave-ish file needs to be WAVEFORMATEXTENSIBLE?
-my $wavx = ($format eq 'wave' || $format eq 'wave64' || $format eq 'rf64') && ($channels > 2);
+my $wavx = ($format eq 'wave' || $format eq 'wave64' || $format eq 'rf64') && ($channels > 2 || ($bps != 8 && $bps != 16));
# write header