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_INPUT_H_ | 5 #ifndef MEDIA_AUDIO_ANDROID_OPENSLES_INPUT_H_ |
6 #define MEDIA_AUDIO_ANDROID_OPENSLES_INPUT_H_ | 6 #define MEDIA_AUDIO_ANDROID_OPENSLES_INPUT_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "media/audio/audio_io.h" | 9 #include "media/audio/audio_io.h" |
10 #include "media/audio/audio_parameters.h" | 10 #include "media/audio/audio_parameters.h" |
11 #include "media/audio/android/opensles_util.h" | 11 #include "media/audio/android/opensles_util.h" |
12 #include <SLES/OpenSLES_Android.h> | 12 #include <SLES/OpenSLES_Android.h> |
13 | 13 |
| 14 namespace media { |
| 15 |
14 class AudioManagerAndroid; | 16 class AudioManagerAndroid; |
15 | 17 |
16 // Implements PCM audio input support for Android using the OpenSLES API. | 18 // Implements PCM audio input support for Android using the OpenSLES API. |
17 class OpenSLESInputStream : public AudioInputStream { | 19 class OpenSLESInputStream : public AudioInputStream { |
18 public: | 20 public: |
19 static const int kNumOfQueuesInBuffer = 2; | 21 static const int kNumOfQueuesInBuffer = 2; |
20 | 22 |
21 OpenSLESInputStream(AudioManagerAndroid* manager, | 23 OpenSLESInputStream(AudioManagerAndroid* manager, |
22 const AudioParameters& params); | 24 const AudioParameters& params); |
23 | 25 |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 uint8* audio_data_[kNumOfQueuesInBuffer]; | 74 uint8* audio_data_[kNumOfQueuesInBuffer]; |
73 | 75 |
74 int active_queue_; | 76 int active_queue_; |
75 int buffer_size_bytes_; | 77 int buffer_size_bytes_; |
76 | 78 |
77 bool started_; | 79 bool started_; |
78 | 80 |
79 DISALLOW_COPY_AND_ASSIGN(OpenSLESInputStream); | 81 DISALLOW_COPY_AND_ASSIGN(OpenSLESInputStream); |
80 }; | 82 }; |
81 | 83 |
| 84 } // namespace media |
| 85 |
82 #endif // MEDIA_AUDIO_ANDROID_OPENSLES_INPUT_H_ | 86 #endif // MEDIA_AUDIO_ANDROID_OPENSLES_INPUT_H_ |
OLD | NEW |