/[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 64 by schoenebeck, Thu May 6 20:06:20 2004 UTC revision 68 by senkov, Sat May 8 19:03:17 2004 UTC
# Line 332  String LSCPServer::SetMIDIInputType(Midi Line 332  String LSCPServer::SetMIDIInputType(Midi
332   * Will be called by the parser to change the MIDI input port on which the   * Will be called by the parser to change the MIDI input port on which the
333   * engine of a particular sampler channel should listen to.   * engine of a particular sampler channel should listen to.
334   */   */
335  String LSCPServer::SetMIDIInputPort(String MIDIInputPort, uint uiSamplerchannel) {  String LSCPServer::SetMIDIInputPort(String MIDIInputPort, uint uiSamplerChannel) {
336      dmsg(2,("LSCPServer: SetMIDIInputPort(MIDIInputPort=%s, Samplerchannel=%d)\n", MIDIInputPort.c_str(), uiSamplerchannel));      dmsg(2,("LSCPServer: SetMIDIInputPort(MIDIInputPort=%s, Samplerchannel=%d)\n", MIDIInputPort.c_str(), uiSamplerChannel));
337      return "ERR:0:Not implemented yet.\r\n";      result_t result;
338        try {
339            SamplerChannel* pSamplerChannel = pSampler->GetSamplerChannel(uiSamplerChannel);
340            if (!pSamplerChannel) throw LinuxSamplerException("Index out of bounds");
341            if (!pSamplerChannel->GetMidiInputDevice()) throw LinuxSamplerException("No MIDI input device connected yet");
342            pSamplerChannel->GetMidiInputDevice()->SetInputPort(MIDIInputPort.c_str());
343            result.type = result_type_success;
344        }
345        catch (LinuxSamplerException e) {
346             e.PrintMessage();
347             result.type    = result_type_error;
348             result.code    = LSCP_ERR_UNKNOWN;
349             result.message = e.Message();
350        }
351        return ConvertResult(result);
352  }  }
353    
354  /**  /**

Legend:
Removed from v.64  
changed lines
  Added in v.68

  ViewVC Help
Powered by ViewVC