Commit ef10ae45 authored by Brandon Invergo's avatar Brandon Invergo

Rename ni-device to lk-device and guile-ni-device to librekontrol-core

parent 754a1264
2019-03-06 Brandon Invergo <brandon@invergo.net>
* src/lk-device.c: Rename ni-device.c to lk-device.c
* src/librekontrol-core.c: Rename guile-ni-device.c to
librekontrol-core.c
2019-02-25 Brandon Invergo <brandon@invergo.net>
* src/guile-ni-device.c (lk_scm_open_device,lk_scm_open_ctl):
......
......@@ -19,7 +19,7 @@
bin_PROGRAMS = librekontrol
librekontrol_SOURCES = librekontrol.c ni-device.c guile-ni-device.c
librekontrol_SOURCES = librekontrol.c lk-device.c librekontrol-core.c
librekontrol_LDADD = $(EVDEV_LIBS) $(GUILE_LIBS) $(ALSA_LIBS) \
@LIBINTL@
librekontrol_CFLAGS = $(EVDEV_CFLAGS) $(GUILE_CFLAGS)
......
/*
* guile-ni-device.c ---
* librekontrol-core.c ---
*
* Copyright (C) 2016, 2017, 2019 Brandon Invergo <brandon@invergo.net>
*
......@@ -19,7 +19,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "guile-ni-device.h"
#include "librekontrol-core.h"
#define _(String) gettext (String)
#define gettext_noop(String) String
......@@ -28,9 +28,9 @@
static SCM device_type;
static SCM ctl_type;
ni_device_t **lk_device_list = NULL;
lk_device_t **lk_device_list = NULL;
size_t lk_num_devices = 0;
ni_device_ctl_t **lk_ctl_list = NULL;
lk_device_ctl_t **lk_ctl_list = NULL;
size_t lk_num_ctls = 0;
struct open_device_req
......@@ -110,13 +110,13 @@ open_device_wrapper (void *data)
struct open_device_req *request = data;
if (lk_num_devices == 0)
{
lk_device_list = (ni_device_t **)malloc ((++lk_num_devices)*sizeof (ni_device_t));
lk_device_list[0] = (ni_device_t *)malloc (sizeof (ni_device_t));
lk_device_list = (lk_device_t **)malloc ((++lk_num_devices)*sizeof (lk_device_t));
lk_device_list[0] = (lk_device_t *)malloc (sizeof (lk_device_t));
}
else
{
lk_device_list = (ni_device_t **)realloc (lk_device_list, (++lk_num_devices)*sizeof (ni_device_t));
lk_device_list[lk_num_devices-1] = (ni_device_t *)malloc (sizeof (ni_device_t));
lk_device_list = (lk_device_t **)realloc (lk_device_list, (++lk_num_devices)*sizeof (lk_device_t));
lk_device_list[lk_num_devices-1] = (lk_device_t *)malloc (sizeof (lk_device_t));
}
if (!lk_device_list || !lk_device_list[lk_num_devices-1])
{
......@@ -137,7 +137,7 @@ void*
open_ctl_wrapper (void *data)
{
struct open_ctl_req *request = data;
ni_device_t *device;
lk_device_t *device;
if (request->device_n >= lk_num_devices)
{
error (EXIT_FAILURE, 0, "Invalid device selected");
......@@ -145,13 +145,13 @@ open_ctl_wrapper (void *data)
device = lk_device_list[request->device_n];
if (lk_num_ctls == 0)
{
lk_ctl_list = (ni_device_ctl_t **)malloc ((++lk_num_ctls)*sizeof (ni_device_ctl_t));
lk_ctl_list[0] = (ni_device_ctl_t *)malloc (sizeof (ni_device_ctl_t));
lk_ctl_list = (lk_device_ctl_t **)malloc ((++lk_num_ctls)*sizeof (lk_device_ctl_t));
lk_ctl_list[0] = (lk_device_ctl_t *)malloc (sizeof (lk_device_ctl_t));
}
else
{
lk_ctl_list = (ni_device_ctl_t **)realloc (lk_ctl_list, (++lk_num_ctls)*sizeof (ni_device_ctl_t));
lk_ctl_list[lk_num_ctls-1] = (ni_device_ctl_t *)malloc (sizeof (ni_device_ctl_t));
lk_ctl_list = (lk_device_ctl_t **)realloc (lk_ctl_list, (++lk_num_ctls)*sizeof (lk_device_ctl_t));
lk_ctl_list[lk_num_ctls-1] = (lk_device_ctl_t *)malloc (sizeof (lk_device_ctl_t));
}
if (!lk_ctl_list || !lk_ctl_list[lk_num_ctls-1])
{
......@@ -171,7 +171,7 @@ void*
set_boolean_ctl_wrapper (void *data)
{
struct bool_ctl_req *request = data;
ni_device_ctl_t *ctl;
lk_device_ctl_t *ctl;
if (request->ctl_n >= lk_num_ctls)
{
error (EXIT_FAILURE, 0, _("Invalid ctl selected"));
......@@ -185,7 +185,7 @@ void*
get_boolean_ctl_wrapper (void *data)
{
struct bool_ctl_req *request = data;
ni_device_ctl_t *ctl;
lk_device_ctl_t *ctl;
if (request->ctl_n >= lk_num_ctls)
{
error (EXIT_FAILURE, 0, _("Invalid ctl selected"));
......@@ -200,7 +200,7 @@ void*
toggle_boolean_ctl_wrapper (void *data)
{
struct bool_ctl_req *request = data;
ni_device_ctl_t *ctl;
lk_device_ctl_t *ctl;
if (request->ctl_n >= lk_num_ctls)
{
error (EXIT_FAILURE, 0, _("Invalid ctl selected"));
......@@ -214,7 +214,7 @@ void*
set_integer_ctl_wrapper (void *data)
{
struct bool_ctl_req *request = data;
ni_device_ctl_t *ctl;
lk_device_ctl_t *ctl;
if (request->ctl_n >= lk_num_ctls)
{
error (EXIT_FAILURE, 0, _("Invalid ctl selected"));
......@@ -228,7 +228,7 @@ void*
get_integer_ctl_wrapper (void *data)
{
struct bool_ctl_req *request = data;
ni_device_ctl_t *ctl;
lk_device_ctl_t *ctl;
if (request->ctl_n >= lk_num_ctls)
{
error (EXIT_FAILURE, 0, _("Invalid ctl selected"));
......@@ -242,7 +242,7 @@ void*
integer_ctl_max_wrapper (void *data)
{
struct bool_ctl_req *request = data;
ni_device_ctl_t *ctl;
lk_device_ctl_t *ctl;
if (request->ctl_n >= lk_num_ctls)
{
error (EXIT_FAILURE, 0, _("Invalid ctl selected"));
......@@ -256,7 +256,7 @@ void*
integer_ctl_min_wrapper (void *data)
{
struct bool_ctl_req *request = data;
ni_device_ctl_t *ctl;
lk_device_ctl_t *ctl;
if (request->ctl_n >= lk_num_ctls)
{
error (EXIT_FAILURE, 0, _("Invalid ctl selected"));
......@@ -270,7 +270,7 @@ void*
abs_in_max_wrapper (void *data)
{
struct abs_in_req *request = data;
ni_device_t *device;
lk_device_t *device;
if (request->device_n >= lk_num_devices)
{
error (EXIT_FAILURE, 0, _("Invalid device selected"));
......@@ -284,7 +284,7 @@ void*
abs_in_min_wrapper (void *data)
{
struct abs_in_req *request = data;
ni_device_t *device;
lk_device_t *device;
if (request->device_n >= lk_num_devices)
{
error (EXIT_FAILURE, 0, _("Invalid device selected"));
......@@ -298,7 +298,7 @@ void*
remap_toggle_event_wrapper (void *data)
{
struct remap_toggle_event_req *request = data;
ni_device_t *device;
lk_device_t *device;
if (request->device_n >= lk_num_devices)
{
error (EXIT_FAILURE, 0, _("Invalid device selected"));
......@@ -319,7 +319,7 @@ void*
remap_set_abs_info_wrapper (void *data)
{
struct remap_set_abs_info_req *request = data;
ni_device_t *device;
lk_device_t *device;
if (request->device_n >= lk_num_devices)
{
error (EXIT_FAILURE, 0, _("Invalid device selected"));
......@@ -335,7 +335,7 @@ void*
finalize_remap_dev_wrapper (void *data)
{
struct finalize_remap_dev_req *request = data;
ni_device_t *device;
lk_device_t *device;
if (request->device_n >= lk_num_devices)
{
error (EXIT_FAILURE, 0, _("Invalid device selected"));
......@@ -349,7 +349,7 @@ void*
send_remap_event_wrapper (void *data)
{
struct send_remap_event_req *request = data;
ni_device_t *device;
lk_device_t *device;
if (request->device_n >= lk_num_devices)
{
error (EXIT_FAILURE, 0, _("Invalid device selected"));
......@@ -366,7 +366,7 @@ lk_scm_set_idle_wait (SCM lk_device_s, SCM idle_wait)
SCM s_idle_waits_symbol, s_idle_waits;
SCM s_dev_id;
size_t device_n;
ni_device_t *device;
lk_device_t *device;
if (scm_is_false (lk_device_s))
{
error (0, 0, _("Failed to set idle wait: device not opened."));
......@@ -393,7 +393,7 @@ init_device_type (void)
scm_t_struct_finalize finalizer;
name = scm_from_latin1_symbol ("lk-device");
slots = scm_list_1 (scm_from_latin1_symbol ("ni-device-number"));
slots = scm_list_1 (scm_from_latin1_symbol ("lk-device-number"));
finalizer = NULL;
device_type = scm_make_foreign_object_type (name, slots, finalizer);
......@@ -406,8 +406,8 @@ init_ctl_type (void)
scm_t_struct_finalize finalizer;
name = scm_from_latin1_symbol ("lk-ctl");
slots = scm_list_2 (scm_from_latin1_symbol ("ni-device-number"),
scm_from_latin1_symbol ("ni-ctl-number"));
slots = scm_list_2 (scm_from_latin1_symbol ("lk-device-number"),
scm_from_latin1_symbol ("lk-ctl-number"));
finalizer = NULL;
ctl_type = scm_make_foreign_object_type (name, slots, finalizer);
......@@ -892,7 +892,7 @@ get_event_handler (SCM lk_device_s, SCM ev_id, bool create)
SCM s_dev_handlers, s_ev_handler;
SCM s_dev_id;
size_t device_n;
ni_device_t *device;
lk_device_t *device;
if (scm_is_false (lk_device_s))
{
error (0, 0, _("Failed to map event: device not opened."));
......@@ -1000,7 +1000,7 @@ get_idle_handler (SCM lk_device_s, bool create)
SCM s_dev_handler;
SCM s_dev_id;
size_t device_n;
ni_device_t *device;
lk_device_t *device;
if (scm_is_false (lk_device_s))
{
error (0, 0, _("Failed to map event: device not opened."));
......@@ -1098,7 +1098,7 @@ get_exit_handler (SCM lk_device_s, bool create)
SCM s_dev_handler;
SCM s_dev_id;
size_t device_n;
ni_device_t *device;
lk_device_t *device;
if (scm_is_false (lk_device_s))
{
error (0, 0, _("Failed to map event: device not opened."));
......
/*
* guile-ni-device.h ---
* librekontrol-core.h ---
*
* Copyright (C) 2016, 2019 Brandon Invergo <brandon@invergo.net>
*
......@@ -19,18 +19,18 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef GUILE_NI_DEVICE_H
#define GUILE_NI_DEVICE_H
#ifndef LIBREKONTROL_CORE_H
#define LIBREKONTROL_CORE_H
#include <config.h>
#include <libguile.h>
#include <libevdev/libevdev.h>
#include <libintl.h>
#include "ni-device.h"
#include "lk-device.h"
extern ni_device_t **lk_device_list;
extern lk_device_t **lk_device_list;
extern size_t lk_num_devices;
extern ni_device_ctl_t **lk_ctl_list;
extern lk_device_ctl_t **lk_ctl_list;
extern size_t lk_num_ctls;
void *init_lk_scm (void *data);
......
/*
* ni-device.c ---
* lk-device.c ---
*
* Copyright (C) 2016, 2017, 2018, 2019 Brandon Invergo <brandon@invergo.net>
*
......@@ -19,7 +19,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "ni-device.h"
#include "lk-device.h"
#define _(String) gettext (String)
#define gettext_noop(String) String
......@@ -29,7 +29,7 @@ pthread_mutex_t mutex;
pthread_mutexattr_t mutexattr;
static size_t
get_device_id (ni_device_t *device, const char *device_str)
get_device_id (lk_device_t *device, const char *device_str)
{
int i, n;
if (!device)
......@@ -49,7 +49,7 @@ get_device_id (ni_device_t *device, const char *device_str)
}
int
grab_alsa_ctl (ni_device_t *device, const char *controller_name)
grab_alsa_ctl (lk_device_t *device, const char *controller_name)
{
int err;
if (!device)
......@@ -75,7 +75,7 @@ grab_alsa_ctl (ni_device_t *device, const char *controller_name)
}
int
grab_alsa_seq (ni_device_t *device, const char *controller_name)
grab_alsa_seq (lk_device_t *device, const char *controller_name)
{
char seq_client[128] = "LibreKontrol ";
int err;
......@@ -119,7 +119,7 @@ grab_alsa_seq (ni_device_t *device, const char *controller_name)
}
void
grab_input_dev (ni_device_t *device, const char *input_name)
grab_input_dev (lk_device_t *device, const char *input_name)
{
glob_t event_glob;
int err;
......@@ -165,7 +165,7 @@ grab_input_dev (ni_device_t *device, const char *input_name)
}
void
grab_remap_dev (ni_device_t *device, const char *input_name)
grab_remap_dev (lk_device_t *device, const char *input_name)
{
int err;
char *remap_name = (char *)malloc (strlen (input_name) + 9);
......@@ -181,7 +181,7 @@ grab_remap_dev (ni_device_t *device, const char *input_name)
}
void
ni_init ()
lk_init ()
{
pthread_mutexattr_settype(&mutexattr, PTHREAD_MUTEX_RECURSIVE_NP);
pthread_mutexattr_init(&mutexattr);
......@@ -190,13 +190,13 @@ ni_init ()
}
void
ni_cleanup ()
lk_cleanup ()
{
pthread_mutex_destroy (&mutex);
}
int
open_device (ni_device_t *device, const char *controller_name,
open_device (lk_device_t *device, const char *controller_name,
const char *input_name, bool open_midi_seq,
bool open_remap_evdev)
{
......@@ -239,7 +239,7 @@ open_device (ni_device_t *device, const char *controller_name,
}
int
close_device (ni_device_t *device)
close_device (lk_device_t *device)
{
int err;
if (device->ctl_handle)
......@@ -279,7 +279,7 @@ close_device (ni_device_t *device)
}
int
open_control (ni_device_ctl_t *ctl, ni_device_t *device, const char *ctl_id_str)
open_control (lk_device_ctl_t *ctl, lk_device_t *device, const char *ctl_id_str)
{
int err;
ctl->device = device;
......@@ -322,7 +322,7 @@ open_control (ni_device_ctl_t *ctl, ni_device_t *device, const char *ctl_id_str)
}
int
close_control (ni_device_ctl_t *ctl)
close_control (lk_device_ctl_t *ctl)
{
if (ctl->info)
{
......@@ -340,7 +340,7 @@ close_control (ni_device_ctl_t *ctl)
}
int
check_ctl_state (const ni_device_ctl_t *ctl)
check_ctl_state (const lk_device_ctl_t *ctl)
{
if (!ctl)
{
......@@ -387,7 +387,7 @@ check_ctl_state (const ni_device_ctl_t *ctl)
}
int
set_boolean_ctl (ni_device_ctl_t *ctl, bool value)
set_boolean_ctl (lk_device_ctl_t *ctl, bool value)
{
int err;
pthread_mutex_lock (&mutex);
......@@ -418,7 +418,7 @@ set_boolean_ctl (ni_device_ctl_t *ctl, bool value)
}
bool
get_boolean_ctl (ni_device_ctl_t *ctl)
get_boolean_ctl (lk_device_ctl_t *ctl)
{
int err;
bool value;
......@@ -441,7 +441,7 @@ get_boolean_ctl (ni_device_ctl_t *ctl)
}
int
toggle_boolean_ctl (ni_device_ctl_t *ctl)
toggle_boolean_ctl (lk_device_ctl_t *ctl)
{
int err = 0;
bool cur_value;
......@@ -454,7 +454,7 @@ toggle_boolean_ctl (ni_device_ctl_t *ctl)
}
int
set_integer_ctl (const ni_device_ctl_t *ctl, long int value)
set_integer_ctl (const lk_device_ctl_t *ctl, long int value)
{
int err;
long int min_val, max_val;
......@@ -486,7 +486,7 @@ set_integer_ctl (const ni_device_ctl_t *ctl, long int value)
}
long int
get_integer_ctl (const ni_device_ctl_t *ctl)
get_integer_ctl (const lk_device_ctl_t *ctl)
{
int err;
long int value;
......@@ -503,7 +503,7 @@ get_integer_ctl (const ni_device_ctl_t *ctl)
}
long int
integer_ctl_max (const ni_device_ctl_t *ctl)
integer_ctl_max (const lk_device_ctl_t *ctl)
{
int err;
err = check_ctl_state (ctl);
......@@ -519,7 +519,7 @@ integer_ctl_max (const ni_device_ctl_t *ctl)
}
long int
integer_ctl_min (const ni_device_ctl_t *ctl)
integer_ctl_min (const lk_device_ctl_t *ctl)
{
int err;
err = check_ctl_state (ctl);
......@@ -535,7 +535,7 @@ integer_ctl_min (const ni_device_ctl_t *ctl)
}
int
abs_in_max (const ni_device_t *device, unsigned int code)
abs_in_max (const lk_device_t *device, unsigned int code)
{
if (!device)
{
......@@ -546,7 +546,7 @@ abs_in_max (const ni_device_t *device, unsigned int code)
}
int
abs_in_min (const ni_device_t *device, unsigned int code)
abs_in_min (const lk_device_t *device, unsigned int code)
{
if (!device)
{
......@@ -557,7 +557,7 @@ abs_in_min (const ni_device_t *device, unsigned int code)
}
void
send_midi_keypress (const ni_device_t *device, unsigned char channel,
send_midi_keypress (const lk_device_t *device, unsigned char channel,
unsigned char note, unsigned char velocity)
{
snd_seq_event_t ev;
......@@ -579,7 +579,7 @@ send_midi_keypress (const ni_device_t *device, unsigned char channel,
}
void
send_midi_note (const ni_device_t *device, unsigned char channel,
send_midi_note (const lk_device_t *device, unsigned char channel,
unsigned char note, unsigned char velocity,
unsigned int dur)
{
......@@ -602,7 +602,7 @@ send_midi_note (const ni_device_t *device, unsigned char channel,
}
void
send_midi_noteon (const ni_device_t *device, unsigned char channel,
send_midi_noteon (const lk_device_t *device, unsigned char channel,
unsigned char note, unsigned char velocity)
{
snd_seq_event_t ev;
......@@ -624,7 +624,7 @@ send_midi_noteon (const ni_device_t *device, unsigned char channel,
}
void
send_midi_noteoff (const ni_device_t *device, unsigned char channel,
send_midi_noteoff (const lk_device_t *device, unsigned char channel,
unsigned char note, unsigned char velocity)
{
snd_seq_event_t ev;
......@@ -646,7 +646,7 @@ send_midi_noteoff (const ni_device_t *device, unsigned char channel,
}
void
send_midi_pgmchange (const ni_device_t *device, unsigned char channel,
send_midi_pgmchange (const lk_device_t *device, unsigned char channel,
signed int value)
{
snd_seq_event_t ev;
......@@ -668,7 +668,7 @@ send_midi_pgmchange (const ni_device_t *device, unsigned char channel,
}
void
send_midi_pitchbend (const ni_device_t *device, unsigned char channel,
send_midi_pitchbend (const lk_device_t *device, unsigned char channel,
signed int value)
{
snd_seq_event_t ev;
......@@ -690,7 +690,7 @@ send_midi_pitchbend (const ni_device_t *device, unsigned char channel,
}
void
send_midi_control (const ni_device_t *device, unsigned char channel,
send_midi_control (const lk_device_t *device, unsigned char channel,
unsigned int param, signed int value)
{
snd_seq_event_t ev;
......@@ -712,7 +712,7 @@ send_midi_control (const ni_device_t *device, unsigned char channel,
}
int
remap_enable_event (ni_device_t *device, unsigned int type, unsigned int code)
remap_enable_event (lk_device_t *device, unsigned int type, unsigned int code)
{
if (!device->remap_dev)
{
......@@ -735,7 +735,7 @@ remap_enable_event (ni_device_t *device, unsigned int type, unsigned int code)
}
int
remap_disable_event (ni_device_t *device, unsigned int type, unsigned int code)
remap_disable_event (lk_device_t *device, unsigned int type, unsigned int code)
{
if (!device->remap_dev)
{
......@@ -749,7 +749,7 @@ remap_disable_event (ni_device_t *device, unsigned int type, unsigned int code)
}
int
remap_set_abs_info (ni_device_t *device, unsigned int code, int min, int max,
remap_set_abs_info (lk_device_t *device, unsigned int code, int min, int max,
int resolution, int fuzz, int flat)
{
if (!device->remap_dev)
......@@ -776,7 +776,7 @@ remap_set_abs_info (ni_device_t *device, unsigned int code, int min, int max,
}
int
finalize_remap_dev (ni_device_t *device)
finalize_remap_dev (lk_device_t *device)
{
return libevdev_uinput_create_from_device (device->remap_dev,
LIBEVDEV_UINPUT_OPEN_MANAGED,
......@@ -784,7 +784,7 @@ finalize_remap_dev (ni_device_t *device)
}
int
send_remap_event (ni_device_t *device, unsigned int type, unsigned int code,
send_remap_event (lk_device_t *device, unsigned int type, unsigned int code,
int value)
{
int err;
......
/*
* ni-device.h ---
* lk-device.h ---
*
* Copyright (C) 2016, 2017, 2019 Brandon Invergo <brandon@invergo.net>
*
......@@ -20,8 +20,8 @@
*/
#ifndef NI_DEVICE_H
#define NI_DEVICE_H
#ifndef LK_DEVICE_H
#define LK_DEVICE_H
#include <config.h>
#include <alsa/asoundlib.h>
......@@ -50,60 +50,60 @@ typedef struct
struct libevdev *remap_dev;
int input_fd;
struct libevdev_uinput *uidev;
} ni_device_t;
} lk_device_t;
typedef struct
{
ni_device_t *device;
lk_device_t *device;
char id[64];
snd_ctl_elem_id_t *elem_id;
snd_ctl_elem_info_t *info;
snd_ctl_elem_value_t *value;
pthread_mutex_t mutex;
pthread_mutexattr_t mutexattr;
} ni_device_ctl_t;
} lk_device_ctl_t;
void ni_init ();
void ni_cleanup ();
int open_device (ni_device_t *device, const char *controller_name,
void lk_init ();
void lk_cleanup ();
int open_device (lk_device_t *device, const char *controller_name,
const char *input_name, bool open_midi_seq,
bool open_remap_evdev);
int close_device (ni_device_t *device);
int open_control (ni_device_ctl_t *ctl, ni_device_t *device,
int close_device (lk_device_t *device);
int open_control (lk_device_ctl_t *ctl, lk_device_t *device,
const char *ctl_id_str);
int close_control (ni_device_ctl_t *ctl);
int set_boolean_ctl (ni_device_ctl_t *ctl, bool value);
bool get_boolean_ctl (ni_device_ctl_t *ctl);
int toggle_boolean_ctl (ni_device_ctl_t *ctl);
int set_integer_ctl (const ni_device_ctl_t *ctl, long int value);
long int get_integer_ctl (const ni_device_ctl_t *ctl);
long int integer_ctl_max (const ni_device_ctl_t *ctl);
long int integer_ctl_min (const ni_device_ctl_t *ctl);
int abs_in_max (const ni_device_t *device, unsigned int code);
int abs_in_min (const ni_device_t *device, unsigned int code);
void send_midi_keypress (const ni_device_t *device, unsigned char channel,
int close_control (lk_device_ctl_t *ctl);
int set_boolean_ctl (lk_device_ctl_t *ctl, bool value);
bool get_boolean_ctl (lk_device_ctl_t *ctl);
int toggle_boolean_ctl (lk_device_ctl_t *ctl);
int set_integer_ctl (const lk_device_ctl_t *ctl, long int value);
long int get_integer_ctl (const lk_device_ctl_t *ctl);
long int integer_ctl_max (const lk_device_ctl_t *ctl);
long int integer_ctl_min (const lk_device_ctl_t *ctl);
int abs_in_max (const lk_device_t *device, unsigned int code);
int abs_in_min (const lk_device_t *device, unsigned int code);
void send_midi_keypress (const lk_device_t *device, unsigned char channel,
unsigned char note, unsigned char velocity);
void send_midi_note (const ni_device_t *device, unsigned char channel,
void send_midi_note (const lk_device_t *device, unsigned char channel,
unsigned char note, unsigned char velocity,
unsigned int dur);
void send_midi_noteon (const ni_device_t *device, unsigned char channel,
void send_midi_noteon (const lk_device_t *device, unsigned char channel,
unsigned char note, unsigned char velocity);
void send_midi_noteoff (const ni_device_t *device, unsigned char channel,
void send_midi_noteoff (const lk_device_t *device, unsigned char channel,
unsigned char note, unsigned char velocity);
void send_midi_pgmchange (const ni_device_t *device, unsigned char channel,
void send_midi_pgmchange (const lk_device_t *device, unsigned char channel,
signed int value);
void send_midi_pitchbend (const ni_device_t *device, unsigned char channel,
void send_midi_pitchbend (const lk_device_t *device, unsigned char channel,
signed int value);
void send_midi_control (const ni_device_t *device, unsigned char channel,
void send_midi_control (const lk_device_t *device, unsigned char channel,
unsigned int param, signed int value);
int remap_enable_event (ni_device_t *device, unsigned int type,
int remap_enable_event (lk_device_t *device, unsigned int type,
unsigned int code);
int remap_disable_event (ni_device_t *device, unsigned int type,
int remap_disable_event (lk_device_t *device, unsigned int type,
unsigned int code);
int remap_set_abs_info (ni_device_t *device, unsigned int code, int min,
int remap_set_abs_info (lk_device_t *device, unsigned int code, int min,
int max, int resolution, int fuzz, int flat);
int finalize_remap_dev (ni_device_t *device);
int send_remap_event (ni_device_t *device, unsigned int type, unsigned int code,
int finalize_remap_dev (lk_device_t *device);
int send_remap_event (lk_device_t *device, unsigned int type, unsigned int code,
int value);
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment