Chromium Code Reviews| 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 |socket _descriptor| are used to write data to the stream as defined in AudioDeviceThrea d. 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?
| |
| 27 Acquire(AudioOutputStream& output_stream, media.mojom.AudioParameters params) => (handle<shared_buffer> shared_buffer, handle socket_descriptor); | |
| 28 }; | |
| OLD | NEW |