/[svn]/liblscp/trunk/examples/example_server.c
ViewVC logotype

Diff of /liblscp/trunk/examples/example_server.c

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

revision 180 by capela, Tue Jul 6 20:20:51 2004 UTC revision 187 by capela, Wed Jul 7 23:41:07 2004 UTC
# Line 331  lscp_status_t server_callback ( lscp_con Line 331  lscp_status_t server_callback ( lscp_con
331      else if (lscp_parser_test2(&tok, "ADD", "CHANNEL")) {      else if (lscp_parser_test2(&tok, "ADD", "CHANNEL")) {
332          // Adding a new sampler channel:          // Adding a new sampler channel:
333          // ADD CHANNEL          // ADD CHANNEL
334          sprintf(szTemp, "OK[%d]", iSamplerChannel++);          if (iSamplerChannel < 16) {
335          pszResult = szTemp;              sprintf(szTemp, "OK[%d]", iSamplerChannel++);        
336                pszResult = szTemp;
337            } else {
338                iSamplerChannel = 0;
339                ret = LSCP_FAILED;
340            }
341      }      }
342      else if (lscp_parser_test2(&tok, "REMOVE", "CHANNEL")) {      else if (lscp_parser_test2(&tok, "REMOVE", "CHANNEL")) {
343          // Removing a sampler channel:          // Removing a sampler channel:
# Line 350  lscp_status_t server_callback ( lscp_con Line 355  lscp_status_t server_callback ( lscp_con
355          if (lscp_parser_test(&tok, "AUDIO_OUTPUT_DEVICE")) {          if (lscp_parser_test(&tok, "AUDIO_OUTPUT_DEVICE")) {
356              // Creating an audio output device.              // Creating an audio output device.
357              // CREATE AUDIO_OUTPUT_DEVICE <audio-output-driver> [<params>]              // CREATE AUDIO_OUTPUT_DEVICE <audio-output-driver> [<params>]
358              sprintf(szTemp, "OK[%d]", iAudioDevice++);              if (iAudioDevice < 8) {
359              pszResult = szTemp;                  sprintf(szTemp, "OK[%d]", iAudioDevice++);
360                    pszResult = szTemp;
361                } else {
362                    iAudioDevice = 0;
363                    ret = LSCP_FAILED;
364                }
365          }          }
366          else if (lscp_parser_test(&tok, "MIDI_INPUT_DEVICE")) {          else if (lscp_parser_test(&tok, "MIDI_INPUT_DEVICE")) {
367              // Creating an MIDI input device.              // Creating an MIDI input device.
368              // CREATE MIDI_INPUT_DEVICE <midi-input-driver> [<params>]              // CREATE MIDI_INPUT_DEVICE <midi-input-driver> [<params>]
369              sprintf(szTemp, "OK[%d]", iMidiDevice++);              if (iMidiDevice < 8) {
370              pszResult = szTemp;                  sprintf(szTemp, "OK[%d]", iMidiDevice++);
371                    pszResult = szTemp;
372                } else {
373                    iMidiDevice = 0;
374                    ret = LSCP_FAILED;
375                }
376          }          }
377          else ret = LSCP_FAILED;          else ret = LSCP_FAILED;
378      }      }

Legend:
Removed from v.180  
changed lines
  Added in v.187

  ViewVC Help
Powered by ViewVC