<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://g1r-mp.com/wiki/index.php?action=history&amp;feed=atom&amp;title=GetGameSoundInfo</id>
	<title>GetGameSoundInfo - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://g1r-mp.com/wiki/index.php?action=history&amp;feed=atom&amp;title=GetGameSoundInfo"/>
	<link rel="alternate" type="text/html" href="https://g1r-mp.com/wiki/index.php?title=GetGameSoundInfo&amp;action=history"/>
	<updated>2026-10-01T16:25:41Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.46.0</generator>
	<entry>
		<id>https://g1r-mp.com/wiki/index.php?title=GetGameSoundInfo&amp;diff=1179&amp;oldid=prev</id>
		<title>QCherry: Document upcoming 0.1.7 game audio: 11 client APIs, result event, limits and complete dialogue catalog; not a release</title>
		<link rel="alternate" type="text/html" href="https://g1r-mp.com/wiki/index.php?title=GetGameSoundInfo&amp;diff=1179&amp;oldid=prev"/>
		<updated>2026-10-01T10:20:29Z</updated>

		<summary type="html">&lt;p&gt;Document upcoming 0.1.7 game audio: 11 client APIs, result event, limits and complete dialogue catalog; not a release&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= getGameSoundInfo =&lt;br /&gt;
&amp;lt;div style=&amp;quot;background:#fff5f5; border:1px solid #d13b3b; border-left:5px solid #d13b3b; color:#111111; padding:0.85rem 1rem; margin:0.75rem 0 1rem;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;color:#111111; font-weight:bold; letter-spacing:0.04em;&amp;quot;&amp;gt;PLANNED FOR UPDATE 0.1.7&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;color:#111111; margin-top:0.25rem;&amp;quot;&amp;gt;This function is planned for G1R:MP 0.1.7. It is not included in the public 0.1.6 release.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Returns compiled catalog metadata and, when available, the last successful preload metadata for the current client resource.&lt;br /&gt;
&lt;br /&gt;
== Syntax ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
table|false getGameSoundInfo(string key)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Name !! Type !! Required !! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;key&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;string&amp;lt;/code&amp;gt; || yes || Exact, case-sensitive key from [[getGameSoundCatalog]]. Accepts catalog entries only; no filename, URL or arbitrary event name.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Returns ==&lt;br /&gt;
Returns &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; for an unknown key. Otherwise returns a Lua table with &amp;lt;code&amp;gt;key&amp;lt;/code&amp;gt; (string), &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; (string: &amp;lt;code&amp;gt;sfx&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;music&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;dialogue&amp;lt;/code&amp;gt;), &amp;lt;code&amp;gt;speaker&amp;lt;/code&amp;gt; (string, empty when unspecified), &amp;lt;code&amp;gt;verifiedInGame = false&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;capabilitiesKnown = false&amp;lt;/code&amp;gt; before a successful preload.&lt;br /&gt;
&lt;br /&gt;
After a successful [[preloadGameSound]] in the same resource, the table can also contain:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field !! Type !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;capabilitiesKnown&amp;lt;/code&amp;gt; || bool || True once native event capabilities have been queried successfully.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;studioEvent&amp;lt;/code&amp;gt; || string || Actual resolved game event, including any dialogue template fallback.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;lookup&amp;lt;/code&amp;gt; || string || Diagnostic lookup method, currently &amp;lt;code&amp;gt;FMOD.FindEventByName&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;authoredSpatial&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;oneShot&amp;lt;/code&amp;gt; || bool || Event capabilities reported by FMOD. &amp;lt;code&amp;gt;oneShot = false&amp;lt;/code&amp;gt; is not a guarantee of a simple loop.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;loopMode&amp;lt;/code&amp;gt; || string || Currently &amp;lt;code&amp;gt;authored&amp;lt;/code&amp;gt;; looping follows the event&amp;#039;s design.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;eventSamplesPreloaded&amp;lt;/code&amp;gt; || bool || True in a successful preload result.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;voicePreloadRequested&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;voicePreloadConfirmed&amp;lt;/code&amp;gt; || bool || Whether dialogue preload was requested and independently confirmed. The current implementation always reports &amp;lt;code&amp;gt;voicePreloadConfirmed = false&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;nativeMs&amp;lt;/code&amp;gt; || number || Native processing time in milliseconds for the completed preload attempt; excludes earlier retries and is not total load latency.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Dialogue replies may additionally contain &amp;lt;code&amp;gt;recordingResolved&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;controllerPresent&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;controllerRootPresent&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;pawnRootPresent&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;viewTargetQuerySucceeded&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;viewTargetPresent&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;viewTargetIsLocalPawn&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;viewTargetRootPresent&amp;lt;/code&amp;gt; (booleans), plus &amp;lt;code&amp;gt;voiceLanguageSet&amp;lt;/code&amp;gt; (string, when available).&lt;br /&gt;
&lt;br /&gt;
Dialogue playback results and [[getGameSoundState]] can also expose &amp;lt;code&amp;gt;localizedTextPathPresent&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;localizedTextPathMatchesId&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;identityPathVerified&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;recordingPrepared&amp;lt;/code&amp;gt; (booleans), &amp;lt;code&amp;gt;resolution&amp;lt;/code&amp;gt; (string: &amp;lt;code&amp;gt;localized-text-record&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;verified-catalog-identity&amp;lt;/code&amp;gt;), and &amp;lt;code&amp;gt;recordingDurationSeconds&amp;lt;/code&amp;gt; (positive number). These playback-only fields are not populated by this function&amp;#039;s preload cache.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
Read catalog metadata without starting playback:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot; line&amp;gt;&lt;br /&gt;
local info = getGameSoundInfo(&amp;quot;voice/INFO_DIEGO_BARRIERE_11_01&amp;quot;)&lt;br /&gt;
if info then&lt;br /&gt;
    outputDebugString(info.category .. &amp;quot;: &amp;quot; .. info.speaker)&lt;br /&gt;
    outputDebugString(&amp;quot;Native capabilities known: &amp;quot; .. tostring(info.capabilitiesKnown))&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
* Planned for update 0.1.7; not included in public 0.1.6.&lt;br /&gt;
* Available only in client-side resource scripts. See [[Game audio]] for ownership, lifecycle, limits and server-triggered playback.&lt;br /&gt;
* This function submits no native request. Catalog metadata is available before the game is ready.&lt;br /&gt;
* Only a successful preload updates the per-resource information cache. Playing a sound alone does not set this function&amp;#039;s &amp;lt;code&amp;gt;capabilitiesKnown&amp;lt;/code&amp;gt; to true; inspect that sound&amp;#039;s state for playback metadata.&lt;br /&gt;
* &amp;lt;code&amp;gt;verifiedInGame&amp;lt;/code&amp;gt; remains false. Capability flags, prepared recording duration and observed playback state do not prove that audio was audible.&lt;br /&gt;
* Optional diagnostic fields can be absent, particularly on an early failure. They describe the game state at the time of that result and do not expose native paths or pointers.&lt;br /&gt;
* Resource/session cleanup clears cached preload metadata. The catalog entry itself remains available.&lt;br /&gt;
&lt;br /&gt;
[[Category:Lua Functions]]&lt;br /&gt;
[[Category:Client Functions]]&lt;br /&gt;
[[Category:Audio Functions]]&lt;/div&gt;</summary>
		<author><name>QCherry</name></author>
	</entry>
</feed>