[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [fluid-dev] ALSA driver consuming too much CPU

From: Josh Green
Subject: Re: [fluid-dev] ALSA driver consuming too much CPU
Date: Tue, 21 Nov 2006 21:11:45 +0000

I just found and fixed the bug that was causing the 100% CPU usage
problem with the "default" ALSA device (now in CVS).  As for the sample
rate, I suspect your sound card doesn't support anything other than
48000 (yes they exist).  There is an option with ALSA to turn on
re-sampling, but FluidSynth isn't explicitly setting this option, so it
is whatever the default is (possibly disabled).

One thing I noticed about the "default" ALSA device is that it is
currently using the plug software mixer.  On my machine I'm getting a
minimum buffer size of 940 and 15 buffers!  That is a whole lot of
latency and it is useless for live work.  I'm not sure if there is
another bug that is causing that, or if that is just the limitations of
the software ALSA mixer on my machine.  Maybe there is a way to improve
that, I should do some research :)  I'm tempted to make the default
device for FluidSynth be hw:0 (that is what Jack does).  On the other
hand the "default" device is OK for MIDI playback or perhaps as a music
synthesizer in a game.

Best regards,
        Josh Green

On Tue, 2006-11-21 at 14:30 +0000, Paul Millar wrote:
> On Saturday 18 November 2006 12:00, Mihail Zenkov wrote:
> > You have this problem with sample rate = 48000 ?
> I'm not sure which of the problems you mean (failing to set the sample rate 
> or 
> 100% CPU usage), but both remain a problem.
> I can set the sample rate to 48kHz in fluid_settings_t;  but, when I start 
> the 
> audio output, it falls back to 41.1kHz giving the usual warning:
> fluidsynth> The sample rate is set to 44100, the synthesizer may be out of 
> tune
> BTW, when I try using my second sound card there is no problem.  (I have two 
> in my desktop machine, because the built-in Intel chip was only fairly 
> recently supported under Linux.)
> hw:0 is Ensoniq AudioPCI (TriTech TR28602)
> hw:1 is Intel 82801DB-ICH4 (Realtek ALC650D)
> The following table contains the results when trying to set different 
> frequencies with the cards.  "Y" means I get the above warning message 
> ("...synthesizer may be out of tune"),  "N" means no message generated.
>                       Sound card
> Freq/kHz              hw:0    hw:1
> 44.1                  Y               N
> 48                    Y               N
> BTW, the Wikipedia article about the card:
>   http://en.wikipedia.org/wiki/Ensoniq_AudioPCI
> says the card supports  "16-bit [...] playback at up to 48 kHz".
> Cheers,
> Paul.
> PS.
> setting the ALSA device to "default" whilst trying to set the freq to 48kHz 
> still gives 100% CPU usage but setting this to "hw:0" works fine.
> _______________________________________________
> fluid-dev mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/fluid-dev

reply via email to

[Prev in Thread] Current Thread [Next in Thread]