aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2005-11-20 16:22:16 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2005-11-20 16:22:16 +0000
commit509035303d2dc77e96c857bedf3de472440ef76b (patch)
tree5336e62fe52bd6fe0ca2dfa82a7ef03e91cc3f1d
parent546754dc1d799ebfba1b2654a9a75541e9187674 (diff)
wav finalization fix (malc)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1634 c046a42c-6fe2-441c-8c8c-71466251a162
-rw-r--r--audio/wavaudio.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/audio/wavaudio.c b/audio/wavaudio.c
index 4cc9ca7f84..18d2bb0c74 100644
--- a/audio/wavaudio.c
+++ b/audio/wavaudio.c
@@ -167,11 +167,10 @@ static int wav_init_out (HWVoiceOut *hw, audsettings_t *as)
static void wav_fini_out (HWVoiceOut *hw)
{
WAVVoiceOut *wav = (WAVVoiceOut *) hw;
- int stereo = hw->info.nchannels == 2;
uint8_t rlen[4];
uint8_t dlen[4];
- uint32_t rifflen = (wav->total_samples << stereo) + 36;
- uint32_t datalen = wav->total_samples << stereo;
+ uint32_t datalen = wav->total_samples << hw->info.shift;
+ uint32_t rifflen = datalen + 36;
if (!wav->f) {
return;