FS#41768 - [fluidsynth] Detect PA and change default configuration accordingly
Attached to Project:
Arch Linux
Opened by Ernest Skrzypczyk (emeres) - Sunday, 31 August 2014, 13:44 GMT
Last edited by Ray Rashif (schivmeister) - Thursday, 30 October 2014, 18:35 GMT
Opened by Ernest Skrzypczyk (emeres) - Sunday, 31 August 2014, 13:44 GMT
Last edited by Ray Rashif (schivmeister) - Thursday, 30 October 2014, 18:35 GMT
|
Details
Description:
Could something like this be added to post_install function in fluidsynth.install? [code] if (pidof pulseaudio > /dev/null); then sed -i 's/a\ alsa/a\ pulseaudio/' /etc/fluidsynth.conf; fi [/code] Additional info: There are reoccurring cases where users come across this behaviour and even though it is explained on the PA wiki, this could be easily fixed by the line above. So should a user run pulaseaudio at the time of installation, that would be the default driver for fluidsynth, which would avoid blocking the audio device for pulseaudio. One of recent cases: https://bbs.archlinux.org/viewtopic.php?id=186427. Steps to reproduce: Since I do not use PA myself, I can only speculate based on reports from others: Install fluidsynth on a system with PA and reboot with the service enabled without changing the default configuration. |
This task depends upon
Closed by Ray Rashif (schivmeister)
Thursday, 30 October 2014, 18:35 GMT
Reason for closing: Implemented
Additional comments about closing: fluidsynth 1.1.6-4
Thursday, 30 October 2014, 18:35 GMT
Reason for closing: Implemented
Additional comments about closing: fluidsynth 1.1.6-4
For most other things fluidsynth picks pre-programmed defaults in the absence of configuration. Editing the configuration is supposed to be mandatory in order to supply the path to a soundfont, so any modification of parameters should be part of this first intervention.
Although I see no reason to dismiss your proposal as being too intrusive, there are alternative less-intrusive ways to go about this. I would prefer a better configuration file that makes parameters clear and prevents starting the service without manual intervention:
~~~{/etc/conf.d/fluidsynth}
# Mandatory parameters (please uncomment)
#SOUND_FONT=/path/to/a/soundfont
#AUDIO_DRIVER=pulseaudio # see 'fluidsynth -a help'
# Optional parameters (may be helpful)
#OTHER_OPTS='-m alsa_seq -r 48000' # man fluidsynth, please
~~~
Note that this in effect prevents fluidsynth from being started without configuration, hence also preventing it from grabbing the sound card unknowingly. Let me know what you think.
You can then simply replace the path with a quoted string including the -f parameter and the argument (file). Let me know if I didn't get you right.