diff options
author | Volker Rümelin <vr_qemu@t-online.de> | 2025-05-15 07:44:28 +0200 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@redhat.com> | 2025-05-25 11:28:28 +0200 |
commit | 9ddb7c85c965636f7abf91382dc40175ce121aa3 (patch) | |
tree | b7722b55b145ce6dc830b71cca3e5283d6ac5397 | |
parent | f4b1c3db11317c4bce18fa3bbb025df7c22ea54c (diff) | |
download | qemu-9ddb7c85c965636f7abf91382dc40175ce121aa3.zip qemu-9ddb7c85c965636f7abf91382dc40175ce121aa3.tar.gz qemu-9ddb7c85c965636f7abf91382dc40175ce121aa3.tar.bz2 |
audio/mixeng: remove unnecessary pointer type casts
A simple assignment automatically converts a void pointer type
to any other pointer type.
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Volker Rümelin <vr_qemu@t-online.de>
Message-Id: <20250515054429.7385-6-vr_qemu@t-online.de>
-rw-r--r-- | audio/mixeng.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/audio/mixeng.c b/audio/mixeng.c index 69f6549..13e1ff9 100644 --- a/audio/mixeng.c +++ b/audio/mixeng.c @@ -286,7 +286,7 @@ static const float float_scale_reciprocal = 1.f / ((int64_t)INT32_MAX + 1); static void conv_natural_float_to_mono(struct st_sample *dst, const void *src, int samples) { - float *in = (float *)src; + const float *in = src; while (samples--) { dst->r = dst->l = CONV_NATURAL_FLOAT(*in++); @@ -297,7 +297,7 @@ static void conv_natural_float_to_mono(struct st_sample *dst, const void *src, static void conv_natural_float_to_stereo(struct st_sample *dst, const void *src, int samples) { - float *in = (float *)src; + const float *in = src; while (samples--) { dst->l = CONV_NATURAL_FLOAT(*in++); @@ -314,7 +314,7 @@ t_sample *mixeng_conv_float[2] = { static void clip_natural_float_from_mono(void *dst, const struct st_sample *src, int samples) { - float *out = (float *)dst; + float *out = dst; while (samples--) { *out++ = CLIP_NATURAL_FLOAT(src->l + src->r); @@ -325,7 +325,7 @@ static void clip_natural_float_from_mono(void *dst, const struct st_sample *src, static void clip_natural_float_from_stereo( void *dst, const struct st_sample *src, int samples) { - float *out = (float *)dst; + float *out = dst; while (samples--) { *out++ = CLIP_NATURAL_FLOAT(src->l); |