Maxmod
Data Fields
t_mmdssample Struct Reference

Sample structure. More...

#include <mm_types.h>

Data Fields

mm_hword base_rate
 Center playback rate. Value = Hz * 1024 / 32768.
 
mm_addr data
 Pointer to sample data.
 
mm_byte format
 Sample format. 0 = 8-bit PCM, 1 = 16-bit PCM, 2 = IMA-ADPCM.
 
mm_word loop_start
 Start of sample loop. Measured in words.
 
mm_byte repeat_mode
 Looping mode. 1 = Forward Loop, 2 = One-Shot.
 
mm_word length
 Length of sample. Measured in words.
 
mm_word loop_length
 Length of sample loop. Measured in words.
 

Detailed Description

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.


The documentation for this struct was generated from the following file: