|
function | clone () |
|
function | create (local sampleRate, local bitDepth, local channels, local buffers) |
|
function | createFromDecoder (local decoder) |
|
function | createFromSoundData (local soundData) |
|
function | getActiveEffects () |
| Gets a list of the Source's active effect names. More...
|
|
function | getAirAbsorptionFactor () |
|
function | getBitDepth () |
|
function | getBytesPerFrame () |
|
function | getChannelCount () |
|
function | getCone () |
|
function | getDirection () |
|
function | getEffect (local name) |
| Gets the filter settings associated to a specific effect. More...
|
|
function | getFilter () |
| Gets the filter settings currently applied to the Source. More...
|
|
function | getFreeBufferCount () |
| Gets the number of free buffer slots in a queueable Source. More...
|
|
function | getLastError () |
|
function | getLoopingEnd () |
|
function | getLoopingStart () |
|
function | getMaxDistance () |
|
function | getMaxVolume () |
|
function | getMinVolume () |
|
function | getPitch () |
|
function | getPosition () |
|
function | getReferenceDistance () |
|
function | getRolloffFactor () |
|
function | getSampleRate () |
|
function | getTime () |
|
function | getTotalFrames () |
|
function | getTotalTime () |
|
function | getVelocity () |
|
function | getVolume () |
|
function | isFinished () |
|
function | isLooping () |
|
function | isPlaying () |
|
function | isRelative () |
|
function | isSupportLoopingPoint () |
|
function | pause () |
|
function | pauseAll () |
|
function | pauseBatch (local sources) |
|
function | play () |
|
function | playBatch (local sources) |
|
function | queue (local data, local offset, local length) |
| Queues SoundData for playback in a queueable Source. More...
|
|
function | removeEffect (local name) |
| Disables the effect. More...
|
|
function | removeFilter () |
| Disables filtering on this Source. More...
|
|
function | seek (local offset) |
|
function | setAirAbsorptionFactor (local value) |
|
function | setCone (local innerAngle, local outerAngle, local outerVolume, local outerHighGain) |
|
function | setDirection (local v) |
|
function | setEffect (local name, local filterParams) |
| Applies the given previously defined effect to this Source,
More...
|
|
function | setFilter (local params) |
| Sets a low-pass, high-pass, or band-pass filter to apply when playing the Source. More...
|
|
function | setLooping (local enable) |
|
function | setLoopingPoint (local tStart, local tEnd) |
|
function | setMaxDistance (local value) |
|
function | setMaxVolume (local value) |
|
function | setMinVolume (local value) |
|
function | setPitch (local value) |
|
function | setPosition (local v) |
|
function | setReferenceDistance (local value) |
|
function | setRelative (local enable) |
|
function | setRolloffFactor (local value) |
|
function | setTime (local seconds) |
|
function | setVelocity (local v) |
|
function | setVolume (local value) |
|
function | stop () |
|
function | stopAll () |
|
function | stopBatch (local sources) |
|
function | tell () |
|
◆ clone()
◆ create()
- Parameters
-
sampleRate | number |
bitDepth | number |
channels | number |
buffers | number |
- Returns
- audio.Source
◆ createFromDecoder()
◆ createFromSoundData()
◆ getActiveEffects()
Gets a list of the Source's active effect names.
- Returns
- A list of the source's active effect names.
-
array_table
◆ getAirAbsorptionFactor()
◆ getBitDepth()
◆ getBytesPerFrame()
◆ getChannelCount()
◆ getCone()
◆ getDirection()
◆ getEffect()
Gets the filter settings associated to a specific effect.
This function returns empty map if the effect was applied with no filter settings associated to it.
- Parameters
-
name | The name of the effect. |
- Returns
- The settings for the filter associated to this effect.
- Parameters
-
- Returns
- map_table
◆ getFilter()
Gets the filter settings currently applied to the Source.
- Returns
- The filter settings to use for this Source, or empty map if the Source has no active filter.
-
map_table
◆ getFreeBufferCount()
Gets the number of free buffer slots in a queueable Source.
If the queueable Source is playing, this value will increase up to the amount the Source was created with.
If the queueable Source is stopped, it will process all of its internal buffers first, in which case this
function will always return the amount it was created with.
- Returns
- How many more SoundData objects can be queued up.
-
number
◆ getLastError()
◆ getLoopingEnd()
◆ getLoopingStart()
◆ getMaxDistance()
◆ getMaxVolume()
◆ getMinVolume()
◆ getPitch()
◆ getPosition()
◆ getReferenceDistance()
◆ getRolloffFactor()
◆ getSampleRate()
◆ getTime()
◆ getTotalFrames()
◆ getTotalTime()
◆ getVelocity()
◆ getVolume()
◆ isFinished()
◆ isLooping()
◆ isPlaying()
◆ isRelative()
◆ isSupportLoopingPoint()
◆ pause()
◆ pauseAll()
◆ pauseBatch()
◆ play()
◆ playBatch()
- Parameters
-
- Returns
- boolean
◆ queue()
Queues SoundData for playback in a queueable Source.
- Parameters
-
data | The data to queue. The SoundData's sample rate, bit depth, and channel count must match the Source's. |
offset | |
length | |
- Returns
- True if the data was successfully queued for playback, false if there were no available buffers to use for queueing.
- Parameters
-
- Returns
- boolean
◆ removeEffect()
Disables the effect.
- Parameters
-
- Returns
- boolean
◆ removeFilter()
Disables filtering on this Source.
- Returns
- boolean
◆ seek()
◆ setAirAbsorptionFactor()
◆ setCone()
◆ setDirection()
◆ setEffect()
Applies the given previously defined effect to this Source,
- Parameters
-
name | string |
filterParams | map_table |
- Returns
- boolean
- 重载
- fun(self:audio.Source, name:string):boolean
◆ setFilter()
Sets a low-pass, high-pass, or band-pass filter to apply when playing the Source.
- Parameters
-
params | The filter settings to use for this Source. |
- Returns
- Whether the filter was successfully applied to the Source.
- Note
- Audio filter functionality is not supported on iOS.
While the cutoff frequency cannot be set directly, changing high/lowgain has the effect of altering the cutoff.
- Parameters
-
- Returns
- boolean
◆ setLooping()
◆ setLoopingPoint()
◆ setMaxDistance()
◆ setMaxVolume()
◆ setMinVolume()
◆ setPitch()
◆ setPosition()
◆ setReferenceDistance()
◆ setRelative()
◆ setRolloffFactor()
◆ setTime()
◆ setVelocity()
◆ setVolume()
◆ stop()
◆ stopAll()
◆ stopBatch()
◆ tell()
The documentation for this class was generated from the following file: