You are not logged in.
Hi, thanks for reading...
I've recently installed tux guitar and have been trying to use it together with an audio player (vlc player). However I am only able to get one of these applications generating sound at any one time.
If I load up a tab file and play it (using midi) from tuxguitar I find I am no longer able to play audio files in vlc player or rhythmbox.
After quiting tux guitar I can play audio again. But I can never get them both to work at the same time. (Really I just want to switch between applications without having to quit one to use the other.)
Any advice on how to start debugging this would be greately appreciated.
Last edited by drandre (2010-01-04 21:32:48)
Offline
Nobody got any clues?
I had thought that ALSA/Dmix would have let this happen.
Offline
You're probably playing audio through ALSA's emulation of OSS, which means that dmix won't work. You need to output to *ALSA*.
Offline
You're probably playing audio through ALSA's emulation of OSS, which means that dmix won't work. You need to output to *ALSA*.
I just tested it out myself. First, I experienced the same problem that you did. Mplayer wasn't able to play any audio because is said the sound device was locked or in use or something silly. In Tux Guitar, I disabled the JACK and OSS plugins (and a lot of other plugins) and changed the sound settings to "TuxGuitar Sequencer" and MIDI Port "TiMidity port 0 [128:0]. (I have timidity setup as my MIDI "hardware", like it is described in the Arch wiki) After that (and rebooting), I was able to play a TAB file and an MP3 in mplayer at the same time.
Let me know if you have any questions about what I did.
DISCLAIMER: This was a simple test. I don't use (or know how to use) Tux Guitar.
Offline
Thanks drcouzelis, I was trying to get timidity going when I made this post. It doesn't work for me and I'm not sure why:
sudo /etc/rc.d/timidity++ start
:: Starting Timidity++ ALSA Daemon [BUSY] Couldn't open output device
[FAIL]
timidity /home/andrew/arch/Downloads/teddybear.mid
Couldn't open output device
I don't believe this is a permissions issue. It's good to know it works for you at least. I have fairly basic audio hardware though (laptop integrated intel). I hope that isn't a stopper.
Offline
Well, just focus on getting Timidity to play, using the "timidity song.mid" command. If you can get that to work, then the daemon should work just fine.
I'm surprised the error message doesn't say which output device it can't open. These kinds of problem are usually fixed for me simply by rebooting. I wish I could figure out how to "unlock" a "locked" audio device by using the command line. Maybe someone else can enlighten me.
If a reboot doesn't work, you try to narrow down your problem by selecting a Timidity output device.
timidity -Os # ALSA output
timidity -Od # DSP output, probably emulated by ALSA
Offline
I wish I could figure out how to "unlock" a "locked" audio device by using the command line.
Can't. Because ALSA's emulation of OSS bypasses dmix.
The obvious solution here, that's been the same for many years, is to *stop* using OSS. Output to ALSA, rather than /dev/dsp.
Offline
Yeah... although I'd not suggest that this solution is "obvious". So many programs contain different backends which in turn use different low level interfaces. It is anything but obvious :-(
timidity outputs via the audio device by default, this doesn work for me (/dev/dsp: Device or resource busy).
Nor does ALSA (ALSA lib pcm_dmix.c:1010:(snd_pcm_dmix_open) unable to open slave). But now it gets truly evil: specifying output to ARTS produces no error message and no sound - just like tux guitar (right at this moment).
FWIW I'm running KDE 4.3.4 from the chakra project. In my KDE settings I'm using the Xine backend. No idea what Xine is using however... I expect alsa but I'm not sure how to find out. I notice some entries in the system logs from pulseaudio... but its disabled in my rc.conf :-! Deleting reference to pulseaudio; Rebooting...
Hey - timidity is now working with alsa and now I can use vlc player and tux guitar together. But I have no sound from rhythmbox :-(
Last edited by drandre (2010-01-04 11:40:05)
Offline
Take a look:
fuser -v /dev/snd/* /dev/dsp*
Distros are pretty stupid in not patching programs like timidity to use ALSA by *default*. Taking a look at Fedora, its timidity contains TiMidity++-2.13.2-libao-first.patch, which defaults to pulseaudio. Ho hum, they get half a point for trying, although pulseaudio should have been thrown out of the distro
Offline
fuser -v /dev/snd/* /dev/dsp*
USER PID ACCESS COMMAND
/dev/snd/controlC0: andrew 2238 F.... pulseaudio
andrew 12344 F.... kmix
/dev/snd/pcmC0D0p: andrew 12295 F...m knotify4
/dev/snd/timer: andrew 12295 f.... knotify4
I just have no idea where pulseaudio is coming from; if I try and restart it, the restart fails.
Offline
Solution... for whatever reason, the gnome music players were using "autoaudiosink" for their sound output. For whatever reason, auto is not working for me (possibly because I installed pulseaudio but didn't bother to follow any wiki configuration instructions because it seemed to be working automagically).
To add to the confution, the gnome music players do not use the gnome "audiosink" property so even setting the default audiosink to alsa using gstramer-properties does nothing to help. To force the gnome music players to use alsa you need to use:
gconftool-2 -t string --set /system/gstreamer/0.10/default/musicaudiosink alsasink
as documented indirectly in the related wiki page http://wiki.archlinux.org/index.php/Pul … PulseAudio
No need for restarts, everything plays nicely together now. The only question that remains in my mind is why pulseaudio exists. Any
Offline
It exists because you've installed it. Automagically is not a nice word in Arch
Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.
Offline
Hah... yes arch can be hard work :-)
BTW I meant exists as in "the big why"... It was "installed" because I installed it ;-)
I did find this page today (http://0pointer.de/blog/projects/guide- … -apis.html) which goes some of the way
Offline
Well, the answer is simple, like any other open-source project, it exists because:-
a) Someone was willing to write it and maintain it
b) Many someones saw the need and used it
There's also a (c) - Someone was willing to pay for it.
Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.
Offline
Sigh... maybe I can put it this way: I don't understand the need; I uninstalled it; everything still works (or works better).
Please don't give me OSS 101s I've been using linux for over 20 years now.
Thanks everyone for the help solving this one. Now I can get on with some tabbing.
Offline
Fair enough, it's your system. I'm surprised someone who's been using linux for 20 years is still surprised that things change all the time thuogh . Have fun tabbing!
Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.
Offline