28 #ifndef _AKFXDURATIONHANDLER_H_
29 #define _AKFXDURATIONHANDLER_H_
31 #include <AK/SoundEngine/Common/AkTypes.h>
41 AkReal32 in_fDuration,
42 AkInt16 in_iLoopingCount,
43 AkUInt32 in_uSampleRate
87 inline AKRESULT
ProduceBuffer( AkUInt16 in_uMaxFrames, AkUInt16 & out_uValidFrames )
90 out_uValidFrames = in_uMaxFrames;
91 AKRESULT eState = AK_DataReady;
100 if ( uFramesRemaining <= in_uMaxFrames )
102 out_uValidFrames = (AkUInt16)uFramesRemaining;
103 eState = AK_NoMoreData;
108 out_uValidFrames = 0;
109 eState = AK_NoMoreData;
126 #endif // _AKFXDURATIONHANDLER_H_
AKRESULT eState
Execution status
void Reset()
Reset looping and frame counters and start again.
AkUInt16 uValidFrames
Number of valid sample frames in the audio buffer.
void SetDuration(AkReal32 in_fDuration)
Set current duration per iteration (in secs).
void Setup(AkReal32 in_fDuration, AkInt16 in_iLoopingCount, AkUInt32 in_uSampleRate)
Setup duration handler.
AKRESULT ProduceBuffer(AkUInt16 in_uMaxFrames, AkUInt16 &out_uValidFrames)
void SetLooping(AkInt16 in_iNumLoops)
Change number of loop iterations (0 == infinite).
AkUInt32 m_uIterationFrame
AkReal32 GetDuration() const
Return current total duration (considering looping) in secs.
void ProduceBuffer(AkAudioBuffer *io_pBuffer)
AkForceInline AkUInt16 MaxFrames() const
Tell us about your project. We're here to help.
Register your project and we'll help you get started with no strings attached!
Get started with Wwise