138 |
LSCPEvent::RegisterEvent(LSCPEvent::event_global_info, "GLOBAL_INFO"); |
LSCPEvent::RegisterEvent(LSCPEvent::event_global_info, "GLOBAL_INFO"); |
139 |
LSCPEvent::RegisterEvent(LSCPEvent::event_channel_midi, "CHANNEL_MIDI"); |
LSCPEvent::RegisterEvent(LSCPEvent::event_channel_midi, "CHANNEL_MIDI"); |
140 |
LSCPEvent::RegisterEvent(LSCPEvent::event_device_midi, "DEVICE_MIDI"); |
LSCPEvent::RegisterEvent(LSCPEvent::event_device_midi, "DEVICE_MIDI"); |
141 |
|
LSCPEvent::RegisterEvent(LSCPEvent::event_fx_instance_count, "EFFECT_INSTANCE_COUNT"); |
142 |
|
LSCPEvent::RegisterEvent(LSCPEvent::event_fx_instance_info, "EFFECT_INSTANCE_INFO"); |
143 |
|
LSCPEvent::RegisterEvent(LSCPEvent::event_send_fx_chain_count, "SEND_EFFECT_CHAIN_COUNT"); |
144 |
|
LSCPEvent::RegisterEvent(LSCPEvent::event_send_fx_chain_info, "SEND_EFFECT_CHAIN_INFO"); |
145 |
hSocket = -1; |
hSocket = -1; |
146 |
} |
} |
147 |
|
|
2614 |
); |
); |
2615 |
|
|
2616 |
pEffectControl->SetValue(dValue); |
pEffectControl->SetValue(dValue); |
2617 |
|
LSCPServer::SendLSCPNotify(LSCPEvent(LSCPEvent::event_fx_instance_info, iEffectInstance)); |
2618 |
} catch (Exception e) { |
} catch (Exception e) { |
2619 |
result.Error(e); |
result.Error(e); |
2620 |
} |
} |
2630 |
throw Exception("There is no effect with index " + ToString(iEffectIndex)); |
throw Exception("There is no effect with index " + ToString(iEffectIndex)); |
2631 |
Effect* pEffect = EffectFactory::Create(pEffectInfo); |
Effect* pEffect = EffectFactory::Create(pEffectInfo); |
2632 |
result = pEffect->ID(); // success |
result = pEffect->ID(); // success |
2633 |
|
LSCPServer::SendLSCPNotify(LSCPEvent(LSCPEvent::event_fx_instance_count, EffectFactory::EffectInstancesCount())); |
2634 |
} catch (Exception e) { |
} catch (Exception e) { |
2635 |
result.Error(e); |
result.Error(e); |
2636 |
} |
} |
2677 |
|
|
2678 |
Effect* pEffect = EffectFactory::Create(pEffectInfo); |
Effect* pEffect = EffectFactory::Create(pEffectInfo); |
2679 |
result = LSCPResultSet(pEffect->ID()); |
result = LSCPResultSet(pEffect->ID()); |
2680 |
|
LSCPServer::SendLSCPNotify(LSCPEvent(LSCPEvent::event_fx_instance_count, EffectFactory::EffectInstancesCount())); |
2681 |
} catch (Exception e) { |
} catch (Exception e) { |
2682 |
result.Error(e); |
result.Error(e); |
2683 |
} |
} |
2692 |
if (!pEffect) |
if (!pEffect) |
2693 |
throw Exception("There is no effect instance with ID " + ToString(iEffectInstance)); |
throw Exception("There is no effect instance with ID " + ToString(iEffectInstance)); |
2694 |
EffectFactory::Destroy(pEffect); |
EffectFactory::Destroy(pEffect); |
2695 |
|
LSCPServer::SendLSCPNotify(LSCPEvent(LSCPEvent::event_fx_instance_count, EffectFactory::EffectInstancesCount())); |
2696 |
} catch (Exception e) { |
} catch (Exception e) { |
2697 |
result.Error(e); |
result.Error(e); |
2698 |
} |
} |
2777 |
AudioOutputDevice* pDevice = devices[iAudioOutputDevice]; |
AudioOutputDevice* pDevice = devices[iAudioOutputDevice]; |
2778 |
EffectChain* pEffectChain = pDevice->AddSendEffectChain(); |
EffectChain* pEffectChain = pDevice->AddSendEffectChain(); |
2779 |
result = pEffectChain->ID(); |
result = pEffectChain->ID(); |
2780 |
|
LSCPServer::SendLSCPNotify(LSCPEvent(LSCPEvent::event_send_fx_chain_count, iAudioOutputDevice, pDevice->SendEffectChainCount())); |
2781 |
} catch (Exception e) { |
} catch (Exception e) { |
2782 |
result.Error(e); |
result.Error(e); |
2783 |
} |
} |
2796 |
EffectChain* pEffectChain = pDevice->SendEffectChain(i); |
EffectChain* pEffectChain = pDevice->SendEffectChain(i); |
2797 |
if (pEffectChain->ID() == iSendEffectChain) { |
if (pEffectChain->ID() == iSendEffectChain) { |
2798 |
pDevice->RemoveSendEffectChain(i); |
pDevice->RemoveSendEffectChain(i); |
2799 |
|
LSCPServer::SendLSCPNotify(LSCPEvent(LSCPEvent::event_send_fx_chain_count, iAudioOutputDevice, pDevice->SendEffectChainCount())); |
2800 |
return result.Produce(); |
return result.Produce(); |
2801 |
} |
} |
2802 |
} |
} |
2861 |
if (!pEffect) |
if (!pEffect) |
2862 |
throw Exception("There is no effect instance with ID " + ToString(iEffectInstance)); |
throw Exception("There is no effect instance with ID " + ToString(iEffectInstance)); |
2863 |
pEffectChain->AppendEffect(pEffect); |
pEffectChain->AppendEffect(pEffect); |
2864 |
|
LSCPServer::SendLSCPNotify(LSCPEvent(LSCPEvent::event_send_fx_chain_info, iAudioOutputDevice, iSendEffectChain, pEffectChain->EffectCount())); |
2865 |
} catch (Exception e) { |
} catch (Exception e) { |
2866 |
result.Error(e); |
result.Error(e); |
2867 |
} |
} |
2878 |
if (!pEffect) |
if (!pEffect) |
2879 |
throw Exception("There is no effect instance with index " + ToString(iEffectInstance)); |
throw Exception("There is no effect instance with index " + ToString(iEffectInstance)); |
2880 |
pEffectChain->InsertEffect(pEffect, iEffectChainPosition); |
pEffectChain->InsertEffect(pEffect, iEffectChainPosition); |
2881 |
|
LSCPServer::SendLSCPNotify(LSCPEvent(LSCPEvent::event_send_fx_chain_info, iAudioOutputDevice, iSendEffectChain, pEffectChain->EffectCount())); |
2882 |
} catch (Exception e) { |
} catch (Exception e) { |
2883 |
result.Error(e); |
result.Error(e); |
2884 |
} |
} |
2892 |
EffectChain* pEffectChain = |
EffectChain* pEffectChain = |
2893 |
_getSendEffectChain(pSampler, iAudioOutputDevice, iSendEffectChain); |
_getSendEffectChain(pSampler, iAudioOutputDevice, iSendEffectChain); |
2894 |
pEffectChain->RemoveEffect(iEffectChainPosition); |
pEffectChain->RemoveEffect(iEffectChainPosition); |
2895 |
|
LSCPServer::SendLSCPNotify(LSCPEvent(LSCPEvent::event_send_fx_chain_info, iAudioOutputDevice, iSendEffectChain, pEffectChain->EffectCount())); |
2896 |
} catch (Exception e) { |
} catch (Exception e) { |
2897 |
result.Error(e); |
result.Error(e); |
2898 |
} |
} |