83 |
</pre>The client callback function must have the following prototype (@ref lscp_client_proc_t): |
</pre>The client callback function must have the following prototype (@ref lscp_client_proc_t): |
84 |
|
|
85 |
- @ref lscp_status_t <i>client_callback</i> ( @ref lscp_client_t *client, |
- @ref lscp_status_t <i>client_callback</i> ( @ref lscp_client_t *client, |
86 |
const char *buf, int buflen, void *client_data ); |
@ref lscp_event_t event, const char *buf, int buflen, void *client_data ); |
87 |
|
|
88 |
where buf will be a pointer to the event text which is buflen bytes in |
where event is the specific event type notification, buf will be a pointer to |
89 |
length; client_data is exactly the same value given on @ref lscp_client_create |
the event text which is buflen bytes in length; client_data is exactly the same |
90 |
call. |
value given on @ref lscp_client_create call. |
91 |
|
|
92 |
This callback function is the place to handle all server notifications and |
This callback function is the place to handle all server notifications and |
93 |
will be only called if the client is currently subscribed. No response |
will be only called if the client is currently subscribed. No response |
94 |
from the client is expected while processing an event within |
from the client is expected while processing an event within |
95 |
client_callback. |
client_callback. |
96 |
|
|
97 |
A client subscribes to receive notifications by calling:<pre> |
A client subscribes to receive event notifications by calling:<pre> |
98 |
|
|
99 |
@ref lscp_client_subscribe (client); |
@ref lscp_client_subscribe (client, events); |
100 |
|
|
101 |
</pre>after which it will start receiving events by means of the supplied |
</pre>after which it will start receiving events by means of the supplied |
102 |
client_callback function. To unsubscribe and stop this deliverance:<pre> |
client_callback function. To unsubscribe and stop this deliverance:<pre> |
103 |
|
|
104 |
@ref lscp_client_unsubscribe (client); |
@ref lscp_client_unsubscribe (client, events); |
105 |
|
|
106 |
</pre>Finally, when a client is about to quit, the proper terminator is in order:<pre> |
</pre>Finally, when a client is about to quit, the proper terminator is in order:<pre> |
107 |
|
|
116 |
@ref lscp_get_channels (client); |
@ref lscp_get_channels (client); |
117 |
@ref lscp_add_channel (client); |
@ref lscp_add_channel (client); |
118 |
@ref lscp_load_engine (client, engine_name, channel); |
@ref lscp_load_engine (client, engine_name, channel); |
119 |
@ref lscp_set_channel_audio_channel (client, channel, audio_channel); |
@ref lscp_set_channel_audio_device (client, channel, audio_device); |
120 |
@ref lscp_set_channel_audio_type (client, channel, audio_type); |
@ref lscp_set_channel_audio_type (client, channel, audio_type); |
121 |
@ref lscp_set_channel_midi_channel (client, channel, midi_channel); |
@ref lscp_set_channel_audio_channel (client, channel, audio_in, audio_out); |
122 |
@ref lscp_set_channel_midi_port (client, channel, midi_port); |
@ref lscp_set_channel_midi_device (client, channel, midi_device); |
123 |
@ref lscp_set_channel_midi_type (client, channel, midi_type); |
@ref lscp_set_channel_midi_type (client, channel, midi_type); |
124 |
|
@ref lscp_set_channel_midi_port (client, channel, midi_port); |
125 |
|
@ref lscp_set_channel_midi_channel (client, channel, midi_channel); |
126 |
@ref lscp_set_channel_volume (client, channel, volume); |
@ref lscp_set_channel_volume (client, channel, volume); |
127 |
@ref lscp_load_instrument (client, file_name, instr_index, channel); |
@ref lscp_load_instrument (client, file_name, instr_index, channel); |
128 |
|
@ref lscp_load_instrument_non_modal (client, file_name, instr_index, channel); |
129 |
@ref lscp_get_channel_info (client, channel); |
@ref lscp_get_channel_info (client, channel); |
130 |
@ref lscp_get_channel_voice_count (client, channel); |
@ref lscp_get_channel_voice_count (client, channel); |
131 |
@ref lscp_get_channel_stream_count (client, channel); |
@ref lscp_get_channel_stream_count (client, channel); |