/[svn]/linuxsampler/trunk/src/network/lscpserver.cpp
ViewVC logotype

Diff of /linuxsampler/trunk/src/network/lscpserver.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2187 by schoenebeck, Tue Oct 5 10:35:13 2010 UTC revision 2188 by iliev, Fri Jun 24 19:39:11 2011 UTC
# Line 138  LSCPServer::LSCPServer(Sampler* pSampler Line 138  LSCPServer::LSCPServer(Sampler* pSampler
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    
# Line 2610  String LSCPServer::SetEffectInstanceInpu Line 2614  String LSCPServer::SetEffectInstanceInpu
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      }      }
# Line 2625  String LSCPServer::CreateEffectInstance( Line 2630  String LSCPServer::CreateEffectInstance(
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      }      }
# Line 2671  String LSCPServer::CreateEffectInstance( Line 2677  String LSCPServer::CreateEffectInstance(
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      }      }
# Line 2685  String LSCPServer::DestroyEffectInstance Line 2692  String LSCPServer::DestroyEffectInstance
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      }      }
# Line 2769  String LSCPServer::AddSendEffectChain(in Line 2777  String LSCPServer::AddSendEffectChain(in
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      }      }
# Line 2787  String LSCPServer::RemoveSendEffectChain Line 2796  String LSCPServer::RemoveSendEffectChain
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          }          }
# Line 2851  String LSCPServer::AppendSendEffectChain Line 2861  String LSCPServer::AppendSendEffectChain
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      }      }
# Line 2867  String LSCPServer::InsertSendEffectChain Line 2878  String LSCPServer::InsertSendEffectChain
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      }      }
# Line 2880  String LSCPServer::RemoveSendEffectChain Line 2892  String LSCPServer::RemoveSendEffectChain
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      }      }

Legend:
Removed from v.2187  
changed lines
  Added in v.2188

  ViewVC Help
Powered by ViewVC