File: imsdev.h

package info (click to toggle)
ocp 1%3A0.1.21-1.1
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd, wheezy
  • size: 5,344 kB
  • ctags: 7,862
  • sloc: ansic: 91,449; cpp: 9,729; sh: 3,119; makefile: 2,482
file content (55 lines) | stat: -rw-r--r-- 1,087 bytes parent folder | download | duplicates (3)
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#ifndef _IMSDEV_H
#define _IMSDEV_H

/* All drivers set these, but they are not used to anything */
#define SS_DEVTYPE 3
#define SS_PLAYER 0
#define SS_SAMPLER 1
#define SS_WAVETABLE 2
#define SS_MIDI 3
#define SS_NEEDPLAYER 4
#define SS_NEEDWAVETABLE 8

struct sounddevice;

#define DEVICE_NAME_MAX 63

struct devaddstruct
{
	uint32_t (*GetOpt)(const char *devinfonode_handle);
	void (*Init)(const char *devinfonode_handle);
	void (*Close)();
	int (*ProcessKey)(uint16_t);
};

struct deviceinfo
{
	struct sounddevice *devtype;
	int16_t port;
	int16_t port2;
/*
	signed char irq;
	signed char irq2;
	signed char dma;
	signed char dma2;
*/
	uint32_t opt;
	int8_t subtype;
	uint8_t chan;
	uint32_t mem;
	char path[DEVICE_NAME_MAX+1]; /* can be like 127.0.0.1:32000, or stuff like /tmp/.esd .... or whatever you prefer or just empty for no force*/
	char mixer[DEVICE_NAME_MAX+1];
};

struct sounddevice
{
	char type;
	char keep;
	char name[32];
	int (*Detect)(struct deviceinfo *c);
	int (*Init)(const struct deviceinfo *c);
	void (*Close)(void);
	struct devaddstruct *addprocs;
};

#endif