Fix for bug [742688] FOA: Missing music at Sophia's lecture.

Added check for 0-length parameter fades, just in case.

svn-id: r7887
This commit is contained in:
Jamieson Christian 2003-05-24 16:00:18 +00:00
parent 84195fe444
commit 0ffc4fe7da

View File

@ -1063,7 +1063,10 @@ int Player::addParameterFader (int param, int target, int time) {
best->param = param;
best->start = start;
best->end = target;
best->total_time = (uint32) time * 10000;
if (!time)
best->total_time = 1;
else
best->total_time = (uint32) time * 10000;
best->current_time = 0;
} else {
warning ("IMuse Player %d: Out of parameter faders", _id);
@ -1091,7 +1094,7 @@ void Player::transitionParameters() {
switch (ptr->param) {
case ParameterFader::pfVolume:
// Volume.
if (!value) {
if (!value && !ptr->end) {
clear();
return;
}