Sounds.xml: Difference between revisions
mNo edit summary |
RogueScholar (talk | contribs) (Fix dead-end page and update content for Matrix) |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
'''As of Kodi | '''As of Kodi v15 [[Archive:Isengard|Isengard]], this file is part of a class of [[UI sounds add-ons]] and contains the mapping of actions to sounds.''' | ||
{{Note|Only .wav files are supported.}} | |||
To map an action to a sound, add a block like this to <actions> | == Global events == | ||
The <code><actions></code> tags enclose a section containing the global mapping of events to sounds. | |||
To map an action to a sound, add a block like this between the <code><actions></code> tags, | |||
<syntaxhighlight lang="xml"> | |||
<action> | |||
<name>left</name> | |||
<file>cursor.wav</file> | |||
</action> | |||
</syntaxhighlight> | |||
where <code><name></code> specifies the action to map a sound to and <code><file></code> the .wav file to play when the action occurs. | |||
Valid values for the <code><name></code> tag can be found on the [[Action IDs]] page. | |||
== Window-specific events == | |||
{{Note|Custom skin files may be used, in which case window ids should be employed.}} | |||
Window-specific event sound triggers can also be defined. To map a sound to a window, add a block like this betweens the <code><windows></code> tags, | |||
<syntaxhighlight lang="xml"> | |||
<window> | |||
<name>infodialog</name> | |||
<activate>notify.wav</activate> | |||
<deactivate>out.wav</deactivate> | |||
</window> | |||
</syntaxhighlight> | |||
where <code><name></code> specifies the window to map a sound to and <code><activate></code> and <code><deactivate></code> are the events relating to that window which sounds are to be mapped to. | |||
Valid values for these <code><name></code> tags can be found on the [[Window IDs]] page. | |||
== Defaults == | |||
{{Note|The current contents of this file are always accessible on [https://github.com/xbmc/xbmc/blob/master/addons/resource.uisounds.kodi/resources/sounds.xml GitHub]}} | |||
The default event sounds are packaged in the [[Official add-on repository]] as the [[Add-ons|add-on]] named <code>resource.uisounds.kodi</code>. As of Kodi v19 [[Matrix]], the contents of its <code>sounds.xml</code> file are: | |||
<syntaxhighlight lang="xml"> | |||
<sounds> | |||
<actions> | |||
<action> | <action> | ||
<name>left</name> | <name>left</name> | ||
<file>cursor.wav</file> | <file>cursor.wav</file> | ||
</action> | </action> | ||
<action> | |||
file | <name>right</name> | ||
<file>cursor.wav</file> | |||
</action> | |||
<action> | |||
<name>up</name> | |||
<file>cursor.wav</file> | |||
</action> | |||
<action> | |||
<name>down</name> | |||
<file>cursor.wav</file> | |||
</action> | |||
<action> | |||
<name>select</name> | |||
<file>click.wav</file> | |||
</action> | |||
<action> | |||
<name>parentdir</name> | |||
<file>back.wav</file> | |||
</action> | |||
<action> | |||
<name>previousmenu</name> | |||
<file>back.wav</file> | |||
</action> | |||
<action> | |||
<name>screenshot</name> | |||
<file>shutter.wav</file> | |||
</action> | |||
<action> | |||
<name>error</name> | |||
<file>notify.wav</file> | |||
</action> | |||
</actions> | |||
<windows> | |||
<window> | <window> | ||
<name> | <name>notification</name> | ||
<activate>notify.wav</activate> | <activate>notify.wav</activate> | ||
<deactivate>out.wav</deactivate> | <deactivate>out.wav</deactivate> | ||
</window> | </window> | ||
<window> | |||
<activate> | <name>startup</name> | ||
<activate></activate> | |||
</window> | |||
</windows> | |||
</sounds> | |||
</syntaxhighlight> | |||
[[Category: | [[Category:Skin development]] |
Latest revision as of 02:07, 23 September 2021
As of Kodi v15 Isengard, this file is part of a class of UI sounds add-ons and contains the mapping of actions to sounds.
Note: Only .wav files are supported.
Global events
The <actions>
tags enclose a section containing the global mapping of events to sounds.
To map an action to a sound, add a block like this between the <actions>
tags,
<action> <name>left</name> <file>cursor.wav</file> </action>
where <name>
specifies the action to map a sound to and <file>
the .wav file to play when the action occurs.
Valid values for the <name>
tag can be found on the Action IDs page.
Window-specific events
Note: Custom skin files may be used, in which case window ids should be employed.
Window-specific event sound triggers can also be defined. To map a sound to a window, add a block like this betweens the <windows>
tags,
<window> <name>infodialog</name> <activate>notify.wav</activate> <deactivate>out.wav</deactivate> </window>
where <name>
specifies the window to map a sound to and <activate>
and <deactivate>
are the events relating to that window which sounds are to be mapped to.
Valid values for these <name>
tags can be found on the Window IDs page.
Defaults
Note: The current contents of this file are always accessible on GitHub
The default event sounds are packaged in the Official add-on repository as the add-on named resource.uisounds.kodi
. As of Kodi v19 Matrix, the contents of its sounds.xml
file are:
<sounds> <actions> <action> <name>left</name> <file>cursor.wav</file> </action> <action> <name>right</name> <file>cursor.wav</file> </action> <action> <name>up</name> <file>cursor.wav</file> </action> <action> <name>down</name> <file>cursor.wav</file> </action> <action> <name>select</name> <file>click.wav</file> </action> <action> <name>parentdir</name> <file>back.wav</file> </action> <action> <name>previousmenu</name> <file>back.wav</file> </action> <action> <name>screenshot</name> <file>shutter.wav</file> </action> <action> <name>error</name> <file>notify.wav</file> </action> </actions> <windows> <window> <name>notification</name> <activate>notify.wav</activate> <deactivate>out.wav</deactivate> </window> <window> <name>startup</name> <activate></activate> </window> </windows> </sounds>