2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
11 #ifndef WEBRTC_MODULES_AUDIO_CODING_MAIN_TEST_ISACTEST_H_
12 #define WEBRTC_MODULES_AUDIO_CODING_MAIN_TEST_ISACTEST_H_
16 #include "webrtc/common_types.h"
17 #include "webrtc/modules/audio_coding/main/interface/audio_coding_module.h"
18 #include "webrtc/modules/audio_coding/main/test/ACMTest.h"
19 #include "webrtc/modules/audio_coding/main/test/Channel.h"
20 #include "webrtc/modules/audio_coding/main/test/PCMFile.h"
21 #include "webrtc/modules/audio_coding/main/test/utility.h"
22 #include "webrtc/system_wrappers/interface/scoped_ptr.h"
24 #define MAX_FILE_NAME_LENGTH_BYTE 500
25 #define NO_OF_CLIENTS 15
29 struct ACMTestISACConfig {
30 int32_t currentRateBitPerSec;
31 int16_t currentFrameSizeMsec;
32 uint32_t maxRateBitPerSec;
33 int16_t maxPayloadSizeByte;
35 uint32_t initRateBitPerSec;
36 int16_t initFrameSizeInMsec;
37 bool enforceFrameSize;
40 class ISACTest : public ACMTest {
42 explicit ISACTest(int testMode);
51 void EncodeDecode(int testNr, ACMTestISACConfig& wbISACConfig,
52 ACMTestISACConfig& swbISACConfig);
54 void SwitchingSamplingRate(int testNr, int maxSampRateChange);
56 scoped_ptr<AudioCodingModule> _acmA;
57 scoped_ptr<AudioCodingModule> _acmB;
59 scoped_ptr<Channel> _channel_A2B;
60 scoped_ptr<Channel> _channel_B2A;
70 CodecInst _paramISAC16kHz;
71 CodecInst _paramISAC32kHz;
73 std::string file_name_swb_;
75 ACMTestTimer _myTimer;
81 #endif // WEBRTC_MODULES_AUDIO_CODING_MAIN_TEST_ISACTEST_H_