From 1e0760e49b0a336c86cf89c4fec43646ed1ec4d5 Mon Sep 17 00:00:00 2001 From: Jens Ahrensfeld Date: Mon, 18 Aug 2025 18:29:25 +0200 Subject: [PATCH] fixed includes --- src/plug/PluginProcessor.cpp | 14 ++++++++------ src/synth/synth_debug.c | 6 ++++-- src/synth/synth_types.h | 1 + 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/src/plug/PluginProcessor.cpp b/src/plug/PluginProcessor.cpp index 5b1ead4..1a5b6ba 100644 --- a/src/plug/PluginProcessor.cpp +++ b/src/plug/PluginProcessor.cpp @@ -544,16 +544,14 @@ void JaySynthAudioProcessor::processBlock (AudioSampleBuffer& buffer, MidiBuffer int i; float *buf1 = buffer.getWritePointer (0, 0); float *buf2 = buffer.getWritePointer (1, 0); - synth_float_t limiter_env[SYNTH_MAX_BUFSIZE]; - synth_float_t limiter_gain[SYNTH_MAX_BUFSIZE]; synth_float_t buf[2][SYNTH_MAX_BUFSIZE]; - synth_float_t x, limiter_ar, limiter_af, limiter_threshold; float synth_gain; - AudioPlayHead::CurrentPositionInfo pos; - getPlayHead()->getCurrentPosition(pos); + AudioPlayHead::CurrentPositionInfo posInfo; + getPlayHead()->getCurrentPosition(posInfo); - m_JK_MidiClock.generateMidiclock(pos, &midiMessages, numSamples, getSampleRate()); + // Parse midi buffer and add midi clock messages + m_JK_MidiClock.generateMidiclock(posInfo, &midiMessages, numSamples, getSampleRate()); // Now pass any incoming midi messages to our keyboard state object, and let it // add messages to the buffer if the user is clicking on the on-screen keys @@ -579,6 +577,10 @@ void JaySynthAudioProcessor::processBlock (AudioSampleBuffer& buffer, MidiBuffer m_limiter_active = 0; #ifdef WITH_LIMITER + synth_float_t limiter_env[SYNTH_MAX_BUFSIZE]; + synth_float_t limiter_gain[SYNTH_MAX_BUFSIZE]; + synth_float_t x, limiter_ar, limiter_af, limiter_threshold; + // Limiter limiter_ar = 5.0/(SYNTH_LIMITER_RISE_TIME*m_fs); limiter_af = 5.0/(SYNTH_LIMITER_FALL_TIME*m_fs); diff --git a/src/synth/synth_debug.c b/src/synth/synth_debug.c index 93e6f59..6359a0e 100644 --- a/src/synth/synth_debug.c +++ b/src/synth/synth_debug.c @@ -5,8 +5,6 @@ #include #endif #include -#include -#include // -------------------------------------------------------------- @@ -31,7 +29,11 @@ void SynthDebug(const char *fmtstr, ...) va_start(args, fmtstr); vsprintf(buf, fmtstr, args); va_end(args); +#ifdef WIN32 OutputDebugString(buf); +#else + puts(buf); +#endif #endif /* SYNTH_DEBUG */ } diff --git a/src/synth/synth_types.h b/src/synth/synth_types.h index 79a8ec8..d12a9f7 100644 --- a/src/synth/synth_types.h +++ b/src/synth/synth_types.h @@ -3,6 +3,7 @@ #ifndef _SYNTH_TYPES_H_ #define _SYNTH_TYPES_H_ +#include // -------------------------------------------------------------- // Types // --------------------------------------------------------------