[uae] Re: Sound tips for Linux

  • From: "Kjetil S. Matheussen" <kjetil@xxxxxxxxxxxxxxxxxx>
  • To: uae@xxxxxxxxxxxxx
  • Date: Thu, 13 Jul 2006 02:07:49 -0700 (PDT)

On Thu, 13 Jul 2006, Richard Drummond wrote:

Hi Kjetil

On Thursday 13 July 2006 01:55, Kjetil S. Matheussen wrote:
Yes, as I have said earlier. Its impossible to get descent audio (ie.
without clicks or large lag) in linux without running realtime.

It's not impossible. I can do it here. It's not perfect, but for most purposes its good enough. I want to get to be able to get to the point where somebody can install E-UAE on an average Linux distribution, and it'll work acceptably for playing classic Amiga games.

Of course, for those who want to go the extra mile, then, yes, real-time
patches may be necessary.


Yeah, you are probably right. But for running realtime amiga software like midi sequencers, the current state is not good enough. But for games, probably. The games would run better with realtime priority though, maybe
it even would be noticable... It would certainly be easier to tune uae
if it was properly programmed for running with realtime priority though, so it might be a good idea anyway, just to lower the amount of programming time.



So the
ideal solution is to put all things that can block, like graphics, disk,
input, in their own threads which are communicated with thru lockfree
ringbuffers

I experimented with lock-free ring-buffers for audio. IMHO, it doesn't solve any more problems than it creates.


The point is to avoid priority inversion. Theres little point running a
program with realtime priority if it has to wait on a non-realtime thread, which does happen if you do things like disk-access or X
graphics rendering.




I have the knowledge to do the realtime and threading part, but unfortunately not the time to do the programming. But maybe I'll do it anyway. :-)

My ee-uae version of e-uae was a step towards the above goal, and it works
quite well for system friendly midi-programs, but I haven't tried with
audio.

Please do contribute.


I want to. :-)


Other related posts: