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 <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
11 #include "media/audio/android/opensles_util.h" | 11 #include "media/audio/android/opensles_util.h" |
12 #include "media/audio/audio_io.h" | 12 #include "media/audio/audio_io.h" |
13 #include "media/audio/audio_parameters.h" | 13 #include "media/audio/audio_parameters.h" |
14 #include <SLES/OpenSLES_Android.h> | 14 #include <SLES/OpenSLES_Android.h> |
15 | 15 |
| 16 namespace media { |
| 17 |
16 class AudioManagerAndroid; | 18 class AudioManagerAndroid; |
17 | 19 |
18 // Implements PCM audio output support for Android using the OpenSLES API. | 20 // Implements PCM audio output support for Android using the OpenSLES API. |
19 class OpenSLESOutputStream : public AudioOutputStream { | 21 class OpenSLESOutputStream : public AudioOutputStream { |
20 public: | 22 public: |
21 static const int kNumOfQueuesInBuffer = 2; | 23 static const int kNumOfQueuesInBuffer = 2; |
22 | 24 |
23 OpenSLESOutputStream(AudioManagerAndroid* manager, | 25 OpenSLESOutputStream(AudioManagerAndroid* manager, |
24 const AudioParameters& params); | 26 const AudioParameters& params); |
25 | 27 |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 size_t buffer_size_bytes_; | 76 size_t buffer_size_bytes_; |
75 | 77 |
76 bool started_; | 78 bool started_; |
77 | 79 |
78 // Volume level from 0 to 1. | 80 // Volume level from 0 to 1. |
79 float volume_; | 81 float volume_; |
80 | 82 |
81 DISALLOW_COPY_AND_ASSIGN(OpenSLESOutputStream); | 83 DISALLOW_COPY_AND_ASSIGN(OpenSLESOutputStream); |
82 }; | 84 }; |
83 | 85 |
| 86 } // namespace media |
| 87 |
84 #endif // MEDIA_AUDIO_ANDROID_OPENSLES_INPUT_H_ | 88 #endif // MEDIA_AUDIO_ANDROID_OPENSLES_INPUT_H_ |
OLD | NEW |