| Index: media/audio/audio_output_ipc.h
|
| diff --git a/media/audio/audio_output_ipc.h b/media/audio/audio_output_ipc.h
|
| index 894ece5f3aabf7386385b067f4b90fb50303e5c5..8a636f017a187edb925654c75e35f4e2ee048eb5 100644
|
| --- a/media/audio/audio_output_ipc.h
|
| +++ b/media/audio/audio_output_ipc.h
|
| @@ -43,8 +43,8 @@ class MEDIA_EXPORT AudioOutputIPCDelegate {
|
|
|
| // Called when the AudioOutputIPC object is going away and/or when the IPC
|
| // channel has been closed and no more ipc requests can be made.
|
| - // Implementations must clear any references to the AudioOutputIPC object
|
| - // at this point.
|
| + // Implementations should delete their owned AudioOutputIPC instance
|
| + // immediately.
|
| virtual void OnIPCClosed() = 0;
|
|
|
| protected:
|
| @@ -57,47 +57,36 @@ class MEDIA_EXPORT AudioOutputIPCDelegate {
|
| // process.
|
| class MEDIA_EXPORT AudioOutputIPC {
|
| public:
|
| - // Registers an AudioOutputIPCDelegate and returns a |stream_id| that must
|
| - // be used with all other IPC functions in this interface.
|
| - virtual int AddDelegate(AudioOutputIPCDelegate* delegate) = 0;
|
| -
|
| - // Unregisters a delegate that was previously registered via a call to
|
| - // AddDelegate(). The audio stream should be in a closed state prior to
|
| - // calling this function.
|
| - virtual void RemoveDelegate(int stream_id) = 0;
|
| + virtual ~AudioOutputIPC();
|
|
|
| // Sends a request to create an AudioOutputController object in the peer
|
| - // process, identify it by |stream_id| and configure it to use the specified
|
| - // audio |params| including number of synchronized input channels.
|
| - // Once the stream has been created, the implementation must
|
| - // generate a notification to the AudioOutputIPCDelegate and call
|
| - // OnStreamCreated().
|
| - virtual void CreateStream(int stream_id,
|
| + // process and configures it to use the specified audio |params| including
|
| + // number of synchronized input channels. Once the stream has been created,
|
| + // the implementation will notify |delegate| by calling OnStreamCreated().
|
| + virtual void CreateStream(AudioOutputIPCDelegate* delegate,
|
| const AudioParameters& params) = 0;
|
|
|
| // Starts playing the stream. This should generate a call to
|
| // AudioOutputController::Play().
|
| - virtual void PlayStream(int stream_id) = 0;
|
| + virtual void PlayStream() = 0;
|
|
|
| // Pauses an audio stream. This should generate a call to
|
| // AudioOutputController::Pause().
|
| - virtual void PauseStream(int stream_id) = 0;
|
| + virtual void PauseStream() = 0;
|
|
|
| // "Flushes" the audio device. This should generate a call to
|
| // AudioOutputController::Flush().
|
| // TODO(tommi): This is currently neither implemented nor called. Remove?
|
| - virtual void FlushStream(int stream_id) = 0;
|
| + virtual void FlushStream() = 0;
|
|
|
| - // Closes the audio stream and deletes the matching AudioOutputController
|
| - // instance. Prior to deleting the AudioOutputController object, a call to
|
| - // AudioOutputController::Close must be made.
|
| - virtual void CloseStream(int stream_id) = 0;
|
| + // Closes the audio stream which should shut down the corresponding
|
| + // AudioOutputController in the peer process. Prior to deleting the
|
| + // AudioOutputController object, a call to AudioOutputController::Close must
|
| + // be made.
|
| + virtual void CloseStream() = 0;
|
|
|
| // Sets the volume of the audio stream.
|
| - virtual void SetVolume(int stream_id, double volume) = 0;
|
| -
|
| - protected:
|
| - virtual ~AudioOutputIPC();
|
| + virtual void SetVolume(double volume) = 0;
|
| };
|
|
|
| } // namespace media
|
|
|