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
This commit is contained in:
@ -23,31 +23,27 @@ namespace webrtc {
|
||||
|
||||
#define NUM_PANN_COEFFS 10
|
||||
|
||||
SpatialAudio::SpatialAudio(int testMode) {
|
||||
_testMode = testMode;
|
||||
SpatialAudio::SpatialAudio(int testMode)
|
||||
: _acmLeft(AudioCodingModule::Create(1)),
|
||||
_acmRight(AudioCodingModule::Create(2)),
|
||||
_acmReceiver(AudioCodingModule::Create(3)),
|
||||
_testMode(testMode) {
|
||||
}
|
||||
|
||||
SpatialAudio::~SpatialAudio() {
|
||||
AudioCodingModule::Destroy(_acmLeft);
|
||||
AudioCodingModule::Destroy(_acmRight);
|
||||
AudioCodingModule::Destroy(_acmReceiver);
|
||||
delete _channel;
|
||||
_inFile.Close();
|
||||
_outFile.Close();
|
||||
}
|
||||
|
||||
int16_t SpatialAudio::Setup() {
|
||||
// Create ACMs and the Channel;
|
||||
_acmLeft = AudioCodingModule::Create(1);
|
||||
_acmRight = AudioCodingModule::Create(2);
|
||||
_acmReceiver = AudioCodingModule::Create(3);
|
||||
_channel = new Channel;
|
||||
|
||||
// Register callback for the sender side.
|
||||
CHECK_ERROR(_acmLeft->RegisterTransportCallback(_channel));
|
||||
CHECK_ERROR(_acmRight->RegisterTransportCallback(_channel));
|
||||
// Register the receiver ACM in channel
|
||||
_channel->RegisterReceiverACM(_acmReceiver);
|
||||
_channel->RegisterReceiverACM(_acmReceiver.get());
|
||||
|
||||
uint16_t sampFreqHz = 32000;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user