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

Unified Diff: webrtc/modules/audio_device/dummy/file_audio_device.cc

Issue 2785673002: Remove more CriticalSectionWrappers. (Closed)
Patch Set: Created 3 years, 9 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: webrtc/modules/audio_device/dummy/file_audio_device.cc
diff --git a/webrtc/modules/audio_device/dummy/file_audio_device.cc b/webrtc/modules/audio_device/dummy/file_audio_device.cc
index 3dcb1384e7871158510d8b5986d5f413a0cf4271..92b09e0a9d1ce175174691b7fbeb6f40e02eef75 100644
--- a/webrtc/modules/audio_device/dummy/file_audio_device.cc
+++ b/webrtc/modules/audio_device/dummy/file_audio_device.cc
@@ -33,7 +33,6 @@ FileAudioDevice::FileAudioDevice(const int32_t id,
_playoutBuffer(NULL),
_recordingFramesLeft(0),
_playoutFramesLeft(0),
- _critSect(*CriticalSectionWrapper::CreateCriticalSection()),
_recordingBufferSizeIn10MS(0),
_recordingFramesIn10MS(0),
_playoutFramesIn10MS(0),
@@ -161,7 +160,7 @@ int32_t FileAudioDevice::RecordingIsAvailable(bool& available) {
}
int32_t FileAudioDevice::InitRecording() {
- CriticalSectionScoped lock(&_critSect);
+ rtc::CritScope lock(&_critSect);
if (_recording) {
return -1;
@@ -219,7 +218,7 @@ int32_t FileAudioDevice::StartPlayout() {
int32_t FileAudioDevice::StopPlayout() {
{
- CriticalSectionScoped lock(&_critSect);
+ rtc::CritScope lock(&_critSect);
_playing = false;
}
@@ -229,7 +228,7 @@ int32_t FileAudioDevice::StopPlayout() {
_ptrThreadPlay.reset();
}
- CriticalSectionScoped lock(&_critSect);
+ rtc::CritScope lock(&_critSect);
_playoutFramesLeft = 0;
delete [] _playoutBuffer;
@@ -280,7 +279,7 @@ int32_t FileAudioDevice::StartRecording() {
int32_t FileAudioDevice::StopRecording() {
{
- CriticalSectionScoped lock(&_critSect);
+ rtc::CritScope lock(&_critSect);
_recording = false;
}
@@ -289,7 +288,7 @@ int32_t FileAudioDevice::StopRecording() {
_ptrThreadRec.reset();
}
- CriticalSectionScoped lock(&_critSect);
+ rtc::CritScope lock(&_critSect);
_recordingFramesLeft = 0;
if (_recordingBuffer) {
delete [] _recordingBuffer;
@@ -456,7 +455,7 @@ void FileAudioDevice::ClearRecordingWarning() {}
void FileAudioDevice::ClearRecordingError() {}
void FileAudioDevice::AttachAudioBuffer(AudioDeviceBuffer* audioBuffer) {
- CriticalSectionScoped lock(&_critSect);
+ rtc::CritScope lock(&_critSect);
_ptrAudioBuffer = audioBuffer;
« no previous file with comments | « webrtc/modules/audio_device/dummy/file_audio_device.h ('k') | webrtc/modules/audio_device/linux/audio_device_alsa_linux.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698