OLD | NEW |
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_WIN_WAVEIN_INPUT_WIN_H_ | 5 #ifndef MEDIA_AUDIO_WIN_WAVEIN_INPUT_WIN_H_ |
6 #define MEDIA_AUDIO_WIN_WAVEIN_INPUT_WIN_H_ | 6 #define MEDIA_AUDIO_WIN_WAVEIN_INPUT_WIN_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include <windows.h> | 10 #include <windows.h> |
(...skipping 17 matching lines...) Expand all Loading... |
28 // The ctor takes all the usual parameters, plus |manager| which is the | 28 // The ctor takes all the usual parameters, plus |manager| which is the |
29 // the audio manager who is creating this object and |device_id| which | 29 // the audio manager who is creating this object and |device_id| which |
30 // is provided by the operating system. | 30 // is provided by the operating system. |
31 PCMWaveInAudioInputStream(AudioManagerWin* manager, | 31 PCMWaveInAudioInputStream(AudioManagerWin* manager, |
32 const AudioParameters& params, | 32 const AudioParameters& params, |
33 int num_buffers, | 33 int num_buffers, |
34 const std::string& device_id); | 34 const std::string& device_id); |
35 virtual ~PCMWaveInAudioInputStream(); | 35 virtual ~PCMWaveInAudioInputStream(); |
36 | 36 |
37 // Implementation of AudioInputStream. | 37 // Implementation of AudioInputStream. |
38 virtual bool Open() OVERRIDE; | 38 virtual bool Open() override; |
39 virtual void Start(AudioInputCallback* callback) OVERRIDE; | 39 virtual void Start(AudioInputCallback* callback) override; |
40 virtual void Stop() OVERRIDE; | 40 virtual void Stop() override; |
41 virtual void Close() OVERRIDE; | 41 virtual void Close() override; |
42 // TODO(henrika): Add volume support using the Audio Mixer API. | 42 // TODO(henrika): Add volume support using the Audio Mixer API. |
43 virtual double GetMaxVolume() OVERRIDE; | 43 virtual double GetMaxVolume() override; |
44 virtual void SetVolume(double volume) OVERRIDE; | 44 virtual void SetVolume(double volume) override; |
45 virtual double GetVolume() OVERRIDE; | 45 virtual double GetVolume() override; |
46 virtual void SetAutomaticGainControl(bool enabled) OVERRIDE; | 46 virtual void SetAutomaticGainControl(bool enabled) override; |
47 virtual bool GetAutomaticGainControl() OVERRIDE; | 47 virtual bool GetAutomaticGainControl() override; |
48 | 48 |
49 private: | 49 private: |
50 enum State { | 50 enum State { |
51 kStateEmpty, // Initial state. | 51 kStateEmpty, // Initial state. |
52 kStateReady, // Device obtained and ready to record. | 52 kStateReady, // Device obtained and ready to record. |
53 kStateRecording, // Recording audio. | 53 kStateRecording, // Recording audio. |
54 kStateStopping, // Trying to stop, waiting for callback to finish. | 54 kStateStopping, // Trying to stop, waiting for callback to finish. |
55 kStateStopped, // Stopped. Device was reset. | 55 kStateStopped, // Stopped. Device was reset. |
56 kStateClosed // Device has been released. | 56 kStateClosed // Device has been released. |
57 }; | 57 }; |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 // Extra audio bus used for storage of deinterleaved data for the OnData | 127 // Extra audio bus used for storage of deinterleaved data for the OnData |
128 // callback. | 128 // callback. |
129 scoped_ptr<media::AudioBus> audio_bus_; | 129 scoped_ptr<media::AudioBus> audio_bus_; |
130 | 130 |
131 DISALLOW_COPY_AND_ASSIGN(PCMWaveInAudioInputStream); | 131 DISALLOW_COPY_AND_ASSIGN(PCMWaveInAudioInputStream); |
132 }; | 132 }; |
133 | 133 |
134 } // namespace media | 134 } // namespace media |
135 | 135 |
136 #endif // MEDIA_AUDIO_WIN_WAVEIN_INPUT_WIN_H_ | 136 #endif // MEDIA_AUDIO_WIN_WAVEIN_INPUT_WIN_H_ |
OLD | NEW |