mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-12 03:56:20 +00:00
- HOF: bug fix for music driver
- KYRA1 PC98: fix music file selection svn-id: r32819
This commit is contained in:
parent
b6ad2b0035
commit
e97dff9f33
@ -57,12 +57,12 @@ void KyraEngine_LoK::snd_playWanderScoreViaMap(int command, int restart) {
|
||||
_sound->haltTrack();
|
||||
}
|
||||
} else if (_flags.platform == Common::kPlatformPC98) {
|
||||
|
||||
//////////////
|
||||
//// TODO ////
|
||||
//////////////
|
||||
_sound->playTrack(command);
|
||||
|
||||
if (command == 1)
|
||||
_sound->beginFadeOut();
|
||||
else if (command >= 2)
|
||||
_sound->playTrack(command);
|
||||
else
|
||||
_sound->haltTrack();
|
||||
} else {
|
||||
KyraEngine_v1::snd_playWanderScoreViaMap(command, restart);
|
||||
}
|
||||
|
@ -1273,6 +1273,8 @@ void TownsPC98_OpnOperator::generateOutput(int phasebuf, int *feedbuf, int &out)
|
||||
o = &feedbuf[0];
|
||||
i = &feedbuf[1];
|
||||
phaseShift = _feedbackLevel ? ((feedbuf[0] + feedbuf[1]) << _feedbackLevel) : 0;
|
||||
if (phasebuf == -1)
|
||||
*i = 0;
|
||||
*o = *i;
|
||||
} else {
|
||||
phaseShift = phasebuf << 15;
|
||||
@ -1796,7 +1798,7 @@ void TownsPC98_OpnDriver::nextTick(int16 *buffer, uint32 bufferSize) {
|
||||
break;
|
||||
case 5:
|
||||
*del = feed[1];
|
||||
_channels[i]->opr[0]->generateOutput(0, feed, phbuf1);
|
||||
_channels[i]->opr[0]->generateOutput(-1, feed, phbuf1);
|
||||
_channels[i]->opr[2]->generateOutput(*del, 0, output);
|
||||
_channels[i]->opr[1]->generateOutput(*del, 0, output);
|
||||
_channels[i]->opr[3]->generateOutput(*del, 0, output);
|
||||
@ -2707,6 +2709,9 @@ bool SoundPC98::init() {
|
||||
}
|
||||
|
||||
void SoundPC98::playTrack(uint8 track) {
|
||||
if (--track >= 56)
|
||||
track -= 55;
|
||||
|
||||
if (track == _lastTrack && _musicEnabled)
|
||||
return;
|
||||
|
||||
@ -2715,9 +2720,7 @@ void SoundPC98::playTrack(uint8 track) {
|
||||
char musicfile[13];
|
||||
sprintf(musicfile, fileListEntry(0), track);
|
||||
delete[] _musicTrackData;
|
||||
// This is just for testing purposes atm since we haven't found a way
|
||||
// to determine the correct file yet
|
||||
_musicTrackData = _vm->resource()->fileData("kyram40.dat"/*musicfile*/, 0);
|
||||
_musicTrackData = _vm->resource()->fileData(musicfile, 0);
|
||||
if (_musicEnabled)
|
||||
_driver->loadData(_musicTrackData);
|
||||
|
||||
@ -2767,6 +2770,7 @@ bool SoundTownsPC98_v2::init() {
|
||||
(Common::File::exists("track1.mp3") || Common::File::exists("track1.ogg") ||
|
||||
Common::File::exists("track1.flac") || Common::File::exists("track1.fla")))
|
||||
_musicEnabled = 2;
|
||||
_musicEnabled = 1;
|
||||
return _driver->init();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user