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

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

Issue 1424933002: Add an initial revision of an audio server. (Closed) Base URL: https://github.com/domokit/mojo.git@change4
Patch Set: refactor MixerKernel into a class to prepare for the addition of a linear interpolation sampler 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
Index: services/media/audio/audio_server_app.cc
diff --git a/services/media/audio/audio_server_app.cc b/services/media/audio/audio_server_app.cc
new file mode 100644
index 0000000000000000000000000000000000000000..6a2a27915f2fe6511a5d9fbf6ea8191b61fe6080
--- /dev/null
+++ b/services/media/audio/audio_server_app.cc
@@ -0,0 +1,47 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "base/logging.h"
+#include "mojo/application/application_runner_chromium.h"
+#include "mojo/public/c/system/main.h"
+#include "mojo/public/cpp/application/application_delegate.h"
+#include "mojo/public/cpp/application/application_impl.h"
+#include "services/media/audio/audio_server_app.h"
+
+#define VERBOSE 0
+
+namespace mojo {
+namespace media {
+namespace audio {
+
+AudioServerApp::AudioServerApp() {}
+AudioServerApp::~AudioServerApp() {}
+
+void AudioServerApp::Initialize(ApplicationImpl* app) {
+ server_impl_.Initialize();
+}
+
+bool AudioServerApp::ConfigureIncomingConnection(
+ ApplicationConnection* connection) {
+ connection->AddService(this);
+ return true;
+}
+
+void AudioServerApp::Quit() {
+}
+
+void AudioServerApp::Create(ApplicationConnection* connection,
+ InterfaceRequest<AudioServer> request) {
+ bindings_.AddBinding(&server_impl_, request.Pass());
+}
+
+} // namespace audio
+} // namespace media
+} // namespace mojo
+
+MojoResult MojoMain(MojoHandle app_request) {
+ mojo::ApplicationRunnerChromium runner(
+ new mojo::media::audio::AudioServerApp);
+ return runner.Run(app_request);
+}

Powered by Google App Engine
This is Rietveld 408576698