Navigation:  thinBasic Modules > TBASS > Channels >

TBASS_ChannelSet3DPosition

Previous pageReturn to chapter overviewNext page

 

Description

 

Sets the 3D position of a sample, stream, or MOD music channel with 3D functionality.

 

Syntax

 

n = TBASS_ChannelSet3DPosition(hChannel, Pos, Orient, Vel)

 

Returns

 

Number

If successful, then %TBASS_TRUE is returned, else %TBASS_FALSE is returned. Use TBASS_ErrorGetCode to get the error code.

 

Parameters

 

Name

Type

Optional

Meaning

hChannel

Numeric

No

The channel handle... a HCHANNEL, HMUSIC, HSTREAM, or HRECORD.

Pos

pStruct

No

Position of the sound

NULL = leave current

Orient

pStruct

No

Orientation of the sound

NULL = leave current.

This is automatically normalized

Vel

pStruct

No

Velocity of the sound

NULL = leave current.

This is only used to calculate the doppler effect, and has no effect on the sound's position.

 

Remarks

 

Attention: pStruct parameters in this function are pointer to a UDT with the following structure:

 

Type TBASS_3DVECTOR

       As Single

       As Single

       As Single

End Type

 

Use VARPTR to pass a pointer to a variable structure with the above structure.

 

As with all 3D functions, TBASS_Apply3D must be called to apply the changes made

 

Restrictions

 

See also

 

Examples

 

 

© 2004-2008 thinBasic. All rights reserved. Version 1.7.0.0 Web Site: http://www.thinbasic.com