WebRtc_Word32 -> int32_t in common_audio/

BUG=314

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3803 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
pbos@webrtc.org
2013-04-09 16:40:28 +00:00
parent 7da3459b2a
commit b09130763b
34 changed files with 1104 additions and 1126 deletions

View File

@ -22,7 +22,7 @@
#include "signal_processing_library.h"
static const WebRtc_Word16 kRandNTable[] = {
static const int16_t kRandNTable[] = {
9178, -7260, 40, 10189, 4894, -3531, -13779, 14764,
-4008, -8884, -8990, 1008, 7368, 5184, 3251, -5817,
-9786, 5963, 1770, 8066, -7135, 10772, -2298, 1361,
@ -89,26 +89,26 @@ static const WebRtc_Word16 kRandNTable[] = {
2374, -5797, 11839, 8940, -11874, 18213, 2855, 10492
};
WebRtc_UWord32 WebRtcSpl_IncreaseSeed(WebRtc_UWord32 *seed)
uint32_t WebRtcSpl_IncreaseSeed(uint32_t *seed)
{
seed[0] = (seed[0] * ((WebRtc_Word32)69069) + 1) & (WEBRTC_SPL_MAX_SEED_USED - 1);
seed[0] = (seed[0] * ((int32_t)69069) + 1) & (WEBRTC_SPL_MAX_SEED_USED - 1);
return seed[0];
}
WebRtc_Word16 WebRtcSpl_RandU(WebRtc_UWord32 *seed)
int16_t WebRtcSpl_RandU(uint32_t *seed)
{
return (WebRtc_Word16)(WebRtcSpl_IncreaseSeed(seed) >> 16);
return (int16_t)(WebRtcSpl_IncreaseSeed(seed) >> 16);
}
WebRtc_Word16 WebRtcSpl_RandN(WebRtc_UWord32 *seed)
int16_t WebRtcSpl_RandN(uint32_t *seed)
{
return kRandNTable[WebRtcSpl_IncreaseSeed(seed) >> 23];
}
// Creates an array of uniformly distributed variables
WebRtc_Word16 WebRtcSpl_RandUArray(WebRtc_Word16* vector,
WebRtc_Word16 vector_length,
WebRtc_UWord32* seed)
int16_t WebRtcSpl_RandUArray(int16_t* vector,
int16_t vector_length,
uint32_t* seed)
{
int i;
for (i = 0; i < vector_length; i++)