| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "media/base/audio_buffer.h" | 5 #include "media/base/audio_buffer.h" |
| 6 #include "media/base/audio_bus.h" | 6 #include "media/base/audio_bus.h" |
| 7 #include "media/base/test_helpers.h" | 7 #include "media/base/test_helpers.h" |
| 8 #include "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/include/gtest/gtest.h" |
| 9 | 9 |
| 10 namespace media { | 10 namespace media { |
| (...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 456 case kSampleFormatS16: | 456 case kSampleFormatS16: |
| 457 case kSampleFormatPlanarS16: | 457 case kSampleFormatPlanarS16: |
| 458 return MakeAudioBuffer<int16>(sample_format, | 458 return MakeAudioBuffer<int16>(sample_format, |
| 459 channel_layout, | 459 channel_layout, |
| 460 channel_count, | 460 channel_count, |
| 461 sample_rate, | 461 sample_rate, |
| 462 0, | 462 0, |
| 463 1, | 463 1, |
| 464 frames, | 464 frames, |
| 465 base::TimeDelta::FromSeconds(0)); | 465 base::TimeDelta::FromSeconds(0)); |
| 466 case kSampleFormatS24: |
| 466 case kSampleFormatS32: | 467 case kSampleFormatS32: |
| 467 return MakeAudioBuffer<int32>(kSampleFormatS32, | 468 return MakeAudioBuffer<int32>(kSampleFormatS32, |
| 468 channel_layout, | 469 channel_layout, |
| 469 channel_count, | 470 channel_count, |
| 470 sample_rate, | 471 sample_rate, |
| 471 0, | 472 0, |
| 472 65536, | 473 65536, |
| 473 frames, | 474 frames, |
| 474 base::TimeDelta::FromSeconds(0)); | 475 base::TimeDelta::FromSeconds(0)); |
| 475 case kSampleFormatF32: | 476 case kSampleFormatF32: |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 579 | 580 |
| 580 TEST(AudioBufferTest, ReadFramesInterleavedS16FromPlanarS16) { | 581 TEST(AudioBufferTest, ReadFramesInterleavedS16FromPlanarS16) { |
| 581 ReadFramesInterleavedS16Test(kSampleFormatPlanarS16); | 582 ReadFramesInterleavedS16Test(kSampleFormatPlanarS16); |
| 582 } | 583 } |
| 583 | 584 |
| 584 TEST(AudioBufferTest, ReadFramesInterleavedS16FromPlanarF32) { | 585 TEST(AudioBufferTest, ReadFramesInterleavedS16FromPlanarF32) { |
| 585 ReadFramesInterleavedS16Test(kSampleFormatPlanarF32); | 586 ReadFramesInterleavedS16Test(kSampleFormatPlanarF32); |
| 586 } | 587 } |
| 587 | 588 |
| 588 } // namespace media | 589 } // namespace media |
| OLD | NEW |