diff options
author | balrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-01-14 04:24:29 +0000 |
---|---|---|
committer | balrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-01-14 04:24:29 +0000 |
commit | ca9cc28c62a2c2877186569f4ab0cf1034502a73 (patch) | |
tree | d46c878d8f03c294452d625c851d6bb3668c5087 /audio/dsoundaudio.c | |
parent | b34d259a81500d75e4cf435f1e8b262ba7e1421a (diff) |
pthreads-based audio and miscellaneous audio clean-up (malc).
ESD support (malc, Frederick Reeve).
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3917 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'audio/dsoundaudio.c')
-rw-r--r-- | audio/dsoundaudio.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/audio/dsoundaudio.c b/audio/dsoundaudio.c index 41ddf4a18c..cba8c80030 100644 --- a/audio/dsoundaudio.c +++ b/audio/dsoundaudio.c @@ -320,23 +320,22 @@ static int waveformat_from_audio_settings (WAVEFORMATEX *wfx, audsettings_t *as) switch (as->fmt) { case AUD_FMT_S8: - wfx->wBitsPerSample = 8; - break; - case AUD_FMT_U8: wfx->wBitsPerSample = 8; break; case AUD_FMT_S16: + case AUD_FMT_U16: wfx->wBitsPerSample = 16; wfx->nAvgBytesPerSec <<= 1; wfx->nBlockAlign <<= 1; break; - case AUD_FMT_U16: - wfx->wBitsPerSample = 16; - wfx->nAvgBytesPerSec <<= 1; - wfx->nBlockAlign <<= 1; + case AUD_FMT_S32: + case AUD_FMT_U32: + wfx->wBitsPerSample = 32; + wfx->nAvgBytesPerSec <<= 2; + wfx->nBlockAlign <<= 2; break; default: @@ -387,8 +386,13 @@ static int waveformat_to_audio_settings (WAVEFORMATEX *wfx, audsettings_t *as) as->fmt = AUD_FMT_S16; break; + case 32: + as->fmt = AUD_FMT_S32; + break; + default: - dolog ("Invalid wave format, bits per sample is not 8 or 16, but %d\n", + dolog ("Invalid wave format, bits per sample is not " + "8, 16 or 32, but %d\n", wfx->wBitsPerSample); return -1; } |