sy6sy2 / xbmc

Kodi is an award-winning free and open source home theater/media center software and entertainment hub for digital media. With its beautiful interface and powerful skinning engine, it's available for Android, BSD, Linux, macOS, iOS and Windows.
https://kodi.tv/
Other
6 stars 1 forks source link

No UI sounds for tvOS or iOS #22

Open phunkyfish opened 5 years ago

phunkyfish commented 5 years ago

Raise bug upstream for iOS. Fix should be the same for tvOS.

phunkyfish commented 5 years ago
kambala-decapitator commented 5 years ago

in system/settings/settings.xml I found the following:

    <setting id="audiooutput.guisoundmode" type="integer" label="34120" help="36373">
      <level>0</level>
      <default>1</default> <!-- AE_SOUND_IDLE -->
      <constraints>
        <options>
          <option label="34121">1</option> <!-- AE_SOUND_IDLE -->
          <option label="34122">2</option> <!-- AE_SOUND_ALWAYS -->
          <option label="34123">0</option> <!-- AE_SOUND_OFF -->
        </options>
      </constraints>
      <control type="list" format="string" />
    </setting>
    <setting id="lookandfeel.soundskin" type="addon" label="24006" help="36110">
      <level>0</level>
      <default>resource.uisounds.kodi</default>
      <constraints>
        <addontype>kodi.resource.uisounds</addontype>
        <allowempty>true</allowempty>
      </constraints>
      <updates>
        <update type="change" />
      </updates>
      <control type="button" format="addon">
        <show more="true" details="true">installed</show>
      </control>
    </setting>

maybe this is what is responsible for sounds? Although I don't see these settings in https://github.com/Memphiz/xbmc/blob/yab/system/settings/darwin_tvos.xml, but UI sounds do play in the last yab build.

Maybe the addons are simply not yet bundled? There's a file at addons/kodi.resource/uisounds.xsd

<addontype>kodi.resource.uisounds</addontype>
phunkyfish commented 5 years ago

If it was an unbuilt addon I would have expected UI sounds to work in iOS. It’s possible it’s not built in either though.

phunkyfish commented 5 years ago

Could also be something that was introduced in Leia.

phunkyfish commented 5 years ago

@pogarek

could either of you provide a debug log from startup where there are no UI sounds. Required to raise upstream issue.

phunkyfish commented 5 years ago

Might be good to also confirm that UI sounds are enabled in settings.

phunkyfish commented 5 years ago

Can you add the debug log to relevant section here: https://github.com/xbmc/xbmc/issues/15927

sy6sy2 commented 5 years ago

Do you want that I test older official debs on iOS? (17.0, 17.1 ...)?

phunkyfish commented 5 years ago

It would be good to know if it worked at some point, so yes.

I raised the bug for 18.1 so only need the debug log for that version.

sy6sy2 commented 5 years ago

17.4 --> No UI sound BUT notification sound works 17.3 --> No UI sound BUT notification sound works 17.1 --> Not works on iOS 12 :-/

Edit: Maybe Memphiz knows a little more about this issue?

phunkyfish commented 5 years ago

@Memphiz any ideas?

Maybe it's intentional on iOS

sy6sy2 commented 5 years ago

Maybe, but it should works on tvOS

phunkyfish commented 5 years ago

Agreed

phunkyfish commented 5 years ago

I wonder if the notification sounds work on 17.6 and 18.1.

Maybe check if the UI sounds are enabled in settings ;)

Memphiz commented 5 years ago

Can’t remember - I don’t care about ui sounds - don’t bother I guess they are non working on iOS for a reason ...

sy6sy2 commented 5 years ago

Yes I always check this setting. And it is enabled.

Edit: Notification sound does not work on 18.1

Memphiz commented 5 years ago

Might be not implemented in the sink or something ui sounds are so short and might need special handling for not hitting a buffer but being instant ... you would need to debug it and see why add Packets is not called in the sink (or In case it’s called it might get flushed before playback for some reason)

sy6sy2 commented 5 years ago

UI sounds works on Apple TV with http://mirrors.kodi.tv/test-builds/darwin/tvos/kodi-20180227-4a25e62-yab-tvos.deb

sy6sy2 commented 5 years ago

So broken ui sounds and broken 2.0 pcm is hdmi related then (https://github.com/xbmc/xbmc/pull/16015)

kambala-decapitator commented 5 years ago

I investigated sounds in iOS a bit and found out that they don't play because m_windowSoundMap doesn't contain IDs for all windows: it contains only 2 generic IDs, see addons/resource.uisounds.kodi/resources/sounds.xml

Screen Shot 2019-05-12 at 19 33 16

from the first glance at yab branch, the code (CGUIAudioManager::PlayWindowSound()) is the same there (didn't actually build it), although UI sounds do work there.

and the most confusing thing is that UI sounds on iOS start working when I connect to ATV as if it's an external screen...

@Memphiz any idea? Maybe I'm just missing something?

Memphiz commented 5 years ago

Not my area of knowledge so I can‘t tell out of my mind. On vacation atm so no device here to look into the code.

I would debug this and see if the ui sound does not play because it is not called or maybe because the audio sink doesn‘t get the samples out.

kambala-decapitator commented 5 years ago

I've already debugged and posted my findings :) sound doesn't play because CActiveAESound's Play() method is never called.

I guess I have to build yab for iOS and debug it as well.