typedef struct t_mmdssample {mm_word loop_start; union {mm_word loop_length;mm_word length; };mm_byte format;mm_byte repeat_mode;mm_hword base_rate;mm_addr data; } mm_ds_sample;
Start of sample loop. Measured in words.
Length of sample loop. Measured in words.
Length of sample. Measured in words.
Sample format. 0 = 8-bit PCM, 1 = 16-bit PCM, 2 = IMA-ADPCM
Looping mode. 1 = Forward Loop, 2 = One-Shot
Center playback rate. Value = Hz * 1024 / 32768.
Pointer to sample data.
Sample structure.
If the sample loops, then loop_start should be set to the position of the loop starting point, and loop_length should be set to the length of the loop. Otherwise, loop_start should be set to zero, and length should be set to the length of the sample.
The length and position values are measured in words. That is, samples/4 for 8-bit, and samples/2 for 16-bit (and samples/8 for 4-bit compressed). The sample data must be aligned and maybe resampled or padded to fit along the boundaries.