VoE: Remove unused interfaces
BUG=4690
I have removed methods in VoE interfaces that were marked to be removed. I have removed them also in fake and mock implementations. I have also updated the callers in various ways:
1. Project win_test had some calls to the removed methods, but it turned out that the project is not used anymore, so I removed it entirely.
2. There were some calls to removed methods in jni methods. I have removed couple of jni methods as now they seem to do nothing.
3. With the remaining callers I just removed the calls to removed methods.
R=pbos@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/53519004
Cr-Commit-Position: refs/heads/master@{#9281}
diff --git a/talk/media/webrtc/fakewebrtcvoiceengine.h b/talk/media/webrtc/fakewebrtcvoiceengine.h
index 910889f..673e3e0 100644
--- a/talk/media/webrtc/fakewebrtcvoiceengine.h
+++ b/talk/media/webrtc/fakewebrtcvoiceengine.h
@@ -512,8 +512,6 @@
}
WEBRTC_STUB(GetVersion, (char version[1024]));
WEBRTC_STUB(LastError, ());
- WEBRTC_STUB(SetOnHoldStatus, (int, bool, webrtc::OnHoldModes));
- WEBRTC_STUB(GetOnHoldStatus, (int, bool&, webrtc::OnHoldModes&));
WEBRTC_FUNC(AssociateSendChannel, (int channel,
int accociate_send_channel)) {
WEBRTC_CHECK_CHANNEL(channel);
@@ -577,14 +575,6 @@
}
return -1;
}
- WEBRTC_STUB(SetAMREncFormat, (int channel, webrtc::AmrMode mode));
- WEBRTC_STUB(SetAMRDecFormat, (int channel, webrtc::AmrMode mode));
- WEBRTC_STUB(SetAMRWbEncFormat, (int channel, webrtc::AmrMode mode));
- WEBRTC_STUB(SetAMRWbDecFormat, (int channel, webrtc::AmrMode mode));
- WEBRTC_STUB(SetISACInitTargetRate, (int channel, int rateBps,
- bool useFixedFrameSize));
- WEBRTC_STUB(SetISACMaxRate, (int channel, int rateBps));
- WEBRTC_STUB(SetISACMaxPayloadSize, (int channel, int sizeBytes));
WEBRTC_FUNC(SetRecPayloadType, (int channel,
const webrtc::CodecInst& codec)) {
WEBRTC_CHECK_CHANNEL(channel);
@@ -722,9 +712,6 @@
dtmf_info_.dtmf_length_ms = length_ms;
return 0;
}
- WEBRTC_STUB(StartPlayingDtmfTone,
- (int eventCode, int attenuationDb = 10));
- WEBRTC_STUB(StopPlayingDtmfTone, ());
// webrtc::VoEFile
WEBRTC_FUNC(StartPlayingFileLocally, (int channel, const char* fileNameUTF8,
@@ -752,7 +739,6 @@
WEBRTC_CHECK_CHANNEL(channel);
return (channels_[channel]->file) ? 1 : 0;
}
- WEBRTC_STUB(ScaleLocalFilePlayout, (int channel, float scale));
WEBRTC_STUB(StartPlayingFileAsMicrophone, (int channel,
const char* fileNameUTF8,
bool loop,
@@ -766,7 +752,6 @@
float volumeScaling));
WEBRTC_STUB(StopPlayingFileAsMicrophone, (int channel));
WEBRTC_STUB(IsPlayingFileAsMicrophone, (int channel));
- WEBRTC_STUB(ScaleFileAsMicrophonePlayout, (int channel, float scale));
WEBRTC_STUB(StartRecordingPlayout, (int channel, const char* fileNameUTF8,
webrtc::CodecInst* compression,
int maxSizeBytes));
@@ -797,30 +782,8 @@
recording_microphone_ = false;
return 0;
}
- WEBRTC_STUB(ConvertPCMToWAV, (const char* fileNameInUTF8,
- const char* fileNameOutUTF8));
- WEBRTC_STUB(ConvertPCMToWAV, (webrtc::InStream* streamIn,
- webrtc::OutStream* streamOut));
- WEBRTC_STUB(ConvertWAVToPCM, (const char* fileNameInUTF8,
- const char* fileNameOutUTF8));
- WEBRTC_STUB(ConvertWAVToPCM, (webrtc::InStream* streamIn,
- webrtc::OutStream* streamOut));
- WEBRTC_STUB(ConvertPCMToCompressed, (const char* fileNameInUTF8,
- const char* fileNameOutUTF8,
- webrtc::CodecInst* compression));
- WEBRTC_STUB(ConvertPCMToCompressed, (webrtc::InStream* streamIn,
- webrtc::OutStream* streamOut,
- webrtc::CodecInst* compression));
- WEBRTC_STUB(ConvertCompressedToPCM, (const char* fileNameInUTF8,
- const char* fileNameOutUTF8));
- WEBRTC_STUB(ConvertCompressedToPCM, (webrtc::InStream* streamIn,
- webrtc::OutStream* streamOut));
- WEBRTC_STUB(GetFileDuration, (const char* fileNameUTF8, int& durationMs,
- webrtc::FileFormats format));
- WEBRTC_STUB(GetPlaybackPosition, (int channel, int& positionMs));
// webrtc::VoEHardware
- WEBRTC_STUB(GetCPULoad, (int&));
WEBRTC_FUNC(GetNumOfRecordingDevices, (int& num)) {
return GetNumDevices(num);
}
@@ -837,12 +800,6 @@
WEBRTC_STUB(SetPlayoutDevice, (int));
WEBRTC_STUB(SetAudioDeviceLayer, (webrtc::AudioLayers));
WEBRTC_STUB(GetAudioDeviceLayer, (webrtc::AudioLayers&));
- WEBRTC_STUB(GetPlayoutDeviceStatus, (bool&));
- WEBRTC_STUB(GetRecordingDeviceStatus, (bool&));
- WEBRTC_STUB(ResetAudioDevice, ());
- WEBRTC_STUB(AudioDeviceControl, (unsigned int, unsigned int, unsigned int));
- WEBRTC_STUB(SetLoudspeakerStatus, (bool enable));
- WEBRTC_STUB(GetLoudspeakerStatus, (bool& enabled));
WEBRTC_FUNC(SetRecordingSampleRate, (unsigned int samples_per_sec)) {
recording_sample_rate_ = samples_per_sec;
return 0;
@@ -860,7 +817,6 @@
return 0;
}
WEBRTC_STUB(EnableBuiltInAEC, (bool enable));
- virtual bool BuiltInAECIsEnabled() const { return true; }
virtual bool BuiltInAECIsAvailable() const { return false; }
// webrtc::VoENetEqStats
@@ -912,9 +868,6 @@
size_t length));
// webrtc::VoERTP_RTCP
- WEBRTC_STUB(RegisterRTPObserver, (int channel,
- webrtc::VoERTPObserver& observer));
- WEBRTC_STUB(DeRegisterRTPObserver, (int channel));
WEBRTC_FUNC(SetLocalSSRC, (int channel, unsigned int ssrc)) {
WEBRTC_CHECK_CHANNEL(channel);
channels_[channel]->send_ssrc = ssrc;
@@ -955,7 +908,6 @@
return 0;
}
- WEBRTC_STUB(GetRemoteCSRCs, (int channel, unsigned int arrCSRC[15]));
WEBRTC_STUB(SetRTCPStatus, (int channel, bool enable));
WEBRTC_STUB(GetRTCPStatus, (int channel, bool& enabled));
WEBRTC_STUB(SetRTCP_CNAME, (int channel, const char cname[256]));
@@ -967,8 +919,6 @@
unsigned int& playoutTimestamp,
unsigned int* jitter,
unsigned short* fractionLost));
- WEBRTC_STUB(GetRemoteRTCPSenderInfo, (int channel,
- webrtc::SenderInfo* sender_info));
WEBRTC_FUNC(GetRemoteRTCPReportBlocks,
(int channel, std::vector<webrtc::ReportBlock>* receive_blocks)) {
WEBRTC_CHECK_CHANNEL(channel);
@@ -986,11 +936,6 @@
}
return 0;
}
- WEBRTC_STUB(SendApplicationDefinedRTCPPacket, (int channel,
- unsigned char subType,
- unsigned int name,
- const char* data,
- unsigned short dataLength));
WEBRTC_STUB(GetRTPStatistics, (int channel, unsigned int& averageJitterMs,
unsigned int& maxJitterMs,
unsigned int& discardedPackets));
@@ -1035,11 +980,6 @@
channels_[channel]->nack_max_packets = maxNoPackets;
return 0;
}
- WEBRTC_STUB(InsertExtraRTPPacket, (int channel, unsigned char payloadType,
- bool markerBit, const char* payloadData,
- unsigned short payloadSize));
- WEBRTC_STUB(GetLastRemoteTimeStamp, (int channel,
- uint32_t* lastRemoteTimeStamp));
// webrtc::VoEVideoSync
WEBRTC_STUB(GetPlayoutBufferSize, (int& bufferMs));
@@ -1056,14 +996,10 @@
// webrtc::VoEVolumeControl
WEBRTC_STUB(SetSpeakerVolume, (unsigned int));
WEBRTC_STUB(GetSpeakerVolume, (unsigned int&));
- WEBRTC_STUB(SetSystemOutputMute, (bool));
- WEBRTC_STUB(GetSystemOutputMute, (bool&));
WEBRTC_STUB(SetMicVolume, (unsigned int));
WEBRTC_STUB(GetMicVolume, (unsigned int&));
WEBRTC_STUB(SetInputMute, (int, bool));
WEBRTC_STUB(GetInputMute, (int, bool&));
- WEBRTC_STUB(SetSystemInputMute, (bool));
- WEBRTC_STUB(GetSystemInputMute, (bool&));
WEBRTC_STUB(GetSpeechInputLevel, (unsigned int&));
WEBRTC_STUB(GetSpeechOutputLevel, (int, unsigned int&));
WEBRTC_STUB(GetSpeechInputLevelFullRange, (unsigned int&));
@@ -1249,14 +1185,6 @@
media_processor_ = NULL;
return 0;
}
- WEBRTC_STUB(SetExternalRecordingStatus, (bool enable));
- WEBRTC_STUB(SetExternalPlayoutStatus, (bool enable));
- WEBRTC_STUB(ExternalRecordingInsertData,
- (const int16_t speechData10ms[], int lengthSamples,
- int samplingFreqHz, int current_delay_ms));
- WEBRTC_STUB(ExternalPlayoutGetData,
- (int16_t speechData10ms[], int samplingFreqHz,
- int current_delay_ms, int& lengthSamples));
WEBRTC_STUB(GetAudioFrame, (int channel, int desired_sample_rate_hz,
webrtc::AudioFrame* frame));
WEBRTC_STUB(SetExternalMixing, (int channel, bool enable));
diff --git a/webrtc/examples/android/media_demo/jni/voice_engine_jni.cc b/webrtc/examples/android/media_demo/jni/voice_engine_jni.cc
index bb5eeed..79d6cbc 100644
--- a/webrtc/examples/android/media_demo/jni/voice_engine_jni.cc
+++ b/webrtc/examples/android/media_demo/jni/voice_engine_jni.cc
@@ -273,12 +273,6 @@
return voe_data->volume->SetSpeakerVolume(level);
}
-JOWW(jint, VoiceEngine_setLoudspeakerStatus)(JNIEnv* jni, jobject j_voe,
- jboolean enable) {
- VoiceEngineData* voe_data = GetVoiceEngineData(jni, j_voe);
- return voe_data->hardware->SetLoudspeakerStatus(enable);
-}
-
JOWW(jint, VoiceEngine_startPlayingFileLocally)(JNIEnv* jni, jobject j_voe,
jint channel,
jstring j_filename,
diff --git a/webrtc/voice_engine/include/voe_base.h b/webrtc/voice_engine/include/voe_base.h
index 1d8c7f4..c82ad3d 100644
--- a/webrtc/voice_engine/include/voe_base.h
+++ b/webrtc/voice_engine/include/voe_base.h
@@ -181,18 +181,7 @@
// Used for obtaining RTT for a receive-only channel.
// One should be careful not to crate a circular association, e.g.,
// 1 <- 2 <- 1.
- virtual int AssociateSendChannel(int channel, int accociate_send_channel) =
- 0;
-
- // To be removed. Don't use.
- virtual int SetOnHoldStatus(int channel,
- bool enable,
- OnHoldModes mode = kHoldSendAndPlay) {
- return -1;
- }
- virtual int GetOnHoldStatus(int channel, bool& enabled, OnHoldModes& mode) {
- return -1;
- }
+ virtual int AssociateSendChannel(int channel, int accociate_send_channel) = 0;
protected:
VoEBase() {}
diff --git a/webrtc/voice_engine/include/voe_codec.h b/webrtc/voice_engine/include/voe_codec.h
index dc3b88c..5d94ac2 100644
--- a/webrtc/voice_engine/include/voe_codec.h
+++ b/webrtc/voice_engine/include/voe_codec.h
@@ -131,19 +131,6 @@
// success, and -1 if failed.
virtual int SetOpusDtx(int channel, bool enable_dtx) = 0;
- // Don't use. To be removed.
- virtual int SetAMREncFormat(int channel, AmrMode mode) { return -1; }
- virtual int SetAMRDecFormat(int channel, AmrMode mode) { return -1; }
- virtual int SetAMRWbEncFormat(int channel, AmrMode mode) { return -1; }
- virtual int SetAMRWbDecFormat(int channel, AmrMode mode) { return -1; }
- virtual int SetISACInitTargetRate(int channel,
- int rateBps,
- bool useFixedFrameSize = false) {
- return -1;
- }
- virtual int SetISACMaxRate(int channel, int rateBps) { return -1; }
- virtual int SetISACMaxPayloadSize(int channel, int sizeBytes) { return -1; }
-
protected:
VoECodec() {}
virtual ~VoECodec() {}
diff --git a/webrtc/voice_engine/include/voe_dtmf.h b/webrtc/voice_engine/include/voe_dtmf.h
index 64d758d..c8ef5d0 100644
--- a/webrtc/voice_engine/include/voe_dtmf.h
+++ b/webrtc/voice_engine/include/voe_dtmf.h
@@ -82,12 +82,6 @@
int lengthMs = 200,
int attenuationDb = 10) = 0;
- // To be removed. Don't use.
- virtual int StartPlayingDtmfTone(int eventCode, int attenuationDb = 10) {
- return -1;
- }
- virtual int StopPlayingDtmfTone() { return -1; }
-
protected:
VoEDtmf() {}
virtual ~VoEDtmf() {}
diff --git a/webrtc/voice_engine/include/voe_external_media.h b/webrtc/voice_engine/include/voe_external_media.h
index 48c564b..6185540 100644
--- a/webrtc/voice_engine/include/voe_external_media.h
+++ b/webrtc/voice_engine/include/voe_external_media.h
@@ -75,22 +75,6 @@
// Sets the state of external mixing. Cannot be changed during playback.
virtual int SetExternalMixing(int channel, bool enable) = 0;
- // Don't use. To be removed.
- virtual int SetExternalRecordingStatus(bool enable) { return -1; }
- virtual int SetExternalPlayoutStatus(bool enable) { return -1; }
- virtual int ExternalRecordingInsertData(const int16_t speechData10ms[],
- int lengthSamples,
- int samplingFreqHz,
- int current_delay_ms) {
- return -1;
- }
- virtual int ExternalPlayoutGetData(int16_t speechData10ms[],
- int samplingFreqHz,
- int current_delay_ms,
- int& lengthSamples) {
- return -1;
- }
-
protected:
VoEExternalMedia() {}
virtual ~VoEExternalMedia() {}
diff --git a/webrtc/voice_engine/include/voe_file.h b/webrtc/voice_engine/include/voe_file.h
index e48a535..f3a3a1f 100644
--- a/webrtc/voice_engine/include/voe_file.h
+++ b/webrtc/voice_engine/include/voe_file.h
@@ -134,49 +134,6 @@
// Stops recording the microphone signal.
virtual int StopRecordingMicrophone() = 0;
- // Don't use. To be removed.
- virtual int ScaleLocalFilePlayout(int channel, float scale) { return -1; }
- virtual int ScaleFileAsMicrophonePlayout(int channel, float scale) {
- return -1;
- }
- virtual int GetFileDuration(const char* fileNameUTF8,
- int& durationMs,
- FileFormats format = kFileFormatPcm16kHzFile) {
- return -1;
- }
- virtual int GetPlaybackPosition(int channel, int& positionMs) { return -1; }
- virtual int ConvertPCMToWAV(const char* fileNameInUTF8,
- const char* fileNameOutUTF8) {
- return -1;
- }
- virtual int ConvertPCMToWAV(InStream* streamIn, OutStream* streamOut) {
- return -1;
- }
- virtual int ConvertWAVToPCM(const char* fileNameInUTF8,
- const char* fileNameOutUTF8) {
- return -1;
- }
- virtual int ConvertWAVToPCM(InStream* streamIn, OutStream* streamOut) {
- return -1;
- }
- virtual int ConvertPCMToCompressed(const char* fileNameInUTF8,
- const char* fileNameOutUTF8,
- CodecInst* compression) {
- return -1;
- }
- virtual int ConvertPCMToCompressed(InStream* streamIn,
- OutStream* streamOut,
- CodecInst* compression) {
- return -1;
- }
- virtual int ConvertCompressedToPCM(const char* fileNameInUTF8,
- const char* fileNameOutUTF8) {
- return -1;
- }
- virtual int ConvertCompressedToPCM(InStream* streamIn, OutStream* streamOut) {
- return -1;
- }
-
protected:
VoEFile() {}
virtual ~VoEFile() {}
diff --git a/webrtc/voice_engine/include/voe_hardware.h b/webrtc/voice_engine/include/voe_hardware.h
index 1c6b7fc..a75230c 100644
--- a/webrtc/voice_engine/include/voe_hardware.h
+++ b/webrtc/voice_engine/include/voe_hardware.h
@@ -94,20 +94,6 @@
virtual bool BuiltInAECIsAvailable() const = 0;
virtual int EnableBuiltInAEC(bool enable) = 0;
- // To be removed. Don't use.
- virtual bool BuiltInAECIsEnabled() const { return false; }
- virtual int GetRecordingDeviceStatus(bool& isAvailable) { return -1; }
- virtual int GetPlayoutDeviceStatus(bool& isAvailable) { return -1; }
- virtual int ResetAudioDevice() { return -1; }
- virtual int AudioDeviceControl(unsigned int par1,
- unsigned int par2,
- unsigned int par3) {
- return -1;
- }
- virtual int SetLoudspeakerStatus(bool enable) { return -1; }
- virtual int GetLoudspeakerStatus(bool& enabled) { return -1; }
- virtual int GetCPULoad(int& loadPercent) { return -1; }
-
protected:
VoEHardware() {}
virtual ~VoEHardware() {}
diff --git a/webrtc/voice_engine/include/voe_rtp_rtcp.h b/webrtc/voice_engine/include/voe_rtp_rtcp.h
index ce96581..6d17501 100644
--- a/webrtc/voice_engine/include/voe_rtp_rtcp.h
+++ b/webrtc/voice_engine/include/voe_rtp_rtcp.h
@@ -221,37 +221,6 @@
// If using NACK, NACK should be enabled on both endpoints in a call.
virtual int SetNACKStatus(int channel, bool enable, int maxNoPackets) = 0;
- // Will be removed. Don't use.
- virtual int RegisterRTPObserver(int channel, VoERTPObserver& observer) {
- return -1;
- };
- virtual int DeRegisterRTPObserver(int channel) { return -1; };
- virtual int GetRemoteCSRCs(int channel, unsigned int arrCSRC[15]) {
- return -1;
- };
- virtual int InsertExtraRTPPacket(int channel,
- unsigned char payloadType,
- bool markerBit,
- const char* payloadData,
- unsigned short payloadSize) {
- return -1;
- };
- virtual int GetRemoteRTCPSenderInfo(int channel, SenderInfo* sender_info) {
- return -1;
- };
- virtual int SendApplicationDefinedRTCPPacket(
- int channel,
- unsigned char subType,
- unsigned int name,
- const char* data,
- unsigned short dataLengthInBytes) {
- return -1;
- };
- virtual int GetLastRemoteTimeStamp(int channel,
- uint32_t* lastRemoteTimeStamp) {
- return -1;
- };
-
protected:
VoERTP_RTCP() {}
virtual ~VoERTP_RTCP() {}
diff --git a/webrtc/voice_engine/include/voe_volume_control.h b/webrtc/voice_engine/include/voe_volume_control.h
index 6c0bc0a..240ab93 100644
--- a/webrtc/voice_engine/include/voe_volume_control.h
+++ b/webrtc/voice_engine/include/voe_volume_control.h
@@ -104,12 +104,6 @@
// Gets the current left and right scaling factors.
virtual int GetOutputVolumePan(int channel, float& left, float& right) = 0;
- // Don't use. Will be removed.
- virtual int SetSystemOutputMute(bool enable) { return -1; }
- virtual int GetSystemOutputMute(bool& enabled) { return -1; }
- virtual int SetSystemInputMute(bool enable) { return -1; }
- virtual int GetSystemInputMute(bool& enabled) { return -1; }
-
protected:
VoEVolumeControl(){};
virtual ~VoEVolumeControl(){};
diff --git a/webrtc/voice_engine/mock/fake_voe_external_media.h b/webrtc/voice_engine/mock/fake_voe_external_media.h
index ab7f59a..66554ae 100644
--- a/webrtc/voice_engine/mock/fake_voe_external_media.h
+++ b/webrtc/voice_engine/mock/fake_voe_external_media.h
@@ -35,14 +35,6 @@
callback_map_.erase(type);
return 0;
}
- WEBRTC_STUB(SetExternalRecordingStatus, (bool enable));
- WEBRTC_STUB(SetExternalPlayoutStatus, (bool enable));
- WEBRTC_STUB(ExternalRecordingInsertData,
- (const int16_t speechData10ms[], int lengthSamples,
- int samplingFreqHz, int current_delay_ms));
- WEBRTC_STUB(ExternalPlayoutGetData,
- (int16_t speechData10ms[], int samplingFreqHz,
- int current_delay_ms, int& lengthSamples));
WEBRTC_STUB(GetAudioFrame, (int channel, int desired_sample_rate_hz,
AudioFrame* frame));
WEBRTC_STUB(SetExternalMixing, (int channel, bool enable));
diff --git a/webrtc/voice_engine/mock/mock_voe_volume_control.h b/webrtc/voice_engine/mock/mock_voe_volume_control.h
index 20b0969..3511b2f 100644
--- a/webrtc/voice_engine/mock/mock_voe_volume_control.h
+++ b/webrtc/voice_engine/mock/mock_voe_volume_control.h
@@ -23,14 +23,10 @@
MOCK_METHOD0(Release, int());
MOCK_METHOD1(SetSpeakerVolume, int(unsigned int volume));
MOCK_METHOD1(GetSpeakerVolume, int(unsigned int& volume));
- MOCK_METHOD1(SetSystemOutputMute, int(bool enable));
- MOCK_METHOD1(GetSystemOutputMute, int(bool &enabled));
MOCK_METHOD1(SetMicVolume, int(unsigned int volume));
MOCK_METHOD1(GetMicVolume, int(unsigned int& volume));
MOCK_METHOD2(SetInputMute, int(int channel, bool enable));
MOCK_METHOD2(GetInputMute, int(int channel, bool& enabled));
- MOCK_METHOD1(SetSystemInputMute, int(bool enable));
- MOCK_METHOD1(GetSystemInputMute, int(bool& enabled));
MOCK_METHOD1(GetSpeechInputLevel, int(unsigned int& level));
MOCK_METHOD2(GetSpeechOutputLevel, int(int channel, unsigned int& level));
MOCK_METHOD1(GetSpeechInputLevelFullRange, int(unsigned int& level));
diff --git a/webrtc/voice_engine/test/android/android_test/jni/android_test.cc b/webrtc/voice_engine/test/android/android_test/jni/android_test.cc
index b0a26e0..ef52439 100644
--- a/webrtc/voice_engine/test/android/android_test/jni/android_test.cc
+++ b/webrtc/voice_engine/test/android/android_test/jni/android_test.cc
@@ -221,7 +221,6 @@
__android_log_write(ANDROID_LOG_ERROR, WEBRTC_LOG_TAG,
"set local receiver 2 failed");
}
- veData2.hardware->SetLoudspeakerStatus(false);
veData2.volume->SetSpeakerVolume(204);
veData2.base->StartReceive(0);
if(veData2.base->StartPlayout(0) < 0)
@@ -1115,43 +1114,6 @@
return 0;
}
-/////////////////////////////////////////////
-// [Hardware] Set loudspeaker status
-//
-JNIEXPORT jint JNICALL
-Java_org_webrtc_voiceengine_test_AndroidTest_SetLoudspeakerStatus(
- JNIEnv *,
- jobject,
- jboolean enable)
-{
- VALIDATE_HARDWARE_POINTER;
- if (veData1.hardware->SetLoudspeakerStatus(enable) != 0)
- {
- return -1;
- }
-
- /*VALIDATE_RTP_RTCP_POINTER;
-
- if (veData1.rtp_rtcp->SetREDStatus(0, enable, -1) != 0)
- {
- __android_log_write(ANDROID_LOG_ERROR, WEBRTC_LOG_TAG,
- "Could not set RED");
- return -1;
- }
- else if(enable)
- {
- __android_log_write(ANDROID_LOG_ERROR, WEBRTC_LOG_TAG,
- "Could enable RED");
- }
- else
- {
- __android_log_write(ANDROID_LOG_ERROR, WEBRTC_LOG_TAG,
- "Could disable RED");
- }*/
-
- return 0;
-}
-
//////////////////////////////////////////////////////////////////
// "Local" functions (i.e. not Java accessible)
//////////////////////////////////////////////////////////////////
diff --git a/webrtc/voice_engine/test/android/android_test/jni/org_webrtc_voiceengine_test_AndroidTest.h b/webrtc/voice_engine/test/android/android_test/jni/org_webrtc_voiceengine_test_AndroidTest.h
index 60fe839..34d408a 100644
--- a/webrtc/voice_engine/test/android/android_test/jni/org_webrtc_voiceengine_test_AndroidTest.h
+++ b/webrtc/voice_engine/test/android/android_test/jni/org_webrtc_voiceengine_test_AndroidTest.h
@@ -239,14 +239,6 @@
JNIEXPORT jint JNICALL Java_org_webrtc_voiceengine_test_AndroidTest_SetSpeakerVolume
(JNIEnv *, jobject, jint);
-/*
- * Class: org_webrtc_voiceengine_test_AndroidTest
- * Method: SetLoudspeakerStatus
- * Signature: (Z)I
- */
-JNIEXPORT jint JNICALL Java_org_webrtc_voiceengine_test_AndroidTest_SetLoudspeakerStatus
- (JNIEnv *, jobject, jboolean);
-
#ifdef __cplusplus
}
#endif
diff --git a/webrtc/voice_engine/test/auto_test/fixtures/after_initialization_fixture.cc b/webrtc/voice_engine/test/auto_test/fixtures/after_initialization_fixture.cc
index c54d289..efdf633 100644
--- a/webrtc/voice_engine/test/auto_test/fixtures/after_initialization_fixture.cc
+++ b/webrtc/voice_engine/test/auto_test/fixtures/after_initialization_fixture.cc
@@ -28,11 +28,6 @@
webrtc::AudioProcessing* audioproc = webrtc::AudioProcessing::Create(config);
EXPECT_EQ(0, voe_base_->Init(NULL, audioproc));
-
-#if defined(WEBRTC_ANDROID)
- EXPECT_EQ(0, voe_hardware_->SetLoudspeakerStatus(false));
-#endif
-
EXPECT_EQ(0, voe_base_->RegisterVoiceEngineObserver(*error_observer_));
}
diff --git a/webrtc/voice_engine/test/auto_test/standard/hardware_before_streaming_test.cc b/webrtc/voice_engine/test/auto_test/standard/hardware_before_streaming_test.cc
index 26c949d..a5c13b4 100644
--- a/webrtc/voice_engine/test/auto_test/standard/hardware_before_streaming_test.cc
+++ b/webrtc/voice_engine/test/auto_test/standard/hardware_before_streaming_test.cc
@@ -25,14 +25,6 @@
EXPECT_EQ(VE_ALREADY_INITED, voe_base_->LastError());
}
-// Tests that only apply to mobile:
-
-#ifdef WEBRTC_IOS
-TEST_F(HardwareBeforeStreamingTest, ResetsAudioDeviceOnIphone) {
- EXPECT_EQ(0, voe_hardware_->ResetAudioDevice());
-}
-#endif
-
// Tests that only apply to desktop:
#if !defined(WEBRTC_IOS) & !defined(WEBRTC_ANDROID)
diff --git a/webrtc/voice_engine/test/win_test/Resource.h b/webrtc/voice_engine/test/win_test/Resource.h
deleted file mode 100644
index cd5f55a..0000000
--- a/webrtc/voice_engine/test/win_test/Resource.h
+++ /dev/null
@@ -1,241 +0,0 @@
-//{{NO_DEPENDENCIES}}
-// Microsoft Visual C++ generated include file.
-// Used by WinTest.rc
-//
-#define IDM_ABOUTBOX 0x0010
-#define IDD_ABOUTBOX 100
-#define IDS_ABOUTBOX 101
-#define IDD_WINTEST_DIALOG 102
-#define IDR_MAINFRAME 128
-#define IDD_DTMF_DIALOG 129
-#define IDC_BUTTON_CREATE_1 1000
-#define IDC_BUTTON_DELETE_1 1001
-#define IDC_EDIT_1 1002
-#define IDC_BUTTON_CREATE_2 1003
-#define IDC_BUTTON_DELETE_2 1004
-#define IDC_EDIT_2 1005
-#define IDC_EDIT_MESSAGE 1006
-#define IDC_BUTTON_START_LISTEN_1 1007
-#define IDC_COMBO_IP_1 1008
-#define IDC_EDIT_TX_PORT_1 1009
-#define IDC_EDIT_RX_PORT_1 1010
-#define IDC_COMBO_CODEC_1 1011
-#define IDC_BUTTON_STOP_LISTEN_1 1012
-#define IDC_STATIC_LISTEN 1013
-#define IDC_BUTTON_START_PLAYOUT_1 1014
-#define IDC_BUTTON_STOP_PLAYOUT_1 1015
-#define IDC_STATIC_PLAY 1016
-#define IDC_BUTTON_START_SEND_1 1017
-#define IDC_BUTTON_STOP_SEND_1 1018
-#define IDC_STATIC_SEND 1019
-#define IDC_COMBO_IP_2 1020
-#define IDC_STATIC_IP 1021
-#define IDC_STATIC_PORTS 1022
-#define IDC_STATIC_CODEC 1023
-#define IDC_STATIC_CHANNEL 1024
-#define IDC_STATIC_ID 1025
-#define IDC_EDIT_TX_PORT_2 1026
-#define IDC_EDIT_RX_PORT_2 1027
-#define IDC_COMBO_CODEC_2 1028
-#define IDC_BUTTON_START_LISTEN_2 1029
-#define IDC_BUTTON_STOP_LISTEN_2 1030
-#define IDC_BUTTON_START_PLAYOUT_2 1031
-#define IDC_BUTTON_STOP_PLAYOUT_2 1032
-#define IDC_BUTTON_START_SEND_2 1033
-#define IDC_BUTTON_STOP_SEND_2 1034
-#define IDC_BUTTON_START_SEND_3 1035
-#define IDC_BUTTON_TEST_1_1 1035
-#define IDC_BUTTON_TEST_1 1035
-#define IDC_EDIT_RESULT 1036
-#define IDC_EDIT_N_FAILS 1037
-#define IDC_STATIC_ERROR 1038
-#define IDC_EDIT_LAST_ERROR 1039
-#define IDC_STATIC_LAST_ERROR 1040
-#define IDC_STATIC_PLAY_FILE 1041
-#define IDC_STATIC_EXTERNAL 1042
-#define IDC_CHECK_EXT_TRANS_1 1043
-#define IDC_CHECK2 1044
-#define IDC_CHECK_PLAY_FILE_IN_1 1044
-#define IDC_CHECK_PLAY_FILE_OUT_1 1045
-#define IDC_CHECK_PLAY_FILE_IN_2 1046
-#define IDC_CHECK_PLAY_FILE_OUT_2 1047
-#define IDC_CHECK_EXT_TRANS_2 1048
-#define IDC_STATIC_ALL_CHANNELS 1049
-#define IDC_CHECK_PLAY_FILE_IN 1050
-#define IDC_CHECK_PLAY_FILE_OUT 1051
-#define IDC_CHECK_EXT_MEDIA_IN_1 1051
-#define IDC_COMBO_REC_DEVICE 1052
-#define IDC_STATIC_REC_DEVICE 1053
-#define IDC_COMBO_PLAY_DEVICE2 1054
-#define IDC_COMBO_PLAY_DEVICE 1054
-#define IDC_STATIC_PLAY_DEVICE 1055
-#define IDC_CHECK_EXT_MEDIA_PLAY_1 1056
-#define IDC_CHECK_EXT_MEDIA_OUT_1 1056
-#define IDC_STATIC_PLAY_FILE2 1057
-#define IDC_SLIDER_INPUT_VOLUME 1058
-#define IDC_STATIC_MIC_VOLUME 1059
-#define IDC_SLIDER_OUTPUT_VOLUME 1060
-#define IDC_STATIC_SPK_VOLUME2 1061
-#define IDC_STATIC_SPK_VOLUME 1061
-#define IDC_CHECK_PLAY_FILE_IN2 1062
-#define IDC_CHECK_AGC 1062
-#define IDC_STATIC_MIC_VOLUME2 1063
-#define IDC_STATIC_AUDIO_LEVEL_IN 1063
-#define IDC_PROGRESS_AUDIO_LEVEL_IN 1064
-#define IDC_CHECK_AGC2 1065
-#define IDC_CHECK_NS 1065
-#define IDC_BUTTON_1 1065
-#define IDC_CHECK_VAD 1066
-#define IDC_CHECK_EXT_MEDIA_IN_2 1066
-#define IDC_BUTTON_2 1066
-#define IDC_CHECK_VAD2 1067
-#define IDC_CHECK_EC 1067
-#define IDC_BUTTON_3 1067
-#define IDC_CHECK_VAD_1 1068
-#define IDC_BUTTON_4 1068
-#define IDC_CHECK_VAD_2 1069
-#define IDC_CHECK_EXT_MEDIA_OUT_2 1069
-#define IDC_BUTTON_5 1069
-#define IDC_CHECK_VAD_3 1070
-#define IDC_BUTTON_6 1070
-#define IDC_CHECK_MUTE_IN 1071
-#define IDC_BUTTON_7 1071
-#define IDC_CHECK_MUTE_IN_1 1072
-#define IDC_BUTTON_8 1072
-#define IDC_CHECK_MUTE_IN_2 1073
-#define IDC_BUTTON_9 1073
-#define IDC_CHECK_SRTP_TX_1 1074
-#define IDC_BUTTON_10 1074
-#define IDC_CHECK_SRTP_RX_1 1075
-#define IDC_BUTTON_11 1075
-#define IDC_STATIC_PLAY_FILE3 1076
-#define IDC_STATIC_SRTP 1076
-#define IDC_BUTTON_12 1076
-#define IDC_CHECK_SRTP_TX_2 1077
-#define IDC_BUTTON_13 1077
-#define IDC_CHECK_SRTP_RX_2 1078
-#define IDC_BUTTON_14 1078
-#define IDC_CHECK_EXT_ENCRYPTION_1 1079
-#define IDC_BUTTON_15 1079
-#define IDC_STATIC_PLAY_FILE4 1080
-#define IDC_BUTTON_16 1080
-#define IDC_CHECK_EXT_ENCRYPTION_2 1081
-#define IDC_BUTTON_17 1081
-#define IDC_BUTTON_DTMF_1 1082
-#define IDC_BUTTON_18 1082
-#define IDC_EDIT_DTMF_EVENT 1083
-#define IDC_CHECK_REC_ 1083
-#define IDC_CHECK_REC_MIC 1083
-#define IDC_STATIC_DTMF_EVENT 1084
-#define IDC_BUTTON_DTMF_2 1084
-#define IDC_STATIC_GROUP_DTMF 1085
-#define IDC_CHECK_CONFERENCE_1 1085
-#define IDC_BUTTON_19 1086
-#define IDC_CHECK_CONFERENCE_2 1086
-#define IDC_BUTTON_20 1087
-#define IDC_CHECK_ON_HOLD_1 1087
-#define IDC_BUTTON_21 1088
-#define IDC_CHECK_ON_HOLD_2 1088
-#define IDC_BUTTON_22 1089
-#define IDC_CHECK_DTMF_PLAYOUT_RX 1089
-#define IDC_CHECK_EXT_MEDIA_IN 1089
-#define IDC_STATIC_PLAYOUT_RX 1090
-#define IDC_EDIT_GET_OUTPUT 1090
-#define IDC_CHECK_DTMF_PLAY_TONE 1091
-#define IDC_STATIC_LAST_ERROR2 1091
-#define IDC_STATIC_GET 1091
-#define IDC_STATIC_PLAY_TONE 1092
-#define IDC_CHECK_EXT_MEDIA_OUT 1092
-#define IDC_CHECK_START_STOP_MODE 1093
-#define IDC_BUTTON_SET_TX_TELEPHONE_PT 1093
-#define IDC_PROGRESS_AUDIO_LEVEL_IN2 1093
-#define IDC_PROGRESS_AUDIO_LEVEL_OUT 1093
-#define IDC_EDIT_EVENT_LENGTH 1094
-#define IDC_EDIT_RX_PORT_3 1094
-#define IDC_EDIT_DELAY_ESTIMATE_1 1094
-#define IDC_STATIC_EVENT_LENGTH 1095
-#define IDC_EDIT_PLAYOUT_BUFFER_SIZE 1095
-#define IDC_STATIC_START_STOP_MODE 1096
-#define IDC_EDIT_EVENT_RX_PT 1096
-#define IDC_CHECK_DELAY_ESTIMATE_1 1096
-#define IDC_EDIT_EVENT_ATTENUATION 1097
-#define IDC_CHECK_AGC_1 1097
-#define IDC_CHECK_EVENT_INBAND 1098
-#define IDC_CHECK_NS_1 1098
-#define IDC_STATIC_EVENT_ATTENUATION 1099
-#define IDC_STATIC_SRTP2 1099
-#define IDC_STATIC_RX_VQE 1099
-#define IDC_EDIT_EVENT_TX_PT 1100
-#define IDC_CHECK_REC_MIC2 1100
-#define IDC_CHECK_REC_CALL 1100
-#define IDC_CHECK_DTMF_FEEDBACK 1101
-#define IDC_CHECK_REC_CALL2 1101
-#define IDC_CHECK_TYPING_DETECTION 1101
-#define IDC_CHECK_START_STOP_MODE2 1102
-#define IDC_CHECK_DIRECT_FEEDBACK 1102
-#define IDC_CHECK_RED 1102
-#define IDC_BUTTON_SET_RX_TELEPHONE_PT_TYPE 1103
-#define IDC_BUTTON_SET_RX_TELEPHONE_PT 1103
-#define IDC_BUTTON_CLEAR_ERROR_CALLBACK 1103
-#define IDC_EDIT_EVENT_CODE 1104
-#define IDC_STATIC_DIRECT_FEEDBACK 1105
-#define IDC_RADIO_SINGLE 1106
-#define IDC_RADIO_MULTI 1107
-#define IDC_RADIO_START_STOP 1108
-#define IDC_STATIC_MODE 1109
-#define IDC_STATIC_EVENT_RX_PT 1110
-#define IDC_STATIC_EVENT_TX_PT 1111
-#define IDC_STATIC_PT 1112
-#define IDC_BUTTON_SEND_TELEPHONE_EVENT 1113
-#define IDC_STATIC_EVENT_CODE 1114
-#define IDC_CHECK_EVENT_DETECTION 1115
-#define IDC_CHECK_DETECT_INBAND 1116
-#define IDC_CHECK_DETECT_OUT_OF_BAND 1117
-#define IDC_STATIC_INBAND_DETECTION 1118
-#define IDC_STATIC_OUT_OF_BAND_DETECTION 1119
-#define IDC_STATIC_EVENT_DETECTION 1120
-#define IDC_STATIC_TELEPHONE_EVENTS 1121
-#define IDC_EDIT_EVENT_CODE2 1122
-#define IDC_EDIT_ON_EVENT 1122
-#define IDC_EDIT_ON_EVENT_OUT_OF_BAND 1122
-#define IDC_STATIC_ON_EVENT 1123
-#define IDC_EDIT_ON_EVENT_INBAND 1123
-#define IDC_STATIC_EVEN 1124
-#define IDC_STATIC_LINE 1125
-#define IDC_LIST_CODEC_1 1128
-#define IDC_EDIT2 1129
-#define IDC_EDIT_CODEC_1 1129
-#define IDC_STATIC_PANNING 1131
-#define IDC_SLIDER_PAN_LEFT 1132
-#define IDC_SLIDER_PAN_RIGHT 1133
-#define IDC_STATIC_LEFT 1134
-#define IDC_STATIC_LEFT2 1135
-#define IDC_STATIC_RIGHT 1135
-#define IDC_BUTTON_VERSION 1136
-#define IDC_STATIC_PLAYOUT_BUFFER 1137
-#define IDC_CHECK_RXVAD 1138
-#define IDC_EDIT1 1139
-#define IDC_EDIT_RXVAD 1139
-#define IDC_STATIC_RX_PORT 1140
-#define IDC_STATIC_RX_PORT2 1141
-#define IDC_EDIT3 1142
-#define IDC_EDIT_AUDIO_LAYER 1142
-#define IDC_EDIT_AUDIO_LAYER2 1143
-#define IDC_EDIT_CPU_LOAD 1143
-#define IDC_STATIC_ERROR_CALLBACK 1144
-#define IDC_EDIT_ERROR_CALLBACK 1145
-#define IDC_EDIT_RX_CODEC_1 1146
-#define IDC_STATIC_BYTES_SENT_TEXT 1147
-#define IDC_EDIT_RTCP_STAT 1147
-#define IDC_EDIT_RTCP_STAT_1 1147
-
-// Next default values for new objects
-//
-#ifdef APSTUDIO_INVOKED
-#ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NEXT_RESOURCE_VALUE 130
-#define _APS_NEXT_COMMAND_VALUE 32771
-#define _APS_NEXT_CONTROL_VALUE 1148
-#define _APS_NEXT_SYMED_VALUE 101
-#endif
-#endif
diff --git a/webrtc/voice_engine/test/win_test/WinTest.aps b/webrtc/voice_engine/test/win_test/WinTest.aps
deleted file mode 100644
index 499db5f..0000000
--- a/webrtc/voice_engine/test/win_test/WinTest.aps
+++ /dev/null
Binary files differ
diff --git a/webrtc/voice_engine/test/win_test/WinTest.cc b/webrtc/voice_engine/test/win_test/WinTest.cc
deleted file mode 100644
index 6b28ba4..0000000
--- a/webrtc/voice_engine/test/win_test/WinTest.cc
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license
- * that can be found in the LICENSE file in the root of the source
- * tree. An additional intellectual property rights grant can be found
- * in the file PATENTS. All contributing project authors may
- * be found in the AUTHORS file in the root of the source tree.
- */
-
-#include "webrtc/voice_engine/test/win_test/WinTest.h"
-#include "webrtc/voice_engine/test/win_test/WinTestDlg.h"
-#include "webrtc/voice_engine/test/win_test/stdafx.h"
-
-#ifdef _DEBUG
-#define new DEBUG_NEW
-#endif
-
-
-// CWinTestApp
-
-BEGIN_MESSAGE_MAP(CWinTestApp, CWinApp)
- ON_COMMAND(ID_HELP, &CWinApp::OnHelp)
-END_MESSAGE_MAP()
-
-
-// CWinTestApp construction
-
-CWinTestApp::CWinTestApp()
-{
-}
-
-
-// The one and only CWinTestApp object
-
-CWinTestApp theApp;
-
-
-// CWinTestApp initialization
-
-BOOL CWinTestApp::InitInstance()
-{
- // InitCommonControlsEx() is required on Windows XP if an application
- // manifest specifies use of ComCtl32.dll version 6 or later to enable
- // visual styles. Otherwise, any window creation will fail.
- INITCOMMONCONTROLSEX InitCtrls;
- InitCtrls.dwSize = sizeof(InitCtrls);
- // Set this to include all the common control classes you want to use
- // in your application.
- InitCtrls.dwICC = ICC_WIN95_CLASSES;
- InitCommonControlsEx(&InitCtrls);
-
- CWinApp::InitInstance();
-
- // Standard initialization
- // If you are not using these features and wish to reduce the size
- // of your final executable, you should remove from the following
- // the specific initialization routines you do not need
- // Change the registry key under which our settings are stored
- SetRegistryKey(_T("Local AppWizard-Generated Applications"));
-
- CWinTestDlg dlg;
- m_pMainWnd = &dlg;
- INT_PTR nResponse = dlg.DoModal();
- if (nResponse == IDOK)
- {
- }
- else if (nResponse == IDCANCEL)
- {
- }
-
- // Since the dialog has been closed, return FALSE so that we exit the
- // application, rather than start the application's message pump.
- return FALSE;
-}
diff --git a/webrtc/voice_engine/test/win_test/WinTest.h b/webrtc/voice_engine/test/win_test/WinTest.h
deleted file mode 100644
index 7320360..0000000
--- a/webrtc/voice_engine/test/win_test/WinTest.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license
- * that can be found in the LICENSE file in the root of the source
- * tree. An additional intellectual property rights grant can be found
- * in the file PATENTS. All contributing project authors may
- * be found in the AUTHORS file in the root of the source tree.
- */
-#ifndef WEBRTC_VOICE_ENGINE_TEST_WIN_TEST_WINTEST_H_
-#define WEBRTC_VOICE_ENGINE_TEST_WIN_TEST_WINTEST_H_
-
-#ifndef __AFXWIN_H__
- #error "include 'stdafx.h' before including this file for PCH"
-#endif
-
-#include "resource.h" // main symbols
-
-
-// CWinTestApp:
-// See WinTest.cpp for the implementation of this class
-//
-
-class CWinTestApp : public CWinApp
-{
-public:
- CWinTestApp();
-
-// Overrides
- public:
- virtual BOOL InitInstance();
-
-// Implementation
-
- DECLARE_MESSAGE_MAP()
-};
-
-extern CWinTestApp theApp;
-
-#endif // WEBRTC_VOICE_ENGINE_TEST_WIN_TEST_WINTEST_H_
diff --git a/webrtc/voice_engine/test/win_test/WinTest.rc b/webrtc/voice_engine/test/win_test/WinTest.rc
deleted file mode 100644
index 240036c..0000000
--- a/webrtc/voice_engine/test/win_test/WinTest.rc
+++ /dev/null
@@ -1,394 +0,0 @@
-// Microsoft Visual C++ generated resource script.
-//
-#include "resource.h"
-
-#define APSTUDIO_READONLY_SYMBOLS
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 2 resource.
-//
-#include "afxres.h"
-
-/////////////////////////////////////////////////////////////////////////////
-#undef APSTUDIO_READONLY_SYMBOLS
-
-/////////////////////////////////////////////////////////////////////////////
-// Swedish resources
-
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_SVE)
-#ifdef _WIN32
-LANGUAGE LANG_SWEDISH, SUBLANG_DEFAULT
-#pragma code_page(1252)
-#endif //_WIN32
-
-#ifdef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// TEXTINCLUDE
-//
-
-1 TEXTINCLUDE
-BEGIN
- "resource.h\0"
-END
-
-2 TEXTINCLUDE
-BEGIN
- "#include ""afxres.h""\r\n"
- "\0"
-END
-
-3 TEXTINCLUDE
-BEGIN
- "#define _AFX_NO_SPLITTER_RESOURCES\r\n"
- "#define _AFX_NO_OLE_RESOURCES\r\n"
- "#define _AFX_NO_TRACKER_RESOURCES\r\n"
- "#define _AFX_NO_PROPERTY_RESOURCES\r\n"
- "\r\n"
- "#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_SVE)\r\n"
- "LANGUAGE 29, 1\r\n"
- "#pragma code_page(1252)\r\n"
- "#include ""res\\WinTest.rc2"" // non-Microsoft Visual C++ edited resources\r\n"
- "#include ""afxres.rc"" // Standard components\r\n"
- "#endif\r\n"
- "\0"
-END
-
-#endif // APSTUDIO_INVOKED
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Icon
-//
-
-// Icon with lowest ID value placed first to ensure application icon
-// remains consistent on all systems.
-IDR_MAINFRAME ICON "res\\WinTest.ico"
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Dialog
-//
-
-IDD_ABOUTBOX DIALOGEX 0, 0, 235, 55
-STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
-CAPTION "About WinTest"
-FONT 8, "MS Shell Dlg", 0, 0, 0x1
-BEGIN
- ICON IDR_MAINFRAME,IDC_STATIC,11,17,20,20
- LTEXT "WinTest Version 1.0",IDC_STATIC,40,10,119,8,SS_NOPREFIX
- LTEXT "Copyright (C) 2010",IDC_STATIC,40,25,119,8
- DEFPUSHBUTTON "OK",IDOK,178,7,50,16,WS_GROUP
-END
-
-IDD_WINTEST_DIALOG DIALOGEX 0, 0, 796, 278
-STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_MINIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
-EXSTYLE WS_EX_APPWINDOW
-CAPTION "WinTest"
-FONT 8, "MS Shell Dlg", 0, 0, 0x1
-BEGIN
- PUSHBUTTON "Create",IDC_BUTTON_CREATE_1,28,24,32,14
- PUSHBUTTON "Delete",IDC_BUTTON_DELETE_1,28,40,32,14
- EDITTEXT IDC_EDIT_1,6,32,18,14,ES_AUTOHSCROLL | ES_READONLY
- PUSHBUTTON "Create",IDC_BUTTON_CREATE_2,28,72,32,14
- PUSHBUTTON "Delete",IDC_BUTTON_DELETE_2,28,88,32,14
- EDITTEXT IDC_EDIT_2,6,82,18,14,ES_AUTOHSCROLL | ES_READONLY
- EDITTEXT IDC_EDIT_MESSAGE,28,244,764,12,ES_AUTOHSCROLL
- COMBOBOX IDC_COMBO_IP_1,64,24,76,30,CBS_DROPDOWN | CBS_SORT | WS_VSCROLL | WS_TABSTOP
- EDITTEXT IDC_EDIT_TX_PORT_1,144,24,28,14,ES_AUTOHSCROLL
- EDITTEXT IDC_EDIT_RX_PORT_1,144,40,28,14,ES_AUTOHSCROLL
- COMBOBOX IDC_COMBO_CODEC_1,176,24,76,156,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
- PUSHBUTTON "Start",IDC_BUTTON_START_LISTEN_1,256,24,32,14
- PUSHBUTTON "Stop",IDC_BUTTON_STOP_LISTEN_1,256,40,32,14
- LTEXT "Receive",IDC_STATIC_LISTEN,262,8,26,8
- PUSHBUTTON "Start",IDC_BUTTON_START_PLAYOUT_1,292,24,32,14
- PUSHBUTTON "Stop",IDC_BUTTON_STOP_PLAYOUT_1,292,40,32,14
- LTEXT "Playout",IDC_STATIC_PLAY,295,8,25,8
- PUSHBUTTON "Start",IDC_BUTTON_START_SEND_1,328,24,32,14
- PUSHBUTTON "Stop",IDC_BUTTON_STOP_SEND_1,328,40,32,14
- LTEXT "Send",IDC_STATIC_SEND,335,8,17,8
- COMBOBOX IDC_COMBO_IP_2,64,72,76,30,CBS_DROPDOWN | CBS_SORT | WS_VSCROLL | WS_TABSTOP
- LTEXT "Destination IP address",IDC_STATIC_IP,64,8,73,8
- LTEXT "Ports",IDC_STATIC_PORTS,145,8,18,8
- LTEXT "Codec",IDC_STATIC_CODEC,177,8,21,8
- LTEXT "Channel",IDC_STATIC_CHANNEL,30,8,27,8
- LTEXT "ID",IDC_STATIC_ID,12,8,8,8
- EDITTEXT IDC_EDIT_TX_PORT_2,144,72,28,14,ES_AUTOHSCROLL
- EDITTEXT IDC_EDIT_RX_PORT_2,144,88,28,14,ES_AUTOHSCROLL
- COMBOBOX IDC_COMBO_CODEC_2,176,72,76,156,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
- PUSHBUTTON "Start",IDC_BUTTON_START_LISTEN_2,256,72,32,14
- PUSHBUTTON "Stop",IDC_BUTTON_STOP_LISTEN_2,256,88,32,14
- PUSHBUTTON "Start",IDC_BUTTON_START_PLAYOUT_2,292,72,32,14
- PUSHBUTTON "Stop",IDC_BUTTON_STOP_PLAYOUT_2,292,88,32,14
- PUSHBUTTON "Start",IDC_BUTTON_START_SEND_2,328,72,32,14
- PUSHBUTTON "Stop",IDC_BUTTON_STOP_SEND_2,328,88,32,14
- PUSHBUTTON "TEST 1",IDC_BUTTON_TEST_1,756,224,36,14
- LTEXT "API",IDC_STATIC,4,247,12,8
- EDITTEXT IDC_EDIT_RESULT,28,260,96,12,ES_AUTOHSCROLL
- LTEXT "Result",IDC_STATIC,3,263,21,8
- EDITTEXT IDC_EDIT_N_FAILS,156,260,30,12,ES_AUTOHSCROLL
- LTEXT "#Fails",IDC_STATIC_ERROR,132,263,20,8
- EDITTEXT IDC_EDIT_LAST_ERROR,228,260,36,12,ES_AUTOHSCROLL
- LTEXT "Last Error",IDC_STATIC_LAST_ERROR,192,262,32,8
- LTEXT "Ext. Trans.",IDC_STATIC_EXTERNAL,361,8,37,8
- CONTROL "",IDC_CHECK_EXT_TRANS_1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,371,33,16,10
- CONTROL "In",IDC_CHECK_PLAY_FILE_IN_1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,396,24,36,14,WS_EX_DLGMODALFRAME
- LTEXT "Play File",IDC_STATIC_PLAY_FILE,401,8,27,8
- CONTROL "Out",IDC_CHECK_PLAY_FILE_OUT_1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,396,40,36,14,WS_EX_DLGMODALFRAME
- CONTROL "In",IDC_CHECK_PLAY_FILE_IN_2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,396,72,36,14,WS_EX_DLGMODALFRAME
- CONTROL "Out",IDC_CHECK_PLAY_FILE_OUT_2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,396,88,36,14,WS_EX_DLGMODALFRAME
- CONTROL "",IDC_CHECK_EXT_TRANS_2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,371,82,16,10
- GROUPBOX "",IDC_STATIC_ALL_CHANNELS,6,107,662,113
- CONTROL "PlayFileAsMic",IDC_CHECK_PLAY_FILE_IN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,396,122,60,14,WS_EX_DLGMODALFRAME
- COMBOBOX IDC_COMBO_REC_DEVICE,12,132,184,80,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
- LTEXT "Recording device",IDC_STATIC_REC_DEVICE,12,120,56,8
- COMBOBOX IDC_COMBO_PLAY_DEVICE,12,180,184,80,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
- LTEXT "Playout device",IDC_STATIC_PLAY_DEVICE,12,167,56,8
- CONTROL "In",IDC_CHECK_EXT_MEDIA_IN_1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,436,24,36,14,WS_EX_DLGMODALFRAME
- CONTROL "Out",IDC_CHECK_EXT_MEDIA_OUT_1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,436,40,36,14,WS_EX_DLGMODALFRAME
- LTEXT "Ext. Media",IDC_STATIC_PLAY_FILE2,437,8,35,8
- CONTROL "",IDC_SLIDER_INPUT_VOLUME,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,196,130,72,15
- LTEXT "Microphone Volume",IDC_STATIC_MIC_VOLUME,202,120,62,8
- CONTROL "",IDC_SLIDER_OUTPUT_VOLUME,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,196,179,72,15
- LTEXT "Speaker Volume",IDC_STATIC_SPK_VOLUME,202,167,52,8
- CONTROL "AGC",IDC_CHECK_AGC,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,316,122,36,14,WS_EX_DLGMODALFRAME
- CONTROL "",IDC_PROGRESS_AUDIO_LEVEL_IN,"msctls_progress32",WS_BORDER,268,135,42,6
- LTEXT "Audio Level",IDC_STATIC_AUDIO_LEVEL_IN,271,120,38,8,NOT WS_GROUP
- CONTROL "NS",IDC_CHECK_NS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,316,142,36,14,WS_EX_DLGMODALFRAME
- CONTROL "EC",IDC_CHECK_EC,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,356,122,36,14,WS_EX_DLGMODALFRAME
- CONTROL "VAD",IDC_CHECK_VAD_1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,476,24,36,14,WS_EX_DLGMODALFRAME
- CONTROL "In",IDC_CHECK_EXT_MEDIA_IN_2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,436,72,36,14,WS_EX_DLGMODALFRAME
- CONTROL "Out",IDC_CHECK_EXT_MEDIA_OUT_2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,436,88,36,14,WS_EX_DLGMODALFRAME
- CONTROL "VAD",IDC_CHECK_VAD_3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,476,72,36,14,WS_EX_DLGMODALFRAME
- CONTROL "Mute",IDC_CHECK_MUTE_IN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,356,142,36,14,WS_EX_DLGMODALFRAME
- CONTROL "Mute",IDC_CHECK_MUTE_IN_1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,476,40,36,14,WS_EX_DLGMODALFRAME
- CONTROL "Mute",IDC_CHECK_MUTE_IN_2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,476,88,36,14,WS_EX_DLGMODALFRAME
- CONTROL "TX",IDC_CHECK_SRTP_TX_1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,516,24,36,14,WS_EX_DLGMODALFRAME
- CONTROL "RX",IDC_CHECK_SRTP_RX_1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,516,40,36,14,WS_EX_DLGMODALFRAME
- LTEXT "SRTP",IDC_STATIC_SRTP,525,8,18,8
- CONTROL "TX",IDC_CHECK_SRTP_TX_2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,516,72,36,14,WS_EX_DLGMODALFRAME
- CONTROL "RX",IDC_CHECK_SRTP_RX_2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,516,88,36,14,WS_EX_DLGMODALFRAME
- CONTROL "",IDC_CHECK_EXT_ENCRYPTION_1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,564,33,16,10
- LTEXT "Encrypt",IDC_STATIC_PLAY_FILE4,556,8,26,8
- CONTROL "",IDC_CHECK_EXT_ENCRYPTION_2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,564,82,16,10
- PUSHBUTTON "DTMF>>",IDC_BUTTON_DTMF_1,584,24,36,14
- CONTROL "RecMicToFile",IDC_CHECK_REC_MIC,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,396,142,60,14,WS_EX_DLGMODALFRAME
- PUSHBUTTON "DTMF>>",IDC_BUTTON_DTMF_2,584,72,36,14
- CONTROL "Conf",IDC_CHECK_CONFERENCE_1,"Button",BS_AUTOCHECKBOX | NOT WS_VISIBLE | WS_TABSTOP,584,40,36,14,WS_EX_DLGMODALFRAME
- CONTROL "Conf",IDC_CHECK_CONFERENCE_2,"Button",BS_AUTOCHECKBOX | NOT WS_VISIBLE | WS_TABSTOP,584,88,36,14,WS_EX_DLGMODALFRAME
- CONTROL "Hold",IDC_CHECK_ON_HOLD_1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,708,24,36,14,WS_EX_DLGMODALFRAME
- CONTROL "Hold",IDC_CHECK_ON_HOLD_2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,708,72,36,14,WS_EX_DLGMODALFRAME
- EDITTEXT IDC_EDIT_GET_OUTPUT,292,260,500,12,ES_AUTOHSCROLL
- LTEXT "Get",IDC_STATIC_GET,276,262,12,8
- CONTROL "Ext. Media",IDC_CHECK_EXT_MEDIA_IN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,460,122,52,14,WS_EX_DLGMODALFRAME
- CONTROL "Ext. Media",IDC_CHECK_EXT_MEDIA_OUT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,460,180,52,14,WS_EX_DLGMODALFRAME
- LISTBOX IDC_LIST_CODEC_1,208,40,44,28,LBS_NOINTEGRALHEIGHT | NOT WS_BORDER | WS_VSCROLL | WS_TABSTOP,WS_EX_CLIENTEDGE
- EDITTEXT IDC_EDIT_CODEC_1,176,40,28,14,ES_AUTOHSCROLL
- CONTROL "",IDC_PROGRESS_AUDIO_LEVEL_OUT,"msctls_progress32",WS_BORDER,268,184,42,6
- LTEXT "Panning",IDC_STATIC_PANNING,328,167,26,8
- CONTROL "",IDC_SLIDER_PAN_LEFT,"msctls_trackbar32",TBS_VERT | TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,328,175,12,28
- CONTROL "",IDC_SLIDER_PAN_RIGHT,"msctls_trackbar32",TBS_VERT | TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,344,175,12,28
- LTEXT "L",IDC_STATIC_LEFT,332,200,8,8
- LTEXT "R",IDC_STATIC_RIGHT,347,201,8,8
- PUSHBUTTON "Version",IDC_BUTTON_VERSION,624,200,36,14
- EDITTEXT IDC_EDIT_PLAYOUT_BUFFER_SIZE,363,181,28,12,ES_CENTER | ES_AUTOHSCROLL | ES_READONLY | NOT WS_TABSTOP
- LTEXT "Buffer Size",IDC_STATIC_PLAYOUT_BUFFER,361,167,36,8
- CONTROL "Delay",IDC_CHECK_DELAY_ESTIMATE_1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,624,24,36,14,WS_EX_DLGMODALFRAME
- EDITTEXT IDC_EDIT_DELAY_ESTIMATE_1,631,40,24,14,ES_CENTER | ES_AUTOHSCROLL | ES_READONLY | NOT WS_TABSTOP
- CONTROL "RxVAD",IDC_CHECK_RXVAD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,664,24,40,14,WS_EX_DLGMODALFRAME
- EDITTEXT IDC_EDIT_RXVAD,671,40,24,14,ES_CENTER | ES_AUTOHSCROLL | ES_READONLY
- CONTROL "AGC",IDC_CHECK_AGC_1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,748,24,36,14,WS_EX_DLGMODALFRAME
- CONTROL "NS",IDC_CHECK_NS_1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,748,40,36,14,WS_EX_DLGMODALFRAME
- LTEXT "RX VQE",IDC_STATIC_RX_VQE,753,8,25,8
- CONTROL "RecordCall",IDC_CHECK_REC_CALL,"Button",BS_AUTOCHECKBOX | NOT WS_VISIBLE | WS_TABSTOP,517,156,52,14,WS_EX_DLGMODALFRAME
- LTEXT "RX",IDC_STATIC_RX_PORT,133,42,10,8
- LTEXT "RX",IDC_STATIC_RX_PORT2,133,91,10,8
- CONTROL "TypingDetect",IDC_CHECK_TYPING_DETECTION,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,572,156,60,14,WS_EX_DLGMODALFRAME
- EDITTEXT IDC_EDIT_AUDIO_LAYER,28,224,116,14,ES_AUTOHSCROLL | ES_READONLY
- EDITTEXT IDC_EDIT_CPU_LOAD,152,224,116,14,ES_AUTOHSCROLL | ES_READONLY
- CONTROL "RED",IDC_CHECK_RED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,176,55,28,14,WS_EX_DLGMODALFRAME
- LTEXT "=> Callbacks",IDC_STATIC_ERROR_CALLBACK,283,226,43,8
- EDITTEXT IDC_EDIT_ERROR_CALLBACK,328,224,312,14,ES_AUTOHSCROLL
- PUSHBUTTON "Clear",IDC_BUTTON_CLEAR_ERROR_CALLBACK,644,224,24,14
- EDITTEXT IDC_EDIT_RX_CODEC_1,256,56,216,12,ES_AUTOHSCROLL | ES_READONLY
- EDITTEXT IDC_EDIT_RTCP_STAT_1,476,56,316,12,ES_AUTOHSCROLL | ES_READONLY
-END
-
-IDD_DTMF_DIALOG DIALOGEX 0, 0, 316, 212
-STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
-CAPTION "Telehone Events"
-FONT 8, "MS Shell Dlg", 400, 0, 0x1
-BEGIN
- DEFPUSHBUTTON "OK",IDOK,260,192,50,14
- PUSHBUTTON "1",IDC_BUTTON_1,16,20,16,14
- PUSHBUTTON "2",IDC_BUTTON_2,36,20,16,14
- PUSHBUTTON "3",IDC_BUTTON_3,56,20,16,14
- PUSHBUTTON "4",IDC_BUTTON_4,16,36,16,14
- PUSHBUTTON "5",IDC_BUTTON_5,36,36,16,14
- PUSHBUTTON "6",IDC_BUTTON_6,56,36,16,14
- PUSHBUTTON "7",IDC_BUTTON_7,16,52,16,14
- PUSHBUTTON "8",IDC_BUTTON_8,36,52,16,14
- PUSHBUTTON "9",IDC_BUTTON_9,56,52,16,14
- PUSHBUTTON "*",IDC_BUTTON_10,16,68,16,14
- PUSHBUTTON "0",IDC_BUTTON_11,36,68,16,14
- PUSHBUTTON "#",IDC_BUTTON_12,56,68,16,14
- PUSHBUTTON "A",IDC_BUTTON_13,76,20,16,14
- PUSHBUTTON "B",IDC_BUTTON_14,76,36,16,14
- PUSHBUTTON "C",IDC_BUTTON_15,76,52,16,14
- PUSHBUTTON "D",IDC_BUTTON_16,76,68,16,14
- EDITTEXT IDC_EDIT_DTMF_EVENT,56,90,16,12,ES_AUTOHSCROLL | ES_READONLY
- LTEXT "Event code",IDC_STATIC_DTMF_EVENT,17,91,37,8
- PUSHBUTTON "1",IDC_BUTTON_17,16,20,16,14
- PUSHBUTTON "2",IDC_BUTTON_18,36,20,16,14
- PUSHBUTTON "3",IDC_BUTTON_19,56,20,16,14
- PUSHBUTTON "4",IDC_BUTTON_20,16,36,16,14
- PUSHBUTTON "A",IDC_BUTTON_21,76,20,16,14
- GROUPBOX "DTMF Events",IDC_STATIC_GROUP_DTMF,4,4,188,132
- CONTROL "",IDC_CHECK_DTMF_PLAYOUT_RX,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,160,21,12,14
- LTEXT "Play out-band RX",IDC_STATIC_PLAYOUT_RX,101,24,56,8
- CONTROL "",IDC_CHECK_DTMF_PLAY_TONE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,160,39,12,14
- LTEXT "Play tone locally",IDC_STATIC_PLAY_TONE,101,41,52,8
- EDITTEXT IDC_EDIT_EVENT_LENGTH,44,163,28,14,ES_AUTOHSCROLL
- LTEXT "Duration",IDC_STATIC_EVENT_LENGTH,12,165,28,8
- EDITTEXT IDC_EDIT_EVENT_ATTENUATION,44,183,28,14,ES_AUTOHSCROLL
- LTEXT "Volume",IDC_STATIC_EVENT_ATTENUATION,12,186,24,8
- CONTROL "Inband",IDC_CHECK_EVENT_INBAND,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,84,163,40,14,WS_EX_DLGMODALFRAME
- CONTROL "Feedback",IDC_CHECK_DTMF_FEEDBACK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,112,48,14,WS_EX_DLGMODALFRAME
- CONTROL "",IDC_CHECK_DIRECT_FEEDBACK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,96,112,12,14
- LTEXT "Direct",IDC_STATIC_DIRECT_FEEDBACK,72,115,20,8
- CONTROL "Single",IDC_RADIO_SINGLE,"Button",BS_AUTORADIOBUTTON | WS_GROUP,112,68,35,10
- CONTROL "Sequence",IDC_RADIO_MULTI,"Button",BS_AUTORADIOBUTTON,112,80,47,10
- CONTROL "Start/Stop",IDC_RADIO_START_STOP,"Button",BS_AUTORADIOBUTTON,112,92,49,10
- GROUPBOX "Mode",IDC_STATIC_MODE,100,56,68,52
- EDITTEXT IDC_EDIT_EVENT_RX_PT,220,20,24,14,ES_AUTOHSCROLL
- EDITTEXT IDC_EDIT_EVENT_TX_PT,220,41,24,14,ES_AUTOHSCROLL
- LTEXT "RX",IDC_STATIC_EVENT_RX_PT,208,22,10,8
- LTEXT "TX",IDC_STATIC_EVENT_TX_PT,208,42,9,8
- PUSHBUTTON "Set",IDC_BUTTON_SET_TX_TELEPHONE_PT,248,41,24,14
- PUSHBUTTON "Set",IDC_BUTTON_SET_RX_TELEPHONE_PT,248,20,24,14
- GROUPBOX "Payload Type",IDC_STATIC_PT,200,4,80,56
- EDITTEXT IDC_EDIT_EVENT_CODE,128,163,28,14,ES_AUTOHSCROLL
- LTEXT "Event code",IDC_STATIC_EVENT_CODE,125,152,37,8
- PUSHBUTTON "Send",IDC_BUTTON_SEND_TELEPHONE_EVENT,160,163,24,14
- CONTROL "On/Off",IDC_CHECK_EVENT_DETECTION,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,208,80,40,14,WS_EX_DLGMODALFRAME
- CONTROL "",IDC_CHECK_DETECT_INBAND,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,208,100,12,14
- CONTROL "",IDC_CHECK_DETECT_OUT_OF_BAND,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,208,116,12,14
- LTEXT "Inband",IDC_STATIC_INBAND_DETECTION,220,103,24,8
- LTEXT "Outband",IDC_STATIC_OUT_OF_BAND_DETECTION,220,120,29,8
- GROUPBOX "Event Detection",IDC_STATIC_EVENT_DETECTION,200,68,108,68
- GROUPBOX "Telephone Events",IDC_STATIC_TELEPHONE_EVENTS,4,140,188,64
- EDITTEXT IDC_EDIT_ON_EVENT_OUT_OF_BAND,252,117,48,14,ES_AUTOHSCROLL
- EDITTEXT IDC_EDIT_ON_EVENT_INBAND,252,101,48,14,ES_AUTOHSCROLL
- LTEXT "=> Detections",IDC_STATIC_EVEN,253,90,48,8
-END
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Version
-//
-
-VS_VERSION_INFO VERSIONINFO
- FILEVERSION 1,0,0,0
- PRODUCTVERSION 1,0,0,0
- FILEFLAGSMASK 0x3fL
-#ifdef _DEBUG
- FILEFLAGS 0x1L
-#else
- FILEFLAGS 0x0L
-#endif
- FILEOS 0x4L
- FILETYPE 0x1L
- FILESUBTYPE 0x0L
-BEGIN
- BLOCK "StringFileInfo"
- BEGIN
- BLOCK "040904e4"
- BEGIN
- VALUE "FileDescription", "WebRTC VoiceEngine Test"
- VALUE "FileVersion", "1.0.0.0"
- VALUE "InternalName", "WinTest.exe"
- VALUE "LegalCopyright", "Copyright (c) 2011 The WebRTC project authors. All Rights Reserved."
- VALUE "OriginalFilename", "WinTest.exe"
- VALUE "ProductName", "WebRTC VoiceEngine"
- VALUE "ProductVersion", "1.0.0.0"
- END
- END
- BLOCK "VarFileInfo"
- BEGIN
- VALUE "Translation", 0x409, 1252
- END
-END
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// DESIGNINFO
-//
-
-#ifdef APSTUDIO_INVOKED
-GUIDELINES DESIGNINFO
-BEGIN
- IDD_ABOUTBOX, DIALOG
- BEGIN
- LEFTMARGIN, 7
- RIGHTMARGIN, 228
- TOPMARGIN, 7
- BOTTOMMARGIN, 48
- END
-
- IDD_WINTEST_DIALOG, DIALOG
- BEGIN
- LEFTMARGIN, 7
- RIGHTMARGIN, 789
- TOPMARGIN, 7
- BOTTOMMARGIN, 271
- END
-
- IDD_DTMF_DIALOG, DIALOG
- BEGIN
- LEFTMARGIN, 7
- RIGHTMARGIN, 309
- TOPMARGIN, 7
- BOTTOMMARGIN, 205
- END
-END
-#endif // APSTUDIO_INVOKED
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// String Table
-//
-
-STRINGTABLE
-BEGIN
- IDS_ABOUTBOX "&About WinTest..."
-END
-
-#endif // Swedish resources
-/////////////////////////////////////////////////////////////////////////////
-
-
-
-#ifndef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 3 resource.
-//
-#define _AFX_NO_SPLITTER_RESOURCES
-#define _AFX_NO_OLE_RESOURCES
-#define _AFX_NO_TRACKER_RESOURCES
-#define _AFX_NO_PROPERTY_RESOURCES
-
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_SVE)
-LANGUAGE 29, 1
-#pragma code_page(1252)
-#include "res\WinTest.rc2" // non-Microsoft Visual C++ edited resources
-#include "afxres.rc" // Standard components
-#endif
-
-/////////////////////////////////////////////////////////////////////////////
-#endif // not APSTUDIO_INVOKED
-
diff --git a/webrtc/voice_engine/test/win_test/WinTestDlg.cc b/webrtc/voice_engine/test/win_test/WinTestDlg.cc
deleted file mode 100644
index 4436a86..0000000
--- a/webrtc/voice_engine/test/win_test/WinTestDlg.cc
+++ /dev/null
@@ -1,3367 +0,0 @@
-/*
- * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license
- * that can be found in the LICENSE file in the root of the source
- * tree. An additional intellectual property rights grant can be found
- * in the file PATENTS. All contributing project authors may
- * be found in the AUTHORS file in the root of the source tree.
- */
-
-#include <math.h>
-#include "webrtc/test/testsupport/fileutils.h"
-#include "webrtc/voice_engine/test/win_test/WinTest.h"
-#include "webrtc/voice_engine/test/win_test/WinTestDlg.h"
-#include "webrtc/voice_engine/test/win_test/stdafx.h"
-
-#ifdef _DEBUG
-#define new DEBUG_NEW
-#endif
-
-using namespace webrtc;
-
-unsigned char key[30] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
-
-// Hack to convert char to TCHAR, using two buffers to be able to
-// call twice in the same statement
-TCHAR convertTemp1[256] = {0};
-TCHAR convertTemp2[256] = {0};
-bool convertBufferSwitch(false);
-TCHAR* CharToTchar(const char* str, int len)
-{
-#ifdef _UNICODE
- TCHAR* temp = convertBufferSwitch ? convertTemp1 : convertTemp2;
- convertBufferSwitch = !convertBufferSwitch;
- memset(temp, 0, sizeof(convertTemp1));
- MultiByteToWideChar(CP_UTF8, 0, str, len, temp, 256);
- return temp;
-#else
- return str;
-#endif
-}
-
-// Hack to convert TCHAR to char
-char convertTemp3[256] = {0};
-char* TcharToChar(TCHAR* str, int len)
-{
-#ifdef _UNICODE
- memset(convertTemp3, 0, sizeof(convertTemp3));
- WideCharToMultiByte(CP_UTF8, 0, str, len, convertTemp3, 256, 0, 0);
- return convertTemp3;
-#else
- return str;
-#endif
-}
-
-// ----------------------------------------------------------------------------
-// VoiceEngineObserver
-// ----------------------------------------------------------------------------
-
-void CWinTestDlg::CallbackOnError(int channel, int errCode)
-{
- _nErrorCallbacks++;
-
- CString str;
- str.Format(_T("[#%d] CallbackOnError(channel=%d) => errCode = %d"), _nErrorCallbacks, channel, errCode);
- if (errCode == VE_RECEIVE_PACKET_TIMEOUT)
- {
- str += _T(" <=> VE_RECEIVE_PACKET_TIMEOUT");
- }
- else if (errCode == VE_PACKET_RECEIPT_RESTARTED)
- {
- str += _T(" <=> VE_PACKET_RECEIPT_RESTARTED");
- }
- else if (errCode == VE_RUNTIME_PLAY_WARNING)
- {
- str += _T(" <=> VE_RUNTIME_PLAY_WARNING");
- }
- else if (errCode == VE_RUNTIME_REC_WARNING)
- {
- str += _T(" <=> VE_RUNTIME_REC_WARNING");
- }
- else if (errCode == VE_RUNTIME_PLAY_ERROR)
- {
- str += _T(" <=> VE_RUNTIME_PLAY_ERROR");
- }
- else if (errCode == VE_RUNTIME_REC_ERROR)
- {
- str += _T(" <=> VE_RUNTIME_REC_ERROR");
- }
- else if (errCode == VE_SATURATION_WARNING)
- {
- str += _T(" <=> VE_SATURATION_WARNING");
- }
- else if (errCode == VE_TYPING_NOISE_WARNING)
- {
- str += _T(" <=> VE_TYPING_NOISE_WARNING");
- }
- else if (errCode == VE_REC_DEVICE_REMOVED)
- {
- str += _T(" <=> VE_REC_DEVICE_REMOVED");
- }
- // AfxMessageBox((LPCTSTR)str, MB_OK);
- SetDlgItemText(IDC_EDIT_ERROR_CALLBACK, (LPCTSTR)str);
-}
-
-// ----------------------------------------------------------------------------
-// VoERTPObserver
-// ----------------------------------------------------------------------------
-
-void CWinTestDlg::OnIncomingCSRCChanged(int channel, unsigned int CSRC, bool added)
-{
- CString str;
- str.Format(_T("OnIncomingCSRCChanged(channel=%d) => CSRC=%u, added=%d"), channel, CSRC, added);
- SetDlgItemText(IDC_EDIT_ERROR_CALLBACK, (LPCTSTR)str);
-}
-
-void CWinTestDlg::OnIncomingSSRCChanged(int channel, unsigned int SSRC)
-{
- CString str;
- str.Format(_T("OnIncomingSSRCChanged(channel=%d) => SSRC=%u"), channel, SSRC);
- SetDlgItemText(IDC_EDIT_ERROR_CALLBACK, (LPCTSTR)str);
-}
-
-// ----------------------------------------------------------------------------
-// Transport
-// ----------------------------------------------------------------------------
-
-class MyTransport : public Transport
-{
-public:
- MyTransport(VoENetwork* veNetwork);
- int SendPacket(int channel, const void* data, size_t len) override;
- int SendRTCPPacket(int channel, const void* data, size_t len) override;
-
-private:
- VoENetwork* _veNetworkPtr;
-};
-
-MyTransport::MyTransport(VoENetwork* veNetwork) :
- _veNetworkPtr(veNetwork)
-{
-}
-
-int
-MyTransport::SendPacket(int channel, const void *data, size_t len)
-{
- _veNetworkPtr->ReceivedRTPPacket(channel, data, len);
- return len;
-}
-
-int
-MyTransport::SendRTCPPacket(int channel, const void *data, size_t len)
-{
- _veNetworkPtr->ReceivedRTCPPacket(channel, data, len);
- return len;
-}
-
-// ----------------------------------------------------------------------------
-// VoEMediaProcess
-// ----------------------------------------------------------------------------
-
-class MediaProcessImpl : public VoEMediaProcess
-{
-public:
- MediaProcessImpl();
- virtual void Process(int channel,
- ProcessingTypes type,
- int16_t audio_10ms[],
- int length,
- int samplingFreqHz,
- bool stereo);
-};
-
-MediaProcessImpl::MediaProcessImpl()
-{
-}
-
-void MediaProcessImpl::Process(int channel,
- ProcessingTypes type,
- int16_t audio_10ms[],
- int length,
- int samplingFreqHz,
- bool stereo)
-{
- int x = rand() % 100;
-
- for (int i = 0; i < length; i++)
- {
- if (channel == -1)
- {
- if (type == kPlaybackAllChannelsMixed)
- {
- // playout: scale up
- if (!stereo)
- {
- audio_10ms[i] = (audio_10ms[i] << 2);
- }
- else
- {
- audio_10ms[2*i] = (audio_10ms[2*i] << 2);
- audio_10ms[2*i+1] = (audio_10ms[2*i+1] << 2);
- }
- }
- else
- {
- // recording: emulate packet loss by "dropping" 10% of the packets
- if (x >= 0 && x < 10)
- {
- if (!stereo)
- {
- audio_10ms[i] = 0;
- }
- else
- {
- audio_10ms[2*i] = 0;
- audio_10ms[2*i+1] = 0;
- }
- }
- }
- }
- else
- {
- if (type == kPlaybackPerChannel)
- {
- // playout: mute
- if (!stereo)
- {
- audio_10ms[i] = 0;
- }
- else
- {
- audio_10ms[2*i] = 0;
- audio_10ms[2*i+1] = 0;
- }
- }
- else
- {
- // recording: emulate packet loss by "dropping" 50% of the packets
- if (x >= 0 && x < 50)
- {
- if (!stereo)
- {
- audio_10ms[i] = 0;
- }
- else
- {
- audio_10ms[2*i] = 0;
- audio_10ms[2*i+1] = 0;
- }
- }
- }
- }
- }
-}
-
-// ----------------------------------------------------------------------------
-// TelephoneEventObserver
-// ----------------------------------------------------------------------------
-
-class TelephoneEventObserver: public VoETelephoneEventObserver
-{
-public:
- TelephoneEventObserver(CWnd* editControlOut, CWnd* editControlIn);
- virtual void OnReceivedTelephoneEventInband(int channel, int eventCode,
- bool endOfEvent);
- virtual void OnReceivedTelephoneEventOutOfBand(int channel, int eventCode,
- bool endOfEvent);
-private:
- CWnd* _editControlOutPtr;
- CWnd* _editControlInPtr;
-};
-
-TelephoneEventObserver::TelephoneEventObserver(CWnd* editControlOut, CWnd* editControlIn) :
- _editControlOutPtr(editControlOut),
- _editControlInPtr(editControlIn)
-{
-}
-
-void TelephoneEventObserver::OnReceivedTelephoneEventInband(int channel,
- int eventCode,
- bool endOfEvent)
-{
- CString msg;
- if (endOfEvent)
- {
- msg.AppendFormat(_T("%d [END]"), eventCode);
- _editControlInPtr->SetWindowText((LPCTSTR)msg);
- }
- else
- {
- msg.AppendFormat(_T("%d [START]"), eventCode);
- _editControlInPtr->SetWindowText((LPCTSTR)msg);
- }
-}
-
-void TelephoneEventObserver::OnReceivedTelephoneEventOutOfBand(int channel,
- int eventCode,
- bool endOfEvent)
-{
- CString msg;
- if (endOfEvent)
- {
- msg.AppendFormat(_T("%d [END]"), eventCode);
- _editControlOutPtr->SetWindowText((LPCTSTR)msg);
- }
- else
- {
- msg.AppendFormat(_T("%d [START]"), eventCode);
- _editControlOutPtr->SetWindowText((LPCTSTR)msg);
- }
-}
-
-// ----------------------------------------------------------------------------
-// RxVadCallback
-// ----------------------------------------------------------------------------
-
-class RxCallback : public VoERxVadCallback
-{
-public:
- RxCallback() : vad_decision(-1) {};
-
- virtual void OnRxVad(int , int vadDecision)
- {
- vad_decision = vadDecision;
- }
-
- int vad_decision;
-};
-
-// ----------------------------------------------------------------------------
-// CAboutDlg dialog
-// ----------------------------------------------------------------------------
-
-class CAboutDlg : public CDialog
-{
-public:
- CAboutDlg();
-
-// Dialog Data
- enum { IDD = IDD_ABOUTBOX };
-
- protected:
- virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
-
-// Implementation
-protected:
- DECLARE_MESSAGE_MAP()
-};
-
-CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
-{
-}
-
-void CAboutDlg::DoDataExchange(CDataExchange* pDX)
-{
- CDialog::DoDataExchange(pDX);
-}
-
-BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
-END_MESSAGE_MAP()
-
-// ----------------------------------------------------------------------------
-// CTelephonyEvent dialog
-// ----------------------------------------------------------------------------
-
-class CTelephonyEvent : public CDialog
-{
- DECLARE_DYNAMIC(CTelephonyEvent)
-
-public:
- CTelephonyEvent(VoiceEngine* voiceEngine, int channel, CDialog* pParentDialog, CWnd* pParent = NULL); // standard constructor
- virtual ~CTelephonyEvent();
-
-// Dialog Data
- enum { IDD = IDD_DTMF_DIALOG };
-
-protected:
- virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
- virtual BOOL OnInitDialog();
-
- DECLARE_MESSAGE_MAP()
-public:
- afx_msg void OnBnClickedButton1();
- afx_msg void OnBnClickedButton2();
- afx_msg void OnBnClickedButton3();
- afx_msg void OnBnClickedButton4();
- afx_msg void OnBnClickedButton5();
- afx_msg void OnBnClickedButton6();
- afx_msg void OnBnClickedButton7();
- afx_msg void OnBnClickedButton8();
- afx_msg void OnBnClickedButton9();
- afx_msg void OnBnClickedButton10();
- afx_msg void OnBnClickedButton11();
- afx_msg void OnBnClickedButton12();
- afx_msg void OnBnClickedButtonA();
- afx_msg void OnBnClickedButtonB();
- afx_msg void OnBnClickedButtonC();
- afx_msg void OnBnClickedButtonD();
- afx_msg void OnBnClickedCheckDtmfPlayoutRx();
- afx_msg void OnBnClickedCheckDtmfPlayTone();
- afx_msg void OnBnClickedCheckStartStopMode();
- afx_msg void OnBnClickedCheckEventInband();
- afx_msg void OnBnClickedCheckDtmfFeedback();
- afx_msg void OnBnClickedCheckDirectFeedback();
- afx_msg void OnBnClickedRadioSingle();
- afx_msg void OnBnClickedRadioMulti();
- afx_msg void OnBnClickedRadioStartStop();
- afx_msg void OnBnClickedButtonSetRxTelephonePt();
- afx_msg void OnBnClickedButtonSetTxTelephonePt();
- afx_msg void OnBnClickedButtonSendTelephoneEvent();
- afx_msg void OnBnClickedCheckDetectInband();
- afx_msg void OnBnClickedCheckDetectOutOfBand();
- afx_msg void OnBnClickedCheckEventDetection();
-
-private:
- void SendTelephoneEvent(unsigned char eventCode);
-
-private:
- VoiceEngine* _vePtr;
- VoEBase* _veBasePtr;
- VoEDtmf* _veDTMFPtr;
- VoECodec* _veCodecPtr;
- int _channel;
- CString _strMsg;
- CDialog* _parentDialogPtr;
- TelephoneEventObserver* _telephoneEventObserverPtr;
- bool _PlayDtmfToneLocally;
- bool _modeStartStop;
- bool _modeSingle;
- bool _modeSequence;
- bool _playingDTMFTone;
- bool _outOfBandEventDetection;
- bool _inbandEventDetection;
-};
-
-IMPLEMENT_DYNAMIC(CTelephonyEvent, CDialog)
-
-CTelephonyEvent::CTelephonyEvent(VoiceEngine* voiceEngine,
- int channel,
- CDialog* pParentDialog,
- CWnd* pParent /*=NULL*/)
- : _vePtr(voiceEngine),
- _channel(channel),
- _PlayDtmfToneLocally(false),
- _modeStartStop(false),
- _modeSingle(true),
- _modeSequence(false),
- _playingDTMFTone(false),
- _outOfBandEventDetection(true),
- _inbandEventDetection(false),
- _parentDialogPtr(pParentDialog),
- _telephoneEventObserverPtr(NULL),
- CDialog(CTelephonyEvent::IDD, pParent)
-{
- _veBasePtr = VoEBase::GetInterface(_vePtr);
- _veDTMFPtr = VoEDtmf::GetInterface(_vePtr);
- _veCodecPtr = VoECodec::GetInterface(_vePtr);
-}
-
-CTelephonyEvent::~CTelephonyEvent()
-{
- _veDTMFPtr->Release();
- _veCodecPtr->Release();
- _veBasePtr->Release();
-
- if (_telephoneEventObserverPtr)
- {
- _veDTMFPtr->DeRegisterTelephoneEventDetection(_channel);
- delete _telephoneEventObserverPtr;
- _telephoneEventObserverPtr = NULL;
- }
-}
-
-void CTelephonyEvent::DoDataExchange(CDataExchange* pDX)
-{
- CDialog::DoDataExchange(pDX);
-}
-
-
-BEGIN_MESSAGE_MAP(CTelephonyEvent, CDialog)
- ON_BN_CLICKED(IDC_BUTTON_1, &CTelephonyEvent::OnBnClickedButton1)
- ON_BN_CLICKED(IDC_BUTTON_2, &CTelephonyEvent::OnBnClickedButton2)
- ON_BN_CLICKED(IDC_BUTTON_3, &CTelephonyEvent::OnBnClickedButton3)
- ON_BN_CLICKED(IDC_BUTTON_4, &CTelephonyEvent::OnBnClickedButton4)
- ON_BN_CLICKED(IDC_BUTTON_5, &CTelephonyEvent::OnBnClickedButton5)
- ON_BN_CLICKED(IDC_BUTTON_6, &CTelephonyEvent::OnBnClickedButton6)
- ON_BN_CLICKED(IDC_BUTTON_7, &CTelephonyEvent::OnBnClickedButton7)
- ON_BN_CLICKED(IDC_BUTTON_8, &CTelephonyEvent::OnBnClickedButton8)
- ON_BN_CLICKED(IDC_BUTTON_9, &CTelephonyEvent::OnBnClickedButton9)
- ON_BN_CLICKED(IDC_BUTTON_10, &CTelephonyEvent::OnBnClickedButton10)
- ON_BN_CLICKED(IDC_BUTTON_11, &CTelephonyEvent::OnBnClickedButton11)
- ON_BN_CLICKED(IDC_BUTTON_12, &CTelephonyEvent::OnBnClickedButton12)
- ON_BN_CLICKED(IDC_BUTTON_13, &CTelephonyEvent::OnBnClickedButtonA)
- ON_BN_CLICKED(IDC_BUTTON_14, &CTelephonyEvent::OnBnClickedButtonB)
- ON_BN_CLICKED(IDC_BUTTON_15, &CTelephonyEvent::OnBnClickedButtonC)
- ON_BN_CLICKED(IDC_BUTTON_16, &CTelephonyEvent::OnBnClickedButtonD)
- ON_BN_CLICKED(IDC_CHECK_DTMF_PLAYOUT_RX, &CTelephonyEvent::OnBnClickedCheckDtmfPlayoutRx)
- ON_BN_CLICKED(IDC_CHECK_DTMF_PLAY_TONE, &CTelephonyEvent::OnBnClickedCheckDtmfPlayTone)
- ON_BN_CLICKED(IDC_CHECK_EVENT_INBAND, &CTelephonyEvent::OnBnClickedCheckEventInband)
- ON_BN_CLICKED(IDC_CHECK_DTMF_FEEDBACK, &CTelephonyEvent::OnBnClickedCheckDtmfFeedback)
- ON_BN_CLICKED(IDC_CHECK_DIRECT_FEEDBACK, &CTelephonyEvent::OnBnClickedCheckDirectFeedback)
- ON_BN_CLICKED(IDC_RADIO_SINGLE, &CTelephonyEvent::OnBnClickedRadioSingle)
- ON_BN_CLICKED(IDC_RADIO_MULTI, &CTelephonyEvent::OnBnClickedRadioMulti)
- ON_BN_CLICKED(IDC_RADIO_START_STOP, &CTelephonyEvent::OnBnClickedRadioStartStop)
- ON_BN_CLICKED(IDC_BUTTON_SET_RX_TELEPHONE_PT, &CTelephonyEvent::OnBnClickedButtonSetRxTelephonePt)
- ON_BN_CLICKED(IDC_BUTTON_SET_TX_TELEPHONE_PT, &CTelephonyEvent::OnBnClickedButtonSetTxTelephonePt)
- ON_BN_CLICKED(IDC_BUTTON_SEND_TELEPHONE_EVENT, &CTelephonyEvent::OnBnClickedButtonSendTelephoneEvent)
- ON_BN_CLICKED(IDC_CHECK_DETECT_INBAND, &CTelephonyEvent::OnBnClickedCheckDetectInband)
- ON_BN_CLICKED(IDC_CHECK_DETECT_OUT_OF_BAND, &CTelephonyEvent::OnBnClickedCheckDetectOutOfBand)
- ON_BN_CLICKED(IDC_CHECK_EVENT_DETECTION, &CTelephonyEvent::OnBnClickedCheckEventDetection)
-END_MESSAGE_MAP()
-
-
-// CTelephonyEvent message handlers
-
-BOOL CTelephonyEvent::OnInitDialog()
-{
- CDialog::OnInitDialog();
-
- CString str;
- GetWindowText(str);
- str.AppendFormat(_T(" [channel = %d]"), _channel);
- SetWindowText(str);
-
- // Update dialog with latest playout state
- bool enabled(false);
- _veDTMFPtr->GetDtmfPlayoutStatus(_channel, enabled);
- CButton* button = (CButton*)GetDlgItem(IDC_CHECK_DTMF_PLAYOUT_RX);
- button->SetCheck(enabled ? BST_CHECKED : BST_UNCHECKED);
-
- // Update dialog with latest feedback state
- bool directFeedback(false);
- _veDTMFPtr->GetDtmfFeedbackStatus(enabled, directFeedback);
- button = (CButton*)GetDlgItem(IDC_CHECK_DTMF_FEEDBACK);
- button->SetCheck(enabled ? BST_CHECKED : BST_UNCHECKED);
- button = (CButton*)GetDlgItem(IDC_CHECK_DIRECT_FEEDBACK);
- button->SetCheck(directFeedback ? BST_CHECKED : BST_UNCHECKED);
-
- // Default event length is 160 ms
- SetDlgItemInt(IDC_EDIT_EVENT_LENGTH, 160);
-
- // Default event attenuation is 10 (<-> -10dBm0)
- SetDlgItemInt(IDC_EDIT_EVENT_ATTENUATION, 10);
-
- // Current event-detection status
- TelephoneEventDetectionMethods detectionMethod(kOutOfBand);
- if (_veDTMFPtr->GetTelephoneEventDetectionStatus(_channel, enabled, detectionMethod) == 0)
- {
- // DTMF detection is supported
- if (enabled)
- {
- button = (CButton*)GetDlgItem(IDC_CHECK_EVENT_DETECTION);
- button->SetCheck(BST_CHECKED);
- }
- if (detectionMethod == kOutOfBand || detectionMethod == kInAndOutOfBand)
- {
- button = (CButton*)GetDlgItem(IDC_CHECK_DETECT_OUT_OF_BAND);
- button->SetCheck(BST_CHECKED);
- }
- if (detectionMethod == kInBand || detectionMethod == kInAndOutOfBand)
- {
- button = (CButton*)GetDlgItem(IDC_CHECK_DETECT_INBAND);
- button->SetCheck(BST_CHECKED);
- }
- }
- else
- {
- // DTMF detection is not supported
- GetDlgItem(IDC_CHECK_EVENT_DETECTION)->EnableWindow(FALSE);
- GetDlgItem(IDC_CHECK_DETECT_OUT_OF_BAND)->EnableWindow(FALSE);
- GetDlgItem(IDC_CHECK_DETECT_INBAND)->EnableWindow(FALSE);
- GetDlgItem(IDC_EDIT_ON_EVENT_INBAND)->EnableWindow(FALSE);
- GetDlgItem(IDC_EDIT_ON_EVENT_OUT_OF_BAND)->EnableWindow(FALSE);
- }
-
- // Telephone-event PTs
- unsigned char pt(0);
- _veDTMFPtr->GetSendTelephoneEventPayloadType(_channel, pt);
- SetDlgItemInt(IDC_EDIT_EVENT_TX_PT, pt);
-
- CodecInst codec;
- strcpy_s(codec.plname, 32, "telephone-event"); codec.channels = 1; codec.plfreq = 8000;
- _veCodecPtr->GetRecPayloadType(_channel, codec);
- SetDlgItemInt(IDC_EDIT_EVENT_RX_PT, codec.pltype);
-
- if (_modeSingle)
- {
- ((CButton*)GetDlgItem(IDC_RADIO_SINGLE))->SetCheck(BST_CHECKED);
- }
- else if (_modeStartStop)
- {
- ((CButton*)GetDlgItem(IDC_RADIO_START_STOP))->SetCheck(BST_CHECKED);
- }
- else if (_modeSequence)
- {
- ((CButton*)GetDlgItem(IDC_RADIO_MULTI))->SetCheck(BST_CHECKED);
- }
-
- return TRUE; // return TRUE unless you set the focus to a control
-}
-void CTelephonyEvent::SendTelephoneEvent(unsigned char eventCode)
-{
- BOOL ret;
- int lengthMs(0);
- int attenuationDb(0);
- bool outBand(false);
- int res(0);
-
- // tone length
- if (!_modeStartStop)
- {
- lengthMs = GetDlgItemInt(IDC_EDIT_EVENT_LENGTH, &ret);
- if (ret == FALSE)
- {
- // use default length if edit field is empty
- lengthMs = 160;
- }
- }
-
- // attenuation
- attenuationDb = GetDlgItemInt(IDC_EDIT_EVENT_ATTENUATION, &ret);
- if (ret == FALSE)
- {
- // use default length if edit field is empty
- attenuationDb = 10;
- }
-
- // out-band or in-band
- CButton* button = (CButton*)GetDlgItem(IDC_CHECK_EVENT_INBAND);
- int check = button->GetCheck();
- outBand = (check == BST_UNCHECKED);
-
- if (eventCode < 16)
- SetDlgItemInt(IDC_EDIT_DTMF_EVENT, eventCode);
-
- if (_PlayDtmfToneLocally)
- {
- // --- PlayDtmfTone
-
- if (_modeSingle)
- {
- TEST2(_veDTMFPtr->PlayDtmfTone(eventCode, lengthMs, attenuationDb) == 0,
- _T("PlayDtmfTone(eventCode=%u, lengthMs=%d, attenuationDb=%d)"), eventCode, lengthMs, attenuationDb);
- }
- else if (_modeStartStop)
- {
- if (!_playingDTMFTone)
- {
- TEST2((res = _veDTMFPtr->StartPlayingDtmfTone(eventCode, attenuationDb)) == 0,
- _T("StartPlayingDtmfTone(eventCode=%u, attenuationDb=%d)"), eventCode, attenuationDb);
- }
- else
- {
- TEST2((res = _veDTMFPtr->StopPlayingDtmfTone()) == 0,
- _T("StopPlayingDTMFTone()"));
- }
- if (res == 0)
- _playingDTMFTone = !_playingDTMFTone;
- }
- else if (_modeSequence)
- {
- int nTones(1);
- int sleepMs(0);
- int lenMult(1);
- if (eventCode == 1)
- {
- nTones = 2;
- sleepMs = lengthMs;
- lenMult = 1;
- }
- else if (eventCode == 2)
- {
- nTones = 2;
- sleepMs = lengthMs/2;
- lenMult = 2;
- }
- else if (eventCode == 3)
- {
- nTones = 3;
- sleepMs = 0;
- lenMult = 1;
- }
- for (int i = 0; i < nTones; i++)
- {
- TEST2(_veDTMFPtr->PlayDtmfTone(eventCode, lengthMs, attenuationDb) == 0,
- _T("PlayDtmfTone(eventCode=%u, outBand=%d, lengthMs=%d, attenuationDb=%d)"), eventCode, lengthMs, attenuationDb);
- Sleep(sleepMs);
- lengthMs = lenMult*lengthMs;
- eventCode++;
- }
- }
- }
- else
- {
- // --- SendTelephoneEvent
-
- if (_modeSingle)
- {
- TEST2(_veDTMFPtr->SendTelephoneEvent(_channel, eventCode, outBand, lengthMs, attenuationDb) == 0,
- _T("SendTelephoneEvent(channel=%d, eventCode=%u, outBand=%d, lengthMs=%d, attenuationDb=%d)"), _channel, eventCode, outBand, lengthMs, attenuationDb);
- }
- else if (_modeStartStop)
- {
- TEST2(false, _T("*** NOT IMPLEMENTED ***"));
- }
- else if (_modeSequence)
- {
- int nTones(1);
- int sleepMs(0);
- int lenMult(1);
- if (eventCode == 1)
- {
- nTones = 2;
- sleepMs = lengthMs;
- lenMult = 1;
- }
- else if (eventCode == 2)
- {
- eventCode = 1;
- nTones = 2;
- sleepMs = lengthMs/2;
- lenMult = 2;
- }
- else if (eventCode == 3)
- {
- eventCode = 1;
- nTones = 3;
- sleepMs = 0;
- lenMult = 1;
- }
- for (int i = 0; i < nTones; i++)
- {
- TEST2(_veDTMFPtr->SendTelephoneEvent(_channel, eventCode, outBand, lengthMs, attenuationDb) == 0,
- _T("SendTelephoneEvent(channel=%d, eventCode=%u, outBand=%d, lengthMs=%d, attenuationDb=%d)"), _channel, eventCode, outBand, lengthMs, attenuationDb);
- Sleep(sleepMs);
- lengthMs = lenMult*lengthMs;
- eventCode++;
- }
- }
- }
-}
-
-void CTelephonyEvent::OnBnClickedButtonSendTelephoneEvent()
-{
- BOOL ret;
- unsigned char eventCode(0);
-
- eventCode = (unsigned char)GetDlgItemInt(IDC_EDIT_EVENT_CODE, &ret);
- if (ret == FALSE)
- {
- return;
- }
- SendTelephoneEvent(eventCode);
-}
-
-void CTelephonyEvent::OnBnClickedButton1()
-{
- SendTelephoneEvent(1);
-}
-
-void CTelephonyEvent::OnBnClickedButton2()
-{
- SendTelephoneEvent(2);
-}
-
-void CTelephonyEvent::OnBnClickedButton3()
-{
- SendTelephoneEvent(3);
-}
-
-void CTelephonyEvent::OnBnClickedButton4()
-{
- SendTelephoneEvent(4);
-}
-
-void CTelephonyEvent::OnBnClickedButton5()
-{
- SendTelephoneEvent(5);
-}
-
-void CTelephonyEvent::OnBnClickedButton6()
-{
- SendTelephoneEvent(6);
-}
-
-void CTelephonyEvent::OnBnClickedButton7()
-{
- SendTelephoneEvent(7);
-}
-
-void CTelephonyEvent::OnBnClickedButton8()
-{
- SendTelephoneEvent(8);
-}
-
-void CTelephonyEvent::OnBnClickedButton9()
-{
- SendTelephoneEvent(9);
-}
-
-void CTelephonyEvent::OnBnClickedButton10()
-{
- // *
- SendTelephoneEvent(10);
-}
-
-void CTelephonyEvent::OnBnClickedButton11()
-{
- SendTelephoneEvent(0);
-}
-
-void CTelephonyEvent::OnBnClickedButton12()
-{
- // #
- SendTelephoneEvent(11);
-}
-
-void CTelephonyEvent::OnBnClickedButtonA()
-{
- SendTelephoneEvent(12);
-}
-
-void CTelephonyEvent::OnBnClickedButtonB()
-{
- SendTelephoneEvent(13);
-}
-
-void CTelephonyEvent::OnBnClickedButtonC()
-{
- SendTelephoneEvent(14);
-}
-
-void CTelephonyEvent::OnBnClickedButtonD()
-{
- SendTelephoneEvent(15);
-}
-
-void CTelephonyEvent::OnBnClickedCheckDtmfPlayoutRx()
-{
- CButton* button = (CButton*)GetDlgItem(IDC_CHECK_DTMF_PLAYOUT_RX);
- int check = button->GetCheck();
- const bool enable = (check == BST_CHECKED);
- TEST2(_veDTMFPtr->SetDtmfPlayoutStatus(_channel, enable) == 0, _T("SetDtmfPlayoutStatus(channel=%d, enable=%d)"), _channel, enable);
-}
-
-void CTelephonyEvent::OnBnClickedCheckDtmfPlayTone()
-{
- CButton* button = (CButton*)GetDlgItem(IDC_CHECK_DTMF_PLAY_TONE);
- int check = button->GetCheck();
- _PlayDtmfToneLocally = (check == BST_CHECKED);
-}
-
-void CTelephonyEvent::OnBnClickedRadioSingle()
-{
- _modeStartStop = false;
- _modeSingle = true;
- _modeSequence = false;
-}
-
-void CTelephonyEvent::OnBnClickedRadioMulti()
-{
- _modeStartStop = false;
- _modeSingle = false;
- _modeSequence = true;
-}
-
-void CTelephonyEvent::OnBnClickedRadioStartStop()
-{
- // CButton* button = (CButton*)GetDlgItem(IDC_RADIO_START_STOP);
- // int check = button->GetCheck();
- _modeStartStop = true;
- _modeSingle = false;
- _modeSequence = false;
- // GetDlgItem(IDC_EDIT_EVENT_LENGTH)->EnableWindow();
-}
-
-void CTelephonyEvent::OnBnClickedCheckEventInband()
-{
- CButton* button = (CButton*)GetDlgItem(IDC_CHECK_EVENT_INBAND);
- int check = button->GetCheck();
- GetDlgItem(IDC_EDIT_EVENT_CODE)->EnableWindow(check?FALSE:TRUE);
- GetDlgItem(IDC_BUTTON_SEND_TELEPHONE_EVENT)->EnableWindow(check?FALSE:TRUE);
-}
-
-void CTelephonyEvent::OnBnClickedCheckDtmfFeedback()
-{
- CButton* button(NULL);
-
- // Retrieve feedback state
- button = (CButton*)GetDlgItem(IDC_CHECK_DTMF_FEEDBACK);
- int check = button->GetCheck();
- const bool enable = (check == BST_CHECKED);
-
- // Retrieve direct-feedback setting
- button = (CButton*)GetDlgItem(IDC_CHECK_DIRECT_FEEDBACK);
- check = button->GetCheck();
- const bool directFeedback = (check == BST_CHECKED);
-
- // GetDlgItem(IDC_CHECK_DIRECT_FEEDBACK)->EnableWindow(enable ? TRUE : FALSE);
-
- TEST2(_veDTMFPtr->SetDtmfFeedbackStatus(enable, directFeedback) == 0,
- _T("SetDtmfFeedbackStatus(enable=%d, directFeedback=%d)"), enable, directFeedback);
-}
-
-void CTelephonyEvent::OnBnClickedCheckDirectFeedback()
-{
- CButton* button(NULL);
-
- // Retrieve feedback state
- button = (CButton*)GetDlgItem(IDC_CHECK_DTMF_FEEDBACK);
- int check = button->GetCheck();
- const bool enable = (check == BST_CHECKED);
-
- // Retrieve new direct-feedback setting
- button = (CButton*)GetDlgItem(IDC_CHECK_DIRECT_FEEDBACK);
- check = button->GetCheck();
- const bool directFeedback = (check == BST_CHECKED);
-
- TEST2(_veDTMFPtr->SetDtmfFeedbackStatus(enable, directFeedback) == 0,
- _T("SetDtmfFeedbackStatus(enable=%d, directFeedback=%d)"), enable, directFeedback);
-}
-
-void CTelephonyEvent::OnBnClickedButtonSetRxTelephonePt()
-{
- BOOL ret;
- int pt = GetDlgItemInt(IDC_EDIT_EVENT_RX_PT, &ret);
- if (ret == FALSE || pt < 0 || pt > 127)
- return;
- CodecInst codec;
- strcpy_s(codec.plname, 32, "telephone-event");
- codec.pltype = pt;
- codec.channels = 1;
- codec.plfreq = 8000;
- TEST2(_veCodecPtr->SetRecPayloadType(_channel, codec) == 0,
- _T("SetRecPayloadType(channel=%d, codec.pltype=%d)"), _channel,
- codec.pltype);
-}
-
-void CTelephonyEvent::OnBnClickedButtonSetTxTelephonePt()
-{
- BOOL ret;
- int pt = GetDlgItemInt(IDC_EDIT_EVENT_TX_PT, &ret);
- if (ret == FALSE || pt < 0 || pt > 127)
- return;
- TEST2(_veDTMFPtr->SetSendTelephoneEventPayloadType(_channel, pt) == 0,
- _T("SetSendTelephoneEventPayloadType(channel=%d, type=%d)"), _channel,
- pt);
-}
-
-void CTelephonyEvent::OnBnClickedCheckDetectInband()
-{
- CButton* button = (CButton*)GetDlgItem(IDC_CHECK_DETECT_INBAND);
- int check = button->GetCheck();
- _inbandEventDetection = (check == BST_CHECKED);
-
- bool enabled(false);
- TelephoneEventDetectionMethods detectionMethod;
- _veDTMFPtr->GetTelephoneEventDetectionStatus(_channel, enabled, detectionMethod);
- if (enabled)
- {
- // deregister
- _veDTMFPtr->DeRegisterTelephoneEventDetection(_channel);
- delete _telephoneEventObserverPtr;
- _telephoneEventObserverPtr = NULL;
- SetDlgItemText(IDC_EDIT_ON_EVENT_INBAND,_T(""));
- SetDlgItemText(IDC_EDIT_ON_EVENT_OUT_OF_BAND,_T(""));
- }
- OnBnClickedCheckEventDetection();
-}
-
-void CTelephonyEvent::OnBnClickedCheckDetectOutOfBand()
-{
- CButton* button = (CButton*)GetDlgItem(IDC_CHECK_DETECT_OUT_OF_BAND);
- int check = button->GetCheck();
- _outOfBandEventDetection = (check == BST_CHECKED);
-
- bool enabled(false);
- TelephoneEventDetectionMethods detectionMethod;
- _veDTMFPtr->GetTelephoneEventDetectionStatus(_channel, enabled, detectionMethod);
- if (enabled)
- {
- // deregister
- _veDTMFPtr->DeRegisterTelephoneEventDetection(_channel);
- delete _telephoneEventObserverPtr;
- _telephoneEventObserverPtr = NULL;
- SetDlgItemText(IDC_EDIT_ON_EVENT_INBAND,_T(""));
- SetDlgItemText(IDC_EDIT_ON_EVENT_OUT_OF_BAND,_T(""));
- }
- OnBnClickedCheckEventDetection();
-}
-
-void CTelephonyEvent::OnBnClickedCheckEventDetection()
-{
- CButton* button = (CButton*)GetDlgItem(IDC_CHECK_EVENT_DETECTION);
- int check = button->GetCheck();
- const bool enable = (check == BST_CHECKED);
-
- if (enable)
- {
- TelephoneEventDetectionMethods method(kInBand);
- if (_inbandEventDetection && !_outOfBandEventDetection)
- method = kInBand;
- else if (!_inbandEventDetection && _outOfBandEventDetection)
- method = kOutOfBand;
- else if (_inbandEventDetection && _outOfBandEventDetection)
- method = kInAndOutOfBand;
-
- CWnd* wndOut = GetDlgItem(IDC_EDIT_ON_EVENT_OUT_OF_BAND);
- CWnd* wndIn = GetDlgItem(IDC_EDIT_ON_EVENT_INBAND);
- _telephoneEventObserverPtr = new TelephoneEventObserver(wndOut, wndIn);
-
- TEST2(_veDTMFPtr->RegisterTelephoneEventDetection(_channel, method, *_telephoneEventObserverPtr) == 0,
- _T("RegisterTelephoneEventDetection(channel=%d, detectionMethod=%d)"), _channel, method);
- }
- else
- {
- TEST2(_veDTMFPtr->DeRegisterTelephoneEventDetection(_channel) == 0,
- _T("DeRegisterTelephoneEventDetection(channel=%d)"), _channel);
- delete _telephoneEventObserverPtr;
- _telephoneEventObserverPtr = NULL;
- SetDlgItemText(IDC_EDIT_ON_EVENT_INBAND,_T(""));
- SetDlgItemText(IDC_EDIT_ON_EVENT_OUT_OF_BAND,_T(""));
- }
-}
-
-// ============================================================================
-// CWinTestDlg dialog
-// ============================================================================
-
-CWinTestDlg::CWinTestDlg(CWnd* pParent /*=NULL*/)
- : CDialog(CWinTestDlg::IDD, pParent),
- _failCount(0),
- _vePtr(NULL),
- _veBasePtr(NULL),
- _veCodecPtr(NULL),
- _veNetworkPtr(NULL),
- _veFilePtr(NULL),
- _veHardwarePtr(NULL),
- _veExternalMediaPtr(NULL),
- _veApmPtr(NULL),
- _veRtpRtcpPtr(NULL),
- _transportPtr(NULL),
- _externalMediaPtr(NULL),
- _externalTransport(false),
- _externalTransportBuild(false),
- _checkPlayFileIn(0),
- _checkPlayFileIn1(0),
- _checkPlayFileIn2(0),
- _checkPlayFileOut1(0),
- _checkPlayFileOut2(0),
- _checkAGC(0),
- _checkAGC1(0),
- _checkNS(0),
- _checkNS1(0),
- _checkEC(0),
- _checkVAD1(0),
- _checkVAD2(0),
- _checkSrtpTx1(0),
- _checkSrtpTx2(0),
- _checkSrtpRx1(0),
- _checkSrtpRx2(0),
- _checkConference1(0),
- _checkConference2(0),
- _checkOnHold1(0),
- _checkOnHold2(0),
- _strComboIp1(_T("")),
- _strComboIp2(_T("")),
- _delayEstimate1(false),
- _delayEstimate2(false),
- _rxVad(false),
- _nErrorCallbacks(0),
- _timerTicks(0)
-{
- m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
-
- _vePtr = VoiceEngine::Create();
-
- VoiceEngine::SetTraceFilter(kTraceNone);
- // VoiceEngine::SetTraceFilter(kTraceAll);
- // VoiceEngine::SetTraceFilter(kTraceStream | kTraceStateInfo | kTraceWarning | kTraceError | kTraceCritical | kTraceApiCall | kTraceModuleCall | kTraceMemory | kTraceDebug | kTraceInfo);
- // VoiceEngine::SetTraceFilter(kTraceStateInfo | kTraceWarning | kTraceError | kTraceCritical | kTraceApiCall | kTraceModuleCall | kTraceMemory | kTraceInfo);
-
- VoiceEngine::SetTraceFile("ve_win_test.txt");
- VoiceEngine::SetTraceCallback(NULL);
-
- if (_vePtr)
- {
- _veExternalMediaPtr = VoEExternalMedia::GetInterface(_vePtr);
- _veVolumeControlPtr = VoEVolumeControl::GetInterface(_vePtr);
- _veVideoSyncPtr = VoEVideoSync::GetInterface(_vePtr);
- _veNetworkPtr = VoENetwork::GetInterface(_vePtr);
- _veFilePtr = VoEFile::GetInterface(_vePtr);
- _veApmPtr = VoEAudioProcessing::GetInterface(_vePtr);
-
- _veBasePtr = VoEBase::GetInterface(_vePtr);
- _veCodecPtr = VoECodec::GetInterface(_vePtr);
- _veHardwarePtr = VoEHardware::GetInterface(_vePtr);
- _veRtpRtcpPtr = VoERTP_RTCP::GetInterface(_vePtr);
- _transportPtr = new MyTransport(_veNetworkPtr);
- _externalMediaPtr = new MediaProcessImpl();
- _rxVadObserverPtr = new RxCallback();
- }
-
- _veBasePtr->RegisterVoiceEngineObserver(*this);
-
- std::string resource_path = webrtc::test::ProjectRootPath();
- if (resource_path == webrtc::test::kCannotFindProjectRootDir) {
- _long_audio_file_path = "./";
- } else {
- _long_audio_file_path = resource_path + "data\\voice_engine\\";
- }
-}
-
-CWinTestDlg::~CWinTestDlg()
-{
- if (_externalMediaPtr) delete _externalMediaPtr;
- if (_transportPtr) delete _transportPtr;
- if (_rxVadObserverPtr) delete _rxVadObserverPtr;
-
- if (_veExternalMediaPtr) _veExternalMediaPtr->Release();
- if (_veVideoSyncPtr) _veVideoSyncPtr->Release();
- if (_veVolumeControlPtr) _veVolumeControlPtr->Release();
-
- if (_veBasePtr) _veBasePtr->Terminate();
- if (_veBasePtr) _veBasePtr->Release();
-
- if (_veCodecPtr) _veCodecPtr->Release();
- if (_veNetworkPtr) _veNetworkPtr->Release();
- if (_veFilePtr) _veFilePtr->Release();
- if (_veHardwarePtr) _veHardwarePtr->Release();
- if (_veApmPtr) _veApmPtr->Release();
- if (_veRtpRtcpPtr) _veRtpRtcpPtr->Release();
- if (_vePtr)
- {
- VoiceEngine::Delete(_vePtr);
- }
- VoiceEngine::SetTraceFilter(kTraceNone);
-}
-
-void CWinTestDlg::DoDataExchange(CDataExchange* pDX)
-{
- CDialog::DoDataExchange(pDX);
- DDX_CBString(pDX, IDC_COMBO_IP_1, _strComboIp1);
- DDX_CBString(pDX, IDC_COMBO_IP_2, _strComboIp2);
-}
-
-BEGIN_MESSAGE_MAP(CWinTestDlg, CDialog)
- ON_WM_SYSCOMMAND()
- ON_WM_PAINT()
- ON_WM_QUERYDRAGICON()
- ON_WM_TIMER()
- //}}AFX_MSG_MAP
- ON_BN_CLICKED(IDC_BUTTON_CREATE_1, &CWinTestDlg::OnBnClickedButtonCreate1)
- ON_BN_CLICKED(IDC_BUTTON_DELETE_1, &CWinTestDlg::OnBnClickedButtonDelete1)
- ON_BN_CLICKED(IDC_BUTTON_CREATE_2, &CWinTestDlg::OnBnClickedButtonCreate2)
- ON_BN_CLICKED(IDC_BUTTON_DELETE_2, &CWinTestDlg::OnBnClickedButtonDelete2)
- ON_CBN_SELCHANGE(IDC_COMBO_CODEC_1, &CWinTestDlg::OnCbnSelchangeComboCodec1)
- ON_BN_CLICKED(IDC_BUTTON_START_LISTEN_1, &CWinTestDlg::OnBnClickedButtonStartListen1)
- ON_BN_CLICKED(IDC_BUTTON_STOP_LISTEN_1, &CWinTestDlg::OnBnClickedButtonStopListen1)
- ON_BN_CLICKED(IDC_BUTTON_START_PLAYOUT_1, &CWinTestDlg::OnBnClickedButtonStartPlayout1)
- ON_BN_CLICKED(IDC_BUTTON_STOP_PLAYOUT_1, &CWinTestDlg::OnBnClickedButtonStopPlayout1)
- ON_BN_CLICKED(IDC_BUTTON_START_SEND_1, &CWinTestDlg::OnBnClickedButtonStartSend1)
- ON_BN_CLICKED(IDC_BUTTON_STOP_SEND_1, &CWinTestDlg::OnBnClickedButtonStopSend1)
- ON_CBN_SELCHANGE(IDC_COMBO_IP_2, &CWinTestDlg::OnCbnSelchangeComboIp2)
- ON_CBN_SELCHANGE(IDC_COMBO_IP_1, &CWinTestDlg::OnCbnSelchangeComboIp1)
- ON_CBN_SELCHANGE(IDC_COMBO_CODEC_2, &CWinTestDlg::OnCbnSelchangeComboCodec2)
- ON_BN_CLICKED(IDC_BUTTON_START_LISTEN_2, &CWinTestDlg::OnBnClickedButtonStartListen2)
- ON_BN_CLICKED(IDC_BUTTON_STOP_LISTEN_2, &CWinTestDlg::OnBnClickedButtonStopListen2)
- ON_BN_CLICKED(IDC_BUTTON_START_PLAYOUT_2, &CWinTestDlg::OnBnClickedButtonStartPlayout2)
- ON_BN_CLICKED(IDC_BUTTON_STOP_PLAYOUT_2, &CWinTestDlg::OnBnClickedButtonStopPlayout2)
- ON_BN_CLICKED(IDC_BUTTON_START_SEND_2, &CWinTestDlg::OnBnClickedButtonStartSend2)
- ON_BN_CLICKED(IDC_BUTTON_STOP_SEND_2, &CWinTestDlg::OnBnClickedButtonStopSend2)
- ON_BN_CLICKED(IDC_CHECK_EXT_TRANS_1, &CWinTestDlg::OnBnClickedCheckExtTrans1)
- ON_BN_CLICKED(IDC_CHECK_PLAY_FILE_IN_1, &CWinTestDlg::OnBnClickedCheckPlayFileIn1)
- ON_BN_CLICKED(IDC_CHECK_PLAY_FILE_OUT_1, &CWinTestDlg::OnBnClickedCheckPlayFileOut1)
- ON_BN_CLICKED(IDC_CHECK_EXT_TRANS_2, &CWinTestDlg::OnBnClickedCheckExtTrans2)
- ON_BN_CLICKED(IDC_CHECK_PLAY_FILE_IN_2, &CWinTestDlg::OnBnClickedCheckPlayFileIn2)
- ON_BN_CLICKED(IDC_CHECK_PLAY_FILE_OUT_2, &CWinTestDlg::OnBnClickedCheckPlayFileOut2)
- ON_BN_CLICKED(IDC_CHECK_PLAY_FILE_IN, &CWinTestDlg::OnBnClickedCheckPlayFileIn)
- ON_CBN_SELCHANGE(IDC_COMBO_REC_DEVICE, &CWinTestDlg::OnCbnSelchangeComboRecDevice)
- ON_CBN_SELCHANGE(IDC_COMBO_PLAY_DEVICE, &CWinTestDlg::OnCbnSelchangeComboPlayDevice)
- ON_BN_CLICKED(IDC_CHECK_EXT_MEDIA_IN_1, &CWinTestDlg::OnBnClickedCheckExtMediaIn1)
- ON_BN_CLICKED(IDC_CHECK_EXT_MEDIA_OUT_1, &CWinTestDlg::OnBnClickedCheckExtMediaOut1)
- ON_NOTIFY(NM_RELEASEDCAPTURE, IDC_SLIDER_INPUT_VOLUME, &CWinTestDlg::OnNMReleasedcaptureSliderInputVolume)
- ON_NOTIFY(NM_RELEASEDCAPTURE, IDC_SLIDER_OUTPUT_VOLUME, &CWinTestDlg::OnNMReleasedcaptureSliderOutputVolume)
- ON_BN_CLICKED(IDC_CHECK_AGC, &CWinTestDlg::OnBnClickedCheckAgc)
- ON_BN_CLICKED(IDC_CHECK_NS, &CWinTestDlg::OnBnClickedCheckNs)
- ON_BN_CLICKED(IDC_CHECK_EC, &CWinTestDlg::OnBnClickedCheckEc)
- ON_BN_CLICKED(IDC_CHECK_VAD_1, &CWinTestDlg::OnBnClickedCheckVad1)
- ON_BN_CLICKED(IDC_CHECK_VAD_3, &CWinTestDlg::OnBnClickedCheckVad2)
- ON_BN_CLICKED(IDC_CHECK_EXT_MEDIA_IN_2, &CWinTestDlg::OnBnClickedCheckExtMediaIn2)
- ON_BN_CLICKED(IDC_CHECK_EXT_MEDIA_OUT_2, &CWinTestDlg::OnBnClickedCheckExtMediaOut2)
- ON_BN_CLICKED(IDC_CHECK_MUTE_IN, &CWinTestDlg::OnBnClickedCheckMuteIn)
- ON_BN_CLICKED(IDC_CHECK_MUTE_IN_1, &CWinTestDlg::OnBnClickedCheckMuteIn1)
- ON_BN_CLICKED(IDC_CHECK_MUTE_IN_2, &CWinTestDlg::OnBnClickedCheckMuteIn2)
- ON_BN_CLICKED(IDC_CHECK_SRTP_TX_1, &CWinTestDlg::OnBnClickedCheckSrtpTx1)
- ON_BN_CLICKED(IDC_CHECK_SRTP_RX_1, &CWinTestDlg::OnBnClickedCheckSrtpRx1)
- ON_BN_CLICKED(IDC_CHECK_SRTP_TX_2, &CWinTestDlg::OnBnClickedCheckSrtpTx2)
- ON_BN_CLICKED(IDC_CHECK_SRTP_RX_2, &CWinTestDlg::OnBnClickedCheckSrtpRx2)
- ON_BN_CLICKED(IDC_CHECK_EXT_ENCRYPTION_1, &CWinTestDlg::OnBnClickedCheckExtEncryption1)
- ON_BN_CLICKED(IDC_CHECK_EXT_ENCRYPTION_2, &CWinTestDlg::OnBnClickedCheckExtEncryption2)
- ON_BN_CLICKED(IDC_BUTTON_DTMF_1, &CWinTestDlg::OnBnClickedButtonDtmf1)
- ON_BN_CLICKED(IDC_CHECK_REC_MIC, &CWinTestDlg::OnBnClickedCheckRecMic)
- ON_BN_CLICKED(IDC_BUTTON_DTMF_2, &CWinTestDlg::OnBnClickedButtonDtmf2)
- ON_BN_CLICKED(IDC_BUTTON_TEST_1, &CWinTestDlg::OnBnClickedButtonTest1)
- ON_BN_CLICKED(IDC_CHECK_CONFERENCE_1, &CWinTestDlg::OnBnClickedCheckConference1)
- ON_BN_CLICKED(IDC_CHECK_CONFERENCE_2, &CWinTestDlg::OnBnClickedCheckConference2)
- ON_BN_CLICKED(IDC_CHECK_ON_HOLD_1, &CWinTestDlg::OnBnClickedCheckOnHold1)
- ON_BN_CLICKED(IDC_CHECK_ON_HOLD_2, &CWinTestDlg::OnBnClickedCheckOnHold2)
- ON_BN_CLICKED(IDC_CHECK_EXT_MEDIA_IN, &CWinTestDlg::OnBnClickedCheckExtMediaIn)
- ON_BN_CLICKED(IDC_CHECK_EXT_MEDIA_OUT, &CWinTestDlg::OnBnClickedCheckExtMediaOut)
- ON_LBN_SELCHANGE(IDC_LIST_CODEC_1, &CWinTestDlg::OnLbnSelchangeListCodec1)
- ON_NOTIFY(NM_RELEASEDCAPTURE, IDC_SLIDER_PAN_LEFT, &CWinTestDlg::OnNMReleasedcaptureSliderPanLeft)
- ON_NOTIFY(NM_RELEASEDCAPTURE, IDC_SLIDER_PAN_RIGHT, &CWinTestDlg::OnNMReleasedcaptureSliderPanRight)
- ON_BN_CLICKED(IDC_BUTTON_VERSION, &CWinTestDlg::OnBnClickedButtonVersion)
- ON_BN_CLICKED(IDC_CHECK_DELAY_ESTIMATE_1, &CWinTestDlg::OnBnClickedCheckDelayEstimate1)
- ON_BN_CLICKED(IDC_CHECK_RXVAD, &CWinTestDlg::OnBnClickedCheckRxvad)
- ON_BN_CLICKED(IDC_CHECK_AGC_1, &CWinTestDlg::OnBnClickedCheckAgc1)
- ON_BN_CLICKED(IDC_CHECK_NS_1, &CWinTestDlg::OnBnClickedCheckNs1)
- ON_BN_CLICKED(IDC_CHECK_REC_CALL, &CWinTestDlg::OnBnClickedCheckRecCall)
- ON_BN_CLICKED(IDC_CHECK_TYPING_DETECTION, &CWinTestDlg::OnBnClickedCheckTypingDetection)
- ON_BN_CLICKED(IDC_CHECK_RED, &CWinTestDlg::OnBnClickedCheckRED)
- ON_BN_CLICKED(IDC_BUTTON_CLEAR_ERROR_CALLBACK, &CWinTestDlg::OnBnClickedButtonClearErrorCallback)
-END_MESSAGE_MAP()
-
-BOOL CWinTestDlg::UpdateTest(bool failed, const CString& strMsg)
-{
- if (failed)
- {
- SetDlgItemText(IDC_EDIT_MESSAGE, strMsg);
- _strErr.Format(_T("FAILED (error=%d)"), _veBasePtr->LastError());
- SetDlgItemText(IDC_EDIT_RESULT, _strErr);
- _failCount++;
- SetDlgItemInt(IDC_EDIT_N_FAILS, _failCount);
- SetDlgItemInt(IDC_EDIT_LAST_ERROR, _veBasePtr->LastError());
- }
- else
- {
- SetDlgItemText(IDC_EDIT_MESSAGE, strMsg);
- SetDlgItemText(IDC_EDIT_RESULT, _T("OK"));
- }
- return TRUE;
-}
-
-
-// CWinTestDlg message handlers
-
-BOOL CWinTestDlg::OnInitDialog()
-{
- CDialog::OnInitDialog();
-
- // Add "About..." menu item to system menu.
-
- // IDM_ABOUTBOX must be in the system command range.
- ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
- ASSERT(IDM_ABOUTBOX < 0xF000);
-
- CMenu* pSysMenu = GetSystemMenu(FALSE);
- if (pSysMenu != NULL)
- {
- CString strAboutMenu;
- strAboutMenu.LoadString(IDS_ABOUTBOX);
- if (!strAboutMenu.IsEmpty())
- {
- pSysMenu->AppendMenu(MF_SEPARATOR);
- pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
- }
- }
-
- // Set the icon for this dialog. The framework does this automatically
- // when the application's main window is not a dialog
- SetIcon(m_hIcon, TRUE); // Set big icon
- SetIcon(m_hIcon, FALSE); // Set small icon
-
- // char version[1024];
- // _veBasePtr->GetVersion(version);
- // AfxMessageBox(version, MB_OK);
-
- if (_veBasePtr->Init() != 0)
- {
- AfxMessageBox(_T("Init() failed "), MB_OKCANCEL);
- }
-
- int ch = _veBasePtr->CreateChannel();
- if (_veBasePtr->SetSendDestination(ch, 1234, "127.0.0.1") == -1)
- {
- if (_veBasePtr->LastError() == VE_EXTERNAL_TRANSPORT_ENABLED)
- {
- _strMsg.Format(_T("*** External transport build ***"));
- SetDlgItemText(IDC_EDIT_MESSAGE, _strMsg);
- _externalTransportBuild = true;
- }
- }
- _veBasePtr->DeleteChannel(ch);
-
- // --- Add (preferred) local IPv4 address in title
-
- if (_veNetworkPtr)
- {
- char localIP[64];
- _veNetworkPtr->GetLocalIP(localIP);
- CString str;
- GetWindowText(str);
- str.AppendFormat(_T(" [Local IPv4 address: %s]"), CharToTchar(localIP, 64));
- SetWindowText(str);
- }
-
- // --- Volume sliders
-
- if (_veVolumeControlPtr)
- {
- unsigned int volume(0);
- CSliderCtrl* slider(NULL);
-
- slider = (CSliderCtrl*)GetDlgItem(IDC_SLIDER_INPUT_VOLUME);
- slider->SetRangeMin(0);
- slider->SetRangeMax(255);
- _veVolumeControlPtr->GetMicVolume(volume);
- slider->SetPos(volume);
-
- slider = (CSliderCtrl*)GetDlgItem(IDC_SLIDER_OUTPUT_VOLUME);
- slider->SetRangeMin(0);
- slider->SetRangeMax(255);
- _veVolumeControlPtr->GetSpeakerVolume(volume);
- slider->SetPos(volume);
- }
-
- // --- Panning sliders
-
- if (_veVolumeControlPtr)
- {
- float lVol(0.0);
- float rVol(0.0);
- int leftVol, rightVol;
- CSliderCtrl* slider(NULL);
-
- _veVolumeControlPtr->GetOutputVolumePan(-1, lVol, rVol);
-
- leftVol = (int)(lVol*10.0f); // [0,10]
- rightVol = (int)(rVol*10.0f); // [0,10]
-
- slider = (CSliderCtrl*)GetDlgItem(IDC_SLIDER_PAN_LEFT);
- slider->SetRange(0,10);
- slider->SetPos(10-leftVol); // pos 0 <=> max pan 1.0 (top of slider)
-
- slider = (CSliderCtrl*)GetDlgItem(IDC_SLIDER_PAN_RIGHT);
- slider->SetRange(0,10);
- slider->SetPos(10-rightVol);
- }
-
- // --- APM settings
-
- bool enable(false);
- CButton* button(NULL);
-
- AgcModes agcMode(kAgcDefault);
- if (_veApmPtr->GetAgcStatus(enable, agcMode) == 0)
- {
- button = (CButton*)GetDlgItem(IDC_CHECK_AGC);
- enable ? button->SetCheck(BST_CHECKED) : button->SetCheck(BST_UNCHECKED);
- }
- else
- {
- // AGC is not supported
- GetDlgItem(IDC_CHECK_AGC)->EnableWindow(FALSE);
- }
-
- NsModes nsMode(kNsDefault);
- if (_veApmPtr->GetNsStatus(enable, nsMode) == 0)
- {
- button = (CButton*)GetDlgItem(IDC_CHECK_NS);
- enable ? button->SetCheck(BST_CHECKED) : button->SetCheck(BST_UNCHECKED);
- }
- else
- {
- // NS is not supported
- GetDlgItem(IDC_CHECK_NS)->EnableWindow(FALSE);
- }
-
- EcModes ecMode(kEcDefault);
- if (_veApmPtr->GetEcStatus(enable, ecMode) == 0)
- {
- button = (CButton*)GetDlgItem(IDC_CHECK_EC);
- enable ? button->SetCheck(BST_CHECKED) : button->SetCheck(BST_UNCHECKED);
- }
- else
- {
- // EC is not supported
- GetDlgItem(IDC_CHECK_EC)->EnableWindow(FALSE);
- }
-
- // --- First channel section
-
- GetDlgItem(IDC_COMBO_IP_1)->EnableWindow(FALSE);
- GetDlgItem(IDC_EDIT_TX_PORT_1)->EnableWindow(FALSE);
- GetDlgItem(IDC_EDIT_RX_PORT_1)->EnableWindow(FALSE);
- GetDlgItem(IDC_COMBO_CODEC_1)->EnableWindow(FALSE);
- GetDlgItem(IDC_LIST_CODEC_1)->EnableWindow(FALSE);
- GetDlgItem(IDC_EDIT_CODEC_1)->EnableWindow(FALSE);
- GetDlgItem(IDC_BUTTON_DELETE_1)->EnableWindow(FALSE);
- GetDlgItem(IDC_BUTTON_START_LISTEN_1)->EnableWindow(FALSE);
- GetDlgItem(IDC_BUTTON_STOP_LISTEN_1)->EnableWindow(FALSE);
- GetDlgItem(IDC_BUTTON_START_PLAYOUT_1)->EnableWindow(FALSE);
- GetDlgItem(IDC_BUTTON_STOP_PLAYOUT_1)->EnableWindow(FALSE);
- GetDlgItem(IDC_BUTTON_START_SEND_1)->EnableWindow(FALSE);
- GetDlgItem(IDC_BUTTON_STOP_SEND_1)->EnableWindow(FALSE);
- GetDlgItem(IDC_CHECK_EXT_TRANS_1)->EnableWindow(FALSE);
- GetDlgItem(IDC_CHECK_PLAY_FILE_IN_1)->EnableWindow(FALSE);
- GetDlgItem(IDC_CHECK_PLAY_FILE_OUT_1)->EnableWindow(FALSE);
- GetDlgItem(IDC_CHECK_EXT_MEDIA_IN_1)->EnableWindow(FALSE);
- GetDlgItem(IDC_CHECK_EXT_MEDIA_OUT_1)->EnableWindow(FALSE);
- GetDlgItem(IDC_CHECK_VAD_1)->EnableWindow(FALSE);
- GetDlgItem(IDC_CHECK_MUTE_IN_1)->EnableWindow(FALSE);
- GetDlgItem(IDC_CHECK_SRTP_TX_1)->EnableWindow(FALSE);
- GetDlgItem(IDC_CHECK_SRTP_RX_1)->EnableWindow(FALSE);
- GetDlgItem(IDC_CHECK_EXT_ENCRYPTION_1)->EnableWindow(FALSE);
- GetDlgItem(IDC_BUTTON_DTMF_1)->EnableWindow(FALSE);
- GetDlgItem(IDC_CHECK_CONFERENCE_1)->EnableWindow(FALSE);
- GetDlgItem(IDC_CHECK_ON_HOLD_1)->EnableWindow(FALSE);
- GetDlgItem(IDC_CHECK_DELAY_ESTIMATE_1)->EnableWindow(FALSE);
- GetDlgItem(IDC_CHECK_RXVAD)->EnableWindow(FALSE);
- GetDlgItem(IDC_CHECK_AGC_1)->EnableWindow(FALSE);
- GetDlgItem(IDC_CHECK_NS_1)->EnableWindow(FALSE);
- GetDlgItem(IDC_CHECK_RED)->EnableWindow(FALSE);
-
- CComboBox* comboIP(NULL);
- comboIP = (CComboBox*)GetDlgItem(IDC_COMBO_IP_1);
- comboIP->AddString(_T("127.0.0.1"));
- comboIP->SetCurSel(0);
-
- SetDlgItemInt(IDC_EDIT_TX_PORT_1, 1111);
- SetDlgItemInt(IDC_EDIT_RX_PORT_1, 1111);
-
- // --- Add supported codecs to the codec combo box
-
- CComboBox* comboCodec(NULL);
- comboCodec = (CComboBox*)GetDlgItem(IDC_COMBO_CODEC_1);
- comboCodec->ResetContent();
-
- int numCodecs = _veCodecPtr->NumOfCodecs();
- for (int idx = 0; idx < numCodecs; idx++)
- {
- CodecInst codec;
- _veCodecPtr->GetCodec(idx, codec);
- if ((_stricmp(codec.plname, "CNNB") != 0) &&
- (_stricmp(codec.plname, "CNWB") != 0))
- {
- CString strCodec;
- if (_stricmp(codec.plname, "G7221") == 0)
- strCodec.Format(_T("%s (%d/%d/%d)"), CharToTchar(codec.plname, 32), codec.pltype, codec.plfreq/1000, codec.rate/1000);
- else
- strCodec.Format(_T("%s (%d/%d)"), CharToTchar(codec.plname, 32), codec.pltype, codec.plfreq/1000);
- comboCodec->AddString(strCodec);
- }
- if (idx == 0)
- {
- SetDlgItemInt(IDC_EDIT_CODEC_1, codec.pltype);
- }
- }
- comboCodec->SetCurSel(0);
-
- CListBox* list = (CListBox*)GetDlgItem(IDC_LIST_CODEC_1);
- list->AddString(_T("pltype"));
- list->AddString(_T("plfreq"));
- list->AddString(_T("pacsize"));
- list->AddString(_T("channels"));
- list->AddString(_T("rate"));
- list->SetCurSel(0);
-
- // --- Add available audio devices to the combo boxes
-
- CComboBox* comboRecDevice(NULL);
- CComboBox* comboPlayDevice(NULL);
- comboRecDevice = (CComboBox*)GetDlgItem(IDC_COMBO_REC_DEVICE);
- comboPlayDevice = (CComboBox*)GetDlgItem(IDC_COMBO_PLAY_DEVICE);
- comboRecDevice->ResetContent();
- comboPlayDevice->ResetContent();
-
- if (_veHardwarePtr)
- {
- int numPlayout(0);
- int numRecording(0);
- char nameStr[128];
- char guidStr[128];
- CString strDevice;
- AudioLayers audioLayer;
-
- _veHardwarePtr->GetAudioDeviceLayer(audioLayer);
- if (kAudioWindowsWave == audioLayer)
- {
- strDevice.FormatMessage(_T("Audio Layer: Windows Wave API"));
- }
- else if (kAudioWindowsCore == audioLayer)
- {
- strDevice.FormatMessage(_T("Audio Layer: Windows Core API"));
- }
- else
- {
- strDevice.FormatMessage(_T("Audio Layer: ** UNKNOWN **"));
- }
- SetDlgItemText(IDC_EDIT_AUDIO_LAYER, (LPCTSTR)strDevice);
-
- _veHardwarePtr->GetNumOfRecordingDevices(numRecording);
-
- for (int idx = 0; idx < numRecording; idx++)
- {
- _veHardwarePtr->GetRecordingDeviceName(idx, nameStr, guidStr);
- strDevice.Format(_T("%s"), CharToTchar(nameStr, 128));
- comboRecDevice->AddString(strDevice);
- }
- // Select default (communication) device in the combo box
- _veHardwarePtr->GetRecordingDeviceName(-1, nameStr, guidStr);
- CString tmp = CString(nameStr);
- int nIndex = comboRecDevice->SelectString(-1, tmp);
- ASSERT(nIndex != CB_ERR);
-
- _veHardwarePtr->GetNumOfPlayoutDevices(numPlayout);
-
- for (int idx = 0; idx < numPlayout; idx++)
- {
- _veHardwarePtr->GetPlayoutDeviceName(idx, nameStr, guidStr);
- strDevice.Format(_T("%s"), CharToTchar(nameStr, 128));
- comboPlayDevice->AddString(strDevice);
- }
- // Select default (communication) device in the combo box
- _veHardwarePtr->GetPlayoutDeviceName(-1, nameStr, guidStr);
- nIndex = comboPlayDevice->SelectString(-1, CString(nameStr));
- ASSERT(nIndex != CB_ERR);
- }
-
- // --- Second channel section
-
- GetDlgItem(IDC_COMBO_IP_2)->EnableWindow(FALSE);
- GetDlgItem(IDC_EDIT_TX_PORT_2)->EnableWindow(FALSE);
- GetDlgItem(IDC_EDIT_RX_PORT_2)->EnableWindow(FALSE);
- GetDlgItem(IDC_COMBO_CODEC_2)->EnableWindow(FALSE);
- GetDlgItem(IDC_BUTTON_DELETE_2)->EnableWindow(FALSE);
- GetDlgItem(IDC_BUTTON_START_LISTEN_2)->EnableWindow(FALSE);
- GetDlgItem(IDC_BUTTON_STOP_LISTEN_2)->EnableWindow(FALSE);
- GetDlgItem(IDC_BUTTON_START_PLAYOUT_2)->EnableWindow(FALSE);
- GetDlgItem(IDC_BUTTON_STOP_PLAYOUT_2)->EnableWindow(FALSE);
- GetDlgItem(IDC_BUTTON_START_SEND_2)->EnableWindow(FALSE);
- GetDlgItem(IDC_BUTTON_STOP_SEND_2)->EnableWindow(FALSE);
- GetDlgItem(IDC_CHECK_EXT_TRANS_2)->EnableWindow(FALSE);
- GetDlgItem(IDC_CHECK_PLAY_FILE_IN_2)->EnableWindow(FALSE);
- GetDlgItem(IDC_CHECK_PLAY_FILE_OUT_2)->EnableWindow(FALSE);
- GetDlgItem(IDC_CHECK_EXT_MEDIA_IN_2)->EnableWindow(FALSE);
- GetDlgItem(IDC_CHECK_EXT_MEDIA_OUT_2)->EnableWindow(FALSE);
- GetDlgItem(IDC_CHECK_VAD_3)->EnableWindow(FALSE);
- GetDlgItem(IDC_CHECK_MUTE_IN_2)->EnableWindow(FALSE);
- GetDlgItem(IDC_CHECK_SRTP_TX_2)->EnableWindow(FALSE);
- GetDlgItem(IDC_CHECK_SRTP_RX_2)->EnableWindow(FALSE);
- GetDlgItem(IDC_CHECK_EXT_ENCRYPTION_2)->EnableWindow(FALSE);
- GetDlgItem(IDC_BUTTON_DTMF_2)->EnableWindow(FALSE);
- GetDlgItem(IDC_CHECK_CONFERENCE_2)->EnableWindow(FALSE);
- GetDlgItem(IDC_CHECK_ON_HOLD_2)->EnableWindow(FALSE);
-
- comboIP = (CComboBox*)GetDlgItem(IDC_COMBO_IP_2);
- comboIP->AddString(_T("127.0.0.1"));
- comboIP->SetCurSel(0);
-
- SetDlgItemInt(IDC_EDIT_TX_PORT_2, 2222);
- SetDlgItemInt(IDC_EDIT_RX_PORT_2, 2222);
-
- comboCodec = (CComboBox*)GetDlgItem(IDC_COMBO_CODEC_2);
- comboCodec->ResetContent();
-
- if (_veCodecPtr)
- {
- numCodecs = _veCodecPtr->NumOfCodecs();
- for (int idx = 0; idx < numCodecs; idx++)
- {
- CodecInst codec;
- _veCodecPtr->GetCodec(idx, codec);
- CString strCodec;
- strCodec.Format(_T("%s (%d/%d)"), CharToTchar(codec.plname, 32), codec.pltype, codec.plfreq/1000);
- comboCodec->AddString(strCodec);
- }
- comboCodec->SetCurSel(0);
- }
-
- // --- Start windows timer
-
- SetTimer(0, 1000, NULL);
-
- return TRUE; // return TRUE unless you set the focus to a control
-}
-
-void CWinTestDlg::OnSysCommand(UINT nID, LPARAM lParam)
-{
- if ((nID & 0xFFF0) == IDM_ABOUTBOX)
- {
- CAboutDlg dlgAbout;
- dlgAbout.DoModal();
- }
- else if (nID == SC_CLOSE)
- {
- BOOL ret;
- int channel(0);
- channel = GetDlgItemInt(IDC_EDIT_1, &ret);
- if (ret == TRUE)
- {
- _veBasePtr->DeleteChannel(channel);
- }
- channel = GetDlgItemInt(IDC_EDIT_2, &ret);
- if (ret == TRUE)
- {
- _veBasePtr->DeleteChannel(channel);
- }
-
- CDialog::OnSysCommand(nID, lParam);
- }
- else
- {
- CDialog::OnSysCommand(nID, lParam);
- }
-
-}
-
-// If you add a minimize button to your dialog, you will need the code below
-// to draw the icon. For MFC applications using the document/view model,
-// this is automatically done for you by the framework.
-
-void CWinTestDlg::OnPaint()
-{
- if (IsIconic())
- {
- CPaintDC dc(this); // device context for painting
-
- SendMessage(WM_ICONERASEBKGND, reinterpret_cast<WPARAM>(dc.GetSafeHdc()), 0);
-
- // Center icon in client rectangle
- int cxIcon = GetSystemMetrics(SM_CXICON);
- int cyIcon = GetSystemMetrics(SM_CYICON);
- CRect rect;
- GetClientRect(&rect);
- int x = (rect.Width() - cxIcon + 1) / 2;
- int y = (rect.Height() - cyIcon + 1) / 2;
-
- // Draw the icon
- dc.DrawIcon(x, y, m_hIcon);
- }
- else
- {
- CDialog::OnPaint();
- }
-}
-
-// The system calls this function to obtain the cursor to display while the user drags
-// the minimized window.
-HCURSOR CWinTestDlg::OnQueryDragIcon()
-{
- return static_cast<HCURSOR>(m_hIcon);
-}
-
-
-void CWinTestDlg::OnBnClickedButtonCreate1()
-{
- int channel(0);
- TEST((channel = _veBasePtr->CreateChannel()) >= 0, _T("CreateChannel(channel=%d)"), channel);
- if (channel >= 0)
- {
- _veRtpRtcpPtr->RegisterRTPObserver(channel, *this);
-
- SetDlgItemInt(IDC_EDIT_1, channel);
- GetDlgItem(IDC_BUTTON_CREATE_1)->EnableWindow(FALSE);
- GetDlgItem(IDC_BUTTON_DELETE_1)->EnableWindow(TRUE);
- GetDlgItem(IDC_COMBO_IP_1)->EnableWindow(TRUE);
- GetDlgItem(IDC_EDIT_TX_PORT_1)->EnableWindow(TRUE);
- GetDlgItem(IDC_EDIT_RX_PORT_1)->EnableWindow(TRUE);
- GetDlgItem(IDC_COMBO_CODEC_1)->EnableWindow(TRUE);
- GetDlgItem(IDC_LIST_CODEC_1)->EnableWindow(TRUE);
- GetDlgItem(IDC_EDIT_CODEC_1)->EnableWindow(TRUE);
- GetDlgItem(IDC_BUTTON_START_LISTEN_1)->EnableWindow(TRUE);
- GetDlgItem(IDC_BUTTON_START_PLAYOUT_1)->EnableWindow(TRUE);
- GetDlgItem(IDC_BUTTON_START_SEND_1)->EnableWindow(TRUE);
- GetDlgItem(IDC_CHECK_EXT_TRANS_1)->EnableWindow(TRUE);
- GetDlgItem(IDC_CHECK_PLAY_FILE_IN_1)->EnableWindow(TRUE);
- GetDlgItem(IDC_CHECK_PLAY_FILE_OUT_1)->EnableWindow(TRUE);
- GetDlgItem(IDC_CHECK_EXT_MEDIA_IN_1)->EnableWindow(TRUE);
- GetDlgItem(IDC_CHECK_EXT_MEDIA_OUT_1)->EnableWindow(TRUE);
- GetDlgItem(IDC_CHECK_VAD_1)->EnableWindow(TRUE);
- GetDlgItem(IDC_CHECK_MUTE_IN_1)->EnableWindow(TRUE);
- GetDlgItem(IDC_CHECK_SRTP_TX_1)->EnableWindow(TRUE);
- GetDlgItem(IDC_CHECK_SRTP_RX_1)->EnableWindow(TRUE);
- GetDlgItem(IDC_CHECK_EXT_ENCRYPTION_1)->EnableWindow(TRUE);
- GetDlgItem(IDC_BUTTON_DTMF_1)->EnableWindow(TRUE);
- GetDlgItem(IDC_CHECK_ON_HOLD_1)->EnableWindow(TRUE);
- GetDlgItem(IDC_CHECK_DELAY_ESTIMATE_1)->EnableWindow(TRUE);
- GetDlgItem(IDC_CHECK_RXVAD)->EnableWindow(TRUE);
- GetDlgItem(IDC_CHECK_AGC_1)->EnableWindow(TRUE);
- GetDlgItem(IDC_CHECK_NS_1)->EnableWindow(TRUE);
- GetDlgItem(IDC_CHECK_RED)->EnableWindow(TRUE);
-
- // Always set send codec to default codec <=> index 0.
- CodecInst codec;
- _veCodecPtr->GetCodec(0, codec);
- _veCodecPtr->SetSendCodec(channel, codec);
- }
-}
-
-void CWinTestDlg::OnBnClickedButtonCreate2()
-{
- int channel(0);
- TEST((channel = _veBasePtr->CreateChannel()) >=0 , _T("CreateChannel(%d)"), channel);
- if (channel >= 0)
- {
- _veRtpRtcpPtr->RegisterRTPObserver(channel, *this);
-
- SetDlgItemInt(IDC_EDIT_2, channel);
- GetDlgItem(IDC_BUTTON_CREATE_2)->EnableWindow(FALSE);
- GetDlgItem(IDC_BUTTON_DELETE_2)->EnableWindow(TRUE);
- GetDlgItem(IDC_COMBO_IP_2)->EnableWindow(TRUE);
- GetDlgItem(IDC_EDIT_TX_PORT_2)->EnableWindow(TRUE);
- GetDlgItem(IDC_EDIT_RX_PORT_2)->EnableWindow(TRUE);
- GetDlgItem(IDC_COMBO_CODEC_2)->EnableWindow(TRUE);
- GetDlgItem(IDC_BUTTON_START_LISTEN_2)->EnableWindow(TRUE);
- GetDlgItem(IDC_BUTTON_START_PLAYOUT_2)->EnableWindow(TRUE);
- GetDlgItem(IDC_BUTTON_START_SEND_2)->EnableWindow(TRUE);
- GetDlgItem(IDC_CHECK_EXT_TRANS_2)->EnableWindow(TRUE);
- GetDlgItem(IDC_CHECK_PLAY_FILE_IN_2)->EnableWindow(TRUE);
- GetDlgItem(IDC_CHECK_PLAY_FILE_OUT_2)->EnableWindow(TRUE);
- GetDlgItem(IDC_CHECK_EXT_MEDIA_IN_2)->EnableWindow(TRUE);
- GetDlgItem(IDC_CHECK_EXT_MEDIA_OUT_2)->EnableWindow(TRUE);
- GetDlgItem(IDC_CHECK_VAD_3)->EnableWindow(TRUE);
- GetDlgItem(IDC_CHECK_MUTE_IN_2)->EnableWindow(TRUE);
- GetDlgItem(IDC_CHECK_SRTP_TX_2)->EnableWindow(TRUE);
- GetDlgItem(IDC_CHECK_SRTP_RX_2)->EnableWindow(TRUE);
- GetDlgItem(IDC_CHECK_EXT_ENCRYPTION_2)->EnableWindow(TRUE);
- GetDlgItem(IDC_BUTTON_DTMF_2)->EnableWindow(TRUE);
- GetDlgItem(IDC_CHECK_CONFERENCE_2)->EnableWindow(TRUE);
- GetDlgItem(IDC_CHECK_ON_HOLD_2)->EnableWindow(TRUE);
-
- // Always set send codec to default codec <=> index 0.
- CodecInst codec;
- _veCodecPtr->GetCodec(0, codec);
- _veCodecPtr->SetSendCodec(channel, codec);
- }
-}
-
-void CWinTestDlg::OnBnClickedButtonDelete1()
-{
- BOOL ret;
- int channel = GetDlgItemInt(IDC_EDIT_1, &ret);
- if (ret == TRUE)
- {
- _delayEstimate1 = false;
- _rxVad = false;
- _veRtpRtcpPtr->DeRegisterRTPObserver(channel);
- TEST(_veBasePtr->DeleteChannel(channel) == 0, _T("DeleteChannel(channel=%d)"), channel);
- SetDlgItemText(IDC_EDIT_1, _T(""));
- GetDlgItem(IDC_BUTTON_CREATE_1)->EnableWindow(TRUE);
- GetDlgItem(IDC_BUTTON_DELETE_1)->EnableWindow(FALSE);
- GetDlgItem(IDC_COMBO_IP_1)->EnableWindow(FALSE);
- GetDlgItem(IDC_EDIT_TX_PORT_1)->EnableWindow(FALSE);
- GetDlgItem(IDC_EDIT_RX_PORT_1)->EnableWindow(FALSE);
- GetDlgItem(IDC_COMBO_CODEC_1)->EnableWindow(FALSE);
- GetDlgItem(IDC_LIST_CODEC_1)->EnableWindow(FALSE);
- GetDlgItem(IDC_EDIT_CODEC_1)->EnableWindow(FALSE);
- GetDlgItem(IDC_BUTTON_START_LISTEN_1)->EnableWindow(FALSE);
- GetDlgItem(IDC_BUTTON_START_PLAYOUT_1)->EnableWindow(FALSE);
- GetDlgItem(IDC_BUTTON_START_SEND_1)->EnableWindow(FALSE);
- GetDlgItem(IDC_BUTTON_STOP_LISTEN_1)->EnableWindow(FALSE);
- GetDlgItem(IDC_BUTTON_STOP_PLAYOUT_1)->EnableWindow(FALSE);
- GetDlgItem(IDC_BUTTON_STOP_SEND_1)->EnableWindow(FALSE);
- GetDlgItem(IDC_BUTTON_DTMF_1)->EnableWindow(FALSE);
- GetDlgItem(IDC_CHECK_EXT_TRANS_1)->EnableWindow(FALSE);
- GetDlgItem(IDC_CHECK_PLAY_FILE_IN_1)->EnableWindow(FALSE);
- GetDlgItem(IDC_CHECK_PLAY_FILE_OUT_1)->EnableWindow(FALSE);
- GetDlgItem(IDC_CHECK_EXT_MEDIA_IN_1)->EnableWindow(FALSE);
- GetDlgItem(IDC_CHECK_EXT_MEDIA_OUT_1)->EnableWindow(FALSE);
- GetDlgItem(IDC_CHECK_VAD_1)->EnableWindow(FALSE);
- GetDlgItem(IDC_CHECK_MUTE_IN_1)->EnableWindow(FALSE);
- GetDlgItem(IDC_CHECK_SRTP_TX_1)->EnableWindow(FALSE);
- GetDlgItem(IDC_CHECK_SRTP_RX_1)->EnableWindow(FALSE);
- GetDlgItem(IDC_CHECK_EXT_ENCRYPTION_1)->EnableWindow(FALSE);
- GetDlgItem(IDC_CHECK_CONFERENCE_1)->EnableWindow(FALSE);
- GetDlgItem(IDC_CHECK_ON_HOLD_1)->EnableWindow(FALSE);
- GetDlgItem(IDC_CHECK_DELAY_ESTIMATE_1)->EnableWindow(FALSE);
- GetDlgItem(IDC_CHECK_AGC_1)->EnableWindow(FALSE);
- GetDlgItem(IDC_CHECK_NS_1)->EnableWindow(FALSE);
- GetDlgItem(IDC_CHECK_RXVAD)->EnableWindow(FALSE);
- GetDlgItem(IDC_CHECK_RED)->EnableWindow(FALSE);
- SetDlgItemText(IDC_EDIT_RXVAD, _T(""));
- GetDlgItem(IDC_EDIT_RXVAD)->EnableWindow(FALSE);
- CButton* button = (CButton*)GetDlgItem(IDC_CHECK_EXT_TRANS_1);
- button->SetCheck(BST_UNCHECKED);
- button = (CButton*)GetDlgItem(IDC_CHECK_PLAY_FILE_IN_1);
- button->SetCheck(BST_UNCHECKED);
- button = (CButton*)GetDlgItem(IDC_CHECK_PLAY_FILE_OUT_1);
- button->SetCheck(BST_UNCHECKED);
- button = (CButton*)GetDlgItem(IDC_CHECK_EXT_MEDIA_IN_1);
- button->SetCheck(BST_UNCHECKED);
- button = (CButton*)GetDlgItem(IDC_CHECK_EXT_MEDIA_OUT_1);
- button->SetCheck(BST_UNCHECKED);
- button = (CButton*)GetDlgItem(IDC_CHECK_VAD_1);
- button->SetCheck(BST_UNCHECKED);
- button = (CButton*)GetDlgItem(IDC_CHECK_MUTE_IN_1);
- button->SetCheck(BST_UNCHECKED);
- button = (CButton*)GetDlgItem(IDC_CHECK_SRTP_TX_1);
- button->SetCheck(BST_UNCHECKED);
- button = (CButton*)GetDlgItem(IDC_CHECK_SRTP_RX_1);
- button->SetCheck(BST_UNCHECKED);
- button = (CButton*)GetDlgItem(IDC_CHECK_EXT_ENCRYPTION_1);
- button->SetCheck(BST_UNCHECKED);
- button = (CButton*)GetDlgItem(IDC_CHECK_CONFERENCE_1);
- button->SetCheck(BST_UNCHECKED);
- button = (CButton*)GetDlgItem(IDC_CHECK_ON_HOLD_1);
- button->SetCheck(BST_UNCHECKED);
- button = (CButton*)GetDlgItem(IDC_CHECK_DELAY_ESTIMATE_1);
- button->SetCheck(BST_UNCHECKED);
- button = (CButton*)GetDlgItem(IDC_CHECK_AGC_1);
- button->SetCheck(BST_UNCHECKED);
- button = (CButton*)GetDlgItem(IDC_CHECK_NS_1);
- button->SetCheck(BST_UNCHECKED);
- button = (CButton*)GetDlgItem(IDC_CHECK_RXVAD);
- button->SetCheck(BST_UNCHECKED);
- button = (CButton*)GetDlgItem(IDC_CHECK_RED);
- button->SetCheck(BST_UNCHECKED);
- }
-}
-
-void CWinTestDlg::OnBnClickedButtonDelete2()
-{
- BOOL ret;
- int channel = GetDlgItemInt(IDC_EDIT_2, &ret);
- if (ret == TRUE)
- {
- _delayEstimate2 = false;
- _veRtpRtcpPtr->DeRegisterRTPObserver(channel);
- TEST(_veBasePtr->DeleteChannel(channel) == 0, _T("DeleteChannel(%d)"), channel);
- SetDlgItemText(IDC_EDIT_2, _T(""));
- GetDlgItem(IDC_BUTTON_CREATE_2)->EnableWindow(TRUE);
- GetDlgItem(IDC_BUTTON_DELETE_2)->EnableWindow(FALSE);
- GetDlgItem(IDC_COMBO_IP_2)->EnableWindow(FALSE);
- GetDlgItem(IDC_EDIT_TX_PORT_2)->EnableWindow(FALSE);
- GetDlgItem(IDC_EDIT_RX_PORT_2)->EnableWindow(FALSE);
- GetDlgItem(IDC_COMBO_CODEC_2)->EnableWindow(FALSE);
- GetDlgItem(IDC_BUTTON_START_LISTEN_2)->EnableWindow(FALSE);
- GetDlgItem(IDC_BUTTON_START_PLAYOUT_2)->EnableWindow(FALSE);
- GetDlgItem(IDC_BUTTON_START_SEND_2)->EnableWindow(FALSE);
- GetDlgItem(IDC_BUTTON_STOP_LISTEN_2)->EnableWindow(FALSE);
- GetDlgItem(IDC_BUTTON_STOP_PLAYOUT_2)->EnableWindow(FALSE);
- GetDlgItem(IDC_BUTTON_STOP_SEND_2)->EnableWindow(FALSE);
- GetDlgItem(IDC_CHECK_EXT_TRANS_2)->EnableWindow(FALSE);
- GetDlgItem(IDC_CHECK_PLAY_FILE_IN_2)->EnableWindow(FALSE);
- GetDlgItem(IDC_CHECK_PLAY_FILE_OUT_2)->EnableWindow(FALSE);
- GetDlgItem(IDC_CHECK_EXT_MEDIA_IN_2)->EnableWindow(FALSE);
- GetDlgItem(IDC_CHECK_EXT_MEDIA_OUT_2)->EnableWindow(FALSE);
- GetDlgItem(IDC_CHECK_MUTE_IN_2)->EnableWindow(FALSE);
- GetDlgItem(IDC_CHECK_VAD_3)->EnableWindow(FALSE);
- GetDlgItem(IDC_CHECK_SRTP_TX_2)->EnableWindow(FALSE);
- GetDlgItem(IDC_CHECK_SRTP_RX_2)->EnableWindow(FALSE);
- GetDlgItem(IDC_CHECK_EXT_ENCRYPTION_2)->EnableWindow(FALSE);
- GetDlgItem(IDC_CHECK_CONFERENCE_2)->EnableWindow(FALSE);
- GetDlgItem(IDC_BUTTON_DTMF_2)->EnableWindow(FALSE);
- GetDlgItem(IDC_CHECK_ON_HOLD_2)->EnableWindow(FALSE);
- CButton* button = (CButton*)GetDlgItem(IDC_CHECK_EXT_TRANS_2);
- button->SetCheck(BST_UNCHECKED);
- button = (CButton*)GetDlgItem(IDC_CHECK_PLAY_FILE_IN_2);
- button->SetCheck(BST_UNCHECKED);
- button = (CButton*)GetDlgItem(IDC_CHECK_PLAY_FILE_OUT_2);
- button->SetCheck(BST_UNCHECKED);
- button = (CButton*)GetDlgItem(IDC_CHECK_EXT_MEDIA_IN_2);
- button->SetCheck(BST_UNCHECKED);
- button = (CButton*)GetDlgItem(IDC_CHECK_EXT_MEDIA_OUT_2);
- button->SetCheck(BST_UNCHECKED);
- button = (CButton*)GetDlgItem(IDC_CHECK_VAD_3);
- button->SetCheck(BST_UNCHECKED);
- button = (CButton*)GetDlgItem(IDC_CHECK_MUTE_IN_2);
- button->SetCheck(BST_UNCHECKED);
- button = (CButton*)GetDlgItem(IDC_CHECK_SRTP_TX_2);
- button->SetCheck(BST_UNCHECKED);
- button = (CButton*)GetDlgItem(IDC_CHECK_SRTP_RX_2);
- button->SetCheck(BST_UNCHECKED);
- button = (CButton*)GetDlgItem(IDC_CHECK_EXT_ENCRYPTION_2);
- button->SetCheck(BST_UNCHECKED);
- button = (CButton*)GetDlgItem(IDC_CHECK_CONFERENCE_2);
- button->SetCheck(BST_UNCHECKED);
- button = (CButton*)GetDlgItem(IDC_CHECK_ON_HOLD_2);
- button->SetCheck(BST_UNCHECKED);
- }
-}
-
-void CWinTestDlg::OnCbnSelchangeComboIp1()
-{
- int channel = GetDlgItemInt(IDC_EDIT_1);
- CString str;
- int port = GetDlgItemInt(IDC_EDIT_TX_PORT_1);
- CComboBox* comboIP = (CComboBox*)GetDlgItem(IDC_COMBO_IP_1);
- int n = comboIP->GetLBTextLen(0);
- comboIP->GetLBText(0, str.GetBuffer(n));
- TEST(_veBasePtr->SetSendDestination(channel, port, TcharToChar(str.GetBuffer(n), -1)) == 0,
- _T("SetSendDestination(channel=%d, port=%d, ip=%s)"), channel, port, str.GetBuffer(n));
- str.ReleaseBuffer();
-}
-
-void CWinTestDlg::OnCbnSelchangeComboIp2()
-{
- int channel = GetDlgItemInt(IDC_EDIT_2);
- CString str;
- int port = GetDlgItemInt(IDC_EDIT_TX_PORT_2);
- CComboBox* comboIP = (CComboBox*)GetDlgItem(IDC_COMBO_IP_2);
- int n = comboIP->GetLBTextLen(0);
- comboIP->GetLBText(0, str.GetBuffer(n));
- TEST(_veBasePtr->SetSendDestination(channel, port, TcharToChar(str.GetBuffer(n), -1)) == 0,
- _T("SetSendDestination(channel=%d, port=%d, ip=%s)"), channel, port, str.GetBuffer(n));
- str.ReleaseBuffer();
-}
-
-void CWinTestDlg::OnCbnSelchangeComboCodec1()
-{
- int channel = GetDlgItemInt(IDC_EDIT_1);
-
- CodecInst codec;
- CComboBox* comboCodec(NULL);
- comboCodec = (CComboBox*)GetDlgItem(IDC_COMBO_CODEC_1);
- int index = comboCodec->GetCurSel();
- _veCodecPtr->GetCodec(index, codec);
- if (strncmp(codec.plname, "ISAC", 4) == 0)
- {
- // Set iSAC to adaptive mode by default.
- codec.rate = -1;
- }
- TEST(_veCodecPtr->SetSendCodec(channel, codec) == 0,
- _T("SetSendCodec(channel=%d, plname=%s, pltype=%d, plfreq=%d, rate=%d, pacsize=%d, channels=%d)"),
- channel, CharToTchar(codec.plname, 32), codec.pltype, codec.plfreq, codec.rate, codec.pacsize, codec.channels);
-
- CListBox* list = (CListBox*)GetDlgItem(IDC_LIST_CODEC_1);
- list->SetCurSel(0);
- SetDlgItemInt(IDC_EDIT_CODEC_1, codec.pltype);
-}
-
-void CWinTestDlg::OnLbnSelchangeListCodec1()
-{
- int channel = GetDlgItemInt(IDC_EDIT_1);
-
- CListBox* list = (CListBox*)GetDlgItem(IDC_LIST_CODEC_1);
- int listIdx = list->GetCurSel();
- if (listIdx < 0)
- return;
- CString str;
- list->GetText(listIdx, str);
-
- CodecInst codec;
- _veCodecPtr->GetSendCodec(channel, codec);
-
- int value = GetDlgItemInt(IDC_EDIT_CODEC_1);
- if (str == _T("pltype"))
- {
- codec.pltype = value;
- }
- else if (str == _T("plfreq"))
- {
- codec.plfreq = value;
- }
- else if (str == _T("pacsize"))
- {
- codec.pacsize = value;
- }
- else if (str == _T("channels"))
- {
- codec.channels = value;
- }
- else if (str == _T("rate"))
- {
- codec.rate = value;
- }
- TEST(_veCodecPtr->SetSendCodec(channel, codec) == 0,
- _T("SetSendCodec(channel=%d, plname=%s, pltype=%d, plfreq=%d, rate=%d, pacsize=%d, channels=%d)"),
- channel, CharToTchar(codec.plname, 32), codec.pltype, codec.plfreq, codec.rate, codec.pacsize, codec.channels);
-}
-
-void CWinTestDlg::OnCbnSelchangeComboCodec2()
-{
- int channel = GetDlgItemInt(IDC_EDIT_2);
-
- CodecInst codec;
- CComboBox* comboCodec(NULL);
- comboCodec = (CComboBox*)GetDlgItem(IDC_COMBO_CODEC_2);
- int index = comboCodec->GetCurSel();
- _veCodecPtr->GetCodec(index, codec);
- TEST(_veCodecPtr->SetSendCodec(channel, codec) == 0,
- _T("SetSendCodec(channel=%d, plname=%s, pltype=%d, plfreq=%d, rate=%d, pacsize=%d, channels=%d)"),
- channel, CharToTchar(codec.plname, 32), codec.pltype, codec.plfreq, codec.rate, codec.pacsize, codec.channels);
-}
-
-void CWinTestDlg::OnBnClickedButtonStartListen1()
-{
- int ret1(0);
- int ret2(0);
- int channel = GetDlgItemInt(IDC_EDIT_1);
- int port = GetDlgItemInt(IDC_EDIT_RX_PORT_1);
- TEST((ret1 = _veBasePtr->SetLocalReceiver(channel, port)) == 0, _T("SetLocalReceiver(channel=%d, port=%d)"), channel, port);
- TEST((ret2 = _veBasePtr->StartReceive(channel)) == 0, _T("StartReceive(channel=%d)"), channel);
- if (ret1 == 0 && ret2 == 0)
- {
- GetDlgItem(IDC_BUTTON_START_LISTEN_1)->EnableWindow(FALSE);
- GetDlgItem(IDC_BUTTON_STOP_LISTEN_1)->EnableWindow(TRUE);
- }
-}
-
-void CWinTestDlg::OnBnClickedButtonStartListen2()
-{
- int ret1(0);
- int ret2(0);
- int channel = GetDlgItemInt(IDC_EDIT_2);
- int port = GetDlgItemInt(IDC_EDIT_RX_PORT_2);
- TEST((ret1 = _veBasePtr->SetLocalReceiver(channel, port)) == 0, _T("SetLocalReceiver(channel=%d, port=%d)"), channel, port);
- TEST((ret2 = _veBasePtr->StartReceive(channel)) == 0, _T("StartReceive(channel=%d)"), channel);
- if (ret1 == 0 && ret2 == 0)
- {
- GetDlgItem(IDC_BUTTON_START_LISTEN_2)->EnableWindow(FALSE);
- GetDlgItem(IDC_BUTTON_STOP_LISTEN_2)->EnableWindow(TRUE);
- }
-}
-
-void CWinTestDlg::OnBnClickedButtonStopListen1()
-{
- int ret(0);
- int channel = GetDlgItemInt(IDC_EDIT_1);
- TEST((ret = _veBasePtr->StopReceive(channel)) == 0, _T("StopListen(channel=%d)"), channel);
- if (ret == 0)
- {
- GetDlgItem(IDC_BUTTON_START_LISTEN_1)->EnableWindow(TRUE);
- GetDlgItem(IDC_BUTTON_STOP_LISTEN_1)->EnableWindow(FALSE);
- }
-}
-
-void CWinTestDlg::OnBnClickedButtonStopListen2()
-{
- int ret(0);
- int channel = GetDlgItemInt(IDC_EDIT_2);
- TEST((ret = _veBasePtr->StopReceive(channel)) == 0, _T("StopListen(channel=%d)"), channel);
- if (ret == 0)
- {
- GetDlgItem(IDC_BUTTON_START_LISTEN_2)->EnableWindow(TRUE);
- GetDlgItem(IDC_BUTTON_STOP_LISTEN_2)->EnableWindow(FALSE);
- }
-}
-
-void CWinTestDlg::OnBnClickedButtonStartPlayout1()
-{
- int ret(0);
- int channel = GetDlgItemInt(IDC_EDIT_1);
- TEST((ret = _veBasePtr->StartPlayout(channel)) == 0, _T("StartPlayout(channel=%d)"), channel);
- if (ret == 0)
- {
- GetDlgItem(IDC_BUTTON_START_PLAYOUT_1)->EnableWindow(FALSE);
- GetDlgItem(IDC_BUTTON_STOP_PLAYOUT_1)->EnableWindow(TRUE);
- }
-}
-
-void CWinTestDlg::OnBnClickedButtonStartPlayout2()
-{
- int ret(0);
- int channel = GetDlgItemInt(IDC_EDIT_2);
- TEST((ret = _veBasePtr->StartPlayout(channel)) == 0, _T("StartPlayout(channel=%d)"), channel);
- if (ret == 0)
- {
- GetDlgItem(IDC_BUTTON_START_PLAYOUT_2)->EnableWindow(FALSE);
- GetDlgItem(IDC_BUTTON_STOP_PLAYOUT_2)->EnableWindow(TRUE);
- }
-}
-
-void CWinTestDlg::OnBnClickedButtonStopPlayout1()
-{
- int ret(0);
- int channel = GetDlgItemInt(IDC_EDIT_1);
- TEST((ret = _veBasePtr->StopPlayout(channel)) == 0, _T("StopPlayout(channel=%d)"), channel);
- if (ret == 0)
- {
- GetDlgItem(IDC_BUTTON_START_PLAYOUT_1)->EnableWindow(TRUE);
- GetDlgItem(IDC_BUTTON_STOP_PLAYOUT_1)->EnableWindow(FALSE);
- }
-}
-
-void CWinTestDlg::OnBnClickedButtonStopPlayout2()
-{
- int ret(0);
- int channel = GetDlgItemInt(IDC_EDIT_2);
- TEST((ret = _veBasePtr->StopPlayout(channel)) == 0, _T("StopPlayout(channel=%d)"));
- if (ret == 0)
- {
- GetDlgItem(IDC_BUTTON_START_PLAYOUT_2)->EnableWindow(TRUE);
- GetDlgItem(IDC_BUTTON_STOP_PLAYOUT_2)->EnableWindow(FALSE);
- }
-}
-
-void CWinTestDlg::OnBnClickedButtonStartSend1()
-{
- UpdateData(TRUE); // update IP address
-
- int ret(0);
- int channel = GetDlgItemInt(IDC_EDIT_1);
- if (!_externalTransport)
- {
- CString str;
- int port = GetDlgItemInt(IDC_EDIT_TX_PORT_1);
- TEST(_veBasePtr->SetSendDestination(channel, port, TcharToChar(_strComboIp1.GetBuffer(7), -1)) == 0,
- _T("SetSendDestination(channel=%d, port=%d, ip=%s)"), channel, port, _strComboIp1.GetBuffer(7));
- str.ReleaseBuffer();
- }
-
- //_veVideoSyncPtr->SetInitTimestamp(0,0);
- // OnCbnSelchangeComboCodec1();
-
- TEST((ret = _veBasePtr->StartSend(channel)) == 0, _T("StartSend(channel=%d)"), channel);
- if (ret == 0)
- {
- GetDlgItem(IDC_BUTTON_START_SEND_1)->EnableWindow(FALSE);
- GetDlgItem(IDC_BUTTON_STOP_SEND_1)->EnableWindow(TRUE);
- }
-}
-
-void CWinTestDlg::OnBnClickedButtonStartSend2()
-{
- UpdateData(TRUE); // update IP address
-
- int ret(0);
- int channel = GetDlgItemInt(IDC_EDIT_2);
- if (!_externalTransport)
- {
- CString str;
- int port = GetDlgItemInt(IDC_EDIT_TX_PORT_2);
- TEST(_veBasePtr->SetSendDestination(channel, port, TcharToChar(_strComboIp2.GetBuffer(7), -1)) == 0,
- _T("SetSendDestination(channel=%d, port=%d, ip=%s)"), channel, port, _strComboIp2.GetBuffer(7));
- str.ReleaseBuffer();
- }
-
- // OnCbnSelchangeComboCodec2();
-
- TEST((ret = _veBasePtr->StartSend(channel)) == 0, _T("StartSend(channel=%d)"), channel);
- if (ret == 0)
- {
- GetDlgItem(IDC_BUTTON_START_SEND_2)->EnableWindow(FALSE);
- GetDlgItem(IDC_BUTTON_STOP_SEND_2)->EnableWindow(TRUE);
- }
-}
-
-void CWinTestDlg::OnBnClickedButtonStopSend1()
-{
- int ret(0);
- int channel = GetDlgItemInt(IDC_EDIT_1);
- TEST((ret = _veBasePtr->StopSend(channel)) == 0, _T("StopSend(channel=%d)"), channel);
- if (ret == 0)
- {
- GetDlgItem(IDC_BUTTON_START_SEND_1)->EnableWindow(TRUE);
- GetDlgItem(IDC_BUTTON_STOP_SEND_1)->EnableWindow(FALSE);
- }
-}
-
-void CWinTestDlg::OnBnClickedButtonStopSend2()
-{
- int ret(0);
- int channel = GetDlgItemInt(IDC_EDIT_2);
- TEST((ret = _veBasePtr->StopSend(channel)) == 0, _T("StopSend(channel=%d)"), channel);
- if (ret == 0)
- {
- GetDlgItem(IDC_BUTTON_START_SEND_2)->EnableWindow(TRUE);
- GetDlgItem(IDC_BUTTON_STOP_SEND_2)->EnableWindow(FALSE);
- }
-}
-
-void CWinTestDlg::OnBnClickedCheckExtTrans1()
-{
- int ret(0);
- int channel = GetDlgItemInt(IDC_EDIT_1);
- CButton* button = (CButton*)GetDlgItem(IDC_CHECK_EXT_TRANS_1);
- int check = button->GetCheck();
- const bool enable = (check == BST_CHECKED);
- if (enable)
- {
- TEST((ret = _veNetworkPtr->RegisterExternalTransport(channel, *_transportPtr)) == 0,
- _T("RegisterExternalTransport(channel=%d, transport=0x%x)"), channel, _transportPtr);
- }
- else
- {
- TEST((ret = _veNetworkPtr->DeRegisterExternalTransport(channel)) == 0,
- _T("DeRegisterExternalTransport(channel=%d)"), channel);
- }
- if (ret == 0)
- {
- _externalTransport = enable;
- }
- else
- {
- // restore inital state since API call failed
- button->SetCheck((check == BST_CHECKED) ? BST_UNCHECKED : BST_CHECKED);
- }
-}
-
-void CWinTestDlg::OnBnClickedCheckExtTrans2()
-{
- int ret(0);
- int channel = GetDlgItemInt(IDC_EDIT_2);
- CButton* button = (CButton*)GetDlgItem(IDC_CHECK_EXT_TRANS_2);
- int check = button->GetCheck();
- const bool enable = (check == BST_CHECKED);
- if (enable)
- {
- TEST((ret = _veNetworkPtr->RegisterExternalTransport(channel, *_transportPtr)) == 0,
- _T("RegisterExternalTransport(channel=%d, transport=0x%x)"), channel, _transportPtr);
- }
- else
- {
- TEST((ret = _veNetworkPtr->DeRegisterExternalTransport(channel)) == 0,
- _T("DeRegisterExternalTransport(channel=%d)"), channel);
- }
- if (ret == 0)
- {
- _externalTransport = enable;
- }
- else
- {
- // restore inital state since API call failed
- button->SetCheck((check == BST_CHECKED) ? BST_UNCHECKED : BST_CHECKED);
- }
-}
-
-void CWinTestDlg::OnBnClickedCheckPlayFileIn1()
-{
- std::string micFile = _long_audio_file_path + "audio_short16.pcm";
-
- int ret(0);
- int channel = GetDlgItemInt(IDC_EDIT_1);
- CButton* button = (CButton*)GetDlgItem(IDC_CHECK_PLAY_FILE_IN_1);
- int check = button->GetCheck();
- const bool enable = (check == BST_CHECKED);
- if (enable)
- {
- bool mix;
- const bool loop(true);
- const FileFormats format = kFileFormatPcm16kHzFile;
- const float scale(1.0);
-
- (_checkPlayFileIn1 %2 == 0) ? mix = true : mix = false;
- TEST((ret = _veFilePtr->StartPlayingFileAsMicrophone(channel,
- micFile.c_str(), loop, mix, format, scale) == 0),
- _T("StartPlayingFileAsMicrophone(channel=%d, file=%s, loop=%d, ")
- _T("mix=%d, format=%d, scale=%2.1f)"),
- channel, CharToTchar(micFile.c_str(), -1),
- loop, mix, format, scale);
- _checkPlayFileIn1++;
- }
- else
- {
- TEST((ret = _veFilePtr->StopPlayingFileAsMicrophone(channel) == 0),
- _T("StopPlayingFileAsMicrophone(channel=%d)"), channel);
- }
- if (ret == -1)
- {
- // restore inital state since API call failed
- button->SetCheck((check == BST_CHECKED) ? BST_UNCHECKED : BST_CHECKED);
- }
-}
-
-void CWinTestDlg::OnBnClickedCheckPlayFileIn2()
-{
- std::string micFile = _long_audio_file_path + "audio_long16.pcm";
-
- int ret(0);
- int channel = GetDlgItemInt(IDC_EDIT_2);
- CButton* button = (CButton*)GetDlgItem(IDC_CHECK_PLAY_FILE_IN_2);
- int check = button->GetCheck();
- const bool enable = (check == BST_CHECKED);
- if (enable)
- {
- bool mix;
- const bool loop(true);
- const FileFormats format = kFileFormatPcm16kHzFile;
- const float scale(1.0);
-
- (_checkPlayFileIn2 %2 == 0) ? mix = true : mix = false;
- TEST((ret = _veFilePtr->StartPlayingFileAsMicrophone(channel,
- micFile.c_str(), loop, mix, format, scale) == 0),
- _T("StartPlayingFileAsMicrophone(channel=%d, file=%s, loop=%d, ")
- _T("mix=%d, format=%d, scale=%2.1f)"),
- channel, CharToTchar(micFile.c_str(), -1),
- loop, mix, format, scale);
- _checkPlayFileIn2++;
- }
- else
- {
- TEST((ret = _veFilePtr->StopPlayingFileAsMicrophone(channel) == 0),
- _T("StopPlayingFileAsMicrophone(channel=%d)"), channel);
- }
- if (ret == -1)
- {
- // restore inital state since API call failed
- button->SetCheck((check == BST_CHECKED) ? BST_UNCHECKED : BST_CHECKED);
- }
-}
-
-void CWinTestDlg::OnBnClickedCheckPlayFileOut1()
-{
- const FileFormats formats[8] = {{kFileFormatPcm16kHzFile},
- {kFileFormatWavFile},
- {kFileFormatWavFile},
- {kFileFormatWavFile},
- {kFileFormatWavFile},
- {kFileFormatWavFile},
- {kFileFormatWavFile},
- {kFileFormatWavFile}};
- // File path is relative to the location of 'voice_engine.gyp'.
- const char spkrFiles[8][64] = {{"audio_short16.pcm"},
- {"audio_tiny8.wav"},
- {"audio_tiny11.wav"},
- {"audio_tiny16.wav"},
- {"audio_tiny22.wav"},
- {"audio_tiny32.wav"},
- {"audio_tiny44.wav"},
- {"audio_tiny48.wav"}};
- int ret(0);
- int channel = GetDlgItemInt(IDC_EDIT_1);
- CButton* button = (CButton*)GetDlgItem(IDC_CHECK_PLAY_FILE_OUT_1);
- int check = button->GetCheck();
- const bool enable = (check == BST_CHECKED);
- if (enable)
- {
- const bool loop(true);
- const float volumeScaling(1.0);
- const int startPointMs(0);
- const int stopPointMs(0);
- const FileFormats format = formats[_checkPlayFileOut1 % 8];
- std::string spkrFile = _long_audio_file_path +
- spkrFiles[_checkPlayFileOut1 % 8];
-
- CString str;
- if (_checkPlayFileOut1 % 8 == 0)
- {
- str = _T("kFileFormatPcm16kHzFile");
- }
- else
- {
- str = _T("kFileFormatWavFile");
- }
- // (_checkPlayFileOut1 %2 == 0) ? mix = true : mix = false;
- TEST((ret = _veFilePtr->StartPlayingFileLocally(channel,
- spkrFile.c_str(), loop, format, volumeScaling,
- startPointMs,stopPointMs) == 0),
- _T("StartPlayingFileLocally(channel=%d, file=%s, loop=%d, ")
- _T("format=%s, scale=%2.1f, start=%d, stop=%d)"),
- channel, CharToTchar(spkrFile.c_str(), -1),
- loop, str, volumeScaling, startPointMs, stopPointMs);
- _checkPlayFileOut1++;
- }
- else
- {
- TEST((ret = _veFilePtr->StopPlayingFileLocally(channel) == 0),
- _T("StopPlayingFileLocally(channel=%d)"), channel);
- }
- if (ret == -1)
- {
- // restore inital state since API call failed
- button->SetCheck((check == BST_CHECKED) ? BST_UNCHECKED : BST_CHECKED);
- }
-}
-
-void CWinTestDlg::OnBnClickedCheckPlayFileOut2()
-{
- std::string spkrFile = _long_audio_file_path + "audio_long16.pcm";
-
- int ret(0);
- int channel = GetDlgItemInt(IDC_EDIT_2);
- CButton* button = (CButton*)GetDlgItem(IDC_CHECK_PLAY_FILE_OUT_2);
- int check = button->GetCheck();
- const bool enable = (check == BST_CHECKED);
- if (enable)
- {
- const bool loop(true);
- const FileFormats format = kFileFormatPcm16kHzFile;
- const float volumeScaling(1.0);
- const int startPointMs(0);
- const int stopPointMs(0);
-
- // (_checkPlayFileOut2 %2 == 0) ? mix = true : mix = false;
- TEST((ret = _veFilePtr->StartPlayingFileLocally(channel,
- spkrFile.c_str(), loop, format, volumeScaling,
- startPointMs,stopPointMs) == 0),
- _T("StartPlayingFileLocally(channel=%d, file=%s, loop=%d, ")
- _T("format=%d, scale=%2.1f, start=%d, stop=%d)"),
- channel, CharToTchar(spkrFile.c_str(), -1),
- loop, format, volumeScaling, startPointMs, stopPointMs);
- // _checkPlayFileIn2++;
- }
- else
- {
- TEST((ret = _veFilePtr->StopPlayingFileLocally(channel) == 0),
- _T("StopPlayingFileLocally(channel=%d)"), channel);
- }
- if (ret == -1)
- {
- // restore inital state since API call failed
- button->SetCheck((check == BST_CHECKED) ? BST_UNCHECKED : BST_CHECKED);
- }
-}
-
-void CWinTestDlg::OnBnClickedCheckExtMediaIn1()
-{
- int channel = GetDlgItemInt(IDC_EDIT_1);
- CButton* buttonExtTrans = (CButton*)GetDlgItem(IDC_CHECK_EXT_MEDIA_IN_1);
- int check = buttonExtTrans->GetCheck();
- const bool enable = (check == BST_CHECKED);
- if (enable)
- {
- TEST(_veExternalMediaPtr->RegisterExternalMediaProcessing(channel, kRecordingPerChannel, *_externalMediaPtr) == 0,
- _T("RegisterExternalMediaProcessing(channel=%d, kRecordingPerChannel, processObject=0x%x)"), channel, _externalMediaPtr);
- }
- else
- {
- TEST(_veExternalMediaPtr->DeRegisterExternalMediaProcessing(channel, kRecordingPerChannel) == 0,
- _T("DeRegisterExternalMediaProcessing(channel=%d, kRecordingPerChannel)"), channel);
- }
-}
-
-void CWinTestDlg::OnBnClickedCheckExtMediaIn2()
-{
- int channel = GetDlgItemInt(IDC_EDIT_2);
- CButton* buttonExtTrans = (CButton*)GetDlgItem(IDC_CHECK_EXT_MEDIA_IN_2);
- int check = buttonExtTrans->GetCheck();
- const bool enable = (check == BST_CHECKED);
- if (enable)
- {
- TEST(_veExternalMediaPtr->RegisterExternalMediaProcessing(channel, kRecordingPerChannel, *_externalMediaPtr) == 0,
- _T("RegisterExternalMediaProcessing(channel=%d, kRecordingPerChannel, processObject=0x%x)"), channel, _externalMediaPtr);
- }
- else
- {
- TEST(_veExternalMediaPtr->DeRegisterExternalMediaProcessing(channel, kRecordingPerChannel) == 0,
- _T("DeRegisterExternalMediaProcessing(channel=%d, kRecordingPerChannel)"), channel);
- }
-}
-
-void CWinTestDlg::OnBnClickedCheckExtMediaOut1()
-{
- int channel = GetDlgItemInt(IDC_EDIT_1);
- CButton* buttonExtTrans = (CButton*)GetDlgItem(IDC_CHECK_EXT_MEDIA_OUT_1);
- int check = buttonExtTrans->GetCheck();
- const bool enable = (check == BST_CHECKED);
- if (enable)
- {
- TEST(_veExternalMediaPtr->RegisterExternalMediaProcessing(channel, kPlaybackPerChannel, *_externalMediaPtr) == 0,
- _T("RegisterExternalMediaProcessing(channel=%d, kPlaybackPerChannel, processObject=0x%x)"), channel, _externalMediaPtr);
- }
- else
- {
- TEST(_veExternalMediaPtr->DeRegisterExternalMediaProcessing(channel, kPlaybackPerChannel) == 0,
- _T("DeRegisterExternalMediaProcessing(channel=%d, kPlaybackPerChannel)"), channel);
- }
-}
-
-void CWinTestDlg::OnBnClickedCheckExtMediaOut2()
-{
- int channel = GetDlgItemInt(IDC_EDIT_2);
- CButton* buttonExtTrans = (CButton*)GetDlgItem(IDC_CHECK_EXT_MEDIA_OUT_2);
- int check = buttonExtTrans->GetCheck();
- const bool enable = (check == BST_CHECKED);
- if (enable)
- {
- TEST(_veExternalMediaPtr->RegisterExternalMediaProcessing(channel, kPlaybackPerChannel, *_externalMediaPtr) == 0,
- _T("RegisterExternalMediaProcessing(channel=%d, kPlaybackPerChannel, processObject=0x%x)"), channel, _externalMediaPtr);
- }
- else
- {
- TEST(_veExternalMediaPtr->DeRegisterExternalMediaProcessing(channel, kPlaybackPerChannel) == 0,
- _T("DeRegisterExternalMediaProcessing(channel=%d, kPlaybackPerChannel)"), channel);
- }
-}
-
-void CWinTestDlg::OnBnClickedCheckVad1()
-{
- int ret(0);
- int channel = GetDlgItemInt(IDC_EDIT_1);
- CButton* button = (CButton*)GetDlgItem(IDC_CHECK_VAD_1);
- int check = button->GetCheck();
- const bool enable = (check == BST_CHECKED);
- if (enable)
- {
- CString str;
- VadModes mode(kVadConventional);
- if (_checkVAD1 % 4 == 0)
- {
- mode = kVadConventional;
- str = _T("kVadConventional");
- }
- else if (_checkVAD1 % 4 == 1)
- {
- mode = kVadAggressiveLow;
- str = _T("kVadAggressiveLow");
- }
- else if (_checkVAD1 % 4 == 2)
- {
- mode = kVadAggressiveMid;
- str = _T("kVadAggressiveMid");
- }
- else if (_checkVAD1 % 4 == 3)
- {
- mode = kVadAggressiveHigh;
- str = _T("kVadAggressiveHigh");
- }
- const bool disableDTX(false);
- TEST((ret = _veCodecPtr->SetVADStatus(channel, true, mode, disableDTX) == 0),
- _T("SetVADStatus(channel=%d, enable=%d, mode=%s, disableDTX=%d)"), channel, enable, str, disableDTX);
- _checkVAD1++;
- }
- else
- {
- TEST((ret = _veCodecPtr->SetVADStatus(channel, false)) == 0, _T("SetVADStatus(channel=%d, enable=%d)"), channel, false);
- }
- if (ret == -1)
- {
- // restore inital state since API call failed
- button->SetCheck((check == BST_CHECKED) ? BST_UNCHECKED : BST_CHECKED);
- }
-}
-
-void CWinTestDlg::OnBnClickedCheckVad2()
-{
- int ret(0);
- int channel = GetDlgItemInt(IDC_EDIT_2);
- CButton* button = (CButton*)GetDlgItem(IDC_CHECK_VAD_2);
- int check = button->GetCheck();
- const bool enable = (check == BST_CHECKED);
- if (enable)
- {
- CString str;
- VadModes mode(kVadConventional);
- if (_checkVAD2 % 4 == 0)
- {
- mode = kVadConventional;
- str = _T("kVadConventional");
- }
- else if (_checkVAD2 % 4 == 1)
- {
- mode = kVadAggressiveLow;
- str = _T("kVadAggressiveLow");
- }
- else if (_checkVAD2 % 4 == 2)
- {
- mode = kVadAggressiveMid;
- str = _T("kVadAggressiveMid");
- }
- else if (_checkVAD2 % 4 == 3)
- {
- mode = kVadAggressiveHigh;
- str = _T("kVadAggressiveHigh");
- }
- const bool disableDTX(false);
- TEST((ret = _veCodecPtr->SetVADStatus(channel, true, mode, disableDTX)) == 0,
- _T("SetVADStatus(channel=%d, enable=%d, mode=%s, disableDTX=%d)"), channel, enable, str, disableDTX);
- _checkVAD2++;
- }
- else
- {
- TEST((ret = _veCodecPtr->SetVADStatus(channel, false) == 0), _T("SetVADStatus(channel=%d, enable=%d)"), channel, false);
- }
- if (ret == -1)
- {
- // restore inital state since API call failed
- button->SetCheck((check == BST_CHECKED) ? BST_UNCHECKED : BST_CHECKED);
- }
-}
-
-void CWinTestDlg::OnBnClickedCheckMuteIn1()
-{
- int channel = GetDlgItemInt(IDC_EDIT_1);
- CButton* buttonMute = (CButton*)GetDlgItem(IDC_CHECK_MUTE_IN_1);
- int check = buttonMute->GetCheck();
- const bool enable = (check == BST_CHECKED);
- TEST(_veVolumeControlPtr->SetInputMute(channel, enable) == 0,
- _T("SetInputMute(channel=%d, enable=%d)"), channel, enable);
-}
-
-void CWinTestDlg::OnBnClickedCheckMuteIn2()
-{
- int channel = GetDlgItemInt(IDC_EDIT_2);
- CButton* buttonMute = (CButton*)GetDlgItem(IDC_CHECK_MUTE_IN_2);
- int check = buttonMute->GetCheck();
- const bool enable = (check == BST_CHECKED);
- TEST(_veVolumeControlPtr->SetInputMute(channel, enable) == 0,
- _T("SetInputMute(channel=%d, enable=%d)"), channel, enable);
-}
-
-void CWinTestDlg::OnBnClickedCheckSrtpTx1()
-{
- TEST(true, "Built-in SRTP support is deprecated.");
-}
-
-void CWinTestDlg::OnBnClickedCheckSrtpTx2()
-{
- TEST(true, "Built-in SRTP support is deprecated.");
-}
-
-void CWinTestDlg::OnBnClickedCheckSrtpRx1()
-{
- TEST(true, "Built-in SRTP support is deprecated.");
-}
-
-void CWinTestDlg::OnBnClickedCheckSrtpRx2()
-{
- TEST(true, "Built-in SRTP support is deprecated.");
-}
-
-void CWinTestDlg::OnBnClickedCheckExtEncryption1()
-{
- TEST(true, "External Encryption has been removed from the API!");
-}
-
-void CWinTestDlg::OnBnClickedCheckExtEncryption2()
-{
- TEST(true, "External Encryption has been removed from the API!");
-}
-
-void CWinTestDlg::OnBnClickedButtonDtmf1()
-{
- int channel = GetDlgItemInt(IDC_EDIT_1);
- CTelephonyEvent dlgTelephoneEvent(_vePtr, channel, this);
- dlgTelephoneEvent.DoModal();
-}
-
-void CWinTestDlg::OnBnClickedButtonDtmf2()
-{
- int channel = GetDlgItemInt(IDC_EDIT_2);
- CTelephonyEvent dlgTelephoneEvent(_vePtr, channel, this);
- dlgTelephoneEvent.DoModal();
-}
-
-void CWinTestDlg::OnBnClickedCheckConference1()
-{
- // Not supported yet
-}
-
-void CWinTestDlg::OnBnClickedCheckConference2()
-{
- // Not supported yet
-}
-
-void CWinTestDlg::OnBnClickedCheckOnHold1()
-{
- SHORT shiftKeyIsPressed = ::GetAsyncKeyState(VK_SHIFT);
-
- CString str;
- int channel = GetDlgItemInt(IDC_EDIT_1);
- CButton* button = (CButton*)GetDlgItem(IDC_CHECK_ON_HOLD_1);
- int check = button->GetCheck();
-
- if (shiftKeyIsPressed)
- {
- bool enabled(false);
- OnHoldModes mode(kHoldSendAndPlay);
- TEST(_veBasePtr->GetOnHoldStatus(channel, enabled, mode) == 0,
- _T("GetOnHoldStatus(channel=%d, enabled=?, mode=?)"), channel);
- button->SetCheck((check == BST_CHECKED) ? BST_UNCHECKED : BST_CHECKED);
-
- switch (mode)
- {
- case kHoldSendAndPlay:
- str = _T("kHoldSendAndPlay");
- break;
- case kHoldSendOnly:
- str = _T("kHoldSendOnly");
- break;
- case kHoldPlayOnly:
- str = _T("kHoldPlayOnly");
- break;
- default:
- break;
- }
- PRINT_GET_RESULT(_T("enabled=%d, mode=%s"), enabled, str);
- return;
- }
-
- int ret(0);
- const bool enable = (check == BST_CHECKED);
- if (enable)
- {
- OnHoldModes mode(kHoldSendAndPlay);
- if (_checkOnHold1 % 3 == 0)
- {
- mode = kHoldSendAndPlay;
- str = _T("kHoldSendAndPlay");
- }
- else if (_checkOnHold1 % 3 == 1)
- {
- mode = kHoldSendOnly;
- str = _T("kHoldSendOnly");
- }
- else if (_checkOnHold1 % 3 == 2)
- {
- mode = kHoldPlayOnly;
- str = _T("kHoldPlayOnly");
- }
- TEST((ret = _veBasePtr->SetOnHoldStatus(channel, enable, mode)) == 0,
- _T("SetOnHoldStatus(channel=%d, enable=%d, mode=%s)"), channel, enable, str);
- _checkOnHold1++;
- }
- else
- {
- TEST((ret = _veBasePtr->SetOnHoldStatus(channel, enable)) == 0,
- _T("SetOnHoldStatus(channel=%d, enable=%d)"), channel, enable);
- }
-}
-
-void CWinTestDlg::OnBnClickedCheckOnHold2()
-{
- int ret(0);
- int channel = GetDlgItemInt(IDC_EDIT_2);
- CButton* button = (CButton*)GetDlgItem(IDC_CHECK_ON_HOLD_2);
- int check = button->GetCheck();
- const bool enable = (check == BST_CHECKED);
- if (enable)
- {
- CString str;
- OnHoldModes mode(kHoldSendAndPlay);
- if (_checkOnHold1 % 3 == 0)
- {
- mode = kHoldSendAndPlay;
- str = _T("kHoldSendAndPlay");
- }
- else if (_checkOnHold1 % 3 == 1)
- {
- mode = kHoldSendOnly;
- str = _T("kHoldSendOnly");
- }
- else if (_checkOnHold1 % 3 == 2)
- {
- mode = kHoldPlayOnly;
- str = _T("kHoldPlayOnly");
- }
- TEST((ret = _veBasePtr->SetOnHoldStatus(channel, enable, mode)) == 0,
- _T("SetOnHoldStatus(channel=%d, enable=%d, mode=%s)"), channel, enable, str);
- _checkOnHold1++;
- }
- else
- {
- TEST((ret = _veBasePtr->SetOnHoldStatus(channel, enable)) == 0,
- _T("SetOnHoldStatus(channel=%d, enable=%d)"), channel, enable);
- }
-}
-
-void CWinTestDlg::OnBnClickedCheckDelayEstimate1()
-{
- CButton* button = (CButton*)GetDlgItem(IDC_CHECK_DELAY_ESTIMATE_1);
- int check = button->GetCheck();
- const bool enable = (check == BST_CHECKED);
-
- if (enable)
- {
- _delayEstimate1 = true;
- SetDlgItemInt(IDC_EDIT_DELAY_ESTIMATE_1, 0);
- }
- else
- {
- _delayEstimate1 = false;
- SetDlgItemText(IDC_EDIT_DELAY_ESTIMATE_1, _T(""));
- }
-}
-
-void CWinTestDlg::OnBnClickedCheckRxvad()
-{
- int channel = GetDlgItemInt(IDC_EDIT_1);
- CButton* button = (CButton*)GetDlgItem(IDC_CHECK_RXVAD);
- int check = button->GetCheck();
- const bool enable = (check == BST_CHECKED);
-
- if (enable)
- {
- _rxVad = true;
- _veApmPtr->RegisterRxVadObserver(channel, *_rxVadObserverPtr);
- SetDlgItemInt(IDC_EDIT_RXVAD, 0);
- }
- else
- {
- _rxVad = false;
- _veApmPtr->DeRegisterRxVadObserver(channel);
- SetDlgItemText(IDC_EDIT_RXVAD, _T(""));
- }
-}
-
-void CWinTestDlg::OnBnClickedCheckAgc1()
-{
- SHORT shiftKeyIsPressed = ::GetAsyncKeyState(VK_SHIFT);
-
- CString str;
- int channel = GetDlgItemInt(IDC_EDIT_1);
- CButton* button = (CButton*)GetDlgItem(IDC_CHECK_AGC_1);
- int check = button->GetCheck();
- const bool enable = (check == BST_CHECKED);
-
- if (shiftKeyIsPressed)
- {
- bool enabled(false);
- AgcModes mode(kAgcAdaptiveDigital);
- TEST(_veApmPtr->GetRxAgcStatus(channel, enabled, mode) == 0,
- _T("GetRxAgcStatus(channel=%d, enabled=?, mode=?)"), channel);
- button->SetCheck((check == BST_CHECKED) ? BST_UNCHECKED : BST_CHECKED);
-
- switch (mode)
- {
- case kAgcAdaptiveAnalog:
- str = _T("kAgcAdaptiveAnalog");
- break;
- case kAgcAdaptiveDigital:
- str = _T("kAgcAdaptiveDigital");
- break;
- case kAgcFixedDigital:
- str = _T("kAgcFixedDigital");
- break;
- default:
- break;
- }
- PRINT_GET_RESULT(_T("enabled=%d, mode=%s"), enabled, str);
- return;
- }
-
- if (enable)
- {
- CString str;
- AgcModes mode(kAgcDefault);
- if (_checkAGC1 % 3 == 0)
- {
- mode = kAgcDefault;
- str = _T("kAgcDefault");
- }
- else if (_checkAGC1 % 3 == 1)
- {
- mode = kAgcAdaptiveDigital;
- str = _T("kAgcAdaptiveDigital");
- }
- else if (_checkAGC1 % 3 == 2)
- {
- mode = kAgcFixedDigital;
- str = _T("kAgcFixedDigital");
- }
- TEST(_veApmPtr->SetRxAgcStatus(channel, true, mode) == 0, _T("SetRxAgcStatus(channel=%d, enable=%d, %s)"), channel, enable, str);
- _checkAGC1++;
- }
- else
- {
- TEST(_veApmPtr->SetRxAgcStatus(channel, false, kAgcUnchanged) == 0, _T("SetRxAgcStatus(channel=%d, enable=%d)"), channel, enable);
- }
-}
-
-void CWinTestDlg::OnBnClickedCheckNs1()
-{
- int channel = GetDlgItemInt(IDC_EDIT_1);
- CButton* buttonNS = (CButton*)GetDlgItem(IDC_CHECK_NS_1);
- int check = buttonNS->GetCheck();
- const bool enable = (check == BST_CHECKED);
- if (enable)
- {
- CString str;
- NsModes mode(kNsDefault);
- if (_checkNS1 % 6 == 0)
- {
- mode = kNsDefault;
- str = _T("kNsDefault");
- }
- else if (_checkNS1 % 6 == 1)
- {
- mode = kNsConference;
- str = _T("kNsConference");
- }
- else if (_checkNS1 % 6 == 2)
- {
- mode = kNsLowSuppression;
- str = _T("kNsLowSuppression");
- }
- else if (_checkNS1 % 6 == 3)
- {
- mode = kNsModerateSuppression;
- str = _T("kNsModerateSuppression");
- }
- else if (_checkNS1 % 6 == 4)
- {
- mode = kNsHighSuppression;
- str = _T("kNsHighSuppression");
- }
- else if (_checkNS1 % 6 == 5)
- {
- mode = kNsVeryHighSuppression;
- str = _T("kNsVeryHighSuppression");
- }
- TEST(_veApmPtr->SetRxNsStatus(channel, true, mode) == 0, _T("SetRxNsStatus(channel=%d, enable=%d, %s)"), channel, enable, str);
- _checkNS1++;
- }
- else
- {
- TEST(_veApmPtr->SetRxNsStatus(channel, false, kNsUnchanged) == 0, _T("SetRxNsStatus(channel=%d, enable=%d)"), enable, channel);
- }
-}
-
-// ----------------------------------------------------------------------------
-// Channel-independent Operations
-// ----------------------------------------------------------------------------
-
-void CWinTestDlg::OnBnClickedCheckPlayFileIn()
-{
- std::string micFile = _long_audio_file_path + "audio_short16.pcm";
- // std::string micFile = _long_audio_file_path + "audio_long16noise.pcm";
-
- int channel(-1);
- CButton* buttonExtTrans = (CButton*)GetDlgItem(IDC_CHECK_PLAY_FILE_IN);
- int check = buttonExtTrans->GetCheck();
- const bool enable = (check == BST_CHECKED);
- if (enable)
- {
- bool mix;
- const bool loop(true);
- const FileFormats format = kFileFormatPcm16kHzFile;
- const float scale(1.0);
-
- (_checkPlayFileIn %2 == 0) ? mix = true : mix = false;
- TEST(_veFilePtr->StartPlayingFileAsMicrophone(channel,
- micFile.c_str(), loop, mix, format, scale) == 0,
- _T("StartPlayingFileAsMicrophone(channel=%d, file=%s, ")
- _T("loop=%d, mix=%d, format=%d, scale=%2.1f)"),
- channel, CharToTchar(micFile.c_str(), -1),
- loop, mix, format, scale);
- _checkPlayFileIn++;
- }
- else
- {
- TEST(_veFilePtr->StopPlayingFileAsMicrophone(channel) == 0,
- _T("StopPlayingFileAsMicrophone(channel=%d)"), channel);
- }
-}
-
-void CWinTestDlg::OnBnClickedCheckRecMic()
-{
- std::string micFile = webrtc::test::OutputPath() +
- "rec_mic_mono_16kHz.pcm";
-
- CButton* button = (CButton*)GetDlgItem(IDC_CHECK_REC_MIC);
- int check = button->GetCheck();
- const bool enable = (check == BST_CHECKED);
- if (enable)
- {
- TEST(_veFilePtr->StartRecordingMicrophone(micFile.c_str(), NULL) == 0,
- _T("StartRecordingMicrophone(file=%s)"),
- CharToTchar(micFile.c_str(), -1));
- }
- else
- {
- TEST(_veFilePtr->StopRecordingMicrophone() == 0,
- _T("StopRecordingMicrophone()"));
- }
-}
-
-void CWinTestDlg::OnBnClickedCheckAgc()
-{
- CButton* buttonAGC = (CButton*)GetDlgItem(IDC_CHECK_AGC);
- int check = buttonAGC->GetCheck();
- const bool enable = (check == BST_CHECKED);
- if (enable)
- {
- CString str;
- AgcModes mode(kAgcDefault);
- if (_checkAGC % 4 == 0)
- {
- mode = kAgcDefault;
- str = _T("kAgcDefault");
- }
- else if (_checkAGC % 4 == 1)
- {
- mode = kAgcAdaptiveAnalog;
- str = _T("kAgcAdaptiveAnalog");
- }
- else if (_checkAGC % 4 == 2)
- {
- mode = kAgcAdaptiveDigital;
- str = _T("kAgcAdaptiveDigital");
- }
- else if (_checkAGC % 4 == 3)
- {
- mode = kAgcFixedDigital;
- str = _T("kAgcFixedDigital");
- }
- TEST(_veApmPtr->SetAgcStatus(true, mode) == 0, _T("SetAgcStatus(enable=%d, %s)"), enable, str);
- _checkAGC++;
- }
- else
- {
- TEST(_veApmPtr->SetAgcStatus(false, kAgcUnchanged) == 0, _T("SetAgcStatus(enable=%d)"), enable);
- }
-}
-
-void CWinTestDlg::OnBnClickedCheckNs()
-{
- CButton* buttonNS = (CButton*)GetDlgItem(IDC_CHECK_NS);
- int check = buttonNS->GetCheck();
- const bool enable = (check == BST_CHECKED);
- if (enable)
- {
- CString str;
- NsModes mode(kNsDefault);
- if (_checkNS % 6 == 0)
- {
- mode = kNsDefault;
- str = _T("kNsDefault");
- }
- else if (_checkNS % 6 == 1)
- {
- mode = kNsConference;
- str = _T("kNsConference");
- }
- else if (_checkNS % 6 == 2)
- {
- mode = kNsLowSuppression;
- str = _T("kNsLowSuppression");
- }
- else if (_checkNS % 6 == 3)
- {
- mode = kNsModerateSuppression;
- str = _T("kNsModerateSuppression");
- }
- else if (_checkNS % 6 == 4)
- {
- mode = kNsHighSuppression;
- str = _T("kNsHighSuppression");
- }
- else if (_checkNS % 6 == 5)
- {
- mode = kNsVeryHighSuppression;
- str = _T("kNsVeryHighSuppression");
- }
- TEST(_veApmPtr->SetNsStatus(true, mode) == 0, _T("SetNsStatus(enable=%d, %s)"), enable, str);
- _checkNS++;
- }
- else
- {
- TEST(_veApmPtr->SetNsStatus(false, kNsUnchanged) == 0, _T("SetNsStatus(enable=%d)"), enable);
- }
-}
-
-void CWinTestDlg::OnBnClickedCheckEc()
-{
- CButton* buttonEC = (CButton*)GetDlgItem(IDC_CHECK_EC);
- int check = buttonEC->GetCheck();
- const bool enable = (check == BST_CHECKED);
- if (enable)
- {
- CString str;
- EcModes mode(kEcDefault);
- if (_checkEC % 4 == 0)
- {
- mode = kEcDefault;
- str = _T("kEcDefault");
- }
- else if (_checkEC % 4 == 1)
- {
- mode = kEcConference;
- str = _T("kEcConference");
- }
- else if (_checkEC % 4 == 2)
- {
- mode = kEcAec;
- str = _T("kEcAec");
- }
- else if (_checkEC % 4 == 3)
- {
- mode = kEcAecm;
- str = _T("kEcAecm");
- }
- TEST(_veApmPtr->SetEcStatus(true, mode) == 0, _T("SetEcStatus(enable=%d, %s)"), enable, str);
- _checkEC++;
- }
- else
- {
- TEST(_veApmPtr->SetEcStatus(false, kEcUnchanged) == 0, _T("SetEcStatus(enable=%d)"), enable);
- }
-}
-
-void CWinTestDlg::OnBnClickedCheckMuteIn()
-{
- CButton* buttonMute = (CButton*)GetDlgItem(IDC_CHECK_MUTE_IN);
- int check = buttonMute->GetCheck();
- const bool enable = (check == BST_CHECKED);
- const int channel(-1);
- TEST(_veVolumeControlPtr->SetInputMute(channel, enable) == 0,
- _T("SetInputMute(channel=%d, enable=%d)"), channel, enable);
-}
-
-void CWinTestDlg::OnBnClickedCheckExtMediaIn()
-{
- const int channel(-1);
- CButton* button = (CButton*)GetDlgItem(IDC_CHECK_EXT_MEDIA_IN);
- int check = button->GetCheck();
- const bool enable = (check == BST_CHECKED);
- if (enable)
- {
- TEST(_veExternalMediaPtr->RegisterExternalMediaProcessing(channel, kRecordingAllChannelsMixed, *_externalMediaPtr) == 0,
- _T("RegisterExternalMediaProcessing(channel=%d, kRecordingAllChannelsMixed, processObject=0x%x)"), channel, _externalMediaPtr);
- }
- else
- {
- TEST(_veExternalMediaPtr->DeRegisterExternalMediaProcessing(channel, kRecordingAllChannelsMixed) == 0,
- _T("DeRegisterExternalMediaProcessing(channel=%d, kRecordingAllChannelsMixed)"), channel);
- }
-}
-
-void CWinTestDlg::OnBnClickedCheckExtMediaOut()
-{
- const int channel(-1);
- CButton* button = (CButton*)GetDlgItem(IDC_CHECK_EXT_MEDIA_OUT);
- int check = button->GetCheck();
- const bool enable = (check == BST_CHECKED);
- if (enable)
- {
- TEST(_veExternalMediaPtr->RegisterExternalMediaProcessing(channel, kPlaybackAllChannelsMixed, *_externalMediaPtr) == 0,
- _T("RegisterExternalMediaProcessing(channel=%d, kPlaybackAllChannelsMixed, processObject=0x%x)"), channel, _externalMediaPtr);
- }
- else
- {
- TEST(_veExternalMediaPtr->DeRegisterExternalMediaProcessing(channel, kPlaybackAllChannelsMixed) == 0,
- _T("DeRegisterExternalMediaProcessing(channel=%d, kPlaybackAllChannelsMixed)"), channel);
- }
-}
-
-void CWinTestDlg::OnCbnSelchangeComboRecDevice()
-{
- CComboBox* comboCodec(NULL);
- comboCodec = (CComboBox*)GetDlgItem(IDC_COMBO_REC_DEVICE);
- int index = comboCodec->GetCurSel();
- TEST(_veHardwarePtr->SetRecordingDevice(index) == 0,
- _T("SetRecordingDevice(index=%d)"), index);
-}
-
-void CWinTestDlg::OnCbnSelchangeComboPlayDevice()
-{
- CComboBox* comboCodec(NULL);
- comboCodec = (CComboBox*)GetDlgItem(IDC_COMBO_PLAY_DEVICE);
- int index = comboCodec->GetCurSel();
- TEST(_veHardwarePtr->SetPlayoutDevice(index) == 0,
- _T("SetPlayoutDevice(index=%d)"), index);
-}
-
-void CWinTestDlg::OnNMReleasedcaptureSliderInputVolume(NMHDR *pNMHDR, LRESULT *pResult)
-{
- CSliderCtrl* slider = (CSliderCtrl*)GetDlgItem(IDC_SLIDER_INPUT_VOLUME);
- slider->SetRangeMin(0);
- slider->SetRangeMax(255);
- int pos = slider->GetPos();
-
- TEST(_veVolumeControlPtr->SetMicVolume(pos) == 0, _T("SetMicVolume(volume=%d)"), pos);
-
- *pResult = 0;
-}
-
-void CWinTestDlg::OnNMReleasedcaptureSliderOutputVolume(NMHDR *pNMHDR, LRESULT *pResult)
-{
- CSliderCtrl* slider = (CSliderCtrl*)GetDlgItem(IDC_SLIDER_OUTPUT_VOLUME);
- slider->SetRangeMin(0);
- slider->SetRangeMax(255);
- int pos = slider->GetPos();
-
- TEST(_veVolumeControlPtr->SetSpeakerVolume(pos) == 0, _T("SetSpeakerVolume(volume=%d)"), pos);
-
- *pResult = 0;
-}
-
-void CWinTestDlg::OnNMReleasedcaptureSliderPanLeft(NMHDR *pNMHDR, LRESULT *pResult)
-{
- CSliderCtrl* slider = (CSliderCtrl*)GetDlgItem(IDC_SLIDER_PAN_LEFT);
- slider->SetRange(0,10);
- int pos = 10 - slider->GetPos(); // 0 <=> lower end, 10 <=> upper end
-
- float left(0.0);
- float right(0.0);
- const int channel(-1);
-
- // Only left channel will be modified
- _veVolumeControlPtr->GetOutputVolumePan(channel, left, right);
-
- left = (float)((float)pos/10.0f);
-
- TEST(_veVolumeControlPtr->SetOutputVolumePan(channel, left, right) == 0,
- _T("SetOutputVolumePan(channel=%d, left=%2.1f, right=%2.1f)"), channel, left, right);
-
- *pResult = 0;
-}
-
-void CWinTestDlg::OnNMReleasedcaptureSliderPanRight(NMHDR *pNMHDR, LRESULT *pResult)
-{
- CSliderCtrl* slider = (CSliderCtrl*)GetDlgItem(IDC_SLIDER_PAN_RIGHT);
- slider->SetRange(0,10);
- int pos = 10 - slider->GetPos(); // 0 <=> lower end, 10 <=> upper end
-
- float left(0.0);
- float right(0.0);
- const int channel(-1);
-
- // Only right channel will be modified
- _veVolumeControlPtr->GetOutputVolumePan(channel, left, right);
-
- right = (float)((float)pos/10.0f);
-
- TEST(_veVolumeControlPtr->SetOutputVolumePan(channel, left, right) == 0,
- _T("SetOutputVolumePan(channel=%d, left=%2.1f, right=%2.1f)"), channel, left, right);
-
- *pResult = 0;
-}
-
-void CWinTestDlg::OnBnClickedButtonVersion()
-{
- if (_veBasePtr)
- {
- char version[1024];
- if (_veBasePtr->GetVersion(version) == 0)
- {
- AfxMessageBox(CString(version), MB_OK);
- }
- else
- {
- AfxMessageBox(_T("FAILED!"), MB_OK);
- }
- }
-}
-
-void CWinTestDlg::OnBnClickedCheckRecCall()
-{
- // Not supported
-}
-
-void CWinTestDlg::OnBnClickedCheckTypingDetection()
-{
- CButton* button = (CButton*)GetDlgItem(IDC_CHECK_TYPING_DETECTION);
- int check = button->GetCheck();
- const bool enable = (check == BST_CHECKED);
- TEST(_veApmPtr->SetTypingDetectionStatus(enable) == 0, _T("SetTypingDetectionStatus(enable=%d)"), enable);
-}
-
-void CWinTestDlg::OnBnClickedCheckRED()
-{
- CButton* button = (CButton*)GetDlgItem(IDC_CHECK_RED);
- int channel = GetDlgItemInt(IDC_EDIT_1);
- int check = button->GetCheck();
- const bool enable = (check == BST_CHECKED);
- TEST(_veRtpRtcpPtr->SetREDStatus(channel, enable) == 0,
- _T("SetREDStatus(enable=%d)"), enable);
-}
-
-// ----------------------------------------------------------------------------
-// Message Handlers
-// ----------------------------------------------------------------------------
-
-void CWinTestDlg::OnTimer(UINT_PTR nIDEvent)
-{
- CString str;
-
- unsigned int svol(0);
- unsigned int mvol(0);
-
- _timerTicks++;
-
- // Get speaker and microphone volumes
- _veVolumeControlPtr->GetSpeakerVolume(svol);
- _veVolumeControlPtr->GetMicVolume(mvol);
-
- // Update speaker volume slider
- CSliderCtrl* sliderSpkr = (CSliderCtrl*)GetDlgItem(IDC_SLIDER_OUTPUT_VOLUME);
- sliderSpkr->SetRangeMin(0);
- sliderSpkr->SetRangeMax(255);
- sliderSpkr->SetPos(svol);
-
- // Update microphone volume slider
- CSliderCtrl* sliderMic = (CSliderCtrl*)GetDlgItem(IDC_SLIDER_INPUT_VOLUME);
- sliderMic->SetRangeMin(0);
- sliderMic->SetRangeMax(255);
- sliderMic->SetPos(mvol);
-
- unsigned int micLevel;
- unsigned int combinedOutputLevel;
-
- // Get audio levels
- _veVolumeControlPtr->GetSpeechInputLevel(micLevel);
- _veVolumeControlPtr->GetSpeechOutputLevel(-1, combinedOutputLevel);
-
- // Update audio level controls
- CProgressCtrl* progressMic = (CProgressCtrl*)GetDlgItem(IDC_PROGRESS_AUDIO_LEVEL_IN);
- progressMic->SetRange(0,9);
- progressMic->SetStep(1);
- progressMic->SetPos(micLevel);
- CProgressCtrl* progressOut = (CProgressCtrl*)GetDlgItem(IDC_PROGRESS_AUDIO_LEVEL_OUT);
- progressOut->SetRange(0,9);
- progressOut->SetStep(1);
- progressOut->SetPos(combinedOutputLevel);
-
- // Update playout delay (buffer size)
- if (_veVideoSyncPtr)
- {
- int bufferMs(0);
- _veVideoSyncPtr->GetPlayoutBufferSize(bufferMs);
- SetDlgItemInt(IDC_EDIT_PLAYOUT_BUFFER_SIZE, bufferMs);
- }
-
- if (_delayEstimate1 && _veVideoSyncPtr)
- {
- const int channel = GetDlgItemInt(IDC_EDIT_1);
- int delayMs(0);
- _veVideoSyncPtr->GetDelayEstimate(channel, delayMs);
- SetDlgItemInt(IDC_EDIT_DELAY_ESTIMATE_1, delayMs);
- }
-
- if (_rxVad && _veApmPtr && _rxVadObserverPtr)
- {
- SetDlgItemInt(IDC_EDIT_RXVAD, _rxVadObserverPtr->vad_decision);
- }
-
- if (_veHardwarePtr)
- {
- int load1, load2;
- _veHardwarePtr->GetSystemCPULoad(load1);
- _veHardwarePtr->GetCPULoad(load2);
- str.Format(_T("CPU load (system/VoE): %d/%d [%%]"), load1, load2);
- SetDlgItemText(IDC_EDIT_CPU_LOAD, (LPCTSTR)str);
- }
-
- BOOL ret;
- int channel = GetDlgItemInt(IDC_EDIT_1, &ret);
-
- if (_veCodecPtr)
- {
- if (ret == TRUE)
- {
- CodecInst codec;
- if (_veCodecPtr->GetRecCodec(channel, codec) == 0)
- {
- str.Format(_T("RX codec: %s, freq=%d, pt=%d, rate=%d, size=%d"), CharToTchar(codec.plname, 32), codec.plfreq, codec.pltype, codec.rate, codec.pacsize);
- SetDlgItemText(IDC_EDIT_RX_CODEC_1, (LPCTSTR)str);
- }
- }
- }
-
- if (_veRtpRtcpPtr)
- {
- if (ret == TRUE)
- {
- CallStatistics stats;
- if (_veRtpRtcpPtr->GetRTCPStatistics(channel, stats) == 0)
- {
- str.Format(_T("RTCP | RTP: cum=%u, ext=%d, frac=%u, jitter=%u | TX=%d, RX=%d, RTT=%d"),
- stats.cumulativeLost, stats.extendedMax, stats.fractionLost, stats.jitterSamples, stats.packetsSent, stats.packetsReceived, stats.rttMs);
- SetDlgItemText(IDC_EDIT_RTCP_STAT_1, (LPCTSTR)str);
- }
- }
- }
-
- SetTimer(0, 1000, NULL);
- CDialog::OnTimer(nIDEvent);
-}
-
-void CWinTestDlg::OnBnClickedButtonClearErrorCallback()
-{
- _nErrorCallbacks = 0;
- SetDlgItemText(IDC_EDIT_ERROR_CALLBACK, _T(""));
-}
-
-// ----------------------------------------------------------------------------
-// TEST
-// ----------------------------------------------------------------------------
-
-void CWinTestDlg::OnBnClickedButtonTest1()
-{
- // add tests here...
-}
diff --git a/webrtc/voice_engine/test/win_test/WinTestDlg.h b/webrtc/voice_engine/test/win_test/WinTestDlg.h
deleted file mode 100644
index a779880..0000000
--- a/webrtc/voice_engine/test/win_test/WinTestDlg.h
+++ /dev/null
@@ -1,274 +0,0 @@
-/*
- * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license
- * that can be found in the LICENSE file in the root of the source
- * tree. An additional intellectual property rights grant can be found
- * in the file PATENTS. All contributing project authors may
- * be found in the AUTHORS file in the root of the source tree.
- */
-#ifndef WEBRTC_VOICE_ENGINE_TEST_WIN_TEST_WINTESTDLG_H_
-#define WEBRTC_VOICE_ENGINE_TEST_WIN_TEST_WINTESTDLG_H_
-
-#if (_MSC_VER >= 1400)
-#define PRINT_GET_RESULT(...) \
- { \
- _strMsg.Format(__VA_ARGS__); \
- SetDlgItemText(IDC_EDIT_GET_OUTPUT, _strMsg); \
- } \
-
-#define TEST(x, ...) \
- if (!(x)) \
- { \
- _strMsg.Format(__VA_ARGS__); \
- SetDlgItemText(IDC_EDIT_MESSAGE, _strMsg); \
- _strErr.Format(_T("FAILED (error=%d)"), _veBasePtr->LastError()); \
- SetDlgItemText(IDC_EDIT_RESULT, _strErr); \
- _failCount++; \
- SetDlgItemInt(IDC_EDIT_N_FAILS, _failCount); \
- SetDlgItemInt(IDC_EDIT_LAST_ERROR, _veBasePtr->LastError()); \
- } \
- else \
- { \
- _strMsg.Format(__VA_ARGS__); \
- SetDlgItemText(IDC_EDIT_MESSAGE, _strMsg); \
- SetDlgItemText(IDC_EDIT_RESULT, _T("OK")); \
- } \
-
-#define TEST2(x, ...) \
- if (!(x)) \
- { \
- _strMsg.Format(__VA_ARGS__); \
- ((CWinTestDlg*)_parentDialogPtr)->UpdateTest(true, _strMsg); \
- } \
- else \
- { \
- _strMsg.Format(__VA_ARGS__); \
- ((CWinTestDlg*)_parentDialogPtr)->UpdateTest(false, _strMsg); \
- }
-#else
-#define TEST(x, exp) \
- if (!(x)) \
- { \
- _strMsg.Format(exp); \
- SetDlgItemText(IDC_EDIT_MESSAGE, _strMsg); \
- _strErr.Format("FAILED (error=%d)", _veBasePtr->LastError()); \
- SetDlgItemText(IDC_EDIT_RESULT, _strErr); \
- _failCount++; \
- SetDlgItemInt(IDC_EDIT_N_FAILS, _failCount); \
- SetDlgItemInt(IDC_EDIT_LAST_ERROR, _veBasePtr->LastError()); \
- } \
- else \
- { \
- _strMsg.Format(exp); \
- SetDlgItemText(IDC_EDIT_MESSAGE, _strMsg); \
- SetDlgItemText(IDC_EDIT_RESULT, _T("OK")); \
- } \
-
-#define TEST2(x, exp) \
- if (!(x)) \
- { \
- _strMsg.Format(exp); \
- ((CWinTestDlg*)_parentDialogPtr)->UpdateTest(true, _strMsg); \
- } \
- else \
- { \
- _strMsg.Format(exp); \
- ((CWinTestDlg*)_parentDialogPtr)->UpdateTest(false, _strMsg); \
- }
-#endif
-
-#include <string>
-
-#include "webrtc/voice_engine/include/voe_base.h"
-#include "webrtc/voice_engine/include/voe_codec.h"
-#include "webrtc/voice_engine/include/voe_dtmf.h"
-#include "webrtc/voice_engine/include/voe_external_media.h"
-#include "webrtc/voice_engine/include/voe_file.h"
-#include "webrtc/voice_engine/include/voe_hardware.h"
-#include "webrtc/voice_engine/include/voe_network.h"
-#include "webrtc/voice_engine/include/voe_rtp_rtcp.h"
-#include "webrtc/voice_engine/include/voe_video_sync.h"
-#include "webrtc/voice_engine/include/voe_volume_control.h"
-
-#include "webrtc/voice_engine/include/voe_audio_processing.h"
-#include "webrtc/voice_engine/include/voe_errors.h"
-#include "webrtc/voice_engine/include/voe_rtp_rtcp.h"
-
-class MediaProcessImpl;
-class RxCallback;
-class MyTransport;
-
-using namespace webrtc;
-
-#define MAX_NUM_OF_CHANNELS 10
-
-// CWinTestDlg dialog
-class CWinTestDlg : public CDialog,
- public VoiceEngineObserver,
- public VoERTPObserver
-{
-// Construction
-public:
- CWinTestDlg(CWnd* pParent = NULL); // standard constructor
- virtual ~CWinTestDlg();
-
-// Dialog Data
- enum { IDD = IDD_WINTEST_DIALOG };
-
- BOOL UpdateTest(bool failed, const CString& strMsg);
-
-protected:
- virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
-
-protected: // VoiceEngineObserver
- virtual void CallbackOnError(int channel, int errCode);
-
-protected: // VoERTPObserver
- virtual void OnIncomingCSRCChanged(
- int channel, unsigned int CSRC, bool added);
- virtual void OnIncomingSSRCChanged(
- int channel, unsigned int SSRC);
-
-// Implementation
-protected:
- HICON m_hIcon;
-
- // Generated message map functions
- virtual BOOL OnInitDialog();
- afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
- afx_msg void OnPaint();
- afx_msg HCURSOR OnQueryDragIcon();
- DECLARE_MESSAGE_MAP()
-public:
- afx_msg void OnBnClickedButtonCreate1();
- afx_msg void OnBnClickedButtonDelete1();
-
-private:
- VoiceEngine* _vePtr;
-
- VoECodec* _veCodecPtr;
- VoEExternalMedia* _veExternalMediaPtr;
- VoEVolumeControl* _veVolumeControlPtr;
- VoEHardware* _veHardwarePtr;
- VoEVideoSync* _veVideoSyncPtr;
- VoENetwork* _veNetworkPtr;
- VoEFile* _veFilePtr;
- VoEAudioProcessing* _veApmPtr;
- VoEBase* _veBasePtr;
- VoERTP_RTCP* _veRtpRtcpPtr;
-
- MyTransport* _transportPtr;
- MediaProcessImpl* _externalMediaPtr;
- RxCallback* _rxVadObserverPtr;
-
-private:
- int _failCount;
- CString _strMsg;
- CString _strErr;
- bool _externalTransport;
- bool _externalTransportBuild;
- int _checkPlayFileIn;
- int _checkPlayFileIn1;
- int _checkPlayFileIn2;
- int _checkPlayFileOut1;
- int _checkPlayFileOut2;
- int _checkAGC;
- int _checkAGC1;
- int _checkNS;
- int _checkNS1;
- int _checkEC;
- int _checkVAD1;
- int _checkVAD2;
- int _checkSrtpTx1;
- int _checkSrtpTx2;
- int _checkSrtpRx1;
- int _checkSrtpRx2;
- int _checkConference1;
- int _checkConference2;
- int _checkOnHold1;
- int _checkOnHold2;
- bool _delayEstimate1;
- bool _delayEstimate2;
- bool _rxVad;
- int _nErrorCallbacks;
- int _timerTicks;
- std::string _long_audio_file_path;
-
-public:
- afx_msg void OnBnClickedButtonCreate2();
- afx_msg void OnBnClickedButtonDelete2();
- afx_msg void OnCbnSelchangeComboCodec1();
- afx_msg void OnBnClickedButtonStartListen1();
- afx_msg void OnBnClickedButtonStopListen1();
- afx_msg void OnBnClickedButtonStartPlayout1();
- afx_msg void OnBnClickedButtonStopPlayout1();
- afx_msg void OnBnClickedButtonStartSend1();
- afx_msg void OnBnClickedButtonStopSend1();
- afx_msg void OnCbnSelchangeComboIp2();
- afx_msg void OnCbnSelchangeComboIp1();
- afx_msg void OnCbnSelchangeComboCodec2();
- afx_msg void OnBnClickedButtonStartListen2();
- afx_msg void OnBnClickedButtonStopListen2();
- afx_msg void OnBnClickedButtonStartPlayout2();
- afx_msg void OnBnClickedButtonStopPlayout2();
- afx_msg void OnBnClickedButtonStartSend2();
- afx_msg void OnBnClickedButtonStopSend2();
- afx_msg void OnBnClickedButtonTest11();
- afx_msg void OnBnClickedCheckExtTrans1();
- afx_msg void OnBnClickedCheckPlayFileIn1();
- afx_msg void OnBnClickedCheckPlayFileOut1();
- afx_msg void OnBnClickedCheckExtTrans2();
- afx_msg void OnBnClickedCheckPlayFileIn2();
- afx_msg void OnBnClickedCheckPlayFileOut2();
- afx_msg void OnBnClickedCheckPlayFileIn();
- afx_msg void OnBnClickedCheckPlayFileOut();
- afx_msg void OnCbnSelchangeComboRecDevice();
- afx_msg void OnCbnSelchangeComboPlayDevice();
- afx_msg void OnBnClickedCheckExtMediaIn1();
- afx_msg void OnBnClickedCheckExtMediaOut1();
- afx_msg void OnNMReleasedcaptureSliderInputVolume(NMHDR *pNMHDR, LRESULT *pResult);
- afx_msg void OnNMReleasedcaptureSliderOutputVolume(NMHDR *pNMHDR, LRESULT *pResult);
- afx_msg void OnTimer(UINT_PTR nIDEvent);
- afx_msg void OnBnClickedCheckAgc();
- CString _strComboIp1;
- CString _strComboIp2;
- afx_msg void OnBnClickedCheckNs();
- afx_msg void OnBnClickedCheckEc();
- afx_msg void OnBnClickedCheckVad1();
- afx_msg void OnBnClickedCheckVad2();
- afx_msg void OnBnClickedCheckExtMediaIn2();
- afx_msg void OnBnClickedCheckExtMediaOut2();
- afx_msg void OnBnClickedCheckMuteIn();
- afx_msg void OnBnClickedCheckMuteIn1();
- afx_msg void OnBnClickedCheckMuteIn2();
- afx_msg void OnBnClickedCheckSrtpTx1();
- afx_msg void OnBnClickedCheckSrtpRx1();
- afx_msg void OnBnClickedCheckSrtpTx2();
- afx_msg void OnBnClickedCheckSrtpRx2();
- afx_msg void OnBnClickedButtonDtmf1();
- afx_msg void OnBnClickedCheckRecMic();
- afx_msg void OnBnClickedButtonDtmf2();
- afx_msg void OnBnClickedButtonTest1();
- afx_msg void OnBnClickedCheckConference1();
- afx_msg void OnBnClickedCheckConference2();
- afx_msg void OnBnClickedCheckOnHold1();
- afx_msg void OnBnClickedCheckOnHold2();
- afx_msg void OnBnClickedCheckExtMediaIn();
- afx_msg void OnBnClickedCheckExtMediaOut();
- afx_msg void OnLbnSelchangeListCodec1();
- afx_msg void OnNMReleasedcaptureSliderPanLeft(NMHDR *pNMHDR, LRESULT *pResult);
- afx_msg void OnNMReleasedcaptureSliderPanRight(NMHDR *pNMHDR, LRESULT *pResult);
- afx_msg void OnBnClickedButtonVersion();
- afx_msg void OnBnClickedCheckDelayEstimate1();
- afx_msg void OnBnClickedCheckRxvad();
- afx_msg void OnBnClickedCheckAgc1();
- afx_msg void OnBnClickedCheckNs1();
- afx_msg void OnBnClickedCheckRecCall();
- afx_msg void OnBnClickedCheckTypingDetection();
- afx_msg void OnBnClickedCheckRED();
- afx_msg void OnBnClickedButtonClearErrorCallback();
- afx_msg void OnBnClickedCheckBwe1();
-};
-
-#endif // WEBRTC_VOICE_ENGINE_TEST_WIN_TEST_WINTESTDLG_H_
diff --git a/webrtc/voice_engine/test/win_test/res/WinTest.ico b/webrtc/voice_engine/test/win_test/res/WinTest.ico
deleted file mode 100644
index 8a84ca3..0000000
--- a/webrtc/voice_engine/test/win_test/res/WinTest.ico
+++ /dev/null
Binary files differ
diff --git a/webrtc/voice_engine/test/win_test/res/WinTest.rc2 b/webrtc/voice_engine/test/win_test/res/WinTest.rc2
deleted file mode 100644
index 044bf7e..0000000
--- a/webrtc/voice_engine/test/win_test/res/WinTest.rc2
+++ /dev/null
@@ -1,13 +0,0 @@
-//
-// WinTest.RC2 - resources Microsoft Visual C++ does not edit directly
-//
-
-#ifdef APSTUDIO_INVOKED
-#error this file is not editable by Microsoft Visual C++
-#endif //APSTUDIO_INVOKED
-
-
-/////////////////////////////////////////////////////////////////////////////
-// Add manually edited resources here...
-
-/////////////////////////////////////////////////////////////////////////////
diff --git a/webrtc/voice_engine/test/win_test/stdafx.cc b/webrtc/voice_engine/test/win_test/stdafx.cc
deleted file mode 100644
index e321601..0000000
--- a/webrtc/voice_engine/test/win_test/stdafx.cc
+++ /dev/null
@@ -1,15 +0,0 @@
-/*
- * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license
- * that can be found in the LICENSE file in the root of the source
- * tree. An additional intellectual property rights grant can be found
- * in the file PATENTS. All contributing project authors may
- * be found in the AUTHORS file in the root of the source tree.
- */
-
-// stdafx.cpp : source file that includes just the standard includes
-// WinTest.pch will be the pre-compiled header
-// stdafx.obj will contain the pre-compiled type information
-
-#include "webrtc/voice_engine/test/win_test/stdafx.h"
diff --git a/webrtc/voice_engine/test/win_test/stdafx.h b/webrtc/voice_engine/test/win_test/stdafx.h
deleted file mode 100644
index 17b3c30..0000000
--- a/webrtc/voice_engine/test/win_test/stdafx.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license
- * that can be found in the LICENSE file in the root of the source
- * tree. An additional intellectual property rights grant can be found
- * in the file PATENTS. All contributing project authors may
- * be found in the AUTHORS file in the root of the source tree.
- */
-
-#ifndef WEBRTC_VOICE_ENGINE_TEST_WIN_TEST_STDAFX_H_
-#define WEBRTC_VOICE_ENGINE_TEST_WIN_TEST_STDAFX_H_
-
-// stdafx.h : include file for standard system include files,
-// or project specific include files that are used frequently,
-// but are changed infrequently
-
-#ifndef _SECURE_ATL
-#define _SECURE_ATL 1
-#endif
-
-#ifndef VC_EXTRALEAN
-#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
-#endif
-
-// Modify the following defines if you have to target a platform prior to the ones specified below.
-// Refer to MSDN for the latest info on corresponding values for different platforms.
-#ifndef WINVER // Allow use of features specific to Windows XP or later.
-#define WINVER 0x0501 // Change this to the appropriate value to target other versions of Windows.
-#endif
-
-#ifndef _WIN32_WINNT // Allow use of features specific to Windows XP or later.
-#define _WIN32_WINNT 0x0501 // Change this to the appropriate value to target other versions of Windows.
-#endif
-
-#ifndef _WIN32_WINDOWS // Allow use of features specific to Windows 98 or later.
-#define _WIN32_WINDOWS 0x0410 // Change this to the appropriate value to target Windows Me or later.
-#endif
-
-#ifndef _WIN32_IE // Allow use of features specific to IE 6.0 or later.
-#define _WIN32_IE 0x0600 // Change this to the appropriate value to target other versions of IE.
-#endif
-
-#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit
-
-// turns off MFC's hiding of some common and often safely ignored warning messages
-#define _AFX_ALL_WARNINGS
-
-#include <afxwin.h> // MFC core and standard components
-#include <afxext.h> // MFC extensions
-
-#ifndef _AFX_NO_OLE_SUPPORT
-#include <afxdtctl.h> // MFC support for Internet Explorer 4 Common Controls
-#endif
-#ifndef _AFX_NO_AFXCMN_SUPPORT
-#include <afxcmn.h> // MFC support for Windows Common Controls
-#endif // _AFX_NO_AFXCMN_SUPPORT
-
-#ifdef _UNICODE
-#if defined _M_IX86
-#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
-#elif defined _M_IA64
-#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='ia64' publicKeyToken='6595b64144ccf1df' language='*'\"")
-#elif defined _M_X64
-#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
-#else
-#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
-#endif
-#endif
-
-#endif // WEBRTC_VOICE_ENGINE_TEST_WIN_TEST_STDAFX_H_
diff --git a/webrtc/voice_engine/voice_engine.gyp b/webrtc/voice_engine/voice_engine.gyp
index 006df0f..077b193 100644
--- a/webrtc/voice_engine/voice_engine.gyp
+++ b/webrtc/voice_engine/voice_engine.gyp
@@ -228,52 +228,6 @@
},
], # targets
'conditions': [
- # TODO(kjellander): Support UseoFMFC on VS2010.
- # http://code.google.com/p/webrtc/issues/detail?id=709
- ['OS=="win" and MSVS_VERSION < "2010"', {
- 'targets': [
- # WinTest - GUI test for Windows
- {
- 'target_name': 'voe_ui_win_test',
- 'type': 'executable',
- 'dependencies': [
- 'voice_engine',
- '<(webrtc_root)/system_wrappers/system_wrappers.gyp:system_wrappers',
- '<(webrtc_root)/test/test.gyp:test_support',
- ],
- 'sources': [
- 'test/win_test/Resource.h',
- 'test/win_test/WinTest.cc',
- 'test/win_test/WinTest.h',
- 'test/win_test/WinTest.rc',
- 'test/win_test/WinTestDlg.cc',
- 'test/win_test/WinTestDlg.h',
- 'test/win_test/res/WinTest.ico',
- 'test/win_test/res/WinTest.rc2',
- 'test/win_test/stdafx.cc',
- 'test/win_test/stdafx.h',
- ],
- 'configurations': {
- 'Common_Base': {
- 'msvs_configuration_attributes': {
- 'conditions': [
- ['component=="shared_library"', {
- 'UseOfMFC': '2', # Shared DLL
- },{
- 'UseOfMFC': '1', # Static
- }],
- ],
- },
- },
- },
- 'msvs_settings': {
- 'VCLinkerTool': {
- 'SubSystem': '2', # Windows
- },
- },
- },
- ], # targets
- }],
['OS=="android"', {
'targets': [
{