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

Unified Diff: media/audio/audio_output_controller.h

Issue 1839723002: Experimental: Unmute Audio During Tab Sourced Desktop Share (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Loopback Sink (Rebased) Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/media/capture/web_contents_audio_muter.cc ('k') | media/audio/audio_output_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/audio_output_controller.h
diff --git a/media/audio/audio_output_controller.h b/media/audio/audio_output_controller.h
index 58e1e458a97e1ec06b5157706a62940919b7d2cc..fd64a68b88bbe6569f25c097c1fac288771753f8 100644
--- a/media/audio/audio_output_controller.h
+++ b/media/audio/audio_output_controller.h
@@ -5,6 +5,7 @@
#ifndef MEDIA_AUDIO_AUDIO_OUTPUT_CONTROLLER_H_
#define MEDIA_AUDIO_AUDIO_OUTPUT_CONTROLLER_H_
+#include <set>
#include <stdint.h>
#include "base/atomic_ref_count.h"
@@ -19,6 +20,7 @@
#include "media/audio/audio_power_monitor.h"
#include "media/audio/audio_source_diverter.h"
#include "media/audio/simple_sources.h"
+#include "media/audio/virtual_audio_output_stream.h"
#include "media/base/media_export.h"
// An AudioOutputController controls an AudioOutputStream and provides data
@@ -176,6 +178,8 @@ class MEDIA_EXPORT AudioOutputController
const AudioParameters& GetAudioParameters() override;
void StartDiverting(AudioOutputStream* to_stream) override;
void StopDiverting() override;
+ void StartDuplicating(AudioPushSink* to_stream) override;
+ void StopDuplicating(AudioPushSink* to_stream) override;
// Accessor for AudioPowerMonitor::ReadCurrentPowerAndClip(). See comments in
// audio_power_monitor.h for usage. This may be called on any thread.
@@ -217,11 +221,14 @@ class MEDIA_EXPORT AudioOutputController
void DoStartDiverting(AudioOutputStream* to_stream);
void DoStopDiverting();
+ void DoStartDuplicating(AudioPushSink* to_stream);
+ void DoStopDuplicating(AudioPushSink* to_stream);
+
// Helper method that stops the physical stream.
void StopStream();
// Helper method that stops, closes, and NULLs |*stream_|.
- void DoStopCloseAndClearStream();
+ void DoStopCloseAndClearStream(bool isForDeviceChange);
// Checks if a stream was started successfully but never calls OnMoreData().
void WedgeCheck();
@@ -239,6 +246,8 @@ class MEDIA_EXPORT AudioOutputController
// When non-NULL, audio is being diverted to this stream.
AudioOutputStream* diverting_to_stream_;
+ std::set<AudioPushSink*> duplicator_;
+
// The current volume of the audio stream.
double volume_;
« no previous file with comments | « content/browser/media/capture/web_contents_audio_muter.cc ('k') | media/audio/audio_output_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698