Make the destructor of AudioCodingModule public.
This allows the type to be used with a scoped_ptr. Remove all calls to
the deprecated Destroy() from tests.
R=turaj@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/2200006
git-svn-id: http://webrtc.googlecode.com/svn/trunk@4731 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/webrtc/modules/audio_coding/main/test/iSACTest.cc b/webrtc/modules/audio_coding/main/test/iSACTest.cc
index e8b77ac..50809fc 100644
--- a/webrtc/modules/audio_coding/main/test/iSACTest.cc
+++ b/webrtc/modules/audio_coding/main/test/iSACTest.cc
@@ -21,7 +21,7 @@
#else
#include <sys/time.h>
#include <time.h>
-#endif
+#endif
#include "webrtc/modules/audio_coding/main/source/acm_common_defs.h"
#include "webrtc/modules/audio_coding/main/test/utility.h"
@@ -86,14 +86,13 @@
return 0;
}
-ISACTest::ISACTest(int testMode) {
- _testMode = testMode;
+ISACTest::ISACTest(int testMode)
+ : _acmA(AudioCodingModule::Create(1)),
+ _acmB(AudioCodingModule::Create(2)),
+ _testMode(testMode) {
}
ISACTest::~ISACTest() {
- AudioCodingModule::Destroy(_acmA);
- AudioCodingModule::Destroy(_acmB);
-
delete _channel_A2B;
delete _channel_B2A;
}
@@ -102,9 +101,6 @@
int codecCntr;
CodecInst codecParam;
- _acmA = AudioCodingModule::Create(1);
- _acmB = AudioCodingModule::Create(2);
-
for (codecCntr = 0; codecCntr < AudioCodingModule::NumberOfCodecs();
codecCntr++) {
EXPECT_EQ(0, AudioCodingModule::Codec(codecCntr, &codecParam));