24#if defined(RTMIDI_EXPORT)
25#if defined _WIN32 || defined __CYGWIN__
26#define RTMIDIAPI __declspec(dllexport)
28#define RTMIDIAPI __attribute__((visibility("default")))
98 size_t messageSize,
void *userData);
136RTMIDIAPI
void rtmidi_error (
enum RtMidiErrorType type,
const char* errorString);
145RTMIDIAPI
void rtmidi_open_port (RtMidiPtr device,
unsigned int portNumber,
const char *portName);
RTMIDIAPI void rtmidi_in_set_callback(RtMidiInPtr device, RtMidiCCallback callback, void *userData)
Set a callback function to be invoked for incoming MIDI messages. See RtMidiIn::setCallback().
RTMIDIAPI enum RtMidiApi rtmidi_in_get_current_api(RtMidiPtr device)
Returns the MIDI API specifier for the given instance of RtMidiIn. See RtMidiIn::getCurrentApi().
RtMidiApi
MIDI API specifier arguments. See RtMidi::Api.
Definition rtmidi_c.h:61
void * ptr
The wrapped RtMidi object.
Definition rtmidi_c.h:41
RtMidiErrorType
Defined RtMidiError types. See RtMidiError::Type.
Definition rtmidi_c.h:75
RTMIDIAPI void rtmidi_open_virtual_port(RtMidiPtr device, const char *portName)
Creates a virtual MIDI port to which other software applications can connect.
RTMIDIAPI double rtmidi_in_get_message(RtMidiInPtr device, unsigned char *message, size_t *size)
RTMIDIAPI RtMidiInPtr rtmidi_in_create_default(void)
Create a default RtMidiInPtr value, with no initialization.
RTMIDIAPI void rtmidi_close_port(RtMidiPtr device)
Close a MIDI connection. See RtMidi::closePort().
const char * msg
If an error occurred (ok != true), set to an error message.
Definition rtmidi_c.h:48
RTMIDIAPI void rtmidi_in_ignore_types(RtMidiInPtr device, bool midiSysex, bool midiTime, bool midiSense)
Specify whether certain MIDI message types should be queued or ignored during input....
RTMIDIAPI int rtmidi_get_compiled_api(enum RtMidiApi *apis, unsigned int apis_size)
Determine the available compiled MIDI APIs.
RTMIDIAPI RtMidiOutPtr rtmidi_out_create(enum RtMidiApi api, const char *clientName)
Create a RtMidiOutPtr value, with given and clientName.
bool ok
True when the last function call was OK.
Definition rtmidi_c.h:45
RTMIDIAPI void rtmidi_in_cancel_callback(RtMidiInPtr device)
Cancel use of the current callback function (if one exists). See RtMidiIn::cancelCallback().
RTMIDIAPI void rtmidi_open_port(RtMidiPtr device, unsigned int portNumber, const char *portName)
Open a MIDI port.
RTMIDIAPI int rtmidi_out_send_message(RtMidiOutPtr device, const unsigned char *message, int length)
Immediately send a single message out an open MIDI output port. See RtMidiOut::sendMessage().
RTMIDIAPI void rtmidi_out_free(RtMidiOutPtr device)
Free the given RtMidiOutPtr.
RTMIDIAPI const char * rtmidi_get_version()
Return the current RtMidi version. ! See RtMidi::getVersion().
RTMIDIAPI RtMidiInPtr rtmidi_in_create(enum RtMidiApi api, const char *clientName, unsigned int queueSizeLimit)
Create a RtMidiInPtr value, with given api, clientName and queueSizeLimit.
RTMIDIAPI void rtmidi_in_free(RtMidiInPtr device)
Free the given RtMidiInPtr.
void(* RtMidiCCallback)(double timeStamp, const unsigned char *message, size_t messageSize, void *userData)
The type of a RtMidi callback function.
Definition rtmidi_c.h:97
RTMIDIAPI unsigned int rtmidi_get_port_count(RtMidiPtr device)
Return the number of available MIDI ports. See RtMidi::getPortCount().
RTMIDIAPI enum RtMidiApi rtmidi_out_get_current_api(RtMidiPtr device)
Returns the MIDI API specifier for the given instance of RtMidiOut. See RtMidiOut::getCurrentApi().
RTMIDIAPI int rtmidi_get_port_name(RtMidiPtr device, unsigned int portNumber, char *bufOut, int *bufLen)
Access a string identifier for the specified MIDI input port number.
RTMIDIAPI const char * rtmidi_api_name(enum RtMidiApi api)
Return the name of a specified compiled MIDI API. See RtMidi::getApiName().
RTMIDIAPI enum RtMidiApi rtmidi_compiled_api_by_name(const char *name)
Return the compiled MIDI API having the given name. See RtMidi::getCompiledApiByName().
RTMIDIAPI const char * rtmidi_api_display_name(enum RtMidiApi api)
Return the display name of a specified compiled MIDI API. See RtMidi::getApiDisplayName().
RTMIDIAPI RtMidiOutPtr rtmidi_out_create_default(void)
Create a default RtMidiInPtr value, with no initialization.
@ RTMIDI_API_NUM
Definition rtmidi_c.h:71
@ RTMIDI_API_LINUX_ALSA
Definition rtmidi_c.h:64
@ RTMIDI_API_WINDOWS_MM
Definition rtmidi_c.h:66
@ RTMIDI_API_MACOSX_CORE
Definition rtmidi_c.h:63
@ RTMIDI_API_RTMIDI_DUMMY
Definition rtmidi_c.h:67
@ RTMIDI_API_WINDOWS_UWP
Definition rtmidi_c.h:69
@ RTMIDI_API_WEB_MIDI_API
Definition rtmidi_c.h:68
@ RTMIDI_API_UNSPECIFIED
Definition rtmidi_c.h:62
@ RTMIDI_API_UNIX_JACK
Definition rtmidi_c.h:65
@ RTMIDI_API_ANDROID
Definition rtmidi_c.h:70
@ RTMIDI_ERROR_INVALID_PARAMETER
Definition rtmidi_c.h:82
@ RTMIDI_ERROR_MEMORY_ERROR
Definition rtmidi_c.h:81
@ RTMIDI_ERROR_UNSPECIFIED
Definition rtmidi_c.h:78
@ RTMIDI_ERROR_INVALID_USE
Definition rtmidi_c.h:83
@ RTMIDI_ERROR_DRIVER_ERROR
Definition rtmidi_c.h:84
@ RTMIDI_ERROR_DEBUG_WARNING
Definition rtmidi_c.h:77
@ RTMIDI_ERROR_WARNING
Definition rtmidi_c.h:76
@ RTMIDI_ERROR_SYSTEM_ERROR
Definition rtmidi_c.h:85
@ RTMIDI_ERROR_NO_DEVICES_FOUND
Definition rtmidi_c.h:79
@ RTMIDI_ERROR_INVALID_DEVICE
Definition rtmidi_c.h:80
@ RTMIDI_ERROR_THREAD_ERROR
Definition rtmidi_c.h:86
Wraps an RtMidi object for C function return statuses.
Definition rtmidi_c.h:39