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

Side by Side Diff: media/audio/alsa/alsa_input.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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_ALSA_ALSA_INPUT_H_ 5 #ifndef MEDIA_AUDIO_ALSA_ALSA_INPUT_H_
6 #define MEDIA_AUDIO_ALSA_ALSA_INPUT_H_ 6 #define MEDIA_AUDIO_ALSA_ALSA_INPUT_H_
7 7
8 #include <alsa/asoundlib.h> 8 #include <alsa/asoundlib.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 virtual ~AlsaPcmInputStream(); 42 virtual ~AlsaPcmInputStream();
43 43
44 // Implementation of AudioInputStream. 44 // Implementation of AudioInputStream.
45 virtual bool Open() override; 45 virtual bool Open() override;
46 virtual void Start(AudioInputCallback* callback) override; 46 virtual void Start(AudioInputCallback* callback) override;
47 virtual void Stop() override; 47 virtual void Stop() override;
48 virtual void Close() override; 48 virtual void Close() override;
49 virtual double GetMaxVolume() override; 49 virtual double GetMaxVolume() override;
50 virtual void SetVolume(double volume) override; 50 virtual void SetVolume(double volume) override;
51 virtual double GetVolume() override; 51 virtual double GetVolume() override;
52 virtual bool IsMuted() override;
52 53
53 private: 54 private:
54 // Logs the error and invokes any registered callbacks. 55 // Logs the error and invokes any registered callbacks.
55 void HandleError(const char* method, int error); 56 void HandleError(const char* method, int error);
56 57
57 // Reads one or more buffers of audio from the device, passes on to the 58 // Reads one or more buffers of audio from the device, passes on to the
58 // registered callback and schedules the next read. 59 // registered callback and schedules the next read.
59 void ReadAudio(); 60 void ReadAudio();
60 61
61 // Recovers from any device errors if possible. 62 // Recovers from any device errors if possible.
(...skipping 24 matching lines...) Expand all
86 87
87 // NOTE: Weak pointers must be invalidated before all other member variables. 88 // NOTE: Weak pointers must be invalidated before all other member variables.
88 base::WeakPtrFactory<AlsaPcmInputStream> weak_factory_; 89 base::WeakPtrFactory<AlsaPcmInputStream> weak_factory_;
89 90
90 DISALLOW_COPY_AND_ASSIGN(AlsaPcmInputStream); 91 DISALLOW_COPY_AND_ASSIGN(AlsaPcmInputStream);
91 }; 92 };
92 93
93 } // namespace media 94 } // namespace media
94 95
95 #endif // MEDIA_AUDIO_ALSA_ALSA_INPUT_H_ 96 #endif // MEDIA_AUDIO_ALSA_ALSA_INPUT_H_
OLDNEW
« no previous file with comments | « content/browser/media/capture/web_contents_audio_input_stream.cc ('k') | media/audio/alsa/alsa_input.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698