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

#include <winmmemidi_io.h>

Public Member Functions

 WinMMEMidiIO ()
 
 ~WinMMEMidiIO ()
 
void start ()
 
void stop ()
 
bool dequeue_input_event (uint32_t port, uint64_t timestamp_start, uint64_t timestamp_end, uint64_t &timestamp, uint8_t *data, size_t &size)
 
bool enqueue_output_event (uint32_t port, uint64_t timestamp, const uint8_t *data, const size_t size)
 
uint32_t n_midi_inputs (void) const
 
uint32_t n_midi_outputs (void) const
 
std::vector< WinMMEMidiInputDevice * > get_inputs ()
 
std::vector< WinMMEMidiOutputDevice * > get_outputs ()
 
void update_device_info ()
 
std::vector< MidiDeviceInfo * > get_device_info ()
 
MidiDeviceInfoget_device_info (const std::string &name)
 
std::string port_id (uint32_t, bool input)
 
std::string port_name (uint32_t, bool input)
 
void set_enabled (bool yn=true)
 
bool enabled (void) const
 
void set_port_changed_callback (void(changed_callback(void *)), void *arg)
 

Private Member Functions

void clear_device_info ()
 
void discover ()
 
void cleanup ()
 
void create_input_devices ()
 
void create_output_devices ()
 
void destroy_input_devices ()
 
void destroy_output_devices ()
 
void start_devices ()
 
void stop_devices ()
 

Static Private Member Functions

static bool get_input_name_from_index (int index, std::string &name)
 
static bool get_output_name_from_index (int index, std::string &name)
 

Private Attributes

std::vector< MidiDeviceInfo * > m_device_info
 
std::vector< WinMMEMidiInputDevice * > m_inputs
 
std::vector< WinMMEMidiOutputDevice * > m_outputs
 
bool m_active
 
bool m_enabled
 
bool m_run
 
void(* m_changed_callback )(void *)
 
void * m_changed_arg
 
pthread_mutex_t m_device_lock
 

Detailed Description

Definition at line 59 of file winmmemidi_io.h.

Constructor & Destructor Documentation

◆ WinMMEMidiIO()

ARDOUR::WinMMEMidiIO::WinMMEMidiIO ( )

◆ ~WinMMEMidiIO()

ARDOUR::WinMMEMidiIO::~WinMMEMidiIO ( )

Member Function Documentation

◆ cleanup()

void ARDOUR::WinMMEMidiIO::cleanup ( )
private

◆ clear_device_info()

void ARDOUR::WinMMEMidiIO::clear_device_info ( )
private

◆ create_input_devices()

void ARDOUR::WinMMEMidiIO::create_input_devices ( )
private

◆ create_output_devices()

void ARDOUR::WinMMEMidiIO::create_output_devices ( )
private

◆ dequeue_input_event()

bool ARDOUR::WinMMEMidiIO::dequeue_input_event ( uint32_t  port,
uint64_t  timestamp_start,
uint64_t  timestamp_end,
uint64_t &  timestamp,
uint8_t *  data,
size_t &  size 
)

◆ destroy_input_devices()

void ARDOUR::WinMMEMidiIO::destroy_input_devices ( )
private

◆ destroy_output_devices()

void ARDOUR::WinMMEMidiIO::destroy_output_devices ( )
private

◆ discover()

void ARDOUR::WinMMEMidiIO::discover ( )
private

◆ enabled()

bool ARDOUR::WinMMEMidiIO::enabled ( void  ) const
inline

Definition at line 95 of file winmmemidi_io.h.

◆ enqueue_output_event()

bool ARDOUR::WinMMEMidiIO::enqueue_output_event ( uint32_t  port,
uint64_t  timestamp,
const uint8_t *  data,
const size_t  size 
)

◆ get_device_info() [1/2]

std::vector<MidiDeviceInfo*> ARDOUR::WinMMEMidiIO::get_device_info ( )
inline

Definition at line 87 of file winmmemidi_io.h.

◆ get_device_info() [2/2]

MidiDeviceInfo* ARDOUR::WinMMEMidiIO::get_device_info ( const std::string &  name)

◆ get_input_name_from_index()

static bool ARDOUR::WinMMEMidiIO::get_input_name_from_index ( int  index,
std::string &  name 
)
staticprivate

◆ get_inputs()

std::vector<WinMMEMidiInputDevice*> ARDOUR::WinMMEMidiIO::get_inputs ( )
inline

Definition at line 82 of file winmmemidi_io.h.

◆ get_output_name_from_index()

static bool ARDOUR::WinMMEMidiIO::get_output_name_from_index ( int  index,
std::string &  name 
)
staticprivate

◆ get_outputs()

std::vector<WinMMEMidiOutputDevice*> ARDOUR::WinMMEMidiIO::get_outputs ( )
inline

Definition at line 83 of file winmmemidi_io.h.

◆ n_midi_inputs()

uint32_t ARDOUR::WinMMEMidiIO::n_midi_inputs ( void  ) const
inline

Definition at line 79 of file winmmemidi_io.h.

◆ n_midi_outputs()

uint32_t ARDOUR::WinMMEMidiIO::n_midi_outputs ( void  ) const
inline

Definition at line 80 of file winmmemidi_io.h.

◆ port_id()

std::string ARDOUR::WinMMEMidiIO::port_id ( uint32_t  ,
bool  input 
)

◆ port_name()

std::string ARDOUR::WinMMEMidiIO::port_name ( uint32_t  ,
bool  input 
)

◆ set_enabled()

void ARDOUR::WinMMEMidiIO::set_enabled ( bool  yn = true)
inline

Definition at line 94 of file winmmemidi_io.h.

◆ set_port_changed_callback()

void ARDOUR::WinMMEMidiIO::set_port_changed_callback ( void(changed_callback(void *))  ,
void *  arg 
)
inline

Definition at line 97 of file winmmemidi_io.h.

◆ start()

void ARDOUR::WinMMEMidiIO::start ( )

◆ start_devices()

void ARDOUR::WinMMEMidiIO::start_devices ( )
private

◆ stop()

void ARDOUR::WinMMEMidiIO::stop ( )

◆ stop_devices()

void ARDOUR::WinMMEMidiIO::stop_devices ( )
private

◆ update_device_info()

void ARDOUR::WinMMEMidiIO::update_device_info ( )

Member Data Documentation

◆ m_active

bool ARDOUR::WinMMEMidiIO::m_active
private

Definition at line 128 of file winmmemidi_io.h.

◆ m_changed_arg

void* ARDOUR::WinMMEMidiIO::m_changed_arg
private

Definition at line 133 of file winmmemidi_io.h.

◆ m_changed_callback

void(* ARDOUR::WinMMEMidiIO::m_changed_callback) (void *)
private

Definition at line 132 of file winmmemidi_io.h.

◆ m_device_info

std::vector<MidiDeviceInfo*> ARDOUR::WinMMEMidiIO::m_device_info
private

Definition at line 123 of file winmmemidi_io.h.

◆ m_device_lock

pthread_mutex_t ARDOUR::WinMMEMidiIO::m_device_lock
private

Definition at line 136 of file winmmemidi_io.h.

◆ m_enabled

bool ARDOUR::WinMMEMidiIO::m_enabled
private

Definition at line 129 of file winmmemidi_io.h.

◆ m_inputs

std::vector<WinMMEMidiInputDevice*> ARDOUR::WinMMEMidiIO::m_inputs
private

Definition at line 125 of file winmmemidi_io.h.

◆ m_outputs

std::vector<WinMMEMidiOutputDevice*> ARDOUR::WinMMEMidiIO::m_outputs
private

Definition at line 126 of file winmmemidi_io.h.

◆ m_run

bool ARDOUR::WinMMEMidiIO::m_run
private

Definition at line 130 of file winmmemidi_io.h.


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