MCPcopy Create free account
hub / github.com/Tracktion/choc / testIntToFloatBuffer

Function testIntToFloatBuffer

tests/choc_tests.h:2151–2164  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2149//==============================================================================
2150template <typename Format, typename Buffer>
2151inline void testIntToFloatBuffer (choc::test::TestProgress& progress, Buffer& buffer, uint32_t sampleStride)
2152{
2153 std::vector<uint8_t> data;
2154 data.resize (buffer.getNumChannels() * buffer.getNumFrames() * sampleStride);
2155 auto b2 = buffer;
2156 auto b3 = buffer;
2157
2158 choc::audio::sampledata::copyToInterleavedIntData<Format> (data.data(), sampleStride, buffer);
2159 choc::audio::sampledata::copyFromInterleavedIntData<Format> (b2, data.data(), sampleStride);
2160 choc::audio::sampledata::copyToInterleavedIntData<Format> (data.data(), sampleStride, b2);
2161 choc::audio::sampledata::copyFromInterleavedIntData<Format> (b3, data.data(), sampleStride);
2162
2163 CHOC_EXPECT_EQ (true, contentMatches (b2, b3));
2164}
2165
2166template <typename Format>
2167inline void testIntToFloatFormat (choc::test::TestProgress& progress)

Callers

nothing calls this directly

Calls 5

contentMatchesFunction · 0.85
resizeMethod · 0.45
getNumChannelsMethod · 0.45
getNumFramesMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected