Project

General

Profile

Previous Up Next

as3dSndCreate
Creation of a H3d object from a sound source AsSnd in order to control the spatial positioning of the sound in a 3D scene.

H3d as3dSndCreate (
S3d _session_
AsSnd _sound_
I _flag_
)
Parameters

_session_
3D Session.
_sound_
Sound object to be played with a 3D effect.
_flag_
Creation flag.
Value Meaning
AS_SND_LINKED_TO_H3D The destruction of the H3d results in the destruction of the AsSnd
Return value

The newly created H3d, or nil if the creation failed.
Remark

  • The AsSnd must have been created with the AS_SND_CTRL3D flag.
  • By default, the 3D sound calculation is active upon the creation of the H3d ( as3dSndEnable, as3dSndDisable)
  • Upon reading the AsSnd, the sound will be played in 3D, the position calculations being directly managed by the 3D engine.
  • The calculation of sound in 3D also requires the position of a listener in the scene which will act as the receiver, the H3d being the emitter.
  • From a AsSnd only a single H3d can be created. A second attempt returns the previously created H3d or rebuilds a new one if the first has been destroyed. To obtain several H3ds from the same sound data, begin by copying the AsSnd using the asSndCopy method and then create the H3d from the new AsSnd created.
  • See Also

    Listener creation: as3dListenerCreate