Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix instrument release fade-out #6908

Merged
merged 4 commits into from
Nov 1, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions src/core/AudioEngine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,17 @@ void AudioEngine::renderStageInstruments()

AudioEngineWorkerThread::fillJobQueue(m_playHandles);
AudioEngineWorkerThread::startAndWaitForJobs();
}



void AudioEngine::renderStageEffects()
{
AudioEngineProfiler::Probe profilerProbe(m_profiler, AudioEngineProfiler::DetailType::Effects);

// STAGE 2: process effects of all instrument- and sampletracks
AudioEngineWorkerThread::fillJobQueue(m_audioPorts);
AudioEngineWorkerThread::startAndWaitForJobs();

// removed all play handles which are done
for( PlayHandleList::Iterator it = m_playHandles.begin();
Expand Down Expand Up @@ -424,17 +435,6 @@ void AudioEngine::renderStageInstruments()



void AudioEngine::renderStageEffects()
{
AudioEngineProfiler::Probe profilerProbe(m_profiler, AudioEngineProfiler::DetailType::Effects);

// STAGE 2: process effects of all instrument- and sampletracks
AudioEngineWorkerThread::fillJobQueue(m_audioPorts);
AudioEngineWorkerThread::startAndWaitForJobs();
}



void AudioEngine::renderStageMix()
{
AudioEngineProfiler::Probe profilerProbe(m_profiler, AudioEngineProfiler::DetailType::Mixing);
Expand Down
2 changes: 1 addition & 1 deletion src/core/Instrument.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ void Instrument::applyRelease( sampleFrame * buf, const NotePlayHandle * _n )
{
for( fpp_t f = (fpp_t)( ( fl > desiredReleaseFrames() ) ?
(std::max(fpp - desiredReleaseFrames(), 0) +
fl % fpp) : 0); f < frames; ++f)
fl) % fpp : 0); f < frames; ++f)
{
const float fac = (float)( fl-f-1 ) /
desiredReleaseFrames();
Expand Down
Loading