VCV Rack API v2
Loading...
Searching...
No Matches
rack::midi::Driver Struct Reference

Wraps a MIDI driver API containing any number of MIDI devices. More...

#include <midi.hpp>

Public Member Functions

virtual ~Driver ()
 
virtual std::string getName ()
 Returns the name of the driver.
 
virtual std::vector< int > getInputDeviceIds ()
 Returns a list of all input device IDs that can be subscribed to.
 
virtual int getDefaultInputDeviceId ()
 Returns the default device to use when the driver is selected, or -1 for none.
 
virtual std::string getInputDeviceName (int deviceId)
 Returns the name of an input device without obtaining it.
 
virtual InputDevicesubscribeInput (int deviceId, Input *input)
 Adds the given port as a reference holder of a device and returns the it.
 
virtual void unsubscribeInput (int deviceId, Input *input)
 Removes the give port as a reference holder of a device.
 
virtual std::vector< int > getOutputDeviceIds ()
 
virtual int getDefaultOutputDeviceId ()
 
virtual std::string getOutputDeviceName (int deviceId)
 
virtual OutputDevicesubscribeOutput (int deviceId, Output *output)
 
virtual void unsubscribeOutput (int deviceId, Output *output)
 

Detailed Description

Wraps a MIDI driver API containing any number of MIDI devices.

Constructor & Destructor Documentation

◆ ~Driver()

virtual rack::midi::Driver::~Driver ( )
inlinevirtual

Member Function Documentation

◆ getName()

virtual std::string rack::midi::Driver::getName ( )
inlinevirtual

Returns the name of the driver.

E.g. "ALSA".

◆ getInputDeviceIds()

virtual std::vector< int > rack::midi::Driver::getInputDeviceIds ( )
inlinevirtual

Returns a list of all input device IDs that can be subscribed to.

◆ getDefaultInputDeviceId()

virtual int rack::midi::Driver::getDefaultInputDeviceId ( )
inlinevirtual

Returns the default device to use when the driver is selected, or -1 for none.

◆ getInputDeviceName()

virtual std::string rack::midi::Driver::getInputDeviceName ( int deviceId)
inlinevirtual

Returns the name of an input device without obtaining it.

◆ subscribeInput()

virtual InputDevice * rack::midi::Driver::subscribeInput ( int deviceId,
Input * input )
inlinevirtual

Adds the given port as a reference holder of a device and returns the it.

Creates the Device if no ports are subscribed before calling.

◆ unsubscribeInput()

virtual void rack::midi::Driver::unsubscribeInput ( int deviceId,
Input * input )
inlinevirtual

Removes the give port as a reference holder of a device.

Deletes the Device if no ports are subscribed after calling.

◆ getOutputDeviceIds()

virtual std::vector< int > rack::midi::Driver::getOutputDeviceIds ( )
inlinevirtual

◆ getDefaultOutputDeviceId()

virtual int rack::midi::Driver::getDefaultOutputDeviceId ( )
inlinevirtual

◆ getOutputDeviceName()

virtual std::string rack::midi::Driver::getOutputDeviceName ( int deviceId)
inlinevirtual

◆ subscribeOutput()

virtual OutputDevice * rack::midi::Driver::subscribeOutput ( int deviceId,
Output * output )
inlinevirtual

◆ unsubscribeOutput()

virtual void rack::midi::Driver::unsubscribeOutput ( int deviceId,
Output * output )
inlinevirtual

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