DemoGL::Reference::Functions::DEMOGL_SoundSystemSetElement3DAttributes

DEMOGL_SoundSystemSetElement3DAttributes

DEMOGL_SoundSystemSetElement3DAttributes applies the given 3D attributes to the given element.

int
DEMOGL_SoundSystemSetElement3DAttributes(
	const int iElementCodeID,
	const int iElementType,
	SSoundElement3DAttributes * const p3DAttributes
);
	
Parameters.
iElementCodeID
Specifies the ElementCodeID of the element which 3D attributes should be set.
iElementType
Specifies of which type the to be freed sound element is. iElementType can be one of the following sound element types:

Sound element type Description
DGL_SS_MP3ELEMENT Sound element stored in the MP3 standard, i.e. MPEG v1.0 and v2.0 layer3.
DGL_SS_MODELEMENT Sound element stored in one of the following formats: MOD, XM, IT, S3M or MTM.
DGL_SS_SAMPLEELEMENT Sound element stored in the standard windows PCM format, or compressed with a custom CODEC. When you use a custom CODEC, this CODEC is required to be installed on the user's computer for the WAV to be decoded. So, you should either distribute the CODEC with your software, or use a CODEC that comes with Windows (eg. Microsoft ADPCM).

p3DAttributes
Pointer to filled SSoundElement3DAttributes structure with the 3D attributes to apply to the element with ElementCodeID iElementCodeID

Return values.
If the function succeeds, it returns SYS_OK.
If the function fails, it returns one of the following error codes:

Error code Description
DGL_SS_ERR_ILLEGALELEMENTID The iElementCodeID value is not found as a loaded sound element.
DGL_SS_ERR_ILLEGALELEMENTTYPE The iElementType specified is not known.
DGL_SS_ERR_OPERATIONFAILED The apply of the 3D attributes failed. Possible cause is that the element is not loaded with 3D enabled.

Remarks.
Only the element is affected with the 3D attributes, not the playing channels who play the elements data. When the element is started again after DEMOGL_SoundSystemSetElement3DAttributes was called, the channel created will use the new 3D attributes set with the element. DEMOGL_SoundSystemSetElement3DAttributes only affects elements which are loaded with 3D enabled.

Example.

Requirements.
DemoGL v1.3 (build 0112 or higher)

See also.
DEMOGL_SoundSystemLoadElement, DEMOGL_SoundSystemStartElement, DEMOGL_SoundSystemSetChannel3DAttributes, SSoundElement3DAttributes

Last changed on 18-jan-2001

©1999-2001 Solutions Design