/[svn]/liblscp/trunk/src/client.c
ViewVC logotype

Diff of /liblscp/trunk/src/client.c

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

revision 253 by capela, Mon Sep 27 14:40:08 2004 UTC revision 254 by capela, Tue Sep 28 14:06:18 2004 UTC
# Line 1352  lscp_status_t lscp_set_channel_midi_port Line 1352  lscp_status_t lscp_set_channel_midi_port
1352   *   *
1353   *  @param pClient          Pointer to client instance structure.   *  @param pClient          Pointer to client instance structure.
1354   *  @param iSamplerChannel  Sampler channel number.   *  @param iSamplerChannel  Sampler channel number.
1355   *  @param iMidiChannel     MIDI channel number to listen (0-15) or   *  @param iMidiChannel     MIDI channel number to listen (1-16) or
1356   *                          LSCP_MIDI_CHANNEL_ALL (-1) to listen on all channels.   *                          LSCP_MIDI_CHANNEL_ALL (0) to listen on all channels.
1357   *   *
1358   *  @returns LSCP_OK on success, LSCP_FAILED otherwise.   *  @returns LSCP_OK on success, LSCP_FAILED otherwise.
1359   */   */
# Line 1361  lscp_status_t lscp_set_channel_midi_chan Line 1361  lscp_status_t lscp_set_channel_midi_chan
1361  {  {
1362      char szQuery[LSCP_BUFSIZ];      char szQuery[LSCP_BUFSIZ];
1363    
1364      if (iSamplerChannel < 0 || iMidiChannel < LSCP_MIDI_CHANNEL_ALL || iMidiChannel > 15)      if (iSamplerChannel < 0 || iMidiChannel < 0 || iMidiChannel > 16)
1365          return LSCP_FAILED;          return LSCP_FAILED;
1366    
1367      if (iMidiChannel >= 0)      if (iMidiChannel > 0)
1368          sprintf(szQuery, "SET CHANNEL MIDI_INPUT_CHANNEL %d %d\r\n", iSamplerChannel, iMidiChannel);          sprintf(szQuery, "SET CHANNEL MIDI_INPUT_CHANNEL %d %d\r\n", iSamplerChannel, iMidiChannel);
1369      else      else
1370          sprintf(szQuery, "SET CHANNEL MIDI_INPUT_CHANNEL %d ALL\r\n", iSamplerChannel);          sprintf(szQuery, "SET CHANNEL MIDI_INPUT_CHANNEL %d ALL\r\n", iSamplerChannel);

Legend:
Removed from v.253  
changed lines
  Added in v.254

  ViewVC Help
Powered by ViewVC