![]() |
wxMidi - A MIDI interface based on PortMidi
|
Class wxMidiSystem is the entry point to the wxMidi library. More...
#include <wxMidi.h>
Public Member Functions | |
~wxMidiSystem () | |
Destructor. | |
wxMidiTimestamp | GetTime () |
Returns current value of the Midi timer. More... | |
const wxString | GetErrorText (wxMidiError errnum) |
Translates a portmidi error number into a human readable message. More... | |
wxString | GetHostErrorText () |
Translate portmidi host error into human readable message. More... | |
int | CountDevices () |
Returns the number of MIDI devices present in the system. More... | |
Static Public Member Functions | |
static wxMidiSystem * | GetInstance () |
Returns a pointer to the only wxMidiSystem instance. More... | |
Class wxMidiSystem is the entry point to the wxMidi library.
It provides information about, and access to, the set of installed MIDI devices.
wxMidiSystem is a singleton and, therefore, the constructor is not public. Access to the only instance must be through method wxMidiSystem::GetInstance().
|
inline |
Returns the number of MIDI devices present in the system.
The IDs of the MIDI devices will range from 0 to CountDevices() - 1. So, for example, if CountDevices() returns 3, it means that there are three MIDI devices in the system and that their IDs will be 0, 1 and 2. To determine if they are output devices or input devices, you will have to instantiate the corresponding wxMidiDevice object and use methods wxMidiDevice::IsInput() or wxMidiDevice::IsOutput(), as in the following example:
const wxString wxMidiSystem::GetErrorText | ( | wxMidiError | errnum | ) |
Translates a portmidi error number into a human readable message.
For an explanation of error codes see wxMidi error codes.
wxString wxMidiSystem::GetHostErrorText | ( | ) |
Translate portmidi host error into human readable message.
After this routine executes, the host error is cleared.
|
static |
Returns a pointer to the only wxMidiSystem instance.
Note that wxMidiSystem is a singleton and, therefore, the constructor is not public. Access to the only instance must be through this GetInstance() method.
|
inline |
Returns current value of the Midi timer.
This timer is started when the Midi package is initialized and has a resolution of one millisecond.