AudioSource
Base class for audio sources
Static Members
create(): AudioSource| Returns |
|---|
| AudioSource |
Instance Members
mFlags: AudioSourceFlagsFlags. See AudioSource::FLAGS
mBaseSamplerate: cpp.Float32Base sample rate, used to initialize instances
mVolume: cpp.Float32Default volume for created instances
mChannels: cpp.UInt32Number of channels this audio source produces
mAudioSourceID: cpp.UInt32Sound source ID. Assigned by SoLoud the first time it's played.
m3dMinDistance: cpp.Float323d min distance
m3dMaxDistance: cpp.Float323d max distance
m3dAttenuationRolloff: cpp.Float323d attenuation rolloff factor
m3dAttenuationModel: cpp.UInt323d attenuation model
m3dDopplerFactor: cpp.Float323d doppler factor
mFilter: cpp.Pointer<Filter>Filter pointer
mSoloud: SoloudPointer to the Soloud object. Needed to stop all instances in dtor.
mCollider: AudioColliderPointer to a custom audio collider object
mAttenuator: AudioAttenuatorPointer to custom attenuator object
mColliderData: cpp.Int32User data related to audio collider
mLoopPoint: TimeWhen looping, start playing from this time
destroy(): VoidsetVolume(aVolume: cpp.Float32): VoidSet 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): VoidSet 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): VoidSet attenuation model and rolloff factor for 3d audio source
| Name | Type |
|---|---|
aAttenuationModel |
cpp.UInt32 |
aAttenuationRolloffFactor |
cpp.Float32 |
set3dDopplerFactor(aDopplerFactor: cpp.Float32): VoidSet 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): VoidSet a custom 3d audio collider. Set to NULL to disable.
| Name | Type | Default |
|---|---|---|
aCollider |
AudioCollider | |
aUserData |
cpp.Int32 | 0 |
set3dAttenuator(aAttenuator: AudioAttenuator): VoidSet 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(): TimeGet current loop point value
| Returns |
|---|
| Time |
setFilter(aFilterId: cpp.UInt32, aFilter: Filter): VoidSet filter. Set to NULL to clear the filter.
| Name | Type |
|---|---|
aFilterId |
cpp.UInt32 |
aFilter |
Filter |
createInstance(): AudioSourceInstanceCreate instance from the audio source. Called from within Soloud class.
| Returns |
|---|
| AudioSourceInstance |
stop(): VoidStop all instances of this audio source
Metadata
| Name | Parameters |
|---|---|
:include |
"linc_soloud.h" |