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

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

Issue 893363002: Update {virtual,override,final} to follow C++11 style. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 10 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.h ('k') | media/audio/android/opensles_output.h » ('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 13 matching lines...) Expand all
24 // This class is created and lives on the Audio Manager thread but recorded 24 // This class is created and lives on the Audio Manager thread but recorded
25 // audio buffers are delivered on an internal OpenSLES audio thread. All public 25 // audio buffers are delivered on an internal OpenSLES audio thread. All public
26 // methods should be called on the Audio Manager thread. 26 // methods should be called on the Audio Manager thread.
27 class OpenSLESInputStream : public AudioInputStream { 27 class OpenSLESInputStream : public AudioInputStream {
28 public: 28 public:
29 static const int kMaxNumOfBuffersInQueue = 2; 29 static const int kMaxNumOfBuffersInQueue = 2;
30 30
31 OpenSLESInputStream(AudioManagerAndroid* manager, 31 OpenSLESInputStream(AudioManagerAndroid* manager,
32 const AudioParameters& params); 32 const AudioParameters& params);
33 33
34 virtual ~OpenSLESInputStream(); 34 ~OpenSLESInputStream() override;
35 35
36 // Implementation of AudioInputStream. 36 // Implementation of AudioInputStream.
37 virtual bool Open() override; 37 bool Open() override;
38 virtual void Start(AudioInputCallback* callback) override; 38 void Start(AudioInputCallback* callback) override;
39 virtual void Stop() override; 39 void Stop() override;
40 virtual void Close() override; 40 void Close() override;
41 virtual double GetMaxVolume() override; 41 double GetMaxVolume() override;
42 virtual void SetVolume(double volume) override; 42 void SetVolume(double volume) override;
43 virtual double GetVolume() override; 43 double GetVolume() override;
44 virtual bool SetAutomaticGainControl(bool enabled) override; 44 bool SetAutomaticGainControl(bool enabled) override;
45 virtual bool GetAutomaticGainControl() override; 45 bool GetAutomaticGainControl() override;
46 virtual bool IsMuted() override; 46 bool IsMuted() override;
47 47
48 private: 48 private:
49 bool CreateRecorder(); 49 bool CreateRecorder();
50 50
51 // Called from OpenSLES specific audio worker thread. 51 // Called from OpenSLES specific audio worker thread.
52 static void SimpleBufferQueueCallback( 52 static void SimpleBufferQueueCallback(
53 SLAndroidSimpleBufferQueueItf buffer_queue, 53 SLAndroidSimpleBufferQueueItf buffer_queue,
54 void* instance); 54 void* instance);
55 55
56 // 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
97 bool started_; 97 bool started_;
98 98
99 scoped_ptr<media::AudioBus> audio_bus_; 99 scoped_ptr<media::AudioBus> audio_bus_;
100 100
101 DISALLOW_COPY_AND_ASSIGN(OpenSLESInputStream); 101 DISALLOW_COPY_AND_ASSIGN(OpenSLESInputStream);
102 }; 102 };
103 103
104 } // namespace media 104 } // namespace media
105 105
106 #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.h ('k') | media/audio/android/opensles_output.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698