XPlor/definitions/cod/loaded_sound.xscript

27 lines
575 B
Plaintext
Raw Normal View History

type loaded_sound ui("Loaded Sound")
2026-01-01 22:18:40 -05:00
{
const PTR_INLINE = -1;
i32 name_ptr ui("Name Ptr");
2026-01-01 22:18:40 -05:00
// snd_info_t structure
i32 rate ui("Sample Rate");
i32 bits ui("Bits");
i32 channels ui("Channels");
i32 samples ui("Samples");
i32 block_size ui("Block Size");
i32 format ui("Format");
i32 data_len ui("Data Length");
i32 data_ptr ui("Data Ptr");
// Inline data
if (name_ptr == PTR_INLINE) {
name = cstring() ui("Name");
set_name(name);
}
2026-01-01 22:18:40 -05:00
if (data_ptr == PTR_INLINE && data_len > 0) {
audio_data = read(data_len) ui("Audio Data");
}
2026-01-01 22:18:40 -05:00
}