Re: [AD] Alsa driver hogs CPU

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Thu, 2004-01-08 at 13:40, Garth wrote:

> 
> I've just noticed that SDL has just had a simalar fix listed on the SDL 
> Page.
> 
> http://www.libsdl.org/cvs.php
> 
>  From reading it it looks like the issue is due to the continue statment 
> after (ret == -EAGAIN) which means it busy loops until it can write. The 
> solution they list is to nanosleep.
> 
> But if we're going to loop until we can write why not use blocking 
> writes? Or use select with non-blocking?
> 
> http://www.libsdl.org/pipermail/sdl/2003-December/058752.html
> 
> Anyway just a suggestion if it's any help, from a allegro-dev lurker

Thanks - that really could be a similiar problem. But I tried messing
with select/nanosleep already - and sometimes it worked, but with
distorted sound. And I couldn't figure out what all the fragments and
stuff is about, so I left it to Thomas to fix it - he will probably be
interested in this :)

-- 
Elias Pschernig <elias@xxxxxxxxxx>





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/