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 |
|
|
319 |
Info(RIFF::List* list); |
Info(RIFF::List* list); |
320 |
|
virtual ~Info(); |
321 |
virtual void UpdateChunks(); |
virtual void UpdateChunks(); |
322 |
private: |
private: |
323 |
RIFF::List* pResourceListChunk; |
RIFF::List* pResourceListChunk; |
365 |
/** @brief Encapsulates sample waves used for playback. |
/** @brief Encapsulates sample waves used for playback. |
366 |
* |
* |
367 |
* In case you created a new sample with File::AddSample(), you should |
* In case you created a new sample with File::AddSample(), you should |
368 |
* first call Resize() with the desired sample size. This will create |
* first update all attributes with the desired meta informations |
369 |
|
* (amount of channels, bit depth, sample rate, etc.), then call |
370 |
|
* Resize() with the desired sample size. The latter will create |
371 |
* the mandatory RIFF chunk which will hold the sample wave data. |
* the mandatory RIFF chunk which will hold the sample wave data. |
372 |
*/ |
*/ |
373 |
class Sample : public Resource { |
class Sample : public Resource { |
374 |
public: |
public: |
375 |
uint16_t FormatTag; ///< Format ID of the waveform data (should be WAVE_FORMAT_PCM for DLS1 compliant files). |
uint16_t FormatTag; ///< Format ID of the waveform data (should be WAVE_FORMAT_PCM for DLS1 compliant files, this is also the default value if Sample was created with Instrument::AddSample()). |
376 |
uint16_t Channels; ///< Number of channels represented in the waveform data, e.g. 1 for mono, 2 for stereo (). |
uint16_t Channels; ///< Number of channels represented in the waveform data, e.g. 1 for mono, 2 for stereo (defaults to 1=mono if Sample was created with Instrument::AddSample() previously). |
377 |
uint32_t SamplesPerSecond; ///< Sampling rate at which each channel should be played. |
uint32_t SamplesPerSecond; ///< Sampling rate at which each channel should be played (defaults to 44100 if Sample was created with Instrument::AddSample() previously). |
378 |
uint32_t AverageBytesPerSecond; ///< The average number of bytes per second at which the waveform data should be transferred (Playback software can estimate the buffer size using this value). |
uint32_t AverageBytesPerSecond; ///< The average number of bytes per second at which the waveform data should be transferred (Playback software can estimate the buffer size using this value). |
379 |
uint16_t BlockAlign; ///< The block alignment (in bytes) of the waveform data. Playback software needs to process a multiple of <i>BlockAlign</i> bytes of data at a time, so the value of <i>BlockAlign</i> can be used for buffer alignment. |
uint16_t BlockAlign; ///< The block alignment (in bytes) of the waveform data. Playback software needs to process a multiple of <i>BlockAlign</i> bytes of data at a time, so the value of <i>BlockAlign</i> can be used for buffer alignment. |
380 |
uint16_t BitDepth; ///< Size of each sample per channel (only if known sample data format is used, 0 otherwise). |
uint16_t BitDepth; ///< Size of each sample per channel (only if known sample data format is used, 0 otherwise). |
381 |
unsigned long SamplesTotal; ///< Reflects total number of sample points (only if known sample data format is used, 0 otherwise), do not bother to change this value, it will not be saved. |
unsigned long SamplesTotal; ///< Reflects total number of sample points (only if known sample data format is used, 0 otherwise), do not bother to change this value, it will not be saved. |
382 |
uint FrameSize; ///< Reflects the size (in bytes) of one single sample point (only if known sample data format is used, 0 otherwise). |
uint FrameSize; ///< Reflects the size (in bytes) of one single sample point (only if known sample data format is used, 0 otherwise). <b>Caution:</b> with the current version of libgig you have to upate this field by yourself whenever you change one of the following fields: Channels, BitDepth ! Ignoring this might lead to undesired behavior when i.e. calling Resize(), SetPos(), Write() or Read(). |
383 |
|
|
384 |
void* LoadSampleData(); |
void* LoadSampleData(); |
385 |
void ReleaseSampleData(); |
void ReleaseSampleData(); |
456 |
RegionList::iterator RegionsIterator; |
RegionList::iterator RegionsIterator; |
457 |
|
|
458 |
Instrument(File* pFile, RIFF::List* insList); |
Instrument(File* pFile, RIFF::List* insList); |
459 |
void LoadRegions(); |
virtual void LoadRegions(); |
460 |
virtual ~Instrument(); |
virtual ~Instrument(); |
461 |
friend class File; |
friend class File; |
462 |
}; |
}; |
486 |
typedef std::list<Instrument*> InstrumentList; |
typedef std::list<Instrument*> InstrumentList; |
487 |
|
|
488 |
RIFF::File* pRIFF; |
RIFF::File* pRIFF; |
489 |
|
std::list<RIFF::File*> ExtensionFiles; |
490 |
SampleList* pSamples; |
SampleList* pSamples; |
491 |
SampleList::iterator SamplesIterator; |
SampleList::iterator SamplesIterator; |
492 |
InstrumentList* pInstruments; |
InstrumentList* pInstruments; |
497 |
uint32_t* pWavePoolTableHi; |
uint32_t* pWavePoolTableHi; |
498 |
bool b64BitWavePoolOffsets; |
bool b64BitWavePoolOffsets; |
499 |
|
|
500 |
void LoadSamples(); |
virtual void LoadSamples(); |
501 |
void LoadInstruments(); |
virtual void LoadInstruments(); |
502 |
void __ensureMandatoryChunksExist(); |
void __ensureMandatoryChunksExist(); |
503 |
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 |
504 |
private: |
private: |