aboutsummaryrefslogtreecommitdiff
path: root/sound/mods/infogrames.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'sound/mods/infogrames.cpp')
-rw-r--r--sound/mods/infogrames.cpp25
1 files changed, 10 insertions, 15 deletions
diff --git a/sound/mods/infogrames.cpp b/sound/mods/infogrames.cpp
index b577049657..3f607d213e 100644
--- a/sound/mods/infogrames.cpp
+++ b/sound/mods/infogrames.cpp
@@ -171,7 +171,7 @@ void Infogrames::init() {
_chn[i].periodMod = 0;
}
- _end = _data == 0;
+ _end = (_data == 0);
}
void Infogrames::reset() {
@@ -231,8 +231,7 @@ bool Infogrames::load(Common::SeekableReadStream &dum) {
(_cmdBlocks > (_data + size)))
return false;
- _end = false;
- _playing = true;
+ startPaula();
return true;
}
@@ -244,8 +243,6 @@ void Infogrames::unload(void) {
clearVoices();
reset();
-
- _end = true;
}
void Infogrames::getNextSample(Channel &chn) {
@@ -427,15 +424,14 @@ void Infogrames::interrupt() {
_volume = 0;
_period = 0;
getNextSample(_chn[chn]);
- _voice[chn].volume = _volume;
- _voice[chn].period = _period;
+ setChannelVolume(chn, _volume);
+ setChannelPeriod(chn, _period);
if ((_sample != 0xFF) && (_sample < _instruments->_count)) {
- _voice[chn].data = _instruments->_samples[_sample].data;
- _voice[chn].length = _instruments->_samples[_sample].length;
- _voice[chn].dataRepeat = _instruments->_samples[_sample].dataRepeat;
- _voice[chn].lengthRepeat =
- _instruments->_samples[_sample].lengthRepeat;
- _voice[chn].offset = 0;
+ setChannelData(chn,
+ _instruments->_samples[_sample].data,
+ _instruments->_samples[_sample].dataRepeat,
+ _instruments->_samples[_sample].length,
+ _instruments->_samples[_sample].lengthRepeat);
_sample = 0xFF;
}
}
@@ -449,8 +445,7 @@ void Infogrames::interrupt() {
_repCount--;
init();
} else if (_repCount != -1) {
- _end = true;
- _playing = false;
+ stopPaula();
} else {
init();
}