ALSA: Call snd_pcm_drain instead of a buggy homegrown version

Robert Shearman rob at codeweavers.com
Mon Jul 25 11:08:40 CDT 2005


Vitaliy Margolen wrote:

>Isn't WODM_RESET should stop playback/recording immediately? In which case
>shouldn't we use snd_pcm_drop instead?
>  
>

 From MSDN:
The *waveOutReset* function stops playback on the given waveform-audio 
output device and resets the current position to zero. All pending 
playback buffers are marked as done and returned to the application.
 From ALSA docs:
snd_pcm_drop: Stop a PCM dropping pending frames. This function stops 
the PCM /immediately/. The pending samples on the buffer are ignored.
snd_pcm_drain: Stop a PCM preserving pending frames. For capture stop 
PCM permitting to retrieve residual frames.

To me it sounds like waveOutReset should call snd_pcm_drain, rather than 
snd_pcm_drop.

>I'm guessing here. I have that loop disabled here for some time now. And I can't
>hear any artifacts.
>
>PS: If we drop that loop we should remove all associated stuff as well.
>  
>

Ok, I'll do that and resend the patch once we agree which ALSA function 
to use.

-- 
Rob Shearman




More information about the wine-devel mailing list