Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(398)

Unified Diff: remoting/client/audio_player.cc

Issue 2052723002: Adding an interface to allow extention of the audio player for CRD and iOS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: remoting/client/audio_player.cc
diff --git a/remoting/client/audio_player.cc b/remoting/client/audio_player.cc
index 5fc00b7abc5274cdcb840e39eeb98437017dc40a..880e584bb3f69b4dc3d775390e4fcd55f11f95c8 100644
--- a/remoting/client/audio_player.cc
+++ b/remoting/client/audio_player.cc
@@ -5,6 +5,7 @@
#include "remoting/client/audio_player.h"
#include <algorithm>
+#include <string>
#include "base/logging.h"
#include "base/stl_util.h"
@@ -26,7 +27,7 @@ AudioPlayer::~AudioPlayer() {
ResetQueue();
}
-void AudioPlayer::ProcessAudioPacket(std::unique_ptr<AudioPacket> packet) {
+void AudioPlayer::AddAudioPacket(std::unique_ptr<AudioPacket> packet) {
nicholss 2016/06/09 17:26:39 Add vs Process is to align with how consumers norm
CHECK_EQ(1, packet->data_size());
DCHECK_EQ(AudioPacket::ENCODING_RAW, packet->encoding());
DCHECK_NE(AudioPacket::SAMPLING_RATE_INVALID, packet->sampling_rate());
@@ -73,6 +74,10 @@ void AudioPlayer::ProcessAudioPacket(std::unique_ptr<AudioPacket> packet) {
}
}
+void AudioPlayer::ProcessAudioPacket(std::unique_ptr<AudioPacket> packet) {
+ AddAudioPacket(std::move(packet));
+}
+
// static
void AudioPlayer::AudioPlayerCallback(void* samples,
uint32_t buffer_size,

Powered by Google App Engine
This is Rietveld 408576698