Browse Source

+ check the audio format id field in the tests as well

git-svn-id: trunk@47467 -
nickysn 4 years ago
parent
commit
8ff5adeb4f

+ 1 - 1
packages/fcl-sound/tests/data/wav/reader/valid/44k_mono_16.wav.info.txt

@@ -1 +1 @@
-44100 1 16
+44100 1 16 1

+ 1 - 1
packages/fcl-sound/tests/data/wav/reader/valid/44k_mono_16_tag.wav.info.txt

@@ -1 +1 @@
-44100 1 16
+44100 1 16 1

+ 1 - 1
packages/fcl-sound/tests/data/wav/reader/valid/44k_mono_24.wav.info.txt

@@ -1 +1 @@
-44100 1 24
+44100 1 24 1

+ 1 - 1
packages/fcl-sound/tests/data/wav/reader/valid/44k_mono_32.wav.info.txt

@@ -1 +1 @@
-44100 1 32
+44100 1 32 1

+ 1 - 1
packages/fcl-sound/tests/data/wav/reader/valid/44k_mono_32float.wav.info.txt

@@ -1 +1 @@
-44100 1 32
+44100 1 32 3

+ 1 - 1
packages/fcl-sound/tests/data/wav/reader/valid/44k_mono_64float.wav.info.txt

@@ -1 +1 @@
-44100 1 64
+44100 1 64 3

+ 1 - 1
packages/fcl-sound/tests/data/wav/reader/valid/44k_mono_8.wav.info.txt

@@ -1 +1 @@
-44100 1 8
+44100 1 8 1

+ 1 - 1
packages/fcl-sound/tests/data/wav/reader/valid/44k_stereo_16.wav.info.txt

@@ -1 +1 @@
-44100 2 16
+44100 2 16 1

+ 1 - 1
packages/fcl-sound/tests/data/wav/reader/valid/44k_stereo_24.wav.info.txt

@@ -1 +1 @@
-44100 2 24
+44100 2 24 1

+ 1 - 1
packages/fcl-sound/tests/data/wav/reader/valid/44k_stereo_32.wav.info.txt

@@ -1 +1 @@
-44100 2 32
+44100 2 32 1

+ 1 - 1
packages/fcl-sound/tests/data/wav/reader/valid/44k_stereo_32float.wav.info.txt

@@ -1 +1 @@
-44100 2 32
+44100 2 32 3

+ 1 - 1
packages/fcl-sound/tests/data/wav/reader/valid/44k_stereo_64float.wav.info.txt

@@ -1 +1 @@
-44100 2 64
+44100 2 64 3

+ 1 - 1
packages/fcl-sound/tests/data/wav/reader/valid/44k_stereo_8.wav.info.txt

@@ -1 +1 @@
-44100 2 8
+44100 2 8 1

+ 1 - 1
packages/fcl-sound/tests/data/wav/reader/valid/euphoric_tape.wav.info.txt

@@ -1 +1 @@
-4800 1 8
+4800 1 8 1

+ 4 - 2
packages/fcl-sound/tests/tcwavreader.pas

@@ -28,7 +28,8 @@ var
   WavReader: TWavReader;
   InfoFile: TextFile;
   RawDataFile: File;
-  ExpectedSampleRate, ExpectedChannels, ExpectedBitsPerSample: Integer;
+  ExpectedSampleRate, ExpectedChannels, ExpectedBitsPerSample,
+  ExpectedFormat: Integer;
   ExpectedData: array of Byte;
   ActualData: array of Byte;
   ActualDataLen: Integer;
@@ -37,7 +38,7 @@ begin
   AssignFile(InfoFile, CorrectFileDir + FileName + '.info.txt');
   Reset(InfoFile);
   try
-    Readln(InfoFile, ExpectedSampleRate, ExpectedChannels, ExpectedBitsPerSample);
+    Readln(InfoFile, ExpectedSampleRate, ExpectedChannels, ExpectedBitsPerSample, ExpectedFormat);
   finally
     CloseFile(InfoFile);
   end;
@@ -61,6 +62,7 @@ begin
   try
     if not WavReader.LoadFromFile(CorrectFileDir + FileName) then
       Fail('Error loading wave file');
+    AssertEquals('Incorrect format', ExpectedFormat, WavReader.fmt.Format);
     AssertEquals('Incorrect sample rate', ExpectedSampleRate, WavReader.fmt.SampleRate);
     AssertEquals('Incorrect number of channels', ExpectedChannels, WavReader.fmt.Channels);
     AssertEquals('Incorrect number of bits per sample', ExpectedBitsPerSample, WavReader.fmt.BitsPerSample);