<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.wowcube.com/index.php?action=history&amp;feed=atom&amp;title=SDK_6.3%2FC%2B%2B%2FSound</id>
	<title>SDK 6.3/C++/Sound - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.wowcube.com/index.php?action=history&amp;feed=atom&amp;title=SDK_6.3%2FC%2B%2B%2FSound"/>
	<link rel="alternate" type="text/html" href="https://wiki.wowcube.com/index.php?title=SDK_6.3/C%2B%2B/Sound&amp;action=history"/>
	<updated>2026-07-26T22:46:45Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.33.0</generator>
	<entry>
		<id>https://wiki.wowcube.com/index.php?title=SDK_6.3/C%2B%2B/Sound&amp;diff=16968&amp;oldid=prev</id>
		<title>WowBot: Split C++ Native API into per-module pages with minimal examples (WowBot)</title>
		<link rel="alternate" type="text/html" href="https://wiki.wowcube.com/index.php?title=SDK_6.3/C%2B%2B/Sound&amp;diff=16968&amp;oldid=prev"/>
		<updated>2026-07-26T09:47:46Z</updated>

		<summary type="html">&lt;p&gt;Split C++ Native API into per-module pages with minimal examples (WowBot)&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{notice|'''Official WOWCube SDK documentation.''' SDK 6.3, C++ (WebAssembly) API. Signatures are extracted from the canonical SDK headers shipped with the WOWCube Development Kit; the headers remain authoritative.}}&lt;br /&gt;
&lt;br /&gt;
{{SDK 6.3 nav}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''← [[SDK 6.3]] · [[SDK 6.3/C++/Native API|C++ Native API]] / Sound''&lt;br /&gt;
&lt;br /&gt;
Sound asset playback and caching.&lt;br /&gt;
&lt;br /&gt;
Shared types, enums and constants are listed on the [[SDK 6.3/C++/Native API#Types and data structures|Native API overview]].&lt;br /&gt;
&lt;br /&gt;
== Minimal example ==&lt;br /&gt;
&lt;br /&gt;
Play a packed sound asset:&lt;br /&gt;
&lt;br /&gt;
 soundID_t sfx = SND_getAssetId(&amp;quot;hit.wav&amp;quot;);&lt;br /&gt;
 SND_play(sfx, 100);&lt;br /&gt;
&lt;br /&gt;
== Functions ==&lt;br /&gt;
&lt;br /&gt;
===SND_getAssetId===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t SND_getAssetId(const char* soundName)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get a sound ID by the filename.&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: The ID of sound with a given filename or -1 in case of error.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.0 - renamed from SND_getId() to SND_getAssetId()&lt;br /&gt;
: v6.0 - truncate asset name in WASM API&lt;br /&gt;
&lt;br /&gt;
===SND_play===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t SND_play(soundID_t soundID, u32_t volume)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Play sound by ID.&lt;br /&gt;
: Play any sound by its ID. Platform does not support audio mixing, so&lt;br /&gt;
: previously playing sound will be stopped if it has not yet finished.&lt;br /&gt;
: Supported audio formats:&lt;br /&gt;
:* WAV&lt;br /&gt;
:* MP3&lt;br /&gt;
:* MIDI&lt;br /&gt;
&lt;br /&gt;
===SND_cacheSounds===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t SND_cacheSounds(soundID_t* soundIDs, u32_t count)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Force platform to cache application sounds.&lt;br /&gt;
: Platform automatically reads and caches sounds from flash when the&lt;br /&gt;
: application plays a sound. Flash operations are synchronous and may cause&lt;br /&gt;
: delays especially when reading large portions of data. To prevent the&lt;br /&gt;
: application from lags it is possible to cache sound data in advance.&lt;br /&gt;
: However if application requests to play a non-cached sound and there is not&lt;br /&gt;
: enough memory then oldest accessed sounds will be removed from cache. Also&lt;br /&gt;
: there is a limit of 256 for a total number of cached sounds.&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Number of cached sounds or negative value if an error happened. Error&lt;br /&gt;
: codes:&lt;br /&gt;
: * -1 invalid function arguments count&lt;br /&gt;
: * -2 invalid soundList array&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.0 - moved from appCtrl module to sound&lt;br /&gt;
&lt;br /&gt;
===SND_isPlaying===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t SND_isPlaying()&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Check if audio is playing.&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: True if audio is playing, false otherwise.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v6.0 - added&lt;br /&gt;
&lt;br /&gt;
===SND_stop===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t SND_stop()&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Stop playing sound if any.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v6.0 - added&lt;br /&gt;
&lt;br /&gt;
===SND_getAssetsCount===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t SND_getAssetsCount()&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get the total count of sound assets.&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Number of sound assets.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v6.0 - added&lt;br /&gt;
&lt;br /&gt;
[[Category:SDK 6.3]]&lt;br /&gt;
[[Category:C++ API]]&lt;/div&gt;</summary>
		<author><name>WowBot</name></author>
		
	</entry>
</feed>