summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/pcmbuf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/pcmbuf.c b/apps/pcmbuf.c
index 1a2324baaf..b887264997 100644
--- a/apps/pcmbuf.c
+++ b/apps/pcmbuf.c
@@ -708,7 +708,7 @@ static size_t crossfade_mix(const char *buf, size_t length)
708 708
709 while (length) 709 while (length)
710 { 710 {
711 int sample = *input_buf++ + *output_buf; 711 int32_t sample = *input_buf++ + *output_buf;
712 *output_buf++ = clip_sample_16(sample); 712 *output_buf++ = clip_sample_16(sample);
713 length -= 2; 713 length -= 2;
714 714
@@ -717,7 +717,7 @@ static size_t crossfade_mix(const char *buf, size_t length)
717 crossfade_chunk = crossfade_chunk->link; 717 crossfade_chunk = crossfade_chunk->link;
718 if (!crossfade_chunk) 718 if (!crossfade_chunk)
719 return length; 719 return length;
720 output_buf = (int16_t *)(crossfade_chunk->addr); 720 output_buf = (int16_t *)crossfade_chunk->addr;
721 chunk_end = SKIPBYTES(output_buf, crossfade_chunk->size); 721 chunk_end = SKIPBYTES(output_buf, crossfade_chunk->size);
722 } 722 }
723 } 723 }
@@ -1046,7 +1046,7 @@ void pcmbuf_mix_voice(int count)
1046 return; 1046 return;
1047 1047
1048 obuf = (int16_t *)pcmbuf_mix_chunk->addr; 1048 obuf = (int16_t *)pcmbuf_mix_chunk->addr;
1049 chunk_samples = pcmbuf_mix_chunk->size / 2; 1049 chunk_samples = pcmbuf_mix_chunk->size / sizeof (int16_t);
1050 1050
1051 count <<= 1; 1051 count <<= 1;
1052 1052