Different Audio outs for Music and Movies

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
Nephylim Offline
Junior Member
Posts: 4
Joined: Mar 2013
Reputation: 0
Post: #1
Hi there,

I was wondering if there is a possibility to define different audio outputs for Music Files and Movies.

The Background being, that I use different Hi-Fi Systems for my Home Cinema and my Music System in the Living room.

The Sound for the Home Cinema should be handled via HDMI.The Sound to the Stereo Systems goes through a USB DAC.

THX for your help
find quote
axlt2002 Offline
Member
Posts: 81
Joined: Jun 2014
Reputation: 0
Post: #2
Ciao Nephylim! Wink

There is no way to have such feature as it is in the XBMC official release (please take a look to this post that I initiated some times ago http://forum.xbmc.org/showthread.php?tid=197409...maybe you have some nostalgia of MediaPortal?).

Anyway two way forward for this issue:

- Dual Audio patch (http://forum.xbmc.org/showthread.php?tid=192480): this activates two different output devices at the same time;

- Audio Switch (http://forum.xbmc.org/showthread.php?tid=199579): it provides a script (that you can run for example when opening a specific menu in the home page) to configure the audio device (and related parameters) you would like to use.

Personally I use the second one that to me seems a more clean way to proceed! Wink

Buona giornata,

Alex (from HTPC Italia)
(This post was last modified: 2014-07-24 14:19 by axlt2002.)
find quote
marv_el Offline
Senior Member
Posts: 151
Joined: Aug 2009
Reputation: 2
Post: #3
Maybe i can help you out in a few days...

I wrote a Service Addon which automatically switches audio output when playing Music or Movies. The setup can be done within xbmc, so no fiddling with log files or code manipulation is required.
it works so far but i am still testing and try to optimize the code (i am a beginner in coding python...).

Due to work and family i haven't got much time, but i think i can release it soon, at least for testing purposes.

cya
find quote
axlt2002 Offline
Member
Posts: 81
Joined: Jun 2014
Reputation: 0
Post: #4
(2014-07-24 16:09)marv_el Wrote:  Maybe i can help you out in a few days...

I wrote a Service Addon which automatically switches audio output when playing Music or Movies. The setup can be done within xbmc, so no fiddling with log files or code manipulation is required.
it works so far but i am still testing and try to optimize the code (i am a beginner in coding python...).

Due to work and family i haven't got much time, but i think i can release it soon, at least for testing purposes.

cya

Please consider me in the list for testing! Wink

Thanks in advance for your work!
find quote
marv_el Offline
Senior Member
Posts: 151
Joined: Aug 2009
Reputation: 2
Post: #5
ok, download the zip from here and install it:
https://www.dropbox.com/s/pwc2bfz7konilx...switch.zip

1) go to the addon settings and enable "run audio device settings" - click OK.
2) configure your desired audio setting in the xbmc settings
3) play a music file (you will be notified that the device was saved)
4) do the same point 2) and 3) for videos
5) that's it. from now on the service addon should switch devices automatically.

additionally you can go to the addon settings and change passthrough and the amount of channels.
you even can chose the audio output for the gui.

please be aware that it is an early version. feel free to test it.
find quote
axlt2002 Offline
Member
Posts: 81
Joined: Jun 2014
Reputation: 0
Post: #6
Hi marv_el!

I have just saw your post...I will make some trials and let you know!

Cheers!
find quote
axlt2002 Offline
Member
Posts: 81
Joined: Jun 2014
Reputation: 0
Post: #7
Here I Am!

So, I have tested it on my notebook and it seems to work great!

Just to let you know: for movies I have configured the speakers while for music the speakers with WASAPI and...it works!

One question: in case I would like to uninstall the add-on, how the audio configuration will be restored? In other words, which audio device will be used for both video and music?

Lets syncro!
find quote
marv_el Offline
Senior Member
Posts: 151
Joined: Aug 2009
Reputation: 2
Post: #8
glad, its working...

if you deactivate the addon, the last audio setting will be used. after activating the addon again, it should work as expected.
in case you uninstall the addon you have to do the setup again after re-install it. i have saved the configuration files within the addon instead of the addon_data directory. i will change that in the next release, so the audio config files won't be deleted, even if you uninstall the addon (afaik).

i will add a "swap device" script, which can be bound to a key. so you can change the audio output manually as well. i need this for myself, in case i want to watch MUSICVIDEOS using the "MUSIC" device instead of the VIDEO device.

so long
find quote
axlt2002 Offline
Member
Posts: 81
Joined: Jun 2014
Reputation: 0
Post: #9
Many thanks for your work!

What is "sad" is that it seems that there is no much interest on this topic from the community...having said this, please let me know if I have to do something to support you for an embedded and official feature of XBMC!

As a first step to gain more visibility, I would suggest to open an ad-hoc topic in the XBMC development section...what do you think?
find quote
marv_el Offline
Senior Member
Posts: 151
Joined: Aug 2009
Reputation: 2
Post: #10
i will open a thread as soon as i am ready for an official release - maybe this weekend!
i appreciate your support, thanks!
find quote
marv_el Offline
Senior Member
Posts: 151
Joined: Aug 2009
Reputation: 2
Post: #11
axlt2002:
i have added a possibility to switch the audio device manually.
could you please try it out?!

please uninstall(!) the previous version, because i made changes regarding the location of the audio configs. you need to run the setup again after installing the new version from here:
https://www.dropbox.com/s/17906u0bq5ekyv....0.1.0.zip

please bind a key to XBMC.RunScript(special://home/addons/script.audioswitch/manualswitch.py to switch manually as well.

which OS do you use btw.?

thanks for helping out!
find quote
axlt2002 Offline
Member
Posts: 81
Joined: Jun 2014
Reputation: 0
Post: #12
Hi marv_el!

Nice to hear you! ;-) Sorry but I was out for a small-long weekend and now waiting for the long vacations!

So, I've just seen that you made some good progress...I will try to test it as soon as possible as usual and let you know!

So...stay tuned!

Btw, the machine on which I have tired your addon is running Windows 7. At home I hacve a couple with 8.1, but actually I have not so much time to try it also there...

Honoured to help you!
find quote
sysyphus Offline
Junior Member
Posts: 6
Joined: May 2014
Reputation: 0
Post: #13
Hello,

Thank you for your works, I wait for this since a long long time...
So thank you very much.

I will try this ASAP.

Have you release your works ?
find quote
marv_el Offline
Senior Member
Posts: 151
Joined: Aug 2009
Reputation: 2
Post: #14
yeah, sorry, here's the link to the released version:
http://forum.xbmc.org/showthread.php?tid=201896
find quote