liblscp  0.9.12
Data Structures | Typedefs | Enumerations | Functions
device.h File Reference
#include "lscp/client.h"

Go to the source code of this file.

Data Structures

struct  _lscp_param_t
 
struct  _lscp_param_info_t
 
struct  _lscp_driver_info_t
 
struct  _lscp_device_info_t
 
struct  _lscp_device_port_info_t
 

Typedefs

typedef enum _lscp_type_t lscp_type_t
 
typedef struct _lscp_param_t lscp_param_t
 
typedef struct _lscp_param_info_t lscp_param_info_t
 
typedef struct _lscp_driver_info_t lscp_driver_info_t
 
typedef struct _lscp_device_info_t lscp_device_info_t
 
typedef struct _lscp_device_port_info_t lscp_device_port_info_t
 

Enumerations

enum  _lscp_type_t {
  LSCP_TYPE_NONE = 0, LSCP_TYPE_BOOL, LSCP_TYPE_INT, LSCP_TYPE_FLOAT,
  LSCP_TYPE_STRING
}
 

Functions

int lscp_get_available_audio_drivers (lscp_client_t *pClient)
 
const char ** lscp_list_available_audio_drivers (lscp_client_t *pClient)
 
lscp_driver_info_tlscp_get_audio_driver_info (lscp_client_t *pClient, const char *pszAudioDriver)
 
lscp_param_info_tlscp_get_audio_driver_param_info (lscp_client_t *pClient, const char *pszAudioDriver, const char *pszParam, lscp_param_t *pDepList)
 
int lscp_create_audio_device (lscp_client_t *pClient, const char *pszAudioDriver, lscp_param_t *pParams)
 
lscp_status_t lscp_destroy_audio_device (lscp_client_t *pClient, int iAudioDevice)
 
int lscp_get_audio_devices (lscp_client_t *pClient)
 
int * lscp_list_audio_devices (lscp_client_t *pClient)
 
lscp_device_info_tlscp_get_audio_device_info (lscp_client_t *pClient, int iAudioDevice)
 
lscp_status_t lscp_set_audio_device_param (lscp_client_t *pClient, int iAudioDevice, lscp_param_t *pParam)
 
lscp_device_port_info_tlscp_get_audio_channel_info (lscp_client_t *pClient, int iAudioDevice, int iAudioChannel)
 
lscp_param_info_tlscp_get_audio_channel_param_info (lscp_client_t *pClient, int iAudioDevice, int iAudioChannel, const char *pszParam)
 
lscp_status_t lscp_set_audio_channel_param (lscp_client_t *pClient, int iAudioDevice, int iAudioChannel, lscp_param_t *pParam)
 
int lscp_get_available_midi_drivers (lscp_client_t *pClient)
 
const char ** lscp_list_available_midi_drivers (lscp_client_t *pClient)
 
lscp_driver_info_tlscp_get_midi_driver_info (lscp_client_t *pClient, const char *pszMidiDriver)
 
lscp_param_info_tlscp_get_midi_driver_param_info (lscp_client_t *pClient, const char *pszMidiDriver, const char *pszParam, lscp_param_t *pDepList)
 
int lscp_create_midi_device (lscp_client_t *pClient, const char *pszMidiDriver, lscp_param_t *pParams)
 
lscp_status_t lscp_destroy_midi_device (lscp_client_t *pClient, int iMidiDevice)
 
int lscp_get_midi_devices (lscp_client_t *pClient)
 
int * lscp_list_midi_devices (lscp_client_t *pClient)
 
lscp_device_info_tlscp_get_midi_device_info (lscp_client_t *pClient, int iMidiDevice)
 
lscp_status_t lscp_set_midi_device_param (lscp_client_t *pClient, int iMidiDevice, lscp_param_t *pParam)
 
lscp_device_port_info_tlscp_get_midi_port_info (lscp_client_t *pClient, int iMidiDevice, int iMidiPort)
 
lscp_param_info_tlscp_get_midi_port_param_info (lscp_client_t *pClient, int iMidiDevice, int iMidiPort, const char *pszParam)
 
lscp_status_t lscp_set_midi_port_param (lscp_client_t *pClient, int iMidiDevice, int iMidiPort, lscp_param_t *pParam)
 
const char * lscp_get_param_value (lscp_param_t *pParams, const char *pszParam)
 

Typedef Documentation

◆ lscp_device_info_t

Common device info cache struct.

◆ lscp_device_port_info_t

Common device channel/port info cache struct.

◆ lscp_driver_info_t

Common driver type info cache struct.

◆ lscp_param_info_t

Common parameter info cache struct.

◆ lscp_param_t

typedef struct _lscp_param_t lscp_param_t

Common and simple key/value pair parameter tuple.

◆ lscp_type_t

typedef enum _lscp_type_t lscp_type_t

Parameter value type.

Enumeration Type Documentation

◆ _lscp_type_t

Parameter value type.

Enumerator
LSCP_TYPE_NONE 
LSCP_TYPE_BOOL 
LSCP_TYPE_INT 
LSCP_TYPE_FLOAT 
LSCP_TYPE_STRING 

Function Documentation

◆ lscp_create_audio_device()

int lscp_create_audio_device ( lscp_client_t pClient,
const char *  pszAudioDriver,
lscp_param_t pParams 
)

Creating an audio output device. CREATE AUDIO_OUTPUT_DEVICE <audio-output-driver> [<params>]

Parameters
pClientPointer to client instance structure.
pszAudioDriverAudio driver type string (e.g. "ALSA").
pParamsPointer to specific parameter list.
Returns
The new audio device number identifier on success, or -1 in case of failure.

References LSCP_BUFSIZ, lscp_client_get_result(), lscp_mutex_lock, lscp_mutex_unlock, and LSCP_OK.

◆ lscp_create_midi_device()

int lscp_create_midi_device ( lscp_client_t pClient,
const char *  pszMidiDriver,
lscp_param_t pParams 
)

Creating a MIDI input device. CREATE MIDI_INPUT_DEVICE <midi-input-driver> [<params>]

Parameters
pClientPointer to client instance structure.
pszMidiDriverMIDI driver type string (e.g. "ALSA").
pParamsPointer to specific parameter list.
Returns
The new audio device number identifier on success, or -1 in case of failure.

References LSCP_BUFSIZ, lscp_client_get_result(), lscp_mutex_lock, lscp_mutex_unlock, and LSCP_OK.

◆ lscp_destroy_audio_device()

lscp_status_t lscp_destroy_audio_device ( lscp_client_t pClient,
int  iAudioDevice 
)

Destroying an audio output device. DESTROY AUDIO_OUTPUT_DEVICE <audio-device-id>

Parameters
pClientPointer to client instance structure.
iAudioDeviceAudio device number identifier.
Returns
LSCP_OK on success, LSCP_FAILED otherwise.

References LSCP_BUFSIZ, lscp_client_query(), and LSCP_FAILED.

◆ lscp_destroy_midi_device()

lscp_status_t lscp_destroy_midi_device ( lscp_client_t pClient,
int  iMidiDevice 
)

Destroying a MIDI input device. DESTROY MIDI_INPUT_DEVICE <midi-device-id>

Parameters
pClientPointer to client instance structure.
iMidiDeviceMIDI device number identifier.
Returns
LSCP_OK on success, LSCP_FAILED otherwise.

References LSCP_BUFSIZ, lscp_client_query(), and LSCP_FAILED.

◆ lscp_get_audio_channel_info()

lscp_device_port_info_t* lscp_get_audio_channel_info ( lscp_client_t pClient,
int  iAudioDevice,
int  iAudioChannel 
)

Getting informations about an audio channel. GET AUDIO_OUTPUT_CHANNEL INFO <audio-device-id> <audio-channel>

Parameters
pClientPointer to client instance structure.
iAudioDeviceAudio device number identifier.
iAudioChannelAudio channel number.
Returns
A pointer to a lscp_device_port_info_t structure, with the given audio channel information, or NULL in case of failure.

References LSCP_BUFSIZ.

◆ lscp_get_audio_channel_param_info()

lscp_param_info_t* lscp_get_audio_channel_param_info ( lscp_client_t pClient,
int  iAudioDevice,
int  iAudioChannel,
const char *  pszParam 
)

Getting informations about specific audio channel parameter. GET AUDIO_OUTPUT_CHANNEL_PARAMETER INFO <audio-device-id> <audio-channel>

Parameters
pClientPointer to client instance structure.
iAudioDeviceAudio device number identifier.
iAudioChannelAudio channel number.
pszParamAudio channel parameter name.
Returns
A pointer to a lscp_param_info_t structure, with the given audio channel parameter information, or NULL in case of failure.

References LSCP_BUFSIZ.

◆ lscp_get_audio_device_info()

lscp_device_info_t* lscp_get_audio_device_info ( lscp_client_t pClient,
int  iAudioDevice 
)

Getting current settings of an audio output device. GET AUDIO_OUTPUT_DEVICE INFO <audio-device-id>

Parameters
pClientPointer to client instance structure.
iAudioDeviceAudio device number identifier.
Returns
A pointer to a lscp_device_info_t structure, with the given audio device information, or NULL in case of failure.

References LSCP_BUFSIZ.

◆ lscp_get_audio_devices()

int lscp_get_audio_devices ( lscp_client_t pClient)

Getting all created audio output device count. GET AUDIO_OUTPUT_DEVICES

Parameters
pClientPointer to client instance structure.
Returns
The current total number of audio devices on success, -1 otherwise.

References lscp_client_get_result(), lscp_mutex_lock, lscp_mutex_unlock, and LSCP_OK.

◆ lscp_get_audio_driver_info()

lscp_driver_info_t* lscp_get_audio_driver_info ( lscp_client_t pClient,
const char *  pszAudioDriver 
)

Getting informations about a specific audio output driver. GET AUDIO_OUTPUT_DRIVER INFO <audio-output-type>

Parameters
pClientPointer to client instance structure.
pszAudioDriverAudio driver type string (e.g. "ALSA").
Returns
A pointer to a lscp_driver_info_t structure, with the given audio driver information, or NULL in case of failure.

References LSCP_BUFSIZ.

◆ lscp_get_audio_driver_param_info()

lscp_param_info_t* lscp_get_audio_driver_param_info ( lscp_client_t pClient,
const char *  pszAudioDriver,
const char *  pszParam,
lscp_param_t pDepList 
)

Getting informations about specific audio output driver parameter. GET AUDIO_OUTPUT_DRIVER_PARAMETER INFO <audio-output-driver> [<dep-list>]

Parameters
pClientPointer to client instance structure.
pszAudioDriverAudio driver type string (e.g. "ALSA").
pszParamAudio driver parameter name.
pDepListPointer to specific dependencies parameter list.
Returns
A pointer to a lscp_param_info_t structure, with the given audio driver parameter information, or NULL in case of failure.

References LSCP_BUFSIZ.

◆ lscp_get_available_audio_drivers()

int lscp_get_available_audio_drivers ( lscp_client_t pClient)

Getting all available audio output driver count. GET AVAILABLE_AUDIO_OUTPUT_DRIVERS

Parameters
pClientPointer to client instance structure.
Returns
The current total number of audio output drivers on success, -1 otherwise.

References lscp_client_get_result(), lscp_mutex_lock, lscp_mutex_unlock, and LSCP_OK.

◆ lscp_get_available_midi_drivers()

int lscp_get_available_midi_drivers ( lscp_client_t pClient)

Getting all available MIDI input driver count. GET AVAILABLE_MIDI_INPUT_DRIVERS

Parameters
pClientPointer to client instance structure.
Returns
The current total number of MIDI input drivers on success, -1 otherwise.

References lscp_client_get_result(), lscp_mutex_lock, lscp_mutex_unlock, and LSCP_OK.

◆ lscp_get_midi_device_info()

lscp_device_info_t* lscp_get_midi_device_info ( lscp_client_t pClient,
int  iMidiDevice 
)

Getting current settings of a MIDI input device. GET MIDI_INPUT_DEVICE INFO <midi-device-id>

Parameters
pClientPointer to client instance structure.
iMidiDeviceMIDI device number identifier.
Returns
A pointer to a lscp_device_info_t structure, with the given MIDI device information, or NULL in case of failure.

References LSCP_BUFSIZ.

◆ lscp_get_midi_devices()

int lscp_get_midi_devices ( lscp_client_t pClient)

Getting all created MIDI intput device count. GET MIDI_INPUT_DEVICES

Parameters
pClientPointer to client instance structure.
Returns
The current total number of MIDI devices on success, -1 otherwise.

References lscp_client_get_result(), lscp_mutex_lock, lscp_mutex_unlock, and LSCP_OK.

◆ lscp_get_midi_driver_info()

lscp_driver_info_t* lscp_get_midi_driver_info ( lscp_client_t pClient,
const char *  pszMidiDriver 
)

Getting informations about a specific MIDI input driver. GET MIDI_INPUT_DRIVER INFO <midi-input-type>

Parameters
pClientPointer to client instance structure.
pszMidiDriverMIDI driver type string (e.g. "ALSA").
Returns
A pointer to a lscp_driver_info_t structure, with the given MIDI driver information, or NULL in case of failure.

References LSCP_BUFSIZ.

◆ lscp_get_midi_driver_param_info()

lscp_param_info_t* lscp_get_midi_driver_param_info ( lscp_client_t pClient,
const char *  pszMidiDriver,
const char *  pszParam,
lscp_param_t pDepList 
)

Getting informations about specific MIDI input driver parameter. GET MIDI_INPUT_DRIVER_PARAMETER INFO <midi-input-driver> [<dep-list>]

Parameters
pClientPointer to client instance structure.
pszMidiDriverMIDI driver type string (e.g. "ALSA").
pszParamMIDI driver parameter name.
pDepListPointer to specific dependencies parameter list.
Returns
A pointer to a lscp_param_info_t structure, with the given MIDI driver parameter information, or NULL in case of failure.
LSCP_OK on success, LSCP_FAILED otherwise.

References LSCP_BUFSIZ.

◆ lscp_get_midi_port_info()

lscp_device_port_info_t* lscp_get_midi_port_info ( lscp_client_t pClient,
int  iMidiDevice,
int  iMidiPort 
)

Getting informations about a MIDI port. GET MIDI_INPUT_PORT INFO <midi-device-id> <midi-port>

Parameters
pClientPointer to client instance structure.
iMidiDeviceMIDI device number identifier.
iMidiPortMIDI port number.
Returns
A pointer to a lscp_device_port_info_t structure, with the given MIDI port information, or NULL in case of failure.

References LSCP_BUFSIZ.

◆ lscp_get_midi_port_param_info()

lscp_param_info_t* lscp_get_midi_port_param_info ( lscp_client_t pClient,
int  iMidiDevice,
int  iMidiPort,
const char *  pszParam 
)

Getting informations about specific MIDI port parameter. GET MIDI_INPUT_PORT_PARAMETER INFO <midi-device-id> <midi-port>

Parameters
pClientPointer to client instance structure.
iMidiDeviceMIDI device number identifier.
iMidiPortMIDI port number.
pszParamMIDI port parameter name.
Returns
A pointer to a lscp_param_info_t structure, with the given MIDI port parameter information, or NULL in case of failure.

References LSCP_BUFSIZ.

◆ lscp_get_param_value()

const char* lscp_get_param_value ( lscp_param_t pParams,
const char *  pszParam 
)

◆ lscp_list_audio_devices()

int* lscp_list_audio_devices ( lscp_client_t pClient)

Getting all created audio output device list. LIST AUDIO_OUTPUT_DEVICES

Parameters
pClientPointer to client instance structure.
Returns
An array of audio device number identifiers, terminated with -1 on success, or NULL in case of failure.

References lscp_client_get_result(), lscp_mutex_lock, lscp_mutex_unlock, and LSCP_OK.

◆ lscp_list_available_audio_drivers()

const char** lscp_list_available_audio_drivers ( lscp_client_t pClient)

Getting all available audio output drivers. LIST AVAILABLE_AUDIO_OUTPUT_DRIVERS

Parameters
pClientPointer to client instance structure.
Returns
A NULL terminated array of audio output driver type name strings, or NULL in case of failure.

References lscp_client_get_result(), lscp_mutex_lock, lscp_mutex_unlock, and LSCP_OK.

◆ lscp_list_available_midi_drivers()

const char** lscp_list_available_midi_drivers ( lscp_client_t pClient)

Getting all available MIDI input drivers. LIST AVAILABLE_MIDI_INPUT_DRIVERS

Parameters
pClientPointer to client instance structure.
Returns
A NULL terminated array of MIDI input driver type name strings, or NULL in case of failure.

References lscp_client_get_result(), lscp_mutex_lock, lscp_mutex_unlock, and LSCP_OK.

◆ lscp_list_midi_devices()

int* lscp_list_midi_devices ( lscp_client_t pClient)

Getting all created MIDI intput device list. LIST MIDI_INPUT_DEVICES

Parameters
pClientPointer to client instance structure.
Returns
An array of MIDI device number identifiers, terminated with -1 on success, or NULL in case of failure.

References lscp_client_get_result(), lscp_mutex_lock, lscp_mutex_unlock, and LSCP_OK.

◆ lscp_set_audio_channel_param()

lscp_status_t lscp_set_audio_channel_param ( lscp_client_t pClient,
int  iAudioDevice,
int  iAudioChannel,
lscp_param_t pParam 
)

Changing settings of audio output channels. SET AUDIO_OUTPUT_CHANNEL_PARAMETER <audio-device-id> <audio-channel>

Parameters
pClientPointer to client instance structure.
iAudioDeviceAudio device number identifier.
iAudioChannelAudio channel number.
pParamPointer to a key-valued audio channel parameter.
Returns
LSCP_OK on success, LSCP_FAILED otherwise.

References _lscp_param_t::key, LSCP_BUFSIZ, lscp_client_query(), LSCP_FAILED, and _lscp_param_t::value.

◆ lscp_set_audio_device_param()

lscp_status_t lscp_set_audio_device_param ( lscp_client_t pClient,
int  iAudioDevice,
lscp_param_t pParam 
)

Changing settings of audio output devices. SET AUDIO_OUTPUT_DEVICE_PARAMETER <audio-device-id> =

Parameters
pClientPointer to client instance structure.
iAudioDeviceAudio device number identifier.
pParamPointer to a key-valued audio device parameter.
Returns
LSCP_OK on success, LSCP_FAILED otherwise.

References _lscp_param_t::key, LSCP_BUFSIZ, lscp_client_query(), LSCP_FAILED, and _lscp_param_t::value.

◆ lscp_set_midi_device_param()

lscp_status_t lscp_set_midi_device_param ( lscp_client_t pClient,
int  iMidiDevice,
lscp_param_t pParam 
)

Changing settings of MIDI input devices. SET MIDI_INPUT_DEVICE_PARAMETER <midi-device-id> =

Parameters
pClientPointer to client instance structure.
iMidiDeviceMIDI device number identifier.
pParamPointer to a key-valued MIDI device parameter.
Returns
LSCP_OK on success, LSCP_FAILED otherwise.

References _lscp_param_t::key, LSCP_BUFSIZ, lscp_client_query(), LSCP_FAILED, and _lscp_param_t::value.

◆ lscp_set_midi_port_param()

lscp_status_t lscp_set_midi_port_param ( lscp_client_t pClient,
int  iMidiDevice,
int  iMidiPort,
lscp_param_t pParam 
)

Changing settings of MIDI input ports. SET MIDI_INPUT_PORT_PARAMETER <midi-device-id> <midi-port>

Parameters
pClientPointer to client instance structure.
iMidiDeviceMIDI device number identifier.
iMidiPortMIDI port number.
pParamPointer to a key-valued MIDI port parameter.
Returns
LSCP_OK on success, LSCP_FAILED otherwise.

References _lscp_param_t::key, LSCP_BUFSIZ, lscp_client_query(), LSCP_FAILED, and _lscp_param_t::value.