DLS::Sampler Class Reference

Abstract base class which provides mandatory informations about sample players in general. More...

`#include <DLS.h>`

Inheritance diagram for DLS::Sampler:

## 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 (progress_t *pProgress)
| Apply all sample player options to the respective RIFF chunk.
virtual void | DeleteChunks ()
| Remove all RIFF chunks associated with this Sampler object.
virtual void | CopyAssign (const Sampler *orig)
| Make a deep copy of the Sampler object given by orig and assign it to this object.

## 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

## Detailed Description

Abstract base class which provides mandatory informations about sample players in general.

Definition at line 425 of file DLS.h.

## Constructor & Destructor Documentation

## Sampler()

DLS::Sampler::Sampler | ( | RIFF::List * | ParentList | ) |

protected

Definition at line 662 of file DLS.cpp.

## ~Sampler()

DLS::Sampler::~Sampler | ( |  | ) |

protected virtual

Definition at line 696 of file DLS.cpp.

## Member Function Documentation

## AddSampleLoop()

void DLS::Sampler::AddSampleLoop | ( | sample_loop_t * | pLoopDef | ) |

Adds a new sample loop with the provided loop definition.

Parameters

  pLoopDef | - points to a loop definition that is to be copied

Definition at line 759 of file DLS.cpp.

References pSampleLoops, SampleLoops, and DLS::sample_loop_t::Size.

## CopyAssign()

void DLS::Sampler::CopyAssign | ( | const Sampler * | orig | ) |

virtual

Make a deep copy of the Sampler object given by orig and assign it to this object.

Parameters

  orig | - original Sampler object to be copied from

Definition at line 805 of file DLS.cpp.

References Gain, pSampleLoops, and SampleLoops.

Referenced by DLS::Region::CopyAssign().

## DeleteChunks()

void DLS::Sampler::DeleteChunks | ( |  | ) |

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 compatibility issues.

See Storage::DeleteChunks() for details.

Implements DLS::Storage.

Reimplemented in DLS::Region.

Definition at line 751 of file DLS.cpp.

Referenced by DLS::Region::DeleteChunks().

## DeleteSampleLoop()

void DLS::Sampler::DeleteSampleLoop | ( | sample_loop_t * | pLoopDef | ) |

Deletes an existing sample loop.

Parameters

  pLoopDef | - pointer to existing loop definition

Exceptions

  Exception | - if given loop definition does not exist

Definition at line 781 of file DLS.cpp.

References pSampleLoops, and SampleLoops.

## SetGain()

void DLS::Sampler::SetGain | ( | int32_t | gain | ) |

virtual

Reimplemented in gig::DimensionRegion.

Definition at line 700 of file DLS.cpp.

## UpdateChunks()

void DLS::Sampler::UpdateChunks | ( | progress_t * | pProgress | ) |

virtual

Apply all sample player options to the respective RIFF chunk.

You have to call File::Save() to make changes persistent.

Parameters

  pProgress | - callback function for progress notification

Implements DLS::Storage.

Reimplemented in DLS::Region, gig::DimensionRegion, and gig::Region.

Definition at line 710 of file DLS.cpp.

References Gain, RIFF::Chunk::GetSize(), RIFF::Chunk::LoadChunkData(), pSampleLoops, RIFF::Chunk::Resize(), and SampleLoops.

Referenced by DLS::Region::UpdateChunks(), and gig::DimensionRegion::UpdateChunks().

## Member Data Documentation

## FineTune

int16_t DLS::Sampler::FineTune

Definition at line 428 of file DLS.h.

## Gain

int32_t DLS::Sampler::Gain

Deprecated
  Don't alter directly, use SetGain() instead!

Definition at line 429 of file DLS.h.

Referenced by CopyAssign(), and UpdateChunks().

## NoSampleCompression

bool DLS::Sampler::NoSampleCompression

Definition at line 431 of file DLS.h.

## NoSampleDepthTruncation

bool DLS::Sampler::NoSampleDepthTruncation

Definition at line 430 of file DLS.h.

## pParentList

RIFF::List* DLS::Sampler::pParentList

protected

Definition at line 442 of file DLS.h.

## pSampleLoops

sample_loop_t* DLS::Sampler::pSampleLoops

Points to the beginning of a sample loop array, or is NULL if there are no loops defined.

Definition at line 433 of file DLS.h.

Referenced by AddSampleLoop(), CopyAssign(), DeleteSampleLoop(), and UpdateChunks().

## SampleLoops

uint32_t DLS::Sampler::SampleLoops

Reflects the number of sample loops.

Definition at line 432 of file DLS.h.

Referenced by AddSampleLoop(), CopyAssign(), DeleteSampleLoop(), and UpdateChunks().

## SamplerOptions

uint32_t DLS::Sampler::SamplerOptions

protected

Definition at line 444 of file DLS.h.

## uiHeaderSize

uint32_t DLS::Sampler::uiHeaderSize

protected

Definition at line 443 of file DLS.h.

## UnityNote

uint8_t DLS::Sampler::UnityNote

Definition at line 427 of file DLS.h.

The documentation for this class was generated from the following files:

- DLS.h
- DLS.cpp