• 1(current)
  • 2
  • 3
  • 4
  • 5
  • 19
  •   
Release Audio Profiles - Easy switch between different audio settings
#1
Audio Profiles


Image


Easy switch between different audio settings.

Save audio settings to profiles and easy switch between them using keymap or pop-up menu:

RunScript(script.audio.profiles,0) - one keymap to toggle switch between two profiles.
RunScript(script.audio.profiles,x) - where x is number of profile

Download:
Download from KODI official repository or my repository:
Regss Repository

Short Instruction:
1. Configure Add-on to set names for profiles.
2. To save current audio settings to profile run Add-on from programs section.

You can help translate: https://www.transifex.com/movielib/audio...languages/

Configuration Instruction:

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.
Edit or create file keyboard.xml in userdata/keymaps/ and past this code:

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

Example 2 - keymap for toggle between profiles:
Code:
<keymap>
  <global>
    <keyboard>
      <t>RunScript(script.audio.profiles,0)</t>
    </keyboard>
  </global>
</keymap>

Example 3 - button in player OSD

Kodi 16 Confluence:
Image

Kodi 17 Estuary:
Image

Instruction - post #3

Example 4 - Window Popup when start playing
In addon settings enable option "Show audio stream select menu on start playing" This will show popup to choose audio profile every time when you start play.

Example 5 - Automatic switch for different content
In Addon settings go to category "Automatic switch" then select for which types of content which profile will be automatically switched on.

CHANGELOG

Image
Reply
#2
Thanks for this addon.

Is there any way to get the current audio volume and store it in the profile and then set it (Application.SetVolume) upon the toggle?


For example I have head-phones with the volume around 40% but the HDMI to the TV I have at 100%.
Reply
#3
Button on player OSD (KODI 16 - Confluence):

Image

Edit file addons/skin.confluence/720p/VideoOSD.xml

Replace line:
Code:
<control type="button" id="255">
to:
Code:
<control type="togglebutton" id="299">
    <width>55</width>
    <height>55</height>
    <label>Audio Profiles</label>
    <font>-</font>
    <texturefocus>OSDAudioProfilesFO.png</texturefocus>
    <texturenofocus>OSDAudioProfilesNF.png</texturenofocus>
    <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:
<control type="image" id="2600">
    <width>325</width>
    <texture>-</texture>
    <visible>!VideoPlayer.Content(LiveTV) + !VideoPlayer.HasMenu</visible>
</control>

to:
Code:
<control type="image" id="2600">
    <width>270</width>
    <texture>-</texture>
    <visible>!VideoPlayer.Content(LiveTV) + !VideoPlayer.HasMenu</visible>
</control>

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_Confluence.zip

Button on player OSD (KODI 17 - Estuary):

Edit file addon/skin.estuary/xml/VideoOSD.xml

Replace:
Code:
<control type="radiobutton" id="70011">

to:
Code:
<control type="radiobutton" id="70042">
    <include content="OSDButton">
        <param name="texture" value="audio_profiles.png"/>
    </include>
    <onclick>XBMC.RunScript(script.audio.profiles,0)</onclick>
</control>
<control type="radiobutton" id="70011">

Download this button image and extract to: addons/skin.estuary/media/
OSDAudioProfiles_Estuary.zip
Reply
#4
Thanks for including volume saving - works perfect here, I see 1.0.2 has 4 profiles now which is great for others who might need it.
Thanks again.
Reply
#5
yeaaahhhh!!!! a real solution for multi audio out... thanksssssss
Reply
#6
you can try my service addon - it switches the audio device automatically:
http://forum.xbmc.org/showthread.php?tid=201896
Reply
#7
This is awesome, thanks so much. Im using this to switch to no-passthrough for certain problematic files!
Reply
#8
This is probably stupid question, but how do you save audio profiles?

EDIT: OK found out, I need to actually run the plugin, not in the plugin settings.
Reply
#9
Hi, I would love to use this, I just ran the addon to configure a couple profiles. I use an MCE Remote and the XBMC MCE Remote add-on, on Windows 7. I have C:\Users\MyUser\AppData\Roaming\XBMC\userdata\addon_data\plugin.program.mceremote\settings.xml where the keys seem to be binded from the addon. How would I add the buttons for the profiles of this addon to that? (Or should I be looking elsewhere?) Thanks for any help Smile
Reply
#10
You can hear anything in two audio output in same time, one must be speakers and second is your choice. In this way you do not need switch anything after initial configuration. Look this trick http://www.addictivetips.com/windows-tip...windows-7/
Work on all windows (7 and 8 x64 and x86)
Reply
#11
Thank you, thank you, thank you Smile
I was gonna learn how the xbmc works for changing the audio channels, just to make a script that switches from 5.1 channels (my home audio system) to 2.0 stereo (headphones), and vise versa, but the code you wrote is so much better.
Thank you again.
Reply
#12
If i have understood correctly this script is used to change audio output device.

Can it also be used to save other audio settings like"Adjust display refresh rate to match video" setting?

Is there others way to make a script to toggle this setting?

New: I tried adding this "videoplayer.adjustrefreshrate": "2"} to the profile1 file but it had no effect....
Reply
#13
Great addons. It is working very well with Helix too.I am using Openelec.
Reply
#14
It does not work for me in Kodi Helix on Arch Linux.

Let's see if I found a bug or if there's something wrong on my side: https://github.com/Regss/script.audio.profiles/issues/1.
Reply
#15
My bad. One 1st needs to enable the slots that would be used, in plugin configuration. Otherwise trying to switch between disabled slots makes the script behave weird and report no error, as described in the bug report.
Reply
  • 1(current)
  • 2
  • 3
  • 4
  • 5
  • 19
  •   
 
Thread Rating:
  • 3 Vote(s) - 5 Average



Logout Mark Read Team Forum Stats Members Help
Audio Profiles - Easy switch between different audio settings53