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> |
11 | 11 |
12 #include "base/logging.h" | 12 #include "base/logging.h" |
13 #include "base/numerics/safe_conversions.h" | 13 #include "base/numerics/safe_conversions.h" |
14 #include "media/audio/audio_parameters.h" | 14 #include "media/base/audio_parameters.h" |
15 #include "media/base/limits.h" | 15 #include "media/base/limits.h" |
16 #include "media/base/vector_math.h" | 16 #include "media/base/vector_math.h" |
17 | 17 |
18 namespace media { | 18 namespace media { |
19 | 19 |
20 static const uint8_t kUint8Bias = 128; | 20 static const uint8_t kUint8Bias = 128; |
21 | 21 |
22 static bool IsAligned(void* ptr) { | 22 static bool IsAligned(void* ptr) { |
23 return (reinterpret_cast<uintptr_t>(ptr) & | 23 return (reinterpret_cast<uintptr_t>(ptr) & |
24 (AudioBus::kChannelAlignment - 1)) == 0U; | 24 (AudioBus::kChannelAlignment - 1)) == 0U; |
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
366 return scoped_refptr<AudioBusRefCounted>( | 366 return scoped_refptr<AudioBusRefCounted>( |
367 new AudioBusRefCounted(channels, frames)); | 367 new AudioBusRefCounted(channels, frames)); |
368 } | 368 } |
369 | 369 |
370 AudioBusRefCounted::AudioBusRefCounted(int channels, int frames) | 370 AudioBusRefCounted::AudioBusRefCounted(int channels, int frames) |
371 : AudioBus(channels, frames) {} | 371 : AudioBus(channels, frames) {} |
372 | 372 |
373 AudioBusRefCounted::~AudioBusRefCounted() {} | 373 AudioBusRefCounted::~AudioBusRefCounted() {} |
374 | 374 |
375 } // namespace media | 375 } // namespace media |
OLD | NEW |