Represents a MIDI out device.
More...
|
| MidiOut (int deviceNo) |
| Opens a specified MIDI out device.
|
|
void | Close () |
| Closes the current resource.
|
|
void | Dispose () |
| Releases the unmanaged resources used by the T:YourClassName and optionally releases the managed resources.
|
|
void | Reset () |
| Resets the MIDI output device.
|
|
void | SendDriverMessage (int message, int param1, int param2) |
| Sends a driver message to the MIDI output device.
|
|
void | Send (int message) |
| Sends a MIDI message using the specified handle.
|
|
void | SendBuffer (byte[] byteBuffer) |
| Sends the specified byte buffer to the MIDI output device.
|
|
|
virtual void | Dispose (bool disposing) |
| Closes the MIDI out device.
|
|
|
static int | NumberOfDevices [get] |
| Gets the number of MIDI devices available in the system.
|
|
int | Volume [get, set] |
| Gets or sets the volume for this MIDI out device.
|
|
|
void | Callback (IntPtr midiInHandle, MidiInterop.MidiOutMessage message, IntPtr userData, IntPtr messageParameter1, IntPtr messageParameter2) |
| Callback function for MIDI input messages.
|
|
| ~MidiOut () |
| Cleanup.
|
|
Represents a MIDI out device.
◆ MidiOut()
NAudio.Midi.MidiOut.MidiOut |
( |
int | deviceNo | ) |
|
|
inline |
Opens a specified MIDI out device.
- Parameters
-
deviceNo | The device number |
◆ ~MidiOut()
NAudio.Midi.MidiOut.~MidiOut |
( |
| ) |
|
|
inlineprivate |
◆ Callback()
void NAudio.Midi.MidiOut.Callback |
( |
IntPtr | midiInHandle, |
|
|
MidiInterop::MidiOutMessage | message, |
|
|
IntPtr | userData, |
|
|
IntPtr | messageParameter1, |
|
|
IntPtr | messageParameter2 ) |
|
inlineprivate |
Callback function for MIDI input messages.
- Parameters
-
midiInHandle | Handle to the MIDI input device. |
message | The MIDI output message. |
userData | User-defined data. |
messageParameter1 | First message parameter. |
messageParameter2 | Second message parameter. |
◆ Close()
void NAudio.Midi.MidiOut.Close |
( |
| ) |
|
|
inline |
Closes the current resource.
This method calls the Dispose method to release resources used by the current instance.
◆ DeviceInfo()
Retrieves the capabilities of the specified MIDI output device.
- Parameters
-
midiOutDeviceNumber | The number of the MIDI output device for which to retrieve the capabilities. |
- Returns
- The capabilities of the specified MIDI output device as a MidiOutCapabilities object.
- Exceptions
-
MmException | Thrown when an error occurs while retrieving the device capabilities using the function midiOutGetDevCaps . |
◆ Dispose() [1/2]
void NAudio.Midi.MidiOut.Dispose |
( |
| ) |
|
|
inline |
Releases the unmanaged resources used by the T:YourClassName and optionally releases the managed resources.
- Parameters
-
disposing | true to release both managed and unmanaged resources; false to release only unmanaged resources. |
This method disposes of the unmanaged resources used by the T:YourClassName. If disposing is true, it also disposes of the managed resources. This method should be called when the object is no longer needed, to release the resources it holds.
◆ Dispose() [2/2]
virtual void NAudio.Midi.MidiOut.Dispose |
( |
bool | disposing | ) |
|
|
inlineprotectedvirtual |
Closes the MIDI out device.
- Parameters
-
disposing | True if called from Dispose |
◆ Reset()
void NAudio.Midi.MidiOut.Reset |
( |
| ) |
|
|
inline |
Resets the MIDI output device.
- Exceptions
-
MmException | Thrown when an error occurs while resetting the MIDI output device. |
This method resets the MIDI output device represented by the handle hMidiOut .
◆ Send()
void NAudio.Midi.MidiOut.Send |
( |
int | message | ) |
|
|
inline |
Sends a MIDI message using the specified handle.
- Parameters
-
message | The MIDI message to be sent. |
- Exceptions
-
MmException | Thrown when an error occurs while sending the MIDI message. |
◆ SendBuffer()
void NAudio.Midi.MidiOut.SendBuffer |
( |
byte[] | byteBuffer | ) |
|
|
inline |
Sends the specified byte buffer to the MIDI output device.
- Parameters
-
byteBuffer | The byte array to be sent to the MIDI output device. |
This method prepares the header for the byte buffer, copies the byte buffer to unmanaged memory, and sends it to the MIDI output device. If an error occurs during the sending process, the method unprepares the header and frees the allocated memory.
◆ SendDriverMessage()
void NAudio.Midi.MidiOut.SendDriverMessage |
( |
int | message, |
|
|
int | param1, |
|
|
int | param2 ) |
|
inline |
Sends a driver message to the MIDI output device.
- Parameters
-
message | The message to be sent to the MIDI output device. |
param1 | The first parameter for the driver message. |
param2 | The second parameter for the driver message. |
- Exceptions
-
MmException | Thrown when an error occurs while sending the driver message. |
◆ callback
MidiInterop.MidiOutCallback NAudio.Midi.MidiOut.callback |
|
private |
◆ disposed
bool NAudio.Midi.MidiOut.disposed = false |
|
private |
◆ hMidiOut
IntPtr NAudio.Midi.MidiOut.hMidiOut = IntPtr.Zero |
|
private |
◆ NumberOfDevices
int NAudio.Midi.MidiOut.NumberOfDevices |
|
staticget |
Gets the number of MIDI devices available in the system.
◆ Volume
int NAudio.Midi.MidiOut.Volume |
|
getset |
Gets or sets the volume for this MIDI out device.
The documentation for this class was generated from the following file:
- /Users/sumansaurabh/Documents/my-startup/xeno-rat/Plugins/LiveMicrophone/lib/NAudio.Midi/Midi/MidiOut.cs