1136 |
* @returns pointer to new Sample object |
* @returns pointer to new Sample object |
1137 |
*/ |
*/ |
1138 |
Sample* File::AddSample() { |
Sample* File::AddSample() { |
1139 |
|
if (!pSamples) LoadSamples(); |
1140 |
__ensureMandatoryChunksExist(); |
__ensureMandatoryChunksExist(); |
1141 |
RIFF::List* wvpl = pRIFF->GetSubList(LIST_TYPE_WVPL); |
RIFF::List* wvpl = pRIFF->GetSubList(LIST_TYPE_WVPL); |
1142 |
// create new Sample object and its respective 'wave' list chunk |
// create new Sample object and its respective 'wave' list chunk |
1197 |
* @returns pointer to new Instrument object |
* @returns pointer to new Instrument object |
1198 |
*/ |
*/ |
1199 |
Instrument* File::AddInstrument() { |
Instrument* File::AddInstrument() { |
1200 |
|
if (!pInstruments) LoadInstruments(); |
1201 |
__ensureMandatoryChunksExist(); |
__ensureMandatoryChunksExist(); |
1202 |
if (!pInstruments) pInstruments = new InstrumentList; |
if (!pInstruments) pInstruments = new InstrumentList; |
1203 |
RIFF::List* lstInstruments = pRIFF->GetSubList(LIST_TYPE_LINS); |
RIFF::List* lstInstruments = pRIFF->GetSubList(LIST_TYPE_LINS); |
1207 |
return pInstrument; |
return pInstrument; |
1208 |
} |
} |
1209 |
|
|
1210 |
/** @brief Delete a instrument. |
/** @brief Delete an instrument. |
1211 |
* |
* |
1212 |
* This will delete the given Instrument object from the DLS file. You |
* This will delete the given Instrument object from the DLS file. You |
1213 |
* have to call Save() to make this persistent to the file. |
* have to call Save() to make this persistent to the file. |