Skip to content

Commit

Permalink
Activate Azure for Surge++ Pull Request; Fix Lin/Win errors
Browse files Browse the repository at this point in the history
Turn on Azure PR for s++-master branch and in doing so find
a failure-to-return-value in CScalableBitmap and also
an error in bootstrapping the LV2 implementation which as
a result Closes #1287.
  • Loading branch information
baconpaul committed Nov 15, 2019
1 parent f3589e0 commit 2e1b0c4
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 14 deletions.
1 change: 1 addition & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ trigger:

pr:
- master
- surge++-master

jobs:
- job: Build
Expand Down
27 changes: 15 additions & 12 deletions src/common/SurgeStorage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -300,25 +300,28 @@ SurgeStorage::SurgeStorage(std::string suppliedDataPath)
getPatch().scene[0].osc[0].wt.dt = 1.0f / 512.f;
load_wt(0, &getPatch().scene[0].osc[0].wt);

// WindowWT is a WaveTable which now has a constructor so don't do this
// memset(&WindowWT, 0, sizeof(WindowWT));
if( ! load_wt_wt(datapath + "windows.wt", &WindowWT) )
if( loadWtAndPatch )
{
std::ostringstream oss;
oss << "Unable to load '" << datapath << "/windows.wt'. This file is required for surge to operate "
<< "properly. This occurs when Surge is mis-installed and shared resources are not in the "
<< "os-specific shared directory, which on your OS is a directory called 'Surge' in "
// WindowWT is a WaveTable which now has a constructor so don't do this
// memset(&WindowWT, 0, sizeof(WindowWT));
if( ! load_wt_wt(datapath + "windows.wt", &WindowWT) )
{
std::ostringstream oss;
oss << "Unable to load '" << datapath << "/windows.wt'. This file is required for surge to operate "
<< "properly. This occurs when Surge is mis-installed and shared resources are not in the "
<< "os-specific shared directory, which on your OS is a directory called 'Surge' in "
#if MAC
<< "the global or user local `Library/Application Support` directory."
<< "the global or user local `Library/Application Support` directory."
#endif
#if WINDOWS
<< "your %LocalAppData% directory."
<< "your %LocalAppData% directory."
#endif
#if LINUX
<< "/usr/share or ~/.local/share."
<< "/usr/share or ~/.local/share."
#endif
<< " Please install shared assets correctly and restart.";
Surge::UserInteractions::promptError(oss.str(), "Unable to load windows.wt");
<< " Please install shared assets correctly and restart.";
Surge::UserInteractions::promptError(oss.str(), "Unable to load windows.wt");
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/common/gui/CScalableBitmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class CScalableBitmap : public VSTGUI::CBitmap
/*
** In "glyph" mode I remap colors. This doesn't really change except at construction time.
*/
bool setGlyphMode( bool b ) {
void setGlyphMode( bool b ) {
glyphMode = b;
}

Expand Down
6 changes: 5 additions & 1 deletion src/lv2/SurgeLv2Wrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ SurgeLv2Wrapper::SurgeLv2Wrapper(double sampleRate)
}

SurgeLv2Wrapper::~SurgeLv2Wrapper()
{}
{
// FIXME S++ has an error whereby you crash on delete on linux.
// So for now just leak the synth
auto LEAKTHIS = _synthesizer.release();
}

void SurgeLv2Wrapper::updateDisplay()
{
Expand Down

0 comments on commit 2e1b0c4

Please sign in to comment.