- Because setting a DSP unit inactive completely ceases all processing on it, including timing,
sounds queued up while the Channel Group Target Unit is inactive will all play at the same time once the unit is made active. To avoid this, it is now only deactivated when the gamestate is GS_LEVEL. Otherwise, it just gets muted. Fixes http://forum.zdoom.org/viewtopic.php?f=2&t=33592 "Strife voices overlap" SVN r3818 (trunk)
This commit is contained in:
parent
718d3f8d43
commit
3ddac32b4f
5 changed files with 48 additions and 7 deletions
|
|
@ -672,6 +672,7 @@ bool FMODSoundRenderer::Init()
|
|||
PrevEnvironment = DefaultEnvironments[0];
|
||||
DSPClock.AsOne = 0;
|
||||
ChannelGroupTargetUnit = NULL;
|
||||
ChannelGroupTargetUnitOutput = NULL;
|
||||
SfxReverbHooked = false;
|
||||
SfxReverbPlaceholder = NULL;
|
||||
OutputPlugin = 0;
|
||||
|
|
@ -1155,6 +1156,15 @@ bool FMODSoundRenderer::Init()
|
|||
{
|
||||
ChannelGroupTargetUnit = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
FMOD::DSP *dontcare;
|
||||
result = ChannelGroupTargetUnit->getOutput(0, &dontcare, &ChannelGroupTargetUnitOutput);
|
||||
if (result != FMOD_OK)
|
||||
{
|
||||
ChannelGroupTargetUnitOutput = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2123,11 +2133,33 @@ void FMODSoundRenderer::SetSfxPaused(bool paused, int slot)
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
void FMODSoundRenderer::SetInactive(bool inactive)
|
||||
void FMODSoundRenderer::SetInactive(SoundRenderer::EInactiveState inactive)
|
||||
{
|
||||
float mix;
|
||||
bool active;
|
||||
|
||||
if (inactive == INACTIVE_Active)
|
||||
{
|
||||
mix = 1;
|
||||
active = true;
|
||||
}
|
||||
else if (inactive == INACTIVE_Complete)
|
||||
{
|
||||
mix = 1;
|
||||
active = false;
|
||||
}
|
||||
else // inactive == INACTIVE_Mute
|
||||
{
|
||||
mix = 0;
|
||||
active = true;
|
||||
}
|
||||
if (ChannelGroupTargetUnitOutput != NULL)
|
||||
{
|
||||
ChannelGroupTargetUnitOutput->setMix(mix);
|
||||
}
|
||||
if (ChannelGroupTargetUnit != NULL)
|
||||
{
|
||||
ChannelGroupTargetUnit->setActive(!inactive);
|
||||
ChannelGroupTargetUnit->setActive(active);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue