]> git.proxmox.com Git - mirror_qemu.git/commit - audio/audio.c
audio: replace shift in audio_pcm_info with bytes_per_frame
authorKővágó, Zoltán <dirty.ice.hu@gmail.com>
Sun, 13 Oct 2019 19:58:02 +0000 (21:58 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Fri, 18 Oct 2019 06:14:05 +0000 (08:14 +0200)
commit2b9cce8c8c37b95290c48c037e51e001985124d1
tree82fbbf3fff30c561215cada4c3f2a97f8cda1dbb
parentcecc1e79bf9ad9a0e2d3ce513d4f71792a0985f6
audio: replace shift in audio_pcm_info with bytes_per_frame

The bit shifting trick worked because the number of bytes per frame was
always a power-of-two (since QEMU only supports mono, stereo and 8, 16
and 32 bit samples).  But if we want to add support for surround sound,
this no longer holds true.

Signed-off-by: Kővágó, Zoltán <DirtY.iCE.hu@gmail.com>
Message-id: 1351fd9bcce0ff20d81850c5292722194329de02.1570996490.git.DirtY.iCE.hu@gmail.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
audio/alsaaudio.c
audio/audio.c
audio/audio_int.h
audio/coreaudio.c
audio/dsound_template.h
audio/dsoundaudio.c
audio/noaudio.c
audio/ossaudio.c
audio/spiceaudio.c
audio/wavaudio.c