From 913b5f807006a726065e040eb1ada0a153089821 Mon Sep 17 00:00:00 2001 From: Yan Pujante Date: Sat, 23 Nov 2024 09:47:20 -0800 Subject: [PATCH] fixed crash when exporting --- CMakeLists.txt | 2 +- README.md | 5 ++++- src/cpp/GUI/SampleSaverView.cpp | 23 +++-------------------- 3 files changed, 8 insertions(+), 22 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 46e7793..b201cce 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,7 +21,7 @@ include("${JAMBA_ROOT_DIR}/cmake/JambaSetArchitecture.cmake") set(PLUGIN_MAJOR_VERSION 1) set(PLUGIN_MINOR_VERSION 5) -set(PLUGIN_PATCH_VERSION 0) +set(PLUGIN_PATCH_VERSION 1) set(PLUGIN_VERSION "${PLUGIN_MAJOR_VERSION}.${PLUGIN_MINOR_VERSION}.${PLUGIN_PATCH_VERSION}") project("vst-sam-spl-64" VERSION "${PLUGIN_VERSION}") diff --git a/README.md b/README.md index c77801c..da9859b 100644 --- a/README.md +++ b/README.md @@ -17,12 +17,15 @@ Check the [SAM-SPL 64](https://pongasoft.com/vst/SAM-SPL64.html) documentation f Release Notes ------------- +### 2024-11-23 - `v1.5.1` +* Fixed a crash when exporting the sample + ### 2023-04-27 - `v1.5.0` * Added support for MP3, Flag, Ogg Vorbis (in addition to WAV and AIFF) * Added error message when issue with loading file * Fixed sound issues with Bitwig Studio * Fixed drag and drop bug -* Migrated to Jamba 6.2.0 / VST SDK 3.7.5 +* Migrated to Jamba 6.2.1 / VST SDK 3.7.5 ### 2021-01-04 - `v1.4.3` * Minor change to ensure memory deletion in UI happens outside the critical section diff --git a/src/cpp/GUI/SampleSaverView.cpp b/src/cpp/GUI/SampleSaverView.cpp index 6817e91..26b6d23 100644 --- a/src/cpp/GUI/SampleSaverView.cpp +++ b/src/cpp/GUI/SampleSaverView.cpp @@ -45,29 +45,14 @@ class SampleSaverView : public Views::StateAwareViewsetTitle("Save Sample To"); selector->setDefaultSaveName(UTF8String(Steinberg::String().printf("sample.%s", fExportSampleMajorFormat == SampleFile::ESampleMajorFormat::kSampleFormatWAV ? "wav" : "aif"))); - selector->run(this); - selector->forget(); - } - TextButtonView::onClick(); - } - - //------------------------------------------------------------------------ - // notify - //------------------------------------------------------------------------ - CMessageResult notify(CBaseObject *sender, IdStringPtr message) override - { - if(message == CNewFileSelector::kSelectEndMessage) - { - auto selector = dynamic_cast(sender); - if(selector) + if(selector->runModal()) { - // do anything with the selected files here if(selector->getNumSelectedFiles() > 0) { auto filename = selector->getSelectedFile(0); @@ -76,11 +61,9 @@ class SampleSaverView : public Views::StateAwareView