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

Unified Diff: remoting/client/audio_player_android.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: Addressing comments in CL. 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
« no previous file with comments | « remoting/client/audio_player_android.h ('k') | remoting/client/audio_player_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/client/audio_player_android.cc
diff --git a/remoting/client/audio_player_android.cc b/remoting/client/audio_player_android.cc
index cd4909668a7e587013b7974036b3213b86a53f55..8ee6f864786c4a223e6f4e56a098c494732de62f 100644
--- a/remoting/client/audio_player_android.cc
+++ b/remoting/client/audio_player_android.cc
@@ -15,7 +15,7 @@ static_assert(AudioPlayer::kChannels == 2,
"AudioPlayer must be feeding 2 channels data.");
const int kChannelMask = SL_SPEAKER_FRONT_LEFT | SL_SPEAKER_FRONT_RIGHT;
-AudioPlayerAndroid::AudioPlayerAndroid() {
+AudioPlayerAndroid::AudioPlayerAndroid() : weak_factory_(this) {
if (slCreateEngine(&engine_object_, 0, nullptr, 0, nullptr, nullptr) !=
SL_RESULT_SUCCESS ||
(*engine_object_)->Realize(engine_object_, SL_BOOLEAN_FALSE) !=
@@ -41,6 +41,10 @@ AudioPlayerAndroid::~AudioPlayerAndroid() {
}
}
+base::WeakPtr<AudioPlayerAndroid> AudioPlayerAndroid::GetWeakPtr() {
+ return weak_factory_.GetWeakPtr();
+}
+
uint32_t AudioPlayerAndroid::GetSamplesPerFrame() {
return sample_per_frame_;
}
« no previous file with comments | « remoting/client/audio_player_android.h ('k') | remoting/client/audio_player_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698