[linux-audio-dev] timidity++ patch to become alsaseq daemon

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: [linux-audio-dev] timidity++ patch to become alsaseq daemon
From: Likai Liu (news_AT_likai.net)
Date: Sat Aug 24 2002 - 20:35:29 EEST


I made some modification to timidity++ but I don't understand the
instructions to signup on their mailing list (which is in Japanese), so
I thought I should probably post here instead and hope this is useful
for some people.

This patch adds an interface option "-iAD" for current alsa sequencer
support added by Takashi Iwai, such that when everything is ready, a
child process is forked to handle sequencer events. The parent writes
the pid of the child process to /var/run/timidity.pid (if the user has
sufficient permission), and then exits with appropriate status
indicating success or failure. This feature is meant to prepare for use
in an initscript for timidity++, so not everything is pretty. Forking
works, but no attempt is made to disconnect standard output.

The purpose of doing this is that I could prepare a TiMidity++ package
(rpm or otherwise) that lets timidity start at boot time and become a
softsynth daemon that responds to alsa sequencer clients. Distributions
that decide to use alsa for all its audio applications can ship with
daemonizable timidity and provide its users convenient access to
TiMidity++ without bothering with command line arguments. This is a step
towards making timidity "just works".

I'll explain how I applied this patch:

On top of stock TiMidity++ 2.11.3, first apply Takashi Iwai's alsa9
patch from
<http://www.alsa-project.org/~iwai/timidity-2.11.2-alsa9.dif.gz>, and
then apply this patch (attached in this e-mail).

Note that I have not been running TiMidity++ daemon for more than 4
hours, so I don't know if memory leaks or other bugs would kick in for
extended amount of time. If timidity starts hogging up huge amounts of
memory after a long run, I should probably think of other ways (like
redoing the fork after however many connections like httpd does).

Alas, this marks my first contribution of coding effort to the linux
audio community.

Likai Liu


timidity-alsad.patch


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Sun Aug 25 2002 - 06:47:04 EEST