Ardour  9.0-pre0-582-g084a23a80d
ARDOUR::AlsaRawMidiIn Class Reference

#include <alsa_rawmidi.h>

Inheritance diagram for ARDOUR::AlsaRawMidiIn:
[legend]

Classes

struct  ParserEvent
 

Public Member Functions

 AlsaRawMidiIn (const std::string &name, const char *device)
 
void * main_process_thread ()
 
- Public Member Functions inherited from ARDOUR::AlsaRawMidiIO
 AlsaRawMidiIO (const std::string &name, const char *device, const bool input)
 
virtual ~AlsaRawMidiIO ()
 
- Public Member Functions inherited from ARDOUR::AlsaMidiIO
 AlsaMidiIO ()
 
virtual ~AlsaMidiIO ()
 
int state (void) const
 
int start ()
 
int stop ()
 
void setup_timing (const size_t samples_per_period, const float samplerate)
 
void sync_time (uint64_t)
 
const std::string & name () const
 
- Public Member Functions inherited from ARDOUR::AlsaMidiIn
 AlsaMidiIn ()
 
size_t recv_event (pframes_t &, uint8_t *, size_t &)
 

Protected Member Functions

int queue_event (const uint64_t, const uint8_t *, const size_t)
 
- Protected Member Functions inherited from ARDOUR::AlsaMidiIn
int queue_event (const uint64_t, const uint8_t *, const size_t)
 

Private Member Functions

void parse_events (const uint64_t, const uint8_t *, const size_t)
 
bool process_byte (const uint64_t, const uint8_t)
 
void record_byte (uint8_t byte)
 
void prepare_byte_event (const uint64_t time, const uint8_t byte)
 
bool prepare_buffered_event (const uint64_t time)
 

Private Attributes

struct ARDOUR::AlsaRawMidiIn::ParserEvent _event
 
bool _first_time
 
size_t _unbuffered_bytes
 
size_t _total_bytes
 
size_t _expected_bytes
 
uint8_t _status_byte
 
uint8_t _parser_buffer [1024]
 

Additional Inherited Members

- Protected Attributes inherited from ARDOUR::AlsaRawMidiIO
snd_rawmidi_t * _device
 
- Protected Attributes inherited from ARDOUR::AlsaMidiIO
pthread_t _main_thread
 
pthread_mutex_t _notify_mutex
 
pthread_cond_t _notify_ready
 
int _state
 
bool _running
 
int _npfds
 
struct pollfd * _pfds
 
double _sample_length_us
 
double _period_length_us
 
size_t _samples_per_period
 
uint64_t _clock_monotonic
 
PBD::RingBuffer< uint8_t > * _rb
 
std::string _name
 

Detailed Description

Definition at line 53 of file alsa_rawmidi.h.

Constructor & Destructor Documentation

◆ AlsaRawMidiIn()

ARDOUR::AlsaRawMidiIn::AlsaRawMidiIn ( const std::string &  name,
const char *  device 
)

Member Function Documentation

◆ main_process_thread()

void* ARDOUR::AlsaRawMidiIn::main_process_thread ( )
virtual

Implements ARDOUR::AlsaMidiIO.

◆ parse_events()

void ARDOUR::AlsaRawMidiIn::parse_events ( const uint64_t  ,
const uint8_t *  ,
const  size_t 
)
private

◆ prepare_buffered_event()

bool ARDOUR::AlsaRawMidiIn::prepare_buffered_event ( const uint64_t  time)
inlineprivate

Definition at line 80 of file alsa_rawmidi.h.

◆ prepare_byte_event()

void ARDOUR::AlsaRawMidiIn::prepare_byte_event ( const uint64_t  time,
const uint8_t  byte 
)
inlineprivate

Definition at line 75 of file alsa_rawmidi.h.

◆ process_byte()

bool ARDOUR::AlsaRawMidiIn::process_byte ( const uint64_t  ,
const uint8_t   
)
private

◆ queue_event()

int ARDOUR::AlsaRawMidiIn::queue_event ( const uint64_t  ,
const uint8_t *  ,
const  size_t 
)
protected

◆ record_byte()

void ARDOUR::AlsaRawMidiIn::record_byte ( uint8_t  byte)
inlineprivate

Definition at line 66 of file alsa_rawmidi.h.

Member Data Documentation

◆ _event

struct ARDOUR::AlsaRawMidiIn::ParserEvent ARDOUR::AlsaRawMidiIn::_event
private

◆ _expected_bytes

size_t ARDOUR::AlsaRawMidiIn::_expected_bytes
private

Definition at line 113 of file alsa_rawmidi.h.

◆ _first_time

bool ARDOUR::AlsaRawMidiIn::_first_time
private

Definition at line 110 of file alsa_rawmidi.h.

◆ _parser_buffer

uint8_t ARDOUR::AlsaRawMidiIn::_parser_buffer[1024]
private

Definition at line 115 of file alsa_rawmidi.h.

◆ _status_byte

uint8_t ARDOUR::AlsaRawMidiIn::_status_byte
private

Definition at line 114 of file alsa_rawmidi.h.

◆ _total_bytes

size_t ARDOUR::AlsaRawMidiIn::_total_bytes
private

Definition at line 112 of file alsa_rawmidi.h.

◆ _unbuffered_bytes

size_t ARDOUR::AlsaRawMidiIn::_unbuffered_bytes
private

Definition at line 111 of file alsa_rawmidi.h.


The documentation for this class was generated from the following file: