/[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 1047 by schoenebeck, Mon Feb 19 19:38:04 2007 UTC revision 1108 by iliev, Thu Mar 22 20:39:04 2007 UTC
# Line 75  LSCPServer::LSCPServer(Sampler* pSampler Line 75  LSCPServer::LSCPServer(Sampler* pSampler
75      LSCPEvent::RegisterEvent(LSCPEvent::event_stream_count, "STREAM_COUNT");      LSCPEvent::RegisterEvent(LSCPEvent::event_stream_count, "STREAM_COUNT");
76      LSCPEvent::RegisterEvent(LSCPEvent::event_buffer_fill, "BUFFER_FILL");      LSCPEvent::RegisterEvent(LSCPEvent::event_buffer_fill, "BUFFER_FILL");
77      LSCPEvent::RegisterEvent(LSCPEvent::event_channel_info, "CHANNEL_INFO");      LSCPEvent::RegisterEvent(LSCPEvent::event_channel_info, "CHANNEL_INFO");
78        LSCPEvent::RegisterEvent(LSCPEvent::event_fx_send_count, "FX_SEND_COUNT");
79        LSCPEvent::RegisterEvent(LSCPEvent::event_fx_send_info, "FX_SEND_INFO");
80      LSCPEvent::RegisterEvent(LSCPEvent::event_midi_instr_map_count, "MIDI_INSTRUMENT_MAP_COUNT");      LSCPEvent::RegisterEvent(LSCPEvent::event_midi_instr_map_count, "MIDI_INSTRUMENT_MAP_COUNT");
81      LSCPEvent::RegisterEvent(LSCPEvent::event_midi_instr_map_info, "MIDI_INSTRUMENT_MAP_INFO");      LSCPEvent::RegisterEvent(LSCPEvent::event_midi_instr_map_info, "MIDI_INSTRUMENT_MAP_INFO");
82      LSCPEvent::RegisterEvent(LSCPEvent::event_midi_instr_count, "MIDI_INSTRUMENT_COUNT");      LSCPEvent::RegisterEvent(LSCPEvent::event_midi_instr_count, "MIDI_INSTRUMENT_COUNT");
83      LSCPEvent::RegisterEvent(LSCPEvent::event_midi_instr_info, "MIDI_INSTRUMENT_INFO");      LSCPEvent::RegisterEvent(LSCPEvent::event_midi_instr_info, "MIDI_INSTRUMENT_INFO");
84      LSCPEvent::RegisterEvent(LSCPEvent::event_misc, "MISCELLANEOUS");      LSCPEvent::RegisterEvent(LSCPEvent::event_misc, "MISCELLANEOUS");
85      LSCPEvent::RegisterEvent(LSCPEvent::event_total_voice_count, "TOTAL_VOICE_COUNT");      LSCPEvent::RegisterEvent(LSCPEvent::event_total_voice_count, "TOTAL_VOICE_COUNT");
86        LSCPEvent::RegisterEvent(LSCPEvent::event_global_info, "GLOBAL_INFO");
87      hSocket = -1;      hSocket = -1;
88  }  }
89    
# Line 148  int LSCPServer::Main() { Line 151  int LSCPServer::Main() {
151                  if ((*itEngineChannel)->StatusChanged()) {                  if ((*itEngineChannel)->StatusChanged()) {
152                      SendLSCPNotify(LSCPEvent(LSCPEvent::event_channel_info, (*itEngineChannel)->iSamplerChannelIndex));                      SendLSCPNotify(LSCPEvent(LSCPEvent::event_channel_info, (*itEngineChannel)->iSamplerChannelIndex));
153                  }                  }
154    
155                    for (int i = 0; i < (*itEngineChannel)->GetFxSendCount(); i++) {
156                        FxSend* fxs = (*itEngineChannel)->GetFxSend(i);
157                        if(fxs != NULL && fxs->IsInfoChanged()) {
158                            int chn = (*itEngineChannel)->iSamplerChannelIndex;
159                            LSCPServer::SendLSCPNotify(LSCPEvent(LSCPEvent::event_fx_send_info, chn, fxs->Id()));
160                            fxs->SetInfoChanged(false);
161                        }
162                    }
163              }              }
164          }          }
165    
# Line 2010  String LSCPServer::SetFxSendAudioOutputC Line 2022  String LSCPServer::SetFxSendAudioOutputC
2022          if (!pFxSend) throw Exception("There is no FxSend with that ID on the given sampler channel");          if (!pFxSend) throw Exception("There is no FxSend with that ID on the given sampler channel");
2023    
2024          pFxSend->SetDestinationChannel(FxSendChannel, DeviceChannel);          pFxSend->SetDestinationChannel(FxSendChannel, DeviceChannel);
2025            LSCPServer::SendLSCPNotify(LSCPEvent(LSCPEvent::event_fx_send_info, uiSamplerChannel, FxSendID));
2026      } catch (Exception e) {      } catch (Exception e) {
2027          result.Error(e);          result.Error(e);
2028      }      }
# Line 2036  String LSCPServer::SetFxSendMidiControll Line 2049  String LSCPServer::SetFxSendMidiControll
2049          if (!pFxSend) throw Exception("There is no FxSend with that ID on the given sampler channel");          if (!pFxSend) throw Exception("There is no FxSend with that ID on the given sampler channel");
2050    
2051          pFxSend->SetMidiController(MidiController);          pFxSend->SetMidiController(MidiController);
2052            LSCPServer::SendLSCPNotify(LSCPEvent(LSCPEvent::event_fx_send_info, uiSamplerChannel, FxSendID));
2053      } catch (Exception e) {      } catch (Exception e) {
2054          result.Error(e);          result.Error(e);
2055      }      }
# Line 2062  String LSCPServer::SetFxSendLevel(uint u Line 2076  String LSCPServer::SetFxSendLevel(uint u
2076          if (!pFxSend) throw Exception("There is no FxSend with that ID on the given sampler channel");          if (!pFxSend) throw Exception("There is no FxSend with that ID on the given sampler channel");
2077    
2078          pFxSend->SetLevel((float)dLevel);          pFxSend->SetLevel((float)dLevel);
2079            LSCPServer::SendLSCPNotify(LSCPEvent(LSCPEvent::event_fx_send_info, uiSamplerChannel, FxSendID));
2080      } catch (Exception e) {      } catch (Exception e) {
2081          result.Error(e);          result.Error(e);
2082      }      }
# Line 2141  String LSCPServer::SetGlobalVolume(doubl Line 2156  String LSCPServer::SetGlobalVolume(doubl
2156      try {      try {
2157          if (dVolume < 0) throw Exception("Volume may not be negative");          if (dVolume < 0) throw Exception("Volume may not be negative");
2158          GLOBAL_VOLUME = dVolume; // see common/global.cpp          GLOBAL_VOLUME = dVolume; // see common/global.cpp
2159            LSCPServer::SendLSCPNotify(LSCPEvent(LSCPEvent::event_global_info, "VOLUME", GLOBAL_VOLUME));
2160      } catch (Exception e) {      } catch (Exception e) {
2161          result.Error(e);          result.Error(e);
2162      }      }

Legend:
Removed from v.1047  
changed lines
  Added in v.1108

  ViewVC Help
Powered by ViewVC