| 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 "base/string_util.h" | 5 #include "base/strings/string_util.h" |
| 6 #include "base/strings/stringprintf.h" | 6 #include "base/strings/stringprintf.h" |
| 7 #include "media/base/audio_buffer.h" | 7 #include "media/base/audio_buffer.h" |
| 8 #include "media/base/audio_bus.h" | 8 #include "media/base/audio_bus.h" |
| 9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
| 10 | 10 |
| 11 namespace media { | 11 namespace media { |
| 12 | 12 |
| 13 template <class T> | 13 template <class T> |
| 14 static scoped_refptr<AudioBuffer> MakeInterleavedBuffer( | 14 static scoped_refptr<AudioBuffer> MakeInterleavedBuffer( |
| 15 SampleFormat format, | 15 SampleFormat format, |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 // Now read 20 frames from the middle of the buffer. | 263 // Now read 20 frames from the middle of the buffer. |
| 264 bus = AudioBus::Create(channels, 100); | 264 bus = AudioBus::Create(channels, 100); |
| 265 buffer->ReadFrames(20, 50, 0, bus.get()); | 265 buffer->ReadFrames(20, 50, 0, bus.get()); |
| 266 VerifyResult(bus->channel(0), 20, 51.0f, 1.0f); | 266 VerifyResult(bus->channel(0), 20, 51.0f, 1.0f); |
| 267 VerifyResult(bus->channel(1), 20, 151.0f, 1.0f); | 267 VerifyResult(bus->channel(1), 20, 151.0f, 1.0f); |
| 268 VerifyResult(bus->channel(2), 20, 251.0f, 1.0f); | 268 VerifyResult(bus->channel(2), 20, 251.0f, 1.0f); |
| 269 VerifyResult(bus->channel(3), 20, 351.0f, 1.0f); | 269 VerifyResult(bus->channel(3), 20, 351.0f, 1.0f); |
| 270 } | 270 } |
| 271 | 271 |
| 272 } // namespace media | 272 } // namespace media |
| OLD | NEW |