24 |
#include "AudioOutputDeviceFactory.h" |
#include "AudioOutputDeviceFactory.h" |
25 |
#include "AudioOutputDevice.h" |
#include "AudioOutputDevice.h" |
26 |
#include "../../common/global_private.h" |
#include "../../common/global_private.h" |
27 |
|
#include "../../common/IDGenerator.h" |
28 |
|
|
29 |
namespace LinuxSampler { |
namespace LinuxSampler { |
30 |
|
|
184 |
AudioOutputDevice::AudioOutputDevice(std::map<String,DeviceCreationParameter*> DriverParameters) |
AudioOutputDevice::AudioOutputDevice(std::map<String,DeviceCreationParameter*> DriverParameters) |
185 |
: EnginesReader(Engines) { |
: EnginesReader(Engines) { |
186 |
this->Parameters = DriverParameters; |
this->Parameters = DriverParameters; |
187 |
|
EffectChainIDs = new IDGenerator(); |
188 |
} |
} |
189 |
|
|
190 |
AudioOutputDevice::~AudioOutputDevice() { |
AudioOutputDevice::~AudioOutputDevice() { |
217 |
} |
} |
218 |
vEffectChains.clear(); |
vEffectChains.clear(); |
219 |
} |
} |
220 |
|
|
221 |
|
delete EffectChainIDs; |
222 |
} |
} |
223 |
|
|
224 |
void AudioOutputDevice::Connect(Engine* pEngine) { |
void AudioOutputDevice::Connect(Engine* pEngine) { |
262 |
} |
} |
263 |
|
|
264 |
EffectChain* AudioOutputDevice::AddMasterEffectChain() { |
EffectChain* AudioOutputDevice::AddMasterEffectChain() { |
265 |
EffectChain* pChain = new EffectChain(this); |
EffectChain* pChain = new EffectChain(this, EffectChainIDs->create()); |
266 |
vEffectChains.push_back(pChain); |
vEffectChains.push_back(pChain); |
267 |
return pChain; |
return pChain; |
268 |
} |
} |
275 |
); |
); |
276 |
std::vector<EffectChain*>::iterator iter = vEffectChains.begin(); |
std::vector<EffectChain*>::iterator iter = vEffectChains.begin(); |
277 |
for (int i = 0; i < iChain; ++i) ++iter; |
for (int i = 0; i < iChain; ++i) ++iter; |
278 |
|
EffectChainIDs->destroy((*iter)->ID()); |
279 |
vEffectChains.erase(iter); |
vEffectChains.erase(iter); |
280 |
} |
} |
281 |
|
|