DLS::File Class Reference

Parses DLS Level 1 and 2 compliant files and provides abstract access to the data. More...

#include <DLS.h>

Inheritance diagram for DLS::File:

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

Public Member Functions

 File (RIFF::File *pRIFF)
SampleGetFirstSample ()
 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.
virtual ~File ()
ResourceGetParent ()

Public Attributes

version_tpVersion
 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.
InfopInfo
 Points (in any case) to an Info object, providing additional, optional infos and comments.
dlsid_tpDLSID
 Points to a dlsid_t structure if the file provided a DLS ID else is NULL.

Protected Types

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

Protected Member Functions

void LoadSamples ()
void LoadInstruments ()

Protected Attributes

RIFF::FilepRIFF
SampleListpSamples
SampleList::iterator SamplesIterator
InstrumentListpInstruments
InstrumentList::iterator InstrumentsIterator
uint32_t WavePoolCount
uint32_t * pWavePoolTable
uint32_t * pWavePoolTableHi
ResourcepParent

Friends

class Region

Detailed Description

Parses DLS Level 1 and 2 compliant files and provides abstract access to the data.

Definition at line 454 of file DLS.h.


Member Typedef Documentation

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

Reimplemented in gig::File.

Definition at line 467 of file DLS.h.

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

Reimplemented in gig::File.

Definition at line 466 of file DLS.h.


Constructor & Destructor Documentation

DLS::File::File RIFF::File pRIFF  ) 
 

Reimplemented in gig::File.

Definition at line 396 of file DLS.cpp.

References CHUNK_ID_COLH, CHUNK_ID_PTBL, CHUNK_ID_VERS, RIFF::Chunk::GetSize(), RIFF::List::GetSubChunk(), Instruments, pVersion, pWavePoolTable, pWavePoolTableHi, RIFF::Chunk::Read(), RIFF::Chunk::ReadUint32(), RIFF::Chunk::SetPos(), and WavePoolCount.

DLS::File::~File  )  [virtual]
 

Reimplemented in gig::File.

Definition at line 437 of file DLS.cpp.

References pInstruments, pSamples, pVersion, pWavePoolTable, and pWavePoolTableHi.


Member Function Documentation

Instrument * DLS::File::GetFirstInstrument  ) 
 

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

Reimplemented in gig::File.

Definition at line 507 of file DLS.cpp.

References InstrumentsIterator, LoadInstruments(), and pInstruments.

Referenced by PrintInstruments().

Sample * DLS::File::GetFirstSample  ) 
 

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

Definition at line 463 of file DLS.cpp.

References LoadSamples(), pSamples, and SamplesIterator.

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

Instrument * DLS::File::GetNextInstrument  ) 
 

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

Reimplemented in gig::File.

Definition at line 514 of file DLS.cpp.

References InstrumentsIterator, and pInstruments.

Referenced by PrintInstruments().

Sample * DLS::File::GetNextSample  ) 
 

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

Reimplemented in gig::File.

Definition at line 470 of file DLS.cpp.

References pSamples, and SamplesIterator.

Referenced by DLS::Region::GetSample(), 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]
 

Definition at line 520 of file DLS.cpp.

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

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

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

Definition at line 476 of file DLS.cpp.

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

Referenced by GetFirstSample().


Friends And Related Function Documentation

friend class Region [friend]
 

Reimplemented in gig::File.

Definition at line 480 of file DLS.h.


Member Data Documentation

uint32_t DLS::File::Instruments
 

Reflects the number of available Instrument objects.

Definition at line 457 of file DLS.h.

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

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

Reimplemented in gig::File.

Definition at line 473 of file DLS.h.

Referenced by GetFirstInstrument(), and GetNextInstrument().

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* DLS::File::pInstruments [protected]
 

Reimplemented in gig::File.

Definition at line 472 of file DLS.h.

Referenced by GetFirstInstrument(), 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]
 

Definition at line 469 of file DLS.h.

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

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

Reimplemented in gig::File.

Definition at line 470 of file DLS.h.

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

version_t* DLS::File::pVersion
 

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 File(), gig::Region::Region(), and ~File().

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

Definition at line 475 of file DLS.h.

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

uint32_t* DLS::File::pWavePoolTableHi [protected]
 

Definition at line 476 of file DLS.h.

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

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

Reimplemented in gig::File.

Definition at line 471 of file DLS.h.

Referenced by GetFirstSample(), and GetNextSample().

uint32_t DLS::File::WavePoolCount [protected]
 

Definition at line 474 of file DLS.h.

Referenced by File(), and gig::File::LoadSamples().


The documentation for this class was generated from the following files:
Generated on Wed Nov 23 15:53:45 2005 for libgig by  doxygen 1.4.5