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 <memory> |
| 14 |
13 #include "base/compiler_specific.h" | 15 #include "base/compiler_specific.h" |
14 #include "base/macros.h" | 16 #include "base/macros.h" |
15 #include "base/synchronization/lock.h" | 17 #include "base/synchronization/lock.h" |
16 #include "base/threading/thread_checker.h" | 18 #include "base/threading/thread_checker.h" |
17 #include "media/audio/android/opensles_util.h" | 19 #include "media/audio/android/opensles_util.h" |
18 #include "media/audio/audio_io.h" | 20 #include "media/audio/audio_io.h" |
19 #include "media/base/audio_parameters.h" | 21 #include "media/base/audio_parameters.h" |
20 | 22 |
21 namespace media { | 23 namespace media { |
22 | 24 |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 // Volume control coming from hardware. It overrides |volume_| when it's | 113 // Volume control coming from hardware. It overrides |volume_| when it's |
112 // true. Otherwise, use |volume_| for scaling. | 114 // true. Otherwise, use |volume_| for scaling. |
113 // This is needed because platform voice volume never goes to zero in | 115 // This is needed because platform voice volume never goes to zero in |
114 // COMMUNICATION mode on Android. | 116 // COMMUNICATION mode on Android. |
115 bool muted_; | 117 bool muted_; |
116 | 118 |
117 // Volume level from 0 to 1. | 119 // Volume level from 0 to 1. |
118 float volume_; | 120 float volume_; |
119 | 121 |
120 // Container for retrieving data from AudioSourceCallback::OnMoreData(). | 122 // Container for retrieving data from AudioSourceCallback::OnMoreData(). |
121 scoped_ptr<AudioBus> audio_bus_; | 123 std::unique_ptr<AudioBus> audio_bus_; |
122 | 124 |
123 DISALLOW_COPY_AND_ASSIGN(OpenSLESOutputStream); | 125 DISALLOW_COPY_AND_ASSIGN(OpenSLESOutputStream); |
124 }; | 126 }; |
125 | 127 |
126 } // namespace media | 128 } // namespace media |
127 | 129 |
128 #endif // MEDIA_AUDIO_ANDROID_OPENSLES_OUTPUT_H_ | 130 #endif // MEDIA_AUDIO_ANDROID_OPENSLES_OUTPUT_H_ |
OLD | NEW |