Small refactoring of AudioProcessing use in channel.cc.

- Apply consistent naming.
- Use a scoped_ptr for rx_audioproc_.
- Remove now unnecessary AudioProcessing::Destroy().

R=bjornv@webrtc.org, xians@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/2184007

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4784 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
andrew@webrtc.org
2013-09-18 22:37:32 +00:00
parent 0d5da25e6c
commit f3930e941c
6 changed files with 81 additions and 135 deletions

View File

@ -38,6 +38,7 @@ using webrtc::EchoCancellation;
using webrtc::GainControl;
using webrtc::NoiseSuppression;
using webrtc::scoped_array;
using webrtc::scoped_ptr;
using webrtc::TickInterval;
using webrtc::TickTime;
using webrtc::VoiceDetection;
@ -167,8 +168,8 @@ void void_main(int argc, char* argv[]) {
printf("Try `process_test --help' for more information.\n\n");
}
AudioProcessing* apm = AudioProcessing::Create(0);
ASSERT_TRUE(apm != NULL);
scoped_ptr<AudioProcessing> apm(AudioProcessing::Create(0));
ASSERT_TRUE(apm.get() != NULL);
const char* pb_filename = NULL;
const char* far_filename = NULL;
@ -1057,9 +1058,6 @@ void void_main(int argc, char* argv[]) {
printf("Warning: no capture frames\n");
}
}
AudioProcessing::Destroy(apm);
apm = NULL;
}
} // namespace