Kodi Community Forum
Release Audio Profiles - Easy switch between different audio settings - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27)
+---- Forum: Program Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=151)
+---- Thread: Release Audio Profiles - Easy switch between different audio settings (/showthread.php?tid=200081)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25


RE: Audio Profiles switcher - Regss - 2015-08-27

Edit or create file keyboard.xml in userdata/keymaps/ and past this code:

Code:
<keymap>
  <global>
    <keyboard>
      <t>RunScript(script.audio.profiles,1)</t>
      <a>RunScript(script.audio.profiles,2)</a>
    </keyboard>
  </global>
</keymap>



RE: Audio Profiles switcher - sjw1 - 2015-08-27

Perfect, many thanks!


RE: Audio Profiles switcher - Roby77 - 2015-08-27

(2015-08-27, 13:24)Regss Wrote: Step 1
Go to Programs -> Audio profile -> not run it but choose from context menu -> Configure Add-on
Enable two profiles and add it names that you want

Step 2
Go to System -> Audio settings
Set settings for first profile for example TV by the analog output 2.0
Go to Programs -> Audio profile -> run it
Save settings as first profile

Step 3
Repeat Step 2 and set settings for digital like SPDIF or HDMI and save as second profile

Step 4
Now. You can switch between profiles using key map. I suggest to test it on keyboard keymap.

May you add it in first page ? Cool

I tested on 16 alpha 2 (windows) and it works Cool

Thank you again for this addon


RE: Audio Profiles switcher - Regss - 2015-08-27

Added and cleaned first post.

Instruction to add button in player OSD (confluence skin):

Image

Edit file KODI/addons/skin.confluence/720p/VideoOSD.xml
Best backup this file to safe place.

Replace line:
Code:
<control type="button" id="255">
to:
Code:
<control type="togglebutton" id="299">
    <left>-55</left>
    <top>0</top>
    <width>55</width>
    <height>55</height>
    <label>Audio Profiles</label>
    <font>-</font>
    <texturefocus>OSDAudioProfilesFO.png</texturefocus>
    <texturenofocus>OSDAudioProfilesNF.png</texturenofocus>
    <alttexturefocus>OSDAudioProfilesFO.png</alttexturefocus>
    <alttexturenofocus>OSDAudioProfilesNF.png</alttexturenofocus>
    <onleft>205</onleft>
    <onright>255</onright>
    <onup>1000</onup>
    <ondown>1000</ondown>
    <onclick>Close</onclick>
    <onclick>XBMC.RunScript(script.audio.profiles,0)</onclick>
</control>
<control type="button" id="255">

Replace:
Code:
<onleft>205</onleft>
to:
Code:
<onleft>299</onleft>

Replace:
Code:
<onright>255</onright>
to:
Code:
<onright>299</onright>

Download this two button images and extract to: KODI/addons/skin.confluence/media/
OSDAudioProfiles.zip


RE: Audio Profiles switcher - sjw1 - 2015-08-31

(2015-08-27, 14:06)Regss Wrote: Edit or create file keyboard.xml in userdata/keymaps/ and past this code:
Just one point, should that be keymap.xml ?


RE: Audio Profiles switcher - Roby77 - 2015-08-31

i think that name doesn't matter...mine is remote.xml (first was aaa.xml)

edit: on open elec


RE: Audio Profiles switcher - vutoannd - 2015-09-02

Hi guys,
Thanks for great add-ons.

I'm using Kodi 15 Isengard on Windows 8.1 and Audio Profiles Switcher worked well with two profiles option appear when opening new Video. But a little bit noise every time open new Video.

I already tried to create a new .xml file on keymaps folder with below code:

Quote:<keymap>
<global>
<keyboard>
<t>RunScript(script.audio.profiles,1)</t>
<a>RunScript(script.audio.profiles,2)</a>
</keyboard>
</global>
</keymap>
But I don't know how to use that function, press number 1 or 2 alway point me to seek time of video instead of switch audio profile.

My expectation is once I press a key (like F12), It will switch between 2 profiles created. How can I do that option?

Anyone can help me on this case, much appreciated.


RE: Audio Profiles switcher - Regss - 2015-09-02

Code:
<keymap>
  <global>
    <keyboard>
      <f12>RunScript(script.audio.profiles,0)</f12>
    </keyboard>
  </global>
</keymap>



RE: Audio Profiles switcher - vutoannd - 2015-09-02

(2015-09-02, 14:16)Regss Wrote:
Code:
<keymap>
  <global>
    <keyboard>
      <f12>RunScript(script.audio.profiles,0)</f12>
    </keyboard>
  </global>
</keymap>

Oh. It very easy. Blush
Thanks so much!


RE: Audio Profiles switcher - trogggy - 2015-09-02

(2015-08-27, 18:20)Regss Wrote: Instruction to add button in player OSD (confluence skin):

Image
The above also works in CCM.

Great tool, thanks for your work.


RE: Audio Profiles switcher - iCE999 - 2015-09-09

Hi again,

I would like to reset the audio profile to a specific one when rebooting my HTPC machine. Is it possible to call the switch script with a specific profile at startup of kodi?

Best regards,
iCE


RE: Audio Profiles switcher - Regss - 2015-09-10

In your userdata folder create file autoexec.py and past this code:

Code:
import xbmc
xbmc.executebuiltin('XBMC.RunScript(script.audio.profiles,1)')

1 - is a number of profile


RE: Audio Profiles switcher - Roby77 - 2015-09-16

(2015-09-10, 08:19)Regss Wrote: In your userdata folder create file autoexec.py and past this code:

Code:
import xbmc
xbmc.executebuiltin('XBMC.RunScript(script.audio.profiles,1)')

1 - is a number of profile

Great! Blush


RE: Audio Profiles switcher - jp.engvall - 2015-09-23

Hello,I´m a begginer to this, but love it!
I have done all the steps but I can´t figure out how to toggle betwen audiooutput with the remote, I use Yatse remote. Is it possible?

best regards
johan


RE: Audio Profiles switcher - Roby77 - 2015-09-23

install keymap editor and assign the command to a special character or whatever you want(like #,£ etc)

Or better:

Use keymap editor to catch the key of the button you want to use and edit your keymap files as described