id_value = 0x52494646 # RIFF
id_check = @0x00:BE$4
id_value = 0x4c5b # weird codec id
id_check = @0x14$2

codec = PCM16LE
channels = @0x16$2
sample_rate = @0x18$4

id_value = 0x64617461 # data
id_check = @0x24:BE$4
num_samples = @0x28$4 / 4 # data chunk size
start_offset = 0x2c

name_table = .loops.txt
loop_flag = name_value & 0x10000
loop_start_sample = (name_value & 0xffff) * 16
loop_end_sample = data_size
