2 |
* * |
* * |
3 |
* libgig - C++ cross-platform Gigasampler format file loader library * |
* libgig - C++ cross-platform Gigasampler format file loader library * |
4 |
* * |
* * |
5 |
* Copyright (C) 2003-2005 by Christian Schoenebeck * |
* Copyright (C) 2003-2006 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 * |
90 |
# define CHUNK_ID_IENG 0x474E4549 |
# define CHUNK_ID_IENG 0x474E4549 |
91 |
# define CHUNK_ID_IGNR 0x524E4749 |
# define CHUNK_ID_IGNR 0x524E4749 |
92 |
# define CHUNK_ID_IKEY 0x59454B49 |
# define CHUNK_ID_IKEY 0x59454B49 |
93 |
# define CHUNK_ID_IMED 0x44525049 |
# define CHUNK_ID_IMED 0x44454D49 |
94 |
# define CHUNK_ID_INAM 0x4D414E49 |
# define CHUNK_ID_INAM 0x4D414E49 |
95 |
# define CHUNK_ID_IPRD 0x44525049 |
# define CHUNK_ID_IPRD 0x44525049 |
96 |
# define CHUNK_ID_ISBJ 0x4A425349 |
# define CHUNK_ID_ISBJ 0x4A425349 |
315 |
String Source; ///< <ISRC-ck>. Identifies the name of the person or organization who supplied the original subject of the file. |
String Source; ///< <ISRC-ck>. Identifies the name of the person or organization who supplied the original subject of the file. |
316 |
String SourceForm; ///< <ISRF-ck>. Identifies the original form of the material that was digitized, such as record, sampling CD, TV sound track. This is not neccessarily the same as <i>Medium</i>. |
String SourceForm; ///< <ISRF-ck>. Identifies the original form of the material that was digitized, such as record, sampling CD, TV sound track. This is not neccessarily the same as <i>Medium</i>. |
317 |
String Commissioned; ///< <ICMS-ck>. Lists the name of the person or organization that commissioned the subject of the file, e.g., Pope Julian II. |
String Commissioned; ///< <ICMS-ck>. Lists the name of the person or organization that commissioned the subject of the file, e.g., Pope Julian II. |
318 |
|
String Subject; ///< <ISBJ-ck>. Describes the contents of the file. |
319 |
|
bool UseFixedLengthStrings; ///< Set this to true if the info strings should be stored with a fixed length format. This is used for gig files, not for ordinary DLS files. |
320 |
|
|
321 |
Info(RIFF::List* list); |
Info(RIFF::List* list); |
322 |
|
virtual ~Info(); |
323 |
virtual void UpdateChunks(); |
virtual void UpdateChunks(); |
324 |
private: |
private: |
325 |
RIFF::List* pResourceListChunk; |
RIFF::List* pResourceListChunk; |
326 |
|
|
327 |
void LoadString(uint32_t ChunkID, RIFF::List* lstINFO, String& s); |
static void LoadString(uint32_t ChunkID, RIFF::List* lstINFO, String& s); |
328 |
void SaveString(uint32_t ChunkID, RIFF::List* lstINFO, const String& s, const String& sDefault); |
static void SaveString(uint32_t ChunkID, RIFF::List* lstINFO, const String& s, const String& sDefault, bool bUseFixedLengthStrings, int size); |
329 |
}; |
}; |
330 |
|
|
331 |
/** Abstract base class which encapsulates data structures which all DLS resources are able to provide. */ |
/** Abstract base class which encapsulates data structures which all DLS resources are able to provide. */ |
458 |
RegionList::iterator RegionsIterator; |
RegionList::iterator RegionsIterator; |
459 |
|
|
460 |
Instrument(File* pFile, RIFF::List* insList); |
Instrument(File* pFile, RIFF::List* insList); |
461 |
void LoadRegions(); |
virtual void LoadRegions(); |
462 |
virtual ~Instrument(); |
virtual ~Instrument(); |
463 |
friend class File; |
friend class File; |
464 |
}; |
}; |
488 |
typedef std::list<Instrument*> InstrumentList; |
typedef std::list<Instrument*> InstrumentList; |
489 |
|
|
490 |
RIFF::File* pRIFF; |
RIFF::File* pRIFF; |
491 |
|
std::list<RIFF::File*> ExtensionFiles; |
492 |
SampleList* pSamples; |
SampleList* pSamples; |
493 |
SampleList::iterator SamplesIterator; |
SampleList::iterator SamplesIterator; |
494 |
InstrumentList* pInstruments; |
InstrumentList* pInstruments; |
499 |
uint32_t* pWavePoolTableHi; |
uint32_t* pWavePoolTableHi; |
500 |
bool b64BitWavePoolOffsets; |
bool b64BitWavePoolOffsets; |
501 |
|
|
502 |
void LoadSamples(); |
virtual void LoadSamples(); |
503 |
void LoadInstruments(); |
virtual void LoadInstruments(); |
504 |
void __ensureMandatoryChunksExist(); |
void __ensureMandatoryChunksExist(); |
505 |
friend class Region; // Region has to look in the wave pool table to get its sample |
friend class Region; // Region has to look in the wave pool table to get its sample |
506 |
private: |
private: |