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 27 matching lines...) Expand all Loading... |
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 virtual bool IsMuted() override; |
48 | 49 |
49 private: | 50 private: |
50 enum State { | 51 enum State { |
51 kStateEmpty, // Initial state. | 52 kStateEmpty, // Initial state. |
52 kStateReady, // Device obtained and ready to record. | 53 kStateReady, // Device obtained and ready to record. |
53 kStateRecording, // Recording audio. | 54 kStateRecording, // Recording audio. |
54 kStateStopping, // Trying to stop, waiting for callback to finish. | 55 kStateStopping, // Trying to stop, waiting for callback to finish. |
55 kStateStopped, // Stopped. Device was reset. | 56 kStateStopped, // Stopped. Device was reset. |
56 kStateClosed // Device has been released. | 57 kStateClosed // Device has been released. |
57 }; | 58 }; |
(...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 | 128 // Extra audio bus used for storage of deinterleaved data for the OnData |
128 // callback. | 129 // callback. |
129 scoped_ptr<media::AudioBus> audio_bus_; | 130 scoped_ptr<media::AudioBus> audio_bus_; |
130 | 131 |
131 DISALLOW_COPY_AND_ASSIGN(PCMWaveInAudioInputStream); | 132 DISALLOW_COPY_AND_ASSIGN(PCMWaveInAudioInputStream); |
132 }; | 133 }; |
133 | 134 |
134 } // namespace media | 135 } // namespace media |
135 | 136 |
136 #endif // MEDIA_AUDIO_WIN_WAVEIN_INPUT_WIN_H_ | 137 #endif // MEDIA_AUDIO_WIN_WAVEIN_INPUT_WIN_H_ |
OLD | NEW |