Re: [AD] Alsa driver hogs CPU

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


Thomas Fjellstrom wrote:

Ok, I'm not promissing anything, but there are several ways in which to interface with the alsa library.. Polled, shm, the pcm_write functions, and seemingly combinations there of... I'll might try and see what will fits best with allegro's model... And if nothing comes out of that, I'll just try and fix the current driver, or vice-versa.

Hi,


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

Laters

Garth





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