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 #ifndef MEDIA_AUDIO_ANDROID_OPENSLES_OUTPUT_H_ | 5 #ifndef MEDIA_AUDIO_ANDROID_OPENSLES_OUTPUT_H_ |
6 #define MEDIA_AUDIO_ANDROID_OPENSLES_OUTPUT_H_ | 6 #define MEDIA_AUDIO_ANDROID_OPENSLES_OUTPUT_H_ |
7 | 7 |
8 #include <SLES/OpenSLES.h> | 8 #include <SLES/OpenSLES.h> |
9 #include <SLES/OpenSLES_Android.h> | 9 #include <SLES/OpenSLES_Android.h> |
10 #include <stddef.h> | 10 #include <stddef.h> |
11 #include <stdint.h> | 11 #include <stdint.h> |
12 | 12 |
13 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
14 #include "base/macros.h" | 14 #include "base/macros.h" |
15 #include "base/synchronization/lock.h" | 15 #include "base/synchronization/lock.h" |
16 #include "base/threading/thread_checker.h" | 16 #include "base/threading/thread_checker.h" |
17 #include "media/audio/android/opensles_util.h" | 17 #include "media/audio/android/opensles_util.h" |
18 #include "media/audio/audio_io.h" | 18 #include "media/audio/audio_io.h" |
19 #include "media/audio/audio_parameters.h" | 19 #include "media/base/audio_parameters.h" |
20 | 20 |
21 namespace media { | 21 namespace media { |
22 | 22 |
23 class AudioManagerAndroid; | 23 class AudioManagerAndroid; |
24 | 24 |
25 // Implements PCM audio output support for Android using the OpenSLES API. | 25 // Implements PCM audio output support for Android using the OpenSLES API. |
26 // This class is created and lives on the Audio Manager thread but recorded | 26 // This class is created and lives on the Audio Manager thread but recorded |
27 // audio buffers are given to us from an internal OpenSLES audio thread. | 27 // audio buffers are given to us from an internal OpenSLES audio thread. |
28 // All public methods should be called on the Audio Manager thread. | 28 // All public methods should be called on the Audio Manager thread. |
29 class OpenSLESOutputStream : public AudioOutputStream { | 29 class OpenSLESOutputStream : public AudioOutputStream { |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 | 119 |
120 // Container for retrieving data from AudioSourceCallback::OnMoreData(). | 120 // Container for retrieving data from AudioSourceCallback::OnMoreData(). |
121 scoped_ptr<AudioBus> audio_bus_; | 121 scoped_ptr<AudioBus> audio_bus_; |
122 | 122 |
123 DISALLOW_COPY_AND_ASSIGN(OpenSLESOutputStream); | 123 DISALLOW_COPY_AND_ASSIGN(OpenSLESOutputStream); |
124 }; | 124 }; |
125 | 125 |
126 } // namespace media | 126 } // namespace media |
127 | 127 |
128 #endif // MEDIA_AUDIO_ANDROID_OPENSLES_OUTPUT_H_ | 128 #endif // MEDIA_AUDIO_ANDROID_OPENSLES_OUTPUT_H_ |
OLD | NEW |