Closed pgatt closed 1 year ago
This fails on Windows
src/EssEff.cpp: In member function 'std::string EssEff::getAbsolutePath(std::string)':
src/EssEff.cpp:139:28: error: 'fromWstring' is not a member of 'rack::string'
139 | return string::fromWstring(absPathC);
| ^~~~~~~~~~~
HI Steve, have you got a fix?
I haven't. I did try some code which I found from a search, but it only works one time for some reason.
Related to the v2 port; the soundpipe submodule should have its URL changed in .gitmodules to https://github.com/SeesePlusPlus/soundpipe , for instance. https://github.com/PaulBatchelor/Soundpipe.git is gone.
This appears to fix the "fromWstring" compile error and allows one to load consecutive files
diff --git a/src/EssEff.cpp b/src/EssEff.cpp
index 031e050..9a842f8 100644
--- a/src/EssEff.cpp
+++ b/src/EssEff.cpp
@@ -115,7 +115,7 @@ struct EssEff : Module {
configParam(EssEff::FILE_PARAM, 0, num_files - 1, 0, "");
configParam(EssEff::PRESET_PARAM, 0, 320, 0, "");
configParam(EssEff::BEND_PARAM, 0, 16383, 8192, "");
- configParam(EssEff::REC_BUTTON, 0.0, 1.0, 0.0, "");
+ configParam(EssEff::REC_BUTTON, 0.0, 1.0, 0.0, "Load sf2 file");
}
void step() override;
@@ -136,7 +136,7 @@ std::string EssEff::getAbsolutePath(std::string path){
wchar_t buf[PATH_MAX];
wchar_t *absPathC = _wfullpath(buf, pathW.c_str(), PATH_MAX);
if (absPathC)
- return string::fromWstring(absPathC);
+ return converter.to_bytes(absPathC);
#endif
return "";
}
@@ -278,7 +278,7 @@ struct RecButton : SvgSwitch {
void onDragStart(const event::DragStart &e) override {
EssEff *module = dynamic_cast<EssEff*>(getParamQuantity()->module);
- if (module && module->last_path == ""){
+ if (module){
std::string dir = "";
char *path = osdialog_file(OSDIALOG_OPEN, dir.c_str(), NULL, NULL);
if (path) {
I also noticed that Succulent causes at crash on exit in Rack-2.2.2 using pipewire in Linux, even if you just look at it in the preview library :
RJModules/plugin.so(MFTexture::release()+0x39)
RJModules/plugin.so(BitMap::~BitMap()+0x26)
RJModules/plugin.so(SucculentWidget<20>::~SucculentWidget()+0x52)
I couldn't find any obvious fix so the workaround was to exclude it using the patch below.
--- src/RJModules.cpp~ 2023-01-24 11:37:44.000000000 +0100
+++ src/RJModules.cpp 2023-01-24 11:38:37.065981890 +0100
@@ -80,7 +80,7 @@
p->addModel(modelBuffers);
p->addModel(modelChord);
p->addModel(modelPlayableChord);
- p->addModel(modelSucculent);
+// Causes crash on exit if previewed p->addModel(modelSucculent);
p->addModel(modelLeftHandRightHand);
p->addModel(modelGravityGlide);
// p->addModel(modelSoundpipe);
--- plugin.json~ 2023-01-24 11:39:05.000000000 +0100
+++ plugin.json 2023-01-24 11:40:41.881979316 +0100
@@ -408,14 +408,6 @@
]
},
{
- "slug": "Succulent",
- "name": "Succulent",
- "description": "r/synthesizercirclejerk",
- "tags": [
- "Utility"
- ]
- },
- {
"slug": "PingPong",
"name": "Clock Synced Ping Pong Delay",
"description": "Clock Synced Ping Pong Delay",
Hi Rich, I had a go at porting your modules to V2 a while back and thought I would share my work with you.