fluid-dev
[Top][All Lists]
Advanced

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

Re: [fluid-dev] Possible freeze in delete_fluid_alsa_audio_driver()


From: Sven Meier
Subject: Re: [fluid-dev] Possible freeze in delete_fluid_alsa_audio_driver()
Date: Wed, 03 Nov 2010 20:15:48 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.15) Gecko/20101027 Thunderbird/3.0.10

Hi Pedro,

thanks for your tips on pulseaudio.

Regarding the freeze, I was able to narrow down the problem.

If the following prerequesites are met:
- Jack is running,
- Fluidsynth is explicitely started with -a alsa
Then the call to snd_pcm_writei() in fluid_alsa.c (line #511) fails to return on the 178th invocation - strange! The reported freeze on delete_fluid_alsa_audio_driver() is just an aftereffect :(.

Seems this isn't a Fluidsynth problem after all.

Can anyone give me an advice where to address this problem?

Thanks

Sven


On 11/03/2010 06:32 AM, Pedro Lopez-Cabanillas wrote:
On Tuesday 02 November 2010, Sven Meier wrote:
Hi all,

I'm experiencing a strange freeze in delete_fluid_alsa_audio_driver():

0x9da58ae5    fluid_thread_join + 0x1d
0x9da4d388    delete_fluid_alsa_audio_driver + 0x47
0x9da81c74    delete_fluid_audio_driver + 0x59

The attempt to join the (synthesizer?) thread never returns (line #332):

    dev->cont = 0;
    if (dev->thread)
      fluid_thread_join (dev->thread); /* never returns */

To trigger this issue the following prerequisites have to be met:
- Jack is running
- a fluidsynth instance is created with "audio.driver" explicitely set
to "alsa".
- finally the fluidsynth instance is deleted.

I've just double checked by starting fluidsynth from the command line
and this seems to expose the same issue:

$ fluidsynth -a alsa
FluidSynth version 1.1.3
....
fluidsynth: debug: Using 'alsa' audio driver
fluidsynth: debug: Using 'alsa_seq' midi driver
Type 'help' for help topics.
....
  >  quit
cheers!
<nothing happens after cheers>

BTW I'm using the latest fluidsynth from SVN.

Any ideas?
I can confirm the freeze when PulseAudio is also running. Jack typically
doesn't use PulseAudio. When I run fluidsynth using an ALSA hw device the
freeze doesn't happen. For instance:

$ fluidsynth -a alsa -o audio.alsa.device=hw:0,0

Note that many cheap audio interfaces don't allow two programs opening the
same hw device at the same time.

When you don't tell an explicit device, ALSA uses "default" which is routed to
the PulseAudio plugin if you have it installed. You can verify this in your
"/etc/asound-pulse.conf" or "/etc/asound.conf". To defeat this setting for
your own account, you can create a file at your $HOME named ".asoundrc" with a
content like this one:

pcm.!default {
     type hw
     card 0
}

ctl.!default {
     type hw
     card 0
}

Anyway, the freeze requires more investigation before deciding if it is a bug
in ALSA, PulseAudio, or FluidSynth.

Regards,
Pedro

_______________________________________________
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]