#include <DLS.h>
Public Member Functions | |
void | AddSampleLoop (sample_loop_t *pLoopDef) |
Adds a new sample loop with the provided loop definition. | |
void | DeleteSampleLoop (sample_loop_t *pLoopDef) |
Deletes an existing sample loop. | |
virtual void | SetGain (int32_t gain) |
virtual void | UpdateChunks () |
Apply all sample player options to the respective RIFF chunk. | |
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) | |
virtual | ~Sampler () |
Protected Attributes | |
RIFF::List * | pParentList |
uint32_t | uiHeaderSize |
uint32_t | SamplerOptions |
Definition at line 356 of file DLS.h.
DLS::Sampler::Sampler | ( | RIFF::List * | ParentList | ) | [protected] |
Definition at line 495 of file DLS.cpp.
References CHUNK_ID_WSMP, F_WSMP_NO_COMPRESSION, F_WSMP_NO_TRUNCATION, FineTune, Gain, RIFF::List::GetSubChunk(), NoSampleCompression, NoSampleDepthTruncation, pParentList, pSampleLoops, RIFF::Chunk::Read(), RIFF::Chunk::ReadInt16(), RIFF::Chunk::ReadInt32(), RIFF::Chunk::ReadUint16(), RIFF::Chunk::ReadUint32(), SampleLoops, SamplerOptions, RIFF::Chunk::SetPos(), RIFF::stream_curpos, uiHeaderSize, and UnityNote.
DLS::Sampler::~Sampler | ( | ) | [protected, virtual] |
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 576 of file DLS.cpp.
References pSampleLoops, SampleLoops, and DLS::sample_loop_t::Size.
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 598 of file DLS.cpp.
References pSampleLoops, and SampleLoops.
void DLS::Sampler::SetGain | ( | int32_t | gain | ) | [virtual] |
void DLS::Sampler::UpdateChunks | ( | ) | [virtual] |
Apply all sample player options to the respective RIFF chunk.
You have to call File::Save() to make changes persistent.
Reimplemented in DLS::Region, gig::DimensionRegion, and gig::Region.
Definition at line 539 of file DLS.cpp.
References RIFF::List::AddSubChunk(), CHUNK_ID_WSMP, F_WSMP_NO_COMPRESSION, F_WSMP_NO_TRUNCATION, FineTune, Gain, RIFF::Chunk::GetSize(), RIFF::List::GetSubChunk(), RIFF::Chunk::LoadChunkData(), NoSampleCompression, NoSampleDepthTruncation, pParentList, pSampleLoops, RIFF::Chunk::Resize(), SampleLoops, SamplerOptions, uiHeaderSize, and UnityNote.
int16_t DLS::Sampler::FineTune |
int32_t DLS::Sampler::Gain |
Definition at line 360 of file DLS.h.
Referenced by gig::DimensionRegion::DimensionRegion(), Sampler(), gig::DimensionRegion::SetGain(), SetGain(), and UpdateChunks().
RIFF::List* DLS::Sampler::pParentList [protected] |
Definition at line 371 of file DLS.h.
Referenced by gig::Region::AddDimension(), gig::DimensionRegion::DimensionRegion(), Sampler(), gig::DimensionRegion::UpdateChunks(), and UpdateChunks().
Points to the beginning of a sample loop array, or is NULL if there are no loops defined.
Definition at line 364 of file DLS.h.
Referenced by AddSampleLoop(), DeleteSampleLoop(), gig::DimensionRegion::DimensionRegion(), gig::Sample::ReadAndLoop(), Sampler(), UpdateChunks(), and ~Sampler().
uint32_t DLS::Sampler::SampleLoops |
Reflects the number of sample loops.
Definition at line 363 of file DLS.h.
Referenced by AddSampleLoop(), DeleteSampleLoop(), gig::DimensionRegion::DimensionRegion(), gig::Sample::ReadAndLoop(), Sampler(), gig::File::UpdateChunks(), and UpdateChunks().
uint32_t DLS::Sampler::SamplerOptions [protected] |
Definition at line 373 of file DLS.h.
Referenced by gig::DimensionRegion::DimensionRegion(), Sampler(), and UpdateChunks().
uint32_t DLS::Sampler::uiHeaderSize [protected] |
uint8_t DLS::Sampler::UnityNote |