|
|
|
@ -172,6 +172,11 @@ void WavImporterTest::invalidFactChunk() { |
|
|
|
|
|
|
|
|
|
|
|
CORRADE_COMPARE(importer.format(), Buffer::Format::Mono16); |
|
|
|
CORRADE_COMPARE(importer.format(), Buffer::Format::Mono16); |
|
|
|
CORRADE_COMPARE(importer.frequency(), 22050); |
|
|
|
CORRADE_COMPARE(importer.frequency(), 22050); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CORRADE_COMPARE_AS(importer.data().slice(0,4), |
|
|
|
|
|
|
|
Containers::Array<char>::from(-27, -11, -1, -9).slice(0,4), |
|
|
|
|
|
|
|
TestSuite::Compare::Container); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void WavImporterTest::mono8() { |
|
|
|
void WavImporterTest::mono8() { |
|
|
|
@ -180,6 +185,10 @@ void WavImporterTest::mono8() { |
|
|
|
|
|
|
|
|
|
|
|
CORRADE_COMPARE(importer.format(), Buffer::Format::Mono8); |
|
|
|
CORRADE_COMPARE(importer.format(), Buffer::Format::Mono8); |
|
|
|
CORRADE_COMPARE(importer.frequency(), 22050); |
|
|
|
CORRADE_COMPARE(importer.frequency(), 22050); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CORRADE_COMPARE_AS(importer.data().slice(0,4), |
|
|
|
|
|
|
|
Containers::Array<char>::from(127, 127, 127, 127).slice(0,4), |
|
|
|
|
|
|
|
TestSuite::Compare::Container); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void WavImporterTest::mono8junk() { |
|
|
|
void WavImporterTest::mono8junk() { |
|
|
|
@ -188,6 +197,10 @@ void WavImporterTest::mono8junk() { |
|
|
|
|
|
|
|
|
|
|
|
CORRADE_COMPARE(importer.format(), Buffer::Format::Mono8); |
|
|
|
CORRADE_COMPARE(importer.format(), Buffer::Format::Mono8); |
|
|
|
CORRADE_COMPARE(importer.frequency(), 22050); |
|
|
|
CORRADE_COMPARE(importer.frequency(), 22050); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CORRADE_COMPARE_AS(importer.data().slice(0,4), |
|
|
|
|
|
|
|
Containers::Array<char>::from(127, 127, 127, 127).slice(0,4), |
|
|
|
|
|
|
|
TestSuite::Compare::Container); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void WavImporterTest::mono8ALaw() { |
|
|
|
void WavImporterTest::mono8ALaw() { |
|
|
|
@ -196,6 +209,11 @@ void WavImporterTest::mono8ALaw() { |
|
|
|
|
|
|
|
|
|
|
|
CORRADE_COMPARE(importer.format(), Buffer::Format::MonoALaw); |
|
|
|
CORRADE_COMPARE(importer.format(), Buffer::Format::MonoALaw); |
|
|
|
CORRADE_COMPARE(importer.frequency(), 8000); |
|
|
|
CORRADE_COMPARE(importer.frequency(), 8000); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CORRADE_COMPARE_AS(importer.data().slice(0,4), |
|
|
|
|
|
|
|
Containers::Array<char>::from(87, 84, 85, 85).slice(0,4), |
|
|
|
|
|
|
|
TestSuite::Compare::Container); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void WavImporterTest::mono8MuLaw() { |
|
|
|
void WavImporterTest::mono8MuLaw() { |
|
|
|
@ -204,6 +222,11 @@ void WavImporterTest::mono8MuLaw() { |
|
|
|
|
|
|
|
|
|
|
|
CORRADE_COMPARE(importer.format(), Buffer::Format::MonoMuLaw); |
|
|
|
CORRADE_COMPARE(importer.format(), Buffer::Format::MonoMuLaw); |
|
|
|
CORRADE_COMPARE(importer.frequency(), 8000); |
|
|
|
CORRADE_COMPARE(importer.frequency(), 8000); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CORRADE_COMPARE_AS(importer.data().slice(0,4), |
|
|
|
|
|
|
|
Containers::Array<char>::from(-5, -3, -1, -2).slice(0,4), |
|
|
|
|
|
|
|
TestSuite::Compare::Container); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void WavImporterTest::mono16() { |
|
|
|
void WavImporterTest::mono16() { |
|
|
|
@ -234,6 +257,11 @@ void WavImporterTest::stereo8ALaw() { |
|
|
|
|
|
|
|
|
|
|
|
CORRADE_COMPARE(importer.format(), Buffer::Format::StereoALaw); |
|
|
|
CORRADE_COMPARE(importer.format(), Buffer::Format::StereoALaw); |
|
|
|
CORRADE_COMPARE(importer.frequency(), 8000); |
|
|
|
CORRADE_COMPARE(importer.frequency(), 8000); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CORRADE_COMPARE_AS(importer.data().slice(0,4), |
|
|
|
|
|
|
|
Containers::Array<char>::from(-43, -43, -43, -43).slice(0,4), |
|
|
|
|
|
|
|
TestSuite::Compare::Container); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void WavImporterTest::stereo8MuLaw() { |
|
|
|
void WavImporterTest::stereo8MuLaw() { |
|
|
|
@ -242,6 +270,11 @@ void WavImporterTest::stereo8MuLaw() { |
|
|
|
|
|
|
|
|
|
|
|
CORRADE_COMPARE(importer.format(), Buffer::Format::StereoMuLaw); |
|
|
|
CORRADE_COMPARE(importer.format(), Buffer::Format::StereoMuLaw); |
|
|
|
CORRADE_COMPARE(importer.frequency(), 8000); |
|
|
|
CORRADE_COMPARE(importer.frequency(), 8000); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CORRADE_COMPARE_AS(importer.data().slice(0,4), |
|
|
|
|
|
|
|
Containers::Array<char>::from(-1, -1, -1, -1).slice(0,4), |
|
|
|
|
|
|
|
TestSuite::Compare::Container); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void WavImporterTest::stereo12() { |
|
|
|
void WavImporterTest::stereo12() { |
|
|
|
@ -260,6 +293,10 @@ void WavImporterTest::stereo16() { |
|
|
|
|
|
|
|
|
|
|
|
CORRADE_COMPARE(importer.format(), Buffer::Format::Stereo16); |
|
|
|
CORRADE_COMPARE(importer.format(), Buffer::Format::Stereo16); |
|
|
|
CORRADE_COMPARE(importer.frequency(), 44100); |
|
|
|
CORRADE_COMPARE(importer.frequency(), 44100); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CORRADE_COMPARE_AS(importer.data(), |
|
|
|
|
|
|
|
Containers::Array<char>::from(39, 79, 39, 79), |
|
|
|
|
|
|
|
TestSuite::Compare::Container); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void WavImporterTest::stereo24() { |
|
|
|
void WavImporterTest::stereo24() { |
|
|
|
|