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

Side by Side Diff: media/audio/mac/audio_input_mac.h

Issue 655713003: Standardize usage of virtual/override/final in media/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/mac/audio_auhal_mac.h ('k') | media/audio/mac/audio_low_latency_input_mac.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_MAC_AUDIO_INPUT_MAC_H_ 5 #ifndef MEDIA_AUDIO_MAC_AUDIO_INPUT_MAC_H_
6 #define MEDIA_AUDIO_MAC_AUDIO_INPUT_MAC_H_ 6 #define MEDIA_AUDIO_MAC_AUDIO_INPUT_MAC_H_
7 7
8 #include <AudioToolbox/AudioFormat.h> 8 #include <AudioToolbox/AudioFormat.h>
9 #include <AudioToolbox/AudioQueue.h> 9 #include <AudioToolbox/AudioQueue.h>
10 10
11 #include "base/cancelable_callback.h" 11 #include "base/cancelable_callback.h"
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "base/time/time.h" 13 #include "base/time/time.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 { 17 namespace media {
18 18
19 class AudioBus; 19 class AudioBus;
20 class AudioManagerMac; 20 class AudioManagerMac;
21 21
22 // Implementation of AudioInputStream for Mac OS X using the audio queue service 22 // Implementation of AudioInputStream for Mac OS X using the audio queue service
23 // present in OS 10.5 and later. Design reflects PCMQueueOutAudioOutputStream. 23 // present in OS 10.5 and later. Design reflects PCMQueueOutAudioOutputStream.
24 class PCMQueueInAudioInputStream : public AudioInputStream { 24 class PCMQueueInAudioInputStream : public AudioInputStream {
25 public: 25 public:
26 // Parameters as per AudioManager::MakeAudioInputStream. 26 // Parameters as per AudioManager::MakeAudioInputStream.
27 PCMQueueInAudioInputStream(AudioManagerMac* manager, 27 PCMQueueInAudioInputStream(AudioManagerMac* manager,
28 const AudioParameters& params); 28 const AudioParameters& params);
29 virtual ~PCMQueueInAudioInputStream(); 29 ~PCMQueueInAudioInputStream() override;
30 30
31 // Implementation of AudioInputStream. 31 // Implementation of AudioInputStream.
32 virtual bool Open() override; 32 bool Open() override;
33 virtual void Start(AudioInputCallback* callback) override; 33 void Start(AudioInputCallback* callback) override;
34 virtual void Stop() override; 34 void Stop() override;
35 virtual void Close() override; 35 void Close() override;
36 virtual double GetMaxVolume() override; 36 double GetMaxVolume() override;
37 virtual void SetVolume(double volume) override; 37 void SetVolume(double volume) override;
38 virtual double GetVolume() override; 38 double GetVolume() override;
39 virtual void SetAutomaticGainControl(bool enabled) override; 39 void SetAutomaticGainControl(bool enabled) override;
40 virtual bool GetAutomaticGainControl() override; 40 bool GetAutomaticGainControl() override;
41 virtual bool IsMuted() override; 41 bool IsMuted() override;
42 42
43 private: 43 private:
44 // Issue the OnError to |callback_|; 44 // Issue the OnError to |callback_|;
45 void HandleError(OSStatus err); 45 void HandleError(OSStatus err);
46 46
47 // Allocates and prepares the memory that will be used for recording. 47 // Allocates and prepares the memory that will be used for recording.
48 bool SetupBuffers(); 48 bool SetupBuffers();
49 49
50 // Sends a buffer to the audio driver for recording. 50 // Sends a buffer to the audio driver for recording.
51 OSStatus QueueNextBuffer(AudioQueueBufferRef audio_buffer); 51 OSStatus QueueNextBuffer(AudioQueueBufferRef audio_buffer);
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 base::CancelableClosure deferred_start_cb_; 86 base::CancelableClosure deferred_start_cb_;
87 87
88 scoped_ptr<media::AudioBus> audio_bus_; 88 scoped_ptr<media::AudioBus> audio_bus_;
89 89
90 DISALLOW_COPY_AND_ASSIGN(PCMQueueInAudioInputStream); 90 DISALLOW_COPY_AND_ASSIGN(PCMQueueInAudioInputStream);
91 }; 91 };
92 92
93 } // namespace media 93 } // namespace media
94 94
95 #endif // MEDIA_AUDIO_MAC_AUDIO_INPUT_MAC_H_ 95 #endif // MEDIA_AUDIO_MAC_AUDIO_INPUT_MAC_H_
OLDNEW
« no previous file with comments | « media/audio/mac/audio_auhal_mac.h ('k') | media/audio/mac/audio_low_latency_input_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698