-
Notifications
You must be signed in to change notification settings - Fork 192
Closed
Labels
Description
Hello!
- Perhaps this message will help to solve the problem of crashing NAM plug & DAW when changing presets. Perhaps the problem is related to GUI control interception when you change a preset. In any case, after this patch NAM plug works stably.
In the code UnserializeState() must be removed in lines. This is enough.
NeuralAmpModelerPlugin\neuralampmodeler\NeuralAmpModeler.cpp
int NeuralAmpModeler::UnserializeState(const IByteChunk& chunk, int startPos)
{
...
// this->mNAM = nullptr; // DAW : SO6 etc : bug! - crash DAW!
// this->mIR = nullptr; // DAW : SO6 etc : bug! - crash DAW!
...
}
- Copying data to dsp::ImpulseResponse::_SetWeights() loses 3/4 of samples. Although the length of samples is limited (1<<13), I assume this is not provided.
// neuralampmodeler\NeuralAmpModelerCore\dsp\ImpulseResponse.cpp
void dsp::ImpulseResponse::_SetWeights(const double sampleRate)
{
...
//memcpy(this->mResampled.data(), this->mRawAudio.data(), this->mResampled.size()); // 1/4 size if float
std::memcpy(this->mResampled.data(), this->mRawAudio.data(), sizeof(type) * this->mResampled.size()); // add sizeof(type)
...
//memcpy(padded.data() + 1, this->mRawAudio.data(), this->mRawAudio.size()); // 1/4 size if float
std::memcpy(padded.data() + 1, this->mRawAudio.data(), sizeof(type) * this->mRawAudio.size()); // add sizeof(type)
...
}
- You can find other small code changes that might be interesting in my developer archive.
https://github.com/slkom/NAM-ARHIVE