diff options
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | README.md | 11 | ||||
-rw-r--r-- | applause.c | 3 | ||||
-rw-r--r-- | evdev.c | 4 |
4 files changed, 15 insertions, 5 deletions
@@ -1,4 +1,4 @@ -CC = gcc +CC = cc CFLAGS = -std=c99 -Wall -O2 -g @@ -9,11 +9,15 @@ You have to manually build and install LuaJIT v2.1: make sudo make install -Furthermore, install the following dependencies: +Furthermore, install the following dependencies (Ubuntu): sudo apt-get install build-essential libreadline-dev libjack-jackd2-dev \ libsndfile1 libasound2 feedgnuplot +On FreeBSD, you will need the following packages/ports: + + pkg install gmake readline jackit evdev-proto libsndfile alsa-lib p5-feedgnuplot + To compile the project, type: make @@ -35,6 +39,11 @@ TODO: How to use jack-plumbing? This may require root rights for accessing HID devices. You may also add the current user to the `input` group. +On FreeBSD, you might need to add the current user to the `wheel` group and +give read acceess to evdev nodes by creating `/etc/devd.rules`: + + [localrules=10] + add path 'input/*' mode 0640 Example (one channel): @@ -1,5 +1,5 @@ #define _XOPEN_SOURCE -#define _POSIX_C_SOURCE 199506L +//#define _POSIX_C_SOURCE 200112 #define _GNU_SOURCE #include <stdio.h> @@ -18,6 +18,7 @@ #include <sys/sem.h> #include <arpa/inet.h> +#include <netinet/in.h> #include <pthread.h> @@ -19,11 +19,11 @@ #include "evdev.h" -typedef struct applause_evdev { +struct applause_evdev { int fd; jack_ringbuffer_t *buffer; pthread_t thread; -} applause_evdev; +}; char * applause_evdev_getname(const char *node) |