diff --git a/JuceLibraryCode/AppConfig.h b/JuceLibraryCode/AppConfig.h index e927a5f..dbb50e8 100644 --- a/JuceLibraryCode/AppConfig.h +++ b/JuceLibraryCode/AppConfig.h @@ -194,22 +194,22 @@ #define JucePlugin_Name "JaySynth" #endif #ifndef JucePlugin_Desc - #define JucePlugin_Desc "JaySynth" + #define JucePlugin_Desc "JaySynth Software Synthesizer" #endif #ifndef JucePlugin_Manufacturer #define JucePlugin_Manufacturer "Jay Digital Illusions" #endif #ifndef JucePlugin_ManufacturerWebsite - #define JucePlugin_ManufacturerWebsite "" + #define JucePlugin_ManufacturerWebsite "www.jayfield.org" #endif #ifndef JucePlugin_ManufacturerEmail - #define JucePlugin_ManufacturerEmail "" + #define JucePlugin_ManufacturerEmail "synth@jayfield.org" #endif #ifndef JucePlugin_ManufacturerCode - #define JucePlugin_ManufacturerCode 'Manu' + #define JucePlugin_ManufacturerCode '3110' #endif #ifndef JucePlugin_PluginCode - #define JucePlugin_PluginCode 'Plug' + #define JucePlugin_PluginCode '1970' #endif #ifndef JucePlugin_MaxNumInputChannels #define JucePlugin_MaxNumInputChannels 2 @@ -236,13 +236,13 @@ #define JucePlugin_EditorRequiresKeyboardFocus 0 #endif #ifndef JucePlugin_Version - #define JucePlugin_Version 1.0.0 + #define JucePlugin_Version 0.5.6 #endif #ifndef JucePlugin_VersionCode - #define JucePlugin_VersionCode 0x10000 + #define JucePlugin_VersionCode 0x000506 #endif #ifndef JucePlugin_VersionString - #define JucePlugin_VersionString "1.0.0" + #define JucePlugin_VersionString "0.5.6" #endif #ifndef JucePlugin_VSTUniqueID #define JucePlugin_VSTUniqueID JucePlugin_PluginCode diff --git a/JuceLibraryCode/JuceHeader.h b/JuceLibraryCode/JuceHeader.h index 239810d..ad9f27e 100644 --- a/JuceLibraryCode/JuceHeader.h +++ b/JuceLibraryCode/JuceHeader.h @@ -34,9 +34,9 @@ namespace ProjectInfo { - const char* const projectName = "JaySynth"; - const char* const versionString = "1.0.0"; - const int versionNumber = 0x10000; + const char* const projectName = JucePlugin_Name; + const char* const versionString = JucePlugin_VersionString; + const int versionNumber = JucePlugin_VersionCode; } #endif // __APPHEADERFILE_FGWBAQ__ diff --git a/Source/JaySynth.cpp b/Source/JaySynth.cpp index 3bc8942..68918f3 100644 --- a/Source/JaySynth.cpp +++ b/Source/JaySynth.cpp @@ -882,7 +882,8 @@ void JaySynth::renderNextBlock (AudioSampleBuffer& outputBuffer, float *buf1, *buf2; // must set the sample rate before using this! - jassert (sampleRate != 0); + float sr = Synthesiser::getSampleRate(); + jassert (sr != 0); const ScopedLock sl (lock); @@ -1375,8 +1376,8 @@ void JaySynthThread::run(void) m_buffer->clear (0, 0, m_sample_len); m_buffer->clear (1, 0, m_sample_len); - buf1 = m_buffer->getSampleData (0, 0); - buf2 = m_buffer->getSampleData (1, 0); + buf1 = m_buffer->getWritePointer (0, 0); + buf2 = m_buffer->getWritePointer (1, 0); for (int i = m_voice_offset; i < m_num_voices; i += m_voice_step) { diff --git a/Source/JaySynth.h b/Source/JaySynth.h index 585b626..79e2e5c 100644 --- a/Source/JaySynth.h +++ b/Source/JaySynth.h @@ -208,7 +208,6 @@ public: private: int m_num_audiothreads; - float sampleRate; BigInteger sustainPedalsDown; int paramID_changed, next_possible_voice, oldest_voice; JaySynthMidiCC *pMidCC_editBuffer; @@ -244,7 +243,7 @@ private: midi_note_info_t last_midi_note_info; voice_t *m_pVoices; JaySynthThread **m_ppAudioThread; - WaitableEvent *m_pEventAudioThreadRdy; + ScopedPointer m_pEventAudioThreadRdy; JaySynthMonophonicMGR m_monoMGR; }; diff --git a/Source/JaySynthAudioProcessorEditor.cpp b/Source/JaySynthAudioProcessorEditor.cpp index a937f85..4788d2c 100644 --- a/Source/JaySynthAudioProcessorEditor.cpp +++ b/Source/JaySynthAudioProcessorEditor.cpp @@ -5370,32 +5370,32 @@ void JaySynthAudioProcessorEditor::paramUpdate(int paramID, bool doHostUpdate) switch(paramID) { case SYNTH_PARAM_OSC_0_FM_SRC_1: - pComboBox->setSelectedId(ModSrc1_CB_getIndex((int)getProcessor()->getParam(paramID), (int)getProcessor()->getParam(SYNTH_PARAM_OSC_0_FM_SRC_OP)), juce::NotificationType::sendNotification); + pComboBox->setSelectedId(ModSrc1_CB_getIndex((int)getProcessor()->getParam(paramID), (int)getProcessor()->getParam(SYNTH_PARAM_OSC_0_FM_SRC_OP)), juce::NotificationType::dontSendNotification); break; case SYNTH_PARAM_OSC_1_FM_SRC_1: - pComboBox->setSelectedId(ModSrc1_CB_getIndex((int)getProcessor()->getParam(paramID), (int)getProcessor()->getParam(SYNTH_PARAM_OSC_1_FM_SRC_OP)), juce::NotificationType::sendNotification); + pComboBox->setSelectedId(ModSrc1_CB_getIndex((int)getProcessor()->getParam(paramID), (int)getProcessor()->getParam(SYNTH_PARAM_OSC_1_FM_SRC_OP)), juce::NotificationType::dontSendNotification); break; case SYNTH_PARAM_OSC_0_AM_SRC_1: - pComboBox->setSelectedId(ModSrc1_CB_getIndex((int)getProcessor()->getParam(paramID), (int)getProcessor()->getParam(SYNTH_PARAM_OSC_0_AM_SRC_OP)), juce::NotificationType::sendNotification); + pComboBox->setSelectedId(ModSrc1_CB_getIndex((int)getProcessor()->getParam(paramID), (int)getProcessor()->getParam(SYNTH_PARAM_OSC_0_AM_SRC_OP)), juce::NotificationType::dontSendNotification); break; case SYNTH_PARAM_OSC_1_AM_SRC_1: - pComboBox->setSelectedId(ModSrc1_CB_getIndex((int)getProcessor()->getParam(paramID), (int)getProcessor()->getParam(SYNTH_PARAM_OSC_1_AM_SRC_OP)), juce::NotificationType::sendNotification); + pComboBox->setSelectedId(ModSrc1_CB_getIndex((int)getProcessor()->getParam(paramID), (int)getProcessor()->getParam(SYNTH_PARAM_OSC_1_AM_SRC_OP)), juce::NotificationType::dontSendNotification); break; case SYNTH_PARAM_OSC_0_PWM_SRC_1: - pComboBox->setSelectedId(ModSrc1_CB_getIndex((int)getProcessor()->getParam(paramID), (int)getProcessor()->getParam(SYNTH_PARAM_OSC_0_PWM_SRC_OP)), juce::NotificationType::sendNotification); + pComboBox->setSelectedId(ModSrc1_CB_getIndex((int)getProcessor()->getParam(paramID), (int)getProcessor()->getParam(SYNTH_PARAM_OSC_0_PWM_SRC_OP)), juce::NotificationType::dontSendNotification); break; case SYNTH_PARAM_OSC_1_PWM_SRC_1: - pComboBox->setSelectedId(ModSrc1_CB_getIndex((int)getProcessor()->getParam(paramID), (int)getProcessor()->getParam(SYNTH_PARAM_OSC_1_PWM_SRC_OP)), juce::NotificationType::sendNotification); + pComboBox->setSelectedId(ModSrc1_CB_getIndex((int)getProcessor()->getParam(paramID), (int)getProcessor()->getParam(SYNTH_PARAM_OSC_1_PWM_SRC_OP)), juce::NotificationType::dontSendNotification); break; case SYNTH_PARAM_VCF_F_SRC_1: - pComboBox->setSelectedId(ModSrc1_CB_getIndex((int)getProcessor()->getParam(paramID), (int)getProcessor()->getParam(SYNTH_PARAM_VCF_F_SRC_OP)), juce::NotificationType::sendNotification); + pComboBox->setSelectedId(ModSrc1_CB_getIndex((int)getProcessor()->getParam(paramID), (int)getProcessor()->getParam(SYNTH_PARAM_VCF_F_SRC_OP)), juce::NotificationType::dontSendNotification); break; case SYNTH_PARAM_VCF_Q_SRC_1: - pComboBox->setSelectedId(ModSrc1_CB_getIndex((int)getProcessor()->getParam(paramID), (int)getProcessor()->getParam(SYNTH_PARAM_VCF_Q_SRC_OP)), juce::NotificationType::sendNotification); + pComboBox->setSelectedId(ModSrc1_CB_getIndex((int)getProcessor()->getParam(paramID), (int)getProcessor()->getParam(SYNTH_PARAM_VCF_Q_SRC_OP)), juce::NotificationType::dontSendNotification); break; default: - pComboBox->setSelectedId(1 + (int)getProcessor()->getParam(paramID), juce::NotificationType::sendNotification); + pComboBox->setSelectedId(1 + (int)getProcessor()->getParam(paramID), juce::NotificationType::dontSendNotification); break; } pComboBox->setColour (ComboBox:: backgroundColourId, combobox_colour); diff --git a/Source/VelKey_PopUp.cpp b/Source/VelKey_PopUp.cpp index 8ab45b7..46574de 100644 --- a/Source/VelKey_PopUp.cpp +++ b/Source/VelKey_PopUp.cpp @@ -561,7 +561,7 @@ VelKey_PopUp::VelKey_PopUp (JaySynthMidiCC *pMidiCC, int paramID, synth_float_t m_velKey_constraints.pcenter = -1E18; label_parameter_name->setText(name, juce::NotificationType::dontSendNotification); - comboBoxOPSel->setSelectedId(1 + pMidiCC->getVelKeyCombineOP(pMidiCC_container), juce::NotificationType::sendNotification); + comboBoxOPSel->setSelectedId(1 + pMidiCC->getVelKeyCombineOP(pMidiCC_container), juce::NotificationType::dontSendNotification); slider_vel_kexp->setValue(toSlider(&m_shape_xform, pMidiCC->getVelCurve(pMidiCC_container)->kexp), juce::NotificationType::dontSendNotification); slider_vel_scenter->setValue(toSlider(&m_skew_xform, pMidiCC->getVelCurve(pMidiCC_container)->scenter), juce::NotificationType::dontSendNotification); diff --git a/Source/synth/param_scale.c b/Source/synth/param_scale.c index 2e0212b..4b1d5b5 100644 --- a/Source/synth/param_scale.c +++ b/Source/synth/param_scale.c @@ -799,7 +799,7 @@ if ((pcenter < pmin) || (pcenter > pmax)) } -void paramInfoInit(param_info_t *pObj, UINT32 id, char *pName) +void paramInfoInit(param_info_t *pObj, UINT32 id, const char *pName) { pObj->id = id; @@ -855,7 +855,7 @@ void paramInfoSet(param_info_t *pObj, pObj->pinterval = pinterval; } -void paramInfoCopy(param_info_t *pDst, param_info_t *pSrc) +void paramInfoCopy(param_info_t *pDst, param_info_t const *pSrc) { pDst->base = pSrc->base; pDst->kexp = pSrc->kexp; diff --git a/Source/synth/param_scale.h b/Source/synth/param_scale.h index 3023fec..0a0acdb 100644 --- a/Source/synth/param_scale.h +++ b/Source/synth/param_scale.h @@ -161,7 +161,7 @@ extern "C" { // -------------------------------------------------------------- // Exported functions // -------------------------------------------------------------- -void paramInfoInit(param_info_t *pObj, UINT32 id, char *pName); +void paramInfoInit(param_info_t *pObj, UINT32 id, const char *pName); void paramInfoFree(param_info_t *pObj); void paramInfoSetPMIN(param_info_t *pObj, synth_float_t value); void paramInfoSetPMAX(param_info_t *pObj, synth_float_t value); @@ -174,7 +174,7 @@ void paramInfoSet(param_info_t *pObj, synth_float_t pmax, synth_float_t pinterval); -void paramInfoCopy(param_info_t *pDst, param_info_t *pSrc); +void paramInfoCopy(param_info_t *pDst, param_info_t const *pSrc); synth_float_t clampParam(param_info_t *pObj, synth_float_t p); synth_float_t toParam(param_info_t *pObj, synth_float_t s); synth_float_t toSlider(param_info_t *pObj, synth_float_t p); diff --git a/Source/synth/synth_defs.h b/Source/synth/synth_defs.h index f235510..60b6055 100644 --- a/Source/synth/synth_defs.h +++ b/Source/synth/synth_defs.h @@ -52,7 +52,7 @@ #if defined(__cplusplus) extern "C" { #endif -void SynthDebug(char *fmtstr, ...); +void SynthDebug(const char *fmtstr, ...); #if defined(__cplusplus) } #endif