blob: 6c19ff0dd1c4ed0a40aec7a77783199c300de05d (
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
|
//=========================================================
// MusE
// Linux Music Editor
// $Id: alsamidi.h,v 1.2 2004/01/14 09:06:43 wschweer Exp $
// (C) Copyright 2001 Werner Schweer (ws@seh.de)
//=========================================================
#ifndef __ALSAMIDI_H__
#define __ALSAMIDI_H__
#include <config.h>
#include <alsa/asoundlib.h>
#include "mididev.h"
class Xml;
//---------------------------------------------------------
// MidiAlsaDevice
//---------------------------------------------------------
class MidiAlsaDevice : public MidiDevice {
public:
snd_seq_addr_t adr;
private:
virtual QString open();
virtual void close();
virtual void processInput() {}
virtual int selectRfd() { return -1; }
virtual int selectWfd();
bool putEvent(snd_seq_event_t*);
virtual bool putMidiEvent(const MidiPlayEvent&);
public:
MidiAlsaDevice() {}
MidiAlsaDevice(const snd_seq_addr_t&, const QString& name);
virtual ~MidiAlsaDevice() {}
virtual void* clientPort() { return (void*)&adr; }
virtual void writeRouting(int, Xml&) const;
virtual inline int deviceType() { return ALSA_MIDI; }
};
extern bool initMidiAlsa();
extern int alsaSelectRfd();
extern int alsaSelectWfd();
extern void alsaProcessMidiInput();
extern void alsaScanMidiPorts();
#endif
|