* [Qemu-devel] [PATCH] musicpal: Fix output level of 8-bit samples
@ 2008-04-27 10:46 Jan Kiszka
0 siblings, 0 replies; only message in thread
From: Jan Kiszka @ 2008-04-27 10:46 UTC (permalink / raw)
To: qemu-devel
I've still no test case for this, but looking at the code again, the
following makes a bit more sense.
Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
---
hw/musicpal.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
Index: b/hw/musicpal.c
===================================================================
--- a/hw/musicpal.c
+++ b/hw/musicpal.c
@@ -270,15 +270,15 @@ static void audio_callback(void *opaque,
return;
if (s->playback_mode & MP_AUDIO_16BIT_SAMPLE)
- memcpy(wm8750_dac_buffer(s->wm, block_size >> 2),
+ memcpy(wm8750_dac_buffer(s->wm, block_size >> 2),
(uint32_t *)(s->target_buffer + s->play_pos),
block_size);
else {
codec_buffer = wm8750_dac_buffer(s->wm, block_size >> 1);
for (pos = 0; pos < block_size; pos += 2) {
- *codec_buffer++ = cpu_to_le16(2 *
+ *codec_buffer++ = cpu_to_le16(256 *
*(int8_t *)(s->target_buffer + s->play_pos + pos));
- *codec_buffer++ = cpu_to_le16(2 *
+ *codec_buffer++ = cpu_to_le16(256 *
*(int8_t *)(s->target_buffer + s->play_pos + pos + 1));
}
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-04-27 10:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-27 10:46 [Qemu-devel] [PATCH] musicpal: Fix output level of 8-bit samples Jan Kiszka
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.