chore: add struct for iw4 pc64 LoadedSound

Co-authored-by: William Roy <[email protected]>
This commit is contained in:
Jan Laupetinandwroy committed 2026-10-22 20:01:07 +02:00
1 parent 8b16e81355
commit 3cd0a80666
3 files changed
+41 -1

No files matched your search

+28
View File
@@ -1783,12 +1783,40 @@ namespace IW4
char* data;
};
// https://learn.microsoft.com/en-us/windows/win32/api/mmeapi/ns-mmeapi-waveformatex
struct XAudioWaveFormatEx
{
uint16_t wFormatTag;
uint16_t nChannels;
uint32_t nSamplesPerSec;
uint32_t nAvgBytesPerSec;
uint16_t nBlockAlign;
uint16_t wBitsPerSample;
uint16_t cbSize;
uint16_t probablyPadding;
};
struct XAudio2Sound
{
XAudioWaveFormatEx waveFormat;
uint8_t unknown_18[4];
unsigned int data_len;
uint8_t unknown_28[20];
char* data;
};
struct LoadedSound
{
const char* name;
MssSound sound;
};
struct LoadedSound_64
{
const char* name;
XAudio2Sound sound;
};
struct StreamedSound
{
const char* dir;
+1
View File
@@ -18,6 +18,7 @@ asset GfxImage AssetImage;
asset snd_alias_list_t AssetSound;
asset SndCurve AssetSoundCurve;
asset LoadedSound AssetLoadedSound;
asset LoadedSound_64 AssetLoadedSound;
asset clipMap_t AssetClipMapMp;
asset ComWorld AssetComWorld;
asset GameWorldSp AssetGameWorldSp;
+12 -1
View File
@@ -4,6 +4,17 @@
use LoadedSound;
set block XFILE_BLOCK_TEMP;
set string name;
set variant pc32;
use LoadedSound_64;
set block XFILE_BLOCK_TEMP;
set string name;
set variant pc64;
// XAudio2Sound
use XAudio2Sound;
set reusable data;
set count data data_len;
// MssSound
use MssSound;
@@ -12,4 +23,4 @@ set reusable data;
set count data info::data_len;
set condition info::data_ptr never;
set condition info::initial_ptr never;
set action SetSoundData(MssSound);
set action SetSoundData(MssSound);