Trying to pinpoint the segfault in JALV but it seems it's not in sfizz

This commit is contained in:
Paul Ferrand 2019-12-14 00:00:55 +01:00
parent 722073b670
commit f5c095ebda
2 changed files with 17 additions and 0 deletions

View file

@ -46,6 +46,19 @@ sfz::Synth::Synth(int numVoices)
resetVoices(numVoices);
}
sfz::Synth::~Synth()
{
AtomicDisabler callbackDisabler { canEnterCallback };
while (inCallback) {
std::this_thread::sleep_for(1ms);
}
for (auto& voice: voices)
voice->reset();
resources.filePool.emptyFileLoadingQueues();
}
void sfz::Synth::callback(absl::string_view header, const std::vector<Opcode>& members)
{
switch (hash(header)) {

View file

@ -82,6 +82,10 @@ public:
*
*/
Synth();
/**
* @brief Destructor
*/
~Synth();
/**
* @brief Construct a new Synth object with a specified number of voices.
*