diff --git a/src/modules/audio_coding/codecs/cng/include/webrtc_cng.h b/src/modules/audio_coding/codecs/cng/include/webrtc_cng.h index d6e815788..d405e3a43 100644 --- a/src/modules/audio_coding/codecs/cng/include/webrtc_cng.h +++ b/src/modules/audio_coding/codecs/cng/include/webrtc_cng.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. + * 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 @@ -51,7 +51,7 @@ typedef struct WebRtcCngDecInst CNG_dec_inst; * -1 - Error */ -WebRtc_Word16 WebRtcCng_Version(WebRtc_Word8 *version); +WebRtc_Word16 WebRtcCng_Version(char *version); /**************************************************************************** * WebRtcCng_AssignSizeEnc/Dec(...) diff --git a/src/modules/audio_coding/codecs/cng/webrtc_cng.c b/src/modules/audio_coding/codecs/cng/webrtc_cng.c index 6798062e1..65f667220 100644 --- a/src/modules/audio_coding/codecs/cng/webrtc_cng.c +++ b/src/modules/audio_coding/codecs/cng/webrtc_cng.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. + * 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 @@ -19,7 +19,7 @@ typedef struct WebRtcCngDecInst_t_ { - + WebRtc_UWord32 dec_seed; WebRtc_Word32 dec_target_energy; WebRtc_Word32 dec_used_energy; @@ -90,9 +90,9 @@ const WebRtc_Word16 WebRtcCng_kCorrWindow[WEBRTC_CNG_MAX_LPC_ORDER] = { * * Return value : 0 - Ok * -1 - Error - */ + */ -WebRtc_Word16 WebRtcCng_Version(WebRtc_Word8 *version) +WebRtc_Word16 WebRtcCng_Version(char *version) { strcpy((char*)version,(const char*)"1.2.0\n"); return(0); @@ -201,7 +201,7 @@ WebRtc_Word16 WebRtcCng_CreateDec(CNG_dec_inst **cng_inst) } else { /* The memory could not be allocated */ - return(-1); + return(-1); } } @@ -234,7 +234,7 @@ WebRtc_Word16 WebRtcCng_InitEnc(CNG_enc_inst *cng_inst, int i; WebRtcCngEncInst_t* inst=(WebRtcCngEncInst_t*)cng_inst; - + memset(inst, 0, sizeof(WebRtcCngEncInst_t)); /* Check LPC order */ @@ -248,7 +248,7 @@ WebRtc_Word16 WebRtcCng_InitEnc(CNG_enc_inst *cng_inst, inst->errorcode = CNG_DISALLOWED_SAMPLING_FREQUENCY; return (-1); } - + inst->enc_sampfreq=fs; inst->enc_interval=interval; inst->enc_nrOfCoefs=quality; @@ -287,7 +287,7 @@ WebRtc_Word16 WebRtcCng_InitDec(CNG_dec_inst *cng_inst) return(0); } - + /**************************************************************************** * WebRtcCng_FreeEnc/Dec(...) * diff --git a/src/modules/audio_coding/codecs/ilbc/ilbc.c b/src/modules/audio_coding/codecs/ilbc/ilbc.c index 361e9c2e6..75b64c42c 100644 --- a/src/modules/audio_coding/codecs/ilbc/ilbc.c +++ b/src/modules/audio_coding/codecs/ilbc/ilbc.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. + * 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 @@ -249,7 +249,7 @@ WebRtc_Word16 WebRtcIlbcfix_NetEqPlc(iLBC_decinst_t *iLBCdec_inst, WebRtc_Word16 return (0); } -void WebRtcIlbcfix_version(WebRtc_Word8 *version) +void WebRtcIlbcfix_version(char *version) { strcpy((char*)version, "1.1.1"); } diff --git a/src/modules/audio_coding/codecs/ilbc/interface/ilbc.h b/src/modules/audio_coding/codecs/ilbc/interface/ilbc.h index 919f722a2..ca1d39eca 100644 --- a/src/modules/audio_coding/codecs/ilbc/interface/ilbc.h +++ b/src/modules/audio_coding/codecs/ilbc/interface/ilbc.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. + * 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 @@ -250,11 +250,10 @@ extern "C" { * - version : Version number of iLBC (maximum 20 char) */ - void WebRtcIlbcfix_version(WebRtc_Word8 *version); + void WebRtcIlbcfix_version(char *version); #ifdef __cplusplus } #endif #endif - diff --git a/src/modules/audio_coding/main/interface/audio_coding_module.h b/src/modules/audio_coding/main/interface/audio_coding_module.h index 9acc8160e..ed13689a7 100644 --- a/src/modules/audio_coding/main/interface/audio_coding_module.h +++ b/src/modules/audio_coding/main/interface/audio_coding_module.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. + * 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 @@ -124,7 +124,7 @@ class AudioCodingModule: public Module { // -1 if the list number (listId) is invalid. // 0 if succeeded. // - static WebRtc_Word32 Codec(const WebRtc_Word8* payloadName, CodecInst& codec, + static WebRtc_Word32 Codec(const char* payloadName, CodecInst& codec, const WebRtc_Word32 samplingFreqHz = -1); /////////////////////////////////////////////////////////////////////////// @@ -142,7 +142,7 @@ class AudioCodingModule: public Module { // if the codec is found, the index of the codec in the list, // -1 if the codec is not found. // - static WebRtc_Word32 Codec(const WebRtc_Word8* payloadName, + static WebRtc_Word32 Codec(const char* payloadName, const WebRtc_Word32 samplingFreqHz = -1); /////////////////////////////////////////////////////////////////////////// diff --git a/src/modules/audio_coding/main/source/acm_celt.cc b/src/modules/audio_coding/main/source/acm_celt.cc index 31af88d15..1b5477ba2 100644 --- a/src/modules/audio_coding/main/source/acm_celt.cc +++ b/src/modules/audio_coding/main/source/acm_celt.cc @@ -49,7 +49,7 @@ int16_t ACMCELT::DecodeSafe(uint8_t* /* bitStream */, int16_t /* bitStreamLenByte */, int16_t* /* audio */, int16_t* /* audioSamples */, - char* /* speechType */) { + int8_t* /* speechType */) { return -1; } @@ -157,7 +157,7 @@ int16_t ACMCELT::DecodeSafe(uint8_t* /* bitStream */, int16_t /* bitStreamLenByte */, int16_t* /* audio */, int16_t* /* audioSamples */, - char* /* speechType */) { + int8_t* /* speechType */) { return 0; } diff --git a/src/modules/audio_coding/main/source/acm_celt.h b/src/modules/audio_coding/main/source/acm_celt.h index 3f2e41d6b..820524496 100644 --- a/src/modules/audio_coding/main/source/acm_celt.h +++ b/src/modules/audio_coding/main/source/acm_celt.h @@ -35,11 +35,11 @@ class ACMCELT : public ACMGenericCodec { protected: WebRtc_Word16 DecodeSafe( - WebRtc_UWord8* bitStream, - WebRtc_Word16 bitStreamLenByte, - WebRtc_Word16* audio, - WebRtc_Word16* audioSamples, - WebRtc_Word8* speechType); + uint8_t* /* bitStream */, + int16_t /* bitStreamLenByte */, + int16_t* /* audio */, + int16_t* /* audioSamples */, + int8_t* /* speechType */); int32_t CodecDef(WebRtcNetEQ_CodecDef& codecDef, const CodecInst& codecInst); diff --git a/src/modules/audio_coding/main/source/acm_neteq.cc b/src/modules/audio_coding/main/source/acm_neteq.cc index 56cf24877..be25918ae 100644 --- a/src/modules/audio_coding/main/source/acm_neteq.cc +++ b/src/modules/audio_coding/main/source/acm_neteq.cc @@ -986,7 +986,7 @@ ACMNetEQ::FlushBuffers() WebRtc_Word32 ACMNetEQ::GetVersion( - WebRtc_Word8* version, + char* version, WebRtc_UWord32& remainingBufferInBytes, WebRtc_UWord32& position) { @@ -996,7 +996,7 @@ ACMNetEQ::GetVersion( remainingBufferInBytes -= (position - len); len = position; - WebRtc_Word8 myVersion[100]; + char myVersion[100]; if(WebRtcNetEQ_GetVersion(myVersion) < 0) { return -1; @@ -1111,11 +1111,11 @@ ACMNetEQ::SetUniqueId( void ACMNetEQ::LogError( - const WebRtc_Word8* neteqFuncName, + const char* neteqFuncName, const WebRtc_Word16 idx) const { - WebRtc_Word8 errorName[NETEQ_ERR_MSG_LEN_BYTE]; - WebRtc_Word8 myFuncName[50]; + char errorName[NETEQ_ERR_MSG_LEN_BYTE]; + char myFuncName[50]; int neteqErrorCode = WebRtcNetEQ_GetErrorCode(_inst[idx]); WebRtcNetEQ_GetErrorName(neteqErrorCode, errorName, NETEQ_ERR_MSG_LEN_BYTE - 1); strncpy(myFuncName, neteqFuncName, 49); diff --git a/src/modules/audio_coding/main/source/acm_neteq.h b/src/modules/audio_coding/main/source/acm_neteq.h index 9f529f56c..677c6222a 100644 --- a/src/modules/audio_coding/main/source/acm_neteq.h +++ b/src/modules/audio_coding/main/source/acm_neteq.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. + * 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 @@ -56,7 +56,7 @@ public: // -1 if NetEQ returned an error. // static WebRtc_Word32 GetVersion( - WebRtc_Word8* version, + char* version, WebRtc_UWord32& remainingBuffInBytes, WebRtc_UWord32& position); @@ -330,7 +330,7 @@ private: const WebRtcRTPHeader& rtpInfo); void LogError( - const WebRtc_Word8* neteqFuncName, + const char* neteqFuncName, const WebRtc_Word16 idx) const; WebRtc_Word16 InitByIdxSafe( diff --git a/src/modules/audio_coding/main/source/audio_coding_module.cc b/src/modules/audio_coding/main/source/audio_coding_module.cc index 00dca2544..2cd959d29 100644 --- a/src/modules/audio_coding/main/source/audio_coding_module.cc +++ b/src/modules/audio_coding/main/source/audio_coding_module.cc @@ -52,7 +52,7 @@ AudioCodingModule::Codec( // Get supported codec Param with name WebRtc_Word32 AudioCodingModule::Codec( - const WebRtc_Word8* payloadName, + const char* payloadName, CodecInst& codec, const WebRtc_Word32 samplingFreqHz) { @@ -86,7 +86,7 @@ AudioCodingModule::Codec( // Get supported codec Index with name, and frequency if needed WebRtc_Word32 AudioCodingModule::Codec( - const WebRtc_Word8* payloadName, + const char* payloadName, const WebRtc_Word32 samplingFreqHz) { CodecInst codec; diff --git a/src/modules/audio_coding/main/source/audio_coding_module_impl.cc b/src/modules/audio_coding/main/source/audio_coding_module_impl.cc index 57647f012..18b6f4fb1 100644 --- a/src/modules/audio_coding/main/source/audio_coding_module_impl.cc +++ b/src/modules/audio_coding/main/source/audio_coding_module_impl.cc @@ -2314,7 +2314,7 @@ AudioCodingModuleImpl::DecoderParamByPlType( WebRtc_Word16 AudioCodingModuleImpl::DecoderListIDByPlName( - const WebRtc_Word8* payloadName, + const char* payloadName, const WebRtc_UWord16 sampFreqHz) const { WebRtcACMCodecParams codecParams; @@ -2485,7 +2485,7 @@ AudioCodingModuleImpl::PlayoutTimestamp( bool AudioCodingModuleImpl::HaveValidEncoder( - const WebRtc_Word8* callerName) const + const char* callerName) const { if((!_sendCodecRegistered) || (_currentSendCodecIdx < 0) || diff --git a/src/modules/audio_coding/main/source/audio_coding_module_impl.h b/src/modules/audio_coding/main/source/audio_coding_module_impl.h index 365472865..422b22e64 100644 --- a/src/modules/audio_coding/main/source/audio_coding_module_impl.h +++ b/src/modules/audio_coding/main/source/audio_coding_module_impl.h @@ -46,7 +46,7 @@ public: // get version information for ACM and all components WebRtc_Word32 Version( - WebRtc_Word8* version, + char* version, WebRtc_UWord32& remainingBufferInBytes, WebRtc_UWord32& position) const; @@ -292,12 +292,12 @@ protected: WebRtcACMCodecParams& codecParams) const; WebRtc_Word16 DecoderListIDByPlName( - const WebRtc_Word8* payloadName, + const char* payloadName, const WebRtc_UWord16 sampFreqHz = 0) const; WebRtc_Word32 InitializeReceiverSafe(); - bool HaveValidEncoder(const WebRtc_Word8* callerName) const; + bool HaveValidEncoder(const char* callerName) const; WebRtc_Word32 RegisterRecCodecMSSafe( const CodecInst& receiveCodec, diff --git a/src/modules/audio_coding/main/test/PCMFile.cc b/src/modules/audio_coding/main/test/PCMFile.cc index b5a03339e..520ddbebb 100644 --- a/src/modules/audio_coding/main/test/PCMFile.cc +++ b/src/modules/audio_coding/main/test/PCMFile.cc @@ -1,6 +1,5 @@ - /* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. + * 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 @@ -53,7 +52,7 @@ PCMFile::ChooseFile( char* fileName, WebRtc_Word16 maxLen) { - WebRtc_Word8 tmpName[MAX_FILE_NAME_LENGTH_BYTE]; + char tmpName[MAX_FILE_NAME_LENGTH_BYTE]; //strcpy(_fileName, "in.pcm"); //printf("\n\nPlease enter the input file: "); EXPECT_TRUE(fgets(tmpName, MAX_FILE_NAME_LENGTH_BYTE, stdin) != NULL); @@ -105,7 +104,7 @@ PCMFile::ChooseFile( WebRtc_Word16 maxLen, WebRtc_UWord16* frequencyHz) { - WebRtc_Word8 tmpName[MAX_FILE_NAME_LENGTH_BYTE]; + char tmpName[MAX_FILE_NAME_LENGTH_BYTE]; //strcpy(_fileName, "in.pcm"); //printf("\n\nPlease enter the input file: "); EXPECT_TRUE(fgets(tmpName, MAX_FILE_NAME_LENGTH_BYTE, stdin) != NULL); diff --git a/src/modules/audio_coding/main/test/SpatialAudio.cc b/src/modules/audio_coding/main/test/SpatialAudio.cc index 008cd7aaa..e19ca4427 100644 --- a/src/modules/audio_coding/main/test/SpatialAudio.cc +++ b/src/modules/audio_coding/main/test/SpatialAudio.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. + * 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 @@ -53,7 +53,7 @@ SpatialAudio::Setup() // Register the receiver ACM in channel _channel->RegisterReceiverACM(_acmReceiver); - WebRtc_Word8 audioFileName[MAX_FILE_NAME_LENGTH_BYTE]; + char audioFileName[MAX_FILE_NAME_LENGTH_BYTE]; WebRtc_UWord16 sampFreqHz = 32000; strncpy(audioFileName, "./test/data/audio_coding/testfile32kHz.pcm", diff --git a/src/modules/audio_coding/main/test/TwoWayCommunication.cc b/src/modules/audio_coding/main/test/TwoWayCommunication.cc index 4ac04c09a..c67733aa0 100644 --- a/src/modules/audio_coding/main/test/TwoWayCommunication.cc +++ b/src/modules/audio_coding/main/test/TwoWayCommunication.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. + * 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 @@ -99,7 +99,7 @@ WebRtc_Word16 TwoWayCommunication::ChooseFile(char* fileName, WebRtc_Word16 maxLen, WebRtc_UWord16* frequencyHz) { - WebRtc_Word8 tmpName[MAX_FILE_NAME_LENGTH_BYTE]; + char tmpName[MAX_FILE_NAME_LENGTH_BYTE]; //strcpy(_fileName, "in.pcm"); //printf("\n\nPlease enter the input file: "); EXPECT_TRUE(fgets(tmpName, MAX_FILE_NAME_LENGTH_BYTE, stdin) != NULL); diff --git a/src/modules/audio_coding/neteq/interface/webrtc_neteq.h b/src/modules/audio_coding/neteq/interface/webrtc_neteq.h index 4fef5531c..909131bd4 100644 --- a/src/modules/audio_coding/neteq/interface/webrtc_neteq.h +++ b/src/modules/audio_coding/neteq/interface/webrtc_neteq.h @@ -156,9 +156,9 @@ typedef struct /* Info functions */ #define WEBRTC_NETEQ_MAX_ERROR_NAME 40 -int WebRtcNetEQ_GetVersion(WebRtc_Word8 *version); +int WebRtcNetEQ_GetVersion(char *version); int WebRtcNetEQ_GetErrorCode(void *inst); -int WebRtcNetEQ_GetErrorName(int errorCode, WebRtc_Word8 *errorName, int maxStrLen); +int WebRtcNetEQ_GetErrorName(int errorCode, char *errorName, int maxStrLen); /* Instance memory assign functions */ @@ -213,4 +213,3 @@ int WebRtcNetEQ_VQmonGetRxStatistics(void *inst, WebRtc_UWord16 *avgDelayMs, #endif #endif - diff --git a/src/modules/audio_coding/neteq/webrtc_neteq.c b/src/modules/audio_coding/neteq/webrtc_neteq.c index c15e6c4a6..5e99fd8a2 100644 --- a/src/modules/audio_coding/neteq/webrtc_neteq.c +++ b/src/modules/audio_coding/neteq/webrtc_neteq.c @@ -35,8 +35,8 @@ return(-1); \ } } -int WebRtcNetEQ_strncpy(WebRtc_Word8 *strDest, int numberOfElements, - const WebRtc_Word8 *strSource, int count) +int WebRtcNetEQ_strncpy(char *strDest, int numberOfElements, + const char *strSource, int count) { /* check vector lengths */ if (count > numberOfElements) @@ -59,7 +59,7 @@ int WebRtcNetEQ_strncpy(WebRtc_Word8 *strDest, int numberOfElements, * Info functions */ -int WebRtcNetEQ_GetVersion(WebRtc_Word8 *version) +int WebRtcNetEQ_GetVersion(char *version) { char versionString[] = "3.3.0\0 "; char endChar[] = " "; @@ -79,7 +79,7 @@ int WebRtcNetEQ_GetErrorCode(void *inst) return (NetEqMainInst->ErrorCode); } -int WebRtcNetEQ_GetErrorName(int errorCode, WebRtc_Word8 *errorName, int maxStrLen) +int WebRtcNetEQ_GetErrorName(int errorCode, char *errorName, int maxStrLen) { if ((errorName == NULL) || (maxStrLen <= 0)) {