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

Unified Diff: webrtc/modules/audio_device/audio_device_impl.cc

Issue 2466613002: Adds thread safety annotations to the AudioDeviceBuffer class (Closed)
Patch Set: Adds race checker and removes test of ResetAudioDevice Created 4 years, 1 month 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: webrtc/modules/audio_device/audio_device_impl.cc
diff --git a/webrtc/modules/audio_device/audio_device_impl.cc b/webrtc/modules/audio_device/audio_device_impl.cc
index 80cb1be44931d1d7063b4268a511f08f20dc59f8..ad643e9684688a5ae9cf641364bdd3425f31a817 100644
--- a/webrtc/modules/audio_device/audio_device_impl.cc
+++ b/webrtc/modules/audio_device/audio_device_impl.cc
@@ -1496,9 +1496,7 @@ int32_t AudioDeviceModuleImpl::RegisterAudioCallback(
AudioTransport* audioCallback) {
LOG(INFO) << __FUNCTION__;
CriticalSectionScoped lock(&_critSectAudioCb);
- _audioDeviceBuffer.RegisterAudioCallback(audioCallback);
-
- return 0;
+ return _audioDeviceBuffer.RegisterAudioCallback(audioCallback);
}
// ----------------------------------------------------------------------------
@@ -1756,13 +1754,8 @@ int32_t AudioDeviceModuleImpl::PlayoutSampleRate(
int32_t AudioDeviceModuleImpl::ResetAudioDevice() {
LOG(INFO) << __FUNCTION__;
- CHECK_INITIALIZED();
-
- if (_ptrAudioDevice->ResetAudioDevice() == -1) {
- return -1;
- }
-
- return (0);
+ FATAL() << "Should never be called";
+ return -1;
}
// ----------------------------------------------------------------------------

Powered by Google App Engine
This is Rietveld 408576698