isle-portable/LEGO1/lego/legoomni/include/legocachsound.h
Christian Semmler 49a304d0b9
Some checks are pending
Build / Current ${{ matrix.toolchain.name }} (map[clang-tidy:true d3drm-from-wine:true dx5-libs:false msys-env:mingw-w64-i686 msystem:mingw32 name:msys2 mingw32 shell:msys2 {0} werror:true]) (push) Waiting to run
Build / Current ${{ matrix.toolchain.name }} (map[clang-tidy:true d3drm-from-wine:true dx5-libs:false msys-env:mingw-w64-x86_64 msystem:mingw64 name:msys2 mingw64 shell:msys2 {0} werror:true]) (push) Waiting to run
Build / Current ${{ matrix.toolchain.name }} (map[d3drm-from-wine:false dx5-libs:true name:MSVC (32-bit) setup-cmake:true setup-msvc:true setup-ninja:true shell:sh vc-arch:amd64_x86]) (push) Waiting to run
Build / Current ${{ matrix.toolchain.name }} (map[d3drm-from-wine:true dx5-libs:false name:MSVC (64-bit) setup-cmake:true setup-msvc:true setup-ninja:true shell:sh vc-arch:amd64]) (push) Waiting to run
Format / C++ (push) Waiting to run
Naming / C++ (push) Waiting to run
merge
2024-07-04 16:09:48 -07:00

78 lines
2.2 KiB
C++

#ifndef LEGOCACHSOUND_H
#define LEGOCACHSOUND_H
#include "decomp.h"
#include "lego3dsound.h"
#include "mxcore.h"
#include "mxstring.h"
#include "mxwavepresenter.h"
// VTABLE: LEGO1 0x100d4718
// SIZE 0x88
class LegoCacheSound : public MxCore {
public:
LegoCacheSound();
~LegoCacheSound() override; // vtable+0x00
// FUNCTION: LEGO1 0x10006580
const char* ClassName() const override // vtable+0x0c
{
// STRING: LEGO1 0x100f01c4
return "LegoCacheSound";
}
// FUNCTION: LEGO1 0x10006590
MxBool IsA(const char* p_name) const override // vtable+0x10
{
return !strcmp(p_name, LegoCacheSound::ClassName()) || MxCore::IsA(p_name);
}
virtual MxResult Create(
MxWavePresenter::WaveFormat& p_pwfx,
MxString p_mediaSrcPath,
MxS32 p_volume,
MxU8* p_data,
MxU32 p_dataSize
); // vtable+0x14
virtual void Destroy(); // vtable+0x18
virtual void FUN_10006cd0(undefined4, undefined4); // vtable+0x1c
const MxString& GetUnknown0x48() const { return m_unk0x48; }
const MxBool GetUnknown0x58() const { return m_unk0x58; }
LegoCacheSound* Clone();
MxResult Play(const char* p_name, MxBool p_looping);
void FUN_10006b80();
void FUN_10006be0();
void SetDistance(MxS32 p_min, MxS32 p_max);
void Mute(MxBool p_mute);
// SYNTHETIC: LEGO1 0x10006610
// LegoCacheSound::`scalar deleting destructor'
private:
void Init();
void CopyData(MxU8* p_data, MxU32 p_dataSize);
MxString FUN_10006d80(const MxString& p_str);
// [library:audio] WAVE_FORMAT_PCM (audio in .SI files only used this format)
static const MxU32 g_supportedFormatTag = 1;
ma_audio_buffer m_buffer;
ma_sound m_cacheSound;
undefined m_unk0x0c[4]; // 0x0c
Lego3DSound m_sound; // 0x10
MxU8* m_data; // 0x40
MxU32 m_dataSize; // 0x44
MxString m_unk0x48; // 0x48
MxBool m_unk0x58; // 0x58
MxWavePresenter::WaveFormat m_wfx; // 0x59
MxBool m_looping; // 0x69
MxBool m_unk0x6a; // 0x6a
MxS32 m_volume; // 0x6c
MxBool m_unk0x70; // 0x70
MxString m_unk0x74; // 0x74
MxBool m_muted; // 0x84
};
#endif // LEGOCACHSOUND_H