mirror of
https://git.jami.net/savoirfairelinux/jami-daemon.git
synced 2025-08-12 22:09:25 +08:00
resampler: remove testAudioBuffer
Change-Id: I87c76fda35713df72376a30c307fe76feb40e65d
This commit is contained in:
@ -39,12 +39,10 @@ public:
|
||||
void tearDown();
|
||||
|
||||
private:
|
||||
void testAudioBuffer();
|
||||
void testAudioFrame();
|
||||
void testRematrix();
|
||||
|
||||
CPPUNIT_TEST_SUITE(ResamplerTest);
|
||||
CPPUNIT_TEST(testAudioBuffer);
|
||||
CPPUNIT_TEST(testAudioFrame);
|
||||
CPPUNIT_TEST(testRematrix);
|
||||
CPPUNIT_TEST_SUITE_END();
|
||||
@ -66,22 +64,6 @@ ResamplerTest::tearDown()
|
||||
libjami::fini();
|
||||
}
|
||||
|
||||
void
|
||||
ResamplerTest::testAudioBuffer()
|
||||
{
|
||||
const constexpr AudioFormat infmt(44100, 1);
|
||||
const constexpr AudioFormat outfmt(48000, 2);
|
||||
|
||||
resampler_.reset(new Resampler);
|
||||
|
||||
AudioBuffer inbuf(1024, infmt);
|
||||
AudioBuffer outbuf(0, outfmt);
|
||||
|
||||
resampler_->resample(inbuf, outbuf);
|
||||
CPPUNIT_ASSERT(outbuf.getFormat().sample_rate == 48000);
|
||||
CPPUNIT_ASSERT(outbuf.getFormat().nb_channels == 2);
|
||||
}
|
||||
|
||||
void
|
||||
ResamplerTest::testAudioFrame()
|
||||
{
|
||||
@ -89,8 +71,7 @@ ResamplerTest::testAudioFrame()
|
||||
|
||||
resampler_.reset(new Resampler);
|
||||
|
||||
AudioBuffer inbuf(1024, infmt);
|
||||
auto input = inbuf.toAVFrame();
|
||||
auto input = std::make_unique<libjami::AudioFrame>(infmt, 1024);
|
||||
CPPUNIT_ASSERT(input->pointer() && input->pointer()->data[0]);
|
||||
CPPUNIT_ASSERT(input->pointer()->data[0][0] == 0);
|
||||
|
||||
|
Reference in New Issue
Block a user