VoiceEngine(iOS & Android): removed NOT_SUPPORTED
Also: - removed underflow of a uint32 creating crazy-large delay values - removed always-fail AudioDeviceIPhone::MicrophoneIsAvailable() impl (see bug 3132) - removed unnecessary exclusion of features from iOS & Android builds BUG=2050,3132 R=andrew@webrtc.org, niklas.enbom@webrtc.org Review URL: https://webrtc-codereview.appspot.com/10909005 git-svn-id: http://webrtc.googlecode.com/svn/trunk@5820 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@@ -218,23 +218,13 @@ int32_t AudioDeviceIPhone::MicrophoneIsAvailable(bool& available) {
|
||||
WEBRTC_TRACE(kTraceModuleCall, kTraceAudioDevice, _id,
|
||||
"%s", __FUNCTION__);
|
||||
|
||||
// This function has never been implemented correctly (boo!) but
|
||||
// the returned |available| value is ignored (yay?) so for now
|
||||
// just hard-code the previous (more buggily-implemented behavior)
|
||||
// until the entire MicrophoneIsAvailable interface is ripped out
|
||||
// (since it's apparently useless).
|
||||
// https://code.google.com/p/webrtc/issues/detail?id=3132
|
||||
available = false;
|
||||
|
||||
OSStatus result = -1;
|
||||
UInt32 channel = 0;
|
||||
UInt32 size = sizeof(channel);
|
||||
result = AudioSessionGetProperty(kAudioSessionProperty_AudioInputAvailable,
|
||||
&size, &channel);
|
||||
if (channel != 0) {
|
||||
// API is not supported on this platform, we return available = true
|
||||
WEBRTC_TRACE(kTraceWarning, kTraceAudioDevice,
|
||||
_id, " API call not supported on this version");
|
||||
available = true;
|
||||
return 0;
|
||||
}
|
||||
|
||||
available = (channel == 0) ? false : true;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1716,7 +1706,10 @@ void AudioDeviceIPhone::UpdatePlayoutDelay() {
|
||||
if (_playoutDelayMeasurementCounter >= 100) {
|
||||
// Update HW and OS delay every second, unlikely to change
|
||||
|
||||
_playoutDelay = 0;
|
||||
// Since this is eventually rounded to integral ms, add 0.5ms
|
||||
// here to get round-to-nearest-int behavior instead of
|
||||
// truncation.
|
||||
float totalDelaySeconds = 0.0005;
|
||||
|
||||
// HW output latency
|
||||
Float32 f32(0);
|
||||
@@ -1727,7 +1720,8 @@ void AudioDeviceIPhone::UpdatePlayoutDelay() {
|
||||
WEBRTC_TRACE(kTraceError, kTraceAudioDevice, _id,
|
||||
"error HW latency (result=%d)", result);
|
||||
}
|
||||
_playoutDelay += static_cast<int>(f32 * 1000000);
|
||||
assert(f32 >= 0);
|
||||
totalDelaySeconds += f32;
|
||||
|
||||
// HW buffer duration
|
||||
f32 = 0;
|
||||
@@ -1737,7 +1731,8 @@ void AudioDeviceIPhone::UpdatePlayoutDelay() {
|
||||
WEBRTC_TRACE(kTraceError, kTraceAudioDevice, _id,
|
||||
"error HW buffer duration (result=%d)", result);
|
||||
}
|
||||
_playoutDelay += static_cast<int>(f32 * 1000000);
|
||||
assert(f32 >= 0);
|
||||
totalDelaySeconds += f32;
|
||||
|
||||
// AU latency
|
||||
Float64 f64(0);
|
||||
@@ -1748,10 +1743,11 @@ void AudioDeviceIPhone::UpdatePlayoutDelay() {
|
||||
WEBRTC_TRACE(kTraceError, kTraceAudioDevice, _id,
|
||||
"error AU latency (result=%d)", result);
|
||||
}
|
||||
_playoutDelay += static_cast<int>(f64 * 1000000);
|
||||
assert(f64 >= 0);
|
||||
totalDelaySeconds += f64;
|
||||
|
||||
// To ms
|
||||
_playoutDelay = (_playoutDelay - 500) / 1000;
|
||||
_playoutDelay = static_cast<uint32_t>(totalDelaySeconds / 1000);
|
||||
|
||||
// Reset counter
|
||||
_playoutDelayMeasurementCounter = 0;
|
||||
@@ -1766,7 +1762,10 @@ void AudioDeviceIPhone::UpdateRecordingDelay() {
|
||||
if (_recordingDelayMeasurementCounter >= 100) {
|
||||
// Update HW and OS delay every second, unlikely to change
|
||||
|
||||
_recordingDelayHWAndOS = 0;
|
||||
// Since this is eventually rounded to integral ms, add 0.5ms
|
||||
// here to get round-to-nearest-int behavior instead of
|
||||
// truncation.
|
||||
float totalDelaySeconds = 0.0005;
|
||||
|
||||
// HW input latency
|
||||
Float32 f32(0);
|
||||
@@ -1777,7 +1776,8 @@ void AudioDeviceIPhone::UpdateRecordingDelay() {
|
||||
WEBRTC_TRACE(kTraceError, kTraceAudioDevice, _id,
|
||||
"error HW latency (result=%d)", result);
|
||||
}
|
||||
_recordingDelayHWAndOS += static_cast<int>(f32 * 1000000);
|
||||
assert(f32 >= 0);
|
||||
totalDelaySeconds += f32;
|
||||
|
||||
// HW buffer duration
|
||||
f32 = 0;
|
||||
@@ -1787,7 +1787,8 @@ void AudioDeviceIPhone::UpdateRecordingDelay() {
|
||||
WEBRTC_TRACE(kTraceError, kTraceAudioDevice, _id,
|
||||
"error HW buffer duration (result=%d)", result);
|
||||
}
|
||||
_recordingDelayHWAndOS += static_cast<int>(f32 * 1000000);
|
||||
assert(f32 >= 0);
|
||||
totalDelaySeconds += f32;
|
||||
|
||||
// AU latency
|
||||
Float64 f64(0);
|
||||
@@ -1799,10 +1800,12 @@ void AudioDeviceIPhone::UpdateRecordingDelay() {
|
||||
WEBRTC_TRACE(kTraceError, kTraceAudioDevice, _id,
|
||||
"error AU latency (result=%d)", result);
|
||||
}
|
||||
_recordingDelayHWAndOS += static_cast<int>(f64 * 1000000);
|
||||
assert(f64 >= 0);
|
||||
totalDelaySeconds += f64;
|
||||
|
||||
// To ms
|
||||
_recordingDelayHWAndOS = (_recordingDelayHWAndOS - 500) / 1000;
|
||||
_recordingDelayHWAndOS =
|
||||
static_cast<uint32_t>(totalDelaySeconds / 1000);
|
||||
|
||||
// Reset counter
|
||||
_recordingDelayMeasurementCounter = 0;
|
||||
|
@@ -52,7 +52,6 @@ TEST_F(DtmfTest, TestTwoNonDtmfEvents) {
|
||||
EXPECT_EQ(0, voe_dtmf_->SendTelephoneEvent(channel_, 110, true));
|
||||
}
|
||||
|
||||
#ifndef WEBRTC_IOS
|
||||
TEST_F(DtmfTest, ManualCanDisableDtmfPlayoutExceptOnIphone) {
|
||||
TEST_LOG("Disabling DTMF playout (no tone should be heard) \n");
|
||||
EXPECT_EQ(0, voe_dtmf_->SetDtmfPlayoutStatus(channel_, false));
|
||||
@@ -64,7 +63,6 @@ TEST_F(DtmfTest, ManualCanDisableDtmfPlayoutExceptOnIphone) {
|
||||
EXPECT_EQ(0, voe_dtmf_->SendTelephoneEvent(channel_, 0, true));
|
||||
Sleep(500);
|
||||
}
|
||||
#endif
|
||||
|
||||
// This test modifies the DTMF payload type from the default 106 to 88
|
||||
// and then runs through 16 DTMF out.of-band events.
|
||||
|
@@ -123,9 +123,7 @@ TEST_F(VideoSyncTest,
|
||||
CheckEstimatesConvergeReasonablyWell(kMinimumReasonableDelayEstimateMs);
|
||||
}
|
||||
|
||||
#if !defined(WEBRTC_ANDROID)
|
||||
TEST_F(VideoSyncTest, CanGetPlayoutBufferSize) {
|
||||
int ignored;
|
||||
EXPECT_EQ(0, voe_vsync_->GetPlayoutBufferSize(ignored));
|
||||
}
|
||||
#endif // !ANDROID
|
||||
|
@@ -95,8 +95,6 @@ TEST_F(VolumeTest, ManualSetVolumeWorks) {
|
||||
Sleep(1000);
|
||||
}
|
||||
|
||||
#if !defined(WEBRTC_IOS)
|
||||
|
||||
TEST_F(VolumeTest, DISABLED_ON_LINUX(DefaultMicrophoneVolumeIsAtMost255)) {
|
||||
unsigned int volume = 1000;
|
||||
EXPECT_EQ(0, voe_volume_control_->GetMicVolume(volume));
|
||||
@@ -144,10 +142,6 @@ TEST_F(VolumeTest, ManualCanSetChannelScaling) {
|
||||
Sleep(2000);
|
||||
}
|
||||
|
||||
#endif // !WEBRTC_IOS
|
||||
|
||||
#if !defined(WEBRTC_ANDROID) && !defined(WEBRTC_IOS)
|
||||
|
||||
TEST_F(VolumeTest, InputMutingIsNotEnabledByDefault) {
|
||||
bool is_muted = true;
|
||||
EXPECT_EQ(0, voe_volume_control_->GetInputMute(channel_, is_muted));
|
||||
@@ -284,5 +278,3 @@ TEST_F(VolumeTest, ManualTestChannelPanning) {
|
||||
EXPECT_FLOAT_EQ(0.1f, left);
|
||||
EXPECT_FLOAT_EQ(0.8f, right);
|
||||
}
|
||||
|
||||
#endif // !WEBRTC_ANDROID && !WEBRTC_IOS
|
||||
|
@@ -341,8 +341,6 @@ void RunTest(std::string out_path) {
|
||||
// Call loop
|
||||
bool newcall = true;
|
||||
while (newcall) {
|
||||
|
||||
#ifndef WEBRTC_ANDROID
|
||||
int rd(-1), pd(-1);
|
||||
res = hardware->GetNumOfRecordingDevices(rd);
|
||||
VALIDATE;
|
||||
@@ -374,7 +372,6 @@ void RunTest(std::string out_path) {
|
||||
printf("Setting sound devices \n");
|
||||
res = hardware->SetRecordingDevice(rd);
|
||||
VALIDATE;
|
||||
#endif // WEBRTC_ANDROID
|
||||
|
||||
res = codec->SetVADStatus(0, enable_cng);
|
||||
VALIDATE;
|
||||
@@ -415,7 +412,6 @@ void RunTest(std::string out_path) {
|
||||
VALIDATE;
|
||||
}
|
||||
|
||||
#ifndef WEBRTC_ANDROID
|
||||
printf("Getting mic volume \n");
|
||||
unsigned int vol = 999;
|
||||
res = volume->GetMicVolume(vol);
|
||||
@@ -423,7 +419,6 @@ void RunTest(std::string out_path) {
|
||||
if ((vol > 255) || (vol < 1)) {
|
||||
printf("\n****ERROR in GetMicVolume");
|
||||
}
|
||||
#endif
|
||||
|
||||
int forever = 1;
|
||||
while (forever) {
|
||||
|
@@ -56,8 +56,6 @@ int VoECallReportImpl::ResetCallReportStatistics(int channel)
|
||||
{
|
||||
WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1),
|
||||
"ResetCallReportStatistics(channel=%d)", channel);
|
||||
ANDROID_NOT_SUPPORTED(_shared->statistics());
|
||||
IPHONE_NOT_SUPPORTED(_shared->statistics());
|
||||
|
||||
if (!_shared->statistics().Initialized())
|
||||
{
|
||||
@@ -114,8 +112,6 @@ int VoECallReportImpl::GetEchoMetricSummary(EchoStatistics& stats)
|
||||
{
|
||||
WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1),
|
||||
"GetEchoMetricSummary()");
|
||||
ANDROID_NOT_SUPPORTED(_shared->statistics());
|
||||
IPHONE_NOT_SUPPORTED(_shared->statistics());
|
||||
|
||||
if (!_shared->statistics().Initialized())
|
||||
{
|
||||
@@ -215,8 +211,6 @@ int VoECallReportImpl::GetRoundTripTimeSummary(int channel, StatVal& delaysMs)
|
||||
{
|
||||
WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1),
|
||||
"GetRoundTripTimeSummary()");
|
||||
ANDROID_NOT_SUPPORTED(_shared->statistics());
|
||||
IPHONE_NOT_SUPPORTED(_shared->statistics());
|
||||
|
||||
if (!_shared->statistics().Initialized())
|
||||
{
|
||||
@@ -241,8 +235,6 @@ int VoECallReportImpl::GetDeadOrAliveSummary(int channel,
|
||||
{
|
||||
WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1),
|
||||
"GetDeadOrAliveSummary(channel=%d)", channel);
|
||||
ANDROID_NOT_SUPPORTED(_shared->statistics());
|
||||
IPHONE_NOT_SUPPORTED(_shared->statistics());
|
||||
|
||||
if (!_shared->statistics().Initialized())
|
||||
{
|
||||
@@ -283,8 +275,6 @@ int VoECallReportImpl::WriteReportToFile(const char* fileNameUTF8)
|
||||
{
|
||||
WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1),
|
||||
"WriteReportToFile(fileNameUTF8=%s)", fileNameUTF8);
|
||||
ANDROID_NOT_SUPPORTED(_shared->statistics());
|
||||
IPHONE_NOT_SUPPORTED(_shared->statistics());
|
||||
|
||||
if (!_shared->statistics().Initialized())
|
||||
{
|
||||
|
@@ -269,8 +269,6 @@ int VoECodecImpl::SetAMRWbEncFormat(int channel, AmrMode mode)
|
||||
{
|
||||
WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1),
|
||||
"SetAMRWbEncFormat(channel=%d, mode=%d)", channel, mode);
|
||||
ANDROID_NOT_SUPPORTED(_shared->statistics());
|
||||
IPHONE_NOT_SUPPORTED(_shared->statistics());
|
||||
#ifdef WEBRTC_CODEC_AMRWB
|
||||
if (!_shared->statistics().Initialized())
|
||||
{
|
||||
@@ -297,8 +295,6 @@ int VoECodecImpl::SetAMRWbDecFormat(int channel, AmrMode mode)
|
||||
{
|
||||
WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1),
|
||||
"SetAMRWbDecFormat(channel=%i, mode=%i)", channel, mode);
|
||||
ANDROID_NOT_SUPPORTED(_shared->statistics());
|
||||
IPHONE_NOT_SUPPORTED(_shared->statistics());
|
||||
#ifdef WEBRTC_CODEC_AMRWB
|
||||
if (!_shared->statistics().Initialized())
|
||||
{
|
||||
@@ -409,8 +405,6 @@ int VoECodecImpl::SetISACInitTargetRate(int channel, int rateBps,
|
||||
WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1),
|
||||
"SetISACInitTargetRate(channel=%d, rateBps=%d, "
|
||||
"useFixedFrameSize=%d)", channel, rateBps, useFixedFrameSize);
|
||||
ANDROID_NOT_SUPPORTED(_shared->statistics());
|
||||
IPHONE_NOT_SUPPORTED(_shared->statistics());
|
||||
#ifdef WEBRTC_CODEC_ISAC
|
||||
if (!_shared->statistics().Initialized())
|
||||
{
|
||||
@@ -437,8 +431,6 @@ int VoECodecImpl::SetISACMaxRate(int channel, int rateBps)
|
||||
{
|
||||
WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1),
|
||||
"SetISACMaxRate(channel=%d, rateBps=%d)", channel, rateBps);
|
||||
ANDROID_NOT_SUPPORTED(_shared->statistics());
|
||||
IPHONE_NOT_SUPPORTED(_shared->statistics());
|
||||
#ifdef WEBRTC_CODEC_ISAC
|
||||
if (!_shared->statistics().Initialized())
|
||||
{
|
||||
@@ -466,8 +458,6 @@ int VoECodecImpl::SetISACMaxPayloadSize(int channel, int sizeBytes)
|
||||
WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1),
|
||||
"SetISACMaxPayloadSize(channel=%d, sizeBytes=%d)", channel,
|
||||
sizeBytes);
|
||||
ANDROID_NOT_SUPPORTED(_shared->statistics());
|
||||
IPHONE_NOT_SUPPORTED(_shared->statistics());
|
||||
#ifdef WEBRTC_CODEC_ISAC
|
||||
if (!_shared->statistics().Initialized())
|
||||
{
|
||||
|
@@ -307,7 +307,6 @@ int VoEDtmfImpl::SetDtmfPlayoutStatus(int channel, bool enable)
|
||||
WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1),
|
||||
"SetDtmfPlayoutStatus(channel=%d, enable=%d)",
|
||||
channel, enable);
|
||||
IPHONE_NOT_SUPPORTED(_shared->statistics());
|
||||
|
||||
if (!_shared->statistics().Initialized())
|
||||
{
|
||||
@@ -329,7 +328,6 @@ int VoEDtmfImpl::GetDtmfPlayoutStatus(int channel, bool& enabled)
|
||||
{
|
||||
WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1),
|
||||
"GetDtmfPlayoutStatus(channel=%d, enabled=?)", channel);
|
||||
IPHONE_NOT_SUPPORTED(_shared->statistics());
|
||||
if (!_shared->statistics().Initialized())
|
||||
{
|
||||
_shared->SetLastError(VE_NOT_INITED, kTraceError);
|
||||
|
@@ -148,8 +148,6 @@ int VoEHardwareImpl::GetNumOfRecordingDevices(int& devices)
|
||||
{
|
||||
WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1),
|
||||
"GetNumOfRecordingDevices(devices=?)");
|
||||
ANDROID_NOT_SUPPORTED(_shared->statistics());
|
||||
IPHONE_NOT_SUPPORTED(_shared->statistics());
|
||||
|
||||
if (!_shared->statistics().Initialized())
|
||||
{
|
||||
@@ -169,8 +167,6 @@ int VoEHardwareImpl::GetNumOfPlayoutDevices(int& devices)
|
||||
{
|
||||
WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1),
|
||||
"GetNumOfPlayoutDevices(devices=?)");
|
||||
ANDROID_NOT_SUPPORTED(_shared->statistics());
|
||||
IPHONE_NOT_SUPPORTED(_shared->statistics());
|
||||
|
||||
if (!_shared->statistics().Initialized())
|
||||
{
|
||||
@@ -193,8 +189,6 @@ int VoEHardwareImpl::GetRecordingDeviceName(int index,
|
||||
{
|
||||
WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1),
|
||||
"GetRecordingDeviceName(index=%d)", index);
|
||||
ANDROID_NOT_SUPPORTED(_shared->statistics());
|
||||
IPHONE_NOT_SUPPORTED(_shared->statistics());
|
||||
|
||||
if (!_shared->statistics().Initialized())
|
||||
{
|
||||
@@ -251,8 +245,6 @@ int VoEHardwareImpl::GetPlayoutDeviceName(int index,
|
||||
{
|
||||
WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1),
|
||||
"GetPlayoutDeviceName(index=%d)", index);
|
||||
ANDROID_NOT_SUPPORTED(_shared->statistics());
|
||||
IPHONE_NOT_SUPPORTED(_shared->statistics());
|
||||
|
||||
if (!_shared->statistics().Initialized())
|
||||
{
|
||||
@@ -310,8 +302,6 @@ int VoEHardwareImpl::SetRecordingDevice(int index,
|
||||
"SetRecordingDevice(index=%d, recordingChannel=%d)",
|
||||
index, (int) recordingChannel);
|
||||
CriticalSectionScoped cs(_shared->crit_sec());
|
||||
IPHONE_NOT_SUPPORTED(_shared->statistics());
|
||||
// TODO(leozwang): Add this api to Android OpenSL ES implementation.
|
||||
|
||||
if (!_shared->statistics().Initialized())
|
||||
{
|
||||
@@ -440,8 +430,6 @@ int VoEHardwareImpl::SetPlayoutDevice(int index)
|
||||
WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1),
|
||||
"SetPlayoutDevice(index=%d)", index);
|
||||
CriticalSectionScoped cs(_shared->crit_sec());
|
||||
ANDROID_NOT_SUPPORTED(_shared->statistics());
|
||||
IPHONE_NOT_SUPPORTED(_shared->statistics());
|
||||
|
||||
if (!_shared->statistics().Initialized())
|
||||
{
|
||||
@@ -544,8 +532,6 @@ int VoEHardwareImpl::GetRecordingDeviceStatus(bool& isAvailable)
|
||||
{
|
||||
WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1),
|
||||
"GetRecordingDeviceStatus()");
|
||||
ANDROID_NOT_SUPPORTED(_shared->statistics());
|
||||
IPHONE_NOT_SUPPORTED(_shared->statistics());
|
||||
|
||||
if (!_shared->statistics().Initialized())
|
||||
{
|
||||
@@ -578,8 +564,6 @@ int VoEHardwareImpl::GetPlayoutDeviceStatus(bool& isAvailable)
|
||||
{
|
||||
WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1),
|
||||
"GetPlayoutDeviceStatus()");
|
||||
ANDROID_NOT_SUPPORTED(_shared->statistics());
|
||||
IPHONE_NOT_SUPPORTED(_shared->statistics());
|
||||
|
||||
if (!_shared->statistics().Initialized())
|
||||
{
|
||||
@@ -612,7 +596,6 @@ int VoEHardwareImpl::ResetAudioDevice()
|
||||
{
|
||||
WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1),
|
||||
"ResetAudioDevice()");
|
||||
ANDROID_NOT_SUPPORTED(_shared->statistics());
|
||||
|
||||
if (!_shared->statistics().Initialized())
|
||||
{
|
||||
@@ -640,8 +623,6 @@ int VoEHardwareImpl::AudioDeviceControl(unsigned int par1, unsigned int par2,
|
||||
{
|
||||
WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1),
|
||||
"AudioDeviceControl(%i, %i, %i)", par1, par2, par3);
|
||||
ANDROID_NOT_SUPPORTED(_shared->statistics());
|
||||
IPHONE_NOT_SUPPORTED(_shared->statistics());
|
||||
if (!_shared->statistics().Initialized())
|
||||
{
|
||||
_shared->SetLastError(VE_NOT_INITED, kTraceError);
|
||||
@@ -656,7 +637,6 @@ int VoEHardwareImpl::SetLoudspeakerStatus(bool enable)
|
||||
{
|
||||
WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1),
|
||||
"SetLoudspeakerStatus(enable=%i)", (int) enable);
|
||||
IPHONE_NOT_SUPPORTED(_shared->statistics());
|
||||
|
||||
if (!_shared->statistics().Initialized())
|
||||
{
|
||||
@@ -683,7 +663,6 @@ int VoEHardwareImpl::GetLoudspeakerStatus(bool& enabled)
|
||||
{
|
||||
WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1),
|
||||
"GetLoudspeakerStatus()");
|
||||
IPHONE_NOT_SUPPORTED(_shared->statistics());
|
||||
|
||||
#if defined(WEBRTC_ANDROID)
|
||||
if (!_shared->statistics().Initialized())
|
||||
@@ -711,8 +690,6 @@ int VoEHardwareImpl::GetCPULoad(int& loadPercent)
|
||||
{
|
||||
WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1),
|
||||
"GetCPULoad()");
|
||||
ANDROID_NOT_SUPPORTED(_shared->statistics());
|
||||
IPHONE_NOT_SUPPORTED(_shared->statistics());
|
||||
|
||||
if (!_shared->statistics().Initialized())
|
||||
{
|
||||
|
@@ -53,7 +53,6 @@ int VoENetEqStatsImpl::GetNetworkStatistics(int channel,
|
||||
{
|
||||
WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1),
|
||||
"GetNetworkStatistics(channel=%d, stats=?)", channel);
|
||||
ANDROID_NOT_SUPPORTED(_shared->statistics());
|
||||
|
||||
if (!_shared->statistics().Initialized())
|
||||
{
|
||||
@@ -74,7 +73,6 @@ int VoENetEqStatsImpl::GetNetworkStatistics(int channel,
|
||||
|
||||
int VoENetEqStatsImpl::GetDecodingCallStatistics(
|
||||
int channel, AudioDecodingCallStats* stats) const {
|
||||
ANDROID_NOT_SUPPORTED(_shared->statistics());
|
||||
|
||||
if (!_shared->statistics().Initialized()) {
|
||||
_shared->SetLastError(VE_NOT_INITED, kTraceError);
|
||||
|
@@ -51,7 +51,6 @@ int VoEVideoSyncImpl::GetPlayoutTimestamp(int channel, unsigned int& timestamp)
|
||||
{
|
||||
WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1),
|
||||
"GetPlayoutTimestamp(channel=%d, timestamp=?)", channel);
|
||||
IPHONE_NOT_SUPPORTED(_shared->statistics());
|
||||
|
||||
if (!_shared->statistics().Initialized())
|
||||
{
|
||||
@@ -75,7 +74,6 @@ int VoEVideoSyncImpl::SetInitTimestamp(int channel,
|
||||
WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1),
|
||||
"SetInitTimestamp(channel=%d, timestamp=%lu)",
|
||||
channel, timestamp);
|
||||
IPHONE_NOT_SUPPORTED(_shared->statistics());
|
||||
|
||||
if (!_shared->statistics().Initialized())
|
||||
{
|
||||
@@ -99,7 +97,6 @@ int VoEVideoSyncImpl::SetInitSequenceNumber(int channel,
|
||||
WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1),
|
||||
"SetInitSequenceNumber(channel=%d, sequenceNumber=%hd)",
|
||||
channel, sequenceNumber);
|
||||
IPHONE_NOT_SUPPORTED(_shared->statistics());
|
||||
|
||||
if (!_shared->statistics().Initialized())
|
||||
{
|
||||
@@ -122,7 +119,6 @@ int VoEVideoSyncImpl::SetMinimumPlayoutDelay(int channel,int delayMs)
|
||||
WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1),
|
||||
"SetMinimumPlayoutDelay(channel=%d, delayMs=%d)",
|
||||
channel, delayMs);
|
||||
IPHONE_NOT_SUPPORTED(_shared->statistics());
|
||||
|
||||
if (!_shared->statistics().Initialized())
|
||||
{
|
||||
@@ -145,7 +141,6 @@ int VoEVideoSyncImpl::SetInitialPlayoutDelay(int channel, int delay_ms)
|
||||
WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1),
|
||||
"SetInitialPlayoutDelay(channel=%d, delay_ms=%d)",
|
||||
channel, delay_ms);
|
||||
IPHONE_NOT_SUPPORTED(_shared->statistics());
|
||||
|
||||
if (!_shared->statistics().Initialized())
|
||||
{
|
||||
@@ -168,7 +163,6 @@ int VoEVideoSyncImpl::GetDelayEstimate(int channel,
|
||||
int* playout_buffer_delay_ms) {
|
||||
WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1),
|
||||
"GetDelayEstimate(channel=%d, delayMs=?)", channel);
|
||||
IPHONE_NOT_SUPPORTED(_shared->statistics());
|
||||
|
||||
if (!_shared->statistics().Initialized()) {
|
||||
_shared->SetLastError(VE_NOT_INITED, kTraceError);
|
||||
@@ -192,7 +186,6 @@ int VoEVideoSyncImpl::GetPlayoutBufferSize(int& bufferMs)
|
||||
{
|
||||
WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1),
|
||||
"GetPlayoutBufferSize(bufferMs=?)");
|
||||
IPHONE_NOT_SUPPORTED(_shared->statistics());
|
||||
|
||||
if (!_shared->statistics().Initialized())
|
||||
{
|
||||
@@ -240,7 +233,6 @@ int VoEVideoSyncImpl::GetRtpRtcp(int channel, RtpRtcp** rtpRtcpModule,
|
||||
int VoEVideoSyncImpl::GetLeastRequiredDelayMs(int channel) const {
|
||||
WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1),
|
||||
"GetLeastRequiredDelayMS(channel=%d)", channel);
|
||||
IPHONE_NOT_SUPPORTED(_shared->statistics());
|
||||
|
||||
if (!_shared->statistics().Initialized()) {
|
||||
_shared->SetLastError(VE_NOT_INITED, kTraceError);
|
||||
|
@@ -54,7 +54,6 @@ int VoEVolumeControlImpl::SetSpeakerVolume(unsigned int volume)
|
||||
{
|
||||
WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1),
|
||||
"SetSpeakerVolume(volume=%u)", volume);
|
||||
IPHONE_NOT_SUPPORTED(_shared->statistics());
|
||||
|
||||
if (!_shared->statistics().Initialized())
|
||||
{
|
||||
@@ -96,7 +95,6 @@ int VoEVolumeControlImpl::GetSpeakerVolume(unsigned int& volume)
|
||||
{
|
||||
WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1),
|
||||
"GetSpeakerVolume()");
|
||||
IPHONE_NOT_SUPPORTED(_shared->statistics());
|
||||
|
||||
if (!_shared->statistics().Initialized())
|
||||
{
|
||||
@@ -179,8 +177,6 @@ int VoEVolumeControlImpl::SetMicVolume(unsigned int volume)
|
||||
{
|
||||
WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1),
|
||||
"SetMicVolume(volume=%u)", volume);
|
||||
ANDROID_NOT_SUPPORTED(_shared->statistics());
|
||||
IPHONE_NOT_SUPPORTED(_shared->statistics());
|
||||
|
||||
if (!_shared->statistics().Initialized())
|
||||
{
|
||||
@@ -238,8 +234,6 @@ int VoEVolumeControlImpl::GetMicVolume(unsigned int& volume)
|
||||
{
|
||||
WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1),
|
||||
"GetMicVolume()");
|
||||
ANDROID_NOT_SUPPORTED(_shared->statistics());
|
||||
IPHONE_NOT_SUPPORTED(_shared->statistics());
|
||||
|
||||
if (!_shared->statistics().Initialized())
|
||||
{
|
||||
@@ -538,8 +532,6 @@ int VoEVolumeControlImpl::SetOutputVolumePan(int channel,
|
||||
WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1),
|
||||
"SetOutputVolumePan(channel=%d, left=%2.1f, right=%2.1f)",
|
||||
channel, left, right);
|
||||
ANDROID_NOT_SUPPORTED(_shared->statistics());
|
||||
IPHONE_NOT_SUPPORTED(_shared->statistics());
|
||||
|
||||
if (!_shared->statistics().Initialized())
|
||||
{
|
||||
@@ -588,8 +580,6 @@ int VoEVolumeControlImpl::GetOutputVolumePan(int channel,
|
||||
{
|
||||
WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1),
|
||||
"GetOutputVolumePan(channel=%d, left=?, right=?)", channel);
|
||||
ANDROID_NOT_SUPPORTED(_shared->statistics());
|
||||
IPHONE_NOT_SUPPORTED(_shared->statistics());
|
||||
|
||||
if (!_shared->statistics().Initialized())
|
||||
{
|
||||
|
@@ -279,30 +279,6 @@ inline int VoEChannelId(int moduleId)
|
||||
// Default device for Linux and Android
|
||||
#define WEBRTC_VOICE_ENGINE_DEFAULT_DEVICE 0
|
||||
|
||||
#ifdef ANDROID
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Defines
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// Always excluded for Android builds
|
||||
#undef WEBRTC_CODEC_ISAC
|
||||
#undef WEBRTC_VOE_EXTERNAL_REC_AND_PLAYOUT
|
||||
|
||||
#define ANDROID_NOT_SUPPORTED(stat) NOT_SUPPORTED(stat)
|
||||
|
||||
#else // LINUX PC
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Defines
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#define ANDROID_NOT_SUPPORTED(stat)
|
||||
|
||||
#endif // ANDROID - LINUX PC
|
||||
|
||||
#else
|
||||
#define ANDROID_NOT_SUPPORTED(stat)
|
||||
#endif // #ifdef WEBRTC_LINUX
|
||||
|
||||
// *** WEBRTC_MAC ***
|
||||
@@ -359,35 +335,6 @@ inline int VoEChannelId(int moduleId)
|
||||
|
||||
// Default device for Mac and iPhone
|
||||
#define WEBRTC_VOICE_ENGINE_DEFAULT_DEVICE 0
|
||||
|
||||
// iPhone specific
|
||||
#if defined(WEBRTC_IOS)
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Defines
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// Always excluded for iPhone builds
|
||||
#undef WEBRTC_CODEC_ISAC
|
||||
#undef WEBRTC_VOE_EXTERNAL_REC_AND_PLAYOUT
|
||||
|
||||
#define IPHONE_NOT_SUPPORTED(stat) NOT_SUPPORTED(stat)
|
||||
|
||||
#else // Non-iPhone
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Enumerators
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Defines
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#define IPHONE_NOT_SUPPORTED(stat)
|
||||
#endif
|
||||
|
||||
#else
|
||||
#define IPHONE_NOT_SUPPORTED(stat)
|
||||
#endif // #ifdef WEBRTC_MAC
|
||||
|
||||
#endif // WEBRTC_VOICE_ENGINE_VOICE_ENGINE_DEFINES_H
|
||||
|
Reference in New Issue
Block a user