OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 module media.mojom; |
| 6 |
| 7 import "media/mojo/interfaces/audio_parameters.mojom"; |
| 8 import "media/mojo/interfaces/media_types.mojom"; |
| 9 |
| 10 // An interface for controlling an audio output stream. |
| 11 // On error, the message pipe is closed. |
| 12 // To close the stream, just close the message pipe. |
| 13 interface AudioOutputStream { |
| 14 // Starts rendering audio. |
| 15 Play(); |
| 16 |
| 17 // Stops rendering audio and sends a signal to the |socket_descriptor| |
| 18 // indicating this. |
| 19 Pause(); |
| 20 |
| 21 // Sets volume. Volume must be in the range [0, 1]. |
| 22 SetVolume(double volume); |
| 23 }; |
| 24 |
| 25 interface AudioOutputStreamProvider { |
| 26 // Creates a new AudioOutputStream using |params|. |shared_buffer| and |
| 27 // |socket_descriptor| are used to write data to the stream as defined |
| 28 // in AudioDeviceThread. Can only be called once. |
| 29 Acquire(AudioOutputStream& output_stream, AudioParameters params) |
| 30 => (handle<shared_buffer> shared_buffer, handle socket_descriptor); |
| 31 }; |
OLD | NEW |