SCUMM: Remove unused iMuse MIDI 'passthrough' code
This commit is contained in:
parent
4172414e35
commit
756f592b61
5 changed files with 5 additions and 27 deletions
|
@ -57,7 +57,6 @@ _initialized(false),
|
||||||
_tempoFactor(0),
|
_tempoFactor(0),
|
||||||
_player_limit(ARRAYSIZE(_players)),
|
_player_limit(ARRAYSIZE(_players)),
|
||||||
_recycle_players(false),
|
_recycle_players(false),
|
||||||
_direct_passthrough(false),
|
|
||||||
_queue_end(0),
|
_queue_end(0),
|
||||||
_queue_pos(0),
|
_queue_pos(0),
|
||||||
_queue_sound(0),
|
_queue_sound(0),
|
||||||
|
@ -472,10 +471,6 @@ uint32 IMuseInternal::property(int prop, uint32 value) {
|
||||||
_recycle_players = (value != 0);
|
_recycle_players = (value != 0);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case IMuse::PROP_DIRECT_PASSTHROUGH:
|
|
||||||
_direct_passthrough = (value != 0);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case IMuse::PROP_GAME_ID:
|
case IMuse::PROP_GAME_ID:
|
||||||
_game_id = value;
|
_game_id = value;
|
||||||
break;
|
break;
|
||||||
|
@ -636,7 +631,7 @@ bool IMuseInternal::startSound_internal(int sound, int offset) {
|
||||||
|
|
||||||
player->clear();
|
player->clear();
|
||||||
player->setOffsetNote(offset);
|
player->setOffsetNote(offset);
|
||||||
return player->startSound(sound, driver, _direct_passthrough);
|
return player->startSound(sound, driver);
|
||||||
}
|
}
|
||||||
|
|
||||||
int IMuseInternal::stopSound_internal(int sound) {
|
int IMuseInternal::stopSound_internal(int sound) {
|
||||||
|
|
|
@ -58,7 +58,6 @@ public:
|
||||||
PROP_GS,
|
PROP_GS,
|
||||||
PROP_LIMIT_PLAYERS,
|
PROP_LIMIT_PLAYERS,
|
||||||
PROP_RECYCLE_PLAYERS,
|
PROP_RECYCLE_PLAYERS,
|
||||||
PROP_DIRECT_PASSTHROUGH,
|
|
||||||
PROP_GAME_ID
|
PROP_GAME_ID
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -174,7 +174,6 @@ protected:
|
||||||
protected:
|
protected:
|
||||||
MidiDriver *_midi;
|
MidiDriver *_midi;
|
||||||
MidiParser *_parser;
|
MidiParser *_parser;
|
||||||
bool _passThrough; // Only respond to EOT, all else direct to MidiDriver
|
|
||||||
|
|
||||||
Part *_parts;
|
Part *_parts;
|
||||||
bool _active;
|
bool _active;
|
||||||
|
@ -278,7 +277,7 @@ public:
|
||||||
void setSpeed(byte speed);
|
void setSpeed(byte speed);
|
||||||
int setTranspose(byte relative, int b);
|
int setTranspose(byte relative, int b);
|
||||||
int setVolume(byte vol);
|
int setVolume(byte vol);
|
||||||
bool startSound(int sound, MidiDriver *midi, bool passThrough);
|
bool startSound(int sound, MidiDriver *midi);
|
||||||
int getMusicTimer() const;
|
int getMusicTimer() const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@ -425,7 +424,6 @@ protected:
|
||||||
|
|
||||||
int _player_limit; // Limits how many simultaneous music tracks are played
|
int _player_limit; // Limits how many simultaneous music tracks are played
|
||||||
bool _recycle_players; // Can we stop a player in order to start another one?
|
bool _recycle_players; // Can we stop a player in order to start another one?
|
||||||
bool _direct_passthrough; // Pass data direct to MidiDriver (no interactivity)
|
|
||||||
|
|
||||||
uint _queue_end, _queue_pos, _queue_sound;
|
uint _queue_end, _queue_pos, _queue_sound;
|
||||||
byte _queue_adding;
|
byte _queue_adding;
|
||||||
|
|
|
@ -61,7 +61,6 @@ uint16 Player::_active_notes[128];
|
||||||
Player::Player() :
|
Player::Player() :
|
||||||
_midi(NULL),
|
_midi(NULL),
|
||||||
_parser(NULL),
|
_parser(NULL),
|
||||||
_passThrough(0),
|
|
||||||
_parts(NULL),
|
_parts(NULL),
|
||||||
_active(false),
|
_active(false),
|
||||||
_scanning(false),
|
_scanning(false),
|
||||||
|
@ -93,7 +92,7 @@ Player::~Player() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Player::startSound(int sound, MidiDriver *midi, bool passThrough) {
|
bool Player::startSound(int sound, MidiDriver *midi) {
|
||||||
void *ptr;
|
void *ptr;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
@ -119,7 +118,6 @@ bool Player::startSound(int sound, MidiDriver *midi, bool passThrough) {
|
||||||
_pan = 0;
|
_pan = 0;
|
||||||
_transpose = 0;
|
_transpose = 0;
|
||||||
_detune = 0;
|
_detune = 0;
|
||||||
_passThrough = passThrough;
|
|
||||||
|
|
||||||
for (i = 0; i < ARRAYSIZE(_parameterFaders); ++i)
|
for (i = 0; i < ARRAYSIZE(_parameterFaders); ++i)
|
||||||
_parameterFaders[i].init();
|
_parameterFaders[i].init();
|
||||||
|
@ -227,11 +225,6 @@ void Player::setSpeed(byte speed) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Player::send(uint32 b) {
|
void Player::send(uint32 b) {
|
||||||
if (_passThrough) {
|
|
||||||
_midi->send(b);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
byte cmd = (byte)(b & 0xF0);
|
byte cmd = (byte)(b & 0xF0);
|
||||||
byte chan = (byte)(b & 0x0F);
|
byte chan = (byte)(b & 0x0F);
|
||||||
byte param1 = (byte)((b >> 8) & 0xFF);
|
byte param1 = (byte)((b >> 8) & 0xFF);
|
||||||
|
@ -348,11 +341,6 @@ void Player::sysEx(const byte *p, uint16 len) {
|
||||||
byte buf[128];
|
byte buf[128];
|
||||||
Part *part;
|
Part *part;
|
||||||
|
|
||||||
if (_passThrough) {
|
|
||||||
_midi->sysEx(p, len);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Check SysEx manufacturer.
|
// Check SysEx manufacturer.
|
||||||
a = *p++;
|
a = *p++;
|
||||||
--len;
|
--len;
|
||||||
|
|
|
@ -1858,17 +1858,15 @@ void ScummEngine::setupMusic(int midi) {
|
||||||
if (ConfMan.hasKey("tempo"))
|
if (ConfMan.hasKey("tempo"))
|
||||||
_imuse->property(IMuse::PROP_TEMPO_BASE, ConfMan.getInt("tempo"));
|
_imuse->property(IMuse::PROP_TEMPO_BASE, ConfMan.getInt("tempo"));
|
||||||
// YM2162 driver can't handle midi->getPercussionChannel(), NULL shouldn't init MT-32/GM/GS
|
// YM2162 driver can't handle midi->getPercussionChannel(), NULL shouldn't init MT-32/GM/GS
|
||||||
if (/*(midi != MDT_TOWNS) && (*/midi != MDT_NONE/*)*/) {
|
if (midi != MDT_NONE) {
|
||||||
_imuse->property(IMuse::PROP_NATIVE_MT32, _native_mt32);
|
_imuse->property(IMuse::PROP_NATIVE_MT32, _native_mt32);
|
||||||
if (MidiDriver::getMusicType(dev) != MT_MT32) // MT-32 Emulation shouldn't be GM/GS initialized
|
if (MidiDriver::getMusicType(dev) != MT_MT32) // MT-32 Emulation shouldn't be GM/GS initialized
|
||||||
_imuse->property(IMuse::PROP_GS, _enable_gs);
|
_imuse->property(IMuse::PROP_GS, _enable_gs);
|
||||||
}
|
}
|
||||||
if (_game.heversion >= 60 /*|| midi == MDT_TOWNS*/) {
|
if (_game.heversion >= 60) {
|
||||||
_imuse->property(IMuse::PROP_LIMIT_PLAYERS, 1);
|
_imuse->property(IMuse::PROP_LIMIT_PLAYERS, 1);
|
||||||
_imuse->property(IMuse::PROP_RECYCLE_PLAYERS, 1);
|
_imuse->property(IMuse::PROP_RECYCLE_PLAYERS, 1);
|
||||||
}
|
}
|
||||||
/*if (midi == MDT_TOWNS)
|
|
||||||
_imuse->property(IMuse::PROP_DIRECT_PASSTHROUGH, 1);*/
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue