OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_bus.h" | 5 #include "media/base/audio_bus.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <limits> | 10 #include <limits> |
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
337 } | 337 } |
338 } | 338 } |
339 | 339 |
340 void AudioBus::SwapChannels(int a, int b) { | 340 void AudioBus::SwapChannels(int a, int b) { |
341 DCHECK(a < channels() && a >= 0); | 341 DCHECK(a < channels() && a >= 0); |
342 DCHECK(b < channels() && b >= 0); | 342 DCHECK(b < channels() && b >= 0); |
343 DCHECK_NE(a, b); | 343 DCHECK_NE(a, b); |
344 std::swap(channel_data_[a], channel_data_[b]); | 344 std::swap(channel_data_[a], channel_data_[b]); |
345 } | 345 } |
346 | 346 |
347 scoped_refptr<AudioBusRefCounted> AudioBusRefCounted::Create( | |
348 int channels, int frames) { | |
349 return scoped_refptr<AudioBusRefCounted>( | |
350 new AudioBusRefCounted(channels, frames)); | |
351 } | |
352 | |
353 AudioBusRefCounted::AudioBusRefCounted(int channels, int frames) | |
354 : AudioBus(channels, frames) {} | |
355 | |
356 AudioBusRefCounted::~AudioBusRefCounted() {} | |
357 | |
358 } // namespace media | 347 } // namespace media |
OLD | NEW |