#include "gflags/gflags.h"
#include "testing/gtest/include/gtest/gtest.h"
-#include "webrtc/common.h"
-#include "webrtc/common_types.h"
#include "webrtc/engine_configurations.h"
-#include "webrtc/modules/audio_coding/main/interface/audio_coding_module.h"
#include "webrtc/modules/audio_processing/include/audio_processing.h"
#include "webrtc/system_wrappers/interface/scoped_ptr.h"
#include "webrtc/test/channel_transport/include/channel_transport.h"
#include "webrtc/voice_engine/include/voe_video_sync.h"
#include "webrtc/voice_engine/include/voe_volume_control.h"
-DEFINE_bool(use_acm_version_2, false,
- "If true, we'll run the tests with Audio Coding Module version 2.");
DEFINE_bool(use_log_file, false,
"Output logs to a file; by default they will be printed to stderr.");
printf("Test started \n");
- // TODO(minyue): Remove when the old ACM is removed (latest 2014-04-01).
- Config config;
- config.Set<AudioCodingModuleFactory>(FLAGS_use_acm_version_2 ?
- new NewAudioCodingModuleFactory() :
- new AudioCodingModuleFactory());
- m_voe = VoiceEngine::Create(config);
-
+ m_voe = VoiceEngine::Create();
base1 = VoEBase::GetInterface(m_voe);
codec = VoECodec::GetInterface(m_voe);
apm = VoEAudioProcessing::GetInterface(m_voe);
bool enable_rx_ns = false;
bool typing_detection = false;
bool muted = false;
- bool on_hold = false;
bool opus_stereo = false;
bool experimental_ns_enabled = false;
// Call loop
bool newcall = true;
while (newcall) {
-
-#ifndef WEBRTC_ANDROID
int rd(-1), pd(-1);
res = hardware->GetNumOfRecordingDevices(rd);
VALIDATE;
printf("Setting sound devices \n");
res = hardware->SetRecordingDevice(rd);
VALIDATE;
-#endif // WEBRTC_ANDROID
res = codec->SetVADStatus(0, enable_cng);
VALIDATE;
VALIDATE;
}
-#ifndef WEBRTC_ANDROID
printf("Getting mic volume \n");
unsigned int vol = 999;
res = volume->GetMicVolume(vol);
if ((vol > 255) || (vol < 1)) {
printf("\n****ERROR in GetMicVolume");
}
-#endif
int forever = 1;
while (forever) {
else
printf("\n Microphone is no longer on mute! \n");
} else if (option_selection == option_index++) {
- // Toggle the call on hold
- OnHoldModes mode;
- res = base1->GetOnHoldStatus(chan, on_hold, mode);
- VALIDATE;
- on_hold = !on_hold;
- mode = kHoldSendAndPlay;
- res = base1->SetOnHoldStatus(chan, on_hold, mode);
- VALIDATE;
- if (on_hold)
- printf("\n Call now on hold! \n");
- else
- printf("\n Call now not on hold! \n");
- } else if (option_selection == option_index++) {
// Get the last error code and print to screen
int err_code = 0;
err_code = base1->LastError();