DEMOGL_SoundSystemElementScriptID2ElementCodeID converts an element ID used in the script (an ElementScriptID) to an ElementCodeID
which is usable with the DemoGL API functions concerning sound element. You can load a Sound Element, like a sample, a MOD/XM/S2M/IT
file or an MP3 file, in the script and this element can be given a name, the ElementScriptID. This
ElementScriptID is a friendly name for the ElementCodeID which is used internally and which works faster. To interact with the sound element
from code you need the ElementCodeID of the sound element. To convert the ElementScriptID into an ElementCodeID you can use the
ElementCodeID with the DemoGL API functions concerning channels.
int
DEMOGL_SoundSystemElementScriptID2ElementCodeID(
const char *pszElementScriptID
);
Parameters.
pszElementScriptID
Pointer to a zero-terminated string which contains the ElementScriptID to be converted.
Return values.
Returns the ElementCodeID when the conversion was successful.
Returns DGL_SS_ERR_ILLEGALELEMENTID errorvalue when an error occurs.
Remarks.
You only need to convert the ElementScriptID to the ElementCodeID when you want to interact with sound elements loaded
in the script. When you load a sound element from code, by using
DEMOGL_SoundSystemLoadElement, the function returns
an ElementCodeID automatically.