/[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 1129 by iliev, Thu Mar 22 20:39:04 2007 UTC revision 1130 by iliev, Sun Mar 25 18:59:14 2007 UTC
# Line 91  LSCPServer::~LSCPServer() { Line 91  LSCPServer::~LSCPServer() {
91      if (hSocket >= 0) close(hSocket);      if (hSocket >= 0) close(hSocket);
92  }  }
93    
94    void LSCPServer::LscpChannelCountListener::ChannelCountChanged(int NewCount) {
95        LSCPServer::SendLSCPNotify(LSCPEvent(LSCPEvent::event_channel_count, NewCount));
96    }
97    
98    void LSCPServer::LscpAudioDeviceCountListener::AudioDeviceCountChanged(int NewCount) {
99        LSCPServer::SendLSCPNotify(LSCPEvent(LSCPEvent::event_audio_device_count, NewCount));
100    }
101    
102    void LSCPServer::LscpMidiDeviceCountListener::MidiDeviceCountChanged(int NewCount) {
103        LSCPServer::SendLSCPNotify(LSCPEvent(LSCPEvent::event_midi_device_count, NewCount));
104    }
105    
106    void LSCPServer::LscpMidiInstrumentCountListener::MidiInstrumentCountChanged(int MapId, int NewCount) {
107        LSCPServer::SendLSCPNotify(LSCPEvent(LSCPEvent::event_midi_instr_count, MapId, NewCount));
108    }
109    
110    void LSCPServer::LscpMidiInstrumentInfoListener::MidiInstrumentInfoChanged(int MapId, int Bank, int Program) {
111        LSCPServer::SendLSCPNotify(LSCPEvent(LSCPEvent::event_midi_instr_info, MapId, Bank, Program));
112    }
113    
114    void LSCPServer::LscpMidiInstrumentMapCountListener::MidiInstrumentMapCountChanged(int NewCount) {
115        LSCPServer::SendLSCPNotify(LSCPEvent(LSCPEvent::event_midi_instr_map_count, NewCount));
116    }
117    
118    void LSCPServer::LscpMidiInstrumentMapInfoListener::MidiInstrumentMapInfoChanged(int MapId) {
119        LSCPServer::SendLSCPNotify(LSCPEvent(LSCPEvent::event_midi_instr_map_info, MapId));
120    }
121    
122    void LSCPServer::LscpFxSendCountListener::FxSendCountChanged(int ChannelId, int NewCount) {
123        LSCPServer::SendLSCPNotify(LSCPEvent(LSCPEvent::event_fx_send_count, ChannelId, NewCount));
124    }
125    
126    void LSCPServer::LscpVoiceCountListener::VoiceCountChanged(int ChannelId, int NewCount) {
127        LSCPServer::SendLSCPNotify(LSCPEvent(LSCPEvent::event_voice_count, ChannelId, NewCount));
128    }
129    
130    void LSCPServer::LscpStreamCountListener::StreamCountChanged(int ChannelId, int NewCount) {
131        LSCPServer::SendLSCPNotify(LSCPEvent(LSCPEvent::event_stream_count, ChannelId, NewCount));
132    }
133    
134    void LSCPServer::LscpBufferFillListener::BufferFillChanged(int ChannelId, String FillData) {
135        LSCPServer::SendLSCPNotify(LSCPEvent(LSCPEvent::event_buffer_fill, ChannelId, FillData));
136    }
137    
138    void LSCPServer::LscpTotalVoiceCountListener::TotalVoiceCountChanged(int NewCount) {
139        LSCPServer::SendLSCPNotify(LSCPEvent(LSCPEvent::event_total_voice_count, NewCount));
140    }
141    
142    
143  /**  /**
144   * Blocks the calling thread until the LSCP Server is initialized and   * Blocks the calling thread until the LSCP Server is initialized and
145   * accepting socket connections, if the server is already initialized then   * accepting socket connections, if the server is already initialized then
# Line 131  int LSCPServer::Main() { Line 180  int LSCPServer::Main() {
180    
181      listen(hSocket, 1);      listen(hSocket, 1);
182      Initialized.Set(true);      Initialized.Set(true);
183        
184        // Registering event listeners
185        pSampler->AddChannelCountListener(&channelCountListener);
186        pSampler->AddAudioDeviceCountListener(&audioDeviceCountListener);
187        pSampler->AddMidiDeviceCountListener(&midiDeviceCountListener);
188        pSampler->AddVoiceCountListener(&voiceCountListener);
189        pSampler->AddStreamCountListener(&streamCountListener);
190        pSampler->AddBufferFillListener(&bufferFillListener);
191        pSampler->AddTotalVoiceCountListener(&totalVoiceCountListener);
192        pSampler->AddFxSendCountListener(&fxSendCountListener);
193        MidiInstrumentMapper::AddMidiInstrumentCountListener(&midiInstrumentCountListener);
194        MidiInstrumentMapper::AddMidiInstrumentInfoListener(&midiInstrumentInfoListener);
195        MidiInstrumentMapper::AddMidiInstrumentMapCountListener(&midiInstrumentMapCountListener);
196        MidiInstrumentMapper::AddMidiInstrumentMapInfoListener(&midiInstrumentMapInfoListener);
197    
198      // now wait for client connections and handle their requests      // now wait for client connections and handle their requests
199      sockaddr_in client;      sockaddr_in client;
# Line 682  String LSCPServer::GetChannelInfo(uint u Line 745  String LSCPServer::GetChannelInfo(uint u
745          String AudioRouting;          String AudioRouting;
746          int Mute = 0;          int Mute = 0;
747          bool Solo = false;          bool Solo = false;
748          String MidiInstrumentMap;          String MidiInstrumentMap = "NONE";
749    
750          if (pEngineChannel) {          if (pEngineChannel) {
751              EngineName          = pEngineChannel->EngineName();              EngineName          = pEngineChannel->EngineName();

Legend:
Removed from v.1129  
changed lines
  Added in v.1130

  ViewVC Help
Powered by ViewVC