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

Unified Diff: services/media/audio/audio_output_manager.cc

Issue 1419593007: Add an ALSA output to the motown audio server. (Closed) Base URL: https://github.com/domokit/mojo.git@change5
Patch Set: fixing android build Created 5 years, 1 month 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 | « services/media/audio/audio_output_manager.h ('k') | services/media/audio/platform/linux/alsa_output.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/media/audio/audio_output_manager.cc
diff --git a/services/media/audio/audio_output_manager.cc b/services/media/audio/audio_output_manager.cc
index 59e4ff38a2052c2a748e307355851b6f87412eb3..8ea2d485c483d0adfd03509bb0d6bea04cccda39 100644
--- a/services/media/audio/audio_output_manager.cc
+++ b/services/media/audio/audio_output_manager.cc
@@ -17,6 +17,9 @@ namespace audio {
static constexpr size_t THREAD_POOL_SZ = 2;
static const std::string THREAD_PREFIX("AudioMixer");
+// TODO(johngro): This needs to be replaced with a proper HAL
+extern AudioOutputPtr CreateDefaultAlsaOutput(AudioOutputManager* manager);
+
AudioOutputManager::AudioOutputManager(AudioServerImpl* server)
: server_(server) {
}
@@ -43,6 +46,10 @@ MediaResult AudioOutputManager::Init() {
// platform. Right now, we just create some hardcoded default outputs and
// leave it at that.
outputs_.emplace(audio::ThrottleOutput::New(this));
+ {
+ AudioOutputPtr alsa = CreateDefaultAlsaOutput(this);
+ if (alsa) { outputs_.emplace(alsa); }
+ }
// Step #3: Being monitoring for plug/unplug events for pluggable audio
// output devices.
« no previous file with comments | « services/media/audio/audio_output_manager.h ('k') | services/media/audio/platform/linux/alsa_output.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698