Simultaneous access to audio devices: How Is It Done?

Hi! I am wondering how I can use two audio sources simultaneously in openSUSE 12.1. I want to have a simple cron job to play a .wav every hour that works even when I listen to Amarok or YouTube. So far I Implemented the following

# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (/tmp/crontab.E2uxZY installed on Thu Mar 29 18:31:31 2012)
# (Cronie version 4.2)
0-59 * * * * aplay /home/pascal/.cuckoo/ding.wav
pascalinux:~/.cuckoo:#

not
The above rings a bell every minute for as long as I am not using Amarok. I found out that even pavucontrol interferes too, even though it doesn’t produce any audio output. I recently, minutes ago, found out about a utility called paprefs which can set an option for simultaneous output. I checked it and then used aplay instead of play.

That didn’t change anything. Still the same problem. What am I doing wrong?

  • pascal

I just found out that cron starts with a minimal environment so I have to use

pascalinux:~/.cuckoo:#  cat ding.sh
ALSA_CONFIG_PATH=/etc/alsa-pulse.conf SDL_AUDIODRIVER=pulse aplay /home/pascal/.cuckoo/DING.wav
pascalinux:~/.cuckoo:# 

Now it works like a charm!

  • pascal