You are not logged in.
Pages: 1
Hello, everyone!
I'm trying to make alsa work in threaded mode, i.e. allow more than one application to produce sounds.
All I've done so far is made /etc/asound.conf
As you can see from this config I use dmix to mix different sound threads
#/etc/asound.conf start:
pcm.!default {
type plug
slave.pcm "dmixer"
}
pcm.dsp0 {
type plug
slave.pcm "dmixer"
}
pcm.dmixer {
type dmix
ipc_key 1024
slave {
pcm "hw:0,0"
period_time 0
period_size 2048
buffer_size 32768
rate 48000 #many new cards are 48000 only
}
bindings {
0 0
1 1
}
}
ctl.dmixer {
type hw
card 0
}
#end.
So I use dmixer as a default mixer. Now I can get reasonably good sound in xmms/audacious+firefox+mplayer/xine.
Without this config alsa worked only for one application at a time.
The only issue I have with alsa is sometimes noise from for example bass,i.e. low frequencies. But sometimes noise limited to very short time intervals appears out of nowhere. It's very annoying. SDL or oss don't produce such noise but they want full access to /dev/dsp and the whole point of threaded sound is violated.
Any critical input about or useful thoughts on reducing sound noise are appreciated.
ps I have old audio card CMedia with 2.1 support.
Last edited by corrupt (2008-04-14 17:40:32)
Offline
SDL will use ALSA if told - put this in ~/.bashrc
# http://www.libsdl.org/cgi/docwiki.cgi/SDL_5fenvvars
# http://www.libsdl.org/faq.php?action=listentries&category=3
export SDL_AUDIODRIVER=alsa
For the "chirping", all I can suggest is to experiment with different values for period_size and buffer_size.
Offline
Pages: 1