diff --git a/README.md b/README.md index 4b6b528..1436463 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ For more information about the d&b Soundscape system, go to www.dbaudio.com and * On MacOS systems, simply double-clicking the **pkg** file will install the Plug-in into the correct location. The default installation paths are as follows: * **VST3:** /Library/Audio/Plug-Ins/VST3 - * **AU:** /Library/Audio/Plug-Ins/Component + * **AU:** /Library/Audio/Plug-Ins/Components * **AAX:** /Library/Application Support/Avid/Audio/Plug-Ins * On Avid VENUE S6L consoles, please install the Plug-in as follows: diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 83f2108..9617988 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -3,6 +3,17 @@ Copyright (C) 2017-2020, d&b audiotechnik GmbH & Co. KG +## V2.8.1 + +### Features +* When opening the multi-source surface, the selected mapping is now automatically set to the active Plug-In's mapping. + +### Bugfixes +* The user's current IP address is no longer overwritten when loading showfiles or snapshots (Avid VENUE S6L) or recalling presets (DAW). +* Avid VENUE S6L: The user's preferred Plug-In window size no longer gets reset when switching channels. + +--- + ## V2.8.0 ### Features diff --git a/SoundscapePlugin/SoundscapePlugin.jucer b/SoundscapePlugin/SoundscapePlugin.jucer index 29c6486..1ab57f1 100644 --- a/SoundscapePlugin/SoundscapePlugin.jucer +++ b/SoundscapePlugin/SoundscapePlugin.jucer @@ -1,6 +1,6 @@ - KEEPALIVE_INTERVAL)); int i; - CPlugin* pro = 0; + CPlugin* pro = nullptr; ComsMode mode; String messageString; diff --git a/SoundscapePlugin/Source/Overview.cpp b/SoundscapePlugin/Source/Overview.cpp index 79a93ff..7972905 100644 --- a/SoundscapePlugin/Source/Overview.cpp +++ b/SoundscapePlugin/Source/Overview.cpp @@ -63,7 +63,7 @@ static constexpr int GUI_UPDATE_RATE_SLOW = 120; /** * The one and only instance of COverviewManager. */ -COverviewManager* COverviewManager::m_singleton = 0; +COverviewManager* COverviewManager::m_singleton = nullptr; /** * Class constructor. @@ -74,7 +74,7 @@ COverviewManager::COverviewManager() m_singleton = this; //Default overview window properties. - m_overview = 0; + m_overview = nullptr; m_overviewBounds = Rectangle(50, 50, 500, 500); } @@ -83,9 +83,9 @@ COverviewManager::COverviewManager() */ COverviewManager::~COverviewManager() { - jassert(m_overview == 0); + jassert(m_overview == nullptr); - m_singleton = 0; + m_singleton = nullptr; } /** @@ -95,7 +95,7 @@ COverviewManager::~COverviewManager() */ COverviewManager* COverviewManager::GetInstance() { - if (m_singleton == 0) + if (m_singleton == nullptr) { m_singleton = new COverviewManager(); } @@ -108,7 +108,7 @@ COverviewManager* COverviewManager::GetInstance() void COverviewManager::OpenOverview() { // Overview window is not currently open -> create it. - if (m_overview == 0) + if (m_overview == nullptr) { m_overview = new COverview(); m_overview->setBounds(m_overviewBounds); @@ -131,13 +131,13 @@ void COverviewManager::OpenOverview() */ void COverviewManager::CloseOverview(bool destroy) { - if (m_overview != 0) + if (m_overview != nullptr) { SaveLastOverviewBounds(GetOverviewBounds()); // Close the overview window. delete m_overview; - m_overview = 0; + m_overview = nullptr; } // Closed overview, so manager no longer needed. @@ -870,21 +870,25 @@ void COverviewMultiSurface::resized() */ void COverviewMultiSurface::UpdateGui(bool init) { + // Will be set to true if any changes relevant to the multi-slider are found. + bool update = init; + // Update the selected mapping area. int selectedMapping = 0; COverviewManager* ovrMgr = COverviewManager::GetInstance(); if (ovrMgr) { selectedMapping = ovrMgr->GetSelectedMapping(); - m_areaSelector->setSelectedId(selectedMapping); + if (selectedMapping != m_areaSelector->getSelectedId()) + { + m_areaSelector->setSelectedId(selectedMapping, dontSendNotification); + update = true; + } } CController* ctrl = CController::GetInstance(); if (ctrl && m_multiSlider) { - // Will be set to true if any changes relevant to the multi-slider are found. - bool update = init; - if (ctrl->PopParameterChanged(DCS_Overview, DCT_NumPlugins)) update = true; @@ -1269,7 +1273,7 @@ Component* CTableModelComponent::refreshComponentForCell(int rowNumber, int colu { ignoreUnused(isRowSelected); - Component* ret = 0; + Component* ret = nullptr; switch (columnId) { @@ -1279,7 +1283,7 @@ Component* CTableModelComponent::refreshComponentForCell(int rowNumber, int colu // If an existing component is being passed-in for updating, we'll re-use it, but // if not, we'll have to create one. - if (label == 0) + if (label == nullptr) label = new CEditableLabelContainer(*this); // Ensure that the component knows which row number it is located at. @@ -1296,7 +1300,7 @@ Component* CTableModelComponent::refreshComponentForCell(int rowNumber, int colu // If an existing component is being passed-in for updating, we'll re-use it, but // if not, we'll have to create one. - if (comboBox == 0) + if (comboBox == nullptr) comboBox = new CComboBoxContainer(*this); // Ensure that the comboBox knows which row number it is located at. @@ -1312,7 +1316,7 @@ Component* CTableModelComponent::refreshComponentForCell(int rowNumber, int colu // If an existing component is being passed-in for updating, we'll re-use it, but // if not, we'll have to create one. - if (textEdit == 0) + if (textEdit == nullptr) textEdit = new CTextEditorContainer(*this); // Ensure that the component knows which row number it is located at. @@ -1329,7 +1333,7 @@ Component* CTableModelComponent::refreshComponentForCell(int rowNumber, int colu // If an existing component is being passed-in for updating, we'll re-use it, but // if not, we'll have to create one. - if (radioButton == 0) + if (radioButton == nullptr) radioButton = new CRadioButtonContainer(*this); // Ensure that the component knows which row number it is located at. @@ -1341,7 +1345,7 @@ Component* CTableModelComponent::refreshComponentForCell(int rowNumber, int colu break; default: - jassert(existingComponentToUpdate == 0); + jassert(existingComponentToUpdate == nullptr); break; } diff --git a/SoundscapePlugin/Source/Overview.h b/SoundscapePlugin/Source/Overview.h index bb2eabd..1b4e64f 100644 --- a/SoundscapePlugin/Source/Overview.h +++ b/SoundscapePlugin/Source/Overview.h @@ -100,7 +100,7 @@ class COverviewManager /** * Remember the last active tab. */ - int m_selectedTab = 0;// CTabbedComponent::OTI_Table; + int m_selectedTab = 0; /** * Remember the last selected coordinate mapping for the multi-slider diff --git a/SoundscapePlugin/Source/PluginEditor.cpp b/SoundscapePlugin/Source/PluginEditor.cpp index 2887eed..7d8f1bd 100644 --- a/SoundscapePlugin/Source/PluginEditor.cpp +++ b/SoundscapePlugin/Source/PluginEditor.cpp @@ -59,6 +59,15 @@ static constexpr int GUI_UPDATE_RATE_SLOW = 120; */ static constexpr int GUI_UPDATE_DELAY_TICKS = 15; +/* + * Default Plug-In window size. + */ +static constexpr Point GUI_DEFAULT_PLUGIN_WINDOW_SIZE(488, 380); + +/* + * Initialize user's Plug-In window size with default values. + */ +Point CPluginEditor::m_pluginWindowSize = GUI_DEFAULT_PLUGIN_WINDOW_SIZE; /* =============================================================================== @@ -229,7 +238,7 @@ CPluginEditor::CPluginEditor(CPlugin& parent) addAndMakeVisible(m_overviewButton.get()); // No overlay (Overview or About) to start with. - m_overlay = 0; + m_overlay = nullptr; // Label for Plugin' display name. m_displayNameLabel = std::make_unique("DisplayName"); @@ -264,10 +273,19 @@ CPluginEditor::CPluginEditor(CPlugin& parent) addAndMakeVisible(m_overviewMultiSliderButton.get()); // Larger GUI for consoles. - setResizeLimits(684, 544, 1920, 1080); + if (m_pluginWindowSize == GUI_DEFAULT_PLUGIN_WINDOW_SIZE) + { + m_pluginWindowSize = Point(684, 544); + } } - else - setResizeLimits(488, 380, 1920, 1080); + + // Backup user's window size, since setResizeLimits() calls resized(), which overwrites it. + Point tmpSize(m_pluginWindowSize); + setResizeLimits(488, 380, 1920, 1080); + m_pluginWindowSize = tmpSize; + + // Resize the new plugin's window to the same as the last. + setSize(m_pluginWindowSize.getX(), m_pluginWindowSize.getY()); // Allow resizing of plugin window. setResizable(true, true); @@ -303,7 +321,7 @@ CAudioParameterFloat* CPluginEditor::GetParameterForSlider(CSlider* slider) // Should not make it this far. jassertfalse; - return 0; + return nullptr; } /** @@ -433,7 +451,7 @@ void CPluginEditor::buttonClicked(Button *button) if (pro) { // Rx / Tx Buttons - if (((button == m_oscModeSend.get()) || (button == m_oscModeReceive.get())) && (m_oscModeSend != 0) && (m_oscModeReceive != 0)) + if (((button == m_oscModeSend.get()) || (button == m_oscModeReceive.get())) && (m_oscModeSend != nullptr) && (m_oscModeReceive != nullptr)) { ComsMode oldMode = pro->GetComsMode(); ComsMode newFlag = (button == m_oscModeSend.get()) ? CM_Tx : CM_Rx; @@ -470,6 +488,11 @@ void CPluginEditor::buttonClicked(Button *button) { // Show / hide the Overview Multi-slider overlay. ToggleOverlay(AOverlay::OT_MultiSlide); + + // Set the selected coordinate mapping on the Overview slider to this Plug-in's setting. + COverviewManager* ovrMgr = COverviewManager::GetInstance(); + if (ovrMgr) + ovrMgr->SetSelectedMapping(pro->GetMappingId()); } } @@ -509,12 +532,12 @@ void CPluginEditor::ToggleOverlay(AOverlay::OverlayType type) AOverlay::OverlayType previousType = AOverlay::OT_Unknown; // Overview already exists, remove and delete it. - if (m_overlay != 0) + if (m_overlay != nullptr) { previousType = m_overlay->GetOverlayType(); // Toggle off the existing overlay's button, if is still turned on. - CButton* tmpButton = 0; + CButton* tmpButton = nullptr; switch (previousType) { case AOverlay::OT_Overview: @@ -530,12 +553,12 @@ void CPluginEditor::ToggleOverlay(AOverlay::OverlayType type) jassertfalse; break; } - if ((tmpButton != 0) && (tmpButton->getToggleState() == true)) + if ((tmpButton != nullptr) && (tmpButton->getToggleState() == true)) tmpButton->setToggleState(false, dontSendNotification); // Remove and delete old overlay. removeChildComponent(m_overlay.get()); - m_overlay.reset(0); // Set scoped pointer to 0 + m_overlay.reset(nullptr); // Set scoped pointer to 0 } // Create the new specified overlay. @@ -718,6 +741,9 @@ void CPluginEditor::resized() #ifdef JUCE_DEBUG m_debugTextEdit->setBounds(125 + 20, vStartPos + 65, 160 + xOffset, 160 + yOffset); #endif + + // Remember the user's preferred Plug-In window size. + m_pluginWindowSize.setXY(w, h); } /** @@ -855,7 +881,7 @@ void CPluginEditor::UpdateGui(bool init) // Whenever the Multi-slider overlay is active, switch to fast refresh for smoother movements // even if nothing changes in this plugin (there may be position changes in other plugins). - if ((m_overlay != 0) && + if ((m_overlay != nullptr) && (m_overlay->GetOverlayType() == AOverlay::OT_MultiSlide)) somethingChanged = true; diff --git a/SoundscapePlugin/Source/PluginEditor.h b/SoundscapePlugin/Source/PluginEditor.h index eb3f954..452460a 100644 --- a/SoundscapePlugin/Source/PluginEditor.h +++ b/SoundscapePlugin/Source/PluginEditor.h @@ -233,6 +233,11 @@ class CPluginEditor : */ int m_ticksSinceLastChange = 0; + /** + * Keep track of the user's preferred Plug-In window size, and use it when opening a fresh window. + */ + static Point m_pluginWindowSize; + #ifdef JUCE_DEBUG /** * Special textfield used for displaying debugging messages. diff --git a/SoundscapePlugin/Source/PluginProcessor.cpp b/SoundscapePlugin/Source/PluginProcessor.cpp index 17e42d3..0e85e10 100644 --- a/SoundscapePlugin/Source/PluginProcessor.cpp +++ b/SoundscapePlugin/Source/PluginProcessor.cpp @@ -340,7 +340,12 @@ void CPlugin::OnOverviewButtonClicked() { COverviewManager* ovrMgr = COverviewManager::GetInstance(); if (ovrMgr) + { ovrMgr->OpenOverview(); + + // Set the selected coordinate mapping on the Overview slider to this Plug-in's setting. + ovrMgr->SetSelectedMapping(GetMappingId()); + } } /** @@ -642,7 +647,11 @@ void CPlugin::InitializeSettings(int sourceId, int mappingId, String ipAddress, SetMappingId(DCS_Host, mappingId); SetComsMode(DCS_Host, newMode); - ctrl->InitGlobalSettings(DCS_Host, ipAddress, oscMsgRate); + // Only overwite the current IP settings if they haven't been changed from the defaults. + if (GetIpAddress() == ctrl->GetDefaultIpAddress()) + { + ctrl->InitGlobalSettings(DCS_Host, ipAddress, oscMsgRate); + } } } diff --git a/SoundscapePlugin/Source/SurfaceSlider.h b/SoundscapePlugin/Source/SurfaceSlider.h index 66a50d2..ebc9b4c 100644 --- a/SoundscapePlugin/Source/SurfaceSlider.h +++ b/SoundscapePlugin/Source/SurfaceSlider.h @@ -62,7 +62,7 @@ class CSurfaceSlider : public Component /** * AudioProcessor object to act as parent to this component. */ - AudioProcessor* m_parent = 0; + AudioProcessor* m_parent = nullptr; JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (CSurfaceSlider) };