[pulseaudio-discuss] [PATCH 3/4] resampler: Use int16_t instead of short.

Tanu Kaskinen tanu.kaskinen at digia.com
Tue Aug 14 07:08:36 PDT 2012


Also add a cast to void pointer to get rid of one instance
of "warning: cast increases required alignment of target
type". The warning is a false positive.
---
 src/pulsecore/resampler.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/pulsecore/resampler.c b/src/pulsecore/resampler.c
index 9f19559..9d50093 100644
--- a/src/pulsecore/resampler.c
+++ b/src/pulsecore/resampler.c
@@ -1729,7 +1729,7 @@ static void ffmpeg_resample(pa_resampler *r, const pa_memchunk *input, unsigned
         previous_consumed_frames = consumed_frames;
 
         /* And place the results in the output buffer */
-        s = (short*) ((uint8_t*) pa_memblock_acquire(output->memblock) + output->index) + c;
+        s = (int16_t *) ((void *) ((uint8_t *) pa_memblock_acquire(output->memblock) + output->index)) + c;
         for (u = 0; u < used_frames; u++) {
             *s = *q;
             q++;
-- 
1.7.9.5



More information about the pulseaudio-discuss mailing list