Kodi Community Forum

Full Version: Audio Profiles - Easy switch between different audio settings
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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
Thanks for your addon, very useful to me. Maybe I can suggest you to add a menu to automatic configure the keymap file, something like the keymap editor addon, that will make the configuration easier!
I will try to help with the spanish translation.
Thanks again and good luck!
Hi!

I finally updated my Raspberry Pi today to the current version of OSMC/Kodi. There changed a lot with the february update. I even had to re-download and reinstall Confluence because thats my preferred skin.

And now I've installed your audio profile switcher for the first time.

Installation was clear, I added and saved two audio profiles. And now I want to get the button in the footer of the media player menu. I already transfered the two PNGs to the correct folder but now I'm stuck. Because there is NO VideoOSD.xml file!

There was even only a "fonts" folder. I created the media folder while coping the PNGs:

Code:
root@osmc:/usr/share/kodi/addons/skin.confluence# pwd
/usr/share/kodi/addons/skin.confluence
root@osmc:/usr/share/kodi/addons/skin.confluence# ls -la
total 24
drwxr-xr-x   4 root root  4096 Feb 26 23:50 .
drwxr-xr-x 165 root root 12288 Feb 26 20:52 ..
drwxr-xr-x   2 root root  4096 Feb 26 20:52 fonts
drwxr-xr-x   2 root root  4096 Feb 26 23:41 media

What can I do?
xml files must be somewhere. Every skin is built on these files.
Ok, i found it. I made the mistake that I only searched in /usr/.... but under OSMC the configuration file is located here:

/home/osmc/.kodi/addons/skin.confluence/720p/

The IDs of the control elements in the config file seems to differ a little bit, but I made it. Smile

But something looks strange in your instructions for me: You say, we have to REPLACE a single line:

<control type="button" id="255">

with this:

<control type="togglebutton" id="299">
[...]
</control>

But then the XML wouldn't be valid any more because whats with the rest of the code of the id-255-tag and the second closing control-tag?

I tried to insert the new button before the 255-control-button and it works too.
My mistake, i fix it in second post.
Hi,

Thanks a lot for this script, the automatic switching between audio settings is especially useful.

One small thing I noticed is that audio cd files (.cdda) are not recognized as music, instead they are currently controlled by the profile for 'Unknown content type'. Is this something you could change in a future update?

Currently I use the same profile for unknown content as I use for music, so the result is the same.
KODI probably recognize this files as "unknown". You can enable logging in system -> debugging and play this file than check in kodi.log what the addon catch from KODI.
It will be something like that:

Code:
..::Audio Profiles::.. [MONITOR] METHOD: Player.OnPlay DATA: {u'item': {u'type': u'movie', u'id': 1}, u'player': {u'playerid': 1, u'speed': 1}}
(2017-03-01, 15:35)cocacolagamer Wrote: [ -> ]Hi,

Thanks a lot for this script, the automatic switching between audio settings is especially useful.

One small thing I noticed is that audio cd files (.cdda) are not recognized as music, instead they are currently controlled by the profile for 'Unknown content type'. Is this something you could change in a future update?

Currently I use the same profile for unknown content as I use for music, so the result is the same.

I noticed the same. Actually my profile for unknown content is different from the one used for music, so that I would appreciate such modification...I can not provide the .log right now as requested...hope that cocacolagamer will be quicker than me! Wink
I provide you with 2 logs,

1. http://pastebin.com/zn1XDGZD >> Crash
2. http://pastebin.com/c4ERMYwx >> Succesful

The first time I tried to play the CD kodi crashed, this has happened a few times before. This tends to happen when I have just started kodi and a CD is the first thing I play. If I play a regular music file first and then start playing the CD it will play. But it does not happen every time. Maybe you can find something out of the ordinary in the first .log file.

The second time the CD did play correctly and I think I found the line you were looking for:
Code:
16:47:13.174 T:11292   DEBUG: ..::Audio Profiles::.. [MONITOR] METHOD: Player.OnPlay DATA: {u'item': {u'type': u'unknown'}, u'player': {u'playerid': 0, u'speed': 1}}
16:47:13.174 T:11292   DEBUG: ..::Audio Profiles::.. [MONITOR] Last loaded profile: 2 To switch profile: 2
16:47:13.174 T:11292   DEBUG: ..::Audio Profiles::.. [MONITOR] Switching omitted (same profile)

This confirms that Audio Profiles recognizes it as unknown, but does not tell much about why it does so. Am I missing something?
v. 1.2.5 relased

- fix: assign cdda Audio CD from unknown to audio type
- fix: prevent auto change immediately after change profile manually
Just noticed you had released a new version. The audio CD is now correctly defined as music, nice work.

As for your second fix, it did work, however only after executing the command for a manual profile change twice. After the first command it did automatically switch back. I can imagine this is on purpose, so that any playback is not disrupted if the command for changing the profile is accidentally executed. Only if someone is really committed to changing the profile manually and sends the command twice it ignores the automatic switch. If this is a bug, I would suggest not fixing it, as it is quite useful.

Lastly, Kodi still crashes sometimes when I play an audio CD. I think it is unstable due to the time delay caused by the spin up of the physical disk, as I do not experience any crashes playing music files on my hard disk. I'm going to confirm this also happens when I play a DVD. Maybe we should try delaying the automatic switch slightly when a disk is being played?
Hi there! Don't know if someone told this before, but found a method to easy configure buttons in yatse remote app for android. only need to:
- add custom command
- choose add from...(your media center)
- command type: call built-in
- display name: the name you like, ex. "Switch audio profile"
- built in command: RunScript(script.audio.profiles,0)

Hope this will help someone!
(2017-03-03, 17:51)cocacolagamer Wrote: [ -> ]Just noticed you had released a new version. The audio CD is now correctly defined as music, nice work.

As for your second fix, it did work, however only after executing the command for a manual profile change twice. After the first command it did automatically switch back. I can imagine this is on purpose, so that any playback is not disrupted if the command for changing the profile is accidentally executed. Only if someone is really committed to changing the profile manually and sends the command twice it ignores the automatic switch. If this is a bug, I would suggest not fixing it, as it is quite useful.

Lastly, Kodi still crashes sometimes when I play an audio CD. I think it is unstable due to the time delay caused by the spin up of the physical disk, as I do not experience any crashes playing music files on my hard disk. I'm going to confirm this also happens when I play a DVD. Maybe we should try delaying the automatic switch slightly when a disk is being played?

Can you send me kodi.log when this problem occurs?
See my earlier post. The first log in that post was from a session where Kodi crashes as well. I can reproduce the problem though and get some more logs.

Btw, I found that airplay currently isn't supported by you addon, or at least by the automatic switch. First of all the sound from airplay is controlled by the "unknown content" profile just like audio cd's were. Is this something you can change as well? Another issue is that if the automatic switch is used airplay won't work. When I start a airplay stream, audio profiles correctly identifies the content, tries to switch to a profile, which then somehow halts the stream and pauses it, which in turn causes audio profiles to switch profiles again, so in the end nothing happens. I think Kodi really does not like the stream getting interrupted by the audio settings change. The only workaround for this I can imagine is that the same profile must be used in the main menu as for airplay, so that it does not need to switch. Or you must somehow be able to change the profile before stream begins, but that will be tricky.
In some cases when audio settings change KODI must restart playback and this is a problem.

Please enable debugging and check in log what exactly Addon catch from KODI.when you start airplay.
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