--- libgig/trunk/src/gig.h 2007/03/18 07:13:06 1102 +++ libgig/trunk/src/gig.h 2007/04/11 16:33:56 1154 @@ -496,6 +496,11 @@ * will create the mandatory RIFF chunk which will hold the sample wave * data and / or resize the file so you will be able to Write() the * sample data directly to disk. + * + * @e Caution: for gig synthesis, most looping relevant information are + * retrieved from the respective DimensionRegon instead from the Sample + * itself. This was made for allowing different loop definitions for the + * same sample under different conditions. */ class Sample : public DLS::Sample { public: @@ -506,14 +511,14 @@ uint32_t FineTune; ///< Specifies the fraction of a semitone up from the specified MIDI unity note field. A value of 0x80000000 means 1/2 semitone (50 cents) and a value of 0x00000000 means no fine tuning between semitones. smpte_format_t SMPTEFormat; ///< Specifies the Society of Motion Pictures and Television E time format used in the following SMPTEOffset field. If a value of 0 is set, SMPTEOffset should also be set to 0. uint32_t SMPTEOffset; ///< The SMPTE Offset value specifies the time offset to be used for the synchronization / calibration to the first sample in the waveform. This value uses a format of 0xhhmmssff where hh is a signed value that specifies the number of hours (-23 to 23), mm is an unsigned value that specifies the number of minutes (0 to 59), ss is an unsigned value that specifies the number of seconds (0 to 59) and ff is an unsigned value that specifies the number of frames (0 to -1). - uint32_t Loops; ///< Number of defined sample loops (so far only seen single loops in gig files - please report me if you encounter more!). + uint32_t Loops; ///< @e Caution: Use the respective field in the DimensionRegion instead of this one! (Intended purpose: Number of defined sample loops. So far only seen single loops in gig files - please report if you encounter more!) uint32_t LoopID; ///< Specifies the unique ID that corresponds to one of the defined cue points in the cue point list (only if Loops > 0), as the Gigasampler format only allows one loop definition at the moment, this attribute isn't really useful for anything. - loop_type_t LoopType; ///< The type field defines how the waveform samples will be looped (only if Loops > 0). - uint32_t LoopStart; ///< The start value specifies the offset (in sample points) in the waveform data of the first sample to be played in the loop (only if Loops > 0). - uint32_t LoopEnd; ///< The end value specifies the offset (in sample points) in the waveform data which represents the end of the loop (only if Loops > 0). - uint32_t LoopSize; ///< Length of the looping area (in sample points) which is equivalent to LoopEnd - LoopStart. - uint32_t LoopFraction; ///< The fractional value specifies a fraction of a sample at which to loop (only if Loops > 0). This allows a loop to be fine tuned at a resolution greater than one sample. A value of 0 means no fraction, a value of 0x80000000 means 1/2 of a sample length. 0xFFFFFFFF is the smallest fraction of a sample that can be represented. - uint32_t LoopPlayCount; ///< Number of times the loop should be played (only if Loops > 0, a value of 0 = infinite). + loop_type_t LoopType; ///< @e Caution: Use the respective field in the DimensionRegion instead of this one! (Intended purpose: The type field defines how the waveform samples will be looped.) + uint32_t LoopStart; ///< @e Caution: Use the respective field in the DimensionRegion instead of this one! (Intended purpose: The start value specifies the offset [in sample points] in the waveform data of the first sample to be played in the loop [only if Loops > 0].) + uint32_t LoopEnd; ///< @e Caution: Use the respective field in the DimensionRegion instead of this one! (Intended purpose: The end value specifies the offset [in sample points] in the waveform data which represents the end of the loop [only if Loops > 0].) + uint32_t LoopSize; ///< @e Caution: Use the respective fields in the DimensionRegion instead of this one! (Intended purpose: Length of the looping area [in sample points] which is equivalent to @code LoopEnd - LoopStart @endcode.) + uint32_t LoopFraction; ///< The fractional value specifies a fraction of a sample at which to loop. This allows a loop to be fine tuned at a resolution greater than one sample. A value of 0 means no fraction, a value of 0x80000000 means 1/2 of a sample length. 0xFFFFFFFF is the smallest fraction of a sample that can be represented. + uint32_t LoopPlayCount; ///< Number of times the loop should be played (a value of 0 = infinite). bool Compressed; ///< If the sample wave is compressed (probably just interesting for instrument and sample editors, as this library already handles the decompression in it's sample access methods anyway). uint32_t TruncatedBits; ///< For 24-bit compressed samples only: number of bits truncated during compression (0, 4 or 6) bool Dithered; ///< For 24-bit compressed samples only: if dithering was used during compression with bit reduction