DemoGL::Reference::Functions::DEMOGL_SoundSystemSetChannel3DAttributes

DEMOGL_SoundSystemSetChannel3DAttributes

DEMOGL_SoundSystemChannelSet3DAttributes applies the given 3D attributes to the given channel.

int
DEMOGL_SoundSystemSetChannel3DAttributes(
	const int iChannelCodeID,
	SSoundElement3DAttributes * const p3DAttributes
);
	
Parameters.
iChannelCodeID
Specifies the ChannelCodeID of the channel which 3D attributes should be set.
p3DAttributes
Pointer to filled SSoundElement3DAttributes structure with the 3D attributes to apply to the channel with ChannelCodeID iChannelCodeID

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_CHANNELACTIONFAILED The underlying sound library reported an error while applying the 3D attributes to the channel or the element which owns the sound data the given channel is playing is loaded without 3D enabled, see DEMOGL_SoundSystemLoadElement
DGL_SS_ERR_CHANNELNOTINUSE The iChannelCodeID value is not found as an active channel.
DGL_SS_ERR_ILLEGALELEMENTTYPE The channel specified is playing data belonging to an element of an unknown type. This is caused by an implementation error. Should not happen.

Remarks.
Only the channel with the codeID iChannelCodeID is affected with the 3D attributes, not the element. When the element which owns the data the given channel is playing is started again, so it's started on another channel, this new channel will use the default 3D attributes set with the element. The channel which 3D attributes were altered using DEMOGL_SoundSystemSetChannel3DAttributes continues using the altered settings.

Example.

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

See also.
DEMOGL_SoundSystemLoadElement, DEMOGL_SoundSystemStartElement, SSoundElement3DAttributes

Last changed on 18-jan-2001

©1999-2001 Solutions Design