removed unused function, simplified handlePattern

svn-id: r29139
This commit is contained in:
Gregory Montoir 2007-09-30 11:16:25 +00:00
parent b767eb771b
commit 28c1f3fbb3

View File

@ -62,7 +62,6 @@ protected:
void updateEffects(int ch);
void handleTick();
void enablePaulaChannel(uint8 channel);
void disablePaulaChannel(uint8 channel);
void setupPaulaChannel(uint8 channel, const int8 *data, uint16 len, uint16 repeatPos, uint16 repeatLen);
@ -176,7 +175,15 @@ void SoundFx::play() {
void SoundFx::handlePattern(int ch, uint32 pat) {
uint16 note1 = pat >> 16;
uint16 note2 = pat & 0xFFFF;
if (note1 != 0xFFFD) {
if (note1 == 0xFFFD) { // PIC
_effects[ch] = 0;
return;
}
_effects[ch] = note2;
if (note1 == 0xFFFE) { // STP
disablePaulaChannel(ch);
return;
}
int ins = (note2 & 0xF000) >> 12;
if (ins != 0) {
SoundFxInstrument *i = &_instruments[ins - 1];
@ -199,15 +206,8 @@ void SoundFx::handlePattern(int ch, uint32 pat) {
}
setChannelVolume(ch, volume);
}
}
_effects[ch] = note2;
if (note1 == 0xFFFD) { // PIC
_effects[ch] = 0;
} else if (note1 == 0xFFFE) { // STP
disablePaulaChannel(ch);
} else if (note1 != 0) {
if (note1 != 0) {
setChannelPeriod(ch, note1);
enablePaulaChannel(ch);
}
}
@ -251,10 +251,6 @@ void SoundFx::handleTick() {
}
}
void SoundFx::enablePaulaChannel(uint8 channel) {
// FIXME: Is this empty on purpose?!?
}
void SoundFx::disablePaulaChannel(uint8 channel) {
setChannelPeriod(channel, 0);
}