Remove const for plain data types in voice_engine/

BUG=1644
R=henrikg@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/1463004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4018 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
pbos@webrtc.org 2013-05-14 08:31:39 +00:00
parent 185bae4b6f
commit 9213521ea9
42 changed files with 386 additions and 386 deletions

View File

@ -94,7 +94,7 @@ Channel::InFrameType(int16_t frameType)
}
int32_t
Channel::OnRxVadDetected(const int vadDecision)
Channel::OnRxVadDetected(int vadDecision)
{
WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId, _channelId),
"Channel::OnRxVadDetected(vadDecision=%d)", vadDecision);
@ -332,10 +332,10 @@ Channel::SendRTCPPacket(int channel, const void *data, int len)
}
void
Channel::OnPlayTelephoneEvent(const int32_t id,
const uint8_t event,
const uint16_t lengthMs,
const uint8_t volume)
Channel::OnPlayTelephoneEvent(int32_t id,
uint8_t event,
uint16_t lengthMs,
uint8_t volume)
{
WEBRTC_TRACE(kTraceStream, kTraceVoice, VoEId(_instanceId,_channelId),
"Channel::OnPlayTelephoneEvent(id=%d, event=%u, lengthMs=%u,"
@ -356,8 +356,8 @@ Channel::OnPlayTelephoneEvent(const int32_t id,
}
void
Channel::OnIncomingSSRCChanged(const int32_t id,
const uint32_t SSRC)
Channel::OnIncomingSSRCChanged(int32_t id,
uint32_t SSRC)
{
WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId,_channelId),
"Channel::OnIncomingSSRCChanged(id=%d, SSRC=%d)",
@ -382,9 +382,9 @@ Channel::OnIncomingSSRCChanged(const int32_t id,
}
}
void Channel::OnIncomingCSRCChanged(const int32_t id,
const uint32_t CSRC,
const bool added)
void Channel::OnIncomingCSRCChanged(int32_t id,
uint32_t CSRC,
bool added)
{
WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId,_channelId),
"Channel::OnIncomingCSRCChanged(id=%d, CSRC=%d, added=%d)",
@ -405,10 +405,10 @@ void Channel::OnIncomingCSRCChanged(const int32_t id,
}
void
Channel::OnApplicationDataReceived(const int32_t id,
const uint8_t subType,
const uint32_t name,
const uint16_t length,
Channel::OnApplicationDataReceived(int32_t id,
uint8_t subType,
uint32_t name,
uint16_t length,
const uint8_t* data)
{
WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId,_channelId),
@ -436,12 +436,12 @@ Channel::OnApplicationDataReceived(const int32_t id,
int32_t
Channel::OnInitializeDecoder(
const int32_t id,
const int8_t payloadType,
int32_t id,
int8_t payloadType,
const char payloadName[RTP_PAYLOAD_NAME_SIZE],
const int frequency,
const uint8_t channels,
const uint32_t rate)
int frequency,
uint8_t channels,
uint32_t rate)
{
WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId,_channelId),
"Channel::OnInitializeDecoder(id=%d, payloadType=%d, "
@ -477,7 +477,7 @@ Channel::OnInitializeDecoder(
}
void
Channel::OnPacketTimeout(const int32_t id)
Channel::OnPacketTimeout(int32_t id)
{
WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId,_channelId),
"Channel::OnPacketTimeout(id=%d)", id);
@ -504,8 +504,8 @@ Channel::OnPacketTimeout(const int32_t id)
}
void
Channel::OnReceivedPacket(const int32_t id,
const RtpRtcpPacketType packetType)
Channel::OnReceivedPacket(int32_t id,
RtpRtcpPacketType packetType)
{
WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId,_channelId),
"Channel::OnReceivedPacket(id=%d, packetType=%d)",
@ -536,8 +536,8 @@ Channel::OnReceivedPacket(const int32_t id,
}
void
Channel::OnPeriodicDeadOrAlive(const int32_t id,
const RTPAliveType alive)
Channel::OnPeriodicDeadOrAlive(int32_t id,
RTPAliveType alive)
{
WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId,_channelId),
"Channel::OnPeriodicDeadOrAlive(id=%d, alive=%d)", id, alive);
@ -590,7 +590,7 @@ Channel::OnPeriodicDeadOrAlive(const int32_t id,
int32_t
Channel::OnReceivedPayloadData(const uint8_t* payloadData,
const uint16_t payloadSize,
uint16_t payloadSize,
const WebRtcRTPHeader* rtpHeader)
{
WEBRTC_TRACE(kTraceStream, kTraceVoice, VoEId(_instanceId,_channelId),
@ -631,7 +631,7 @@ Channel::OnReceivedPayloadData(const uint8_t* payloadData,
return 0;
}
int32_t Channel::GetAudioFrame(const int32_t id, AudioFrame& audioFrame)
int32_t Channel::GetAudioFrame(int32_t id, AudioFrame& audioFrame)
{
WEBRTC_TRACE(kTraceStream, kTraceVoice, VoEId(_instanceId,_channelId),
"Channel::GetAudioFrame(id=%d)", id);
@ -737,7 +737,7 @@ int32_t Channel::GetAudioFrame(const int32_t id, AudioFrame& audioFrame)
}
int32_t
Channel::NeededFrequency(const int32_t id)
Channel::NeededFrequency(int32_t id)
{
WEBRTC_TRACE(kTraceStream, kTraceVoice, VoEId(_instanceId,_channelId),
"Channel::NeededFrequency(id=%d)", id);
@ -778,8 +778,8 @@ Channel::NeededFrequency(const int32_t id)
int32_t
Channel::CreateChannel(Channel*& channel,
const int32_t channelId,
const uint32_t instanceId)
int32_t channelId,
uint32_t instanceId)
{
WEBRTC_TRACE(kTraceMemory, kTraceVoice, VoEId(instanceId,channelId),
"Channel::CreateChannel(channelId=%d, instanceId=%d)",
@ -798,7 +798,7 @@ Channel::CreateChannel(Channel*& channel,
}
void
Channel::PlayNotification(const int32_t id, const uint32_t durationMs)
Channel::PlayNotification(int32_t id, uint32_t durationMs)
{
WEBRTC_TRACE(kTraceStream, kTraceVoice, VoEId(_instanceId,_channelId),
"Channel::PlayNotification(id=%d, durationMs=%d)",
@ -808,7 +808,7 @@ Channel::PlayNotification(const int32_t id, const uint32_t durationMs)
}
void
Channel::RecordNotification(const int32_t id, const uint32_t durationMs)
Channel::RecordNotification(int32_t id, uint32_t durationMs)
{
WEBRTC_TRACE(kTraceStream, kTraceVoice, VoEId(_instanceId,_channelId),
"Channel::RecordNotification(id=%d, durationMs=%d)",
@ -818,7 +818,7 @@ Channel::RecordNotification(const int32_t id, const uint32_t durationMs)
}
void
Channel::PlayFileEnded(const int32_t id)
Channel::PlayFileEnded(int32_t id)
{
WEBRTC_TRACE(kTraceStream, kTraceVoice, VoEId(_instanceId,_channelId),
"Channel::PlayFileEnded(id=%d)", id);
@ -846,7 +846,7 @@ Channel::PlayFileEnded(const int32_t id)
}
void
Channel::RecordFileEnded(const int32_t id)
Channel::RecordFileEnded(int32_t id)
{
WEBRTC_TRACE(kTraceStream, kTraceVoice, VoEId(_instanceId,_channelId),
"Channel::RecordFileEnded(id=%d)", id);
@ -862,8 +862,8 @@ Channel::RecordFileEnded(const int32_t id)
" shutdown");
}
Channel::Channel(const int32_t channelId,
const uint32_t instanceId) :
Channel::Channel(int32_t channelId,
uint32_t instanceId) :
_fileCritSect(*CriticalSectionWrapper::CreateCriticalSection()),
_callbackCritSect(*CriticalSectionWrapper::CreateCriticalSection()),
_instanceId(instanceId),
@ -2300,11 +2300,11 @@ Channel::GetPeriodicDeadOrAliveStatus(bool& enabled, int& sampleTimeSeconds)
}
int Channel::StartPlayingFileLocally(const char* fileName,
const bool loop,
const FileFormats format,
const int startPosition,
const float volumeScaling,
const int stopPosition,
bool loop,
FileFormats format,
int startPosition,
float volumeScaling,
int stopPosition,
const CodecInst* codecInst)
{
WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId,_channelId),
@ -2372,10 +2372,10 @@ int Channel::StartPlayingFileLocally(const char* fileName,
}
int Channel::StartPlayingFileLocally(InStream* stream,
const FileFormats format,
const int startPosition,
const float volumeScaling,
const int stopPosition,
FileFormats format,
int startPosition,
float volumeScaling,
int stopPosition,
const CodecInst* codecInst)
{
WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId,_channelId),
@ -2530,7 +2530,7 @@ int Channel::RegisterFilePlayingToMixer()
return 0;
}
int Channel::ScaleLocalFilePlayout(const float scale)
int Channel::ScaleLocalFilePlayout(float scale)
{
WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId,_channelId),
"Channel::ScaleLocalFilePlayout(scale=%5.3f)", scale);
@ -2586,11 +2586,11 @@ int Channel::GetLocalPlayoutPosition(int& positionMs)
}
int Channel::StartPlayingFileAsMicrophone(const char* fileName,
const bool loop,
const FileFormats format,
const int startPosition,
const float volumeScaling,
const int stopPosition,
bool loop,
FileFormats format,
int startPosition,
float volumeScaling,
int stopPosition,
const CodecInst* codecInst)
{
WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId,_channelId),
@ -2655,10 +2655,10 @@ int Channel::StartPlayingFileAsMicrophone(const char* fileName,
}
int Channel::StartPlayingFileAsMicrophone(InStream* stream,
const FileFormats format,
const int startPosition,
const float volumeScaling,
const int stopPosition,
FileFormats format,
int startPosition,
float volumeScaling,
int stopPosition,
const CodecInst* codecInst)
{
WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId,_channelId),
@ -2762,7 +2762,7 @@ int Channel::IsPlayingFileAsMicrophone() const
return _inputFilePlaying;
}
int Channel::ScaleFileAsMicrophonePlayout(const float scale)
int Channel::ScaleFileAsMicrophonePlayout(float scale)
{
WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId,_channelId),
"Channel::ScaleFileAsMicrophonePlayout(scale=%5.3f)", scale);
@ -3280,7 +3280,7 @@ Channel::VoiceActivityIndicator(int &activity)
#ifdef WEBRTC_VOICE_ENGINE_AGC
int
Channel::SetRxAgcStatus(const bool enable, const AgcModes mode)
Channel::SetRxAgcStatus(bool enable, AgcModes mode)
{
WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId,_channelId),
"Channel::SetRxAgcStatus(enable=%d, mode=%d)",
@ -3360,7 +3360,7 @@ Channel::GetRxAgcStatus(bool& enabled, AgcModes& mode)
}
int
Channel::SetRxAgcConfig(const AgcConfig config)
Channel::SetRxAgcConfig(AgcConfig config)
{
WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId,_channelId),
"Channel::SetRxAgcConfig()");
@ -3424,7 +3424,7 @@ Channel::GetRxAgcConfig(AgcConfig& config)
#ifdef WEBRTC_VOICE_ENGINE_NR
int
Channel::SetRxNsStatus(const bool enable, const NsModes mode)
Channel::SetRxNsStatus(bool enable, NsModes mode)
{
WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId,_channelId),
"Channel::SetRxNsStatus(enable=%d, mode=%d)",
@ -3888,7 +3888,7 @@ Channel::GetRemoteRTCPData(
}
int
Channel::SendApplicationDefinedRTCPPacket(const unsigned char subType,
Channel::SendApplicationDefinedRTCPPacket(unsigned char subType,
unsigned int name,
const char* data,
unsigned short dataLengthInBytes)
@ -4835,7 +4835,7 @@ Channel::GetRtpRtcp(RtpRtcp* &rtpRtcpModule) const
// TODO(andrew): refactor Mix functions here and in transmit_mixer.cc to use
// a shared helper.
int32_t
Channel::MixOrReplaceAudioWithFile(const int mixingFrequency)
Channel::MixOrReplaceAudioWithFile(int mixingFrequency)
{
scoped_array<int16_t> fileBuffer(new int16_t[640]);
int fileSamples(0);
@ -4903,7 +4903,7 @@ Channel::MixOrReplaceAudioWithFile(const int mixingFrequency)
int32_t
Channel::MixAudioWithFile(AudioFrame& audioFrame,
const int mixingFrequency)
int mixingFrequency)
{
assert(mixingFrequency <= 32000);

View File

@ -72,9 +72,9 @@ public:
public:
virtual ~Channel();
static int32_t CreateChannel(Channel*& channel,
const int32_t channelId,
const uint32_t instanceId);
Channel(const int32_t channelId, const uint32_t instanceId);
int32_t channelId,
uint32_t instanceId);
Channel(int32_t channelId, uint32_t instanceId);
int32_t Init();
int32_t SetEngineInformation(
Statistics& engineStatistics,
@ -139,37 +139,37 @@ public:
int32_t GetPeriodicDeadOrAliveStatus(bool& enabled, int& sampleTimeSeconds);
// VoEFile
int StartPlayingFileLocally(const char* fileName, const bool loop,
const FileFormats format,
const int startPosition,
const float volumeScaling,
const int stopPosition,
int StartPlayingFileLocally(const char* fileName, bool loop,
FileFormats format,
int startPosition,
float volumeScaling,
int stopPosition,
const CodecInst* codecInst);
int StartPlayingFileLocally(InStream* stream, const FileFormats format,
const int startPosition,
const float volumeScaling,
const int stopPosition,
int StartPlayingFileLocally(InStream* stream, FileFormats format,
int startPosition,
float volumeScaling,
int stopPosition,
const CodecInst* codecInst);
int StopPlayingFileLocally();
int IsPlayingFileLocally() const;
int RegisterFilePlayingToMixer();
int ScaleLocalFilePlayout(const float scale);
int ScaleLocalFilePlayout(float scale);
int GetLocalPlayoutPosition(int& positionMs);
int StartPlayingFileAsMicrophone(const char* fileName, const bool loop,
const FileFormats format,
const int startPosition,
const float volumeScaling,
const int stopPosition,
int StartPlayingFileAsMicrophone(const char* fileName, bool loop,
FileFormats format,
int startPosition,
float volumeScaling,
int stopPosition,
const CodecInst* codecInst);
int StartPlayingFileAsMicrophone(InStream* stream,
const FileFormats format,
const int startPosition,
const float volumeScaling,
const int stopPosition,
FileFormats format,
int startPosition,
float volumeScaling,
int stopPosition,
const CodecInst* codecInst);
int StopPlayingFileAsMicrophone();
int IsPlayingFileAsMicrophone() const;
int ScaleFileAsMicrophonePlayout(const float scale);
int ScaleFileAsMicrophonePlayout(float scale);
int StartRecordingPlayout(const char* fileName, const CodecInst* codecInst);
int StartRecordingPlayout(OutStream* stream, const CodecInst* codecInst);
int StopRecordingPlayout();
@ -185,7 +185,7 @@ public:
// VoEVolumeControl
int GetSpeechOutputLevel(uint32_t& level) const;
int GetSpeechOutputLevelFullRange(uint32_t& level) const;
int SetMute(const bool enable);
int SetMute(bool enable);
bool Mute() const;
int SetOutputVolumePan(float left, float right);
int GetOutputVolumePan(float& left, float& right) const;
@ -234,13 +234,13 @@ public:
int DeRegisterRxVadObserver();
int VoiceActivityIndicator(int &activity);
#ifdef WEBRTC_VOICE_ENGINE_AGC
int SetRxAgcStatus(const bool enable, const AgcModes mode);
int SetRxAgcStatus(bool enable, AgcModes mode);
int GetRxAgcStatus(bool& enabled, AgcModes& mode);
int SetRxAgcConfig(const AgcConfig config);
int SetRxAgcConfig(AgcConfig config);
int GetRxAgcConfig(AgcConfig& config);
#endif
#ifdef WEBRTC_VOICE_ENGINE_NR
int SetRxNsStatus(const bool enable, const NsModes mode);
int SetRxNsStatus(bool enable, NsModes mode);
int GetRxNsStatus(bool& enabled, NsModes& mode);
#endif
@ -264,7 +264,7 @@ public:
unsigned int& timestamp,
unsigned int& playoutTimestamp, unsigned int* jitter,
unsigned short* fractionLost);
int SendApplicationDefinedRTCPPacket(const unsigned char subType,
int SendApplicationDefinedRTCPPacket(unsigned char subType,
unsigned int name, const char* data,
unsigned short dataLengthInBytes);
int GetRTPStatistics(unsigned int& averageJitterMs,
@ -295,55 +295,55 @@ public:
int32_t InFrameType(int16_t frameType);
public:
int32_t OnRxVadDetected(const int vadDecision);
int32_t OnRxVadDetected(int vadDecision);
public:
// From RtpData in the RTP/RTCP module
int32_t OnReceivedPayloadData(const uint8_t* payloadData,
const uint16_t payloadSize,
uint16_t payloadSize,
const WebRtcRTPHeader* rtpHeader);
public:
// From RtpFeedback in the RTP/RTCP module
int32_t OnInitializeDecoder(
const int32_t id,
const int8_t payloadType,
int32_t id,
int8_t payloadType,
const char payloadName[RTP_PAYLOAD_NAME_SIZE],
const int frequency,
const uint8_t channels,
const uint32_t rate);
int frequency,
uint8_t channels,
uint32_t rate);
void OnPacketTimeout(const int32_t id);
void OnPacketTimeout(int32_t id);
void OnReceivedPacket(const int32_t id, const RtpRtcpPacketType packetType);
void OnReceivedPacket(int32_t id, RtpRtcpPacketType packetType);
void OnPeriodicDeadOrAlive(const int32_t id,
const RTPAliveType alive);
void OnPeriodicDeadOrAlive(int32_t id,
RTPAliveType alive);
void OnIncomingSSRCChanged(const int32_t id,
const uint32_t SSRC);
void OnIncomingSSRCChanged(int32_t id,
uint32_t SSRC);
void OnIncomingCSRCChanged(const int32_t id,
const uint32_t CSRC, const bool added);
void OnIncomingCSRCChanged(int32_t id,
uint32_t CSRC, bool added);
public:
// From RtcpFeedback in the RTP/RTCP module
void OnApplicationDataReceived(const int32_t id,
const uint8_t subType,
const uint32_t name,
const uint16_t length,
void OnApplicationDataReceived(int32_t id,
uint8_t subType,
uint32_t name,
uint16_t length,
const uint8_t* data);
public:
// From RtpAudioFeedback in the RTP/RTCP module
void OnReceivedTelephoneEvent(const int32_t id,
const uint8_t event,
const bool endOfEvent);
void OnReceivedTelephoneEvent(int32_t id,
uint8_t event,
bool endOfEvent);
void OnPlayTelephoneEvent(const int32_t id,
const uint8_t event,
const uint16_t lengthMs,
const uint8_t volume);
void OnPlayTelephoneEvent(int32_t id,
uint8_t event,
uint16_t lengthMs,
uint8_t volume);
public:
// From Transport (called by the RTP/RTCP module)
@ -352,8 +352,8 @@ public:
public:
// From MixerParticipant
int32_t GetAudioFrame(const int32_t id, AudioFrame& audioFrame);
int32_t NeededFrequency(const int32_t id);
int32_t GetAudioFrame(int32_t id, AudioFrame& audioFrame);
int32_t NeededFrequency(int32_t id);
public:
// From MonitorObserver
@ -361,12 +361,12 @@ public:
public:
// From FileCallback
void PlayNotification(const int32_t id,
const uint32_t durationMs);
void RecordNotification(const int32_t id,
const uint32_t durationMs);
void PlayFileEnded(const int32_t id);
void RecordFileEnded(const int32_t id);
void PlayNotification(int32_t id,
uint32_t durationMs);
void RecordNotification(int32_t id,
uint32_t durationMs);
void PlayFileEnded(int32_t id);
void RecordFileEnded(int32_t id);
public:
uint32_t InstanceId() const
@ -423,8 +423,8 @@ public:
private:
int InsertInbandDtmfTone();
int32_t MixOrReplaceAudioWithFile(const int mixingFrequency);
int32_t MixAudioWithFile(AudioFrame& audioFrame, const int mixingFrequency);
int32_t MixOrReplaceAudioWithFile(int mixingFrequency);
int32_t MixAudioWithFile(AudioFrame& audioFrame, int mixingFrequency);
void UpdateDeadOrAliveCounters(bool alive);
int32_t SendPacketRaw(const void *data, int len, bool RTCP);
void UpdatePacketDelay(uint32_t timestamp,

View File

@ -17,7 +17,7 @@ namespace webrtc
namespace voe
{
ChannelManager::ChannelManager(const uint32_t instanceId) :
ChannelManager::ChannelManager(uint32_t instanceId) :
ChannelManagerBase(),
_instanceId(instanceId)
{
@ -33,7 +33,7 @@ bool ChannelManager::CreateChannel(int32_t& channelId)
return ChannelManagerBase::CreateItem(channelId);
}
int32_t ChannelManager::DestroyChannel(const int32_t channelId)
int32_t ChannelManager::DestroyChannel(int32_t channelId)
{
Channel* deleteChannel =
static_cast<Channel*> (ChannelManagerBase::RemoveItem(channelId));
@ -71,7 +71,7 @@ void ChannelManager::DeleteItem(void* item)
delete deleteItem;
}
Channel* ChannelManager::GetChannel(const int32_t channelId) const
Channel* ChannelManager::GetChannel(int32_t channelId) const
{
return static_cast<Channel*> (ChannelManagerBase::GetItem(channelId));
}

View File

@ -30,7 +30,7 @@ class ChannelManager: private ChannelManagerBase
public:
bool CreateChannel(int32_t& channelId);
int32_t DestroyChannel(const int32_t channelId);
int32_t DestroyChannel(int32_t channelId);
int32_t MaxNumOfChannels() const;
@ -39,7 +39,7 @@ public:
void GetChannelIds(int32_t* channelsArray,
int32_t& numOfChannels) const;
ChannelManager(const uint32_t instanceId);
ChannelManager(uint32_t instanceId);
~ChannelManager();
@ -48,7 +48,7 @@ private:
ChannelManager& operator=(const ChannelManager&);
Channel* GetChannel(const int32_t channelId) const;
Channel* GetChannel(int32_t channelId) const;
void GetChannels(MapWrapper& channels) const;

View File

@ -64,7 +64,7 @@ const int16_t Dtmf_dBm0kHz[37]=
};
DtmfInband::DtmfInband(const int32_t id) :
DtmfInband::DtmfInband(int32_t id) :
_critSect(*CriticalSectionWrapper::CreateCriticalSection()),
_id(id),
_outputFrequencyHz(8000),
@ -87,7 +87,7 @@ DtmfInband::~DtmfInband()
}
int
DtmfInband::SetSampleRate(const uint16_t frequency)
DtmfInband::SetSampleRate(uint16_t frequency)
{
if (frequency != 8000 &&
frequency != 16000 &&
@ -125,7 +125,7 @@ DtmfInband::Init()
}
int
DtmfInband::AddTone(const uint8_t eventCode,
DtmfInband::AddTone(uint8_t eventCode,
int32_t lengthMs,
int32_t attenuationDb)
{
@ -170,7 +170,7 @@ DtmfInband::ResetTone()
}
int
DtmfInband::StartTone(const uint8_t eventCode,
DtmfInband::StartTone(uint8_t eventCode,
int32_t attenuationDb)
{
CriticalSectionScoped lock(&_critSect);
@ -263,10 +263,10 @@ DtmfInband::DelaySinceLastTone() const
int16_t
DtmfInband::DtmfFix_generate(int16_t *decoded,
const int16_t value,
const int16_t volume,
const int16_t frameLen,
const int16_t fs)
int16_t value,
int16_t volume,
int16_t frameLen,
int16_t fs)
{
const int16_t *a_times2Tbl;
const int16_t *y2_Table;
@ -348,11 +348,11 @@ DtmfInband::DtmfFix_generate(int16_t *decoded,
}
int16_t
DtmfInband::DtmfFix_generateSignal(const int16_t a1_times2,
const int16_t a2_times2,
const int16_t volume,
DtmfInband::DtmfFix_generateSignal(int16_t a1_times2,
int16_t a2_times2,
int16_t volume,
int16_t *signal,
const int16_t length)
int16_t length)
{
int i;

View File

@ -24,22 +24,22 @@ class CriticalSectionWrapper;
class DtmfInband
{
public:
DtmfInband(const int32_t id);
DtmfInband(int32_t id);
virtual ~DtmfInband();
void Init();
int SetSampleRate(const uint16_t frequency);
int SetSampleRate(uint16_t frequency);
int GetSampleRate(uint16_t& frequency);
int AddTone(const uint8_t eventCode,
int AddTone(uint8_t eventCode,
int32_t lengthMs,
int32_t attenuationDb);
int ResetTone();
int StartTone(const uint8_t eventCode, int32_t attenuationDb);
int StartTone(uint8_t eventCode, int32_t attenuationDb);
int StopTone();
@ -54,21 +54,21 @@ public:
private:
void ReInit();
int16_t DtmfFix_generate(int16_t* decoded,
const int16_t value,
const int16_t volume,
const int16_t frameLen,
const int16_t fs);
int16_t value,
int16_t volume,
int16_t frameLen,
int16_t fs);
private:
enum {kDtmfFrameSizeMs = 10};
enum {kDtmfAmpHigh = 32768};
enum {kDtmfAmpLow = 23171}; // 3 dB lower than the high frequency
int16_t DtmfFix_generateSignal(const int16_t a1_times2,
const int16_t a2_times2,
const int16_t volume,
int16_t DtmfFix_generateSignal(int16_t a1_times2,
int16_t a2_times2,
int16_t volume,
int16_t* signal,
const int16_t length);
int16_t length);
private:
CriticalSectionWrapper& _critSect;

View File

@ -13,7 +13,7 @@
namespace webrtc {
DtmfInbandQueue::DtmfInbandQueue(const int32_t id):
DtmfInbandQueue::DtmfInbandQueue(int32_t id):
_id(id),
_DtmfCritsect(*CriticalSectionWrapper::CreateCriticalSection()),
_nextEmptyIndex(0)

View File

@ -22,7 +22,7 @@ class DtmfInbandQueue
{
public:
DtmfInbandQueue(const int32_t id);
DtmfInbandQueue(int32_t id);
virtual ~DtmfInbandQueue();

View File

@ -17,8 +17,8 @@ namespace webrtc {
class MockVoeConnectionObserver : public VoEConnectionObserver {
public:
MOCK_METHOD2(OnPeriodicDeadOrAlive, void(const int channel,
const bool alive));
MOCK_METHOD2(OnPeriodicDeadOrAlive, void(int channel,
bool alive));
};
}

View File

@ -21,7 +21,7 @@ class MockVoEObserver: public VoiceEngineObserver {
MockVoEObserver() {}
virtual ~MockVoEObserver() {}
MOCK_METHOD2(CallbackOnError, void(const int channel, const int error_code));
MOCK_METHOD2(CallbackOnError, void(int channel, int error_code));
};
}

View File

@ -83,7 +83,7 @@ public:
// Sets the AGC configuration.
// Should only be used in situations where the working environment
// is well known.
virtual int SetAgcConfig(const AgcConfig config) = 0;
virtual int SetAgcConfig(AgcConfig config) = 0;
// Gets the AGC configuration.
virtual int GetAgcConfig(AgcConfig& config) = 0;
@ -152,7 +152,7 @@ public:
// Modifies the AGC configuration on the receiving side for the
// specified |channel|.
virtual int SetRxAgcConfig(int channel, const AgcConfig config) = 0;
virtual int SetRxAgcConfig(int channel, AgcConfig config) = 0;
// Gets the AGC configuration on the receiving side.
virtual int GetRxAgcConfig(int channel, AgcConfig& config) = 0;

View File

@ -50,7 +50,7 @@ public:
// This method will be called after the occurrence of any runtime error
// code, or warning notification, when the observer interface has been
// installed using VoEBase::RegisterVoiceEngineObserver().
virtual void CallbackOnError(const int channel, const int errCode) = 0;
virtual void CallbackOnError(int channel, int errCode) = 0;
protected:
virtual ~VoiceEngineObserver() {}
@ -72,11 +72,11 @@ public:
// Specifies the amount and type of trace information which will be
// created by the VoiceEngine.
static int SetTraceFilter(const unsigned int filter);
static int SetTraceFilter(unsigned int filter);
// Sets the name of the trace file and enables non-encrypted trace messages.
static int SetTraceFile(const char* fileNameUTF8,
const bool addFileCounter = false);
bool addFileCounter = false);
// Installs the TraceCallback implementation to ensure that the user
// receives callbacks for generated trace messages.

View File

@ -51,9 +51,9 @@ public:
// The sampling frequency will depend upon the codec used.
// If |isStereo| is true, audio10ms will contain 16-bit PCM data
// samples in interleaved stereo format (L0,R0,L1,R1,...).
virtual void Process(const int channel, const ProcessingTypes type,
int16_t audio10ms[], const int length,
const int samplingFreq, const bool isStereo) = 0;
virtual void Process(int channel, ProcessingTypes type,
int16_t audio10ms[], int length,
int samplingFreq, bool isStereo) = 0;
protected:
virtual ~VoEMediaProcess() {}

View File

@ -47,7 +47,7 @@ public:
// This method will be called peridically and deliver dead-or-alive
// notifications for a specified |channel| when the observer interface
// has been installed and activated.
virtual void OnPeriodicDeadOrAlive(const int channel, const bool alive) = 0;
virtual void OnPeriodicDeadOrAlive(int channel, bool alive) = 0;
protected:
virtual ~VoEConnectionObserver() {}

View File

@ -52,10 +52,10 @@ class WEBRTC_DLLEXPORT VoERTPObserver
{
public:
virtual void OnIncomingCSRCChanged(
const int channel, const unsigned int CSRC, const bool added) = 0;
int channel, unsigned int CSRC, bool added) = 0;
virtual void OnIncomingSSRCChanged(
const int channel, const unsigned int SSRC) = 0;
int channel, unsigned int SSRC) = 0;
protected:
virtual ~VoERTPObserver() {}
@ -66,9 +66,9 @@ class WEBRTC_DLLEXPORT VoERTCPObserver
{
public:
virtual void OnApplicationDataReceived(
const int channel, const unsigned char subType,
const unsigned int name, const unsigned char* data,
const unsigned short dataLengthInBytes) = 0;
int channel, unsigned char subType,
unsigned int name, const unsigned char* data,
unsigned short dataLengthInBytes) = 0;
protected:
virtual ~VoERTCPObserver() {}
@ -209,7 +209,7 @@ public:
// Sends an RTCP APP packet on a specific |channel|.
virtual int SendApplicationDefinedRTCPPacket(
int channel, const unsigned char subType, unsigned int name,
int channel, unsigned char subType, unsigned int name,
const char* data, unsigned short dataLengthInBytes) = 0;
// Sets the Forward Error Correction (FEC) status on a specific |channel|.

View File

@ -61,7 +61,7 @@ MonitorModule::Version(char* version,
}
int32_t
MonitorModule::ChangeUniqueId(const int32_t id)
MonitorModule::ChangeUniqueId(int32_t id)
{
return 0;
}

View File

@ -44,7 +44,7 @@ public: // module
uint32_t& remainingBufferInBytes,
uint32_t& position) const;
int32_t ChangeUniqueId(const int32_t id);
int32_t ChangeUniqueId(int32_t id);
int32_t TimeUntilNextProcess();

View File

@ -24,10 +24,10 @@ namespace webrtc {
namespace voe {
void
OutputMixer::NewMixedAudio(const int32_t id,
OutputMixer::NewMixedAudio(int32_t id,
const AudioFrame& generalAudioFrame,
const AudioFrame** uniqueAudioFrames,
const uint32_t size)
uint32_t size)
{
WEBRTC_TRACE(kTraceStream, kTraceVoice, VoEId(_instanceId,-1),
"OutputMixer::NewMixedAudio(id=%d, size=%u)", id, size);
@ -37,29 +37,29 @@ OutputMixer::NewMixedAudio(const int32_t id,
}
void OutputMixer::MixedParticipants(
const int32_t id,
int32_t id,
const ParticipantStatistics* participantStatistics,
const uint32_t size)
uint32_t size)
{
WEBRTC_TRACE(kTraceStream, kTraceVoice, VoEId(_instanceId,-1),
"OutputMixer::MixedParticipants(id=%d, size=%u)", id, size);
}
void OutputMixer::VADPositiveParticipants(const int32_t id,
const ParticipantStatistics* participantStatistics, const uint32_t size)
void OutputMixer::VADPositiveParticipants(int32_t id,
const ParticipantStatistics* participantStatistics, uint32_t size)
{
WEBRTC_TRACE(kTraceStream, kTraceVoice, VoEId(_instanceId,-1),
"OutputMixer::VADPositiveParticipants(id=%d, size=%u)",
id, size);
}
void OutputMixer::MixedAudioLevel(const int32_t id, const uint32_t level)
void OutputMixer::MixedAudioLevel(int32_t id, uint32_t level)
{
WEBRTC_TRACE(kTraceStream, kTraceVoice, VoEId(_instanceId,-1),
"OutputMixer::MixedAudioLevel(id=%d, level=%u)", id, level);
}
void OutputMixer::PlayNotification(const int32_t id, const uint32_t durationMs)
void OutputMixer::PlayNotification(int32_t id, uint32_t durationMs)
{
WEBRTC_TRACE(kTraceStream, kTraceVoice, VoEId(_instanceId,-1),
"OutputMixer::PlayNotification(id=%d, durationMs=%d)",
@ -67,8 +67,8 @@ void OutputMixer::PlayNotification(const int32_t id, const uint32_t durationMs)
// Not implement yet
}
void OutputMixer::RecordNotification(const int32_t id,
const uint32_t durationMs)
void OutputMixer::RecordNotification(int32_t id,
uint32_t durationMs)
{
WEBRTC_TRACE(kTraceStream, kTraceVoice, VoEId(_instanceId,-1),
"OutputMixer::RecordNotification(id=%d, durationMs=%d)",
@ -77,7 +77,7 @@ void OutputMixer::RecordNotification(const int32_t id,
// Not implement yet
}
void OutputMixer::PlayFileEnded(const int32_t id)
void OutputMixer::PlayFileEnded(int32_t id)
{
WEBRTC_TRACE(kTraceStream, kTraceVoice, VoEId(_instanceId,-1),
"OutputMixer::PlayFileEnded(id=%d)", id);
@ -85,7 +85,7 @@ void OutputMixer::PlayFileEnded(const int32_t id)
// not needed
}
void OutputMixer::RecordFileEnded(const int32_t id)
void OutputMixer::RecordFileEnded(int32_t id)
{
WEBRTC_TRACE(kTraceStream, kTraceVoice, VoEId(_instanceId,-1),
"OutputMixer::RecordFileEnded(id=%d)", id);
@ -99,7 +99,7 @@ void OutputMixer::RecordFileEnded(const int32_t id)
}
int32_t
OutputMixer::Create(OutputMixer*& mixer, const uint32_t instanceId)
OutputMixer::Create(OutputMixer*& mixer, uint32_t instanceId)
{
WEBRTC_TRACE(kTraceMemory, kTraceVoice, instanceId,
"OutputMixer::Create(instanceId=%d)", instanceId);
@ -114,7 +114,7 @@ OutputMixer::Create(OutputMixer*& mixer, const uint32_t instanceId)
return 0;
}
OutputMixer::OutputMixer(const uint32_t instanceId) :
OutputMixer::OutputMixer(uint32_t instanceId) :
_callbackCritSect(*CriticalSectionWrapper::CreateCriticalSection()),
_fileCritSect(*CriticalSectionWrapper::CreateCriticalSection()),
_mixerModule(*AudioConferenceMixer::Create(instanceId)),
@ -262,14 +262,14 @@ int OutputMixer::StopPlayingDtmfTone()
int32_t
OutputMixer::SetMixabilityStatus(MixerParticipant& participant,
const bool mixable)
bool mixable)
{
return _mixerModule.SetMixabilityStatus(participant, mixable);
}
int32_t
OutputMixer::SetAnonymousMixabilityStatus(MixerParticipant& participant,
const bool mixable)
bool mixable)
{
return _mixerModule.SetAnonymousMixabilityStatus(participant,mixable);
}

View File

@ -36,7 +36,7 @@ class OutputMixer : public AudioMixerOutputReceiver,
public FileCallback
{
public:
static int32_t Create(OutputMixer*& mixer, const uint32_t instanceId);
static int32_t Create(OutputMixer*& mixer, uint32_t instanceId);
static void Destroy(OutputMixer*& mixer);
@ -63,10 +63,10 @@ public:
int32_t DoOperationsOnCombinedSignal();
int32_t SetMixabilityStatus(MixerParticipant& participant,
const bool mixable);
bool mixable);
int32_t SetAnonymousMixabilityStatus(MixerParticipant& participant,
const bool mixable);
bool mixable);
int GetMixedAudio(int sample_rate_hz, int num_channels,
AudioFrame* audioFrame);
@ -92,34 +92,34 @@ public:
// from AudioMixerOutputReceiver
virtual void NewMixedAudio(
const int32_t id,
int32_t id,
const AudioFrame& generalAudioFrame,
const AudioFrame** uniqueAudioFrames,
const uint32_t size);
uint32_t size);
// from AudioMixerStatusReceiver
virtual void MixedParticipants(
const int32_t id,
int32_t id,
const ParticipantStatistics* participantStatistics,
const uint32_t size);
uint32_t size);
virtual void VADPositiveParticipants(
const int32_t id,
int32_t id,
const ParticipantStatistics* participantStatistics,
const uint32_t size);
uint32_t size);
virtual void MixedAudioLevel(const int32_t id, const uint32_t level);
virtual void MixedAudioLevel(int32_t id, uint32_t level);
// For file recording
void PlayNotification(const int32_t id, const uint32_t durationMs);
void PlayNotification(int32_t id, uint32_t durationMs);
void RecordNotification(const int32_t id, const uint32_t durationMs);
void RecordNotification(int32_t id, uint32_t durationMs);
void PlayFileEnded(const int32_t id);
void RecordFileEnded(const int32_t id);
void PlayFileEnded(int32_t id);
void RecordFileEnded(int32_t id);
private:
OutputMixer(const uint32_t instanceId);
OutputMixer(uint32_t instanceId);
void APMAnalyzeReverseStream();
int InsertInbandDtmfTone();

View File

@ -104,16 +104,16 @@ uint16_t SharedData::NumOfSendingChannels()
return nChannelsSending;
}
void SharedData::SetLastError(const int32_t error) const {
void SharedData::SetLastError(int32_t error) const {
_engineStatistics.SetLastError(error);
}
void SharedData::SetLastError(const int32_t error,
const TraceLevel level) const {
void SharedData::SetLastError(int32_t error,
TraceLevel level) const {
_engineStatistics.SetLastError(error, level);
}
void SharedData::SetLastError(const int32_t error, const TraceLevel level,
void SharedData::SetLastError(int32_t error, TraceLevel level,
const char* msg) const {
_engineStatistics.SetLastError(error, level, msg);
}

View File

@ -58,9 +58,9 @@ public:
uint16_t NumOfSendingChannels();
// Convenience methods for calling statistics().SetLastError().
void SetLastError(const int32_t error) const;
void SetLastError(const int32_t error, const TraceLevel level) const;
void SetLastError(const int32_t error, const TraceLevel level,
void SetLastError(int32_t error) const;
void SetLastError(int32_t error, TraceLevel level) const;
void SetLastError(int32_t error, TraceLevel level,
const char* msg) const;
protected:

View File

@ -20,7 +20,7 @@ namespace webrtc {
namespace voe {
Statistics::Statistics(const uint32_t instanceId) :
Statistics::Statistics(uint32_t instanceId) :
_critPtr(CriticalSectionWrapper::CreateCriticalSection()),
_instanceId(instanceId),
_lastError(0),
@ -54,15 +54,15 @@ bool Statistics::Initialized() const
return _isInitialized;
}
int32_t Statistics::SetLastError(const int32_t error) const
int32_t Statistics::SetLastError(int32_t error) const
{
CriticalSectionScoped cs(_critPtr);
_lastError = error;
return 0;
}
int32_t Statistics::SetLastError(const int32_t error,
const TraceLevel level) const
int32_t Statistics::SetLastError(int32_t error,
TraceLevel level) const
{
CriticalSectionScoped cs(_critPtr);
_lastError = error;
@ -73,8 +73,8 @@ int32_t Statistics::SetLastError(const int32_t error,
}
int32_t Statistics::SetLastError(
const int32_t error,
const TraceLevel level, const char* msg) const
int32_t error,
TraceLevel level, const char* msg) const
{
CriticalSectionScoped cs(_critPtr);
char traceMessage[KTraceMaxMessageSize];

View File

@ -26,16 +26,16 @@ class Statistics
public:
enum {KTraceMaxMessageSize = 256};
public:
Statistics(const uint32_t instanceId);
Statistics(uint32_t instanceId);
~Statistics();
int32_t SetInitialized();
int32_t SetUnInitialized();
bool Initialized() const;
int32_t SetLastError(const int32_t error) const;
int32_t SetLastError(const int32_t error, const TraceLevel level) const;
int32_t SetLastError(const int32_t error,
const TraceLevel level,
int32_t SetLastError(int32_t error) const;
int32_t SetLastError(int32_t error, TraceLevel level) const;
int32_t SetLastError(int32_t error,
TraceLevel level,
const char* msg) const;
int32_t LastError() const;

View File

@ -14,12 +14,12 @@
class FakeMediaProcess : public webrtc::VoEMediaProcess {
public:
virtual void Process(const int channel,
virtual void Process(int channel,
const webrtc::ProcessingTypes type,
int16_t audio_10ms[],
const int length,
const int sampling_freq_hz,
const bool stereo) {
int length,
int sampling_freq_hz,
bool stereo) {
for (int i = 0; i < length; i++) {
if (!stereo) {
audio_10ms[i] = static_cast<int16_t>(audio_10ms[i] *

View File

@ -14,7 +14,7 @@ class TestErrorObserver : public webrtc::VoiceEngineObserver {
public:
TestErrorObserver() {}
virtual ~TestErrorObserver() {}
void CallbackOnError(const int channel, const int error_code) {
void CallbackOnError(int channel, int error_code) {
ADD_FAILURE() << "Unexpected error on channel " << channel <<
": error code " << error_code;
}

View File

@ -16,11 +16,11 @@ class TestRtpObserver : public webrtc::VoERTPObserver {
public:
TestRtpObserver();
virtual ~TestRtpObserver();
virtual void OnIncomingCSRCChanged(const int channel,
const unsigned int CSRC,
const bool added);
virtual void OnIncomingSSRCChanged(const int channel,
const unsigned int SSRC);
virtual void OnIncomingCSRCChanged(int channel,
unsigned int CSRC,
bool added);
virtual void OnIncomingSSRCChanged(int channel,
unsigned int SSRC);
void Reset();
public:
unsigned int ssrc_[2];
@ -47,9 +47,9 @@ void TestRtpObserver::Reset() {
}
}
void TestRtpObserver::OnIncomingCSRCChanged(const int channel,
const unsigned int CSRC,
const bool added) {
void TestRtpObserver::OnIncomingCSRCChanged(int channel,
unsigned int CSRC,
bool added) {
char msg[128];
sprintf(msg, "=> OnIncomingCSRCChanged(channel=%d, CSRC=%u, added=%d)\n",
channel, CSRC, added);
@ -66,8 +66,8 @@ void TestRtpObserver::OnIncomingCSRCChanged(const int channel,
size_[channel] = 0;
}
void TestRtpObserver::OnIncomingSSRCChanged(const int channel,
const unsigned int SSRC) {
void TestRtpObserver::OnIncomingSSRCChanged(int channel,
unsigned int SSRC) {
char msg[128];
sprintf(msg, "\n=> OnIncomingSSRCChanged(channel=%d, SSRC=%u)\n", channel,
SSRC);
@ -78,11 +78,11 @@ void TestRtpObserver::OnIncomingSSRCChanged(const int channel,
class RtcpAppHandler : public webrtc::VoERTCPObserver {
public:
void OnApplicationDataReceived(const int channel,
const unsigned char sub_type,
const unsigned int name,
void OnApplicationDataReceived(int channel,
unsigned char sub_type,
unsigned int name,
const unsigned char* data,
const unsigned short length_in_bytes);
unsigned short length_in_bytes);
void Reset();
~RtcpAppHandler() {}
unsigned short length_in_bytes_;
@ -125,9 +125,9 @@ class RtpRtcpTest : public AfterStreamingFixture {
};
void RtcpAppHandler::OnApplicationDataReceived(
const int /*channel*/, const unsigned char sub_type,
const unsigned int name, const unsigned char* data,
const unsigned short length_in_bytes) {
const int /*channel*/, unsigned char sub_type,
unsigned int name, const unsigned char* data,
unsigned short length_in_bytes) {
length_in_bytes_ = length_in_bytes;
memcpy(data_, &data[0], length_in_bytes);
sub_type_ = sub_type;

View File

@ -169,7 +169,7 @@ void XRTPObserver::OnIncomingCSRCChanged(const int /*channel*/, const unsigned i
const bool /*added*/) {
}
void XRTPObserver::OnIncomingSSRCChanged(const int /*channel*/, const unsigned int SSRC) {
void XRTPObserver::OnIncomingSSRCChanged(const int /*channel*/, unsigned int SSRC) {
// char msg[128];
// sprintf(msg, "OnIncomingSSRCChanged(channel=%d, SSRC=%lu)\n",
// channel, SSRC);
@ -199,7 +199,7 @@ int VoEExtendedTest::TestPassed(const char* str) const {
return 0;
}
void VoEExtendedTest::OnPeriodicDeadOrAlive(const int /*channel*/, const bool alive) {
void VoEExtendedTest::OnPeriodicDeadOrAlive(const int /*channel*/, bool alive) {
_alive = alive;
if (alive) {
TEST_LOG("=> ALIVE ");
@ -209,7 +209,7 @@ void VoEExtendedTest::OnPeriodicDeadOrAlive(const int /*channel*/, const bool al
fflush(NULL);
}
void VoEExtendedTest::CallbackOnError(const int errCode, int) {
void VoEExtendedTest::CallbackOnError(int errCode, int) {
_errCode = errCode;
TEST_LOG("\n************************\n");
TEST_LOG(" RUNTIME ERROR: %d \n", errCode);

View File

@ -55,7 +55,7 @@ class AudioDeviceModuleImpl : public AudioDeviceModule {
uint32_t& position) const {
return 0;
}
virtual int32_t ChangeUniqueId(const int32_t id) {
virtual int32_t ChangeUniqueId(int32_t id) {
return 0;
}
virtual int32_t TimeUntilNextProcess() {
@ -284,14 +284,14 @@ class AudioDeviceModuleImpl : public AudioDeviceModule {
virtual int32_t StereoRecording(bool* enabled) const {
return -1;
}
virtual int32_t SetRecordingChannel(const ChannelType channel) {
virtual int32_t SetRecordingChannel(ChannelType channel) {
return -1;
}
virtual int32_t RecordingChannel(ChannelType* channel) const {
return -1;
}
virtual int32_t SetPlayoutBuffer(const BufferType type, uint16_t sizeMS = 0) {
virtual int32_t SetPlayoutBuffer(BufferType type, uint16_t sizeMS = 0) {
return -1;
}
virtual int32_t PlayoutBuffer(BufferType* type, uint16_t* sizeMS) const {
@ -323,13 +323,13 @@ class AudioDeviceModuleImpl : public AudioDeviceModule {
return -1;
}
virtual int32_t SetRecordingSampleRate(const uint32_t samplesPerSec) {
virtual int32_t SetRecordingSampleRate(uint32_t samplesPerSec) {
return -1;
}
virtual int32_t RecordingSampleRate(uint32_t* samplesPerSec) const {
return -1;
}
virtual int32_t SetPlayoutSampleRate(const uint32_t samplesPerSec) {
virtual int32_t SetPlayoutSampleRate(uint32_t samplesPerSec) {
return -1;
}
virtual int32_t PlayoutSampleRate(uint32_t* samplesPerSec) const {
@ -398,11 +398,11 @@ class XRTPObserver : public VoERTPObserver {
public:
XRTPObserver();
~XRTPObserver();
virtual void OnIncomingCSRCChanged(const int channel,
const unsigned int CSRC,
const bool added);
virtual void OnIncomingSSRCChanged(const int channel,
const unsigned int SSRC);
virtual void OnIncomingCSRCChanged(int channel,
unsigned int CSRC,
bool added);
virtual void OnIncomingSSRCChanged(int channel,
unsigned int SSRC);
public:
unsigned int _SSRC;
};
@ -442,12 +442,12 @@ class VoEExtendedTest : public VoiceEngineObserver,
protected:
// from VoiceEngineObserver
void CallbackOnError(const int errCode, const int channel);
void CallbackOnTrace(const TraceLevel level, const char* message,
const int length);
void CallbackOnError(int errCode, int channel);
void CallbackOnTrace(TraceLevel level, const char* message,
int length);
// from VoEConnectionObserver
void OnPeriodicDeadOrAlive(const int channel, const bool alive);
void OnPeriodicDeadOrAlive(int channel, bool alive);
private:
void Play(int channel, unsigned int timeMillisec,

View File

@ -65,10 +65,10 @@ void RunTest(std::string out_path);
class MyObserver : public VoiceEngineObserver {
public:
virtual void CallbackOnError(const int channel, const int err_code);
virtual void CallbackOnError(int channel, int err_code);
};
void MyObserver::CallbackOnError(const int channel, const int err_code) {
void MyObserver::CallbackOnError(int channel, int err_code) {
// Add printf for other error codes here
if (err_code == VE_TYPING_NOISE_WARNING) {
printf(" TYPING NOISE DETECTED \n");

View File

@ -61,14 +61,14 @@ class ConnectionObserver : public VoEConnectionObserver
{
public:
ConnectionObserver();
virtual void OnPeriodicDeadOrAlive(const int channel, const bool alive);
virtual void OnPeriodicDeadOrAlive(int channel, bool alive);
};
ConnectionObserver::ConnectionObserver()
{
}
void ConnectionObserver::OnPeriodicDeadOrAlive(const int channel, const bool alive)
void ConnectionObserver::OnPeriodicDeadOrAlive(int channel, bool alive)
{
CString str;
str.Format(_T("OnPeriodicDeadOrAlive(channel=%d) => alive=%d"), channel, alive);
@ -79,7 +79,7 @@ void ConnectionObserver::OnPeriodicDeadOrAlive(const int channel, const bool ali
// VoiceEngineObserver
// ----------------------------------------------------------------------------
void CWinTestDlg::CallbackOnError(const int channel, const int errCode)
void CWinTestDlg::CallbackOnError(int channel, int errCode)
{
_nErrorCallbacks++;
@ -129,14 +129,14 @@ void CWinTestDlg::CallbackOnError(const int channel, const int errCode)
// VoERTPObserver
// ----------------------------------------------------------------------------
void CWinTestDlg::OnIncomingCSRCChanged(const int channel, const unsigned int CSRC, const bool added)
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(const int channel, const unsigned int SSRC)
void CWinTestDlg::OnIncomingSSRCChanged(int channel, unsigned int SSRC)
{
CString str;
str.Format(_T("OnIncomingSSRCChanged(channel=%d) => SSRC=%u"), channel, SSRC);
@ -184,24 +184,24 @@ class MediaProcessImpl : public VoEMediaProcess
{
public:
MediaProcessImpl();
virtual void Process(const int channel,
const ProcessingTypes type,
virtual void Process(int channel,
ProcessingTypes type,
int16_t audio_10ms[],
const int length,
const int samplingFreqHz,
const bool stereo);
int length,
int samplingFreqHz,
bool stereo);
};
MediaProcessImpl::MediaProcessImpl()
{
}
void MediaProcessImpl::Process(const int channel,
const ProcessingTypes type,
void MediaProcessImpl::Process(int channel,
ProcessingTypes type,
int16_t audio_10ms[],
const int length,
const int samplingFreqHz,
const bool stereo)
int length,
int samplingFreqHz,
bool stereo)
{
int x = rand() % 100;

View File

@ -125,13 +125,13 @@ protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
protected: // VoiceEngineObserver
virtual void CallbackOnError(const int channel, const int errCode);
virtual void CallbackOnError(int channel, int errCode);
protected: // VoERTPObserver
virtual void OnIncomingCSRCChanged(
const int channel, const unsigned int CSRC, const bool added);
int channel, unsigned int CSRC, bool added);
virtual void OnIncomingSSRCChanged(
const int channel, const unsigned int SSRC);
int channel, unsigned int SSRC);
// Implementation
protected:

View File

@ -81,8 +81,8 @@ TransmitMixer::OnPeriodicProcess()
}
void TransmitMixer::PlayNotification(const int32_t id,
const uint32_t durationMs)
void TransmitMixer::PlayNotification(int32_t id,
uint32_t durationMs)
{
WEBRTC_TRACE(kTraceStream, kTraceVoice, VoEId(_instanceId, -1),
"TransmitMixer::PlayNotification(id=%d, durationMs=%d)",
@ -91,8 +91,8 @@ void TransmitMixer::PlayNotification(const int32_t id,
// Not implement yet
}
void TransmitMixer::RecordNotification(const int32_t id,
const uint32_t durationMs)
void TransmitMixer::RecordNotification(int32_t id,
uint32_t durationMs)
{
WEBRTC_TRACE(kTraceStream, kTraceVoice, VoEId(_instanceId,-1),
"TransmitMixer::RecordNotification(id=%d, durationMs=%d)",
@ -101,7 +101,7 @@ void TransmitMixer::RecordNotification(const int32_t id,
// Not implement yet
}
void TransmitMixer::PlayFileEnded(const int32_t id)
void TransmitMixer::PlayFileEnded(int32_t id)
{
WEBRTC_TRACE(kTraceStream, kTraceVoice, VoEId(_instanceId, -1),
"TransmitMixer::PlayFileEnded(id=%d)", id);
@ -117,7 +117,7 @@ void TransmitMixer::PlayFileEnded(const int32_t id)
}
void
TransmitMixer::RecordFileEnded(const int32_t id)
TransmitMixer::RecordFileEnded(int32_t id)
{
WEBRTC_TRACE(kTraceStream, kTraceVoice, VoEId(_instanceId, -1),
"TransmitMixer::RecordFileEnded(id=%d)", id);
@ -140,7 +140,7 @@ TransmitMixer::RecordFileEnded(const int32_t id)
}
int32_t
TransmitMixer::Create(TransmitMixer*& mixer, const uint32_t instanceId)
TransmitMixer::Create(TransmitMixer*& mixer, uint32_t instanceId)
{
WEBRTC_TRACE(kTraceMemory, kTraceVoice, VoEId(instanceId, -1),
"TransmitMixer::Create(instanceId=%d)", instanceId);
@ -165,7 +165,7 @@ TransmitMixer::Destroy(TransmitMixer*& mixer)
}
}
TransmitMixer::TransmitMixer(const uint32_t instanceId) :
TransmitMixer::TransmitMixer(uint32_t instanceId) :
_engineStatisticsPtr(NULL),
_channelManagerPtr(NULL),
audioproc_(NULL),
@ -327,13 +327,13 @@ void TransmitMixer::GetSendCodecInfo(int* max_sample_rate, int* max_channels) {
int32_t
TransmitMixer::PrepareDemux(const void* audioSamples,
const uint32_t nSamples,
const uint8_t nChannels,
const uint32_t samplesPerSec,
const uint16_t totalDelayMS,
const int32_t clockDrift,
const uint16_t currentMicLevel,
const bool keyPressed)
uint32_t nSamples,
uint8_t nChannels,
uint32_t samplesPerSec,
uint16_t totalDelayMS,
int32_t clockDrift,
uint16_t currentMicLevel,
bool keyPressed)
{
WEBRTC_TRACE(kTraceStream, kTraceVoice, VoEId(_instanceId, -1),
"TransmitMixer::PrepareDemux(nSamples=%u, nChannels=%u,"
@ -470,7 +470,7 @@ uint32_t TransmitMixer::CaptureLevel() const
}
void
TransmitMixer::UpdateMuteMicrophoneTime(const uint32_t lengthMs)
TransmitMixer::UpdateMuteMicrophoneTime(uint32_t lengthMs)
{
WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId, -1),
"TransmitMixer::UpdateMuteMicrophoneTime(lengthMs=%d)",
@ -488,11 +488,11 @@ TransmitMixer::StopSend()
}
int TransmitMixer::StartPlayingFileAsMicrophone(const char* fileName,
const bool loop,
const FileFormats format,
const int startPosition,
const float volumeScaling,
const int stopPosition,
bool loop,
FileFormats format,
int startPosition,
float volumeScaling,
int stopPosition,
const CodecInst* codecInst)
{
WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId, -1),
@ -559,10 +559,10 @@ int TransmitMixer::StartPlayingFileAsMicrophone(const char* fileName,
}
int TransmitMixer::StartPlayingFileAsMicrophone(InStream* stream,
const FileFormats format,
const int startPosition,
const float volumeScaling,
const int stopPosition,
FileFormats format,
int startPosition,
float volumeScaling,
int stopPosition,
const CodecInst* codecInst)
{
WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId,-1),
@ -671,7 +671,7 @@ int TransmitMixer::IsPlayingFileAsMicrophone() const
return _filePlaying;
}
int TransmitMixer::ScaleFileAsMicrophonePlayout(const float scale)
int TransmitMixer::ScaleFileAsMicrophonePlayout(float scale)
{
WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId, -1),
"TransmitMixer::ScaleFileAsMicrophonePlayout(scale=%5.3f)",
@ -1208,7 +1208,7 @@ int TransmitMixer::GenerateAudioFrame(const int16_t audio[],
}
int32_t TransmitMixer::RecordAudioToFile(
const uint32_t mixingFrequency)
uint32_t mixingFrequency)
{
CriticalSectionScoped cs(&_critSect);
if (_fileRecorderPtr == NULL)
@ -1231,7 +1231,7 @@ int32_t TransmitMixer::RecordAudioToFile(
}
int32_t TransmitMixer::MixOrReplaceAudioWithFile(
const int mixingFrequency)
int mixingFrequency)
{
scoped_array<int16_t> fileBuffer(new int16_t[640]);
@ -1328,7 +1328,7 @@ void TransmitMixer::ProcessAudio(int delay_ms, int clock_drift,
}
#ifdef WEBRTC_VOICE_ENGINE_TYPING_DETECTION
int TransmitMixer::TypingDetection(const bool keyPressed)
int TransmitMixer::TypingDetection(bool keyPressed)
{
// We let the VAD determine if we're using this feature or not.

View File

@ -39,7 +39,7 @@ class TransmitMixer : public MonitorObserver,
{
public:
static int32_t Create(TransmitMixer*& mixer, const uint32_t instanceId);
static int32_t Create(TransmitMixer*& mixer, uint32_t instanceId);
static void Destroy(TransmitMixer*& mixer);
@ -51,13 +51,13 @@ public:
AudioProcessing* audioProcessingModule);
int32_t PrepareDemux(const void* audioSamples,
const uint32_t nSamples,
const uint8_t nChannels,
const uint32_t samplesPerSec,
const uint16_t totalDelayMS,
const int32_t clockDrift,
const uint16_t currentMicLevel,
const bool keyPressed);
uint32_t nSamples,
uint8_t nChannels,
uint32_t samplesPerSec,
uint16_t totalDelayMS,
int32_t clockDrift,
uint16_t currentMicLevel,
bool keyPressed);
int32_t DemuxAndMix();
@ -69,7 +69,7 @@ public:
int32_t StopSend();
// VoEDtmf
void UpdateMuteMicrophoneTime(const uint32_t lengthMs);
void UpdateMuteMicrophoneTime(uint32_t lengthMs);
// VoEExternalMedia
int RegisterExternalMediaProcessing(VoEMediaProcess* object,
@ -79,7 +79,7 @@ public:
int GetMixingFrequency();
// VoEVolumeControl
int SetMute(const bool enable);
int SetMute(bool enable);
bool Mute() const;
@ -92,25 +92,25 @@ public:
bool IsRecordingMic();
int StartPlayingFileAsMicrophone(const char* fileName,
const bool loop,
const FileFormats format,
const int startPosition,
const float volumeScaling,
const int stopPosition,
bool loop,
FileFormats format,
int startPosition,
float volumeScaling,
int stopPosition,
const CodecInst* codecInst);
int StartPlayingFileAsMicrophone(InStream* stream,
const FileFormats format,
const int startPosition,
const float volumeScaling,
const int stopPosition,
FileFormats format,
int startPosition,
float volumeScaling,
int stopPosition,
const CodecInst* codecInst);
int StopPlayingFileAsMicrophone();
int IsPlayingFileAsMicrophone() const;
int ScaleFileAsMicrophonePlayout(const float scale);
int ScaleFileAsMicrophonePlayout(float scale);
int StartRecordingMicrophone(const char* fileName,
const CodecInst* codecInst);
@ -137,15 +137,15 @@ public:
// FileCallback
void PlayNotification(const int32_t id,
const uint32_t durationMs);
void PlayNotification(int32_t id,
uint32_t durationMs);
void RecordNotification(const int32_t id,
const uint32_t durationMs);
void RecordNotification(int32_t id,
uint32_t durationMs);
void PlayFileEnded(const int32_t id);
void PlayFileEnded(int32_t id);
void RecordFileEnded(const int32_t id);
void RecordFileEnded(int32_t id);
#ifdef WEBRTC_VOICE_ENGINE_TYPING_DETECTION
// Typing detection
@ -161,7 +161,7 @@ public:
bool IsStereoChannelSwappingEnabled();
private:
TransmitMixer(const uint32_t instanceId);
TransmitMixer(uint32_t instanceId);
// Gets the maximum sample rate and number of channels over all currently
// sending codecs.
@ -171,15 +171,15 @@ private:
int nSamples,
int nChannels,
int samplesPerSec);
int32_t RecordAudioToFile(const uint32_t mixingFrequency);
int32_t RecordAudioToFile(uint32_t mixingFrequency);
int32_t MixOrReplaceAudioWithFile(
const int mixingFrequency);
int mixingFrequency);
void ProcessAudio(int delay_ms, int clock_drift, int current_mic_level);
#ifdef WEBRTC_VOICE_ENGINE_TYPING_DETECTION
int TypingDetection(const bool keyPressed);
int TypingDetection(bool keyPressed);
#endif
// uses

View File

@ -19,9 +19,9 @@ namespace {
class MediaCallback : public VoEMediaProcess {
public:
virtual void Process(const int channel, const ProcessingTypes type,
int16_t audio[], const int samples_per_channel,
const int sample_rate_hz, const bool is_stereo) {
virtual void Process(int channel, ProcessingTypes type,
int16_t audio[], int samples_per_channel,
int sample_rate_hz, bool is_stereo) {
}
};

View File

@ -263,7 +263,7 @@ int VoEAudioProcessingImpl::GetAgcStatus(bool& enabled, AgcModes& mode) {
#endif
}
int VoEAudioProcessingImpl::SetAgcConfig(const AgcConfig config) {
int VoEAudioProcessingImpl::SetAgcConfig(AgcConfig config) {
WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1),
"SetAgcConfig()");
#ifdef WEBRTC_VOICE_ENGINE_AGC
@ -437,7 +437,7 @@ int VoEAudioProcessingImpl::GetRxAgcStatus(int channel,
}
int VoEAudioProcessingImpl::SetRxAgcConfig(int channel,
const AgcConfig config) {
AgcConfig config) {
WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1),
"SetRxAgcConfig(channel=%d)", channel);
#ifdef WEBRTC_VOICE_ENGINE_AGC

View File

@ -27,7 +27,7 @@ class VoEAudioProcessingImpl : public VoEAudioProcessing {
virtual int GetAgcStatus(bool& enabled, AgcModes& mode);
virtual int SetAgcConfig(const AgcConfig config);
virtual int SetAgcConfig(AgcConfig config);
virtual int GetAgcConfig(AgcConfig& config);
@ -43,7 +43,7 @@ class VoEAudioProcessingImpl : public VoEAudioProcessing {
virtual int GetRxAgcStatus(int channel, bool& enabled, AgcModes& mode);
virtual int SetRxAgcConfig(int channel, const AgcConfig config);
virtual int SetRxAgcConfig(int channel, AgcConfig config);
virtual int GetRxAgcConfig(int channel, AgcConfig& config);

View File

@ -65,7 +65,7 @@ VoEBaseImpl::~VoEBaseImpl()
delete &_callbackCritSect;
}
void VoEBaseImpl::OnErrorIsReported(const ErrorCode error)
void VoEBaseImpl::OnErrorIsReported(ErrorCode error)
{
CriticalSectionScoped cs(&_callbackCritSect);
if (_voiceEngineObserver)
@ -94,7 +94,7 @@ void VoEBaseImpl::OnErrorIsReported(const ErrorCode error)
}
}
void VoEBaseImpl::OnWarningIsReported(const WarningCode warning)
void VoEBaseImpl::OnWarningIsReported(WarningCode warning)
{
CriticalSectionScoped cs(&_callbackCritSect);
if (_voiceEngineObserver)
@ -126,14 +126,14 @@ void VoEBaseImpl::OnWarningIsReported(const WarningCode warning)
int32_t VoEBaseImpl::RecordedDataIsAvailable(
const void* audioSamples,
const uint32_t nSamples,
const uint8_t nBytesPerSample,
const uint8_t nChannels,
const uint32_t samplesPerSec,
const uint32_t totalDelayMS,
const int32_t clockDrift,
const uint32_t currentMicLevel,
const bool keyPressed,
uint32_t nSamples,
uint8_t nBytesPerSample,
uint8_t nChannels,
uint32_t samplesPerSec,
uint32_t totalDelayMS,
int32_t clockDrift,
uint32_t currentMicLevel,
bool keyPressed,
uint32_t& newMicLevel)
{
WEBRTC_TRACE(kTraceStream, kTraceVoice, VoEId(_shared->instance_id(), -1),
@ -232,10 +232,10 @@ int32_t VoEBaseImpl::RecordedDataIsAvailable(
}
int32_t VoEBaseImpl::NeedMorePlayData(
const uint32_t nSamples,
const uint8_t nBytesPerSample,
const uint8_t nChannels,
const uint32_t samplesPerSec,
uint32_t nSamples,
uint8_t nBytesPerSample,
uint8_t nChannels,
uint32_t samplesPerSec,
void* audioSamples,
uint32_t& nSamplesOut)
{

View File

@ -73,26 +73,26 @@ public:
// AudioTransport
virtual int32_t
RecordedDataIsAvailable(const void* audioSamples,
const uint32_t nSamples,
const uint8_t nBytesPerSample,
const uint8_t nChannels,
const uint32_t samplesPerSec,
const uint32_t totalDelayMS,
const int32_t clockDrift,
const uint32_t currentMicLevel,
const bool keyPressed,
uint32_t nSamples,
uint8_t nBytesPerSample,
uint8_t nChannels,
uint32_t samplesPerSec,
uint32_t totalDelayMS,
int32_t clockDrift,
uint32_t currentMicLevel,
bool keyPressed,
uint32_t& newMicLevel);
virtual int32_t NeedMorePlayData(const uint32_t nSamples,
const uint8_t nBytesPerSample,
const uint8_t nChannels,
const uint32_t samplesPerSec,
virtual int32_t NeedMorePlayData(uint32_t nSamples,
uint8_t nBytesPerSample,
uint8_t nChannels,
uint32_t samplesPerSec,
void* audioSamples,
uint32_t& nSamplesOut);
// AudioDeviceObserver
virtual void OnErrorIsReported(const ErrorCode error);
virtual void OnWarningIsReported(const WarningCode warning);
virtual void OnErrorIsReported(ErrorCode error);
virtual void OnWarningIsReported(WarningCode warning);
protected:
VoEBaseImpl(voe::SharedData* shared);

View File

@ -403,7 +403,7 @@ int VoERTP_RTCPImpl::GetRemoteRTCPData(
int VoERTP_RTCPImpl::SendApplicationDefinedRTCPPacket(
int channel,
const unsigned char subType,
unsigned char subType,
unsigned int name,
const char* data,
unsigned short dataLengthInBytes)

View File

@ -50,7 +50,7 @@ public:
virtual int SendApplicationDefinedRTCPPacket(
int channel,
const unsigned char subType,
unsigned char subType,
unsigned int name,
const char* data,
unsigned short dataLengthInBytes);

View File

@ -197,7 +197,7 @@ enum { kVoiceEngineMaxRtpExtensionId = 14 };
namespace webrtc
{
inline int VoEId(const int veId, const int chId)
inline int VoEId(int veId, int chId)
{
if (chId == -1)
{
@ -207,13 +207,13 @@ inline int VoEId(const int veId, const int chId)
return (int) ((veId << 16) + chId);
}
inline int VoEModuleId(const int veId, const int chId)
inline int VoEModuleId(int veId, int chId)
{
return (int) ((veId << 16) + chId);
}
// Convert module ID to internal VoE channel ID
inline int VoEChannelId(const int moduleId)
inline int VoEChannelId(int moduleId)
{
return (int) (moduleId & 0xffff);
}

View File

@ -80,7 +80,7 @@ VoiceEngine* VoiceEngine::Create()
return GetVoiceEngine();
}
int VoiceEngine::SetTraceFilter(const unsigned int filter)
int VoiceEngine::SetTraceFilter(unsigned int filter)
{
WEBRTC_TRACE(kTraceApiCall, kTraceVoice,
VoEId(gVoiceEngineInstanceCounter, -1),
@ -104,7 +104,7 @@ int VoiceEngine::SetTraceFilter(const unsigned int filter)
}
int VoiceEngine::SetTraceFile(const char* fileNameUTF8,
const bool addFileCounter)
bool addFileCounter)
{
int ret = Trace::SetTraceFile(fileNameUTF8, addFileCounter);
WEBRTC_TRACE(kTraceApiCall, kTraceVoice,