Object that acts as the PCM sample database, as shared synth-wide resource. You should study this especially if you want to implement your own database with your own PCM sample formats, etc...
More...
#include <synthbase.h>
Object that acts as the PCM sample database, as shared synth-wide resource. You should study this especially if you want to implement your own database with your own PCM sample formats, etc...
- exposes the IPCMSampleDatabase; your own object only needs to expose this interface
- this is an example object to study if you want to roll your own version
- the PCM sources in the database are uniquely identified with their name strings
- a std::map is used to make the dictionary of table sources
- Author
- Will Pirkle http://www.willpirkle.com
- Version
- Revision : 1.0
- Date
- Date : 2021 / 04 / 26
◆ addSampleSource()
bool SynthLab::PCMSampleDatabase::addSampleSource |
( |
const char * |
uniqueSampleSetName, |
|
|
IPCMSampleSource * |
sampleSource |
|
) |
| |
|
overridevirtual |
add a PCM sample source to the database
- Parameters
-
uniqueSampleSetName | name of the PCM sample set, usually the same as the folder that holds the WAV samples |
sampleSource | IPCMSampleSource* to add |
- Returns
- true if sucessful
Implements SynthLab::IPCMSampleDatabase.
◆ clearSampleSources()
bool SynthLab::PCMSampleDatabase::clearSampleSources |
( |
| ) |
|
|
overridevirtual |
clear all entries from the std::map
- this DOES call the sample deleter function on the source as part of the destruction of dynamic data
- Returns
- true if sucessful
Implements SynthLab::IPCMSampleDatabase.
◆ getIPCMSampleDatabase()
convenience function to return this as interface pointer
◆ getSampleSource()
IPCMSampleSource * SynthLab::PCMSampleDatabase::getSampleSource |
( |
const char * |
uniqueSampleSetName | ) |
|
|
overridevirtual |
selects a PCM sample source based on the unique table name
IPCMSampleDatabase overrides
- Parameters
-
uniqueSampleSetName | name of the sample set, usually the same as the folder that holds the WAV files for the samples |
- Returns
- a pointer to the IPCMSampleSource to be used for reading table data
Implements SynthLab::IPCMSampleDatabase.
◆ removeSampleSource()
bool SynthLab::PCMSampleDatabase::removeSampleSource |
( |
const char * |
uniqueSampleSetName | ) |
|
|
overridevirtual |
remove a PCM sample source from the database
- Parameters
-
uniqueSampleSetName | name of the PCM sample set, usually the same as the folder that holds the WAV samples |
- Returns
- true if sucessful
Implements SynthLab::IPCMSampleDatabase.
The documentation for this struct was generated from the following files: