Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
63 lines
7.6 KiB
HTML
63 lines
7.6 KiB
HTML
<!DOCTYPE html>
|
|
|
|
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><meta http-equiv="X-UA-Compatible" content="IE=edge"><title>akg_player.h</title><link rel="stylesheet" type="text/css" href="../../styles/main.css" /><script type="text/javascript" src="../../styles/main.js"></script><script type="text/javascript">NDLoader.LoadJS("Content", "../../styles/");</script></head>
|
|
|
|
<!-- Generated by Natural Docs, version 2.2 -->
|
|
|
|
<!-- saved from url=(0016)http://localhost -->
|
|
|
|
<body onload="NDLoader.OnLoad('Content');" class="NDPage NDContentPage">
|
|
|
|
<a name="Functions"></a><a name="Topic18"></a><div class="CTopic TGroup LC first">
|
|
<div class="CTitle">Functions</div>
|
|
</div>
|
|
|
|
<a name="AKG_Play"></a><a name="Topic19"></a><div class="CTopic TFunction LC">
|
|
<div class="CTitle">AKG_Play</div>
|
|
<div id="NDPrototype19" class="NDPrototype WideForm"><div class="PSection PParameterSection CStyle"><table><tr><td class="PBeforeParameters"><span class="SHKeyword">void</span> AKG_Play(</td><td class="PParametersParentCell"><table class="PParameters"><tr><td class="first"></td><td class="PType">u8 </td><td class="PName last">sng,</td></tr><tr><td class="PModifierQualifier first"><span class="SHKeyword">const</span> </td><td class="PType"><span class="SHKeyword">void</span>* </td><td class="PName last">data</td></tr></table></td><td class="PAfterParameters">)</td></tr></table></div></div>
|
|
<div class="CBody"><p>Initialize a music and start playback</p><div class="CHeading">Paramaters</div><table class="CDefinitionList"><tr><td class="CDLEntry">num</td><td class="CDLDefinition"><p>Sub-music number if the AKG contain several musics (otherwise set to 0)</p></td></tr><tr><td class="CDLEntry">data</td><td class="CDLDefinition"><p>Pointer to the music data (data must be export to be replayed at this exact location) Check Arkos Tracker documentation for more details: <a href="https://www.julien-nevo.com/arkostracker" target="_top">https://​www​.julien-nevo​.com​/arkostracker</a></p></td></tr></table></div>
|
|
</div>
|
|
|
|
<a name="AKG_IsPlaying"></a><a name="Topic20"></a><div class="CTopic TFunction LC">
|
|
<div class="CTitle">AKG_IsPlaying</div>
|
|
<div id="NDPrototype20" class="NDPrototype"><div class="PSection PPlainSection"><span class="SHKeyword">inline</span> <span class="SHKeyword">bool</span> AKG_IsPlaying()</div></div>
|
|
<div class="CBody"><p>Check if a music is currently playing</p><div class="CHeading">Return</div><p>FALSE if no music is playing</p></div>
|
|
</div>
|
|
|
|
<a name="AKG_SetEventCallback"></a><a name="Topic21"></a><div class="CTopic TFunction LC">
|
|
<div class="CTitle">AKG_SetEventCallback</div>
|
|
<div id="NDPrototype21" class="NDPrototype WideForm"><div class="PSection PParameterSection CStyle"><table><tr><td class="PBeforeParameters"><span class="SHKeyword">inline</span> <span class="SHKeyword">void</span> AKG_SetEventCallback(</td><td class="PParametersParentCell"><table class="PParameters"><tr><td class="PType first">AKG_Event </td><td class="PName last">callback</td></tr></table></td><td class="PAfterParameters">)</td></tr></table></div></div>
|
|
<div class="CBody"><p>Set the event callback function. It will be called when an event is triggered. If ARKOS_USE_EVENT is TRUE, this function MUST be called before any call to AKG_Update.</p><div class="CHeading">Paramaters</div><table class="CDefinitionList"><tr><td class="CDLEntry">callback</td><td class="CDLDefinition"><p>Pointer to the event callback function</p></td></tr></table></div>
|
|
</div>
|
|
|
|
<a name="AKG_Stop"></a><a name="Topic22"></a><div class="CTopic TFunction LC">
|
|
<div class="CTitle">AKG_Stop</div>
|
|
<div id="NDPrototype22" class="NDPrototype"><div class="PSection PPlainSection"><span class="SHKeyword">void</span> AKG_Stop()</div></div>
|
|
<div class="CBody"><p>Stop current music playback</p></div>
|
|
</div>
|
|
|
|
<a name="AKG_Update"></a><a name="Topic23"></a><div class="CTopic TFunction LC">
|
|
<div class="CTitle">AKG_Update</div>
|
|
<div id="NDPrototype23" class="NDPrototype"><div class="PSection PPlainSection"><span class="SHKeyword">bool</span> AKG_Update()</div></div>
|
|
<div class="CBody"><p>Decode a music frame and update the PSG (must be called once each frame)</p><div class="CHeading">Return</div><p>TRUE if end of music have been reached</p></div>
|
|
</div>
|
|
|
|
<a name="AKG_InitSFX"></a><a name="Topic24"></a><div class="CTopic TFunction LC">
|
|
<div class="CTitle">AKG_InitSFX</div>
|
|
<div id="NDPrototype24" class="NDPrototype WideForm"><div class="PSection PParameterSection CStyle"><table><tr><td class="PBeforeParameters">u8 AKG_InitSFX(</td><td class="PParametersParentCell"><table class="PParameters"><tr><td class="PModifierQualifier first"><span class="SHKeyword">const</span> </td><td class="PType"><span class="SHKeyword">void</span>* </td><td class="PName last">data</td></tr></table></td><td class="PAfterParameters">)</td></tr></table></div></div>
|
|
<div class="CBody"><p>Initialize sound effects. It MUST be called at any time before a first sound effect is triggered. It doesn't matter whether a song is playing or not, or even if AKG_Init has been initialized.</p><div class="CHeading">Paramaters</div><table class="CDefinitionList"><tr><td class="CDLEntry">data</td><td class="CDLDefinition"><p>Address to the sound effects data.</p></td></tr></table><div class="CHeading">Return</div><p>Number of SFX in the package</p></div>
|
|
</div>
|
|
|
|
<a name="AKG_PlaySFX"></a><a name="Topic25"></a><div class="CTopic TFunction LC">
|
|
<div class="CTitle">AKG_PlaySFX</div>
|
|
<div id="NDPrototype25" class="NDPrototype WideForm"><div class="PSection PParameterSection CStyle"><table><tr><td class="PBeforeParameters"><span class="SHKeyword">void</span> AKG_PlaySFX(</td><td class="PParametersParentCell"><table class="PParameters"><tr><td class="PType first">u8 </td><td class="PName last">sfx,</td></tr><tr><td class="PType first">u8 </td><td class="PName last">chan,</td></tr><tr><td class="PType first">u8 </td><td class="PName last">vol</td></tr></table></td><td class="PAfterParameters">)</td></tr></table></div></div>
|
|
<div class="CBody"><p>Plays a sound effect. If a previous one was already playing on the same channel, it is replaced. This does not actually plays the sound effect, but programs its playing.</p><div class="CHeading">Paramaters</div><table class="CDefinitionList"><tr><td class="CDLEntry">sfx</td><td class="CDLDefinition"><p>Sound effect number (>0!).</p></td></tr><tr><td class="CDLEntry">chan</td><td class="CDLDefinition"><p>The channel where to play the sound effect (0, 1, 2).</p></td></tr><tr><td class="CDLEntry">vol</td><td class="CDLDefinition"><p>Inverted volume (0 = full volume, 16 = no sound). Hardware sounds are also lowered.</p></td></tr></table></div>
|
|
</div>
|
|
|
|
<a name="AKG_StopSFX"></a><a name="Topic26"></a><div class="CTopic TFunction LC last">
|
|
<div class="CTitle">AKG_StopSFX</div>
|
|
<div id="NDPrototype26" class="NDPrototype WideForm"><div class="PSection PParameterSection CStyle"><table><tr><td class="PBeforeParameters"><span class="SHKeyword">void</span> AKG_StopSFX(</td><td class="PParametersParentCell"><table class="PParameters"><tr><td class="PType first">u8 </td><td class="PName last">chan</td></tr></table></td><td class="PAfterParameters">)</td></tr></table></div></div>
|
|
<div class="CBody"><p>Stops a sound effect. Nothing happens if there was no sound effect.</p><div class="CHeading">Paramaters</div><table class="CDefinitionList"><tr><td class="CDLEntry">chan</td><td class="CDLDefinition"><p>The channel where to stop the sound effect (0, 1, 2).</p></td></tr></table></div>
|
|
</div>
|
|
|
|
</body></html> |