summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/codecs/aiff_enc.c4
-rw-r--r--apps/codecs/mp3_enc.c2
-rw-r--r--apps/codecs/wav_enc.c4
-rw-r--r--apps/codecs/wavpack_enc.c2
4 files changed, 6 insertions, 6 deletions
diff --git a/apps/codecs/aiff_enc.c b/apps/codecs/aiff_enc.c
index c1c2a9ec48..aca1951654 100644
--- a/apps/codecs/aiff_enc.c
+++ b/apps/codecs/aiff_enc.c
@@ -240,10 +240,10 @@ static void chunk_to_aiff_format(uint32_t *src, uint32_t *dst)
int32_t lr1, lr2;
lr1 = *(*src)++;
- lr1 = ((int16_t)lr1 + (lr1 >> 16)) >> 1;
+ lr1 = ((int16_t)lr1 + (lr1 >> 16)) / 2;
lr2 = *(*src)++;
- lr2 = ((int16_t)lr2 + (lr2 >> 16)) >> 1;
+ lr2 = ((int16_t)lr2 + (lr2 >> 16)) / 2;
*(*dst)++ = swap_odd_even_le32((lr1 << 16) | (uint16_t)lr2);
} /* to_mono */
diff --git a/apps/codecs/mp3_enc.c b/apps/codecs/mp3_enc.c
index bbae3502bd..300787fcc2 100644
--- a/apps/codecs/mp3_enc.c
+++ b/apps/codecs/mp3_enc.c
@@ -2055,7 +2055,7 @@ static void to_mono_mm(void)
inline void to_mono(uint32_t **samp)
{
int32_t lr = **samp;
- int32_t m = ((int16_t)lr + (lr >> 16)) >> 1;
+ int32_t m = ((int16_t)lr + (lr >> 16)) / 2;
*(*samp)++ = (m << 16) | (uint16_t)m;
} /* to_mono */
diff --git a/apps/codecs/wav_enc.c b/apps/codecs/wav_enc.c
index 083465ab54..4b7b0083c8 100644
--- a/apps/codecs/wav_enc.c
+++ b/apps/codecs/wav_enc.c
@@ -229,10 +229,10 @@ static void chunk_to_wav_format(uint32_t *src, uint32_t *dst)
int32_t lr1, lr2;
lr1 = *(*src)++;
- lr1 = ((int16_t)lr1 + (lr1 >> 16)) >> 1;
+ lr1 = ((int16_t)lr1 + (lr1 >> 16)) / 2;
lr2 = *(*src)++;
- lr2 = ((int16_t)lr2 + (lr2 >> 16)) >> 1;
+ lr2 = ((int16_t)lr2 + (lr2 >> 16)) / 2;
*(*dst)++ = swap_odd_even_be32((lr1 << 16) | (uint16_t)lr2);
} /* to_mono */
diff --git a/apps/codecs/wavpack_enc.c b/apps/codecs/wavpack_enc.c
index c602ca4f55..208cd3bc68 100644
--- a/apps/codecs/wavpack_enc.c
+++ b/apps/codecs/wavpack_enc.c
@@ -126,7 +126,7 @@ static void chunk_to_int32(int32_t *src)
{
int32_t t = *(*src)++;
/* endianness irrelevant */
- *(*dst)++ = ((int16_t)t + (t >> 16)) >> 1;
+ *(*dst)++ = ((int16_t)t + (t >> 16)) / 2;
} /* to_int32 */
do