13
0
livetrax/libs/backends/alsa/alsa_sequencer.h

65 lines
1.7 KiB
C
Raw Normal View History

2014-06-21 05:50:24 -04:00
/*
* Copyright (C) 2014-2015 Robin Gareus <robin@gareus.org>
2014-06-21 05:50:24 -04:00
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
2014-06-21 05:50:24 -04:00
*/
#ifndef __libbackend_alsa_sequencer_h__
#define __libbackend_alsa_sequencer_h__
#include <stdint.h>
#include <poll.h>
#include <pthread.h>
#include <alsa/asoundlib.h>
#include "pbd/ringbuffer.h"
#include "ardour/types.h"
2014-06-21 07:51:46 -04:00
#include "alsa_midi.h"
2014-06-21 05:50:24 -04:00
namespace ARDOUR {
2014-06-21 07:51:46 -04:00
class AlsaSeqMidiIO : virtual public AlsaMidiIO {
2014-06-21 05:50:24 -04:00
public:
AlsaSeqMidiIO (const std::string &name, const char *port_name, const bool input);
2014-06-21 05:50:24 -04:00
virtual ~AlsaSeqMidiIO ();
protected:
snd_seq_t *_seq;
int _port;
private:
void init (const char *device_name, const bool input);
};
2014-06-21 07:51:46 -04:00
class AlsaSeqMidiOut : public AlsaSeqMidiIO, public AlsaMidiOut
2014-06-21 05:50:24 -04:00
{
public:
AlsaSeqMidiOut (const std::string &name, const char *port_name);
2014-06-21 05:50:24 -04:00
void* main_process_thread ();
};
2014-06-21 07:51:46 -04:00
class AlsaSeqMidiIn : public AlsaSeqMidiIO, public AlsaMidiIn
2014-06-21 05:50:24 -04:00
{
public:
AlsaSeqMidiIn (const std::string &name, const char *port_name);
2014-06-21 05:50:24 -04:00
void* main_process_thread ();
};
} // namespace
#endif