Skip to content

[BUG] some possibly important bugs and solutions. #296

@slkom

Description

@slkom

Hello!

  1. 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! 
...
}
  1. 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)
	...
}
  1. You can find other small code changes that might be interesting in my developer archive.
    https://github.com/slkom/NAM-ARHIVE

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingpriority:lowLow priority issues

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions