| 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> |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 // true. Otherwise, use |volume_| for scaling. | 116 // true. Otherwise, use |volume_| for scaling. |
| 117 // This is needed because platform voice volume never goes to zero in | 117 // This is needed because platform voice volume never goes to zero in |
| 118 // COMMUNICATION mode on Android. | 118 // COMMUNICATION mode on Android. |
| 119 bool muted_; | 119 bool muted_; |
| 120 | 120 |
| 121 // Volume level from 0 to 1. | 121 // Volume level from 0 to 1. |
| 122 float volume_; | 122 float volume_; |
| 123 | 123 |
| 124 int samples_per_second_; | 124 int samples_per_second_; |
| 125 | 125 |
| 126 bool use_high_latency_; |
| 127 |
| 126 // Used to calculate the delay value for each OnMoreData() call. | 128 // Used to calculate the delay value for each OnMoreData() call. |
| 127 AudioTimestampHelper delay_calculator_; | 129 AudioTimestampHelper delay_calculator_; |
| 128 | 130 |
| 129 // Container for retrieving data from AudioSourceCallback::OnMoreData(). | 131 // Container for retrieving data from AudioSourceCallback::OnMoreData(). |
| 130 std::unique_ptr<AudioBus> audio_bus_; | 132 std::unique_ptr<AudioBus> audio_bus_; |
| 131 | 133 |
| 132 DISALLOW_COPY_AND_ASSIGN(OpenSLESOutputStream); | 134 DISALLOW_COPY_AND_ASSIGN(OpenSLESOutputStream); |
| 133 }; | 135 }; |
| 134 | 136 |
| 135 } // namespace media | 137 } // namespace media |
| 136 | 138 |
| 137 #endif // MEDIA_AUDIO_ANDROID_OPENSLES_OUTPUT_H_ | 139 #endif // MEDIA_AUDIO_ANDROID_OPENSLES_OUTPUT_H_ |
| OLD | NEW |