diff options
author | Lennart Poettering <lennart@poettering.net> | 2009-07-20 17:34:17 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2009-07-20 17:34:17 +0200 |
commit | 18e975fc5ef68a89875c77974570884b9214a009 (patch) | |
tree | e0346c369315e71f386190c19ad4a1c06d5b526e /src/pulsecore/sconv-s16le.c | |
parent | 3a09a88fd1f3dfe365dc1f3e455c097010d00964 (diff) |
mergedrtpoll
Diffstat (limited to 'src/pulsecore/sconv-s16le.c')
-rw-r--r-- | src/pulsecore/sconv-s16le.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/pulsecore/sconv-s16le.c b/src/pulsecore/sconv-s16le.c index 307ce7b7..43b8cb3e 100644 --- a/src/pulsecore/sconv-s16le.c +++ b/src/pulsecore/sconv-s16le.c @@ -370,7 +370,7 @@ void pa_sconv_s24_32le_to_s16ne(unsigned n, const uint32_t *a, int16_t *b) { pa_assert(b); for (; n > 0; n--) { - *b = (int16_t) ((int32_t) (UINT32_FROM(*a) << 8) >> 16); + *b = (int16_t) (((int32_t) (UINT32_FROM(*a) << 8)) >> 16); a++; b++; } @@ -416,8 +416,8 @@ void pa_sconv_s24_32le_to_float32ne(unsigned n, const uint32_t *a, float *b) { pa_assert(b); for (; n > 0; n--) { - int32_t s = (int16_t) ((int32_t) (UINT32_FROM(*a) << 8)); - *b = ((float) s) / 0x7FFFFFFF; + int32_t s = (int32_t) (UINT32_FROM(*a) << 8); + *b = (float) s / (float) 0x7FFFFFFF; a ++; b ++; } @@ -428,8 +428,8 @@ void pa_sconv_s24_32le_to_float32re(unsigned n, const uint32_t *a, float *b) { pa_assert(b); for (; n > 0; n--) { - int32_t s = (int16_t) ((int32_t) (UINT32_FROM(*a) << 8)); - float k = ((float) s) / 0x7FFFFFFF; + int32_t s = (int32_t) (UINT32_FROM(*a) << 8); + float k = (float) s / (float) 0x7FFFFFFF; *b = PA_FLOAT32_SWAP(k); a ++; b ++; |