Hi all,
Inspired by Nathan Harrington's article on monitoring computers with
FluidSynth (recently linked to from Slashdot), I've started coding against
FluidSynth's C-library: libfluidsynth.
I'd like to say first how easy it was: libfluidsynth is a very nice library!
The main reason for writing is I've noticed a problem with the ALSA driver.
Pretty much as soon as I do new_fluid_audio_driver(), I see 100% CPU usage. I
see this both on my elderly laptop (P3-733MHz) and slightly less elderly
desktop (P-4 1.7GHz). Despite the differences in CPUs, in both cases the
audio sounds OK.
If I use the OSS driver (which, I presume, ALSA is emulating) then the CPU
load is vastly reduced (i.e. I have some spare CPU cycles!).
The desktop is running Debian testing (kernel: 2.6.17-2-686, libasound2:
1.0.13-1). The laptop is running Debian sid. I don't have access to it
right now, but it should be running 2.6.18-2-686 kernel package and the same
version of libasound2 library.
My code uses audio.period-size = 10000 and audio.periods = 10000 by default,
simply because those were the values used in the Nathan's article.
If it helps any, my code has two files that interfaces with libfluidsynth:
interface.c (mostly initialisation) and conductor.c (which starts and stops
notes). The files are available from:
http://monami.cvs.sourceforge.net/monami/MonAMI/src/fluidsynth/interface.c?view=markup
and
http://monami.cvs.sourceforge.net/monami/MonAMI/src/fluidsynth/conductor.c?view=markup
So, is there anyway I can "turn down" the CPU usage?
(both in general, and for the ALSA driver).
Cheers,
Paul.
------------------------------------------------------------------------
_______________________________________________
fluid-dev mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/fluid-dev