Index: media/audio/pulse/pulse_input.h |
diff --git a/media/audio/pulse/pulse_input.h b/media/audio/pulse/pulse_input.h |
index 60acf2f908719891974eee38326fe528b64d615d..564bfe796093888098e1affe5693f62e33dec8de 100644 |
--- a/media/audio/pulse/pulse_input.h |
+++ b/media/audio/pulse/pulse_input.h |
@@ -41,6 +41,7 @@ class PulseAudioInputStream : public AgcAudioStream<AudioInputStream> { |
virtual double GetMaxVolume() override; |
virtual void SetVolume(double volume) override; |
virtual double GetVolume() override; |
+ virtual bool IsMuted() override; |
private: |
// PulseAudio Callbacks. |
@@ -48,6 +49,8 @@ class PulseAudioInputStream : public AgcAudioStream<AudioInputStream> { |
static void StreamNotifyCallback(pa_stream* stream, void* user_data); |
static void VolumeCallback(pa_context* context, const pa_source_info* info, |
int error, void* user_data); |
+ static void MuteCallback(pa_context* context, const pa_source_info* info, |
+ int error, void* user_data); |
// Helper for the ReadCallback. |
void ReadData(); |
@@ -60,6 +63,10 @@ class PulseAudioInputStream : public AgcAudioStream<AudioInputStream> { |
double volume_; |
bool stream_started_; |
+ // Set to true in IsMuted() if user has muted the selected microphone in the |
+ // sound settings UI. |
+ bool muted_; |
+ |
// Holds the data from the OS. |
AudioBlockFifo fifo_; |