mirror of
https://github.com/scummvm/scummvm.git
synced 2026-06-20 05:45:29 +00:00
Absorbed last tidbits of mididrv.cpp into other files
svn-id: r7606
This commit is contained in:
+1
-1
@@ -56,7 +56,7 @@ public:
|
||||
virtual void send(uint32 b) = 0;
|
||||
|
||||
// Get or set a property
|
||||
virtual uint32 property(int prop, uint32 param);
|
||||
virtual uint32 property(int prop, uint32 param) { return 0; }
|
||||
|
||||
// Retrieve a string representation of an error code
|
||||
static const char *getErrorName(int error_code);
|
||||
|
||||
@@ -62,6 +62,20 @@ void MidiChannel_MPU401::sysEx_customInstrument(uint32 type, byte *instr) {
|
||||
_owner->sysEx_customInstrument (_channel, type, instr);
|
||||
}
|
||||
|
||||
const char *MidiDriver::getErrorName(int error_code) {
|
||||
static const char *const midi_errors[] = {
|
||||
"No error",
|
||||
"Cannot connect",
|
||||
"Streaming not available",
|
||||
"Device not available",
|
||||
"Driver already open"
|
||||
};
|
||||
|
||||
if ((uint) error_code >= ARRAYSIZE(midi_errors))
|
||||
return "Unknown Error";
|
||||
return midi_errors[error_code];
|
||||
}
|
||||
|
||||
MidiDriver_MPU401::MidiDriver_MPU401() : MidiDriver() {
|
||||
uint i;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user