winealsa.drv: drop redundant calls
Rafał Mużyło
galtgendo at gmail.com
Thu Mar 3 10:54:21 CST 2011
A bit of git history first:
content of dscapture.c and dsoutput.c was once a part of audio.c,
before it was split into waveout and directsound parts;
waveout was incorrectly calling and using return value of snd_pcm_delay
for awhile then, till the calls were corrected to snd_pcm_avail_update;
neither dsoutput.c nor dscapture.c are actually using the return values
and AFAICT the only purpose of snd_pcm_hwsync calls would be ensuring
that those return values are valid;
As such, those calls are most likely redundant.
-------------- next part --------------
--- dlls/winealsa.drv/dscapture.c 2010-12-09 11:17:17.000000000 +0100
+++ dlls/winealsa.drv/dscapture.c 2011-03-03 17:35:52.000000000 +0100
@@ -422,11 +422,8 @@
static void CheckXRUN(IDsCaptureDriverBufferImpl* This)
{
snd_pcm_state_t state = snd_pcm_state(This->pcm);
- snd_pcm_sframes_t delay;
int err;
- snd_pcm_hwsync(This->pcm);
- snd_pcm_delay(This->pcm, &delay);
if ( state == SND_PCM_STATE_XRUN )
{
err = snd_pcm_prepare(This->pcm);
--- dlls/winealsa.drv/dsoutput.c 2010-12-09 11:17:17.000000000 +0100
+++ dlls/winealsa.drv/dsoutput.c 2011-03-03 17:36:06.000000000 +0100
@@ -168,11 +168,8 @@
static void CheckXRUN(IDsDriverBufferImpl* This)
{
snd_pcm_state_t state = snd_pcm_state(This->pcm);
- snd_pcm_sframes_t delay;
int err;
- snd_pcm_hwsync(This->pcm);
- snd_pcm_delay(This->pcm, &delay);
if ( state == SND_PCM_STATE_XRUN )
{
err = snd_pcm_prepare(This->pcm);
More information about the wine-patches
mailing list