mirror of
https://github.com/open-goal/jak-project
synced 2026-08-07 10:16:45 -04:00
8a73c3e997
This implements the functionality for the `PLUGIN_MESSAGE` grain and the 989snd VAG plugin system, allowing sounds to queue up VAG streams. Closes #2582
24 lines
561 B
C++
24 lines
561 B
C++
#pragma once
|
|
|
|
#include "common/common_types.h"
|
|
|
|
namespace snd {
|
|
using PluginHandler =
|
|
s32 (*)(u32 id, u32 index, u32 owner, const u8* data, const s8* regs, s32 cur_vol);
|
|
|
|
constexpr u32 VAG_STREAM_PLUGIN_ID = 0x53545256; // 'STRV'
|
|
|
|
struct VagStreamPluginData {
|
|
char name[8];
|
|
u32 priority;
|
|
u32 vol;
|
|
u32 pan;
|
|
u32 use_regs;
|
|
};
|
|
static_assert(sizeof(VagStreamPluginData) == 24);
|
|
|
|
void RegisterPluginHandler(PluginHandler handler);
|
|
s32 HandlePluginMessage(u32 id, u32 index, u32 owner, const u8* data, const s8* regs, s32 cur_vol);
|
|
|
|
} // namespace snd
|