I'd definitly make a wiki entry out of this. There's gotta be more people who disabled the artsd for some reason and live with the fact of not having any sounds, this is a simple quick solution..
]]>My .asoundrc was ok. It was aplay that I wasn't aware of it couldn't handle .ogg files, it tried to play it anyway and that's why I got garbled sound output *headdesk*
I installed alsaplayer, after running it once I edited .alsaplayer/config to use the "text" user interface by default. Setting alsaplayer as external player for knotify seems to work.
However, knotify won't let me play sounds in quick succession, so I lose a knotify sound every now and then.
]]>I finally got convinced to switch of arts for kde. Amarok runs much better now but I face a problem with knotify/aplay.
With arts not active knotify won't play sounds anymore. knotify is the program responsible for kde's bells and whistles, like playing a sound when you open or close a window etc.
knotify specifies an option for an external player, which I think is the thing to use in case you don't use arts.
I configured that option to use aplay, the sound replay program provided by alsa. However, that has problems. Many kde sounds come with 8khz sample frequency. If I play one of these sounds with aplay their playback frequency is much to low and the sound is heavily distorted. It seems the downmixing does not work.
If I use aplay -Ddmix or -Dduplex I get following error:
Playing raw data 'KDE_Beep.ogg' : Unsigned 8 bit, Rate 8000 Hz, Mono
aplay: set_params:857: Sample format non available
I think that may have something to do with my .asoundrc or maybe there is another program to use for sound playback I don't know about. Also, I could be that knotify IS supposed to play the sounds even without arts running and something else is wrong.
Here is my .asoundrc, any advice is welcome:
# Set default sound card
# Useful so that all settings can be changed to a different card here.
pcm.snd_card {
type hw
card 0
}
# Allow mixing of multiple output streams to this device
pcm.dmix {
type dmix
ipc_key 1024
slave.pcm "snd_card"
slave {
# This stuff provides some fixes for latency issues.
# buffer_size should be set for your audio chipset.
period_time 0
period_size 1024
buffer_size 16384
}
bindings {
0 0
1 1
}
}
# Allow reading from the default device.
# Also known as record or capture.
pcm.dsnoop {
type dsnoop
ipc_key 2048
slave.pcm "snd_card"
bindings {
0 0
1 1
}
}
# This is what we want as our default device
# a fully duplex (read/write) audio device.
pcm.duplex {
type asym
playback.pcm "dmix"
capture.pcm "dsnoop"
}
###################
# CONVERSION PLUG #
###################
# Setting the default pcm device allows the conversion
# rate to be selected on the fly.
# duplex mode allows any alsa enabled app to read/write
# to the dmix plug (Fixes a problem with wine).
pcm.!default {
type plug
slave.pcm "duplex"
}
# Apparently this is wrong (breaks mplayer for me opening the device)
#ctl.!default {
# type plug
# slave.pcm "snd_card"
#}
########
# AOSS #
########
# OSS dsp0 device
pcm.dsp0 {
type plug
slave.pcm "duplex"
}
# OSS control for dsp0 (needed?...this might not be useful)
ctl.dsp0 {
type plug
slave.pcm "snd_card"
}
# OSS control for dsp0 (default old OSS is mixer0)
ctl.mixer0 {
type plug
slave.pcm "snd_card"
}
Cheers,
Dominik