240 |
//pEngine->DisconnectAudioOutputDevice(); |
//pEngine->DisconnectAudioOutputDevice(); |
241 |
} |
} |
242 |
} |
} |
243 |
|
|
244 |
|
void AudioOutputDevice::ReconnectAll() { |
245 |
|
// copy by value, not by reference here ! |
246 |
|
std::set<Engine*> engines = Engines.GetConfigForUpdate(); |
247 |
|
{ |
248 |
|
std::set<Engine*>::iterator iterEngine = engines.begin(); |
249 |
|
std::set<Engine*>::iterator end = engines.end(); |
250 |
|
for (; iterEngine != end; iterEngine++) { |
251 |
|
(*iterEngine)->ReconnectAudioOutputDevice(); |
252 |
|
} |
253 |
|
} |
254 |
|
} |
255 |
|
|
256 |
AudioChannel* AudioOutputDevice::Channel(uint ChannelIndex) { |
AudioChannel* AudioOutputDevice::Channel(uint ChannelIndex) { |
257 |
return (ChannelIndex < Channels.size()) ? Channels[ChannelIndex] : NULL; |
return (ChannelIndex < Channels.size()) ? Channels[ChannelIndex] : NULL; |
327 |
uint AudioOutputDevice::MasterEffectChainCount() const { |
uint AudioOutputDevice::MasterEffectChainCount() const { |
328 |
return SendEffectChainCount(); |
return SendEffectChainCount(); |
329 |
} |
} |
330 |
|
|
331 |
|
float AudioOutputDevice::latency() { |
332 |
|
return float(MaxSamplesPerCycle()) / float(SampleRate()); |
333 |
|
} |
334 |
|
|
335 |
int AudioOutputDevice::RenderAudio(uint Samples) { |
int AudioOutputDevice::RenderAudio(uint Samples) { |
336 |
if (Channels.empty()) return 0; |
if (Channels.empty()) return 0; |