| Index: remoting/client/audio_player.cc
|
| diff --git a/remoting/client/audio_player.cc b/remoting/client/audio_player.cc
|
| index df4590f3f3d77faee76e417441a1835e4d8cee39..e213ca69c4e20744c5008f0457079bb4e4c89158 100644
|
| --- a/remoting/client/audio_player.cc
|
| +++ b/remoting/client/audio_player.cc
|
| @@ -7,6 +7,7 @@
|
| #include <algorithm>
|
| #include <string>
|
|
|
| +#include "base/callback_helpers.h"
|
| #include "base/logging.h"
|
| #include "base/stl_util.h"
|
|
|
| @@ -19,12 +20,12 @@ AudioPlayer::AudioPlayer()
|
| : sampling_rate_(AudioPacket::SAMPLING_RATE_INVALID),
|
| start_failed_(false),
|
| queued_bytes_(0),
|
| - bytes_consumed_(0) {
|
| -}
|
| + bytes_consumed_(0) {}
|
|
|
| AudioPlayer::~AudioPlayer() {}
|
|
|
| -void AudioPlayer::AddAudioPacket(std::unique_ptr<AudioPacket> packet) {
|
| +void AudioPlayer::ProcessAudioPacket(std::unique_ptr<AudioPacket> packet,
|
| + const base::Closure& done) {
|
| CHECK_EQ(1, packet->data_size());
|
| DCHECK_EQ(AudioPacket::ENCODING_RAW, packet->encoding());
|
| DCHECK_NE(AudioPacket::SAMPLING_RATE_INVALID, packet->sampling_rate());
|
| @@ -32,6 +33,8 @@ void AudioPlayer::AddAudioPacket(std::unique_ptr<AudioPacket> packet) {
|
| DCHECK_EQ(kChannels, static_cast<int>(packet->channels()));
|
| DCHECK_EQ(packet->data(0).size() % (kChannels * kSampleSizeBytes), 0u);
|
|
|
| + base::ScopedClosureRunner done_runner(done);
|
| +
|
| // No-op if the Pepper player won't start.
|
| if (start_failed_) {
|
| return;
|
|
|