audio.c converted from WaitForSingleObject to poll

eric pouech eric.pouech at wanadoo.fr
Wed Oct 31 14:10:46 CST 2001


Ove Kaaven wrote:
> 
> On Wed, 31 Oct 2001, Simon Britnell wrote:
> 
> > 2) Removes the need to calculate a sleep interval in
> > the wodPlayer main loop, as it loops only when dsp is
> > ready to be written or a command is ready to be
> > received.
> 
> Well, it seems like a bad idea to make the player thread enter a busy loop
> when there isn't enough data to fill the device buffers, don't you think?
> (Well, though I'd like buffer complete notifications to happen more
> frequently than they do in Wine's current implementation, making the
> player thread use 100% CPU isn't the way...)
where's the busy wait ? the code blocks on poll for two types on events
- /dev/dsp becomes writable (some new fragments can be written)
- a new message has been sent
so the playback thread is blocked otherwise (unless I underlooked 
something)

A+
-- 
---------------
Eric Pouech (http://perso.wanadoo.fr/eric.pouech/)
"The future will be better tomorrow", Vice President Dan Quayle




More information about the wine-devel mailing list