summaryrefslogtreecommitdiff
path: root/lib/libsalsa/local.h
blob: 5c87ebc679642423a20ccd14a73d0304d7f52aa7 (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
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
#include <string.h>
#include "alsa-symbols.h"
#include <alsa/asoundlib.h>
#include "../../include/soundcard.h"
#include "alsakernel.h"
#include <sys/poll.h>
#include "../../kernel/framework/include/midiparser.h"

extern int alib_verbose;
extern int mixer_fd;

extern char alib_appname[64];

extern oss_sysinfo sysinfo;

#define dbg_printf	if (alib_verbose>0)printf
#define dbg_printf0	if (alib_verbose>=0)printf
#define dbg_printf1	if (alib_verbose>=1)printf
#define dbg_printf2	if (alib_verbose>=2)printf
#define dbg_printf3	if (alib_verbose>=3)printf

extern int alib_initialized;

extern int init_alib (void);

#define ALIB_INIT() \
{ \
	int init_err; \
	if (!alib_initialized) \
	   if ((init_err=alib_init())<0) \
	      return init_err; \
}

struct _snd_pcm_info
{
  oss_audioinfo *ainfo;
};


extern int alib_appcheck (void);

struct _snd_seq_port_info
{
  oss_longname_t name;
  int port;
  int capability;
  int midi_channels;
  int synth_voices;
  int midi_voices;
  int type;
};

struct _snd_seq_client_info
{
  oss_longname_t name;
  int client;
};

/* Size of the local event buffer */
#define MAX_EVENTS	128

struct _snd_seq
{
  int fd;
  int streams;
  int nonblock;
  int oss_mode;
  oss_longname_t name;
  midiparser_common_t *parser;

  snd_seq_event_t events[MAX_EVENTS];
  int nevents, nextevent;
};

struct _snd_rawmidi_info
{
  int dummy;
};

struct _snd_seq_queue_status
{
  int dummy;
};

struct _snd_seq_queue_timer
{
  int dummy;
};

extern int convert_event (snd_seq_t * seq, snd_seq_event_t * ev);
extern void midiparser_callback (void *context, int category,
				 unsigned char msg, unsigned char ch,
				 unsigned char *parms, int len);