2026-01-11 16:08:46 -05:00
|
|
|
type loaded_sound ui("Loaded Sound")
|
2026-01-01 22:18:40 -05:00
|
|
|
{
|
2026-01-11 12:09:57 -05:00
|
|
|
const PTR_INLINE = -1;
|
|
|
|
|
|
2026-01-11 16:08:46 -05:00
|
|
|
i32 name_ptr ui("Name Ptr");
|
2026-01-01 22:18:40 -05:00
|
|
|
|
2026-01-07 16:36:40 -05:00
|
|
|
// snd_info_t structure
|
2026-01-11 16:08:46 -05:00
|
|
|
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");
|
2026-01-11 12:09:57 -05:00
|
|
|
|
|
|
|
|
// Inline data
|
2026-01-11 16:08:46 -05:00
|
|
|
if (name_ptr == PTR_INLINE) {
|
|
|
|
|
name = cstring() ui("Name");
|
|
|
|
|
set_name(name);
|
|
|
|
|
}
|
2026-01-01 22:18:40 -05:00
|
|
|
|
2026-01-11 12:09:57 -05:00
|
|
|
if (data_ptr == PTR_INLINE && data_len > 0) {
|
2026-01-11 16:08:46 -05:00
|
|
|
audio_data = read(data_len) ui("Audio Data");
|
2026-01-07 16:36:40 -05:00
|
|
|
}
|
2026-01-01 22:18:40 -05:00
|
|
|
}
|