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

Unified Diff: services/media/audio/platform/generic/throttle_output.h

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/platform/generic/throttle_output.h
diff --git a/services/media/audio/platform/generic/throttle_output.h b/services/media/audio/platform/generic/throttle_output.h
new file mode 100644
index 0000000000000000000000000000000000000000..58896208b2ef0fd8a9a574826a854cb865ded7ce
--- /dev/null
+++ b/services/media/audio/platform/generic/throttle_output.h
@@ -0,0 +1,40 @@
+// 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.
+
+#ifndef SERVICES_MEDIA_AUDIO_PLATFORM_GENERIC_THROTTLE_OUTPUT_H_
+#define SERVICES_MEDIA_AUDIO_PLATFORM_GENERIC_THROTTLE_OUTPUT_H_
+
+#include "base/callback.h"
+#include "mojo/services/media/common/cpp/local_time.h"
+#include "services/media/audio/platform/generic/standard_output_base.h"
+
+namespace mojo {
+namespace media {
+namespace audio {
+
+class ThrottleOutput : public StandardOutputBase {
+ public:
+ static AudioOutputPtr New(AudioOutputManager* manager);
+ ~ThrottleOutput() override;
+
+ protected:
+ explicit ThrottleOutput(AudioOutputManager* manager);
+
+ // AudioOutput Implementation
+ MediaResult Init() override;
+
+ // StandardOutputBase Implementation
+ bool StartMixJob(MixJob* job, const LocalTime& process_start) override;
+ bool FinishMixJob(const MixJob& job) override;
+
+ private:
+ LocalTime last_sched_time_;
+};
+
+} // namespace audio
+} // namespace media
+} // namespace mojo
+
+#endif // SERVICES_MEDIA_AUDIO_PLATFORM_GENERIC_THROTTLE_OUTPUT_H_
+

Powered by Google App Engine
This is Rietveld 408576698