Soloud core class.
Static methods
Methods
init(flags:SoloudFlags = 0, backend:SoloudBackends = AUTO, samplerate:UInt32 = 0, bufferSize:UInt32 = 0, channels:UInt32 = 2):Result
Initialize SoLoud. Must be called before SoLoud can be used.
setSpeakerPosition(aChannel:UInt32, aX:Float32, aY:Float32, aZ:Float32):Result
Set speaker position in 3d space
getSpeakerPosition(aChannel:UInt32, aX:Reference<Float32>, aY:Reference<Float32>, aZ:Reference<Float32>):Result
Get speaker position in 3d space
inlineplay(aSound:AudioSource, aVolume:Float32 = -1.0, aPan:Float32 = 0.0, aPaused:Bool = false, aBus:UInt32 = 0):Handle
Start playing a sound. Returns voice handle, which can be ignored or used to alter the playing sound's parameters. Negative volume means to use default.
inlineplayClocked(aSoundTime:Time, aSound:AudioSource, aVolume:Float32 = -1.0, aPan:Float32 = 0.0, aBus:UInt32 = 0):Handle
Start playing a sound delayed in relation to other sounds called via this function. Negative volume means to use default.
inlineplay3d(aSound:AudioSource, aPosX:Float32, aPosY:Float32, aPosZ:Float32, aVelX:Float32 = 0.0, aVelY:Float32 = 0.0, aVelZ:Float32 = 0.0, aVolume:Float32 = 1.0, aPaused:Bool = false, aBus:UInt32 = 0):Handle
Start playing a 3d audio source
inlineplay3dClocked(aSoundTime:Time, aSound:AudioSource, aPosX:Float32, aPosY:Float32, aPosZ:Float32, aVelX:Float32 = 0.0, aVelY:Float32 = 0.0, aVelZ:Float32 = 0.0, aVolume:Float32 = 1.0, aBus:UInt32 = 0):Handle
Start playing a 3d audio source, delayed in relation to other sounds called via this function.
inlineplayBackground(aSound:AudioSource, aVolume:Float32 = -1.0, aPaused:Bool = false, aBus:UInt32 = 0):Handle
Start playing a sound without any panning. It will be played at full volume.
seek(aVoiceHandle:Handle, aSeconds:Time):Result
Seek the audio stream to certain point in time. Some streams can't seek backwards. Relative play speed affects time.
setFilterParameter(aVoiceHandle:Handle, aFilterId:UInt32, aAttributeId:UInt32, aValue:Float32):Void
Set a live filter parameter. Use 0 for the global filters.
getFilterParameter(aVoiceHandle:Handle, aFilterId:UInt32, aAttributeId:UInt32):Float32
Get a live filter parameter. Use 0 for the global filters.
fadeFilterParameter(aVoiceHandle:Handle, aFilterId:UInt32, aAttributeId:UInt32, aTo:Float32, aTime:Time):Void
Fade a live filter parameter. Use 0 for the global filters.
oscillateFilterParameter(aVoiceHandle:Handle, aFilterId:UInt32, aAttributeId:UInt32, aFrom:Float32, aTo:Float32, aTime:Time):Void
Oscillate a live filter parameter. Use 0 for the global filters.
isValidVoiceHandle(aVoiceHandle:Handle):Bool
Check if the handle is still valid, or if the sound has stopped.
setInaudibleBehavior(aVoiceHandle:Handle, aMustTick:Bool, aKill:Bool):Void
Set behavior for inaudible sounds
setPan(aVoiceHandle:Handle, aPan:Float32):Void
Set panning value; -1 is left, 0 is center, 1 is right
setPanAbsolute(aVoiceHandle:Handle, aLVolume:Float32, aRVolume:Float32, aLBVolume:Float32 = 0, aRBVolume:Float32 = 0, aCVolume:Float32 = 0, aSVolume:Float32 = 0):Void
Set absolute left/right volumes
setDelaySamples(aVoiceHandle:Handle, aSamples:UInt32):Void
Set delay, in samples, before starting to play samples. Calling this on a live sound will cause glitches.
fadeRelativePlaySpeed(aVoiceHandle:Handle, aTo:Float32, aTime:Time):Void
Set up relative play speed fader
oscillateVolume(aVoiceHandle:Handle, aFrom:Float32, aTo:Float32, aTime:Time):Void
Set up volume oscillator
oscillatePan(aVoiceHandle:Handle, aFrom:Float32, aTo:Float32, aTime:Time):Void
Set up panning oscillator
oscillateRelativePlaySpeed(aVoiceHandle:Handle, aFrom:Float32, aTo:Float32, aTime:Time):Void
Set up relative play speed oscillator
setGlobalFilter(aFilterId:UInt32, aFilter:Filter):Void
Set global filters. Set to NULL to clear the filter.
calcFFT():Pointer<Float32>
Calculate and get 256 floats of FFT data for visualization. Visualization has to be enabled before use.
getWave():Pointer<Float32>
Get 256 floats of wave data for visualization. Visualization has to be enabled before use.
getApproximateVolume(aChannel:UInt32):Float32
Get approximate output volume for a channel for visualization. Visualization has to be enabled before use.
getLoopCount(aVoiceHandle:Handle):UInt32
Get current loop count. Returns 0 if is:Handle not valid. (All audio sources may not update loop count)
getInfo(aVoiceHandle:Handle, aInfoKey:UInt32):Float32
Get audiosource-specific information from a voice.
createVoiceGroup():Handle
Create a voice group. Returns 0 if unable (out of voice groups / out of memory)
addVoiceToGroup(aVoiceGroupHandle:Handle, aVoiceHandle:Handle):Result
Add a voice to:Handle a voice group
set3dListenerParameters(aPosX:Float32, aPosY:Float32, aPosZ:Float32, aAtX:Float32, aAtY:Float32, aAtZ:Float32, aUpX:Float32, aUpY:Float32, aUpZ:Float32, aVelocityX:Float32 = 0.0, aVelocityY:Float32 = 0.0, aVelocityZ:Float32 = 0.0):Void
Set 3d listener parameters
set3dListenerVelocity(aVelocityX:Float32, aVelocityY:Float32, aVelocityZ:Float32):Void
Set 3d listener velocity
set3dSourceParameters(aVoiceHandle:Handle, aPosX:Float32, aPosY:Float32, aPosZ:Float32, aVelocityX:Float32 = 0.0, aVelocityY:Float32 = 0.0, aVelocityZ:Float32 = 0.0):Void
Set 3d audio source parameters
set3dSourcePosition(aVoiceHandle:Handle, aPosX:Float32, aPosY:Float32, aPosZ:Float32):Void
Set 3d audio source position
set3dSourceVelocity(aVoiceHandle:Handle, aVelocityX:Float32, aVelocityY:Float32, aVelocityZ:Float32):Void
Set 3d audio source velocity
set3dSourceMinMaxDistance(aVoiceHandle:Handle, aMinDistance:Float32, aMaxDistance:Float32):Void
Set 3d audio source min/max distance (distance < min means max volume)
set3dSourceAttenuation(aVoiceHandle:Handle, aAttenuationModel:UInt32, aAttenuationRolloffFactor:Float32):Void
Set 3d audio source attenuation parameters
set3dSourceDopplerFactor(aVoiceHandle:Handle, aDopplerFactor:Float32):Void
Set 3d audio source doppler factor to reduce or enhance doppler effect. Default = 1.0
mix(aBuffer:Pointer<Float32>, aSamples:UInt32):Void
Returns mixed samples:cpp.Float32 in buffer. Called by the back-end, or user with null driver.
mixSigned16(aBuffer:Pointer<UInt16>, aSamples:UInt32):Void
Returns mixed 16-bit signed integer samples in buffer. Called by the back-end, or user with null driver.