Chromium Code Reviews| Index: remoting/client/audio_player.h |
| diff --git a/remoting/client/audio_player.h b/remoting/client/audio_player.h |
| index ea0b789d75c5b20b7b5c7947446865a59d90178b..0ddbba7be2803a072579519f3fa6850e57488597 100644 |
| --- a/remoting/client/audio_player.h |
| +++ b/remoting/client/audio_player.h |
| @@ -13,21 +13,25 @@ |
| #include "base/macros.h" |
| #include "base/synchronization/lock.h" |
| +#include "remoting/client/audio_consumer.h" |
| #include "remoting/proto/audio.pb.h" |
| namespace remoting { |
| -class AudioPlayer { |
| +class AudioPlayer : public AudioConsumer { |
| public: |
| // The number of channels in the audio stream (only supporting stereo audio |
| // for now). |
| static const int kChannels = 2; |
| static const int kSampleSizeBytes = 2; |
| - virtual ~AudioPlayer(); |
| + ~AudioPlayer() override; |
| void ProcessAudioPacket(std::unique_ptr<AudioPacket> packet); |
|
Sergey Ulanov
2016/06/18 00:43:38
Why do we need to both ProcessAudioPacket() and Ad
nicholss
2016/06/20 17:47:52
Process is the deprecated way for the audio player
|
| + // AudioConsumer implementation. |
| + void AddAudioPacket(std::unique_ptr<AudioPacket> packet) override; |
| + |
| protected: |
| AudioPlayer(); |
| @@ -50,7 +54,7 @@ class AudioPlayer { |
| private: |
| friend class AudioPlayerTest; |
| - typedef std::list<AudioPacket*> AudioPacketQueue; |
| + typedef std::list<std::unique_ptr<AudioPacket>> AudioPacketQueue; |
| void ResetQueue(); |