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

Unified Diff: media/audio/clockless_audio_sink.cc

Issue 1942803002: Caching AudioOutputDevice instances in mixer manager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make WebAudioSourceProvider to always return real sink info reguardless the client - to avoid behavior change. Created 4 years, 7 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 | « media/audio/clockless_audio_sink.h ('k') | media/base/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/clockless_audio_sink.cc
diff --git a/media/audio/clockless_audio_sink.cc b/media/audio/clockless_audio_sink.cc
index 911d09d09c75aba1542e772fb7abc40dc5a1737d..8273dfbcf2890f5fb93915f6e456d0c406909d6b 100644
--- a/media/audio/clockless_audio_sink.cc
+++ b/media/audio/clockless_audio_sink.cc
@@ -75,7 +75,13 @@ class ClocklessAudioSinkThread : public base::DelegateSimpleThread::Delegate {
};
ClocklessAudioSink::ClocklessAudioSink()
- : initialized_(false), playing_(false), hashing_(false) {}
+ : ClocklessAudioSink(OutputDeviceInfo()) {}
+
+ClocklessAudioSink::ClocklessAudioSink(const OutputDeviceInfo& device_info)
+ : device_info_(device_info),
+ initialized_(false),
+ playing_(false),
+ hashing_(false) {}
ClocklessAudioSink::~ClocklessAudioSink() {}
@@ -122,7 +128,7 @@ bool ClocklessAudioSink::SetVolume(double volume) {
}
OutputDeviceInfo ClocklessAudioSink::GetOutputDeviceInfo() {
- return OutputDeviceInfo();
+ return device_info_;
}
void ClocklessAudioSink::StartAudioHashForTesting() {
« no previous file with comments | « media/audio/clockless_audio_sink.h ('k') | media/base/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698