/[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 869 by capela, Thu Jun 1 08:32:16 2006 UTC revision 977 by capela, Sun Dec 17 15:08:35 2006 UTC
# Line 14  Line 14 
14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15     Lesser General Public License for more details.     Lesser General Public License for more details.
16    
17     You should have received a copy of the GNU Lesser General Public     You should have received a copy of the GNU General Public License along
18     License along with this library; 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 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;          char **       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    /** MIDI instrument parameter struct. */
102    typedef struct _lscp_midi_instrument_t
103    {
104            int map;
105            int bank;
106            int prog;
107    
108    } lscp_midi_instrument_t;
109    
110    
111    /** MIDI instrument load mode. */
112    typedef enum _lscp_load_mode_t
113    {
114            LSCP_LOAD_DEFAULT = 0,
115            LSCP_LOAD_ON_DEMAND,
116            LSCP_LOAD_ON_DEMAND_HOLD,
117            LSCP_LOAD_PERSISTENT
118    
119    } lscp_load_mode_t;
120    
121    
122    /** MIDI instrument info cache struct. */
123    typedef struct _lscp_midi_instrument_info_t
124    {
125            char *           name;
126            char *           engine_name;
127            char *           instrument_file;
128            int              instrument_nr;
129            char *           instrument_name;
130            lscp_load_mode_t load_mode;
131            float            volume;
132    
133    } lscp_midi_instrument_info_t;
134    
135    
136    /** MIDI instrument map mode. */
137    typedef enum _lscp_midi_map_mode_t
138    {
139            LSCP_MIDI_MAP_NONE = -1,
140            LSCP_MIDI_MAP_DEFAULT = -2,
141            LSCP_MIDI_MAP_ALL = -3
142    
143    } lscp_midi_map_mode_t;
144    
145    
146  //-------------------------------------------------------------------------  //-------------------------------------------------------------------------
147  // Client socket main structure.  // Client socket main structure.
148    
# Line 105  typedef struct _lscp_client_t lscp_clien Line 152  typedef struct _lscp_client_t lscp_clien
152  /** Client event callback procedure prototype. */  /** Client event callback procedure prototype. */
153  typedef lscp_status_t (*lscp_client_proc_t)  typedef lscp_status_t (*lscp_client_proc_t)
154  (  (
155      struct _lscp_client_t *pClient,          struct _lscp_client_t *pClient,
156      lscp_event_t event,          lscp_event_t event,
157      const char *pchData,          const char *pchData,
158      int cchData,          int cchData,
159      void *pvData          void *pvData
160  );  );
161    
162  //-------------------------------------------------------------------------  //-------------------------------------------------------------------------
163  // Client versioning teller fuunction.  // Client versioning teller function.
164    
165  const char *            lscp_client_package             (void);  const char *            lscp_client_package             (void);
166  const char *            lscp_client_version             (void);  const char *            lscp_client_version             (void);
# Line 175  lscp_status_t           lscp_set_channel Line 222  lscp_status_t           lscp_set_channel
222  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);
223  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);
224  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);
225    lscp_status_t           lscp_set_channel_midi_map       (lscp_client_t *pClient, int iSamplerChannel, int iMidiMap);
226    
227  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);
228    
229  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 186  lscp_status_t           lscp_reset_sampl Line 235  lscp_status_t           lscp_reset_sampl
235    
236  lscp_server_info_t *    lscp_get_server_info            (lscp_client_t *pClient);  lscp_server_info_t *    lscp_get_server_info            (lscp_client_t *pClient);
237    
238    int                     lscp_get_total_voice_count      (lscp_client_t *pClient);
239    int                     lscp_get_total_voice_count_max  (lscp_client_t *pClient);
240    
241    //-------------------------------------------------------------------------
242    // MIDI instrument mapping control functions.
243    
244    int                     lscp_add_midi_instrument_map    (lscp_client_t *pClient, const char *pszMapName);
245    lscp_status_t           lscp_remove_midi_instrument_map (lscp_client_t *pClient, int iMidiMap);
246    
247    int                     lscp_get_midi_instrument_maps   (lscp_client_t *pClient);
248    int *                   lscp_list_midi_instrument_maps  (lscp_client_t *pClient);
249    
250    const char *            lscp_get_midi_instrument_map_name (lscp_client_t *pClient, int iMidiMap);
251    lscp_status_t           lscp_set_midi_instrument_map_name (lscp_client_t *pClient, int iMidiMap, const char *pszMapName);
252    
253    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);
254    lscp_status_t           lscp_unmap_midi_instrument      (lscp_client_t *pClient, lscp_midi_instrument_t *pMidiInstr);
255    
256    int                     lscp_get_midi_instruments       (lscp_client_t *pClient, int iMidiMap);
257    lscp_midi_instrument_t *lscp_list_midi_instruments      (lscp_client_t *pClient, int iMidiMap);
258    
259    lscp_midi_instrument_info_t *lscp_get_midi_instrument_info(lscp_client_t *pClient, lscp_midi_instrument_t *pMidiInstr);
260    
261    lscp_status_t           lscp_clear_midi_instruments     (lscp_client_t *pClient, int iMidiMap);
262    
263    
264  #if defined(__cplusplus)  #if defined(__cplusplus)
265  }  }
266  #endif  #endif

Legend:
Removed from v.869  
changed lines
  Added in v.977

  ViewVC Help
Powered by ViewVC