summaryrefslogtreecommitdiffstats
path: root/libtoolame-dab/xpad.h
blob: cd0a43449c30b3aa4e3687a88b9164cbf6c4a57f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#ifndef _XPAD_H_
#define _XPAD_H_

#include <stdint.h>

/* Initialise the xpad reader
 *
 * pad_fifo is the filename of the FIFO that will be created, and
 * can be used with mot-encoder.
 *
 * pad_len is the XPAD length, that also has to be given
 * to mot-encoder.
 *
 * returns 0  on success
 *         -1 on failure
 */
int xpad_init(char* pad_fifo, int pad_len);

/* Get len bytes of x-pad data, write into buf
 * returns either
 * - len if the read was sucessful
 * - 0   if there was no data
 * - -1  if there was an error (errno will be set)
 */
int xpad_read_len(uint8_t* buf, int len);

#endif