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

Side by Side Diff: media/audio/win/wavein_input_win.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/win/audio_low_latency_input_win.cc ('k') | media/audio/win/wavein_input_win.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_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
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
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_
OLDNEW
« no previous file with comments | « media/audio/win/audio_low_latency_input_win.cc ('k') | media/audio/win/wavein_input_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698