Kodi Community Forum

Full Version: HDMI, Mednafen: Sound, but not in XBMC
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
So when I'm in XBMC, I get sounds in the menus and in videos. I do NOT get sound in mednafen (I'm using Adv Launcher). For what its worth, I'm not getting sound in *any* emulator when I'm in XBMC, but I've only played with mednafen because I'm most comfortable with it.

Seems weird that it works no problem when I launch outside of XBMC, but kick it off in XBMC and I got nothin. Any ideas?


Architecture: i686

XBMC 12.0 Git:fb595f2

Audio Output Device: HDA Intel PCH… on HDMI
Passthrough output device: HDA Intel PCH… on HDMI

Aplay –l

**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC662 rev1 Analog [ALC662 rev1 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 1: ALC662 rev1 Digital [ALC662 rev1 Digital]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0

Mednafen CFG:

;Select sound output device.
sound.device sexyal-literal-default

;Select sound driver.
sound.driver alsa

Asounddrc:

pcm.dmixer {
type dmix
ipc_key 1024
ipc_key_add_uid false
ipc_perm 0660
slave {
pcm "hw:0,3"
rate 48000
channels 2
format S32_LE
period_time 0
period_size 1024
buffer_time 0
buffer_size 4096
}
}

pcm.!default {
type plug
slave.pcm "dmixer"
}
You're not the only one who has run into this. A few other people have posted similar threads detailing the same problem. It seems that XBMC + audioengine basically hogs the audio output and prevents other apps from outputting audio while XBMC is running. I actually downgraded my machine back to Eden because I couldn't get emulators to play sound.

See the following thread

http://forum.xbmc.org/showthread.php?tid=152866
try the latest git builds, I think this may have been fixed - audio is still a work in progress.
http://forum.xbmc.org/showthread.php?tid=137360&page=3

I solved the issue with this asound.

Also this thread helped with other issues.
http://forum.xbmc.org/showthread.php?tid=139102
If you are using pulseaudio, tihs one may also interest you : http://www.gwenael.org/forum/viewtopic.php?id=460
Hmmm, tried to install the nightly build and got an error... but then I did some reading about what asoundrc really means, and I've half solved my problem.

I hadn't ever gone back into xbmc and changed my audio output device to match the one I had made in asoundrc... and when I did, I got sound.

However, it runs crazy slow. Its clearly something to do with the audio, because outside of XBMC things run smoothly. I tried the asound.conf info in one of the posts above and it just made it worse.... any suggestions now? Is there some change i can make to my asoundrc to fix this?
I got it working! Here's what I did:

1. Removed xbmc from XBMCbuntu
2. Added the nightly respository
3. Did a dist-upgrade
4. Installed xbmc from the nightly respository
5. Disabled GUI sounds.

First I tried to install xbmc from the nightly respository but I got a bunch of apt errors. Doing a dist-upgrade and trying again resolved this.

It appears that after 10 seconds of no audio in xbmc, the sound device is released, which is a fix not present in the stable build. This required me turning off the GUI sounds but I can live with that. Mednafen and other sounds work perfectly.

Note that I did have to specify the default pcm device in .asoundrc since hdmi is device 3 on card 0 for me, but I always had to do this anyways before since I have a revo 3610.
interesting, I will give this a whirl and update
Got it! Followed a path similar to you

1. uninstall XBMC
2. install from nightly build - still got my initial error until I unmarked all the PVR stuff in Synaptic that was trying to install at the same time
3. I ditched the alsa config stuff and just set XBMC to use HDMI for sound (since that worked in the first place anyway) and then I setup my emulators to use my specific hdmi (hw:0,3)
4. I also turned off menu sounds

Now I've got XBMC working and playing sounds, and when I launch an emulator (Mednafen, Kega Fusion, Mupen64plus) via advanced laucher, the play back is smooth, i've got sound, and when I close out they go right back into XBMC.