Use pointer-based CriticalSectionScoped().
The reference-based constructor is deprecated.
BUG=185
TEST=audioproc_unittest
Review URL: https://webrtc-codereview.appspot.com/373015
git-svn-id: http://webrtc.googlecode.com/svn/trunk@1573 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/src/modules/audio_processing/audio_processing_impl.cc b/src/modules/audio_processing/audio_processing_impl.cc
index 9702e9e..b0974be 100644
--- a/src/modules/audio_processing/audio_processing_impl.cc
+++ b/src/modules/audio_processing/audio_processing_impl.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
+ * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
@@ -139,7 +139,7 @@
}
int AudioProcessingImpl::Initialize() {
- CriticalSectionScoped crit_scoped(*crit_);
+ CriticalSectionScoped crit_scoped(crit_);
return InitializeLocked();
}
@@ -183,7 +183,7 @@
}
int AudioProcessingImpl::set_sample_rate_hz(int rate) {
- CriticalSectionScoped crit_scoped(*crit_);
+ CriticalSectionScoped crit_scoped(crit_);
if (rate != kSampleRate8kHz &&
rate != kSampleRate16kHz &&
rate != kSampleRate32kHz) {
@@ -207,7 +207,7 @@
}
int AudioProcessingImpl::set_num_reverse_channels(int channels) {
- CriticalSectionScoped crit_scoped(*crit_);
+ CriticalSectionScoped crit_scoped(crit_);
// Only stereo supported currently.
if (channels > 2 || channels < 1) {
return kBadParameterError;
@@ -225,7 +225,7 @@
int AudioProcessingImpl::set_num_channels(
int input_channels,
int output_channels) {
- CriticalSectionScoped crit_scoped(*crit_);
+ CriticalSectionScoped crit_scoped(crit_);
if (output_channels > input_channels) {
return kBadParameterError;
}
@@ -254,7 +254,7 @@
}
int AudioProcessingImpl::ProcessStream(AudioFrame* frame) {
- CriticalSectionScoped crit_scoped(*crit_);
+ CriticalSectionScoped crit_scoped(crit_);
int err = kNoError;
if (frame == NULL) {
@@ -385,7 +385,7 @@
}
int AudioProcessingImpl::AnalyzeReverseStream(AudioFrame* frame) {
- CriticalSectionScoped crit_scoped(*crit_);
+ CriticalSectionScoped crit_scoped(crit_);
int err = kNoError;
if (frame == NULL) {
@@ -478,7 +478,7 @@
int AudioProcessingImpl::StartDebugRecording(
const char filename[AudioProcessing::kMaxFilenameSize]) {
- CriticalSectionScoped crit_scoped(*crit_);
+ CriticalSectionScoped crit_scoped(crit_);
assert(kMaxFilenameSize == FileWrapper::kMaxFileNameSize);
if (filename == NULL) {
@@ -509,7 +509,7 @@
}
int AudioProcessingImpl::StopDebugRecording() {
- CriticalSectionScoped crit_scoped(*crit_);
+ CriticalSectionScoped crit_scoped(crit_);
#ifdef WEBRTC_AUDIOPROC_DEBUG_DUMP
// We just return if recording hasn't started.
@@ -553,7 +553,7 @@
}
WebRtc_Word32 AudioProcessingImpl::ChangeUniqueId(const WebRtc_Word32 id) {
- CriticalSectionScoped crit_scoped(*crit_);
+ CriticalSectionScoped crit_scoped(crit_);
/*WEBRTC_TRACE(webrtc::kTraceModuleCall,
webrtc::kTraceAudioProcessing,
id_,