Release Audio Profiles (for Kodi 18 and later)
#84
(2020-07-29, 15:22)A.T.E. Wrote:
(2020-07-28, 18:56)pkscout Wrote:
(2020-07-28, 16:52)A.T.E. Wrote: Hi, thanks @pkscout for maintaining this addon, which is necessary for my needs. Still I cannot make it work as I wished.
To make you understand, this is my setup:
  • Hardware: Raspberry Pi 2 with an additional sound card Hifiberry Dac+
  • Software: LibreELEC 9.2.1, Kodi 18.6, Audio Profiles 2.0.0
The HDMI is connected to the TV, the sound card is connected to an hifi amplifier; so Kodi should route the sound output of the video files to the HDMI and the sound output of the music files to the other sound card.
Therefore I have created two profiles, one for each audio device, with automatic switch. If it is an unknown content type, the audio is routed to the HDMI.

What's not working for me is music streams (Internet radios):
  • Almost (*) all the radio addons contents are not being recognized as music, and so they are wrongly routed to the HDMI output.
  • If I play a .strm containing a link to an Internet radio the sound is routed to the HDMI output.
  • If I play a playlist (.m3u) from the main TV interface the sound goes to the hifi, however if I play it from Kore or from the web interface the sound ges to the HDMI.
I could use a workaround to those issues by setting up the sound card as the output for the unknown content type, however if I do so then the sound of the Kodi games goes to the sound card instead of the HDMI (the desired behaviour).
Is there a way to fix my issue?

(*) I found a discontinued addon, but it is buggy.
Streams will almost never be identified by their media type, as many addons do not provide that information in a way that Kodi understands.  You'll probably have to use the Unknown content type for those, and as you said, that will cause you other issues.  The other option (likely with similar issues) is to enable the option in the Autoswitch section under music to have AP treat any stream with no audio details as music (I think that's way I did to get the Radio addon to work).  Unfortunately it looks like you're doing lots of things that fall into the "unknown" category, so it just might not be possible to split them.  If you could post a link to a debug log where you are starting a game, maybe I can add support for routing game sounds.  I've honestly never looked at that.

I'd have to see a debug log (with both Kodi and Audio Profiles debug on) for your third issue.  I don't use the web interface or Kore to initiate playback, and on the surface I can think of no reason why either of those would cause Kodi to play the playlist in a different way.

Log file: I have played a music file and then a game: http://ix.io/2sBk
It would definitely be great if there could be an AP auto switch entry for Games. If so, I could simply put the default (unknown) to the sound card, with Movies, Videos and Games (which is all that needs to TV on) going to HDMI, while everything that does not need the TV (Music and Radio) would go to the hi-fi system.
Unfortunately it looks like the games just return a library type of unknown with the audio info. I had been hoping it would say something simple like 'game.'  I'll have to try and install a few games and see if there are any options, but for now it looks like no quick fix is coming.
Reply


Messages In This Thread
RE: Audio Profiles (for Kodi 18 and later) - by pkscout - 2020-07-29, 17:52
Logout Mark Read Team Forum Stats Members Help
Audio Profiles (for Kodi 18 and later)0