OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_AUDIO_TRACK_OUTPUT_ANDROID_H_ | 5 #ifndef MEDIA_AUDIO_AUDIO_TRACK_OUTPUT_ANDROID_H_ |
6 #define MEDIA_AUDIO_AUDIO_TRACK_OUTPUT_ANDROID_H_ | 6 #define MEDIA_AUDIO_AUDIO_TRACK_OUTPUT_ANDROID_H_ |
7 | 7 |
8 #include <jni.h> | 8 #include <jni.h> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "base/timer.h" | 13 #include "base/timer.h" |
14 #include "media/audio/audio_io.h" | 14 #include "media/audio/audio_io.h" |
15 #include "media/audio/audio_parameters.h" | 15 #include "media/audio/audio_parameters.h" |
16 | 16 |
| 17 namespace media { |
| 18 |
17 class AudioManagerAndroid; | 19 class AudioManagerAndroid; |
18 | 20 |
19 // Implements PCM audio output support for Android using the AudioTrack API. | 21 // Implements PCM audio output support for Android using the AudioTrack API. |
20 class AudioTrackOutputStream : public AudioOutputStream { | 22 class AudioTrackOutputStream : public AudioOutputStream { |
21 public: | 23 public: |
22 enum Status { | 24 enum Status { |
23 IDLE, | 25 IDLE, |
24 OPENED, | 26 OPENED, |
25 PLAYING, | 27 PLAYING, |
26 INVALID | 28 INVALID |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 | 63 |
62 // Java AudioTrack class and instance. | 64 // Java AudioTrack class and instance. |
63 jclass j_class_; | 65 jclass j_class_; |
64 jobject j_audio_track_; | 66 jobject j_audio_track_; |
65 | 67 |
66 base::RepeatingTimer<AudioTrackOutputStream> timer_; | 68 base::RepeatingTimer<AudioTrackOutputStream> timer_; |
67 | 69 |
68 DISALLOW_COPY_AND_ASSIGN(AudioTrackOutputStream); | 70 DISALLOW_COPY_AND_ASSIGN(AudioTrackOutputStream); |
69 }; | 71 }; |
70 | 72 |
| 73 } // namespace media |
| 74 |
71 #endif // MEDIA_AUDIO_AUDIO_TRACK_OUTPUT_ANDROID_H_ | 75 #endif // MEDIA_AUDIO_AUDIO_TRACK_OUTPUT_ANDROID_H_ |
OLD | NEW |