libgig
3.3.0.19svn2660
|
Parses Gigasampler files and provides abstract access to the data. More...
#include <gig.h>
Public Member Functions | |
File () | |
File (RIFF::File *pRIFF) | |
Sample * | GetFirstSample (progress_t *pProgress=NULL) |
Returns a pointer to the first Sample object of the file, NULL otherwise. More... | |
Sample * | GetNextSample () |
Returns a pointer to the next Sample object of the file, NULL otherwise. More... | |
Sample * | GetSample (uint index) |
Returns Sample object of index. More... | |
Sample * | AddSample () |
Add a new sample. More... | |
void | DeleteSample (Sample *pSample) |
Delete a sample. More... | |
Instrument * | GetFirstInstrument () |
Returns a pointer to the first Instrument object of the file, NULL otherwise. More... | |
Instrument * | GetNextInstrument () |
Returns a pointer to the next Instrument object of the file, NULL otherwise. More... | |
Instrument * | GetInstrument (uint index, progress_t *pProgress=NULL) |
Returns the instrument with the given index. More... | |
Instrument * | AddInstrument () |
Add a new instrument definition. More... | |
Instrument * | AddDuplicateInstrument (const Instrument *orig) |
Add a duplicate of an existing instrument. More... | |
void | DeleteInstrument (Instrument *pInstrument) |
Delete an instrument. More... | |
Group * | GetFirstGroup () |
Returns a pointer to the first Group object of the file, NULL otherwise. More... | |
Group * | GetNextGroup () |
Returns a pointer to the next Group object of the file, NULL otherwise. More... | |
Group * | GetGroup (uint index) |
Returns the group with the given index. More... | |
Group * | GetGroup (String name) |
Returns the group with the given group name. More... | |
Group * | AddGroup () |
void | DeleteGroup (Group *pGroup) |
Delete a group and its samples. More... | |
void | DeleteGroupOnly (Group *pGroup) |
Delete a group. More... | |
void | SetAutoLoad (bool b) |
Enable / disable automatic loading. More... | |
bool | GetAutoLoad () |
Returns whether automatic loading is enabled. More... | |
void | AddContentOf (File *pFile) |
Add content of another existing file. More... | |
ScriptGroup * | GetScriptGroup (uint index) |
Get instrument script group (by index). More... | |
ScriptGroup * | GetScriptGroup (const String &name) |
Get instrument script group (by name). More... | |
ScriptGroup * | AddScriptGroup () |
Add new instrument script group. More... | |
void | DeleteScriptGroup (ScriptGroup *pGroup) |
Delete an instrument script group. More... | |
virtual | ~File () |
virtual void | UpdateChunks () |
Apply all the gig file's current instruments, samples, groups and settings to the respective RIFF chunks. More... | |
Static Public Attributes | |
static const DLS::version_t | VERSION_2 |
Reflects Gigasampler file format version 2.0 (1998-06-28). More... | |
static const DLS::version_t | VERSION_3 |
Reflects Gigasampler file format version 3.0 (2003-03-31). More... | |
Protected Types | |
typedef std::list< Sample * > | SampleList |
typedef std::list< Instrument * > | InstrumentList |
Protected Member Functions | |
virtual void | LoadSamples () |
virtual void | LoadInstruments () |
virtual void | LoadGroups () |
virtual void | UpdateFileOffsets () |
Updates all file offsets stored all over the file. More... | |
virtual void | LoadSamples (progress_t *pProgress) |
virtual void | LoadInstruments (progress_t *pProgress) |
virtual void | LoadScriptGroups () |
void | SetSampleChecksum (Sample *pSample, uint32_t crc) |
Updates the 3crc chunk with the checksum of a sample. More... | |
String | GetFileName () |
File name of this DLS file. More... | |
void | SetFileName (const String &name) |
You may call this method store a future file name, so you don't have to to pass it to the Save() call later on. More... | |
Sample * | GetFirstSample () |
Returns a pointer to the first Sample object of the file, NULL otherwise. More... | |
void | DeleteSample (Sample *pSample) |
Delete a sample. More... | |
void | DeleteInstrument (Instrument *pInstrument) |
Delete an instrument. More... | |
RIFF::File * | GetExtensionFile (int index) |
Returns extension file of given index. More... | |
virtual void | Save (const String &Path) |
Save changes to another file. More... | |
virtual void | Save () |
Save changes to same file. More... | |
void | __ensureMandatoryChunksExist () |
Checks if all (for DLS) mandatory chunks exist, if not they will be created. More... | |
Resource * | GetParent () |
const Resource * | GetParent () const |
void | GenerateDLSID () |
Generates a new DLSID for the resource. More... | |
virtual void | CopyAssign (const Resource *orig) |
Make a deep copy of the Resource object given by orig and assign it to this object. More... | |
Protected Attributes | |
version_t * | pVersion |
Points to a version_t structure if the file provided a version number else is set to NULL. More... | |
uint32_t | Instruments |
Reflects the number of available Instrument objects. More... | |
RIFF::File * | pRIFF |
std::list< RIFF::File * > | ExtensionFiles |
SampleList * | pSamples |
SampleList::iterator | SamplesIterator |
InstrumentList * | pInstruments |
InstrumentList::iterator | InstrumentsIterator |
uint32_t | WavePoolHeaderSize |
uint32_t | WavePoolCount |
uint32_t * | pWavePoolTable |
uint32_t * | pWavePoolTableHi |
bool | b64BitWavePoolOffsets |
Info * | pInfo |
Points (in any case) to an Info object, providing additional, optional infos and comments. More... | |
dlsid_t * | pDLSID |
Points to a dlsid_t structure if the file provided a DLS ID else is NULL. More... | |
Resource * | pParent |
RIFF::List * | pResourceList |
Friends | |
class | Region |
class | Sample |
class | Group |
class | ScriptGroup |
Parses Gigasampler files and provides abstract access to the data.
|
protectedinherited |
|
protectedinherited |
gig::File::File | ( | ) |
Definition at line 5134 of file gig.cpp.
References RIFF::List::AddSubChunk(), DLS::Info::ArchivalLocation, CHUNK_ID_COLH, CHUNK_ID_DLID, CHUNK_ID_VERS, DLS::Resource::GenerateDLSID(), DLS::Resource::pInfo, DLS::File::pRIFF, DLS::File::pVersion, DLS::Info::SetFixedStringLengths(), and VERSION_3.
gig::File::File | ( | RIFF::File * | pRIFF | ) |
Definition at line 5151 of file gig.cpp.
References DLS::Resource::pInfo, and DLS::Info::SetFixedStringLengths().
|
protectedinherited |
Checks if all (for DLS) mandatory chunks exist, if not they will be created.
Note that those chunks will not be made persistent until Save() was called.
Definition at line 1783 of file DLS.cpp.
References RIFF::List::AddSubChunk(), RIFF::List::AddSubList(), DLS::File::b64BitWavePoolOffsets, CHUNK_ID_PTBL, RIFF::List::GetSubChunk(), RIFF::List::GetSubList(), LIST_TYPE_LINS, LIST_TYPE_WVPL, DLS::File::pRIFF, and DLS::File::WavePoolHeaderSize.
Referenced by AddGroup(), DLS::File::AddInstrument(), AddInstrument(), DLS::File::AddSample(), and AddSample().
void gig::File::AddContentOf | ( | File * | pFile | ) |
Add content of another existing file.
Duplicates the samples, groups and instruments of the original file given by pFile and adds them to this
File. In case this
File is a new one that you haven't saved before, then you have to call SetFileName() before calling AddContentOf(), because this method will automatically save this file during operation, which is required for writing the sample waveform data by disk streaming.
pFile | - original file whose's content shall be copied from |
Definition at line 5438 of file gig.cpp.
References AddGroup(), AddInstrument(), AddSample(), gig::Instrument::CopyAssign(), gig::Sample::CopyAssignMeta(), DLS::File::GetFileName(), gig::Sample::GetGroup(), GetGroup(), GetInstrument(), GetSample(), RIFF::File::IsNew(), gig::Group::Name, DLS::File::pRIFF, and DLS::File::Save().
Instrument * gig::File::AddDuplicateInstrument | ( | const Instrument * | orig | ) |
Add a duplicate of an existing instrument.
Duplicates the instrument definition given by orig and adds it to this file. This allows in an instrument editor application to easily create variations of an instrument, which will be stored in the same .gig file, sharing i.e. the same samples.
Note that all sample pointers referenced by orig are simply copied as memory address. Thus the respective samples are shared, not duplicated!
You have to call Save() to make this persistent to the file.
orig | - original instrument to be copied |
Definition at line 5421 of file gig.cpp.
References AddInstrument(), and gig::Instrument::CopyAssign().
Group * gig::File::AddGroup | ( | ) |
Definition at line 5609 of file gig.cpp.
References DLS::File::__ensureMandatoryChunksExist(), Group, and LoadGroups().
Referenced by AddContentOf().
Instrument * gig::File::AddInstrument | ( | ) |
Add a new instrument definition.
This will create a new Instrument object for the gig file. You have to call Save() to make this persistent to the file.
Definition at line 5384 of file gig.cpp.
References DLS::File::__ensureMandatoryChunksExist(), RIFF::List::AddSubChunk(), RIFF::List::AddSubList(), CHUNK_ID_DLID, CHUNK_ID_INSH, DLS::Resource::GenerateDLSID(), RIFF::List::GetSubList(), LIST_TYPE_INFO, LIST_TYPE_INS, LIST_TYPE_LINS, LoadInstruments(), DLS::Resource::pInfo, DLS::File::pInstruments, DLS::File::pRIFF, and DLS::Info::Software.
Referenced by AddContentOf(), and AddDuplicateInstrument().
Sample * gig::File::AddSample | ( | ) |
Add a new sample.
This will create a new Sample object for the gig file. You have to call Save() to make this persistent to the file.
Definition at line 5216 of file gig.cpp.
References DLS::File::__ensureMandatoryChunksExist(), RIFF::List::AddSubChunk(), RIFF::List::AddSubList(), CHUNK_ID_FMT, RIFF::List::GetSubList(), LIST_TYPE_INFO, LIST_TYPE_WAVE, LIST_TYPE_WVPL, LoadSamples(), DLS::File::pRIFF, DLS::File::pSamples, and Sample.
Referenced by AddContentOf().
ScriptGroup * gig::File::AddScriptGroup | ( | ) |
Add new instrument script group.
Adds a new, empty real-time instrument script group to the file.
You have to call Save() to make this persistent to the file.
Definition at line 5728 of file gig.cpp.
References LoadScriptGroups(), and ScriptGroup.
|
virtualinherited |
Make a deep copy of the Resource object given by orig and assign it to this object.
orig | - original Resource object to be copied from |
Definition at line 534 of file DLS.cpp.
References DLS::Info::CopyAssign(), and DLS::Resource::pInfo.
Referenced by DLS::Region::CopyAssign(), DLS::Sample::CopyAssignCore(), and DLS::Instrument::CopyAssignCore().
void gig::File::DeleteGroup | ( | Group * | pGroup | ) |
Delete a group and its samples.
This will delete the given Group object and all the samples that belong to this group from the gig file. You have to call Save() to make this persistent to the file.
pGroup | - group to delete |
gig::Exception | if given group could not be found |
Definition at line 5627 of file gig.cpp.
References DeleteSample(), gig::Group::GetFirstSample(), gig::Group::GetNextSample(), and LoadGroups().
void gig::File::DeleteGroupOnly | ( | Group * | pGroup | ) |
Delete a group.
This will delete the given Group object from the gig file. All the samples that belong to this group will not be deleted, but instead be moved to another group. You have to call Save() to make this persistent to the file.
pGroup | - group to delete |
gig::Exception | if given group could not be found |
Definition at line 5651 of file gig.cpp.
References LoadGroups(), and gig::Group::MoveAll().
|
inherited |
Delete an instrument.
This will delete the given Instrument object from the DLS file. You have to call Save() to make this persistent to the file.
pInstrument | - instrument to delete |
Definition at line 1620 of file DLS.cpp.
References DLS::File::pInstruments.
void gig::File::DeleteInstrument | ( | Instrument * | pInstrument | ) |
Delete an instrument.
This will delete the given Instrument object from the gig file. You have to call Save() to make this persistent to the file.
pInstrument | - instrument to delete |
gig::Exception | if given instrument could not be found |
Definition at line 5498 of file gig.cpp.
References DLS::File::pInstruments.
|
inherited |
void gig::File::DeleteSample | ( | Sample * | pSample | ) |
Delete a sample.
This will delete the given Sample object from the gig file. Any references to this sample from Regions and DimensionRegions will be removed. You have to call Save() to make this persistent to the file.
pSample | - sample to delete |
gig::Exception | if given sample could not be found |
Definition at line 5241 of file gig.cpp.
References GetFirstInstrument(), GetNextInstrument(), gig::DimensionRegion::pSample, DLS::File::pSamples, and DLS::File::SamplesIterator.
Referenced by DeleteGroup().
void gig::File::DeleteScriptGroup | ( | ScriptGroup * | pScriptGroup | ) |
Delete an instrument script group.
This will delete the given real-time instrument script group and all its instrument scripts it contains. References inside instruments that are using the deleted scripts will be removed from the respective instruments accordingly.
You have to call Save() to make this persistent to the file.
pScriptGroup | - script group to delete |
gig::Exception | if given script group could not be found |
Definition at line 5747 of file gig.cpp.
References gig::ScriptGroup::DeleteScript(), RIFF::List::DeleteSubChunk(), RIFF::Chunk::GetParent(), gig::ScriptGroup::GetScript(), and LoadScriptGroups().
|
inherited |
Generates a new DLSID for the resource.
Definition at line 487 of file DLS.cpp.
References DLS::dlsid_t::abData, DLS::Resource::pDLSID, DLS::dlsid_t::ulData1, DLS::dlsid_t::usData2, and DLS::dlsid_t::usData3.
Referenced by AddInstrument(), and File().
bool gig::File::GetAutoLoad | ( | ) |
Returns whether automatic loading is enabled.
Definition at line 6018 of file gig.cpp.
Referenced by GetInstrument(), gig::Instrument::Instrument(), and gig::Region::Region().
|
inherited |
Returns extension file of given index.
Extension files are used sometimes to circumvent the 2 GB file size limit of the RIFF format and of certain operating systems in general. In this case, instead of just using one file, the content is spread among several files with similar file name scheme. This is especially used by some GigaStudio sound libraries.
index | - index of extension file |
Definition at line 1640 of file DLS.cpp.
References DLS::File::ExtensionFiles.
|
inherited |
This method returns the file name as it was provided when loading the respective DLS file. However in case the File object associates an empty, that is new DLS file, which was not yet saved to disk, this method will return an empty string.
Definition at line 1657 of file DLS.cpp.
References RIFF::File::GetFileName(), and DLS::File::pRIFF.
Referenced by AddContentOf().
Group * gig::File::GetFirstGroup | ( | ) |
Returns a pointer to the first Group object of the file, NULL otherwise.
Definition at line 5562 of file gig.cpp.
References LoadGroups().
Referenced by gig::Group::MoveAll().
Instrument * gig::File::GetFirstInstrument | ( | ) |
Returns a pointer to the first Instrument object of the file, NULL otherwise.
Definition at line 5327 of file gig.cpp.
References DLS::File::InstrumentsIterator, LoadInstruments(), and DLS::File::pInstruments.
Referenced by DeleteSample(), UpdateChunks(), and UpdateFileOffsets().
|
inherited |
Returns a pointer to the first Sample object of the file, NULL otherwise.
Definition at line 1493 of file DLS.cpp.
References DLS::File::LoadSamples(), DLS::File::pSamples, and DLS::File::SamplesIterator.
Referenced by GetInstrument(), DLS::Region::GetSample(), and UpdateChunks().
Sample * gig::File::GetFirstSample | ( | progress_t * | pProgress = NULL | ) |
Returns a pointer to the first Sample object of the file, NULL otherwise.
Definition at line 5179 of file gig.cpp.
References LoadSamples(), DLS::File::pSamples, and DLS::File::SamplesIterator.
Referenced by gig::Group::GetFirstSample(), and gig::Region::GetSampleFromWavePool().
Group * gig::File::GetGroup | ( | uint | index | ) |
Returns the group with the given index.
index | - number of the sought group (0..n) |
Definition at line 5581 of file gig.cpp.
References LoadGroups().
Referenced by AddContentOf(), and gig::Sample::Sample().
Returns the group with the given group name.
Note: group names don't have to be unique in the gig format! So there can be multiple groups with the same name. This method will simply return the first group found with the given name.
name | - name of the sought group |
Definition at line 5601 of file gig.cpp.
References LoadGroups().
Instrument * gig::File::GetInstrument | ( | uint | index, |
progress_t * | pProgress = NULL |
||
) |
Returns the instrument with the given index.
index | - number of the sought instrument (0..n) |
pProgress | - optional: callback function for progress notification |
Definition at line 5347 of file gig.cpp.
References gig::progress_t::__range_max, gig::progress_t::__range_min, gig::progress_t::callback, GetAutoLoad(), DLS::File::GetFirstSample(), DLS::File::InstrumentsIterator, LoadInstruments(), and DLS::File::pInstruments.
Referenced by AddContentOf(), and gig::Script::RemoveAllScriptReferences().
Group * gig::File::GetNextGroup | ( | ) |
Returns a pointer to the next Group object of the file, NULL otherwise.
Definition at line 5569 of file gig.cpp.
Referenced by gig::Group::MoveAll().
Instrument * gig::File::GetNextInstrument | ( | ) |
Returns a pointer to the next Instrument object of the file, NULL otherwise.
Definition at line 5334 of file gig.cpp.
References DLS::File::InstrumentsIterator, and DLS::File::pInstruments.
Referenced by DeleteSample(), UpdateChunks(), and UpdateFileOffsets().
Sample * gig::File::GetNextSample | ( | ) |
Returns a pointer to the next Sample object of the file, NULL otherwise.
Definition at line 5186 of file gig.cpp.
References DLS::File::pSamples, and DLS::File::SamplesIterator.
Referenced by gig::Group::GetFirstSample(), gig::Group::GetNextSample(), gig::Region::GetSampleFromWavePool(), and UpdateChunks().
|
inlineinherited |
Definition at line 349 of file DLS.h.
References DLS::Resource::pParent.
Referenced by gig::Region::AddDimension(), DLS::Region::CopyAssign(), gig::DimensionRegion::CopyAssign(), gig::Region::DeleteDimensionZone(), DLS::Region::GetSample(), gig::Region::GetSampleFromWavePool(), gig::Instrument::LoadScripts(), gig::Region::Region(), DLS::Region::SetKeyRange(), gig::Region::SetKeyRange(), gig::Region::SplitDimensionZone(), DLS::Region::UpdateChunks(), gig::DimensionRegion::UpdateChunks(), gig::Region::UpdateChunks(), gig::Instrument::UpdateChunks(), and gig::Sample::Write().
|
inlineinherited |
Definition at line 350 of file DLS.h.
References DLS::Resource::pParent.
Sample * gig::File::GetSample | ( | uint | index | ) |
Returns Sample object of index.
Definition at line 5197 of file gig.cpp.
References LoadSamples(), and DLS::File::pSamples.
Referenced by AddContentOf().
ScriptGroup * gig::File::GetScriptGroup | ( | uint | index | ) |
Get instrument script group (by index).
Returns the real-time instrument script group with the given index.
index | - number of the sought group (0..n) |
Definition at line 5696 of file gig.cpp.
References LoadScriptGroups().
Referenced by gig::Instrument::LoadScripts().
ScriptGroup * gig::File::GetScriptGroup | ( | const String & | name | ) |
Get instrument script group (by name).
Returns the first real-time instrument script group found with the given group name. Note that group names may not necessarily be unique.
name | - name of the sought script group |
Definition at line 5712 of file gig.cpp.
References LoadScriptGroups().
|
protectedvirtual |
Definition at line 5662 of file gig.cpp.
References CHUNK_ID_3GNM, RIFF::Chunk::GetChunkID(), RIFF::List::GetFirstSubChunk(), RIFF::List::GetNextSubChunk(), RIFF::List::GetSubList(), Group, LIST_TYPE_3GNL, LIST_TYPE_3GRI, RIFF::Chunk::LoadChunkData(), DLS::version_t::major, gig::Group::Name, DLS::File::pRIFF, and DLS::File::pVersion.
Referenced by AddGroup(), DeleteGroup(), DeleteGroupOnly(), GetFirstGroup(), GetGroup(), and LoadSamples().
|
protectedvirtual |
Reimplemented from DLS::File.
Definition at line 5506 of file gig.cpp.
Referenced by AddInstrument(), GetFirstInstrument(), and GetInstrument().
|
protectedvirtual |
Definition at line 5510 of file gig.cpp.
References RIFF::List::GetFirstSubList(), RIFF::List::GetListType(), RIFF::List::GetNextSubList(), RIFF::List::GetSubList(), DLS::File::Instruments, LIST_TYPE_INS, LIST_TYPE_LINS, DLS::File::pInstruments, and DLS::File::pRIFF.
|
protectedvirtual |
Reimplemented from DLS::File.
Definition at line 5267 of file gig.cpp.
Referenced by AddSample(), GetFirstSample(), and GetSample().
|
protectedvirtual |
Definition at line 5271 of file gig.cpp.
References DLS::File::ExtensionFiles, RIFF::File::GetFileName(), RIFF::Chunk::GetFilePos(), RIFF::List::GetFirstSubList(), RIFF::List::GetListType(), RIFF::List::GetNextSubList(), RIFF::List::GetSubList(), LIST_TYPE_WAVE, LIST_TYPE_WVPL, LoadGroups(), DLS::File::pRIFF, DLS::File::pSamples, DLS::File::pWavePoolTableHi, Sample, and DLS::File::WavePoolCount.
|
protectedvirtual |
Definition at line 5761 of file gig.cpp.
References RIFF::List::GetFirstSubList(), RIFF::List::GetNextSubList(), RIFF::List::GetSubList(), LIST_TYPE_3LS, LIST_TYPE_RTIS, DLS::File::pRIFF, and ScriptGroup.
Referenced by AddScriptGroup(), DeleteScriptGroup(), and GetScriptGroup().
|
virtualinherited |
Save changes to another file.
Make all changes persistent by writing them to another file. Caution: this method is optimized for writing to another file, do not use it to save the changes to the same file! Use Save() (without path argument) in that case instead! Ignoring this might result in a corrupted file!
After calling this method, this File object will be associated with the new file (given by Path) afterwards.
Path | - path and file name where everything should be written to |
Definition at line 1743 of file DLS.cpp.
References DLS::File::pRIFF, RIFF::File::Save(), DLS::File::UpdateChunks(), and DLS::File::UpdateFileOffsets().
|
virtualinherited |
Save changes to same file.
Make all changes persistent by writing them to the actual (same) file. The file might temporarily grow to a higher size than it will have at the end of the saving process.
RIFF::Exception | if any kind of IO error occured |
DLS::Exception | if any kind of DLS specific error occured |
Definition at line 1758 of file DLS.cpp.
References DLS::File::pRIFF, RIFF::File::Save(), DLS::File::UpdateChunks(), and DLS::File::UpdateFileOffsets().
Referenced by AddContentOf().
void gig::File::SetAutoLoad | ( | bool | b | ) |
Enable / disable automatic loading.
By default this properyt is enabled and all informations are loaded automatically. However loading all Regions, DimensionRegions and especially samples might take a long time for large .gig files, and sometimes one might only be interested in retrieving very superficial informations like the amount of instruments and their names. In this case one might disable automatic loading to avoid very slow response times.
CAUTION: by disabling this property many pointers (i.e. sample references) and informations will have invalid or even undefined data! This feature is currently only intended for retrieving very superficial informations in a very fast way. Don't use it to retrieve details like synthesis informations or even to modify .gig files!
|
inherited |
You may call this method store a future file name, so you don't have to to pass it to the Save() call later on.
Definition at line 1665 of file DLS.cpp.
References DLS::File::pRIFF, and RIFF::File::SetFileName().
|
protected |
Updates the 3crc chunk with the checksum of a sample.
The update is done directly to disk, as this method is called after File::Save()
Definition at line 5539 of file gig.cpp.
References CHUNK_ID_3CRC, RIFF::List::GetSubChunk(), DLS::File::pRIFF, DLS::File::pSamples, RIFF::Chunk::SetPos(), and RIFF::Chunk::WriteUint32().
Referenced by gig::Sample::Write().
|
virtual |
Apply all the gig file's current instruments, samples, groups and settings to the respective RIFF chunks.
You have to call Save() to make changes persistent.
Usually there is absolutely no need to call this method explicitly. It will be called automatically when File::Save() was called.
Exception | - on errors |
Reimplemented from DLS::File.
Definition at line 5786 of file gig.cpp.
References RIFF::List::AddSubChunk(), RIFF::List::AddSubList(), DLS::File::b64BitWavePoolOffsets, DLS::Sample::Channels, CHUNK_ID_3CRC, CHUNK_ID_3GNM, CHUNK_ID_EINF, CHUNK_ID_PTBL, RIFF::List::DeleteSubChunk(), GetFirstInstrument(), DLS::File::GetFirstSample(), RIFF::List::GetFirstSubChunk(), GetNextInstrument(), GetNextSample(), RIFF::List::GetNextSubChunk(), RIFF::Chunk::GetSize(), RIFF::List::GetSubChunk(), RIFF::List::GetSubList(), DLS::File::Instruments, LIST_TYPE_3GNL, LIST_TYPE_3GRI, LIST_TYPE_3LS, LIST_TYPE_INFO, RIFF::Chunk::LoadChunkData(), DLS::version_t::major, RIFF::List::MoveSubChunk(), DLS::File::pRIFF, gig::DimensionRegion::pSample, DLS::File::pSamples, DLS::File::pVersion, RIFF::Chunk::Resize(), DLS::Sampler::SampleLoops, and DLS::File::UpdateChunks().
|
protectedvirtual |
Updates all file offsets stored all over the file.
This virtual method is called whenever the overall file layout has been changed (i.e. file or individual RIFF chunks have been resized). It is then the responsibility of this method to update all file offsets stored in the file format. For example samples are referenced by instruments by file offsets. The gig format also stores references to instrument scripts as file offsets, and thus it overrides this method to update those file offsets as well.
Reimplemented from DLS::File.
Definition at line 5985 of file gig.cpp.
References GetFirstInstrument(), GetNextInstrument(), and DLS::File::UpdateFileOffsets().
|
friend |
Definition at line 1097 of file gig.h.
Referenced by AddGroup(), and LoadGroups().
|
friend |
Definition at line 1096 of file gig.h.
Referenced by AddSample(), and LoadSamples().
|
friend |
Definition at line 1098 of file gig.h.
Referenced by AddScriptGroup(), and LoadScriptGroups().
|
protectedinherited |
Definition at line 531 of file DLS.h.
Referenced by DLS::File::__ensureMandatoryChunksExist(), DLS::File::File(), DLS::File::UpdateChunks(), and UpdateChunks().
|
protectedinherited |
Definition at line 522 of file DLS.h.
Referenced by DLS::File::GetExtensionFile(), LoadSamples(), and DLS::File::~File().
|
inherited |
Reflects the number of available Instrument objects.
Definition at line 498 of file DLS.h.
Referenced by DLS::File::File(), LoadInstruments(), DLS::File::UpdateChunks(), and UpdateChunks().
|
protectedinherited |
Definition at line 526 of file DLS.h.
Referenced by DLS::File::GetFirstInstrument(), GetFirstInstrument(), GetInstrument(), DLS::File::GetNextInstrument(), and GetNextInstrument().
|
inherited |
Points to a dlsid_t structure if the file provided a DLS ID else is NULL.
Definition at line 347 of file DLS.h.
Referenced by DLS::Resource::GenerateDLSID(), DLS::Resource::Resource(), DLS::Resource::UpdateChunks(), and DLS::Resource::~Resource().
|
inherited |
Points (in any case) to an Info object, providing additional, optional infos and comments.
Definition at line 346 of file DLS.h.
Referenced by AddInstrument(), DLS::Resource::CopyAssign(), File(), gig::Instrument::Instrument(), DLS::Resource::Resource(), gig::Sample::Sample(), DLS::Resource::UpdateChunks(), and DLS::Resource::~Resource().
|
protectedinherited |
Definition at line 525 of file DLS.h.
Referenced by DLS::File::AddInstrument(), AddInstrument(), DLS::File::DeleteInstrument(), DeleteInstrument(), DLS::File::File(), DLS::File::GetFirstInstrument(), GetFirstInstrument(), GetInstrument(), DLS::File::GetNextInstrument(), GetNextInstrument(), DLS::File::LoadInstruments(), LoadInstruments(), DLS::File::UpdateChunks(), and DLS::File::~File().
|
protectedinherited |
Definition at line 355 of file DLS.h.
Referenced by DLS::Resource::GetParent(), DLS::Resource::Resource(), gig::Sample::UpdateChunks(), DLS::Instrument::~Instrument(), DLS::Region::~Region(), and DLS::Sample::~Sample().
|
protectedinherited |
Definition at line 356 of file DLS.h.
Referenced by DLS::Resource::Resource(), and DLS::Resource::UpdateChunks().
|
protectedinherited |
Definition at line 521 of file DLS.h.
Referenced by DLS::File::__ensureMandatoryChunksExist(), AddContentOf(), DLS::File::AddInstrument(), AddInstrument(), DLS::File::AddSample(), AddSample(), DLS::File::File(), File(), DLS::File::GetFileName(), LoadGroups(), DLS::File::LoadInstruments(), LoadInstruments(), DLS::File::LoadSamples(), LoadSamples(), LoadScriptGroups(), DLS::File::Save(), DLS::File::SetFileName(), SetSampleChecksum(), DLS::File::UpdateChunks(), gig::ScriptGroup::UpdateChunks(), gig::Group::UpdateChunks(), and UpdateChunks().
|
protectedinherited |
Definition at line 523 of file DLS.h.
Referenced by DLS::File::AddSample(), AddSample(), DLS::File::DeleteSample(), DeleteSample(), DLS::File::File(), DLS::File::GetFirstSample(), GetFirstSample(), DLS::File::GetNextSample(), GetNextSample(), GetSample(), DLS::File::LoadSamples(), LoadSamples(), SetSampleChecksum(), DLS::Region::UpdateChunks(), DLS::File::UpdateChunks(), gig::Region::UpdateChunks(), UpdateChunks(), and DLS::File::~File().
|
inherited |
Points to a version_t structure if the file provided a version number else is set to NULL.
Definition at line 497 of file DLS.h.
Referenced by gig::Region::AddDimension(), DLS::File::File(), File(), LoadGroups(), gig::Region::Region(), gig::DimensionRegion::UpdateChunks(), DLS::File::UpdateChunks(), gig::Region::UpdateChunks(), gig::Instrument::UpdateChunks(), gig::Group::UpdateChunks(), UpdateChunks(), and DLS::File::~File().
|
protectedinherited |
Definition at line 529 of file DLS.h.
Referenced by DLS::File::File(), DLS::Region::GetSample(), gig::Region::GetSampleFromWavePool(), gig::Region::Region(), and DLS::File::~File().
|
protectedinherited |
Definition at line 530 of file DLS.h.
Referenced by DLS::File::File(), gig::Region::GetSampleFromWavePool(), LoadSamples(), and DLS::File::~File().
|
protectedinherited |
Definition at line 524 of file DLS.h.
Referenced by DeleteSample(), DLS::File::GetFirstSample(), GetFirstSample(), DLS::File::GetNextSample(), and GetNextSample().
|
static |
|
static |
|
protectedinherited |
Definition at line 528 of file DLS.h.
Referenced by DLS::File::File(), LoadSamples(), and DLS::File::UpdateChunks().
|
protectedinherited |
Definition at line 527 of file DLS.h.
Referenced by DLS::File::__ensureMandatoryChunksExist(), DLS::File::File(), and DLS::File::UpdateChunks().