Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

gig::File Class Reference

Parses Gigasampler files and provides abstract access to the data. More...

#include <gig.h>

Inheritance diagram for gig::File:

DLS::File DLS::Resource List of all members.

Public Member Functions

 File (RIFF::File *pRIFF)
SampleGetFirstSample (progress_t *pProgress=NULL)
 Returns a pointer to the first Sample object of the file, NULL otherwise.
SampleGetNextSample ()
 Returns a pointer to the next Sample object of the file, NULL otherwise.
InstrumentGetFirstInstrument ()
 Returns a pointer to the first Instrument object of the file, NULL otherwise.
InstrumentGetNextInstrument ()
 Returns a pointer to the next Instrument object of the file, NULL otherwise.
InstrumentGetInstrument (uint index, progress_t *pProgress=NULL)
 Returns the instrument with the given index.
 ~File ()

Protected Types

typedef std::list< Sample * > SampleList
typedef std::list< Instrument * > InstrumentList

Protected Member Functions

void LoadSamples (progress_t *pProgress=NULL)
void LoadInstruments (progress_t *pProgress=NULL)
SampleGetFirstSample ()
 Returns a pointer to the first Sample object of the file, NULL otherwise.
void LoadSamples ()
void LoadInstruments ()
Resource * GetParent ()

Protected Attributes

SampleListpSamples
SampleList::iterator SamplesIterator
InstrumentListpInstruments
InstrumentList::iterator InstrumentsIterator
version_t * pVersion
 Points to a version_t structure if the file provided a version number else is set to NULL.
uint32_t Instruments
 Reflects the number of available Instrument objects.
RIFF::FilepRIFF
uint32_t WavePoolCount
uint32_t * pWavePoolTable
Info * pInfo
 Points (in any case) to an Info object, providing additional, optional infos and comments.
dlsid_t * pDLSID
 Points to a dlsid_t structure if the file provided a DLS ID else is NULL.
Resource * pParent

Friends

class Region

Detailed Description

Parses Gigasampler files and provides abstract access to the data.

Definition at line 692 of file gig.h.


Member Typedef Documentation

typedef std::list<Instrument*> gig::File::InstrumentList [protected]
 

Reimplemented from DLS::File.

Definition at line 713 of file gig.h.

typedef std::list<Sample*> gig::File::SampleList [protected]
 

Reimplemented from DLS::File.

Definition at line 712 of file gig.h.


Constructor & Destructor Documentation

gig::File::File RIFF::File pRIFF  ) 
 

Reimplemented from DLS::File.

Definition at line 1710 of file gig.cpp.

References pInstruments, and pSamples.

gig::File::~File  )  [virtual]
 

Reimplemented from DLS::File.

Definition at line 1715 of file gig.cpp.

References InstrumentsIterator, pInstruments, pSamples, and SamplesIterator.


Member Function Documentation

Instrument * gig::File::GetFirstInstrument  ) 
 

Returns a pointer to the first Instrument object of the file, NULL otherwise.

Reimplemented from DLS::File.

Definition at line 1780 of file gig.cpp.

References InstrumentsIterator, DLS::File::LoadInstruments(), and pInstruments.

Referenced by PrintInstruments().

Sample * DLS::File::GetFirstSample  )  [inherited]
 

Returns a pointer to the first Sample object of the file, NULL otherwise.

Definition at line 459 of file DLS.cpp.

References DLS::File::LoadSamples(), DLS::File::pSamples, and DLS::File::SamplesIterator.

Referenced by GetInstrument(), DLS::Region::GetSample(), and PrintSamples().

Sample * gig::File::GetFirstSample progress_t pProgress = NULL  ) 
 

Returns a pointer to the first Sample object of the file, NULL otherwise.

Definition at line 1739 of file gig.cpp.

References DLS::File::LoadSamples(), pSamples, and SamplesIterator.

Referenced by ExtractSamples(), gig::Region::GetSampleFromWavePool(), and PrintSamples().

Instrument * gig::File::GetInstrument uint  index,
progress_t pProgress = NULL
 

Returns the instrument with the given index.

Parameters:
index - number of the sought instrument (0..n)
pProgress - optional: callback function for progress notification
Returns:
sought instrument or NULL if there's no such instrument

Definition at line 1800 of file gig.cpp.

References gig::__divide_progress(), gig::__notify_progress(), gig::progress_t::__range_max, gig::progress_t::__range_min, gig::progress_t::callback, DLS::File::GetFirstSample(), InstrumentsIterator, DLS::File::LoadInstruments(), and pInstruments.

Instrument * gig::File::GetNextInstrument  ) 
 

Returns a pointer to the next Instrument object of the file, NULL otherwise.

Reimplemented from DLS::File.

Definition at line 1787 of file gig.cpp.

References InstrumentsIterator, and pInstruments.

Referenced by PrintInstruments().

Sample * gig::File::GetNextSample  ) 
 

Returns a pointer to the next Sample object of the file, NULL otherwise.

Reimplemented from DLS::File.

Definition at line 1746 of file gig.cpp.

References pSamples, and SamplesIterator.

Referenced by ExtractSamples(), gig::Region::GetSampleFromWavePool(), and PrintSamples().

Resource* DLS::Resource::GetParent  )  [inline, inherited]
 

Definition at line 350 of file DLS.h.

Referenced by DLS::Region::GetSample(), gig::Region::GetSampleFromWavePool(), and gig::Region::Region().

void DLS::File::LoadInstruments  )  [protected, inherited]
 

Definition at line 516 of file DLS.cpp.

References RIFF::List::GetFirstSubList(), RIFF::List::GetListType(), RIFF::List::GetNextSubList(), RIFF::List::GetSubList(), LIST_TYPE_INS, LIST_TYPE_LINS, DLS::File::pInstruments, and DLS::File::pRIFF.

Referenced by GetFirstInstrument(), DLS::File::GetFirstInstrument(), and GetInstrument().

void gig::File::LoadInstruments progress_t pProgress = NULL  )  [protected]
 

Definition at line 1829 of file gig.cpp.

References gig::__divide_progress(), gig::__notify_progress(), RIFF::List::GetFirstSubList(), RIFF::List::GetListType(), RIFF::List::GetNextSubList(), RIFF::List::GetSubList(), DLS::File::Instruments, LIST_TYPE_INS, LIST_TYPE_LINS, pInstruments, and DLS::File::pRIFF.

void DLS::File::LoadSamples  )  [protected, inherited]
 

Definition at line 472 of file DLS.cpp.

References RIFF::Chunk::GetFilePos(), RIFF::List::GetFirstSubList(), RIFF::List::GetListType(), RIFF::List::GetNextSubList(), RIFF::List::GetSubList(), LIST_TYPE_DWPL, LIST_TYPE_WAVE, LIST_TYPE_WVPL, DLS::File::pRIFF, and DLS::File::pSamples.

Referenced by GetFirstSample(), and DLS::File::GetFirstSample().

void gig::File::LoadSamples progress_t pProgress = NULL  )  [protected]
 

Definition at line 1752 of file gig.cpp.

References gig::__notify_progress(), RIFF::List::CountSubLists(), RIFF::Chunk::GetFilePos(), RIFF::List::GetFirstSubList(), RIFF::List::GetListType(), RIFF::List::GetNextSubList(), RIFF::List::GetSubList(), LIST_TYPE_WAVE, LIST_TYPE_WVPL, DLS::File::pRIFF, and pSamples.


Friends And Related Function Documentation

friend class Region [friend]
 

Reimplemented from DLS::File.

Definition at line 722 of file gig.h.


Member Data Documentation

uint32_t DLS::File::Instruments [inherited]
 

Reflects the number of available Instrument objects.

Definition at line 457 of file DLS.h.

Referenced by DLS::File::File(), and LoadInstruments().

InstrumentList::iterator gig::File::InstrumentsIterator [protected]
 

Reimplemented from DLS::File.

Definition at line 718 of file gig.h.

Referenced by GetFirstInstrument(), GetInstrument(), GetNextInstrument(), and ~File().

dlsid_t* DLS::Resource::pDLSID [inherited]
 

Points to a dlsid_t structure if the file provided a DLS ID else is NULL.

Definition at line 348 of file DLS.h.

Referenced by DLS::Resource::Resource(), and DLS::Resource::~Resource().

Info* DLS::Resource::pInfo [inherited]
 

Points (in any case) to an Info object, providing additional, optional infos and comments.

Definition at line 347 of file DLS.h.

Referenced by ExtractSamples(), main(), PrintDimensionRegions(), PrintInstruments(), PrintRegions(), PrintSamples(), DLS::Resource::Resource(), and DLS::Resource::~Resource().

InstrumentList* gig::File::pInstruments [protected]
 

Reimplemented from DLS::File.

Definition at line 717 of file gig.h.

Referenced by File(), GetFirstInstrument(), GetInstrument(), GetNextInstrument(), LoadInstruments(), and ~File().

Resource* DLS::Resource::pParent [protected, inherited]
 

Definition at line 350 of file DLS.h.

Referenced by DLS::Resource::Resource().

RIFF::File* DLS::File::pRIFF [protected, inherited]
 

Definition at line 469 of file DLS.h.

Referenced by LoadInstruments(), DLS::File::LoadInstruments(), LoadSamples(), and DLS::File::LoadSamples().

SampleList* gig::File::pSamples [protected]
 

Reimplemented from DLS::File.

Definition at line 715 of file gig.h.

Referenced by File(), GetFirstSample(), GetNextSample(), LoadSamples(), and ~File().

version_t* DLS::File::pVersion [inherited]
 

Points to a version_t structure if the file provided a version number else is set to NULL.

Definition at line 456 of file DLS.h.

Referenced by DLS::File::File(), gig::Region::Region(), and DLS::File::~File().

uint32_t* DLS::File::pWavePoolTable [protected, inherited]
 

Definition at line 475 of file DLS.h.

Referenced by DLS::File::File(), DLS::Region::GetSample(), gig::Region::GetSampleFromWavePool(), and DLS::File::~File().

SampleList::iterator gig::File::SamplesIterator [protected]
 

Reimplemented from DLS::File.

Definition at line 716 of file gig.h.

Referenced by GetFirstSample(), GetNextSample(), and ~File().

uint32_t DLS::File::WavePoolCount [protected, inherited]
 

Definition at line 474 of file DLS.h.

Referenced by DLS::File::File().


The documentation for this class was generated from the following files:
Generated on Mon Jul 4 02:52:44 2005 for libgig by  doxygen 1.4.3-20050530