|
TorqueScript Reference
|
Functions | |
| String | alGetListener3f (ALEnum) |
| Integer | alGetListeneri (ALEnum) |
| String | alGetString (ALEnum) |
| void | alListener3f (ALEnum, x, y, z) |
| Integer | alxCreateSource (audio-assetId) |
| Integer | alxGetAudioLength (audio-assetId) |
| Float | alxGetChannelVolume (channelID) |
| Float | alxGetListenerf (ALEnum) |
| String | alxGetSource3f (handle, ALEnum) |
| Float | alxGetSourcef (handle, ALEnum) |
| Integer | alxGetSourcei (handle, ALEnum) |
| Float | alxGetStreamDuration (handle) |
| Float | alxGetStreamPosition (handle) |
| Boolean | alxIsPlaying (handle) |
| void | alxListenerf (AlEnum, value) |
| Boolean | alxPause (handle) |
| Integer | alxPlay (audio-assetId) |
| Integer | alxPlayPreview (audio-assetId) |
| Boolean | alxSetChannelVolume (channelD, volume) |
| void | alxSource3f (handle, ALEnum, x, y, z) |
| void | alxSourcef (handle, ALEnum, value) |
| void | alxSourcei (handle, ALEnum, value) |
| void | alxStop (handle) |
| void | alxStopAll () |
| void | alxUnpause (handle) |
| Boolean | OpenALInitDriver () |
| Boolean | OpenALIsInitialized () |
| void | OpenALRegisterExtensions () |
| void | OpenALShutdownDriver () |
| String alGetListener3f | ( | ALEnum | ) |
Use the al*GetListener* function to get the current value of a listener parameter, as specified by ALEnum. Depending on the ALEnum you need to acquire, be sure to use the correct version (i.e. correct return type) of al*GetListener*.
| ALEnum | A string containing an OpenAL enumerated type name. See (above) table of ALEnum values for legal values. |
| Integer alGetListeneri | ( | ALEnum | ) |
Use the al*GetListener* function to get the current value of a listener parameter, as specified by ALEnum. Depending on the ALEnum you need to acquire, be sure to use the correct version (i.e. correct return type) of al*GetListener*.
| ALEnum | A string containing an OpenAL enumerated type name. See (above) table of ALEnum values for legal values. |
| String alGetString | ( | ALEnum | ) |
Use the alGetString function to get the string equivalent to the specified OpenAL enumerated value.
| ALEnum | A string containing an OpenAL enumerated type name. See (above) table of ALEnum values for legal values. |
| void alListener3f | ( | ALEnum | , |
| x | , | ||
| y | , | ||
| z | ) |
Use the al*Listener* function to set a listener parameter(s) as specified by the OpenAL enumerated type ALEnum.
| ALEnum | A string containing an OpenAL enumerated type name. See (above) table of ALEnum values for legal values. |
| x,y,z | XYZ floating-point coordinates. |
| Integer alxCreateSource | ( | audio- | assetId | ) |
Create a source from the specified asset Id.
| audio-assetId | The asset Id to create the source from. |
| Integer alxGetAudioLength | ( | audio- | assetId | ) |
Use the alxGetAudioLength function to get the play-length of a specified resource sound file in milliseconds.
| audio-assetId | The asset Id that specifies the audio file to check. |
| Float alxGetChannelVolume | ( | channelID | ) |
Use the alxGetChannelVolume function to get the volume setting for a specified channel.
| channelID | An integer value, equal to or greater than 0, corresponding to a valid audio channel. |
| Float alxGetListenerf | ( | ALEnum | ) |
Use the al*GetListener* function to get the current value of a listener parameter, as specified by ALEnum. Depending on the ALEnum you need to acquire, be sure to use the correct version (i.e. correct return type) of al*GetListener*.
| ALEnum | A string containing an OpenAL enumerated type name. See (above) table of ALEnum values for legal values. |
| String alxGetSource3f | ( | handle | , |
| ALEnum | ) |
Use the alxGetSource* function to get the current value of a source parameter, as specified by ALEnum. Depending on the ALEnum you need to acquire, be sure to use the correct version (i.e. correct return type) of alxGetSource*.
| handle | The ID (a non-negative integer) corresponding to a previously set up sound source. |
| ALEnum | A string containing an OpenAL enumerated type name. |
| Float alxGetSourcef | ( | handle | , |
| ALEnum | ) |
Use the alxGetSource* function to get the current value of a source parameter, as specified by ALEnum. Depending on the ALEnum you need to acquire, be sure to use the correct version (i.e. correct return type) of alxGetSource*.
| handle | The ID (a non-negative integer) corresponding to a previously set up sound source. |
| ALEnum | A string containing an OpenAL enumerated type name. See (above) table of ALEnum values for legal values. |
| Integer alxGetSourcei | ( | handle | , |
| ALEnum | ) |
Use the alxGetSource* function to get the current value of a source parameter, as specified by ALEnum. Depending on the ALEnum you need to acquire, be sure to use the correct version (i.e. correct return type) of alxGetSource*.
| handle | The ID (a non-negative integer) corresponding to a previously set up sound source. |
| ALEnum | A string containing an OpenAL enumerated type name. See (above) table of ALEnum values for legal values. |
| Float alxGetStreamDuration | ( | handle | ) |
Use the alxGetStreamDuration function to determine the length of a previously set up sound in seconds.
| handle | The ID (a non-negative integer) corresponding to a previously set up sound source. |
| Float alxGetStreamPosition | ( | handle | ) |
Use the alxGetStreamPosition function to get the current play position for a playing sound. Note, this value is a percentage equivalent to the percent of the sound that as already played.
| handle | The ID (a non-negative integer) corresponding to a previously set up sound source. |
| Boolean alxIsPlaying | ( | handle | ) |
Use the alxIsPlaying function to determine if the sound associated with a previously set-up sound handle is playing or not.
| handle | The ID (a non-negative integer) corresponding to a previously set up sound source. |
| void alxListenerf | ( | AlEnum | , |
| value | ) |
Use the al*Listener* function to set a listener parameter(s) as specified by the OpenAL enumerated type ALEnum.
| ALEnum | A string containing an OpenAL enumerated type name. See (above) table of ALEnum values for legal values. |
| value | An ALEnum type specific value corresponding to the new value for this enumerated parameters. |
| Boolean alxPause | ( | handle | ) |
Use the alxPause function to pause a currently playing sound as specified by handle.
| handle | The ID (a non-negative integer) corresponding to a previously set up sound source. |
| Integer alxPlay | ( | audio- | assetId | ) |
Play the audio asset Id.
| audio-assetId | The asset Id to play. |
| Integer alxPlayPreview | ( | audio- | assetId | ) |
Use the alxPlayPreview function to audition an audio asset as it was authored, ignoring the running game's mixer settings. Same file, looping and streaming behaviour as alxPlay, but played at full volume on a reserved channel and past the master volume. This exists because the engine will not create a source at all on a channel the game has muted, so a game with its music turned down makes every music asset unplayable in an editor. Stop it with alxStop, exactly like alxPlay. For editors – a game wants alxPlay.
| audio-assetId | The asset Id to audition. |
| Boolean alxSetChannelVolume | ( | channelD | , |
| volume | ) |
Use the alxSetChannelVolume function to set a volume [ 0.0, 1.0 ] for the channel specified by channelID.
| channelID | An integer value, equal to or greater than 0, corresponding to a valid audio channel. |
| volume | A value between 0.0 and 1.0 specifying the new volume for the specified channel. |
| void alxSource3f | ( | handle | , |
| ALEnum | , | ||
| x | , | ||
| y | , | ||
| z | ) |
Use the alxSource* function to set a source parameter(s) as specified by the OpenAL enumerated type ALEnum.
| handle | The ID (a non-negative integer) corresponding to a previously set up sound source. |
| ALEnum | A string containing an OpenAL enumerated type name. See (above) table of ALEnum values for legal values. |
| x,y,z | XYZ floating-point coordinates. |
| void alxSourcef | ( | handle | , |
| ALEnum | , | ||
| value | ) |
Use the alxSource* function to set a source parameter(s) as specified by the OpenAL enumerated type ALEnum.
| handle | The ID (a non-negative integer) corresponding to a previously set up sound source. |
| ALEnum | A string containing an OpenAL enumerated type name. See (above) table of ALEnum values for legal values. |
| value | An ALEnum type specific value corresponding to the new value for this enumerated parameters. |
| void alxSourcei | ( | handle | , |
| ALEnum | , | ||
| value | ) |
Use the alxSource* function to set a source parameter(s) as specified by the OpenAL enumerated type ALEnum.
| handle | The ID (a non-negative integer) corresponding to a previously set up sound source. |
| ALEnum | A string containing an OpenAL enumerated type name. See (above) table of ALEnum values for legal values. |
| value | An ALEnum type specific value corresponding to the new value for this enumerated parameters. |
| void alxStop | ( | handle | ) |
Use the alxStop function to stop a currently playing sound as specified by handle.
| handle | The ID (a non-negative integer) corresponding to a previously set up sound source. |
| void alxStopAll | ( | ) |
Use the alxStopAll function to stop all currently playing sounds associated with registered handles.
| void alxUnpause | ( | handle | ) |
Use the alxUnpause function to resume playing a currently paused sound as specified by handle.
| handle | The ID (a non-negative integer) corresponding to a previously set up sound source. |
| Boolean OpenALInitDriver | ( | ) |
Use the OpenALInitDriver function to initialize the OpenAL driver. This must be done before all other OpenAL operations.
| Boolean OpenALIsInitialized | ( | ) |
Use the OpenALIsInitialized function to find out whether the OpenAL driver is already running. Worth asking before OpenALInitDriver: that call shuts the driver down before it starts it, so calling it a second time drops every playing sound and resets the channel volumes.
| void OpenALRegisterExtensions | ( | ) |
| void OpenALShutdownDriver | ( | ) |
Use the OpenALShutdownDriver function to stop/shut down the OpenAL driver. After this is called, you must restart the driver with OpenALInitDriver to execute any new sound operations.