Re: [AD] Alsa driver hogs CPU

[ Thread Index | Date Index | More 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.


I've just noticed that SDL has just had a simalar fix listed on the SDL Page.

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?

Anyway just a suggestion if it's any help, from a allegro-dev lurker



Mail converted by MHonArc 2.6.19+