Skip to content

Commit

Permalink
fixed crash when exporting
Browse files Browse the repository at this point in the history
  • Loading branch information
ypujante committed Nov 23, 2024
1 parent af474c8 commit 913b5f8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 22 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
23 changes: 3 additions & 20 deletions src/cpp/GUI/SampleSaverView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,29 +45,14 @@ class SampleSaverView : public Views::StateAwareView<Views::TextButtonView, Samp
//------------------------------------------------------------------------
void onClick() override
{
CNewFileSelector *selector = CNewFileSelector::create(getFrame(), CNewFileSelector::kSelectSaveFile);
auto selector = VSTGUI::owned(CNewFileSelector::create(getFrame(), CNewFileSelector::kSelectSaveFile));
if(selector)
{
selector->setTitle("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<CNewFileSelector *>(sender);
if(selector)
if(selector->runModal())
{
// do anything with the selected files here
if(selector->getNumSelectedFiles() > 0)
{
auto filename = selector->getSelectedFile(0);
Expand All @@ -76,11 +61,9 @@ class SampleSaverView : public Views::StateAwareView<Views::TextButtonView, Samp
else
DLOG_F(INFO, "Successfully saved %s", filename);
}

return kMessageNotified;
}
}
return TextButtonView::notify(sender, message);
TextButtonView::onClick();
}

protected:
Expand Down

0 comments on commit 913b5f8

Please sign in to comment.