| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_AUDIO_RECORD_INPUT_H_ | 5 #ifndef MEDIA_AUDIO_ANDROID_AUDIO_RECORD_INPUT_H_ |
| 6 #define MEDIA_AUDIO_ANDROID_AUDIO_RECORD_INPUT_H_ | 6 #define MEDIA_AUDIO_ANDROID_AUDIO_RECORD_INPUT_H_ |
| 7 | 7 |
| 8 #include "base/android/jni_android.h" | 8 #include "base/android/jni_android.h" |
| 9 #include "base/threading/thread_checker.h" | 9 #include "base/threading/thread_checker.h" |
| 10 #include "media/audio/audio_io.h" | 10 #include "media/audio/audio_io.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 // The Java class makes use of AudioEffect features which are first available | 24 // The Java class makes use of AudioEffect features which are first available |
| 25 // in Jelly Bean. It should not be instantiated running against earlier SDKs. | 25 // in Jelly Bean. It should not be instantiated running against earlier SDKs. |
| 26 class MEDIA_EXPORT AudioRecordInputStream : public AudioInputStream { | 26 class MEDIA_EXPORT AudioRecordInputStream : public AudioInputStream { |
| 27 public: | 27 public: |
| 28 AudioRecordInputStream(AudioManagerAndroid* manager, | 28 AudioRecordInputStream(AudioManagerAndroid* manager, |
| 29 const AudioParameters& params); | 29 const AudioParameters& params); |
| 30 | 30 |
| 31 virtual ~AudioRecordInputStream(); | 31 virtual ~AudioRecordInputStream(); |
| 32 | 32 |
| 33 // Implementation of AudioInputStream. | 33 // Implementation of AudioInputStream. |
| 34 virtual bool Open() OVERRIDE; | 34 virtual bool Open() override; |
| 35 virtual void Start(AudioInputCallback* callback) OVERRIDE; | 35 virtual void Start(AudioInputCallback* callback) override; |
| 36 virtual void Stop() OVERRIDE; | 36 virtual void Stop() override; |
| 37 virtual void Close() OVERRIDE; | 37 virtual void Close() override; |
| 38 virtual double GetMaxVolume() OVERRIDE; | 38 virtual double GetMaxVolume() override; |
| 39 virtual void SetVolume(double volume) OVERRIDE; | 39 virtual void SetVolume(double volume) override; |
| 40 virtual double GetVolume() OVERRIDE; | 40 virtual double GetVolume() override; |
| 41 virtual void SetAutomaticGainControl(bool enabled) OVERRIDE; | 41 virtual void SetAutomaticGainControl(bool enabled) override; |
| 42 virtual bool GetAutomaticGainControl() OVERRIDE; | 42 virtual bool GetAutomaticGainControl() override; |
| 43 | 43 |
| 44 static bool RegisterAudioRecordInput(JNIEnv* env); | 44 static bool RegisterAudioRecordInput(JNIEnv* env); |
| 45 | 45 |
| 46 // Called from Java when data is available. | 46 // Called from Java when data is available. |
| 47 void OnData(JNIEnv* env, jobject obj, jint size, jint hardware_delay_bytes); | 47 void OnData(JNIEnv* env, jobject obj, jint size, jint hardware_delay_bytes); |
| 48 | 48 |
| 49 // Called from Java so that we can cache the address of the Java-managed | 49 // Called from Java so that we can cache the address of the Java-managed |
| 50 // |byte_buffer| in |direct_buffer_address_|. | 50 // |byte_buffer| in |direct_buffer_address_|. |
| 51 void CacheDirectBufferAddress(JNIEnv* env, jobject obj, jobject byte_buffer); | 51 void CacheDirectBufferAddress(JNIEnv* env, jobject obj, jobject byte_buffer); |
| 52 | 52 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 67 | 67 |
| 68 scoped_ptr<media::AudioBus> audio_bus_; | 68 scoped_ptr<media::AudioBus> audio_bus_; |
| 69 int bytes_per_sample_; | 69 int bytes_per_sample_; |
| 70 | 70 |
| 71 DISALLOW_COPY_AND_ASSIGN(AudioRecordInputStream); | 71 DISALLOW_COPY_AND_ASSIGN(AudioRecordInputStream); |
| 72 }; | 72 }; |
| 73 | 73 |
| 74 } // namespace media | 74 } // namespace media |
| 75 | 75 |
| 76 #endif // MEDIA_AUDIO_ANDROID_AUDIO_RECORD_INPUT_H_ | 76 #endif // MEDIA_AUDIO_ANDROID_AUDIO_RECORD_INPUT_H_ |
| OLD | NEW |