sf2::File Class Reference

#include <SF.h>

List of all members.

Public Member Functions

 File (RIFF::File *pRIFF)
 Constructor.
 ~File ()
int GetPresetCount ()
PresetGetPreset (int idx)
int GetInstrumentCount ()
InstrumentGetInstrument (int idx)
void DeleteInstrument (Instrument *pInstrument)
int GetSampleCount ()
SampleGetSample (int idx)
void DeleteSample (Sample *pSample)
bool HasSamples ()

Public Attributes

InfopInfo

Protected Attributes

RIFF::FilepRIFF
std::vector< PresetBagPresetBags
std::vector< ModListPresetModLists
std::vector< GenListPresetGenLists
std::vector< InstBagInstBags
std::vector< ModListInstModLists
std::vector< GenListInstGenLists

Friends

class Region
class Instrument
class Preset


Detailed Description

Definition at line 511 of file SF.h.


Constructor & Destructor Documentation

sf2::File::File ( RIFF::File pRIFF  ) 

Constructor.

Load an existing SF2 file.

Parameters:
pRIFF - pointer to a RIFF file which is actually the SF2 file to load
Exceptions:
Exception if given file is not a SF2 file, expected chunks are missing

Definition at line 884 of file SF.cpp.

References CHUNK_ID_IBAG, CHUNK_ID_IGEN, CHUNK_ID_IMOD, CHUNK_ID_INST, CHUNK_ID_PBAG, CHUNK_ID_PGEN, CHUNK_ID_PHDR, CHUNK_ID_PMOD, CHUNK_ID_SHDR, CHUNK_ID_SM24, CHUNK_ID_SMPL, RIFF::List::GetListType(), sf2::GetMandatoryChunk(), RIFF::Chunk::GetSize(), RIFF::List::GetSubChunk(), RIFF::List::GetSubList(), InstBags, InstGenLists, InstModLists, LIST_TYPE_PDTA, LIST_TYPE_SDTA, sf2::Version::Major, pInfo, PresetBags, PresetGenLists, PresetModLists, pRIFF, sf2::Info::pVer, RIFF::Chunk::ReadInt16(), and RIFF_TYPE_SF2.

sf2::File::~File (  ) 

Definition at line 1060 of file SF.cpp.

References pInfo.


Member Function Documentation

int sf2::File::GetPresetCount (  ) 

Definition at line 1073 of file SF.cpp.

Referenced by DeleteInstrument(), and GetPreset().

Preset * sf2::File::GetPreset ( int  idx  ) 

Definition at line 1077 of file SF.cpp.

References GetPresetCount().

Referenced by DeleteInstrument().

int sf2::File::GetInstrumentCount (  ) 

Definition at line 1085 of file SF.cpp.

Referenced by DeleteInstrument(), DeleteSample(), and GetInstrument().

Instrument * sf2::File::GetInstrument ( int  idx  ) 

Definition at line 1089 of file SF.cpp.

References GetInstrumentCount().

Referenced by DeleteInstrument(), and DeleteSample().

void sf2::File::DeleteInstrument ( Instrument pInstrument  ) 

Definition at line 1097 of file SF.cpp.

References GetInstrument(), GetInstrumentCount(), GetPreset(), GetPresetCount(), sf2::InstrumentBase::GetRegion(), and sf2::Region::pInstrument.

int sf2::File::GetSampleCount (  ) 

Definition at line 1116 of file SF.cpp.

Referenced by DeleteSample(), GetSample(), and HasSamples().

Sample * sf2::File::GetSample ( int  idx  ) 

Definition at line 1120 of file SF.cpp.

References GetSampleCount().

void sf2::File::DeleteSample ( Sample pSample  ) 

Definition at line 1128 of file SF.cpp.

References GetInstrument(), GetInstrumentCount(), GetSampleCount(), and sf2::Sample::Name.

bool sf2::File::HasSamples (  ) 

Definition at line 1153 of file SF.cpp.

References GetSampleCount().


Friends And Related Function Documentation

friend class Region [friend]

Definition at line 528 of file SF.h.

friend class Instrument [friend]

Definition at line 529 of file SF.h.

friend class Preset [friend]

Definition at line 530 of file SF.h.


Member Data Documentation

Info* sf2::File::pInfo

Definition at line 513 of file SF.h.

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

RIFF::File* sf2::File::pRIFF [protected]

Definition at line 533 of file SF.h.

Referenced by File().

std::vector<PresetBag> sf2::File::PresetBags [protected]

Definition at line 534 of file SF.h.

Referenced by File(), and sf2::Preset::LoadRegions().

std::vector<ModList> sf2::File::PresetModLists [protected]

Definition at line 535 of file SF.h.

Referenced by File().

std::vector<GenList> sf2::File::PresetGenLists [protected]

Definition at line 536 of file SF.h.

Referenced by File(), and sf2::Preset::LoadRegions().

std::vector<InstBag> sf2::File::InstBags [protected]

Definition at line 537 of file SF.h.

Referenced by File(), and sf2::Instrument::LoadRegions().

std::vector<ModList> sf2::File::InstModLists [protected]

Definition at line 538 of file SF.h.

Referenced by File(), and sf2::Instrument::LoadRegions().

std::vector<GenList> sf2::File::InstGenLists [protected]

Definition at line 539 of file SF.h.

Referenced by File(), and sf2::Instrument::LoadRegions().


The documentation for this class was generated from the following files:
Generated on Sun May 1 03:22:48 2011 for libgig by  doxygen 1.5.2