Timidity++ and Pulse Audio

Timidity++ and Pulse Audio

Postby ZombieRyushu » Aug 19th, '14, 15:30

Upon upgrading to Mageia 4, Timidity starts up too early due to the multi-seat setup in Pulse Audio to be started as a Service. Under Mageia 3, Pulse Audio had its own systemd definition file, and Timidity could be instructed to start after that. But with Mageia 4, Timidity starts too early, and locks the sound card, Pulse Audio fails to start correctly as a result. How can I configure Timidity to start upon user login or later so Pulse Audio has plenty of time to be in place?
ZombieRyushu
 
Posts: 17
Joined: Jul 26th, '11, 21:06

Re: Timidity++ and Pulse Audio

Postby doktor5000 » Aug 19th, '14, 20:05

What desktop environment do you use? E.g. in KDE you can define certain conditions when an application/script should be started.

Otherwise you can easily write a shell script, that checks as your user if pulseaudio --check and pactl stat come back with return code of 0 or if /run/user/$(id -u)/pulse is writable to your user.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 17659
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Timidity++ and Pulse Audio

Postby ZombieRyushu » Aug 20th, '14, 08:36

KDE, but Timidity is a sysvinit script conmtrolled by the timidity-init package. it starts timidity as a Daemon. Under Mageia 3, Pulse Audio had a system service that could be required.
ZombieRyushu
 
Posts: 17
Joined: Jul 26th, '11, 21:06

Re: Timidity++ and Pulse Audio

Postby doktor5000 » Aug 20th, '14, 21:46

Well, then adapt the initscript. What timidity package do you use? The one from the Mageia repos doesn't contain any init script:

Code: Select all
[doktor5000@Mageia4 ~]$ urpmq -l TiMidity++
/etc/timidity
/etc/timidity/timidity-custom.cfg
/usr/bin/timidity
/usr/lib/timidity
/usr/lib/timidity/if_gtk.so
/usr/lib/timidity/if_ncurses.so
/usr/share/applications/TiMidity++.desktop
/usr/share/doc/TiMidity++
/usr/share/doc/TiMidity++/AUTHORS
/usr/share/doc/TiMidity++/ChangeLog
/usr/share/doc/TiMidity++/FAQ
/usr/share/doc/TiMidity++/INSTALL
/usr/share/doc/TiMidity++/NEWS
/usr/share/doc/TiMidity++/README
/usr/share/doc/TiMidity++/README.alsaseq
/usr/share/doc/TiMidity++/README.dl
/usr/share/doc/TiMidity++/README.m2m
/usr/share/doc/TiMidity++/README.mts
/usr/share/doc/TiMidity++/README.sf
/usr/share/icons/hicolor/48x48/apps/TiMidity++.png
/usr/share/man/ja/man1/timidity.1.xz
/usr/share/man/ja/man1/timidity.cfg.5.xz
/usr/share/man/man1/timidity.1.xz
/usr/share/man/man5/timidity.cfg.5.xz
/usr/share/timidity
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 17659
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Timidity++ and Pulse Audio

Postby ZombieRyushu » Aug 21st, '14, 02:30

It was a port of a noarch Mandriva script, The fact is I just need Timidity to start at the right time.
ZombieRyushu
 
Posts: 17
Joined: Jul 26th, '11, 21:06

Re: Timidity++ and Pulse Audio

Postby doktor5000 » Aug 21st, '14, 19:46

Then write a proper systemd unit for it to get the dependencies correct. Check e.g. https://wiki.archlinux.org/index.php/timidity#Daemon
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 17659
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Timidity++ and Pulse Audio

Postby ZombieRyushu » Aug 22nd, '14, 04:59

What systemd ddependency should I link this against?
ZombieRyushu
 
Posts: 17
Joined: Jul 26th, '11, 21:06

Re: Timidity++ and Pulse Audio

Postby doktor5000 » Aug 22nd, '14, 06:53

Well the latest that starts on your box - so probably multi-user.target
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 17659
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Timidity++ and Pulse Audio

Postby ZombieRyushu » Aug 25th, '14, 17:44

Getting closer: After I log in, I can start timidity -iA and get Midi. But this doesn't Daemonize. Any suggestions?
ZombieRyushu
 
Posts: 17
Joined: Jul 26th, '11, 21:06

Re: Timidity++ and Pulse Audio

Postby doktor5000 » Aug 25th, '14, 20:11

Use the the systemd user unit as pointed out above. Or run it via nohup. Or ask in TiMidity++ mailing lists.

Apart from that, you're missing details how you're starting it exactly. Via script during login, interactively via terminal, ... ?
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 17659
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany


Return to Sound

Who is online

Users browsing this forum: No registered users and 1 guest