Lines Matching refs:kNumSamples
39 static const size_t kNumSamples = 3; in TEST() local
45 w.WriteSamples(kSamples, kNumSamples); in TEST()
46 EXPECT_EQ(kNumSamples, w.num_samples()); in TEST()
81 kPcmWavHeaderSize + kNumSamples * sizeof(int16_t) + sizeof(kMetadata); in TEST()
95 EXPECT_EQ(kNumSamples, r.num_samples()); in TEST()
97 float samples[kNumSamples]; in TEST()
98 EXPECT_EQ(kNumSamples, r.ReadSamples(kNumSamples, samples)); in TEST()
100 EXPECT_EQ(0u, r.ReadSamples(kNumSamples, samples)); in TEST()
108 constexpr size_t kNumSamples = 3 * kSampleRate * kNumChannels; in TEST() local
116 float samples[kNumSamples]; in TEST()
117 for (size_t i = 0; i < kNumSamples; i += kNumChannels) { in TEST()
133 float truncated_samples[kNumSamples]; in TEST()
134 for (size_t k = 0; k < kNumSamples; ++k) { in TEST()
137 w.WriteSamples(truncated_samples, kNumSamples); in TEST()
139 w.WriteSamples(samples, kNumSamples); in TEST()
141 EXPECT_EQ(kNumSamples, w.num_samples()); in TEST()
144 EXPECT_EQ(sizeof(float) * kNumSamples + kIeeeFloatWavHeaderSize, in TEST()
147 EXPECT_EQ(sizeof(int16_t) * kNumSamples + kPcmWavHeaderSize, in TEST()
155 EXPECT_EQ(kNumSamples, r.num_samples()); in TEST()
158 float read_samples[kNumSamples]; in TEST()
159 EXPECT_EQ(kNumSamples, r.ReadSamples(kNumSamples, read_samples)); in TEST()
160 for (size_t i = 0; i < kNumSamples; ++i) { in TEST()
163 EXPECT_EQ(0u, r.ReadSamples(kNumSamples, read_samples)); in TEST()
165 int16_t read_samples[kNumSamples]; in TEST()
166 EXPECT_EQ(kNumSamples, r.ReadSamples(kNumSamples, read_samples)); in TEST()
167 for (size_t i = 0; i < kNumSamples; ++i) { in TEST()
170 EXPECT_EQ(0u, r.ReadSamples(kNumSamples, read_samples)); in TEST()
181 static const size_t kNumSamples = 3; in TEST() local
187 w.WriteSamples(kSamples, kNumSamples); in TEST()
188 EXPECT_EQ(kNumSamples, w.num_samples()); in TEST()
223 kPcmWavHeaderSize + kNumSamples * sizeof(int16_t) + sizeof(kMetadata); in TEST()
237 EXPECT_EQ(kNumSamples, r.num_samples()); in TEST()
239 float samples[kNumSamples]; in TEST()
240 EXPECT_EQ(kNumSamples, r.ReadSamples(kNumSamples, samples)); in TEST()
242 EXPECT_EQ(0u, r.ReadSamples(kNumSamples, samples)); in TEST()
245 EXPECT_EQ(kNumSamples, r.ReadSamples(kNumSamples, samples)); in TEST()
247 EXPECT_EQ(0u, r.ReadSamples(kNumSamples, samples)); in TEST()