libgig
4.3.0
|
Abstract base class which provides mandatory informations about sample players in general. More...
#include <DLS.h>
Public Member Functions | |
void | AddSampleLoop (sample_loop_t *pLoopDef) |
Adds a new sample loop with the provided loop definition. More... | |
void | DeleteSampleLoop (sample_loop_t *pLoopDef) |
Deletes an existing sample loop. More... | |
virtual void | SetGain (int32_t gain) |
virtual void | UpdateChunks (progress_t *pProgress) |
Apply all sample player options to the respective RIFF chunk. More... | |
virtual void | DeleteChunks () |
Remove all RIFF chunks associated with this Sampler object. More... | |
virtual void | CopyAssign (const Sampler *orig) |
Make a deep copy of the Sampler object given by orig and assign it to this object. More... | |
Public Attributes | |
uint8_t | UnityNote |
int16_t | FineTune |
int32_t | Gain |
bool | NoSampleDepthTruncation |
bool | NoSampleCompression |
uint32_t | SampleLoops |
Reflects the number of sample loops. | |
sample_loop_t * | pSampleLoops |
Points to the beginning of a sample loop array, or is NULL if there are no loops defined. | |
Protected Member Functions | |
Sampler (RIFF::List *ParentList) | |
Protected Attributes | |
RIFF::List * | pParentList |
uint32_t | uiHeaderSize |
uint32_t | SamplerOptions |
Abstract base class which provides mandatory informations about sample players in general.
void DLS::Sampler::AddSampleLoop | ( | sample_loop_t * | pLoopDef | ) |
Adds a new sample loop with the provided loop definition.
pLoopDef | - points to a loop definition that is to be copied |
Definition at line 706 of file DLS.cpp.
References pSampleLoops, SampleLoops, and DLS::sample_loop_t::Size.
|
virtual |
Make a deep copy of the Sampler object given by orig and assign it to this object.
orig | - original Sampler object to be copied from |
Definition at line 752 of file DLS.cpp.
References Gain, pSampleLoops, and SampleLoops.
Referenced by DLS::Region::CopyAssign().
|
virtual |
Remove all RIFF chunks associated with this Sampler object.
At the moment Sampler::DeleteChunks() does nothing. It is recommended to call this method explicitly though from deriving classes's own overridden implementation of this method to avoid potential future compatiblity issues.
See Storage::DeleteChunks() for details.
Implements DLS::Storage.
Reimplemented in DLS::Region.
Definition at line 698 of file DLS.cpp.
Referenced by DLS::Region::DeleteChunks().
void DLS::Sampler::DeleteSampleLoop | ( | sample_loop_t * | pLoopDef | ) |
Deletes an existing sample loop.
pLoopDef | - pointer to existing loop definition |
Exception | - if given loop definition does not exist |
Definition at line 728 of file DLS.cpp.
References pSampleLoops, and SampleLoops.
|
virtual |
Apply all sample player options to the respective RIFF chunk.
You have to call File::Save() to make changes persistent.
pProgress | - callback function for progress notification |
Implements DLS::Storage.
Reimplemented in gig::Region, gig::DimensionRegion, and DLS::Region.
Definition at line 657 of file DLS.cpp.
References RIFF::List::AddSubChunk(), Gain, RIFF::Chunk::GetSize(), RIFF::List::GetSubChunk(), RIFF::Chunk::LoadChunkData(), pSampleLoops, RIFF::Chunk::Resize(), and SampleLoops.
Referenced by DLS::Region::UpdateChunks(), and gig::DimensionRegion::UpdateChunks().
int32_t DLS::Sampler::Gain |
Definition at line 428 of file DLS.h.
Referenced by CopyAssign(), gig::DimensionRegion::SetGain(), and UpdateChunks().