SB AWE32 Developer's Information Pack
PART V 3D Positional Audio API
••
100
Copyright
Creative Technology Ltd., 1994-1996
Version 3.00
c3daSetEmitterPosition
c3daError
PASCAL
c3daSetEmitterPosition(
c3daEmitter FAR* lpEm,
int x,
int y,
int z
)
Actions
Place an emitter object at a position in 3D space relative to the active receiver.
Parameters
lpEm
Specify a far pointer to an emitter object.
x, y, z
Specify the new coordinates of the emitter relative to the active receiver.
Return
Return
c3daSUCCESS
upon success and
c3daFAILURE
otherwise.
Remarks
Calling this function could potentially alter the sound output due to the effects of the
audio spatialization algorithms. Note that all receivers have a fixed orientation where
the head is facing along the positive x-axis and the left ear is along the positive y-axis.
To implement a receiver facing the positive y-axis, following transformation is needed
before calling c3daSetEmitterPosition. Please refer to section Implementing
Receiver Orientation for more information.
int new_x = y - receiver_y;
int new_y = -(x - receiver_x);
int new_z = z - receiver_z;
c3daSetEmitterPosition(&EmitterObj, new_x, new_y, new_z);
c3daSetEmitterOrientation
c3daError
PASCAL
c3daSetEmitterOrientation(
c3daEmitter FAR* lpEm,
int x,
int y,
int z
)
Actions
Set the orientation of an emitter.
Parameters
lpEm
Specify a far pointer to an emitter object.
x, y, z
Specify the orientation vector.
Return
Return
c3daSUCCESS
upon success and
c3daFAILURE
otherwise.