172 void play3DSound(
int soundID,
float posX,
float posY,
float posZ );
228 void changePosition(
int soundID,
float posX,
float posY,
float posZ );
void setPitch(float pitch)
Set the Pitch of the new sound to create. This Function is used when creating a new sound...
void setVolume(float volume)
Set the Volume of the new sound to create. This Function is used when creating a new sound...
void changePitch(int soundID, float pitch)
Change the Pitch of a sound without stopping and restarting the effect. It also works on sounds that ...
void changeVolume(int soundID, float volume)
Change the Volume of a sound without stopping and playing the effect. It also works on sounds that lo...
int isPlaying(int soundID)
Check whether a sound is being played. Looped sounds are automatically stopped, so their playing flag...
void setRolloff(int soundID, float rolloff)
Sets the sounds attenuation fall off amount ie how quicly the sound fades out.
void play3DSound(int soundID, float posX, float posY, float posZ)
Play the Specified sound in 3D space by passing this function a Sound ID. This will play the sound at...
void setMaxDistance(int soundID, float distance)
Sets the sounds max attenuation distance. At this distance the sound will be at its lowest volume or ...
void changePosition(int soundID, float posX, float posY, float posZ)
Change the location in world space of a 3D sound that is playing. The 3D sound can be accessed by pas...
sound distanceAttenuation(int soundID, float minDistance, float maxDistance, float minimum, float maximum)
add to an update() to give an spawned sound distance attenuation.
void freeSound(int soundID)
Frees the sound for reuse. It also works on sounds that loop and sounds that are lengthy.
void setIsStreamed(int enableState)
Set whether the Soundfile is streamed from the hard drive. This Function is used when creating a new ...
void setLooped(int enableState)
Set the looped state of the sound. This Function is used when creating a new sound. You need to set this function before calling createSound() or create3DSound().
Definition: LUA_API_Sound.h:40
void setSoundFile(string soundFilename)
Set the Soundfile to use. This Function is used when creating a new sound. You need to set this func...
void setMinDistance(int soundID, float distance)
Sets the sounds min attenuation distance. This is where the sound will be at its loudest before atten...
int createSound()
Create a new 2D Sound using the Properties you set by calling the previous functions. This will return a sound ID that you can use to identify the sound.
void play2DSound(int soundID)
Play the Specified sound by passing this function a Sound ID.
void stopSound(int soundID)
Stop a sound that is currently playing.