/[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 626 by capela, Fri Jun 10 09:59:18 2005 UTC revision 735 by capela, Tue Aug 16 09:48:42 2005 UTC
# Line 1053  lscp_channel_info_t *lscp_get_channel_in Line 1053  lscp_channel_info_t *lscp_get_channel_in
1053                  if (pszToken)                  if (pszToken)
1054                      pChannelInfo->volume = (float) atof(lscp_ltrim(pszToken));                      pChannelInfo->volume = (float) atof(lscp_ltrim(pszToken));
1055              }              }
1056                else if (strcasecmp(pszToken, "MUTE") == 0) {
1057                    pszToken = lscp_strtok(NULL, pszCrlf, &(pch));
1058                    if (pszToken)
1059                        pChannelInfo->mute = (strcasecmp(lscp_unquote(&pszToken, 0), "TRUE") == 0);
1060                }
1061                else if (strcasecmp(pszToken, "SOLO") == 0) {
1062                    pszToken = lscp_strtok(NULL, pszCrlf, &(pch));
1063                    if (pszToken)
1064                        pChannelInfo->solo = (strcasecmp(lscp_unquote(&pszToken, 0), "TRUE") == 0);
1065                }
1066              pszToken = lscp_strtok(NULL, pszSeps, &(pch));              pszToken = lscp_strtok(NULL, pszSeps, &(pch));
1067          }          }
1068      }      }
# Line 1434  lscp_status_t lscp_set_channel_volume ( Line 1444  lscp_status_t lscp_set_channel_volume (
1444      return lscp_client_query(pClient, szQuery);      return lscp_client_query(pClient, szQuery);
1445  }  }
1446    
1447    
1448    /**
1449     *  Muting a sampler channel:
1450     *  SET CHANNEL MUTE <sampler-channel> <mute>
1451     *
1452     *  @param pClient          Pointer to client instance structure.
1453     *  @param iSamplerChannel  Sampler channel number.
1454     *  @param iMute            Sampler channel mute state as a boolean value,
1455     *                          either 1 (one) to mute the channel or 0 (zero)
1456     *                          to unmute the channel.
1457     *
1458     *  @returns LSCP_OK on success, LSCP_FAILED otherwise.
1459     */
1460    lscp_status_t lscp_set_channel_mute ( lscp_client_t *pClient, int iSamplerChannel, int iMute )
1461    {
1462        char szQuery[LSCP_BUFSIZ];
1463    
1464        if (iSamplerChannel < 0 || iMute < 0 || iMute > 1)
1465            return LSCP_FAILED;
1466    
1467        sprintf(szQuery, "SET CHANNEL MUTE %d %g\r\n", iSamplerChannel, iMute);
1468        return lscp_client_query(pClient, szQuery);
1469    }
1470    
1471    
1472    /**
1473     *  Soloing a sampler channel:
1474     *  SET CHANNEL SOLO <sampler-channel> <solo>
1475     *
1476     *  @param pClient          Pointer to client instance structure.
1477     *  @param iSamplerChannel  Sampler channel number.
1478     *  @param iSolo            Sampler channel solo state as a boolean value,
1479     *                          either 1 (one) to solo the channel or 0 (zero)
1480     *                          to unsolo the channel.
1481     *
1482     *  @returns LSCP_OK on success, LSCP_FAILED otherwise.
1483     */
1484    lscp_status_t lscp_set_channel_solo ( lscp_client_t *pClient, int iSamplerChannel, int iSolo )
1485    {
1486        char szQuery[LSCP_BUFSIZ];
1487    
1488        if (iSamplerChannel < 0 || iSolo < 0 || iSolo > 1)
1489            return LSCP_FAILED;
1490    
1491        sprintf(szQuery, "SET CHANNEL SOLO %d %g\r\n", iSamplerChannel, iSolo);
1492        return lscp_client_query(pClient, szQuery);
1493    }
1494    
1495    
1496  /**  /**
1497   *  Resetting a sampler channel:   *  Resetting a sampler channel:

Legend:
Removed from v.626  
changed lines
  Added in v.735

  ViewVC Help
Powered by ViewVC