test/test_pcm: replace 256 with prime number
Use some odd number that will expose problems with remaining samples after optimized vector operations.
This commit is contained in:
parent
729304aef5
commit
3932e62fc7
|
@ -27,7 +27,7 @@
|
|||
void
|
||||
PcmChannelsTest::TestChannels16()
|
||||
{
|
||||
constexpr size_t N = 256;
|
||||
constexpr size_t N = 509;
|
||||
const auto src = TestDataBuffer<int16_t, N * 2>();
|
||||
|
||||
PcmBuffer buffer;
|
||||
|
@ -55,7 +55,7 @@ PcmChannelsTest::TestChannels16()
|
|||
void
|
||||
PcmChannelsTest::TestChannels32()
|
||||
{
|
||||
constexpr size_t N = 256;
|
||||
constexpr size_t N = 509;
|
||||
const auto src = TestDataBuffer<int32_t, N * 2>();
|
||||
|
||||
PcmBuffer buffer;
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
void
|
||||
PcmDitherTest::TestDither24()
|
||||
{
|
||||
constexpr unsigned N = 256;
|
||||
constexpr unsigned N = 509;
|
||||
const auto src = TestDataBuffer<int32_t, N>(RandomInt24());
|
||||
|
||||
int16_t dest[N];
|
||||
|
@ -40,7 +40,7 @@ PcmDitherTest::TestDither24()
|
|||
void
|
||||
PcmDitherTest::TestDither32()
|
||||
{
|
||||
constexpr unsigned N = 256;
|
||||
constexpr unsigned N = 509;
|
||||
const auto src = TestDataBuffer<int32_t, N>();
|
||||
|
||||
int16_t dest[N];
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
void
|
||||
PcmFormatTest::TestFormat8to16()
|
||||
{
|
||||
constexpr size_t N = 256;
|
||||
constexpr size_t N = 509;
|
||||
const auto src = TestDataBuffer<int8_t, N>();
|
||||
|
||||
PcmBuffer buffer;
|
||||
|
@ -45,7 +45,7 @@ PcmFormatTest::TestFormat8to16()
|
|||
void
|
||||
PcmFormatTest::TestFormat16to24()
|
||||
{
|
||||
constexpr size_t N = 256;
|
||||
constexpr size_t N = 509;
|
||||
const auto src = TestDataBuffer<int16_t, N>();
|
||||
|
||||
PcmBuffer buffer;
|
||||
|
@ -60,7 +60,7 @@ PcmFormatTest::TestFormat16to24()
|
|||
void
|
||||
PcmFormatTest::TestFormat16to32()
|
||||
{
|
||||
constexpr size_t N = 256;
|
||||
constexpr size_t N = 509;
|
||||
const auto src = TestDataBuffer<int16_t, N>();
|
||||
|
||||
PcmBuffer buffer;
|
||||
|
@ -75,7 +75,7 @@ PcmFormatTest::TestFormat16to32()
|
|||
void
|
||||
PcmFormatTest::TestFormatFloat()
|
||||
{
|
||||
constexpr size_t N = 256;
|
||||
constexpr size_t N = 509;
|
||||
const auto src = TestDataBuffer<int16_t, N>();
|
||||
|
||||
PcmBuffer buffer1, buffer2;
|
||||
|
|
|
@ -27,7 +27,7 @@ template<typename T, SampleFormat format, typename G=RandomInt<T>>
|
|||
static void
|
||||
TestPcmMix(G g=G())
|
||||
{
|
||||
constexpr unsigned N = 256;
|
||||
constexpr unsigned N = 509;
|
||||
const auto src1 = TestDataBuffer<T, N>(g);
|
||||
const auto src2 = TestDataBuffer<T, N>(g);
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
void
|
||||
PcmPackTest::TestPack24()
|
||||
{
|
||||
constexpr unsigned N = 256;
|
||||
constexpr unsigned N = 509;
|
||||
const auto src = TestDataBuffer<int32_t, N>(RandomInt24());
|
||||
|
||||
uint8_t dest[N * 3];
|
||||
|
@ -49,7 +49,7 @@ PcmPackTest::TestPack24()
|
|||
void
|
||||
PcmPackTest::TestUnpack24()
|
||||
{
|
||||
constexpr unsigned N = 256;
|
||||
constexpr unsigned N = 509;
|
||||
const auto src = TestDataBuffer<uint8_t, N * 3>();
|
||||
|
||||
int32_t dest[N];
|
||||
|
|
|
@ -39,7 +39,7 @@ TestVolume(G g=G())
|
|||
PcmVolume pv;
|
||||
CPPUNIT_ASSERT(pv.Open(F, IgnoreError()));
|
||||
|
||||
constexpr size_t N = 256;
|
||||
constexpr size_t N = 509;
|
||||
static value_type zero[N];
|
||||
const auto _src = TestDataBuffer<value_type, N>(g);
|
||||
const ConstBuffer<void> src(_src, sizeof(_src));
|
||||
|
@ -98,7 +98,7 @@ PcmVolumeTest::TestVolumeFloat()
|
|||
PcmVolume pv;
|
||||
CPPUNIT_ASSERT(pv.Open(SampleFormat::FLOAT, IgnoreError()));
|
||||
|
||||
constexpr size_t N = 256;
|
||||
constexpr size_t N = 509;
|
||||
static float zero[N];
|
||||
const auto _src = TestDataBuffer<float, N>(RandomFloat());
|
||||
const ConstBuffer<void> src(_src, sizeof(_src));
|
||||
|
|
Loading…
Reference in New Issue