Suspend XBMC / Run Script from remote
#1
2 Part Question:

I am trying to get Skype for Linux working with my XBMCbuntu install - XBMC version is from xvba-testing ppa.

Here is what I have :

Terminal open in Background with irexec running with a .lircrc file listening for a specific remote button.
When button is pressed, a script runs that kills XBMC and irexec, relaunches irexec with a different file (.lircrc1) and launches Skype.
.lircrc1 is now listening for the same remote button, but will now run a different script.
When the button is pressed, the script kills irexec and Skype, relaunches irexec with original .lircrc file, and relaunches XBMC.

This works.. but it's not very clean. So, here are the 2 questions.

1- Can I launch a bash script from within the XBMC keymaps... I've looked at the WIKI, but could not find a definitive answer (Sorry if I missed something obvious).

2- I am not a fan of 'Killing' XBMC, I would rather suspend the process. When I try 'killall -STOP xbmc.bin', XBMC suspends properly, Skype will open, but I have no audio (PC is connected to TV through HDMI). Is there a way I can get XBMC to suspend and release the audio?

Thanks in advance for the help, I am open to any suggestions that would help clean this process up.
Reply
#2
ad 1.) easiest is probably using the advanced launcher addon.
ad 2.) xbmc will release the audio device after 10 secs idle(note: gui sounds are audio)
Addons can also release the audio device and iirc advanced launcher does this, so there is no need to stop or suspend xbmc.
Reply
#3
(2013-08-28, 21:52)wsnipex Wrote: ad 1.) easiest is probably using the advanced launcher addon.
ad 2.) xbmc will release the audio device after 10 secs idle(note: gui sounds are audio)
Addons can also release the audio device and iirc advanced launcher does this, so there is no need to stop or suspend xbmc.

Issue with Advanced Launcher is it's not working in Gotham (at least with the xvba branch... I did have it work in Windows).

Until I can get AL to work... your saying I can suspend/stop XBMC, pause the script for about 15 seconds, and then open Skype? That should at least be a bit cleaner.
Reply
#4
alternative: map a button to System.Exec(skype)

and you don't need to suspend xbmc, just wait 10 secs and the audio device will be freed - if you are not using streamsilence
Reply
#5
(2013-08-29, 09:49)wsnipex Wrote: and you don't need to suspend xbmc, just wait 10 secs and the audio device will be freed - if you are not using streamsilence

This is not working, with or without Advanced Launcher.

I tried AL again the other night, and an update in the Add-on or XBMC must have resolved the issue I was having launching AL. I set it up so that it would launch a script to start skype, without suspending or killing XBMC, and I still had no audio in Skype. I even tried putting in a delay so the script would pause for 30 seconds before opening skype, but that did not help.

So, I then tried to suspend XBMC.bin within the script.... still no audio. Once I kill XBMC.bin within the script, the audio functions fine.

Any other ideas? Do I need anything special, such as a special asound.conf file? I am not too sure how deep your willing to dive into this, but could you try a reproduce it on your side? I am just using XBMCbuntu, XVBA-testing, and Skype. Connection from HTPC to TV is HDMI, no other components between. The skin is Bello... which does not use Navigation Sounds.

The one thing I do not think I checked for is the StreamSilence.... I would not have enabled that, is it enabled by default?
Reply
#6
debug log will show if the audio device is unhogged or not. if you have streamsilence active, it wont.
Reply
#7
Thank you, Thank you, Thank you!

I had the option to stream silence enabled. Disabling that freed up the audio (I did leave a 'sleep 20' in the script to make sure it has enough time to release), and now Skype works great.

This will make the wife and child quite happy!


Obviously, this is a new feature, and so it has a purpose.... but what is that purpose? Is there a negative to having it off?

{edit} Nevermind - I found it

"Forces original AE behaviour where an audio signal is constantly streamed to the audio device, even if silent. If 1 or true, this prevents some receivers from losing the signal/source, and prevents sinks re-opening and possible receiver switching with each new stream after any silence. If 0 or false, enables Eden-style releasing of the audio device so external players, programs and the system can access the audio device, i.e. prevents XBMC from hogging the audio device."


Thanks again!
Reply
#8
good you got it working. Afaik AL should suspend the audio device for you, so there should be no need to sleep, but I didn't test this myself.
If you use your own script, 11 secs should be enough Wink
Reply

Logout Mark Read Team Forum Stats Members Help
Suspend XBMC / Run Script from remote0