Skip to content

Commit

Permalink
- fix sampler crash with using timestretched multimic samples
Browse files Browse the repository at this point in the history
  • Loading branch information
Christoph Hart committed Dec 15, 2024
1 parent d141f8c commit b46a708
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion currentGitHash.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0bf3e5c096504bdfd08c109fb91e10e28fac51c9
d141f8ca68142cc287297ceaffe615748f4fac02
2 changes: 1 addition & 1 deletion hi_backend/backend/currentGit.h
Original file line number Diff line number Diff line change
@@ -1 +1 @@
#define PREVIOUS_HISE_COMMIT "0bf3e5c096504bdfd08c109fb91e10e28fac51c9"
#define PREVIOUS_HISE_COMMIT "d141f8ca68142cc287297ceaffe615748f4fac02"
2 changes: 2 additions & 0 deletions hi_core/hi_sampler/sampler/ModulatorSamplerVoice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,8 @@ ModulatorSamplerVoice(ownerSynth)
wrappedVoices.getLast()->setLoaderBufferSize((int)getOwnerSynth()->getAttribute(ModulatorSampler::BufferSize));
wrappedVoices.getLast()->setTemporaryVoiceBuffer(ms->getTemporaryVoiceBuffer(), ms->getTemporaryStretchBuffer());
wrappedVoices.getLast()->setDebugLogger(&ownerSynth->getMainController()->getDebugLogger());

wrappedVoices.getLast()->setSuspendOnDelayedStartFunction(std::bind(&ModulatorSynth::syncAfterDelayStart, ownerSynth, std::placeholders::_1, std::placeholders::_2), getVoiceIndex());
}

// just call this once...
Expand Down
5 changes: 3 additions & 2 deletions hi_streaming/hi_streaming/StreamingSamplerVoice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -966,9 +966,10 @@ void StreamingSamplerVoice::renderNextBlock(AudioSampleBuffer &outputBuffer, int
{
auto isDelayed = initStretcher(pitchSt);

if(isDelayed == sendNotificationAsync)
jassert(delayedStartFunction);

if(delayedStartFunction && isDelayed == sendNotificationAsync)
{
jassert(delayedStartFunction);
delayedStartFunction(true, voiceIndexForDelayedStart);
}

Expand Down

0 comments on commit b46a708

Please sign in to comment.