/[svn]/liblscp/trunk/lscp/client.h
ViewVC logotype

Diff of /liblscp/trunk/lscp/client.h

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

revision 132 by capela, Fri Jun 18 14:19:19 2004 UTC revision 564 by capela, Sun May 22 22:02:00 2005 UTC
# Line 2  Line 2 
2  //  //
3  /****************************************************************************  /****************************************************************************
4     liblscp - LinuxSampler Control Protocol API     liblscp - LinuxSampler Control Protocol API
5     Copyright (C) 2004, rncbc aka Rui Nuno Capela. All rights reserved.     Copyright (C) 2004-2005, rncbc aka Rui Nuno Capela. All rights reserved.
6    
7     This library is free software; you can redistribute it and/or     This library is free software; you can redistribute it and/or
8     modify it under the terms of the GNU Lesser General Public     modify it under the terms of the GNU Lesser General Public
# Line 24  Line 24 
24  #define __LSCP_CLIENT_H  #define __LSCP_CLIENT_H
25    
26  #include "lscp/socket.h"  #include "lscp/socket.h"
27    #include "lscp/event.h"
28    
29  #if defined(__cplusplus)  #if defined(__cplusplus)
30  extern "C" {  extern "C" {
31  #endif  #endif
32    
33    //-------------------------------------------------------------------------
34    // MIDI channel omni mode.
35    
36    #define LSCP_MIDI_CHANNEL_ALL   16
37    
38    
39  //-------------------------------------------------------------------------  //-------------------------------------------------------------------------
40  // Client data structures.  // Client data structures.
41    
42    /** Server info cache struct. */
43    typedef struct _lscp_server_info_t
44    {
45        char *        description;
46        char *        version;
47    
48    } lscp_server_info_t;
49    
50    
51  /** Engine info cache struct. */  /** Engine info cache struct. */
52  typedef struct _lscp_engine_info_t  typedef struct _lscp_engine_info_t
53  {  {
# Line 51  typedef struct _lscp_channel_info_t Line 66  typedef struct _lscp_channel_info_t
66      char **       audio_routing;      char **       audio_routing;
67      char *        instrument_file;      char *        instrument_file;
68      int           instrument_nr;      int           instrument_nr;
69        char *        instrument_name;
70      int           instrument_status;      int           instrument_status;
71      int           midi_device;      int           midi_device;
72      int           midi_port;      int           midi_port;
# Line 84  typedef enum _lscp_usage_t Line 100  typedef enum _lscp_usage_t
100  /** Client opaque descriptor struct. */  /** Client opaque descriptor struct. */
101  typedef struct _lscp_client_t lscp_client_t;  typedef struct _lscp_client_t lscp_client_t;
102    
103  /** Client callback procedure prototype. */  /** Client event callback procedure prototype. */
104  typedef lscp_status_t (*lscp_client_proc_t)  typedef lscp_status_t (*lscp_client_proc_t)
105  (  (
106      struct _lscp_client_t *pClient,      struct _lscp_client_t *pClient,
107      const char *pchBuffer,      lscp_event_t event,
108      int cchBuffer,      const char *pchData,
109        int cchData,
110      void *pvData      void *pvData
111  );  );
112    
# Line 120  int                     lscp_client_get_ Line 137  int                     lscp_client_get_
137  //-------------------------------------------------------------------------  //-------------------------------------------------------------------------
138  // Client registration protocol functions.  // Client registration protocol functions.
139    
140  lscp_status_t           lscp_client_subscribe           (lscp_client_t *pClient);  lscp_status_t           lscp_client_subscribe           (lscp_client_t *pClient, lscp_event_t events);
141  lscp_status_t           lscp_client_unsubscribe         (lscp_client_t *pClient);  lscp_status_t           lscp_client_unsubscribe         (lscp_client_t *pClient, lscp_event_t events);
142    
143    lscp_event_t            lscp_client_get_events          (lscp_client_t *pClient);
144    
145  //-------------------------------------------------------------------------  //-------------------------------------------------------------------------
146  // Client command protocol functions.  // Client command protocol functions.
147    
148  lscp_status_t           lscp_load_instrument            (lscp_client_t *pClient, const char *pszFileName, int iInstrIndex, int iSamplerChannel);  lscp_status_t           lscp_load_instrument            (lscp_client_t *pClient, const char *pszFileName, int iInstrIndex, int iSamplerChannel);
149    lscp_status_t           lscp_load_instrument_non_modal  (lscp_client_t *pClient, const char *pszFileName, int iInstrIndex, int iSamplerChannel);
150  lscp_status_t           lscp_load_engine                (lscp_client_t *pClient, const char *pszEngineName, int iSamplerChannel);  lscp_status_t           lscp_load_engine                (lscp_client_t *pClient, const char *pszEngineName, int iSamplerChannel);
151  int                     lscp_get_channels               (lscp_client_t *pClient);  int                     lscp_get_channels               (lscp_client_t *pClient);
152  int *                   lscp_list_channels              (lscp_client_t *pClient);  int *                   lscp_list_channels              (lscp_client_t *pClient);
153  int                     lscp_add_channel                (lscp_client_t *pClient);  int                     lscp_add_channel                (lscp_client_t *pClient);
154  lscp_status_t           lscp_remove_channel             (lscp_client_t *pClient, int iSamplerChannel);  lscp_status_t           lscp_remove_channel             (lscp_client_t *pClient, int iSamplerChannel);
155  const char **           lscp_get_available_engines      (lscp_client_t *pClient);  
156    int                     lscp_get_available_engines      (lscp_client_t *pClient);
157    const char **           lscp_list_available_engines     (lscp_client_t *pClient);
158    
159  lscp_engine_info_t *    lscp_get_engine_info            (lscp_client_t *pClient, const char *pszEngineName);  lscp_engine_info_t *    lscp_get_engine_info            (lscp_client_t *pClient, const char *pszEngineName);
160  lscp_channel_info_t *   lscp_get_channel_info           (lscp_client_t *pClient, int iSamplerChannel);  lscp_channel_info_t *   lscp_get_channel_info           (lscp_client_t *pClient, int iSamplerChannel);
161    
162  int                     lscp_get_channel_voice_count    (lscp_client_t *pClient, int iSamplerChannel);  int                     lscp_get_channel_voice_count    (lscp_client_t *pClient, int iSamplerChannel);
163  int                     lscp_get_channel_stream_count   (lscp_client_t *pClient, int iSamplerChannel);  int                     lscp_get_channel_stream_count   (lscp_client_t *pClient, int iSamplerChannel);
164    int                     lscp_get_channel_stream_usage   (lscp_client_t *pClient, int iSamplerChannel);
165    
166  lscp_buffer_fill_t *    lscp_get_channel_buffer_fill    (lscp_client_t *pClient, lscp_usage_t iUsageType, int iSamplerChannel);  lscp_buffer_fill_t *    lscp_get_channel_buffer_fill    (lscp_client_t *pClient, lscp_usage_t iUsageType, int iSamplerChannel);
167    
168  lscp_status_t           lscp_set_channel_audio_type     (lscp_client_t *pClient, int iSamplerChannel, const char *pszAudioType);  lscp_status_t           lscp_set_channel_audio_type     (lscp_client_t *pClient, int iSamplerChannel, const char *pszAudioType);
169    lscp_status_t           lscp_set_channel_audio_device   (lscp_client_t *pClient, int iSamplerChannel, int iAudioDevice);
170  lscp_status_t           lscp_set_channel_audio_channel  (lscp_client_t *pClient, int iSamplerChannel, int iAudioOut, int iAudioIn);  lscp_status_t           lscp_set_channel_audio_channel  (lscp_client_t *pClient, int iSamplerChannel, int iAudioOut, int iAudioIn);
171    
172  lscp_status_t           lscp_set_channel_midi_type      (lscp_client_t *pClient, int iSamplerChannel, const char *pszMidiType);  lscp_status_t           lscp_set_channel_midi_type      (lscp_client_t *pClient, int iSamplerChannel, const char *pszMidiType);
173    lscp_status_t           lscp_set_channel_midi_device    (lscp_client_t *pClient, int iSamplerChannel, int iMidiDevice);
174  lscp_status_t           lscp_set_channel_midi_port      (lscp_client_t *pClient, int iSamplerChannel, int iMidiPort);  lscp_status_t           lscp_set_channel_midi_port      (lscp_client_t *pClient, int iSamplerChannel, int iMidiPort);
175  lscp_status_t           lscp_set_channel_midi_channel   (lscp_client_t *pClient, int iSamplerChannel, int iMidiChannel);  lscp_status_t           lscp_set_channel_midi_channel   (lscp_client_t *pClient, int iSamplerChannel, int iMidiChannel);
176  lscp_status_t           lscp_set_channel_volume         (lscp_client_t *pClient, int iSamplerChannel, float fVolume);  lscp_status_t           lscp_set_channel_volume         (lscp_client_t *pClient, int iSamplerChannel, float fVolume);
177    
178  lscp_status_t           lscp_reset_channel              (lscp_client_t *pClient, int iSamplerChannel);  lscp_status_t           lscp_reset_channel              (lscp_client_t *pClient, int iSamplerChannel);
179    
180    lscp_status_t           lscp_reset_sampler              (lscp_client_t *pClient);
181    
182    lscp_server_info_t *    lscp_get_server_info            (lscp_client_t *pClient);
183    
184  #if defined(__cplusplus)  #if defined(__cplusplus)
185  }  }

Legend:
Removed from v.132  
changed lines
  Added in v.564

  ViewVC Help
Powered by ViewVC