AudioSource
Base class for audio sources
Static Members
create(): AudioSource
Returns |
---|
AudioSource |
Instance Members
mFlags: AudioSourceFlags
Flags. See AudioSource::FLAGS
mBaseSamplerate: cpp.Float32
Base sample rate, used to initialize instances
mVolume: cpp.Float32
Default volume for created instances
mChannels: cpp.UInt32
Number of channels this audio source produces
mAudioSourceID: cpp.UInt32
Sound source ID. Assigned by SoLoud the first time it's played.
m3dMinDistance: cpp.Float32
3d min distance
m3dMaxDistance: cpp.Float32
3d max distance
m3dAttenuationRolloff: cpp.Float32
3d attenuation rolloff factor
m3dAttenuationModel: cpp.UInt32
3d attenuation model
m3dDopplerFactor: cpp.Float32
3d doppler factor
mFilter: cpp.Pointer<Filter>
Filter pointer
mSoloud: Soloud
Pointer to the Soloud object. Needed to stop all instances in dtor.
mCollider: AudioCollider
Pointer to a custom audio collider object
mAttenuator: AudioAttenuator
Pointer to custom attenuator object
mColliderData: cpp.Int32
User data related to audio collider
mLoopPoint: Time
When looping, start playing from this time
destroy(): Void
setVolume(aVolume: cpp.Float32): Void
Set default volume for instances
Name | Type |
---|---|
aVolume |
cpp.Float32 |
Set the looping of the instances created from this audio source
Name | Type |
---|---|
aLoop |
Bool |
Set whether only one instance of this sound should ever be playing at the same time
Name | Type |
---|---|
aSingleInstance |
Bool |
set3dMinMaxDistance(aMinDistance: cpp.Float32, aMaxDistance: cpp.Float32): Void
Set the minimum and maximum distances for 3d audio source (closer to min distance = max vol)
Name | Type |
---|---|
aMinDistance |
cpp.Float32 |
aMaxDistance |
cpp.Float32 |
set3dAttenuation(aAttenuationModel: cpp.UInt32, aAttenuationRolloffFactor: cpp.Float32): Void
Set attenuation model and rolloff factor for 3d audio source
Name | Type |
---|---|
aAttenuationModel |
cpp.UInt32 |
aAttenuationRolloffFactor |
cpp.Float32 |
set3dDopplerFactor(aDopplerFactor: cpp.Float32): Void
Set doppler factor to reduce or enhance doppler effect, default = 1.0
Name | Type |
---|---|
aDopplerFactor |
cpp.Float32 |
Set the coordinates for this audio source to be relative to listener's coordinates.
Name | Type |
---|---|
aListenerRelative |
Bool |
Enable delaying the start of the sound based on the distance.
Name | Type |
---|---|
aDistanceDelay |
Bool |
set3dCollider(aCollider: AudioCollider, ?aUserData: cpp.Int32 = 0): Void
Set a custom 3d audio collider. Set to NULL to disable.
Name | Type | Default |
---|---|---|
aCollider |
AudioCollider | |
aUserData |
cpp.Int32 | 0 |
set3dAttenuator(aAttenuator: AudioAttenuator): Void
Set a custom attenuator. Set to NULL to disable.
Name | Type |
---|---|
aAttenuator |
AudioAttenuator |
Set behavior for inaudible sounds
Name | Type |
---|---|
aMustTick |
Bool |
aKill |
Bool |
Set time to jump to when looping
Name | Type |
---|---|
aLoopPoint |
Time |
getLoopPoint(): Time
Get current loop point value
Returns |
---|
Time |
setFilter(aFilterId: cpp.UInt32, aFilter: Filter): Void
Set filter. Set to NULL to clear the filter.
Name | Type |
---|---|
aFilterId |
cpp.UInt32 |
aFilter |
Filter |
createInstance(): AudioSourceInstance
Create instance from the audio source. Called from within Soloud class.
Returns |
---|
AudioSourceInstance |
stop(): Void
Stop all instances of this audio source
Metadata
Name | Parameters |
---|---|
:include |
"linc_soloud.h" |