AudioSourceInstance

soloud.AudioSourceInstance (extern class)

Static Members

Returns
AudioSourceInstance

Instance Members

mPlayIndex: cpp.UInt32

Play index; used to identify instances from handles


mLoopCount: cpp.UInt32

Loop count


mFlags: cpp.UInt32

Flags; see AudioSourceInstance::FLAGS


Pan value, for getPan()


mChannelVolume: cpp.Pointer<cpp.Float32>

Volume for each channel (panning)


mSetVolume: cpp.Float32

Set volume


mOverallVolume: cpp.Float32

Overall volume overall = set * 3d


mBaseSamplerate: cpp.Float32

Base samplerate; samplerate = base samplerate * relative play speed


mSamplerate: cpp.Float32

Samplerate; samplerate = base samplerate * relative play speed


mChannels: cpp.UInt32

Number of channels this audio source produces


mSetRelativePlaySpeed: cpp.Float32

Relative play speed; samplerate = base samplerate * relative play speed


mOverallRelativePlaySpeed: cpp.Float32

Overall relative plays peed; overall = set * 3d


mStreamTime: Time

How long this stream has played, in seconds.


mStreamPosition: Time

Position of this stream, in seconds.


mPanFader: Fader

Fader for the audio panning


mVolumeFader: Fader

Fader for the audio volume


mRelativePlaySpeedFader: Fader

Fader for the relative play speed


mPauseScheduler: Fader

Fader used to schedule pausing of the stream


mStopScheduler: Fader

Fader used to schedule stopping of the stream


mActiveFader: cpp.Int32

Affected by some fader


mCurrentChannelVolume: cpp.Pointer<cpp.Float32>

Current channel volumes, used to ramp the volume changes to avoid clicks


mAudioSourceID: cpp.UInt32

ID of the sound source that generated this instance


mBusHandle: cpp.UInt32

Handle of the bus this audio instance is playing on. 0 for root.


Filter pointer


Buffers for the resampler


mSrcOffset: cpp.UInt32

Sub-sample playhead; 16.16 fixed point


mLeftoverSamples: cpp.UInt32

Samples left over from earlier pass


mDelaySamples: cpp.UInt32

Number of samples to delay streaming


mLoopPoint: Time

When looping, start playing from this time


destroy(): Void

init(aSource: AudioSource, aPlayIndex: cpp.Int32): Void

Initialize instance. Mostly internal use.

Name Type
aSource AudioSource
aPlayIndex cpp.Int32

getAudio(aBuffer: cpp.Pointer<cpp.Float32>, aSamplesToRead: cpp.UInt32, aBufferSize: cpp.UInt32): cpp.UInt32

Get N samples from the stream to the buffer. Report samples written.

Name Type
aBuffer cpp.Pointer<cpp.Float32>
aSamplesToRead cpp.UInt32
aBufferSize cpp.UInt32
Returns
cpp.UInt32

hasEnded(): Bool

Has the stream ended?

Returns
Bool

seek(aSeconds: Time, mScratch: cpp.Pointer<cpp.Float32>, mScratchSize: cpp.UInt32): Result

Seek to certain place in the stream. Base implementation is generic "tape" seek (and slow).

Name Type
aSeconds Time
mScratch cpp.Pointer<cpp.Float32>
mScratchSize cpp.UInt32
Returns
Result

rewind(): Result

Rewind stream. Base implementation returns NOT_IMPLEMENTED, meaning it can't rewind.

Returns
Result

getInfo(aInfoKey: cpp.UInt32): cpp.Float32

Get information. Returns 0 by default.

Name Type
aInfoKey cpp.UInt32
Returns
cpp.Float32