3 |
* LinuxSampler - modular, streaming capable sampler * |
* LinuxSampler - modular, streaming capable sampler * |
4 |
* * |
* * |
5 |
* Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck * |
* Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck * |
6 |
* Copyright (C) 2005 - 2008 Christian Schoenebeck * |
* Copyright (C) 2005 - 2010 Christian Schoenebeck * |
7 |
* * |
* * |
8 |
* This program is free software; you can redistribute it and/or modify * |
* This program is free software; you can redistribute it and/or modify * |
9 |
* it under the terms of the GNU General Public License as published by * |
* it under the terms of the GNU General Public License as published by * |
261 |
return Parameters; |
return Parameters; |
262 |
} |
} |
263 |
|
|
264 |
EffectChain* AudioOutputDevice::AddMasterEffectChain() { |
EffectChain* AudioOutputDevice::AddSendEffectChain() { |
265 |
EffectChain* pChain = new EffectChain(this, EffectChainIDs->create()); |
EffectChain* pChain = new EffectChain(this, EffectChainIDs->create()); |
266 |
vEffectChains.push_back(pChain); |
vEffectChains.push_back(pChain); |
267 |
return pChain; |
return pChain; |
268 |
} |
} |
269 |
|
|
270 |
void AudioOutputDevice::RemoveMasterEffectChain(uint iChain) throw (Exception) { |
void AudioOutputDevice::RemoveSendEffectChain(uint iChain) throw (Exception) { |
271 |
if (iChain >= vEffectChains.size()) |
if (iChain >= vEffectChains.size()) |
272 |
throw Exception( |
throw Exception( |
273 |
"Could not remove master effect chain " + ToString(iChain) + |
"Could not remove master effect chain " + ToString(iChain) + |
279 |
vEffectChains.erase(iter); |
vEffectChains.erase(iter); |
280 |
} |
} |
281 |
|
|
282 |
EffectChain* AudioOutputDevice::MasterEffectChain(uint iChain) const { |
EffectChain* AudioOutputDevice::SendEffectChain(uint iChain) const { |
283 |
if (iChain >= vEffectChains.size()) return NULL; |
if (iChain >= vEffectChains.size()) return NULL; |
284 |
return vEffectChains[iChain]; |
return vEffectChains[iChain]; |
285 |
} |
} |
286 |
|
|
287 |
uint AudioOutputDevice::MasterEffectChainCount() const { |
uint AudioOutputDevice::SendEffectChainCount() const { |
288 |
return vEffectChains.size(); |
return vEffectChains.size(); |
289 |
} |
} |
290 |
|
|
291 |
|
// TODO: to be removed |
292 |
|
EffectChain* AudioOutputDevice::AddMasterEffectChain() { |
293 |
|
return AddSendEffectChain(); |
294 |
|
} |
295 |
|
|
296 |
|
// TODO: to be removed |
297 |
|
void AudioOutputDevice::RemoveMasterEffectChain(uint iChain) throw (Exception) { |
298 |
|
RemoveSendEffectChain(iChain); |
299 |
|
} |
300 |
|
|
301 |
|
// TODO: to be removed |
302 |
|
EffectChain* AudioOutputDevice::MasterEffectChain(uint iChain) const { |
303 |
|
return SendEffectChain(iChain); |
304 |
|
} |
305 |
|
|
306 |
|
// TODO: to be removed |
307 |
|
uint AudioOutputDevice::MasterEffectChainCount() const { |
308 |
|
return SendEffectChainCount(); |
309 |
|
} |
310 |
|
|
311 |
int AudioOutputDevice::RenderAudio(uint Samples) { |
int AudioOutputDevice::RenderAudio(uint Samples) { |
312 |
if (Channels.empty()) return 0; |
if (Channels.empty()) return 0; |
313 |
|
|