Fedora notes

Thursday, January 27, 2005

Who said ASLA CAN'T mix sounds?

Sound Mixing with ALSA - FedoraNEWS.ORG

Edit the file ~/.asoundrc so that it contains something like this:

pcm.!default {
type plug
slave.pcm "swmixer"
}

pcm.swmixer {
type dmix
ipc_key 1234
slave {
pcm "hw:0,0"
period_time 0
period_size 1024
buffer_size 4096
rate 44100
}
}

We have just created two multichannel-enabled devices default and swmixer. Now, all we have to do is configure apps to use ALSA and to use swmixer as the audio device. In order to test the newly created mixing device, you could try:

aplay -Dplug:swmixer soundfile

If this works, try in several terminals concurrently.

XMMS:
1. open configuration dialog (CTRL+P)
2. choose "ALSA x.x.x output plugin [libALSA.so]"
3. press "Configure" button for advanced configuration
4. check the "user defined" toggle
5. replace whatever is on the textbox for your new device swmixer (leave other settings untouched)

gaim:
On gaim's preferences dialog, go to Sounds section, and choose Command on the Sound method setting. Then, on the Sound command textbox, enter:

aplay -Dplug:swmixer %s

Now gaim won't hang anymore whenever it plays a sound.

0 Comments:

Post a Comment

<< Home