2 |
* * |
* * |
3 |
* libgig - C++ cross-platform Gigasampler format file access library * |
* libgig - C++ cross-platform Gigasampler format file access library * |
4 |
* * |
* * |
5 |
* Copyright (C) 2003-2016 by Christian Schoenebeck * |
* Copyright (C) 2003-2017 by Christian Schoenebeck * |
6 |
* <cuse@users.sourceforge.net> * |
* <cuse@users.sourceforge.net> * |
7 |
* * |
* * |
8 |
* This library is free software; you can redistribute it and/or modify * |
* This library is free software; you can redistribute it and/or modify * |
27 |
#include "DLS.h" |
#include "DLS.h" |
28 |
#include <vector> |
#include <vector> |
29 |
|
|
30 |
|
#ifndef __has_feature |
31 |
|
# define __has_feature(x) 0 |
32 |
|
#endif |
33 |
|
#ifndef HAVE_RTTI |
34 |
|
# if __GXX_RTTI || __has_feature(cxx_rtti) || _CPPRTTI |
35 |
|
# define HAVE_RTTI 1 |
36 |
|
# else |
37 |
|
# define HAVE_RTTI 0 |
38 |
|
# endif |
39 |
|
#endif |
40 |
|
#if HAVE_RTTI |
41 |
|
# include <typeinfo> |
42 |
|
#else |
43 |
|
# warning No RTTI available! |
44 |
|
#endif |
45 |
|
|
46 |
#if WORDS_BIGENDIAN |
#if WORDS_BIGENDIAN |
47 |
# define LIST_TYPE_3PRG 0x33707267 |
# define LIST_TYPE_3PRG 0x33707267 |
48 |
# define LIST_TYPE_3EWL 0x3365776C |
# define LIST_TYPE_3EWL 0x3365776C |
81 |
# define CHUNK_ID_SCSL 0x4c534353 // own gig format extension |
# define CHUNK_ID_SCSL 0x4c534353 // own gig format extension |
82 |
#endif // WORDS_BIGENDIAN |
#endif // WORDS_BIGENDIAN |
83 |
|
|
84 |
|
#ifndef GIG_DECLARE_ENUM |
85 |
|
# define GIG_DECLARE_ENUM(type, ...) enum type { __VA_ARGS__ } |
86 |
|
#endif |
87 |
|
|
88 |
|
// just symbol prototyping (since Serialization.h not included by default here) |
89 |
|
namespace Serialization { class Archive; } |
90 |
|
|
91 |
/** Gigasampler/GigaStudio specific classes and definitions */ |
/** Gigasampler/GigaStudio specific classes and definitions */ |
92 |
namespace gig { |
namespace gig { |
93 |
|
|
113 |
} |
} |
114 |
}; |
}; |
115 |
|
|
116 |
/** Standard types of sample loops. */ |
/** Standard types of sample loops. |
117 |
typedef enum { |
* |
118 |
|
* @see enumCount(), enumKey(), enumKeys(), enumValue() |
119 |
|
*/ |
120 |
|
GIG_DECLARE_ENUM(loop_type_t, |
121 |
loop_type_normal = 0x00000000, ///< Loop forward (normal) |
loop_type_normal = 0x00000000, ///< Loop forward (normal) |
122 |
loop_type_bidirectional = 0x00000001, ///< Alternating loop (forward/backward, also known as Ping Pong) |
loop_type_bidirectional = 0x00000001, ///< Alternating loop (forward/backward, also known as Ping Pong) |
123 |
loop_type_backward = 0x00000002 ///< Loop backward (reverse) |
loop_type_backward = 0x00000002 ///< Loop backward (reverse) |
124 |
} loop_type_t; |
); |
125 |
|
|
126 |
/** Society of Motion Pictures and Television E time format. */ |
/** Society of Motion Pictures and Television E time format. |
127 |
typedef enum { |
* |
128 |
|
* @see enumCount(), enumKey(), enumKeys(), enumValue() |
129 |
|
*/ |
130 |
|
GIG_DECLARE_ENUM(smpte_format_t, |
131 |
smpte_format_no_offset = 0x00000000, ///< no SMPTE offset |
smpte_format_no_offset = 0x00000000, ///< no SMPTE offset |
132 |
smpte_format_24_frames = 0x00000018, ///< 24 frames per second |
smpte_format_24_frames = 0x00000018, ///< 24 frames per second |
133 |
smpte_format_25_frames = 0x00000019, ///< 25 frames per second |
smpte_format_25_frames = 0x00000019, ///< 25 frames per second |
134 |
smpte_format_30_frames_dropping = 0x0000001D, ///< 30 frames per second with frame dropping (30 drop) |
smpte_format_30_frames_dropping = 0x0000001D, ///< 30 frames per second with frame dropping (30 drop) |
135 |
smpte_format_30_frames = 0x0000001E ///< 30 frames per second |
smpte_format_30_frames = 0x0000001E ///< 30 frames per second |
136 |
} smpte_format_t; |
); |
137 |
|
|
138 |
/** Defines the shape of a function graph. */ |
/** Defines the shape of a function graph. |
139 |
typedef enum { |
* |
140 |
|
* @see enumCount(), enumKey(), enumKeys(), enumValue() |
141 |
|
*/ |
142 |
|
GIG_DECLARE_ENUM(curve_type_t, |
143 |
curve_type_nonlinear = 0, |
curve_type_nonlinear = 0, |
144 |
curve_type_linear = 1, |
curve_type_linear = 1, |
145 |
curve_type_special = 2, |
curve_type_special = 2, |
146 |
curve_type_unknown = 0xffffffff |
curve_type_unknown = 0xffffffff |
147 |
} curve_type_t; |
); |
148 |
|
|
149 |
/** Dimensions allow to bypass one of the following controllers. */ |
/** Dimensions allow to bypass one of the following controllers. |
150 |
typedef enum { |
* |
151 |
|
* @see enumCount(), enumKey(), enumKeys(), enumValue() |
152 |
|
*/ |
153 |
|
GIG_DECLARE_ENUM(dim_bypass_ctrl_t, |
154 |
dim_bypass_ctrl_none, |
dim_bypass_ctrl_none, |
155 |
dim_bypass_ctrl_94, ///< Effect 4 Depth (MIDI Controller 94) |
dim_bypass_ctrl_94, ///< Effect 4 Depth (MIDI Controller 94) |
156 |
dim_bypass_ctrl_95 ///< Effect 5 Depth (MIDI Controller 95) |
dim_bypass_ctrl_95 ///< Effect 5 Depth (MIDI Controller 95) |
157 |
} dim_bypass_ctrl_t; |
); |
158 |
|
|
159 |
/** Defines how LFO3 is controlled by. */ |
/** Defines how LFO3 is controlled by. |
160 |
typedef enum { |
* |
161 |
|
* @see enumCount(), enumKey(), enumKeys(), enumValue() |
162 |
|
*/ |
163 |
|
GIG_DECLARE_ENUM(lfo3_ctrl_t, |
164 |
lfo3_ctrl_internal = 0x00, ///< Only internally controlled. |
lfo3_ctrl_internal = 0x00, ///< Only internally controlled. |
165 |
lfo3_ctrl_modwheel = 0x01, ///< Only controlled by external modulation wheel. |
lfo3_ctrl_modwheel = 0x01, ///< Only controlled by external modulation wheel. |
166 |
lfo3_ctrl_aftertouch = 0x02, ///< Only controlled by aftertouch controller. |
lfo3_ctrl_aftertouch = 0x02, ///< Only controlled by aftertouch controller. |
167 |
lfo3_ctrl_internal_modwheel = 0x03, ///< Controlled internally and by external modulation wheel. |
lfo3_ctrl_internal_modwheel = 0x03, ///< Controlled internally and by external modulation wheel. |
168 |
lfo3_ctrl_internal_aftertouch = 0x04 ///< Controlled internally and by aftertouch controller. |
lfo3_ctrl_internal_aftertouch = 0x04 ///< Controlled internally and by aftertouch controller. |
169 |
} lfo3_ctrl_t; |
); |
170 |
|
|
171 |
/** Defines how LFO2 is controlled by. */ |
/** Defines how LFO2 is controlled by. |
172 |
typedef enum { |
* |
173 |
|
* @see enumCount(), enumKey(), enumKeys(), enumValue() |
174 |
|
*/ |
175 |
|
GIG_DECLARE_ENUM(lfo2_ctrl_t, |
176 |
lfo2_ctrl_internal = 0x00, ///< Only internally controlled. |
lfo2_ctrl_internal = 0x00, ///< Only internally controlled. |
177 |
lfo2_ctrl_modwheel = 0x01, ///< Only controlled by external modulation wheel. |
lfo2_ctrl_modwheel = 0x01, ///< Only controlled by external modulation wheel. |
178 |
lfo2_ctrl_foot = 0x02, ///< Only controlled by external foot controller. |
lfo2_ctrl_foot = 0x02, ///< Only controlled by external foot controller. |
179 |
lfo2_ctrl_internal_modwheel = 0x03, ///< Controlled internally and by external modulation wheel. |
lfo2_ctrl_internal_modwheel = 0x03, ///< Controlled internally and by external modulation wheel. |
180 |
lfo2_ctrl_internal_foot = 0x04 ///< Controlled internally and by external foot controller. |
lfo2_ctrl_internal_foot = 0x04 ///< Controlled internally and by external foot controller. |
181 |
} lfo2_ctrl_t; |
); |
182 |
|
|
183 |
/** Defines how LFO1 is controlled by. */ |
/** Defines how LFO1 is controlled by. |
184 |
typedef enum { |
* |
185 |
|
* @see enumCount(), enumKey(), enumKeys(), enumValue() |
186 |
|
*/ |
187 |
|
GIG_DECLARE_ENUM(lfo1_ctrl_t, |
188 |
lfo1_ctrl_internal = 0x00, ///< Only internally controlled. |
lfo1_ctrl_internal = 0x00, ///< Only internally controlled. |
189 |
lfo1_ctrl_modwheel = 0x01, ///< Only controlled by external modulation wheel. |
lfo1_ctrl_modwheel = 0x01, ///< Only controlled by external modulation wheel. |
190 |
lfo1_ctrl_breath = 0x02, ///< Only controlled by external breath controller. |
lfo1_ctrl_breath = 0x02, ///< Only controlled by external breath controller. |
191 |
lfo1_ctrl_internal_modwheel = 0x03, ///< Controlled internally and by external modulation wheel. |
lfo1_ctrl_internal_modwheel = 0x03, ///< Controlled internally and by external modulation wheel. |
192 |
lfo1_ctrl_internal_breath = 0x04 ///< Controlled internally and by external breath controller. |
lfo1_ctrl_internal_breath = 0x04 ///< Controlled internally and by external breath controller. |
193 |
} lfo1_ctrl_t; |
); |
194 |
|
|
195 |
/** Defines how the filter cutoff frequency is controlled by. */ |
/** Defines how the filter cutoff frequency is controlled by. |
196 |
typedef enum { |
* |
197 |
|
* @see enumCount(), enumKey(), enumKeys(), enumValue() |
198 |
|
*/ |
199 |
|
GIG_DECLARE_ENUM(vcf_cutoff_ctrl_t, |
200 |
vcf_cutoff_ctrl_none = 0x00, |
vcf_cutoff_ctrl_none = 0x00, |
201 |
vcf_cutoff_ctrl_none2 = 0x01, ///< The difference between none and none2 is unknown |
vcf_cutoff_ctrl_none2 = 0x01, ///< The difference between none and none2 is unknown |
202 |
vcf_cutoff_ctrl_modwheel = 0x81, ///< Modulation Wheel (MIDI Controller 1) |
vcf_cutoff_ctrl_modwheel = 0x81, ///< Modulation Wheel (MIDI Controller 1) |
209 |
vcf_cutoff_ctrl_genpurpose7 = 0xd2, ///< General Purpose Controller 7 (Button, MIDI Controller 82) |
vcf_cutoff_ctrl_genpurpose7 = 0xd2, ///< General Purpose Controller 7 (Button, MIDI Controller 82) |
210 |
vcf_cutoff_ctrl_genpurpose8 = 0xd3, ///< General Purpose Controller 8 (Button, MIDI Controller 83) |
vcf_cutoff_ctrl_genpurpose8 = 0xd3, ///< General Purpose Controller 8 (Button, MIDI Controller 83) |
211 |
vcf_cutoff_ctrl_aftertouch = 0x80 ///< Key Pressure |
vcf_cutoff_ctrl_aftertouch = 0x80 ///< Key Pressure |
212 |
} vcf_cutoff_ctrl_t; |
); |
213 |
|
|
214 |
/** Defines how the filter resonance is controlled by. */ |
/** Defines how the filter resonance is controlled by. |
215 |
typedef enum { |
* |
216 |
|
* @see enumCount(), enumKey(), enumKeys(), enumValue() |
217 |
|
*/ |
218 |
|
GIG_DECLARE_ENUM(vcf_res_ctrl_t, |
219 |
vcf_res_ctrl_none = 0xffffffff, |
vcf_res_ctrl_none = 0xffffffff, |
220 |
vcf_res_ctrl_genpurpose3 = 0, ///< General Purpose Controller 3 (Slider, MIDI Controller 18) |
vcf_res_ctrl_genpurpose3 = 0, ///< General Purpose Controller 3 (Slider, MIDI Controller 18) |
221 |
vcf_res_ctrl_genpurpose4 = 1, ///< General Purpose Controller 4 (Slider, MIDI Controller 19) |
vcf_res_ctrl_genpurpose4 = 1, ///< General Purpose Controller 4 (Slider, MIDI Controller 19) |
222 |
vcf_res_ctrl_genpurpose5 = 2, ///< General Purpose Controller 5 (Button, MIDI Controller 80) |
vcf_res_ctrl_genpurpose5 = 2, ///< General Purpose Controller 5 (Button, MIDI Controller 80) |
223 |
vcf_res_ctrl_genpurpose6 = 3 ///< General Purpose Controller 6 (Button, MIDI Controller 81) |
vcf_res_ctrl_genpurpose6 = 3 ///< General Purpose Controller 6 (Button, MIDI Controller 81) |
224 |
} vcf_res_ctrl_t; |
); |
225 |
|
|
226 |
/** |
/** |
227 |
* Defines a controller that has a certain contrained influence on a |
* Defines a controller that has a certain contrained influence on a |
232 |
* attenuation_ctrl_t, eg1_ctrl_t or eg2_ctrl_t) in your code! |
* attenuation_ctrl_t, eg1_ctrl_t or eg2_ctrl_t) in your code! |
233 |
*/ |
*/ |
234 |
struct leverage_ctrl_t { |
struct leverage_ctrl_t { |
235 |
typedef enum { |
/** Defines possible controllers. |
236 |
|
* |
237 |
|
* @see enumCount(), enumKey(), enumKeys(), enumValue() |
238 |
|
*/ |
239 |
|
GIG_DECLARE_ENUM(type_t, |
240 |
type_none = 0x00, ///< No controller defined |
type_none = 0x00, ///< No controller defined |
241 |
type_channelaftertouch = 0x2f, ///< Channel Key Pressure |
type_channelaftertouch = 0x2f, ///< Channel Key Pressure |
242 |
type_velocity = 0xff, ///< Key Velocity |
type_velocity = 0xff, ///< Key Velocity |
243 |
type_controlchange = 0xfe ///< Ordinary MIDI control change controller, see field 'controller_number' |
type_controlchange = 0xfe ///< Ordinary MIDI control change controller, see field 'controller_number' |
244 |
} type_t; |
); |
245 |
|
|
246 |
type_t type; ///< Controller type |
type_t type; ///< Controller type |
247 |
uint controller_number; ///< MIDI controller number if this controller is a control change controller, 0 otherwise |
uint controller_number; ///< MIDI controller number if this controller is a control change controller, 0 otherwise |
248 |
|
|
249 |
|
void serialize(Serialization::Archive* archive); |
250 |
}; |
}; |
251 |
|
|
252 |
/** |
/** |
276 |
* dimension zones is always a power of two. All dimensions can have up |
* dimension zones is always a power of two. All dimensions can have up |
277 |
* to 32 zones (except the layer dimension with only up to 8 zones and |
* to 32 zones (except the layer dimension with only up to 8 zones and |
278 |
* the samplechannel dimension which currently allows only 2 zones). |
* the samplechannel dimension which currently allows only 2 zones). |
279 |
|
* |
280 |
|
* @see enumCount(), enumKey(), enumKeys(), enumValue() |
281 |
*/ |
*/ |
282 |
typedef enum { |
GIG_DECLARE_ENUM(dimension_t, |
283 |
dimension_none = 0x00, ///< Dimension not in use. |
dimension_none = 0x00, ///< Dimension not in use. |
284 |
dimension_samplechannel = 0x80, ///< If used sample has more than one channel (thus is not mono). |
dimension_samplechannel = 0x80, ///< If used sample has more than one channel (thus is not mono). |
285 |
dimension_layer = 0x81, ///< For layering of up to 8 instruments (and eventually crossfading of 2 or 4 layers). |
dimension_layer = 0x81, ///< For layering of up to 8 instruments (and eventually crossfading of 2 or 4 layers). |
314 |
dimension_effect3depth = 0x5d, ///< Effect 3 Depth (MIDI Controller 93) |
dimension_effect3depth = 0x5d, ///< Effect 3 Depth (MIDI Controller 93) |
315 |
dimension_effect4depth = 0x5e, ///< Effect 4 Depth (MIDI Controller 94) |
dimension_effect4depth = 0x5e, ///< Effect 4 Depth (MIDI Controller 94) |
316 |
dimension_effect5depth = 0x5f ///< Effect 5 Depth (MIDI Controller 95) |
dimension_effect5depth = 0x5f ///< Effect 5 Depth (MIDI Controller 95) |
317 |
} dimension_t; |
); |
318 |
|
|
319 |
/** |
/** |
320 |
* Intended for internal usage: will be used to convert a dimension value |
* Intended for internal usage: will be used to convert a dimension value |
321 |
* into the corresponding dimension bit number. |
* into the corresponding dimension bit number. |
322 |
|
* |
323 |
|
* @see enumCount(), enumKey(), enumKeys(), enumValue() |
324 |
*/ |
*/ |
325 |
typedef enum { |
GIG_DECLARE_ENUM(split_type_t, |
326 |
split_type_normal, ///< dimension value between 0-127 |
split_type_normal, ///< dimension value between 0-127 |
327 |
split_type_bit ///< dimension values are already the sought bit number |
split_type_bit ///< dimension values are already the sought bit number |
328 |
} split_type_t; |
); |
329 |
|
|
330 |
/** General dimension definition. */ |
/** General dimension definition. */ |
331 |
struct dimension_def_t { |
struct dimension_def_t { |
336 |
float zone_size; ///< Intended for internal usage: reflects the size of each zone (128/zones) for normal split types only, 0 otherwise. |
float zone_size; ///< Intended for internal usage: reflects the size of each zone (128/zones) for normal split types only, 0 otherwise. |
337 |
}; |
}; |
338 |
|
|
339 |
/** Defines which frequencies are filtered by the VCF. */ |
/** Defines which frequencies are filtered by the VCF. |
340 |
typedef enum { |
* |
341 |
|
* @see enumCount(), enumKey(), enumKeys(), enumValue() |
342 |
|
*/ |
343 |
|
GIG_DECLARE_ENUM(vcf_type_t, |
344 |
vcf_type_lowpass = 0x00, |
vcf_type_lowpass = 0x00, |
345 |
vcf_type_lowpassturbo = 0xff, ///< More poles than normal lowpass |
vcf_type_lowpassturbo = 0xff, ///< More poles than normal lowpass |
346 |
vcf_type_bandpass = 0x01, |
vcf_type_bandpass = 0x01, |
347 |
vcf_type_highpass = 0x02, |
vcf_type_highpass = 0x02, |
348 |
vcf_type_bandreject = 0x03 |
vcf_type_bandreject = 0x03 |
349 |
} vcf_type_t; |
); |
350 |
|
|
351 |
/** |
/** |
352 |
* Defines the envelope of a crossfade. |
* Defines the envelope of a crossfade. |
367 |
uint8_t out_start; ///< Start position of fade out. |
uint8_t out_start; ///< Start position of fade out. |
368 |
uint8_t out_end; ///< End postition of fade out. |
uint8_t out_end; ///< End postition of fade out. |
369 |
#endif // WORDS_BIGENDIAN |
#endif // WORDS_BIGENDIAN |
370 |
|
|
371 |
|
void serialize(Serialization::Archive* archive); |
372 |
}; |
}; |
373 |
|
|
374 |
/** Reflects the current playback state for a sample. */ |
/** Reflects the current playback state for a sample. */ |
551 |
DimensionRegion(RIFF::List* _3ewl, const DimensionRegion& src); |
DimensionRegion(RIFF::List* _3ewl, const DimensionRegion& src); |
552 |
~DimensionRegion(); |
~DimensionRegion(); |
553 |
void CopyAssign(const DimensionRegion* orig, const std::map<Sample*,Sample*>* mSamples); |
void CopyAssign(const DimensionRegion* orig, const std::map<Sample*,Sample*>* mSamples); |
554 |
|
void serialize(Serialization::Archive* archive); |
555 |
friend class Region; |
friend class Region; |
556 |
|
friend class Serialization::Archive; |
557 |
private: |
private: |
558 |
typedef enum { ///< Used to decode attenuation, EG1 and EG2 controller |
typedef enum { ///< Used to decode attenuation, EG1 and EG2 controller |
559 |
// official leverage controllers as they were defined in the original Gigasampler/GigaStudio format: |
// official leverage controllers as they were defined in the original Gigasampler/GigaStudio format: |
738 |
virtual void UpdateChunks(progress_t* pProgress); |
virtual void UpdateChunks(progress_t* pProgress); |
739 |
void CopyAssignMeta(const Sample* orig); |
void CopyAssignMeta(const Sample* orig); |
740 |
void CopyAssignWave(const Sample* orig); |
void CopyAssignWave(const Sample* orig); |
741 |
|
uint32_t GetWaveDataCRC32Checksum(); |
742 |
|
bool VerifyWaveData(uint32_t* pActually = NULL); |
743 |
protected: |
protected: |
744 |
static size_t Instances; ///< Number of instances of class Sample. |
static size_t Instances; ///< Number of instances of class Sample. |
745 |
static buffer_t InternalDecompressionBuffer; ///< Buffer used for decompression as well as for truncation of 24 Bit -> 16 Bit samples. |
static buffer_t InternalDecompressionBuffer; ///< Buffer used for decompression as well as for truncation of 24 Bit -> 16 Bit samples. |
754 |
unsigned long FileNo; ///< File number (> 0 when sample is stored in an extension file, 0 when it's in the gig) |
unsigned long FileNo; ///< File number (> 0 when sample is stored in an extension file, 0 when it's in the gig) |
755 |
RIFF::Chunk* pCk3gix; |
RIFF::Chunk* pCk3gix; |
756 |
RIFF::Chunk* pCkSmpl; |
RIFF::Chunk* pCkSmpl; |
757 |
uint32_t crc; ///< CRC-32 checksum of the raw sample data |
uint32_t crc; ///< Reflects CRC-32 checksum of the raw sample data at the last time when the sample's raw wave form data has been modified consciously by the user by calling Write(). |
758 |
|
|
759 |
Sample(File* pFile, RIFF::List* waveList, file_offset_t WavePoolOffset, unsigned long fileNo = 0); |
Sample(File* pFile, RIFF::List* waveList, file_offset_t WavePoolOffset, unsigned long fileNo = 0, int index = -1); |
760 |
~Sample(); |
~Sample(); |
761 |
|
uint32_t CalculateWaveDataChecksum(); |
762 |
|
|
763 |
// Guess size (in bytes) of a compressed sample |
// Guess size (in bytes) of a compressed sample |
764 |
inline file_offset_t GuessSize(file_offset_t samples) { |
inline file_offset_t GuessSize(file_offset_t samples) { |
1081 |
void SetScriptAsText(const String& text); |
void SetScriptAsText(const String& text); |
1082 |
void SetGroup(ScriptGroup* pGroup); |
void SetGroup(ScriptGroup* pGroup); |
1083 |
ScriptGroup* GetGroup() const; |
ScriptGroup* GetGroup() const; |
1084 |
|
void CopyAssign(const Script* orig); |
1085 |
protected: |
protected: |
1086 |
Script(ScriptGroup* group, RIFF::Chunk* ckScri); |
Script(ScriptGroup* group, RIFF::Chunk* ckScri); |
1087 |
virtual ~Script(); |
virtual ~Script(); |
1338 |
virtual void LoadInstruments(progress_t* pProgress); |
virtual void LoadInstruments(progress_t* pProgress); |
1339 |
virtual void LoadScriptGroups(); |
virtual void LoadScriptGroups(); |
1340 |
void SetSampleChecksum(Sample* pSample, uint32_t crc); |
void SetSampleChecksum(Sample* pSample, uint32_t crc); |
1341 |
|
uint32_t GetSampleChecksum(Sample* pSample); |
1342 |
|
uint32_t GetSampleChecksumByIndex(int index); |
1343 |
|
bool VerifySampleChecksumTable(); |
1344 |
|
bool RebuildSampleChecksumTable(); |
1345 |
|
int GetWaveTableIndexOf(gig::Sample* pSample); |
1346 |
friend class Region; |
friend class Region; |
1347 |
friend class Sample; |
friend class Sample; |
1348 |
friend class Instrument; |
friend class Instrument; |
1365 |
*/ |
*/ |
1366 |
class Exception : public DLS::Exception { |
class Exception : public DLS::Exception { |
1367 |
public: |
public: |
1368 |
Exception(String Message); |
Exception(String format, ...); |
1369 |
|
Exception(String format, va_list arg); |
1370 |
void PrintMessage(); |
void PrintMessage(); |
1371 |
|
protected: |
1372 |
|
Exception(); |
1373 |
}; |
}; |
1374 |
|
|
1375 |
|
#if HAVE_RTTI |
1376 |
|
size_t enumCount(const std::type_info& type); |
1377 |
|
const char* enumKey(const std::type_info& type, size_t value); |
1378 |
|
bool enumKey(const std::type_info& type, String key); |
1379 |
|
const char** enumKeys(const std::type_info& type); |
1380 |
|
#endif // HAVE_RTTI |
1381 |
|
size_t enumCount(String typeName); |
1382 |
|
const char* enumKey(String typeName, size_t value); |
1383 |
|
bool enumKey(String typeName, String key); |
1384 |
|
const char** enumKeys(String typeName); |
1385 |
|
size_t enumValue(String key); |
1386 |
|
|
1387 |
String libraryName(); |
String libraryName(); |
1388 |
String libraryVersion(); |
String libraryVersion(); |
1389 |
|
|