1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "media/base/audio_buffer.h"
6 #include "media/base/audio_bus.h"
7 #include "media/base/test_helpers.h"
8 #include "testing/gtest/include/gtest/gtest.h"
12 static const int kSampleRate
= 48000;
14 static void VerifyBusWithOffset(AudioBus
* bus
,
20 for (int ch
= 0; ch
< bus
->channels(); ++ch
) {
21 const float v
= start_offset
+ start
+ ch
* bus
->frames() * increment
;
22 for (int i
= offset
; i
< offset
+ frames
; ++i
) {
23 ASSERT_FLOAT_EQ(v
+ i
* increment
, bus
->channel(ch
)[i
]) << "i=" << i
29 static void VerifyBus(AudioBus
* bus
, int frames
, float start
, float increment
) {
30 VerifyBusWithOffset(bus
, 0, frames
, start
, 0, increment
);
33 static void TrimRangeTest(SampleFormat sample_format
) {
34 const ChannelLayout channel_layout
= CHANNEL_LAYOUT_4_0
;
35 const int channels
= ChannelLayoutToChannelCount(channel_layout
);
36 const int frames
= kSampleRate
/ 10;
37 const base::TimeDelta timestamp
= base::TimeDelta();
38 const base::TimeDelta duration
= base::TimeDelta::FromMilliseconds(100);
39 scoped_refptr
<AudioBuffer
> buffer
= MakeAudioBuffer
<float>(sample_format
,
47 EXPECT_EQ(frames
, buffer
->frame_count());
48 EXPECT_EQ(timestamp
, buffer
->timestamp());
49 EXPECT_EQ(duration
, buffer
->duration());
51 scoped_ptr
<AudioBus
> bus
= AudioBus::Create(channels
, frames
);
53 // Verify all frames before trimming.
54 buffer
->ReadFrames(frames
, 0, 0, bus
.get());
55 VerifyBus(bus
.get(), frames
, 0, 1);
57 // Trim 10ms of frames from the middle of the buffer.
58 int trim_start
= frames
/ 2;
59 const int trim_length
= kSampleRate
/ 100;
60 const base::TimeDelta trim_duration
= base::TimeDelta::FromMilliseconds(10);
61 buffer
->TrimRange(trim_start
, trim_start
+ trim_length
);
62 EXPECT_EQ(frames
- trim_length
, buffer
->frame_count());
63 EXPECT_EQ(timestamp
, buffer
->timestamp());
64 EXPECT_EQ(duration
- trim_duration
, buffer
->duration());
66 buffer
->ReadFrames(buffer
->frame_count(), 0, 0, bus
.get());
67 VerifyBus(bus
.get(), trim_start
, 0, 1);
68 VerifyBusWithOffset(bus
.get(),
70 buffer
->frame_count() - trim_start
,
75 // Trim 10ms of frames from the start, which just adjusts the buffer's
76 // internal start offset.
77 buffer
->TrimStart(trim_length
);
78 trim_start
-= trim_length
;
79 EXPECT_EQ(frames
- 2 * trim_length
, buffer
->frame_count());
80 EXPECT_EQ(timestamp
+ trim_duration
, buffer
->timestamp());
81 EXPECT_EQ(duration
- 2 * trim_duration
, buffer
->duration());
83 buffer
->ReadFrames(buffer
->frame_count(), 0, 0, bus
.get());
84 VerifyBus(bus
.get(), trim_start
, trim_length
, 1);
85 VerifyBusWithOffset(bus
.get(),
87 buffer
->frame_count() - trim_start
,
92 // Trim 10ms of frames from the end, which just adjusts the buffer's frame
94 buffer
->TrimEnd(trim_length
);
95 EXPECT_EQ(frames
- 3 * trim_length
, buffer
->frame_count());
96 EXPECT_EQ(timestamp
+ trim_duration
, buffer
->timestamp());
97 EXPECT_EQ(duration
- 3 * trim_duration
, buffer
->duration());
99 buffer
->ReadFrames(buffer
->frame_count(), 0, 0, bus
.get());
100 VerifyBus(bus
.get(), trim_start
, trim_length
, 1);
101 VerifyBusWithOffset(bus
.get(),
103 buffer
->frame_count() - trim_start
,
108 // Trim another 10ms from the inner portion of the buffer.
109 buffer
->TrimRange(trim_start
, trim_start
+ trim_length
);
110 EXPECT_EQ(frames
- 4 * trim_length
, buffer
->frame_count());
111 EXPECT_EQ(timestamp
+ trim_duration
, buffer
->timestamp());
112 EXPECT_EQ(duration
- 4 * trim_duration
, buffer
->duration());
114 buffer
->ReadFrames(buffer
->frame_count(), 0, 0, bus
.get());
115 VerifyBus(bus
.get(), trim_start
, trim_length
, 1);
116 VerifyBusWithOffset(bus
.get(),
118 buffer
->frame_count() - trim_start
,
123 // Trim off the end using TrimRange() to ensure end index is exclusive.
124 buffer
->TrimRange(buffer
->frame_count() - trim_length
, buffer
->frame_count());
125 EXPECT_EQ(frames
- 5 * trim_length
, buffer
->frame_count());
126 EXPECT_EQ(timestamp
+ trim_duration
, buffer
->timestamp());
127 EXPECT_EQ(duration
- 5 * trim_duration
, buffer
->duration());
129 buffer
->ReadFrames(buffer
->frame_count(), 0, 0, bus
.get());
130 VerifyBus(bus
.get(), trim_start
, trim_length
, 1);
131 VerifyBusWithOffset(bus
.get(),
133 buffer
->frame_count() - trim_start
,
138 // Trim off the start using TrimRange() to ensure start index is inclusive.
139 buffer
->TrimRange(0, trim_length
);
140 trim_start
-= trim_length
;
141 EXPECT_EQ(frames
- 6 * trim_length
, buffer
->frame_count());
142 EXPECT_EQ(timestamp
+ trim_duration
, buffer
->timestamp());
143 EXPECT_EQ(duration
- 6 * trim_duration
, buffer
->duration());
145 buffer
->ReadFrames(buffer
->frame_count(), 0, 0, bus
.get());
146 VerifyBus(bus
.get(), trim_start
, 2 * trim_length
, 1);
147 VerifyBusWithOffset(bus
.get(),
149 buffer
->frame_count() - trim_start
,
155 TEST(AudioBufferTest
, CopyFrom
) {
156 const ChannelLayout kChannelLayout
= CHANNEL_LAYOUT_MONO
;
157 scoped_refptr
<AudioBuffer
> original_buffer
=
158 MakeAudioBuffer
<uint8
>(kSampleFormatU8
,
160 ChannelLayoutToChannelCount(kChannelLayout
),
166 scoped_refptr
<AudioBuffer
> new_buffer
=
167 AudioBuffer::CopyFrom(kSampleFormatU8
,
168 original_buffer
->channel_layout(),
169 original_buffer
->channel_count(),
170 original_buffer
->sample_rate(),
171 original_buffer
->frame_count(),
172 &original_buffer
->channel_data()[0],
173 original_buffer
->timestamp());
174 EXPECT_EQ(original_buffer
->frame_count(), new_buffer
->frame_count());
175 EXPECT_EQ(original_buffer
->timestamp(), new_buffer
->timestamp());
176 EXPECT_EQ(original_buffer
->duration(), new_buffer
->duration());
177 EXPECT_EQ(original_buffer
->sample_rate(), new_buffer
->sample_rate());
178 EXPECT_EQ(original_buffer
->channel_count(), new_buffer
->channel_count());
179 EXPECT_EQ(original_buffer
->channel_layout(), new_buffer
->channel_layout());
180 EXPECT_FALSE(original_buffer
->end_of_stream());
183 TEST(AudioBufferTest
, CreateEOSBuffer
) {
184 scoped_refptr
<AudioBuffer
> buffer
= AudioBuffer::CreateEOSBuffer();
185 EXPECT_TRUE(buffer
->end_of_stream());
188 TEST(AudioBufferTest
, FrameSize
) {
189 const uint8 kTestData
[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
190 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
191 27, 28, 29, 30, 31 };
192 const base::TimeDelta kTimestamp
= base::TimeDelta::FromMicroseconds(1337);
194 const uint8
* const data
[] = { kTestData
};
195 scoped_refptr
<AudioBuffer
> buffer
=
196 AudioBuffer::CopyFrom(kSampleFormatU8
,
197 CHANNEL_LAYOUT_STEREO
,
203 EXPECT_EQ(16, buffer
->frame_count()); // 2 channels of 8-bit data
205 buffer
= AudioBuffer::CopyFrom(kSampleFormatF32
, CHANNEL_LAYOUT_4_0
, 4,
206 kSampleRate
, 2, data
, kTimestamp
);
207 EXPECT_EQ(2, buffer
->frame_count()); // now 4 channels of 32-bit data
210 TEST(AudioBufferTest
, ReadU8
) {
211 const ChannelLayout channel_layout
= CHANNEL_LAYOUT_4_0
;
212 const int channels
= ChannelLayoutToChannelCount(channel_layout
);
213 const int frames
= 10;
214 const base::TimeDelta start_time
;
215 scoped_refptr
<AudioBuffer
> buffer
= MakeAudioBuffer
<uint8
>(kSampleFormatU8
,
223 scoped_ptr
<AudioBus
> bus
= AudioBus::Create(channels
, frames
);
224 buffer
->ReadFrames(frames
, 0, 0, bus
.get());
225 VerifyBus(bus
.get(), frames
, 0, 1.0f
/ 127.0f
);
227 // Now read the same data one frame at a time.
229 for (int i
= 0; i
< frames
; ++i
)
230 buffer
->ReadFrames(1, i
, i
, bus
.get());
231 VerifyBus(bus
.get(), frames
, 0, 1.0f
/ 127.0f
);
234 TEST(AudioBufferTest
, ReadS16
) {
235 const ChannelLayout channel_layout
= CHANNEL_LAYOUT_STEREO
;
236 const int channels
= ChannelLayoutToChannelCount(channel_layout
);
237 const int frames
= 10;
238 const base::TimeDelta start_time
;
239 scoped_refptr
<AudioBuffer
> buffer
= MakeAudioBuffer
<int16
>(kSampleFormatS16
,
247 scoped_ptr
<AudioBus
> bus
= AudioBus::Create(channels
, frames
);
248 buffer
->ReadFrames(frames
, 0, 0, bus
.get());
249 VerifyBus(bus
.get(), frames
, 1.0f
/ kint16max
, 1.0f
/ kint16max
);
251 // Now read the same data one frame at a time.
253 for (int i
= 0; i
< frames
; ++i
)
254 buffer
->ReadFrames(1, i
, i
, bus
.get());
255 VerifyBus(bus
.get(), frames
, 1.0f
/ kint16max
, 1.0f
/ kint16max
);
258 TEST(AudioBufferTest
, ReadS32
) {
259 const ChannelLayout channel_layout
= CHANNEL_LAYOUT_STEREO
;
260 const int channels
= ChannelLayoutToChannelCount(channel_layout
);
261 const int frames
= 20;
262 const base::TimeDelta start_time
;
263 scoped_refptr
<AudioBuffer
> buffer
= MakeAudioBuffer
<int32
>(kSampleFormatS32
,
271 scoped_ptr
<AudioBus
> bus
= AudioBus::Create(channels
, frames
);
272 buffer
->ReadFrames(frames
, 0, 0, bus
.get());
273 VerifyBus(bus
.get(), frames
, 1.0f
/ kint32max
, 1.0f
/ kint32max
);
275 // Read second 10 frames.
277 buffer
->ReadFrames(10, 10, 0, bus
.get());
278 VerifyBus(bus
.get(), 10, 11.0f
/ kint32max
, 1.0f
/ kint32max
);
281 TEST(AudioBufferTest
, ReadF32
) {
282 const ChannelLayout channel_layout
= CHANNEL_LAYOUT_STEREO
;
283 const int channels
= ChannelLayoutToChannelCount(channel_layout
);
284 const int frames
= 20;
285 const base::TimeDelta start_time
;
286 scoped_refptr
<AudioBuffer
> buffer
= MakeAudioBuffer
<float>(kSampleFormatF32
,
294 scoped_ptr
<AudioBus
> bus
= AudioBus::Create(channels
, frames
);
295 buffer
->ReadFrames(10, 0, 0, bus
.get());
296 VerifyBus(bus
.get(), 10, 1, 1);
298 // Read second 10 frames.
300 buffer
->ReadFrames(10, 10, 0, bus
.get());
301 VerifyBus(bus
.get(), 10, 11, 1);
304 TEST(AudioBufferTest
, ReadS16Planar
) {
305 const ChannelLayout channel_layout
= CHANNEL_LAYOUT_STEREO
;
306 const int channels
= ChannelLayoutToChannelCount(channel_layout
);
307 const int frames
= 20;
308 const base::TimeDelta start_time
;
309 scoped_refptr
<AudioBuffer
> buffer
=
310 MakeAudioBuffer
<int16
>(kSampleFormatPlanarS16
,
318 scoped_ptr
<AudioBus
> bus
= AudioBus::Create(channels
, frames
);
319 buffer
->ReadFrames(10, 0, 0, bus
.get());
320 VerifyBus(bus
.get(), 10, 1.0f
/ kint16max
, 1.0f
/ kint16max
);
322 // Read all the frames backwards, one by one. ch[0] should be 20, 19, ...
324 for (int i
= frames
- 1; i
>= 0; --i
)
325 buffer
->ReadFrames(1, i
, i
, bus
.get());
326 VerifyBus(bus
.get(), frames
, 1.0f
/ kint16max
, 1.0f
/ kint16max
);
328 // Read 0 frames with different offsets. Existing data in AudioBus should be
330 buffer
->ReadFrames(0, 0, 0, bus
.get());
331 VerifyBus(bus
.get(), frames
, 1.0f
/ kint16max
, 1.0f
/ kint16max
);
332 buffer
->ReadFrames(0, 0, 10, bus
.get());
333 VerifyBus(bus
.get(), frames
, 1.0f
/ kint16max
, 1.0f
/ kint16max
);
334 buffer
->ReadFrames(0, 10, 0, bus
.get());
335 VerifyBus(bus
.get(), frames
, 1.0f
/ kint16max
, 1.0f
/ kint16max
);
338 TEST(AudioBufferTest
, ReadF32Planar
) {
339 const ChannelLayout channel_layout
= CHANNEL_LAYOUT_4_0
;
340 const int channels
= ChannelLayoutToChannelCount(channel_layout
);
341 const int frames
= 100;
342 const base::TimeDelta start_time
;
343 scoped_refptr
<AudioBuffer
> buffer
=
344 MakeAudioBuffer
<float>(kSampleFormatPlanarF32
,
353 // Read all 100 frames from the buffer. F32 is planar, so ch[0] should be 1,
354 // 2, 3, 4, ..., ch[1] should be 101, 102, 103, ..., and so on for all 4
356 scoped_ptr
<AudioBus
> bus
= AudioBus::Create(channels
, 100);
357 buffer
->ReadFrames(frames
, 0, 0, bus
.get());
358 VerifyBus(bus
.get(), frames
, 1, 1);
360 // Now read 20 frames from the middle of the buffer.
362 buffer
->ReadFrames(20, 50, 0, bus
.get());
363 VerifyBus(bus
.get(), 20, 51, 1);
366 TEST(AudioBufferTest
, EmptyBuffer
) {
367 const ChannelLayout channel_layout
= CHANNEL_LAYOUT_4_0
;
368 const int channels
= ChannelLayoutToChannelCount(channel_layout
);
369 const int frames
= kSampleRate
/ 100;
370 const base::TimeDelta start_time
;
371 scoped_refptr
<AudioBuffer
> buffer
= AudioBuffer::CreateEmptyBuffer(
372 channel_layout
, channels
, kSampleRate
, frames
, start_time
);
373 EXPECT_EQ(frames
, buffer
->frame_count());
374 EXPECT_EQ(start_time
, buffer
->timestamp());
375 EXPECT_EQ(base::TimeDelta::FromMilliseconds(10), buffer
->duration());
376 EXPECT_FALSE(buffer
->end_of_stream());
378 // Read all 100 frames from the buffer. All data should be 0.
379 scoped_ptr
<AudioBus
> bus
= AudioBus::Create(channels
, frames
);
380 buffer
->ReadFrames(frames
, 0, 0, bus
.get());
381 VerifyBus(bus
.get(), frames
, 0, 0);
384 TEST(AudioBufferTest
, Trim
) {
385 const ChannelLayout channel_layout
= CHANNEL_LAYOUT_4_0
;
386 const int channels
= ChannelLayoutToChannelCount(channel_layout
);
387 const int frames
= kSampleRate
/ 10;
388 const base::TimeDelta start_time
;
389 const base::TimeDelta duration
= base::TimeDelta::FromMilliseconds(100);
390 scoped_refptr
<AudioBuffer
> buffer
=
391 MakeAudioBuffer
<float>(kSampleFormatPlanarF32
,
399 EXPECT_EQ(frames
, buffer
->frame_count());
400 EXPECT_EQ(start_time
, buffer
->timestamp());
401 EXPECT_EQ(duration
, buffer
->duration());
403 const int ten_ms_of_frames
= kSampleRate
/ 100;
404 const base::TimeDelta ten_ms
= base::TimeDelta::FromMilliseconds(10);
406 scoped_ptr
<AudioBus
> bus
= AudioBus::Create(channels
, frames
);
407 buffer
->ReadFrames(buffer
->frame_count(), 0, 0, bus
.get());
408 VerifyBus(bus
.get(), buffer
->frame_count(), 0.0f
, 1.0f
);
410 // Trim off 10ms of frames from the start.
411 buffer
->TrimStart(ten_ms_of_frames
);
412 EXPECT_EQ(start_time
+ ten_ms
, buffer
->timestamp());
413 EXPECT_EQ(frames
- ten_ms_of_frames
, buffer
->frame_count());
414 EXPECT_EQ(duration
- ten_ms
, buffer
->duration());
415 buffer
->ReadFrames(buffer
->frame_count(), 0, 0, bus
.get());
416 VerifyBus(bus
.get(), buffer
->frame_count(), ten_ms_of_frames
, 1.0f
);
418 // Trim off 10ms of frames from the end.
419 buffer
->TrimEnd(ten_ms_of_frames
);
420 EXPECT_EQ(start_time
+ ten_ms
, buffer
->timestamp());
421 EXPECT_EQ(frames
- 2 * ten_ms_of_frames
, buffer
->frame_count());
422 EXPECT_EQ(duration
- 2 * ten_ms
, buffer
->duration());
423 buffer
->ReadFrames(buffer
->frame_count(), 0, 0, bus
.get());
424 VerifyBus(bus
.get(), buffer
->frame_count(), ten_ms_of_frames
, 1.0f
);
426 // Trim off 40ms more from the start.
427 buffer
->TrimStart(4 * ten_ms_of_frames
);
428 EXPECT_EQ(start_time
+ 5 * ten_ms
, buffer
->timestamp());
429 EXPECT_EQ(frames
- 6 * ten_ms_of_frames
, buffer
->frame_count());
430 EXPECT_EQ(duration
- 6 * ten_ms
, buffer
->duration());
431 buffer
->ReadFrames(buffer
->frame_count(), 0, 0, bus
.get());
432 VerifyBus(bus
.get(), buffer
->frame_count(), 5 * ten_ms_of_frames
, 1.0f
);
434 // Trim off the final 40ms from the end.
435 buffer
->TrimEnd(4 * ten_ms_of_frames
);
436 EXPECT_EQ(0, buffer
->frame_count());
437 EXPECT_EQ(start_time
+ 5 * ten_ms
, buffer
->timestamp());
438 EXPECT_EQ(base::TimeDelta(), buffer
->duration());
441 TEST(AudioBufferTest
, TrimRangePlanar
) {
442 TrimRangeTest(kSampleFormatPlanarF32
);
445 TEST(AudioBufferTest
, TrimRangeInterleaved
) {
446 TrimRangeTest(kSampleFormatF32
);
449 static scoped_refptr
<AudioBuffer
> MakeReadFramesInterleavedTestBuffer(
450 SampleFormat sample_format
,
452 ChannelLayout channel_layout
,
455 switch (sample_format
) {
456 case kSampleFormatS16
:
457 case kSampleFormatPlanarS16
:
458 return MakeAudioBuffer
<int16
>(sample_format
,
465 base::TimeDelta::FromSeconds(0));
466 case kSampleFormatS32
:
467 return MakeAudioBuffer
<int32
>(kSampleFormatS32
,
474 base::TimeDelta::FromSeconds(0));
475 case kSampleFormatF32
:
476 case kSampleFormatPlanarF32
:
477 return MakeAudioBuffer
<float>(
483 65536.0f
/ std::numeric_limits
<int32
>::max(),
485 base::TimeDelta::FromSeconds(0));
486 case kSampleFormatPlanarS32
:
487 return MakeAudioBuffer
<int32
>(
493 65536.0f
/ std::numeric_limits
<int32
>::max(),
495 base::TimeDelta::FromSeconds(0));
496 case kSampleFormatU8
:
497 case kUnknownSampleFormat
:
501 return AudioBuffer::CreateEOSBuffer();
504 static void ReadFramesInterleavedS32Test(SampleFormat sample_format
) {
505 const ChannelLayout channel_layout
= CHANNEL_LAYOUT_4_0
;
506 const int channels
= ChannelLayoutToChannelCount(channel_layout
);
507 const int frames
= kSampleRate
/ 100;
508 const base::TimeDelta duration
= base::TimeDelta::FromMilliseconds(10);
509 scoped_refptr
<AudioBuffer
> buffer
= MakeReadFramesInterleavedTestBuffer(
510 sample_format
, kSampleRate
, channel_layout
, channels
, frames
);
511 EXPECT_EQ(frames
, buffer
->frame_count());
512 EXPECT_EQ(duration
, buffer
->duration());
514 int32
* dest
= new int32
[frames
* channels
];
515 buffer
->ReadFramesInterleavedS32(frames
, dest
);
518 for (int i
= 0; i
< frames
; ++i
) {
519 for (int ch
= 0; ch
< channels
; ++ch
) {
520 EXPECT_EQ(dest
[count
++], (frames
* ch
+ i
) << 16);
526 TEST(AudioBufferTest
, ReadFramesInterleavedS32FromS16
) {
527 ReadFramesInterleavedS32Test(kSampleFormatS16
);
530 TEST(AudioBufferTest
, ReadFramesInterleavedS32FromS32
) {
531 ReadFramesInterleavedS32Test(kSampleFormatS32
);
534 TEST(AudioBufferTest
, ReadFramesInterleavedS32FromF32
) {
535 ReadFramesInterleavedS32Test(kSampleFormatF32
);
538 TEST(AudioBufferTest
, ReadFramesInterleavedS32FromPlanarS16
) {
539 ReadFramesInterleavedS32Test(kSampleFormatPlanarS16
);
542 TEST(AudioBufferTest
, ReadFramesInterleavedS32FromPlanarF32
) {
543 ReadFramesInterleavedS32Test(kSampleFormatPlanarF32
);
546 static void ReadFramesInterleavedS16Test(SampleFormat sample_format
) {
547 const ChannelLayout channel_layout
= CHANNEL_LAYOUT_4_0
;
548 const int channels
= ChannelLayoutToChannelCount(channel_layout
);
549 const int frames
= kSampleRate
/ 100;
550 const base::TimeDelta duration
= base::TimeDelta::FromMilliseconds(10);
551 scoped_refptr
<AudioBuffer
> buffer
= MakeReadFramesInterleavedTestBuffer(
552 sample_format
, kSampleRate
, channel_layout
, channels
, frames
);
553 EXPECT_EQ(frames
, buffer
->frame_count());
554 EXPECT_EQ(duration
, buffer
->duration());
556 int16
* dest
= new int16
[frames
* channels
];
557 buffer
->ReadFramesInterleavedS16(frames
, dest
);
560 for (int i
= 0; i
< frames
; ++i
) {
561 for (int ch
= 0; ch
< channels
; ++ch
) {
562 EXPECT_EQ(dest
[count
++], (frames
* ch
+ i
));
568 TEST(AudioBufferTest
, ReadFramesInterleavedS16FromS16
) {
569 ReadFramesInterleavedS16Test(kSampleFormatS16
);
572 TEST(AudioBufferTest
, ReadFramesInterleavedS16FromS32
) {
573 ReadFramesInterleavedS16Test(kSampleFormatS32
);
576 TEST(AudioBufferTest
, ReadFramesInterleavedS16FromF32
) {
577 ReadFramesInterleavedS16Test(kSampleFormatF32
);
580 TEST(AudioBufferTest
, ReadFramesInterleavedS16FromPlanarS16
) {
581 ReadFramesInterleavedS16Test(kSampleFormatPlanarS16
);
584 TEST(AudioBufferTest
, ReadFramesInterleavedS16FromPlanarF32
) {
585 ReadFramesInterleavedS16Test(kSampleFormatPlanarF32
);