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 |
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. |
57 |
char ** audio_routing; |
char ** audio_routing; |
58 |
char * instrument_file; |
char * instrument_file; |
59 |
int instrument_nr; |
int instrument_nr; |
60 |
|
char * instrument_name; |
61 |
int instrument_status; |
int instrument_status; |
62 |
int midi_device; |
int midi_device; |
63 |
int midi_port; |
int midi_port; |
85 |
} lscp_usage_t; |
} lscp_usage_t; |
86 |
|
|
87 |
|
|
|
/** Subscribable event notification bit-wise flags. */ |
|
|
typedef enum _lscp_event_t |
|
|
{ |
|
|
LSCP_EVENT_NONE = 0x0000, |
|
|
LSCP_EVENT_CHANNELS = 0x0001, |
|
|
LSCP_EVENT_VOICE_COUNT = 0x0002, |
|
|
LSCP_EVENT_STREAM_COUNT = 0x0004, |
|
|
LSCP_EVENT_BUFFER_FILL = 0x0008, |
|
|
LSCP_EVENT_CHANNEL_INFO = 0x0010, |
|
|
LSCP_EVENT_MISCELLANEOUS = 0x1000 |
|
|
|
|
|
} lscp_event_t; |
|
|
|
|
|
|
|
88 |
//------------------------------------------------------------------------- |
//------------------------------------------------------------------------- |
89 |
// Client socket main structure. |
// Client socket main structure. |
90 |
|
|
96 |
( |
( |
97 |
struct _lscp_client_t *pClient, |
struct _lscp_client_t *pClient, |
98 |
lscp_event_t event, |
lscp_event_t event, |
99 |
const char *pchBuffer, |
const char *pchData, |
100 |
int cchBuffer, |
int cchData, |
101 |
void *pvData |
void *pvData |
102 |
); |
); |
103 |
|
|
131 |
lscp_status_t lscp_client_subscribe (lscp_client_t *pClient, lscp_event_t events); |
lscp_status_t lscp_client_subscribe (lscp_client_t *pClient, lscp_event_t events); |
132 |
lscp_status_t lscp_client_unsubscribe (lscp_client_t *pClient, lscp_event_t events); |
lscp_status_t lscp_client_unsubscribe (lscp_client_t *pClient, lscp_event_t events); |
133 |
|
|
134 |
lscp_event_t lscp_client_events (lscp_client_t *pClient); |
lscp_event_t lscp_client_get_events (lscp_client_t *pClient); |
135 |
|
|
136 |
//------------------------------------------------------------------------- |
//------------------------------------------------------------------------- |
137 |
// Client command protocol functions. |
// Client command protocol functions. |
150 |
|
|
151 |
int lscp_get_channel_voice_count (lscp_client_t *pClient, int iSamplerChannel); |
int lscp_get_channel_voice_count (lscp_client_t *pClient, int iSamplerChannel); |
152 |
int lscp_get_channel_stream_count (lscp_client_t *pClient, int iSamplerChannel); |
int lscp_get_channel_stream_count (lscp_client_t *pClient, int iSamplerChannel); |
153 |
|
int lscp_get_channel_stream_usage (lscp_client_t *pClient, int iSamplerChannel); |
154 |
|
|
155 |
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); |
156 |
|
|
166 |
|
|
167 |
lscp_status_t lscp_reset_channel (lscp_client_t *pClient, int iSamplerChannel); |
lscp_status_t lscp_reset_channel (lscp_client_t *pClient, int iSamplerChannel); |
168 |
|
|
169 |
|
lscp_status_t lscp_reset_sampler (lscp_client_t *pClient); |
170 |
|
|
171 |
#if defined(__cplusplus) |
#if defined(__cplusplus) |
172 |
} |
} |