Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(48)

Side by Side Diff: media/audio/android/opensles_input.h

Issue 645923002: Add support for audio input mute detection on all platforms (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « media/audio/android/audio_record_input.cc ('k') | media/audio/android/opensles_input.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <SLES/OpenSLES.h> 8 #include <SLES/OpenSLES.h>
9 #include <SLES/OpenSLES_Android.h> 9 #include <SLES/OpenSLES_Android.h>
10 10
(...skipping 25 matching lines...) Expand all
36 // Implementation of AudioInputStream. 36 // Implementation of AudioInputStream.
37 virtual bool Open() override; 37 virtual bool Open() override;
38 virtual void Start(AudioInputCallback* callback) override; 38 virtual void Start(AudioInputCallback* callback) override;
39 virtual void Stop() override; 39 virtual void Stop() override;
40 virtual void Close() override; 40 virtual void Close() override;
41 virtual double GetMaxVolume() override; 41 virtual double GetMaxVolume() override;
42 virtual void SetVolume(double volume) override; 42 virtual void SetVolume(double volume) override;
43 virtual double GetVolume() override; 43 virtual double GetVolume() override;
44 virtual void SetAutomaticGainControl(bool enabled) override; 44 virtual void SetAutomaticGainControl(bool enabled) override;
45 virtual bool GetAutomaticGainControl() override; 45 virtual bool GetAutomaticGainControl() override;
46 virtual bool IsMuted() override;
46 47
47 private: 48 private:
48 bool CreateRecorder(); 49 bool CreateRecorder();
49 50
50 // Called from OpenSLES specific audio worker thread. 51 // Called from OpenSLES specific audio worker thread.
51 static void SimpleBufferQueueCallback( 52 static void SimpleBufferQueueCallback(
52 SLAndroidSimpleBufferQueueItf buffer_queue, 53 SLAndroidSimpleBufferQueueItf buffer_queue,
53 void* instance); 54 void* instance);
54 55
55 // Called from OpenSLES specific audio worker thread. 56 // Called from OpenSLES specific audio worker thread.
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 bool started_; 97 bool started_;
97 98
98 scoped_ptr<media::AudioBus> audio_bus_; 99 scoped_ptr<media::AudioBus> audio_bus_;
99 100
100 DISALLOW_COPY_AND_ASSIGN(OpenSLESInputStream); 101 DISALLOW_COPY_AND_ASSIGN(OpenSLESInputStream);
101 }; 102 };
102 103
103 } // namespace media 104 } // namespace media
104 105
105 #endif // MEDIA_AUDIO_ANDROID_OPENSLES_INPUT_H_ 106 #endif // MEDIA_AUDIO_ANDROID_OPENSLES_INPUT_H_
OLDNEW
« no previous file with comments | « media/audio/android/audio_record_input.cc ('k') | media/audio/android/opensles_input.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698