/[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 946 by capela, Mon Nov 27 18:33:02 2006 UTC revision 1802 by schoenebeck, Sun Dec 7 13:50:08 2008 UTC
# Line 2  Line 2 
2  //  //
3  /****************************************************************************  /****************************************************************************
4     liblscp - LinuxSampler Control Protocol API     liblscp - LinuxSampler Control Protocol API
5     Copyright (C) 2004-2006, rncbc aka Rui Nuno Capela. All rights reserved.     Copyright (C) 2004-2008, 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 42  extern "C" { Line 42  extern "C" {
42  /** Server info cache struct. */  /** Server info cache struct. */
43  typedef struct _lscp_server_info_t  typedef struct _lscp_server_info_t
44  {  {
45      char *        description;          char *        description;
46      char *        version;          char *        version;
47            char *        protocol_version;
48    
49  } lscp_server_info_t;  } lscp_server_info_t;
50    
# Line 51  typedef struct _lscp_server_info_t Line 52  typedef struct _lscp_server_info_t
52  /** Engine info cache struct. */  /** Engine info cache struct. */
53  typedef struct _lscp_engine_info_t  typedef struct _lscp_engine_info_t
54  {  {
55      char *        description;          char *        description;
56      char *        version;          char *        version;
57    
58  } lscp_engine_info_t;  } lscp_engine_info_t;
59    
# Line 60  typedef struct _lscp_engine_info_t Line 61  typedef struct _lscp_engine_info_t
61  /** Channel info cache struct. */  /** Channel info cache struct. */
62  typedef struct _lscp_channel_info_t  typedef struct _lscp_channel_info_t
63  {  {
64      char *        engine_name;          char *        engine_name;
65      int           audio_device;          int           audio_device;
66      int           audio_channels;          int           audio_channels;
67      char **       audio_routing;          int  *        audio_routing;
68      char *        instrument_file;          char *        instrument_file;
69      int           instrument_nr;          int           instrument_nr;
70      char *        instrument_name;          char *        instrument_name;
71      int           instrument_status;          int           instrument_status;
72      int           midi_device;          int           midi_device;
73      int           midi_port;          int           midi_port;
74      int           midi_channel;          int           midi_channel;
75      float         volume;          int           midi_map;
76      int           mute;          float         volume;
77      int           solo;          int           mute;
78            int           solo;
79    
80  } lscp_channel_info_t;  } lscp_channel_info_t;
81    
# Line 81  typedef struct _lscp_channel_info_t Line 83  typedef struct _lscp_channel_info_t
83  /** Buffer fill cache struct. */  /** Buffer fill cache struct. */
84  typedef struct _lscp_buffer_fill_t  typedef struct _lscp_buffer_fill_t
85  {  {
86      unsigned int  stream_id;          unsigned int  stream_id;
87      unsigned long stream_usage;          unsigned long stream_usage;
88    
89  } lscp_buffer_fill_t;  } lscp_buffer_fill_t;
90    
# Line 90  typedef struct _lscp_buffer_fill_t Line 92  typedef struct _lscp_buffer_fill_t
92  /** Buffer fill stream usage types. */  /** Buffer fill stream usage types. */
93  typedef enum _lscp_usage_t  typedef enum _lscp_usage_t
94  {  {
95      LSCP_USAGE_BYTES = 0,          LSCP_USAGE_BYTES = 0,
96      LSCP_USAGE_PERCENTAGE          LSCP_USAGE_PERCENTAGE
97    
98  } lscp_usage_t;  } lscp_usage_t;
99    
100    
101    /** Effect send info cache struct. */
102    typedef struct _lscp_fxsend_info_t
103    {
104            char *        name;
105            int           midi_controller;
106            int *         audio_routing;
107            float         level;
108    
109    } lscp_fxsend_info_t;
110    
111    
112  /** MIDI instrument parameter struct. */  /** MIDI instrument parameter struct. */
113  typedef struct _lscp_midi_instrument_t  typedef struct _lscp_midi_instrument_t
114  {  {
115      int bank_msb;          int           map;
116      int bank_lsb;          int           bank;
117      int program;          int           prog;
118    
119  } lscp_midi_instrument_t;  } lscp_midi_instrument_t;
120    
# Line 109  typedef struct _lscp_midi_instrument_t Line 122  typedef struct _lscp_midi_instrument_t
122  /** MIDI instrument load mode. */  /** MIDI instrument load mode. */
123  typedef enum _lscp_load_mode_t  typedef enum _lscp_load_mode_t
124  {  {
125      LSCP_LOAD_DEFAULT = 0,          LSCP_LOAD_DEFAULT = 0,
126      LSCP_LOAD_ON_DEMAND,          LSCP_LOAD_ON_DEMAND,
127      LSCP_LOAD_ON_DEMAND_HOLD,          LSCP_LOAD_ON_DEMAND_HOLD,
128      LSCP_LOAD_PERSISTENT          LSCP_LOAD_PERSISTENT
129    
130  } lscp_load_mode_t;  } lscp_load_mode_t;
131    
# Line 120  typedef enum _lscp_load_mode_t Line 133  typedef enum _lscp_load_mode_t
133  /** MIDI instrument info cache struct. */  /** MIDI instrument info cache struct. */
134  typedef struct _lscp_midi_instrument_info_t  typedef struct _lscp_midi_instrument_info_t
135  {  {
136      char *           name;          char *           name;
137      char *           engine_name;          char *           engine_name;
138      char *           instrument_file;          char *           instrument_file;
139      int              instrument_nr;          int              instrument_nr;
140      char *           instrument_name;          char *           instrument_name;
141      lscp_load_mode_t load_mode;          lscp_load_mode_t load_mode;
142      float            volume;          float            volume;
143    
144  } lscp_midi_instrument_info_t;  } lscp_midi_instrument_info_t;
145    
146    
147    /** MIDI instrument map mode. */
148    typedef enum _lscp_midi_map_mode_t
149    {
150            LSCP_MIDI_MAP_NONE = -1,
151            LSCP_MIDI_MAP_DEFAULT = -2,
152            LSCP_MIDI_MAP_ALL = -3
153    
154    } lscp_midi_map_mode_t;
155    
156    
157  //-------------------------------------------------------------------------  //-------------------------------------------------------------------------
158  // Client socket main structure.  // Client socket main structure.
159    
# Line 140  typedef struct _lscp_client_t lscp_clien Line 163  typedef struct _lscp_client_t lscp_clien
163  /** Client event callback procedure prototype. */  /** Client event callback procedure prototype. */
164  typedef lscp_status_t (*lscp_client_proc_t)  typedef lscp_status_t (*lscp_client_proc_t)
165  (  (
166      struct _lscp_client_t *pClient,          struct _lscp_client_t *pClient,
167      lscp_event_t event,          lscp_event_t event,
168      const char *pchData,          const char *pchData,
169      int cchData,          int cchData,
170      void *pvData          void *pvData
171  );  );
172    
173  //-------------------------------------------------------------------------  //-------------------------------------------------------------------------
174  // Client versioning teller fuunction.  // Client versioning teller function.
175    
176  const char *            lscp_client_package             (void);  const char *            lscp_client_package             (void);
177  const char *            lscp_client_version             (void);  const char *            lscp_client_version             (void);
# Line 210  lscp_status_t           lscp_set_channel Line 233  lscp_status_t           lscp_set_channel
233  lscp_status_t           lscp_set_channel_midi_device    (lscp_client_t *pClient, int iSamplerChannel, int iMidiDevice);  lscp_status_t           lscp_set_channel_midi_device    (lscp_client_t *pClient, int iSamplerChannel, int iMidiDevice);
234  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);
235  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);
236    lscp_status_t           lscp_set_channel_midi_map       (lscp_client_t *pClient, int iSamplerChannel, int iMidiMap);
237    
238  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);
239    
240  lscp_status_t           lscp_set_channel_mute           (lscp_client_t *pClient, int iSamplerChannel, int iMute);  lscp_status_t           lscp_set_channel_mute           (lscp_client_t *pClient, int iSamplerChannel, int iMute);
# Line 224  lscp_server_info_t *    lscp_get_server_ Line 249  lscp_server_info_t *    lscp_get_server_
249  int                     lscp_get_total_voice_count      (lscp_client_t *pClient);  int                     lscp_get_total_voice_count      (lscp_client_t *pClient);
250  int                     lscp_get_total_voice_count_max  (lscp_client_t *pClient);  int                     lscp_get_total_voice_count_max  (lscp_client_t *pClient);
251    
252    float                   lscp_get_volume                 (lscp_client_t *pClient);
253    lscp_status_t           lscp_set_volume                 (lscp_client_t *pClient, float fVolume);
254    
255    int                     lscp_get_voices                 (lscp_client_t *pClient);
256    lscp_status_t           lscp_set_voices                 (lscp_client_t *pClient, int iMaxVoices);
257    
258    int                     lscp_get_streams                (lscp_client_t *pClient);
259    lscp_status_t           lscp_set_streams                (lscp_client_t *pClient, int iMaxStreams);
260    
261    //-------------------------------------------------------------------------
262    // Effect sends control functions.
263    
264    int                     lscp_create_fxsend              (lscp_client_t *pClient, int iSamplerChannel, int iMidiController, const char *pszFxName);
265    lscp_status_t           lscp_destroy_fxsend             (lscp_client_t *pClient, int iSamplerChannel, int iFxSend);
266    
267    int                     lscp_get_fxsends                (lscp_client_t *pClient, int iSamplerChannel);
268    int *                   lscp_list_fxsends               (lscp_client_t *pClient, int iSamplerChannel);
269    
270    lscp_fxsend_info_t *    lscp_get_fxsend_info            (lscp_client_t *pClient, int iSamplerChannel, int iFxSend);
271    
272    lscp_status_t           lscp_set_fxsend_name            (lscp_client_t *pClient, int iSamplerChannel, int iFxSend, const char *pszFxName);
273    lscp_status_t           lscp_set_fxsend_audio_channel   (lscp_client_t *pClient, int iSamplerChannel, int iFxSend, int iAudioSrc, int iAudioDst);
274    lscp_status_t           lscp_set_fxsend_midi_controller (lscp_client_t *pClient, int iSamplerChannel, int iFxSend, int iMidiController);
275    lscp_status_t           lscp_set_fxsend_level           (lscp_client_t *pClient, int iSamplerChannel, int iFxSend, float fLevel);
276    
277  //-------------------------------------------------------------------------  //-------------------------------------------------------------------------
278  // MIDI instrument mapping control functions.  // MIDI instrument mapping control functions.
279    
280    int                     lscp_add_midi_instrument_map    (lscp_client_t *pClient, const char *pszMapName);
281    lscp_status_t           lscp_remove_midi_instrument_map (lscp_client_t *pClient, int iMidiMap);
282    
283    int                     lscp_get_midi_instrument_maps   (lscp_client_t *pClient);
284    int *                   lscp_list_midi_instrument_maps  (lscp_client_t *pClient);
285    
286    const char *            lscp_get_midi_instrument_map_name (lscp_client_t *pClient, int iMidiMap);
287    lscp_status_t           lscp_set_midi_instrument_map_name (lscp_client_t *pClient, int iMidiMap, const char *pszMapName);
288    
289  lscp_status_t           lscp_map_midi_instrument        (lscp_client_t *pClient, lscp_midi_instrument_t *pMidiInstr, const char *pszEngineName, const char *pszFileName, int iInstrIndex, float fVolume, lscp_load_mode_t load_mode, const char *pszName);  lscp_status_t           lscp_map_midi_instrument        (lscp_client_t *pClient, lscp_midi_instrument_t *pMidiInstr, const char *pszEngineName, const char *pszFileName, int iInstrIndex, float fVolume, lscp_load_mode_t load_mode, const char *pszName);
290  lscp_status_t           lscp_unmap_midi_instrument      (lscp_client_t *pClient, lscp_midi_instrument_t *pMidiInstr);  lscp_status_t           lscp_unmap_midi_instrument      (lscp_client_t *pClient, lscp_midi_instrument_t *pMidiInstr);
291    
292  int                     lscp_get_midi_instruments       (lscp_client_t *pClient);  int                     lscp_get_midi_instruments       (lscp_client_t *pClient, int iMidiMap);
293    lscp_midi_instrument_t *lscp_list_midi_instruments      (lscp_client_t *pClient, int iMidiMap);
294    
295  lscp_midi_instrument_info_t *lscp_get_midi_instrument_info(lscp_client_t *pClient, lscp_midi_instrument_t *pMidiInstr);  lscp_midi_instrument_info_t *lscp_get_midi_instrument_info(lscp_client_t *pClient, lscp_midi_instrument_t *pMidiInstr);
296    
297  lscp_status_t           lscp_clear_midi_instruments     (lscp_client_t *pClient);  lscp_status_t           lscp_clear_midi_instruments     (lscp_client_t *pClient, int iMidiMap);
298    
299    //-------------------------------------------------------------------------
300    // Instrument editor functions.
301    
302    lscp_status_t           lscp_edit_channel_instrument    (lscp_client_t *pClient, int iSamplerChannel);
303    
304  #if defined(__cplusplus)  #if defined(__cplusplus)
305  }  }

Legend:
Removed from v.946  
changed lines
  Added in v.1802

  ViewVC Help
Powered by ViewVC