ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

TODO: Document this, give it a better name. More...

#include <mididrv.h>

Inheritance diagram for MidiDriver_BASE:
Collaboration diagram for MidiDriver_BASE:

List of all members.

Public Member Functions

 MidiDriver_BASE ()
virtual ~MidiDriver_BASE ()
virtual void send (uint32 b)=0
 Output a packed midi command to the midi stream.
void send (byte status, byte firstOp, byte secondOp)
 Output a midi command to the midi stream.
virtual void sysEx (const byte *msg, uint16 length)
 Transmit a sysEx to the midi device.
virtual void metaEvent (byte type, byte *data, uint16 length)

Protected Member Functions

void midiDumpInit ()
 Initialize midi dumping mechanism, called only if enabled.
int midiDumpVarLength (const uint32 &delta)
 Handles MIDI file variable length dumping.
void midiDumpDelta ()
 Handles MIDI file time delta dumping.
void midiDumpDo (uint32 b)
 Performs dumping of MIDI commands, called only if enabled.
void midiDumpSysEx (const byte *msg, uint16 length)
 Performs dumping of MIDI SysEx commands, called only if enabled.
void midiDumpFinish ()
 Writes the captured MIDI events to disk, called only if enabled.

Protected Attributes

bool _midiDumpEnable
 Enables midi dumping to a 'dump.mid' file and to debug messages on screen It's set by '--dump-midi' command line parameter.
uint32 _prevMillis
 Used for MIDI dumping delta calculation.
Common::Array< byte_midiDumpCache
 Stores all MIDI events, will be written to disk after an engine quits.

Detailed Description

TODO: Document this, give it a better name.

Definition at line 88 of file mididrv.h.


Constructor & Destructor Documentation

MidiDriver_BASE::MidiDriver_BASE (  ) 

Definition at line 473 of file mididrv.cpp.

MidiDriver_BASE::~MidiDriver_BASE (  )  [virtual]

Definition at line 477 of file mididrv.cpp.


Member Function Documentation

virtual void MidiDriver_BASE::metaEvent ( byte  type,
byte data,
uint16  length 
) [inline, virtual]

Definition at line 125 of file mididrv.h.

void MidiDriver_BASE::midiDumpDelta (  )  [protected]

Handles MIDI file time delta dumping.

Definition at line 456 of file mididrv.cpp.

void MidiDriver_BASE::midiDumpDo ( uint32  b  )  [protected]

Performs dumping of MIDI commands, called only if enabled.

Definition at line 460 of file mididrv.cpp.

void MidiDriver_BASE::midiDumpFinish (  )  [protected]

Writes the captured MIDI events to disk, called only if enabled.

Definition at line 469 of file mididrv.cpp.

void MidiDriver_BASE::midiDumpInit (  )  [protected]

Initialize midi dumping mechanism, called only if enabled.

Definition at line 447 of file mididrv.cpp.

void MidiDriver_BASE::midiDumpSysEx ( const byte msg,
uint16  length 
) [protected]

Performs dumping of MIDI SysEx commands, called only if enabled.

Definition at line 464 of file mididrv.cpp.

int MidiDriver_BASE::midiDumpVarLength ( const uint32 delta  )  [protected]

Handles MIDI file variable length dumping.

Definition at line 451 of file mididrv.cpp.

void MidiDriver_BASE::send ( byte  status,
byte  firstOp,
byte  secondOp 
)

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.

Definition at line 481 of file mididrv.cpp.

virtual void MidiDriver_BASE::send ( uint32  b  )  [pure virtual]

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.

virtual void MidiDriver_BASE::sysEx ( const byte msg,
uint16  length 
) [inline, virtual]

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).

Definition at line 122 of file mididrv.h.


Member Data Documentation

Stores all MIDI events, will be written to disk after an engine quits.

Definition at line 139 of file mididrv.h.

Enables midi dumping to a 'dump.mid' file and to debug messages on screen It's set by '--dump-midi' command line parameter.

Definition at line 133 of file mididrv.h.

Used for MIDI dumping delta calculation.

Definition at line 136 of file mididrv.h.


The documentation for this class was generated from the following files:


Generated on Sat May 30 2020 05:02:24 for ResidualVM by doxygen 1.7.1
curved edge   curved edge