/[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 523 by capela, Mon May 9 10:17:12 2005 UTC revision 921 by capela, Sun Sep 24 12:55:48 2006 UTC
# Line 1  Line 1 
1  // example_server.c  // example_server.c
2  //  //
3  /****************************************************************************  /****************************************************************************
4     Copyright (C) 2004-2005, rncbc aka Rui Nuno Capela. All rights reserved.     liblscp - LinuxSampler Control Protocol API
5       Copyright (C) 2004-2006, rncbc aka Rui Nuno Capela. All rights reserved.
6    
7     This program is free software; you can redistribute it and/or     This program is free software; you can redistribute it and/or
8     modify it under the terms of the GNU General Public License     modify it under the terms of the GNU General Public License
# Line 13  Line 14 
14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15     GNU General Public License for more details.     GNU General Public License for more details.
16    
17     You should have received a copy of the GNU General Public License     You should have received a copy of the GNU General Public License along
18     along with this program; if not, write to the Free Software     with this program; if not, write to the Free Software Foundation, Inc.,
19     Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.     51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20    
21  *****************************************************************************/  *****************************************************************************/
22    
# Line 78  lscp_status_t server_callback ( lscp_con Line 79  lscp_status_t server_callback ( lscp_con
79                              "MIDI_INPUT_DEVICE: 0\r\n"                              "MIDI_INPUT_DEVICE: 0\r\n"
80                              "MIDI_INPUT_PORT: 0\r\n"                              "MIDI_INPUT_PORT: 0\r\n"
81                              "MIDI_INPUT_CHANNEL: ALL\r\n"                              "MIDI_INPUT_CHANNEL: ALL\r\n"
82                              "VOLUME: 0.5\r\n";                              "VOLUME: 0.5\r\n"
83                                "MUTE: FALSE\r\n"
84                                "SOLO: TRUE\r\n";
85              }              }
86              else if (lscp_parser_test(&tok, "VOICE_COUNT")) {              else if (lscp_parser_test(&tok, "VOICE_COUNT")) {
87                  // Current number of active voices:                  // Current number of active voices:
# Line 348  lscp_status_t server_callback ( lscp_con Line 351  lscp_status_t server_callback ( lscp_con
351              // GET AVAILABLE_ENGINES              // GET AVAILABLE_ENGINES
352              pszResult = "3\r\n";              pszResult = "3\r\n";
353          }          }
354            else if (lscp_parser_test2(&tok, "SERVER", "INFO")) {
355                // Getting information about the server.
356                // GET SERVER INFO
357                sprintf(szTemp, "DESCRIPTION: example_server (%s) %s\r\n"
358                    "VERSION: %s\r\n", lscp_server_package(),
359                    lscp_server_build(), lscp_server_version());
360                pszResult = szTemp;
361            }
362          else if (lscp_parser_test2(&tok, "ENGINE", "INFO")) {          else if (lscp_parser_test2(&tok, "ENGINE", "INFO")) {
363              // Getting information about an engine.              // Getting information about an engine.
364              // GET ENGINE INFO <engine-name>              // GET ENGINE INFO <engine-name>
# Line 427  lscp_status_t server_callback ( lscp_con Line 438  lscp_status_t server_callback ( lscp_con
438                  // Setting channel volume:                  // Setting channel volume:
439                  // SET CHANNEL VOLUME <sampler-channel> <volume>                  // SET CHANNEL VOLUME <sampler-channel> <volume>
440              }              }
441                else if (lscp_parser_test(&tok, "MUTE")) {
442                    // Muting a sampler channel:
443                    // SET CHANNEL MUTE <sampler-channel> <mute>
444                }
445                else if (lscp_parser_test(&tok, "SOLO")) {
446                    // Soloing a sampler channel:
447                    // SET CHANNEL SOLO <sampler-channel> <solo>
448                }
449              else if (lscp_parser_test(&tok, "AUDIO_OUTPUT_TYPE")) {              else if (lscp_parser_test(&tok, "AUDIO_OUTPUT_TYPE")) {
450                  // Setting audio output type:                  // Setting audio output type:
451                  // SET CHANNEL AUDIO_OUTPUT_TYPE <sampler-channel> <audio-output-type>                  // SET CHANNEL AUDIO_OUTPUT_TYPE <sampler-channel> <audio-output-type>

Legend:
Removed from v.523  
changed lines
  Added in v.921

  ViewVC Help
Powered by ViewVC