-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWavInstance.h
More file actions
27 lines (25 loc) · 892 Bytes
/
WavInstance.h
File metadata and controls
27 lines (25 loc) · 892 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#pragma once
#include "SoLoud.h"
#include "AudioSourceInstance.h"
namespace fdm::SoLoud
{
class Wav;
class WavInstance : public SoLoud::AudioSourceInstance
{
public:
SoLoud::Wav* mParent; // 0x1F0
uint32_t mOffset; // 0x1F8
uint32_t getAudio(float* aBuffer, uint32_t aSamplesToRead, uint32_t aBufferSize) override
{
return reinterpret_cast<uint32_t (__thiscall*)(SoLoud::WavInstance* self, float*, uint32_t, uint32_t)>(getFuncAddr((int)Func::SoLoud::WavInstance::getAudio))(this, aBuffer, aSamplesToRead, aBufferSize);
}
bool hasEnded() override
{
return reinterpret_cast<bool (__thiscall*)(SoLoud::WavInstance* self)>(getFuncAddr((int)Func::SoLoud::WavInstance::hasEnded))(this);
}
uint32_t rewind() override
{
return reinterpret_cast<uint32_t (__thiscall*)(SoLoud::WavInstance* self)>(getFuncAddr((int)Func::SoLoud::WavInstance::rewind))(this);
}
};
}