Solved Sharing audio with other apps when using AudioEngine
#46
Hello,

I am using latest Ubuntu 12.10 with XBMC from stable ppa installed on an Intel Celeron G540/HDMI on TV. Audio works fine within XBMC, no problem with that. I used to launch several bash scripts of my own to run emulators back in the Eden times, with the help of "Advanced Launcher" and audio worked ok. But now, with Frodo I only have sound in XBMC and that's it, no sound if I launch my Advanced Launcher scripts anymore. I updated to the latest XBMC 12.1 without any success. I even reformatted a blank hard disk and reinstalled everything from scratch XBMC 12.1 on top Ubuntu 12.10. Sound is OK in HDMI but nothing in my emulators. Here is an example of script I made to run a game (I installed openbox and FS-UAE) :

Code:
#!/bin/bash
openbox & fs-uae --amiga_model=CD32 --cdrom_drive_0="Chaos Engine, The (1994)(Renegade)(M4)[!][CDD3445].zip" --fullscreen=1 --fullscreen_mode=fullscreen --scanlines=1
killall -9 openbox

No squeezeslave installed on my system though (not even available in the official XBMC or Ubuntu repos). Can anyone help me please ?
Reply
#47
You will need to either direct fs-uae to use the right alsa output device (assuming you are using alsa) OR set the default alsa device to hdmi. The second option is probably better as it will work with all programs that use he default device, rather than having to work out how to set each external program to use a different device.

This should be acheived by setting up a /etc/asound.conf which says something like:

Code:
pcm.!default {
    type hw
    card 1
        device 3
}

ctl.!default {
    type hw          
    card 1
         device 3
}

Where the number 1 and 3 depend on your overall system setup.

Both numbers are zero based, so the first sound card is zero, etc. Same with devices. Some clues can be gained from the output of aplay -l and aplay -L
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#48
I did it, but It didn't work until I disabled navigation sound (in system/audio) and then re-enabled it.

Thank you, it works ok now !
Reply
#49
THANK YOU SO MUCH! IT WORKSS!! thanks so much for your support!!!
Reply
#50
Just tried your solution, because I get no sound running spotify from the Advanced Launcher. As soon as I remove the asound.conf file again, playback appears to be starting in Spotify, albeit without sound.

Any suggestions?
Reply
#51
Make sure you get the right device. speaker-test is your friend.
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#52
I have the famous no sound in advanced launcher lanched applications Smile I've read quite a lot and tried many different solutions though.

One of them was the solution by nickr:
Adding ~/.asoundrc:
pcm.!default {
type hw
card 0
device 3
}

ctl.!default {
type hw
card 0
device 3
}


Card 0, dev 3 should be right because speaker-test -D hdmi:CARD=NVidia,DEV=3 -c 6 works fine. And I only have one card (0). Please note that speaker-test -D hw:0,3 -c 6 doesn't produce any sound.
aplay -D hw:0,3 wavfile.wav doesn't work either. It's finding the device. But no sound.
Also when I start Spotify the playing bar moves, but no sound is heard. If I change device in .asoundrc (to something other than 3) playback doesn't start at all and the playing bar does not move. So I'm quite certain I have the correct card/device. Sound doesn't work in Firefox or Chromium either. No spdif devices are muted in alsamixer.

I've also tried to toggle the setting in advanced launcher to stop or let play the xbmc sound. I'm also of course using the correct system/sound settings i xbmc (I've tried both hdmi and analogue here), and also with or without navigation sounds. All sound works fine in xbmc otherwise.

I'm using XBMCbuntu 12.2.
Any advice on how to continue?

------

Update

I had to enable my second on board sound card and sent PCM through the spdif to get it to work.
Reply

Logout Mark Read Team Forum Stats Members Help
Sharing audio with other apps when using AudioEngine0