0

I have a raspberry with 1 USB connected to a USB Soundcard 5.1. The USB soundcard is set as default, and I can play a sound from terminal using MPlayer:

mplayer --channels=6 soundTest.aif

It can be executed in background with this command (not very sure of what it does, a normal & at the end doesnt work):

mplayer --channels=6 soundTest.aif < /dev/null >/dev/null 2>&1 &

If I try to execute this command in two different terminal screens at the same time, the second one doesnt play and basically I have this explanation:

failed (-16): Device or resource busy

How can I play 2 sounds at the same time?

EDIT: Seems to work when using the Raspberry headphones jack

  • It looks like the mixer in your sound card doesn't have 12 channels available. Can you post your mplayer.conf? – Dmitry Grigoryev Dec 21 '16 at 16:42
  • Damn... 12 channels? Isnt it a little overkill? Anyway, the config file of path home/py/.mplayer/config is empty (it only says "add your config here") – pfernandez Dec 21 '16 at 21:01
1
omxplayer -o alsa ring.wav

Omxplayer is able to play several surround files at the same time with the USB SoundCard (using different terminal windows). It only needs to have the USB Soundcard selected as default in usr/share/alsa/alsa.conf

This last thing in my case is:

defaults.ctl.card 1
defaults.pcm.card 1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.