Chromium Code Reviews| Index: media/mojo/interfaces/audio_output_stream.mojom |
| diff --git a/media/mojo/interfaces/audio_output_stream.mojom b/media/mojo/interfaces/audio_output_stream.mojom |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..18edcf8e2e36d25fcfdbbb272bdf10211535ca66 |
| --- /dev/null |
| +++ b/media/mojo/interfaces/audio_output_stream.mojom |
| @@ -0,0 +1,28 @@ |
| +// Copyright 2016 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. |
| + |
| +module media.mojom; |
| + |
| +import "media/mojo/interfaces/audio_parameters.mojom"; |
| +import "media/mojo/interfaces/media_types.mojom"; |
| + |
| +// An interface for controlling an audio output stream. |
| +// On error, the message pipe is closed. |
| +// To close the stream, just close the message pipe. |
| +interface AudioOutputStream { |
| + // Starts rendering audio. |
| + Play(); |
| + |
| + // Stops rendering audio and sends a signal to the |socket_descriptor| |
| + // indicating this. |
| + Pause(); |
| + |
| + // Sets volume. Volume must be in the range [0, 1]. |
| + SetVolume(double volume); |
| +}; |
| + |
| +interface AudioOutputStreamProvider { |
| + // Creates a new AudioOutputStream using |params|. |shared_buffer| and |socket_descriptor| are used to write data to the stream as defined in AudioDeviceThread. Can only be used for one output stream. |
|
o1ka
2017/03/07 23:31:07
"for one output stream" is not quite clear, as if
Max Morin
2017/03/08 07:38:29
Done.
o1ka
2017/03/08 08:11:49
Calling Acquire() twice?
|
| + Acquire(AudioOutputStream& output_stream, media.mojom.AudioParameters params) => (handle<shared_buffer> shared_buffer, handle socket_descriptor); |
| +}; |