mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-27 22:42:57 +00:00
Update DUMB to revision 9e3012a7ce5fb52383f51c99061bc45921699f63
- Fixed pitch slides on non-playing channels SVN r4098 (trunk)
This commit is contained in:
parent
36157271fc
commit
e66024fcbc
1 changed files with 39 additions and 37 deletions
|
@ -1262,50 +1262,52 @@ static void update_effects(DUMB_IT_SIGRENDERER *sigrenderer)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sigrenderer->sigdata->flags & IT_LINEAR_SLIDES) {
|
if (playing) {
|
||||||
if (channel->toneporta && channel->destnote < 120) {
|
if (sigrenderer->sigdata->flags & IT_LINEAR_SLIDES) {
|
||||||
int currpitch = ((playing->note - 60) << 8) + playing->slide;
|
if (channel->toneporta && channel->destnote < 120) {
|
||||||
int destpitch = (channel->destnote - 60) << 8;
|
int currpitch = ((playing->note - 60) << 8) + playing->slide;
|
||||||
if (currpitch > destpitch) {
|
int destpitch = (channel->destnote - 60) << 8;
|
||||||
currpitch -= channel->toneporta;
|
|
||||||
if (currpitch < destpitch) {
|
|
||||||
currpitch = destpitch;
|
|
||||||
channel->destnote = IT_NOTE_OFF;
|
|
||||||
}
|
|
||||||
} else if (currpitch < destpitch) {
|
|
||||||
currpitch += channel->toneporta;
|
|
||||||
if (currpitch > destpitch) {
|
if (currpitch > destpitch) {
|
||||||
currpitch = destpitch;
|
currpitch -= channel->toneporta;
|
||||||
channel->destnote = IT_NOTE_OFF;
|
if (currpitch < destpitch) {
|
||||||
|
currpitch = destpitch;
|
||||||
|
channel->destnote = IT_NOTE_OFF;
|
||||||
|
}
|
||||||
|
} else if (currpitch < destpitch) {
|
||||||
|
currpitch += channel->toneporta;
|
||||||
|
if (currpitch > destpitch) {
|
||||||
|
currpitch = destpitch;
|
||||||
|
channel->destnote = IT_NOTE_OFF;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
playing->slide = currpitch - ((playing->note - 60) << 8);
|
||||||
}
|
}
|
||||||
playing->slide = currpitch - ((playing->note - 60) << 8);
|
} else {
|
||||||
}
|
if (channel->toneporta && channel->destnote < 120) {
|
||||||
} else {
|
float amiga_multiplier = playing->sample->C5_speed * (1.0f / AMIGA_DIVISOR);
|
||||||
if (channel->toneporta && channel->destnote < 120) {
|
|
||||||
float amiga_multiplier = playing->sample->C5_speed * (1.0f / AMIGA_DIVISOR);
|
|
||||||
|
|
||||||
float deltanote = (float)pow(DUMB_SEMITONE_BASE, 60 - playing->note);
|
float deltanote = (float)pow(DUMB_SEMITONE_BASE, 60 - playing->note);
|
||||||
/* deltanote is 1.0 for C-5, 0.5 for C-6, etc. */
|
/* deltanote is 1.0 for C-5, 0.5 for C-6, etc. */
|
||||||
|
|
||||||
float deltaslid = deltanote - playing->slide * amiga_multiplier;
|
float deltaslid = deltanote - playing->slide * amiga_multiplier;
|
||||||
|
|
||||||
float destdelta = (float)pow(DUMB_SEMITONE_BASE, 60 - channel->destnote);
|
float destdelta = (float)pow(DUMB_SEMITONE_BASE, 60 - channel->destnote);
|
||||||
if (deltaslid < destdelta) {
|
|
||||||
playing->slide -= channel->toneporta;
|
|
||||||
deltaslid = deltanote - playing->slide * amiga_multiplier;
|
|
||||||
if (deltaslid > destdelta) {
|
|
||||||
playing->note = channel->destnote;
|
|
||||||
playing->slide = 0;
|
|
||||||
channel->destnote = IT_NOTE_OFF;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
playing->slide += channel->toneporta;
|
|
||||||
deltaslid = deltanote - playing->slide * amiga_multiplier;
|
|
||||||
if (deltaslid < destdelta) {
|
if (deltaslid < destdelta) {
|
||||||
playing->note = channel->destnote;
|
playing->slide -= channel->toneporta;
|
||||||
playing->slide = 0;
|
deltaslid = deltanote - playing->slide * amiga_multiplier;
|
||||||
channel->destnote = IT_NOTE_OFF;
|
if (deltaslid > destdelta) {
|
||||||
|
playing->note = channel->destnote;
|
||||||
|
playing->slide = 0;
|
||||||
|
channel->destnote = IT_NOTE_OFF;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
playing->slide += channel->toneporta;
|
||||||
|
deltaslid = deltanote - playing->slide * amiga_multiplier;
|
||||||
|
if (deltaslid < destdelta) {
|
||||||
|
playing->note = channel->destnote;
|
||||||
|
playing->slide = 0;
|
||||||
|
channel->destnote = IT_NOTE_OFF;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue