Support SDL audio devices that require float32 samples.

Fixes missing audio when playing on Windows with SDL 2.0.7, which started
using WASAPI, which demands floating point audio.
This commit is contained in:
Ryan C. Gordon 2018-04-13 14:05:12 -04:00
parent 3377f9981a
commit 4f8c7c2f2f
5 changed files with 26 additions and 4 deletions

View file

@ -368,6 +368,9 @@ qboolean CL_OpenAVIForWriting( const char *fileName )
afd.a.rate = dma.speed;
afd.a.format = WAV_FORMAT_PCM;
afd.a.channels = dma.channels;
/* !!! FIXME: if CL_WriteAVIAudioFrame() is ever called from somewhere other
!!! FIXME: than S_TransferStereo16(), we will need to handle/convert
!!! FIXME: float32 samples for AVI writing. */
afd.a.bits = dma.samplebits;
afd.a.sampleSize = ( afd.a.bits / 8 ) * afd.a.channels;