[Top][All Lists]

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

Re: [fluid-dev] problems with fluidsynth 1.1.6 on a raspberry pi

From: David Henningsson
Subject: Re: [fluid-dev] problems with fluidsynth 1.1.6 on a raspberry pi
Date: Mon, 19 Nov 2012 13:05:19 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121028 Thunderbird/16.0.2

On 11/19/2012 07:34 AM, Pedro Lopez-Cabanillas wrote:
El Lunes, 19 de noviembre de 2012 06:42:38 David Henningsson escribió:
On 11/18/2012 07:56 PM, Pedro Lopez-Cabanillas wrote:
El Domingo, 18 de noviembre de 2012 12:51:58 David Henningsson escribió:
I'll do some experiments with it when I have some more time.

My bet is floating point exceptions.

I tried to verify this theory on my Nexus 7 device. I've tried to
compile with -ffast-math, with according to documentation should
activate flush-to-zero mode, as well as activating it explicitly

On my Nokia N9xx (also ARM based) the release build was made with these flags:
QMAKE_CFLAGS_RELEASE += --mfpu=neon -ffast-math -funsafe-math-optimizations

#define WITH_FLOAT 1

Given that floats are faster on ARM devices (and probably older x86 devices as well), I think it makes sense to switch back to using single point precision by default.

Automatic denormals to zero doesn't prevent FP operations being slower when
such numbers are involved. The problem is the larger CPU usage if there are FP
exceptions, which happens in all CPUs except modern Intel processors.

I'm trying to verify this theory, but I can't. I've tried putting the Cortex-A9 VFP into "RunFast" mode, which is supposed to treat subnormal and special cases without any additional latency. But there is no difference in throughput.

By the way, this is the initialization code:

     ::fluid_settings_setstr(m_settings, "audio.driver", "pulseaudio");
     ::fluid_settings_setint(m_settings, "audio.period-size", 1024);
     ::fluid_settings_setint(m_settings, "audio.periods", 2);
     ::fluid_settings_setnum(m_settings, "synth.sample-rate", 12000.0);
     ::fluid_settings_setint(m_settings, "synth.chorus.active", 0);
     ::fluid_settings_setint(m_settings, "synth.reverb.active", 0);
     ::fluid_settings_setnum(m_settings, "synth.gain", 0.4);
     ::fluid_settings_setint(m_settings, "synth.polyphony", 16);
     ::fluid_synth_set_interp_method(m_synth, -1, FLUID_INTERP_LINEAR);

With this setup, the synth is barely usable on the N9 for real time usage.
Playing MIDI files on it is out of the question.

Interesting. I didn't think processors were *that* slow these days...

Maybe it's something else, like cache misses or so?

// David

reply via email to

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