diff options
author | balrog | 2008-04-28 01:31:40 +0200 |
---|---|---|
committer | balrog | 2008-04-28 01:31:40 +0200 |
commit | aa92310171defe621617bd2af3002488c7797d42 (patch) | |
tree | 1360a83b33755cb33c00adabbe93a5e87a42f9a5 /hw/musicpal.c | |
parent | Ignore the wrapping of acpi timer counter again. (diff) | |
download | qemu-aa92310171defe621617bd2af3002488c7797d42.tar.gz qemu-aa92310171defe621617bd2af3002488c7797d42.tar.xz qemu-aa92310171defe621617bd2af3002488c7797d42.zip |
musicpal: Fix output level of 8-bit samples (Jan Kiszka).
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4269 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/musicpal.c')
-rw-r--r-- | hw/musicpal.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/musicpal.c b/hw/musicpal.c index e41c9e4171..c8ee1ac88a 100644 --- a/hw/musicpal.c +++ b/hw/musicpal.c @@ -270,15 +270,15 @@ static void audio_callback(void *opaque, int free_out, int free_in) 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)); } } |