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 |
|
int instrument_status; |
61 |
int midi_device; |
int midi_device; |
62 |
int midi_port; |
int midi_port; |
63 |
int midi_channel; |
int midi_channel; |
90 |
/** Client opaque descriptor struct. */ |
/** Client opaque descriptor struct. */ |
91 |
typedef struct _lscp_client_t lscp_client_t; |
typedef struct _lscp_client_t lscp_client_t; |
92 |
|
|
93 |
/** Client callback procedure prototype. */ |
/** Client event callback procedure prototype. */ |
94 |
typedef lscp_status_t (*lscp_client_proc_t) |
typedef lscp_status_t (*lscp_client_proc_t) |
95 |
( |
( |
96 |
struct _lscp_client_t *pClient, |
struct _lscp_client_t *pClient, |
97 |
const char *pchBuffer, |
lscp_event_t event, |
98 |
int cchBuffer, |
const char *pchData, |
99 |
|
int cchData, |
100 |
void *pvData |
void *pvData |
101 |
); |
); |
102 |
|
|
127 |
//------------------------------------------------------------------------- |
//------------------------------------------------------------------------- |
128 |
// Client registration protocol functions. |
// Client registration protocol functions. |
129 |
|
|
130 |
lscp_status_t lscp_client_subscribe (lscp_client_t *pClient); |
lscp_status_t lscp_client_subscribe (lscp_client_t *pClient, lscp_event_t events); |
131 |
lscp_status_t lscp_client_unsubscribe (lscp_client_t *pClient); |
lscp_status_t lscp_client_unsubscribe (lscp_client_t *pClient, lscp_event_t events); |
132 |
|
|
133 |
|
lscp_event_t lscp_client_get_events (lscp_client_t *pClient); |
134 |
|
|
135 |
//------------------------------------------------------------------------- |
//------------------------------------------------------------------------- |
136 |
// Client command protocol functions. |
// Client command protocol functions. |
137 |
|
|
138 |
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); |
139 |
|
lscp_status_t lscp_load_instrument_non_modal (lscp_client_t *pClient, const char *pszFileName, int iInstrIndex, int iSamplerChannel); |
140 |
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); |
141 |
int lscp_get_channels (lscp_client_t *pClient); |
int lscp_get_channels (lscp_client_t *pClient); |
142 |
|
int * lscp_list_channels (lscp_client_t *pClient); |
143 |
int lscp_add_channel (lscp_client_t *pClient); |
int lscp_add_channel (lscp_client_t *pClient); |
144 |
lscp_status_t lscp_remove_channel (lscp_client_t *pClient, int iSamplerChannel); |
lscp_status_t lscp_remove_channel (lscp_client_t *pClient, int iSamplerChannel); |
145 |
const char ** lscp_get_available_engines (lscp_client_t *pClient); |
const char ** lscp_get_available_engines (lscp_client_t *pClient); |
149 |
|
|
150 |
int lscp_get_channel_voice_count (lscp_client_t *pClient, int iSamplerChannel); |
int lscp_get_channel_voice_count (lscp_client_t *pClient, int iSamplerChannel); |
151 |
int lscp_get_channel_stream_count (lscp_client_t *pClient, int iSamplerChannel); |
int lscp_get_channel_stream_count (lscp_client_t *pClient, int iSamplerChannel); |
152 |
|
int lscp_get_channel_stream_usage (lscp_client_t *pClient, int iSamplerChannel); |
153 |
|
|
154 |
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); |
155 |
|
|
156 |
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); |
157 |
|
lscp_status_t lscp_set_channel_audio_device (lscp_client_t *pClient, int iSamplerChannel, int iAudioDevice); |
158 |
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); |
159 |
|
|
160 |
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); |
161 |
|
lscp_status_t lscp_set_channel_midi_device (lscp_client_t *pClient, int iSamplerChannel, int iMidiDevice); |
162 |
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); |
163 |
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); |
164 |
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); |
165 |
|
|
166 |
lscp_status_t lscp_reset_channel (lscp_client_t *pClient, int iSamplerChannel); |
lscp_status_t lscp_reset_channel (lscp_client_t *pClient, int iSamplerChannel); |
167 |
|
|
168 |
|
lscp_status_t lscp_reset_sampler (lscp_client_t *pClient); |
169 |
|
|
170 |
#if defined(__cplusplus) |
#if defined(__cplusplus) |
171 |
} |
} |