Fix to winealsa for alsa-lib-0.9.6

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



My apologies in advance if this isn't the right way to send
a patch.  Feel free to respond with constructive comments if
it is not.  I'm new at this.

The following patch allows the winealsa winmm driver to work with
the current ALSA library/driver set (0.9.6).  The old value
passed to snd_pcm_sw_params_set_silence_size() in wodOpen()
was causing the subsequent call to snd_pcm_sw_params() to fail with
"bad parameter".  Considering that the silence threshold is 0
(set by snd_pcm_sw_params_set_silence_threshold()), it makes sense
that the silence size should also be 0.  I don't know if this is
the right thing to do (tm) overall, but it does get the driver
working again.

ChangeLog: Fix parameter to snd_pcm_sw_params_set_silence_size()
Contact info: wine@frotz.org

Index: audio.c
===================================================================
RCS file: /home/wine/wine/dlls/winmm/winealsa/audio.c,v
retrieving revision 1.14
diff -u -u -r1.14 audio.c
--- audio.c	4 Jun 2003 20:28:05 -0000	1.14
+++ audio.c	19 Aug 2003 18:20:51 -0000
@@ -1161,7 +1161,7 @@
 
     snd_pcm_sw_params_current(pcm, sw_params);
     EXIT_ON_ERROR( snd_pcm_sw_params_set_start_threshold(pcm, sw_params, dwFlags & WAVE_DIRECTSOUND ? INT_MAX : 1 ), MMSYSERR_ERROR, "unable to set start threshold");
-    EXIT_ON_ERROR( snd_pcm_sw_params_set_silence_size(pcm, sw_params, period_size*2), MMSYSERR_ERROR, "unable to set silence size");
+    EXIT_ON_ERROR( snd_pcm_sw_params_set_silence_size(pcm, sw_params, 0), MMSYSERR_ERROR, "unable to set silence size");
     EXIT_ON_ERROR( snd_pcm_sw_params_set_avail_min(pcm, sw_params, period_size), MMSYSERR_ERROR, "unable to set avail min");
     EXIT_ON_ERROR( snd_pcm_sw_params_set_xfer_align(pcm, sw_params, 1), MMSYSERR_ERROR, "unable to set xfer align");
     EXIT_ON_ERROR( snd_pcm_sw_params_set_silence_threshold(pcm, sw_params, 0), MMSYSERR_ERROR, "unable to set silence threshold");


[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux