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 |
|
|
48 |
} lscp_server_info_t; |
} lscp_server_info_t; |
49 |
|
|
51 |
/** Engine info cache struct. */ |
/** Engine info cache struct. */ |
52 |
typedef struct _lscp_engine_info_t |
typedef struct _lscp_engine_info_t |
53 |
{ |
{ |
54 |
char * description; |
char * description; |
55 |
char * version; |
char * version; |
56 |
|
|
57 |
} lscp_engine_info_t; |
} lscp_engine_info_t; |
58 |
|
|
60 |
/** Channel info cache struct. */ |
/** Channel info cache struct. */ |
61 |
typedef struct _lscp_channel_info_t |
typedef struct _lscp_channel_info_t |
62 |
{ |
{ |
63 |
char * engine_name; |
char * engine_name; |
64 |
int audio_device; |
int audio_device; |
65 |
int audio_channels; |
int audio_channels; |
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; |
char * instrument_name; |
70 |
int instrument_status; |
int instrument_status; |
71 |
int midi_device; |
int midi_device; |
72 |
int midi_port; |
int midi_port; |
73 |
int midi_channel; |
int midi_channel; |
74 |
float volume; |
int midi_map; |
75 |
int mute; |
float volume; |
76 |
int solo; |
int mute; |
77 |
|
int solo; |
78 |
|
|
79 |
} lscp_channel_info_t; |
} lscp_channel_info_t; |
80 |
|
|
82 |
/** Buffer fill cache struct. */ |
/** Buffer fill cache struct. */ |
83 |
typedef struct _lscp_buffer_fill_t |
typedef struct _lscp_buffer_fill_t |
84 |
{ |
{ |
85 |
unsigned int stream_id; |
unsigned int stream_id; |
86 |
unsigned long stream_usage; |
unsigned long stream_usage; |
87 |
|
|
88 |
} lscp_buffer_fill_t; |
} lscp_buffer_fill_t; |
89 |
|
|
91 |
/** Buffer fill stream usage types. */ |
/** Buffer fill stream usage types. */ |
92 |
typedef enum _lscp_usage_t |
typedef enum _lscp_usage_t |
93 |
{ |
{ |
94 |
LSCP_USAGE_BYTES = 0, |
LSCP_USAGE_BYTES = 0, |
95 |
LSCP_USAGE_PERCENTAGE |
LSCP_USAGE_PERCENTAGE |
96 |
|
|
97 |
} lscp_usage_t; |
} lscp_usage_t; |
98 |
|
|
100 |
/** MIDI instrument parameter struct. */ |
/** MIDI instrument parameter struct. */ |
101 |
typedef struct _lscp_midi_instrument_t |
typedef struct _lscp_midi_instrument_t |
102 |
{ |
{ |
103 |
int bank_msb; |
int map; |
104 |
int bank_lsb; |
int bank; |
105 |
int program; |
int prog; |
106 |
|
|
107 |
} lscp_midi_instrument_t; |
} lscp_midi_instrument_t; |
108 |
|
|
110 |
/** MIDI instrument load mode. */ |
/** MIDI instrument load mode. */ |
111 |
typedef enum _lscp_load_mode_t |
typedef enum _lscp_load_mode_t |
112 |
{ |
{ |
113 |
LSCP_LOAD_DEFAULT = 0, |
LSCP_LOAD_DEFAULT = 0, |
114 |
LSCP_LOAD_ON_DEMAND, |
LSCP_LOAD_ON_DEMAND, |
115 |
LSCP_LOAD_ON_DEMAND_HOLD, |
LSCP_LOAD_ON_DEMAND_HOLD, |
116 |
LSCP_LOAD_PERSISTENT |
LSCP_LOAD_PERSISTENT |
117 |
|
|
118 |
} lscp_load_mode_t; |
} lscp_load_mode_t; |
119 |
|
|
121 |
/** MIDI instrument info cache struct. */ |
/** MIDI instrument info cache struct. */ |
122 |
typedef struct _lscp_midi_instrument_info_t |
typedef struct _lscp_midi_instrument_info_t |
123 |
{ |
{ |
124 |
char * name; |
char * name; |
125 |
char * engine_name; |
char * engine_name; |
126 |
char * instrument_file; |
char * instrument_file; |
127 |
int instrument_nr; |
int instrument_nr; |
128 |
char * instrument_name; |
char * instrument_name; |
129 |
lscp_load_mode_t load_mode; |
lscp_load_mode_t load_mode; |
130 |
float volume; |
float volume; |
131 |
|
|
132 |
} lscp_midi_instrument_info_t; |
} lscp_midi_instrument_info_t; |
133 |
|
|
134 |
|
|
135 |
|
/** MIDI instrument map mode. */ |
136 |
|
typedef enum _lscp_midi_map_mode_t |
137 |
|
{ |
138 |
|
LSCP_MIDI_MAP_NONE = -1, |
139 |
|
LSCP_MIDI_MAP_DEFAULT = -2, |
140 |
|
LSCP_MIDI_MAP_ALL = -3 |
141 |
|
|
142 |
|
} lscp_midi_map_mode_t; |
143 |
|
|
144 |
|
|
145 |
//------------------------------------------------------------------------- |
//------------------------------------------------------------------------- |
146 |
// Client socket main structure. |
// Client socket main structure. |
147 |
|
|
151 |
/** Client event callback procedure prototype. */ |
/** Client event callback procedure prototype. */ |
152 |
typedef lscp_status_t (*lscp_client_proc_t) |
typedef lscp_status_t (*lscp_client_proc_t) |
153 |
( |
( |
154 |
struct _lscp_client_t *pClient, |
struct _lscp_client_t *pClient, |
155 |
lscp_event_t event, |
lscp_event_t event, |
156 |
const char *pchData, |
const char *pchData, |
157 |
int cchData, |
int cchData, |
158 |
void *pvData |
void *pvData |
159 |
); |
); |
160 |
|
|
161 |
//------------------------------------------------------------------------- |
//------------------------------------------------------------------------- |
221 |
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); |
222 |
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); |
223 |
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); |
224 |
|
lscp_status_t lscp_set_channel_midi_map (lscp_client_t *pClient, int iSamplerChannel, int iMidiMap); |
225 |
|
|
226 |
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); |
227 |
|
|
228 |
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); |
240 |
//------------------------------------------------------------------------- |
//------------------------------------------------------------------------- |
241 |
// MIDI instrument mapping control functions. |
// MIDI instrument mapping control functions. |
242 |
|
|
243 |
|
int lscp_add_midi_instrument_map (lscp_client_t *pClient, const char *pszMapName); |
244 |
|
lscp_status_t lscp_remove_midi_instrument_map (lscp_client_t *pClient, int iMidiMap); |
245 |
|
|
246 |
|
int lscp_get_midi_instrument_maps (lscp_client_t *pClient); |
247 |
|
int * lscp_list_midi_instrument_maps (lscp_client_t *pClient); |
248 |
|
|
249 |
|
const char * lscp_get_midi_instrument_map_name (lscp_client_t *pClient, int iMidiMap); |
250 |
|
lscp_status_t lscp_set_midi_instrument_map_name (lscp_client_t *pClient, int iMidiMap, const char *pszMapName); |
251 |
|
|
252 |
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); |
253 |
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); |
254 |
|
|
255 |
int lscp_get_midi_instruments (lscp_client_t *pClient); |
int lscp_get_midi_instruments (lscp_client_t *pClient, int iMidiMap); |
256 |
lscp_midi_instrument_t *lscp_list_midi_instruments (lscp_client_t *pClient); |
lscp_midi_instrument_t *lscp_list_midi_instruments (lscp_client_t *pClient, int iMidiMap); |
257 |
|
|
258 |
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); |
259 |
|
|
260 |
lscp_status_t lscp_clear_midi_instruments (lscp_client_t *pClient); |
lscp_status_t lscp_clear_midi_instruments (lscp_client_t *pClient, int iMidiMap); |
261 |
|
|
262 |
|
|
263 |
#if defined(__cplusplus) |
#if defined(__cplusplus) |