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

Unified Diff: components/copresence/mediums/audio/audio_manager_impl.cc

Issue 888203002: Fixing token repetition bug (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/copresence/mediums/audio/audio_manager_impl.cc
diff --git a/components/copresence/mediums/audio/audio_manager_impl.cc b/components/copresence/mediums/audio/audio_manager_impl.cc
index 04d357c41925183d9355ee9d7cc22c425f469410..387eb54d33901ec0f65a2b9734945bdcf4c0d8be 100644
--- a/components/copresence/mediums/audio/audio_manager_impl.cc
+++ b/components/copresence/mediums/audio/audio_manager_impl.cc
@@ -127,6 +127,7 @@ void AudioManagerImpl::StopPlaying(AudioType type) {
// If we were only recording to hear our own played tokens, stop.
if (!should_be_recording_[AUDIBLE] && !should_be_recording_[INAUDIBLE])
recorder_->Stop();
+ playing_token_[type] = std::string();
}
void AudioManagerImpl::StartRecording(AudioType type) {
@@ -153,7 +154,7 @@ void AudioManagerImpl::SetToken(AudioType type,
}
const std::string AudioManagerImpl::GetToken(AudioType type) {
- return should_be_playing_[type] ? playing_token_[type] : "";
Charlie 2015/01/31 01:46:27 We no longer need this check since we're not stori
+ return playing_token_[type];
}
bool AudioManagerImpl::IsPlayingTokenHeard(AudioType type) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698