AudioSourceInstance
Static Members
create(): AudioSourceInstance| Returns |
|---|
| AudioSourceInstance |
Instance Members
mPlayIndex: cpp.UInt32Play index; used to identify instances from handles
mLoopCount: cpp.UInt32Loop count
mFlags: cpp.UInt32Flags; see AudioSourceInstance::FLAGS
mPan: cpp.Float32Pan value, for getPan()
mChannelVolume: cpp.Pointer<cpp.Float32>Volume for each channel (panning)
mSetVolume: cpp.Float32Set volume
mOverallVolume: cpp.Float32Overall volume overall = set * 3d
mBaseSamplerate: cpp.Float32Base samplerate; samplerate = base samplerate * relative play speed
mSamplerate: cpp.Float32Samplerate; samplerate = base samplerate * relative play speed
mChannels: cpp.UInt32Number of channels this audio source produces
mSetRelativePlaySpeed: cpp.Float32Relative play speed; samplerate = base samplerate * relative play speed
mOverallRelativePlaySpeed: cpp.Float32Overall relative plays peed; overall = set * 3d
mStreamTime: TimeHow long this stream has played, in seconds.
mStreamPosition: TimePosition of this stream, in seconds.
mPanFader: FaderFader for the audio panning
mVolumeFader: FaderFader for the audio volume
mRelativePlaySpeedFader: FaderFader for the relative play speed
mPauseScheduler: FaderFader used to schedule pausing of the stream
mStopScheduler: FaderFader used to schedule stopping of the stream
mActiveFader: cpp.Int32Affected by some fader
mCurrentChannelVolume: cpp.Pointer<cpp.Float32>Current channel volumes, used to ramp the volume changes to avoid clicks
mAudioSourceID: cpp.UInt32ID of the sound source that generated this instance
mBusHandle: cpp.UInt32Handle of the bus this audio instance is playing on. 0 for root.
mFilter: cpp.Pointer<FilterInstance>Filter pointer
mResampleData: cpp.Pointer<AlignedFloatBuffer>Buffers for the resampler
mSrcOffset: cpp.UInt32Sub-sample playhead; 16.16 fixed point
mLeftoverSamples: cpp.UInt32Samples left over from earlier pass
mDelaySamples: cpp.UInt32Number of samples to delay streaming
mLoopPoint: TimeWhen looping, start playing from this time
destroy(): Voidinit(aSource: AudioSource, aPlayIndex: cpp.Int32): VoidInitialize instance. Mostly internal use.
| Name | Type |
|---|---|
aSource |
AudioSource |
aPlayIndex |
cpp.Int32 |
getAudio(aBuffer: cpp.Pointer<cpp.Float32>, aSamplesToRead: cpp.UInt32, aBufferSize: cpp.UInt32): cpp.UInt32Get 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(): BoolHas the stream ended?
| Returns |
|---|
| Bool |
seek(aSeconds: Time, mScratch: cpp.Pointer<cpp.Float32>, mScratchSize: cpp.UInt32): ResultSeek 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(): ResultRewind stream. Base implementation returns NOT_IMPLEMENTED, meaning it can't rewind.
| Returns |
|---|
| Result |
getInfo(aInfoKey: cpp.UInt32): cpp.Float32Get information. Returns 0 by default.
| Name | Type |
|---|---|
aInfoKey |
cpp.UInt32 |
| Returns |
|---|
| cpp.Float32 |