mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 23:02:08 +00:00
- added a band-aid fix in case Timidity has both chorus and reverb active.
This merely addresses the crashing issue, it does nothing about the faulty initialization logic here that causes the chorus not to get initialized properly if reverb is active. The issue needs more in-detail investigation but for now this has to suffice.
This commit is contained in:
parent
4c4f8288a4
commit
c0893027da
2 changed files with 9 additions and 1 deletions
|
@ -131,11 +131,11 @@ CUSTOM_CVAR(Int, timidity_chorus, 0, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
||||||
|
|
||||||
CUSTOM_CVAR(Bool, timidity_surround_chorus, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
CUSTOM_CVAR(Bool, timidity_surround_chorus, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
||||||
{
|
{
|
||||||
ChangeVarSync(TimidityPlus::timidity_surround_chorus, *self);
|
|
||||||
if (currSong != nullptr && currSong->GetDeviceType() == MDEV_TIMIDITY)
|
if (currSong != nullptr && currSong->GetDeviceType() == MDEV_TIMIDITY)
|
||||||
{
|
{
|
||||||
MIDIDeviceChanged(-1, true);
|
MIDIDeviceChanged(-1, true);
|
||||||
}
|
}
|
||||||
|
ChangeVarSync(TimidityPlus::timidity_surround_chorus, *self);
|
||||||
}
|
}
|
||||||
|
|
||||||
CUSTOM_CVAR(Bool, timidity_channel_pressure, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
CUSTOM_CVAR(Bool, timidity_channel_pressure, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
||||||
|
|
|
@ -1878,6 +1878,14 @@ void Reverb::do_ch_stereo_chorus(int32_t *buf, int32_t count, InfoStereoChorus *
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (bufL == nullptr)
|
||||||
|
{
|
||||||
|
set_delay(&(info->delayL), info->rpt0);
|
||||||
|
set_delay(&(info->delayR), info->rpt0);
|
||||||
|
bufL = info->delayL.buf;
|
||||||
|
bufR = info->delayR.buf;
|
||||||
|
}
|
||||||
|
|
||||||
/* LFO */
|
/* LFO */
|
||||||
f0 = imuldiv24(lfobufL[imuldiv24(lfocnt, icycle)], depth);
|
f0 = imuldiv24(lfobufL[imuldiv24(lfocnt, icycle)], depth);
|
||||||
spt0 = wpt0 - pdelay - (f0 >> 8); /* integral part of delay */
|
spt0 = wpt0 - pdelay - (f0 >> 8); /* integral part of delay */
|
||||||
|
|
Loading…
Reference in a new issue