[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [fluid-dev] fluidsynth with realtime kernel
From: |
Pedro Lopez-Cabanillas |
Subject: |
Re: [fluid-dev] fluidsynth with realtime kernel |
Date: |
Fri, 8 Oct 2010 23:15:15 +0200 |
User-agent: |
KMail/1.13.5 (Linux/2.6.34.7-0.3-desktop; KDE/4.4.4; i686; ; ) |
Hi Rui,
On Friday 08 October 2010, Rui Fan wrote:
> Hi everyone,
>
> I'm using fluidsynth 1.1.2 under Ubuntu 10.04, with latest realtime
> kernel, connect to RoseGarden 10.04, playback some midi files.
> Sometimes I encounter this error message, and all sounds off.
>
>
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
> fluidsynth -C0 -R1 -l -a alsa
> /home/fanrui/tools/music/soundfont/SGM-V2.01.sf2/SGM-V2.01.sf2
> FluidSynth version 1.1.2
> Copyright (C) 2000-2009 Peter Hanappe and others.
> Distributed under the LGPL license.
> SoundFont(R) is a registered trademark of E-mu Systems, Inc.
>
> Type 'help' for help topics.
>
> > fluidsynth: error: The audio device error: Input/output error
This may be produced by several things: an audio hardware device malfunction,
problems with other hardware components, the ALSA device driver, other Linux
kernel components, other software, ... almost anything.
> address@hidden:~$ uname -a
> Linux fanrui-desktop 2.6.31-11-rt #154-Ubuntu SMP PREEMPT RT Wed Jun 9
> 12:28:53 UTC 2010 i686 GNU/Linux
>
> Does this mean fluidsynth is not compatible with realtime kernel ?
> On my laptop there is a rather big latency when using default kernel,
> so I'm trying realtime kernel. On my other desktop computers, the
> latency for default kernel is accepted.
FluidSynth latency depends on several factors. A very important one is the
audio buffer size and periods. You can find more information here:
http://sourceforge.net/apps/trac/fluidsynth/wiki/LowLatency
The problem is that reducing the buffers increases the probability of
underruns on the audio hardware, producing noises/artifacts and input/output
errors. To mitigate this problem, you can run a realtime kernel and assign
realtime priority to the synthesizer process. Since FluidSynth 1.1.2, you can
use rtkit, but the classic way is the allowing rtprio to your user/group in
limits.conf, http://linux.die.net/man/5/limits.conf
http://apps.linuxaudio.org/wiki/real_time_info
Anyway, even if you use the same operating system, kernel version, priority
settings, environment, processor, etc. a critical factor is the audio hardware
device. Professional or good quality audio interfaces typically allow much
smaller buffers, and lower latency as a consequence than cheap/low quality
devices. If your laptop has an HDA sound hardware, it is probably the culprit.
Regards,
Pedro