winealsa fix
Ove Kaaven
ovek at arcticnet.no
Tue Apr 27 12:29:52 CDT 2004
I forgot to convert frames to bytes when I used snd_pcm_delay in
wodUpdatePlayedTotal... and also I've just spotted that someone set the
stereo format bit instead of the mono format bit when the driver
supports 1-channel audio...
Log:
Ove Kaaven <ovek at transgaming.com>
Fixed a couple of bugs.
Index: dlls/winmm/winealsa/audio.c
===================================================================
RCS file: /home/wine/wine/dlls/winmm/winealsa/audio.c,v
retrieving revision 1.38
diff -u -r1.38 audio.c
--- dlls/winmm/winealsa/audio.c 26 Apr 2004 23:31:11 -0000 1.38
+++ dlls/winmm/winealsa/audio.c 27 Apr 2004 17:23:57 -0000
@@ -596,14 +596,14 @@
if (snd_pcm_format_mask_test( fmask, SND_PCM_FORMAT_U8)) \
{ \
if (chmin <= 1 && 1 <= chmax) \
- wwo->caps.dwFormats |= WAVE_FORMAT_##v##S08; \
+ wwo->caps.dwFormats |= WAVE_FORMAT_##v##M08; \
if (chmin <= 2 && 2 <= chmax) \
wwo->caps.dwFormats |= WAVE_FORMAT_##v##S08; \
} \
if (snd_pcm_format_mask_test( fmask, SND_PCM_FORMAT_S16_LE)) \
{ \
if (chmin <= 1 && 1 <= chmax) \
- wwo->caps.dwFormats |= WAVE_FORMAT_##v##S16; \
+ wwo->caps.dwFormats |= WAVE_FORMAT_##v##M16; \
if (chmin <= 2 && 2 <= chmax) \
wwo->caps.dwFormats |= WAVE_FORMAT_##v##S16; \
} \
@@ -703,14 +703,14 @@
if (snd_pcm_format_mask_test( fmask, SND_PCM_FORMAT_U8)) \
{ \
if (chmin <= 1 && 1 <= chmax) \
- wwi->caps.dwFormats |= WAVE_FORMAT_##v##S08; \
+ wwi->caps.dwFormats |= WAVE_FORMAT_##v##M08; \
if (chmin <= 2 && 2 <= chmax) \
wwi->caps.dwFormats |= WAVE_FORMAT_##v##S08; \
} \
if (snd_pcm_format_mask_test( fmask, SND_PCM_FORMAT_S16_LE)) \
{ \
if (chmin <= 1 && 1 <= chmax) \
- wwi->caps.dwFormats |= WAVE_FORMAT_##v##S16; \
+ wwi->caps.dwFormats |= WAVE_FORMAT_##v##M16; \
if (chmin <= 2 && 2 <= chmax) \
wwi->caps.dwFormats |= WAVE_FORMAT_##v##S16; \
} \
@@ -947,7 +947,7 @@
{
snd_pcm_sframes_t delay = 0;
snd_pcm_delay(wwo->p_handle, &delay);
- wwo->dwPlayedTotal = wwo->dwWrittenTotal - delay;
+ wwo->dwPlayedTotal = wwo->dwWrittenTotal - snd_pcm_frames_to_bytes(wwo->p_handle, delay);
return TRUE;
}
More information about the wine-patches
mailing list