Jan Zerebecki wrote:
On Wed, Sep 20, 2006 at 05:55:03PM +0200, Marcus Meissner wrote:
On Wed, Sep 20, 2006 at 05:54:06PM +0200, Tomas Carnecky wrote:
Jan Zerebecki wrote:
As explained in the mail refrenced above the main problem is that in wine the alsa callback signal (that we currently use) won't work properly without special care, but the fd based method (for example with select) should work as expected.
Why won't it work without special care? Is it because of the SIGIO signal? Wouldn't the fd-method require a separate thread?
It is because how (all) signals work and how wine works. The fd method may not require a separate thread when we can combine the event loop of the currently used sound thread with e.g. the select for the alsa-lib fd(s), thu I didn't look at that and it might not be possible.
this looks very possible to me... and likely the cleanest solution in the event loop we only wait on a single item (the fd used for signaling a new event to be handled by the thread), so adding a poll on a second fd seems very feasible (alternative coding with win32 objects is also possible, though a bit more trickier, but this could be dropped IMO, as it's currently broken -> on event is lost if two are pushed before the playback thread gets a chance to get them)