Index: media/mojo/interfaces/audio_output.mojom |
diff --git a/media/mojo/interfaces/audio_output.mojom b/media/mojo/interfaces/audio_output.mojom |
index 895a93e4967727e4d2846679b50433a2de46ff94..8d206c1cef3e4298c4ac6764e53b448890c711d9 100644 |
--- a/media/mojo/interfaces/audio_output.mojom |
+++ b/media/mojo/interfaces/audio_output.mojom |
@@ -5,29 +5,17 @@ |
module media.mojom; |
import "media/mojo/interfaces/audio_parameters.mojom"; |
+import "media/mojo/interfaces/media_types.mojom"; |
+import "url/mojo/origin.mojom"; |
-// This interface handles audio output stream operations. |
-// It allows to close a stream. |
-// TODO(rchtara): Add methods that allow the interaction with audio output |
-// streams: Play, Pause and SetVolume to this interface. |
-// See crbug.com/606707 for more details. |
-interface AudioOutputStream { |
- Close(); |
-}; |
- |
-// This interface manages audio output streams. |
-// It allows to create an AudioOutputStream. |
-// TODO(rchtara): Add a method to request device authorization to this |
-// interface. |
-// See crbug.com/606707 for more details. |
+// On error, the message pipe is closed. |
+// To close the stream, just close the message pipe. |
interface AudioOutput { |
DaleCurtis
2017/02/21 18:18:32
Can you fill these comments out now? I.e., high le
Max Morin
2017/02/22 10:08:43
Added comments, changed to Initialize.
DaleCurtis
2017/02/22 18:13:37
After I wrote this, I got this feedback on my own
|
- // TODO(rchtara): Remove |stream_id| from AudioOutput::CreateStream when all |
- // the stream operations are mojofied. |
- CreateStream( |
- int32 stream_id, |
- AudioParameters params) => |
- (int32 stream_id, |
- AudioOutputStream? stream, |
- handle<shared_buffer>? shared_buffer, |
- handle? socket_descriptor); |
-}; |
+ Start(media.mojom.AudioParameters params) => |
+ (handle<shared_buffer> shared_buffer, |
+ handle socket_descriptor); |
+ Play(); |
+ Pause(); |
+ // Volume is in the range [0, 1]. |
+ SetVolume(double volume); |
+}; |