mirror of
https://codeberg.org/armin/wavetable.git
synced 2026-09-01 05:50:46 +02:00
Fix crash in wavetables changing while playing. Fixed crash enabling noise.
This commit is contained in:
parent
e7075a55c7
commit
59a761fc69
4 changed files with 7 additions and 6 deletions
|
|
@ -1,6 +1,7 @@
|
||||||
0.0.4:
|
0.0.4:
|
||||||
|
|
||||||
- Another attempt at wt crash
|
- Another attempt at wt crash
|
||||||
|
- Fixed crash enabling noise
|
||||||
|
|
||||||
0.0.3:
|
0.0.3:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
Subproject commit 66cdb0611eb5b9c4c08c90a0bb59c54712547e5a
|
Subproject commit fbfcc4821ea66ac3564b4554f7fbb5aca6aaf11a
|
||||||
|
|
@ -161,7 +161,7 @@ public:
|
||||||
addEnable (sub.enable);
|
addEnable (sub.enable);
|
||||||
|
|
||||||
addControl (new gin::Knob (sub.tune, true), 0, 0);
|
addControl (new gin::Knob (sub.tune, true), 0, 0);
|
||||||
addControl (new gin::Knob (sub.level, true), 1, 0);
|
addControl (new gin::Knob (sub.level), 1, 0);
|
||||||
addControl (new gin::Knob (sub.pan, true), 0, 1);
|
addControl (new gin::Knob (sub.pan, true), 0, 1);
|
||||||
addControl (new gin::Select (sub.wave), 1, 1);
|
addControl (new gin::Select (sub.wave), 1, 1);
|
||||||
}
|
}
|
||||||
|
|
@ -183,7 +183,7 @@ public:
|
||||||
addEnable (noise.enable);
|
addEnable (noise.enable);
|
||||||
|
|
||||||
addControl (new gin::Select (noise.type), 0, 0);
|
addControl (new gin::Select (noise.type), 0, 0);
|
||||||
addControl (new gin::Knob (noise.level, true), 0, 0);
|
addControl (new gin::Knob (noise.level), 0, 0);
|
||||||
addControl (new gin::Knob (noise.pan, true), 0, 1);
|
addControl (new gin::Knob (noise.pan, true), 0, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,8 +12,8 @@ WavetableVoice::WavetableVoice (WavetableAudioProcessor& p)
|
||||||
|
|
||||||
void WavetableVoice::noteStarted()
|
void WavetableVoice::noteStarted()
|
||||||
{
|
{
|
||||||
oscillators[0].setWavetable (proc.osc1Tables);
|
oscillators[0].setWavetable (&proc.osc1Tables);
|
||||||
oscillators[1].setWavetable (proc.osc2Tables);
|
oscillators[1].setWavetable (&proc.osc2Tables);
|
||||||
|
|
||||||
fastKill = false;
|
fastKill = false;
|
||||||
startVoice();
|
startVoice();
|
||||||
|
|
@ -243,7 +243,7 @@ void WavetableVoice::updateParams (int blockSize)
|
||||||
|
|
||||||
if (proc.noiseParams.enable->isOn())
|
if (proc.noiseParams.enable->isOn())
|
||||||
{
|
{
|
||||||
noiseParams.wave = int (getValue (proc.noiseParams.type)) == 0 ? gin::Wave::whiteNoise : gin::Wave::pinkNoise;
|
noiseParams.wave = proc.noiseParams.type->getUserValueInt() == 0 ? gin::Wave::whiteNoise : gin::Wave::pinkNoise;
|
||||||
|
|
||||||
noiseParams.leftGain = getValue (proc.noiseParams.level) * (1.0f - getValue (proc.noiseParams.pan));
|
noiseParams.leftGain = getValue (proc.noiseParams.level) * (1.0f - getValue (proc.noiseParams.pan));
|
||||||
noiseParams.rightGain = getValue (proc.noiseParams.level) * (1.0f + getValue (proc.noiseParams.pan));
|
noiseParams.rightGain = getValue (proc.noiseParams.level) * (1.0f + getValue (proc.noiseParams.pan));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue