106 return CurrentFrameIndex;
111 return NumFramesInWave;
116 return LoopEndFrameIndex - LoopStartFrameIndex;
121 return LoopStartFrameIndex;
126 return LoopEndFrameIndex;
163 return DecodeResult == EDecodeResult::Fail;
168 enum class EDecodeResult
175 EDecodeResult Decode();
182 void UpdateLoopBoundaries();
188 float SampleRate = 0.f;
189 int32 NumChannels = 0;
190 EDecodeResult DecodeResult = EDecodeResult::MoreDataRemaining;
191 int32 NumFramesInWave = 0;
192 int32 NumDecodeSamplesToDiscard = 0;
193 int32 CurrentFrameIndex = 0;
194 int32 LoopStartFrameIndex = 0;
195 int32 LoopEndFrameIndex = -1;
196 float DurationInSeconds = 0.f;
197 float MaxLoopStartTimeInSeconds = 0.f;
199 bool bIsDecoderValid =
false;
200 bool bFallbackSeekMethodWarningLogged =
false;
209 static constexpr uint32 MinNumFramesPerDecode = 1;
211 bool bIsFirstDecode =
true;
212 bool bPreviousIsStreaming =
true;
213 uint32 NumFramesPerDecode = MinNumFramesPerDecode;
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
Definition SoundWaveProxyReader.h:20
static constexpr uint32 DecodeSizeQuantizationInFrames
Definition SoundWaveProxyReader.h:32
static uint32 ConformDecodeSize(uint32 InMaxDesiredDecodeSizeInFrames)
Definition SoundWaveProxyReader.cpp:33
int32 GetFrameIndex() const
Definition SoundWaveProxyReader.h:104
ENGINE_API bool CanProduceMoreAudio() const
Definition SoundWaveProxyReader.cpp:187
ENGINE_API void SetLoopStartTime(float InLoopStartTimeInSeconds)
Definition SoundWaveProxyReader.cpp:129
static constexpr float MaxLoopDurationInSeconds
Definition SoundWaveProxyReader.h:45
ENGINE_API bool SeekToFrame(uint32 InFrameNum)
Definition SoundWaveProxyReader.cpp:194
bool HasFailed() const
Definition SoundWaveProxyReader.h:161
ENGINE_API int32 PopAudio(Audio::FAlignedFloatBuffer &OutBuffer)
Definition SoundWaveProxyReader.cpp:233
int32 GetNumFramesInLoop() const
Definition SoundWaveProxyReader.h:114
static constexpr uint32 DefaultMinDecodeSizeInFrames
Definition SoundWaveProxyReader.h:26
TSharedRef< FSoundWaveProxy, ESPMode::ThreadSafe > FSoundWaveProxyRef
Definition SoundWaveProxyReader.h:23
ENGINE_API bool SeekToTime(float InSeconds)
Definition SoundWaveProxyReader.cpp:151
int32 GetLoopEndFrameIndex() const
Definition SoundWaveProxyReader.h:124
int32 GetNumChannels() const
Definition SoundWaveProxyReader.h:98
ENGINE_API void SetLoopDuration(float InLoopDurationInSeconds)
Definition SoundWaveProxyReader.cpp:141
bool IsLooping() const
Definition SoundWaveProxyReader.h:78
static constexpr float MinLoopDurationInSeconds
Definition SoundWaveProxyReader.h:37
int32 GetNumFramesInWave() const
Definition SoundWaveProxyReader.h:109
float GetSampleRate() const
Definition SoundWaveProxyReader.h:93
int32 GetLoopStartFrameIndex() const
Definition SoundWaveProxyReader.h:119
ENGINE_API void SetIsLooping(bool bInIsLooping)
Definition SoundWaveProxyReader.cpp:119
Definition SoundWave.h:1742
Definition ArrayView.h:139
Definition UniquePtr.h:107
Definition SoundWaveProxyReader.h:49
float LoopStartTimeInSeconds
Definition SoundWaveProxyReader.h:53
float LoopDurationInSeconds
Definition SoundWaveProxyReader.h:54
uint32 MaxDecodeSizeInFrames
Definition SoundWaveProxyReader.h:50
float StartTimeInSeconds
Definition SoundWaveProxyReader.h:51
bool bIsLooping
Definition SoundWaveProxyReader.h:52
bool bMaintainAudioSync
Definition SoundWaveProxyReader.h:55