263 |
// Audio driver control functions. |
// Audio driver control functions. |
264 |
|
|
265 |
/** |
/** |
266 |
* Getting all available audio output drivers. |
* Getting all available audio output driver count. |
267 |
* GET AVAILABLE_AUDIO_OUTPUT_DRIVERS |
* GET AVAILABLE_AUDIO_OUTPUT_DRIVERS |
268 |
* |
* |
269 |
* @param pClient Pointer to client instance structure. |
* @param pClient Pointer to client instance structure. |
270 |
* |
* |
271 |
|
* @returns The current total number of audio output drivers on success, |
272 |
|
* -1 otherwise. |
273 |
|
*/ |
274 |
|
int lscp_get_available_audio_drivers ( lscp_client_t *pClient ) |
275 |
|
{ |
276 |
|
int iAudioDrivers = -1; |
277 |
|
|
278 |
|
// Lock this section up. |
279 |
|
lscp_mutex_lock(pClient->mutex); |
280 |
|
|
281 |
|
if (lscp_client_call(pClient, "GET AVAILABLE_AUDIO_OUTPUT_DRIVERS\r\n") == LSCP_OK) |
282 |
|
iAudioDrivers = atoi(lscp_client_get_result(pClient)); |
283 |
|
|
284 |
|
// Unlock this section down. |
285 |
|
lscp_mutex_unlock(pClient->mutex); |
286 |
|
|
287 |
|
return iAudioDrivers; |
288 |
|
} |
289 |
|
|
290 |
|
|
291 |
|
/** |
292 |
|
* Getting all available audio output drivers. |
293 |
|
* LIST AVAILABLE_AUDIO_OUTPUT_DRIVERS |
294 |
|
* |
295 |
|
* @param pClient Pointer to client instance structure. |
296 |
|
* |
297 |
* @returns A NULL terminated array of audio output driver type |
* @returns A NULL terminated array of audio output driver type |
298 |
* name strings, or NULL in case of failure. |
* name strings, or NULL in case of failure. |
299 |
*/ |
*/ |
300 |
const char ** lscp_get_available_audio_drivers ( lscp_client_t *pClient ) |
const char ** lscp_list_available_audio_drivers ( lscp_client_t *pClient ) |
301 |
{ |
{ |
302 |
const char *pszSeps = ","; |
const char *pszSeps = ","; |
303 |
|
|
309 |
pClient->audio_drivers = NULL; |
pClient->audio_drivers = NULL; |
310 |
} |
} |
311 |
|
|
312 |
if (lscp_client_call(pClient, "GET AVAILABLE_AUDIO_OUTPUT_DRIVERS\r\n") == LSCP_OK) |
if (lscp_client_call(pClient, "LIST AVAILABLE_AUDIO_OUTPUT_DRIVERS\r\n") == LSCP_OK) |
313 |
pClient->audio_drivers = lscp_szsplit_create(lscp_client_get_result(pClient), pszSeps); |
pClient->audio_drivers = lscp_szsplit_create(lscp_client_get_result(pClient), pszSeps); |
314 |
|
|
315 |
// Unlock this section down. |
// Unlock this section down. |
632 |
// MIDI driver control functions. |
// MIDI driver control functions. |
633 |
|
|
634 |
/** |
/** |
635 |
* Getting all available MIDI input drivers. |
* Getting all available MIDI input driver count. |
636 |
* GET AVAILABLE_MIDI_INPUT_DRIVERS |
* GET AVAILABLE_MIDI_INPUT_DRIVERS |
637 |
* |
* |
638 |
* @param pClient Pointer to client instance structure. |
* @param pClient Pointer to client instance structure. |
639 |
* |
* |
640 |
|
* @returns The current total number of MIDI input drivers on success, |
641 |
|
* -1 otherwise. |
642 |
|
*/ |
643 |
|
int lscp_get_available_midi_drivers ( lscp_client_t *pClient ) |
644 |
|
{ |
645 |
|
int iMidiDrivers = -1; |
646 |
|
|
647 |
|
// Lock this section up. |
648 |
|
lscp_mutex_lock(pClient->mutex); |
649 |
|
|
650 |
|
if (lscp_client_call(pClient, "GET AVAILABLE_MIDI_INPUT_DRIVERS\r\n") == LSCP_OK) |
651 |
|
iMidiDrivers = atoi(lscp_client_get_result(pClient)); |
652 |
|
|
653 |
|
// Unlock this section up. |
654 |
|
lscp_mutex_unlock(pClient->mutex); |
655 |
|
|
656 |
|
return iMidiDrivers; |
657 |
|
} |
658 |
|
|
659 |
|
|
660 |
|
/** |
661 |
|
* Getting all available MIDI input drivers. |
662 |
|
* LIST AVAILABLE_MIDI_INPUT_DRIVERS |
663 |
|
* |
664 |
|
* @param pClient Pointer to client instance structure. |
665 |
|
* |
666 |
* @returns A NULL terminated array of MIDI input driver type |
* @returns A NULL terminated array of MIDI input driver type |
667 |
* name strings, or NULL in case of failure. |
* name strings, or NULL in case of failure. |
668 |
*/ |
*/ |
669 |
const char** lscp_get_available_midi_drivers ( lscp_client_t *pClient ) |
const char** lscp_list_available_midi_drivers ( lscp_client_t *pClient ) |
670 |
{ |
{ |
671 |
const char *pszSeps = ","; |
const char *pszSeps = ","; |
672 |
|
|
678 |
pClient->midi_drivers = NULL; |
pClient->midi_drivers = NULL; |
679 |
} |
} |
680 |
|
|
681 |
if (lscp_client_call(pClient, "GET AVAILABLE_MIDI_INPUT_DRIVERS\r\n") == LSCP_OK) |
if (lscp_client_call(pClient, "LIST AVAILABLE_MIDI_INPUT_DRIVERS\r\n") == LSCP_OK) |
682 |
pClient->midi_drivers = lscp_szsplit_create(lscp_client_get_result(pClient), pszSeps); |
pClient->midi_drivers = lscp_szsplit_create(lscp_client_get_result(pClient), pszSeps); |
683 |
|
|
684 |
// Unlock this section up. |
// Unlock this section up. |