C# Class NScumm.Core.Audio.MidiDriverBase

Inheritance: IMidiDriver
Mostra file Open project: scemino/nscumm

Public Methods

Method Description
MetaEvent ( byte type, byte data, ushort length ) : void
Send ( byte status, byte firstOp, byte secondOp ) : void

Output a midi command to the midi stream. Convenience wrapper around the usual 'packed' send method. Do NOT use this for sysEx transmission; instead, use the sysEx() method below.

Send ( int b ) : void

Output a packed midi command to the midi stream. The 'lowest' byte (i.e. b & 0xFF) is the status code, then come (if used) the first and second opcode.

SysEx ( byte msg, ushort length ) : void

Transmit a sysEx to the midi device. The given msg MUST NOT contain the usual SysEx frame, i.e. do NOT include the leading 0xF0 and the trailing 0xF7. Furthermore, the maximal supported length of a SysEx is 264 bytes. Passing longer buffers can lead to undefined behavior (most likely, a crash).

Method Details

MetaEvent() public method

public MetaEvent ( byte type, byte data, ushort length ) : void
type byte
data byte
length ushort
return void

Send() public method

Output a midi command to the midi stream. Convenience wrapper around the usual 'packed' send method. Do NOT use this for sysEx transmission; instead, use the sysEx() method below.
public Send ( byte status, byte firstOp, byte secondOp ) : void
status byte Status.
firstOp byte First op.
secondOp byte Second op.
return void

Send() public abstract method

Output a packed midi command to the midi stream. The 'lowest' byte (i.e. b & 0xFF) is the status code, then come (if used) the first and second opcode.
public abstract Send ( int b ) : void
b int The blue component.
return void

SysEx() public method

Transmit a sysEx to the midi device. The given msg MUST NOT contain the usual SysEx frame, i.e. do NOT include the leading 0xF0 and the trailing 0xF7. Furthermore, the maximal supported length of a SysEx is 264 bytes. Passing longer buffers can lead to undefined behavior (most likely, a crash).
public SysEx ( byte msg, ushort length ) : void
msg byte
length ushort
return void