From 8819167c54595ecb70e0c94e79d66609b8b3df36 Mon Sep 17 00:00:00 2001 From: jens Date: Fri, 28 Apr 2023 08:30:23 +0200 Subject: [PATCH] Fixed waves path for linux --- Source/PluginProcessor.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/Source/PluginProcessor.cpp b/Source/PluginProcessor.cpp index aae01fd..6a89d9f 100644 --- a/Source/PluginProcessor.cpp +++ b/Source/PluginProcessor.cpp @@ -62,7 +62,12 @@ String JaySynthAudioProcessor::wavesGetPath() bool isExistent, isValid; File pluginfile = File::getSpecialLocation (File::currentExecutableFile).getParentDirectory(); +#if LINUX + String wavespath = pluginfile.getFullPathName() + String("/waves.bin"); +#else + // that'S probably windows String wavespath = pluginfile.getFullPathName() + String("\\waves.bin"); +#endif File wavesfile = File(wavespath); isExistent = wavesfile.existsAsFile(); @@ -695,7 +700,7 @@ void JaySynthAudioProcessor::getStateInformation (MemoryBlock& destData) ScopedPointerxml = new XmlElement("JSYNTH_BANK"); MemoryOutputStream outputStream(destData, false); - MemoryBlock tmpBlock(8192*1024, /*initialiseToZero*/true); + MemoryBlock tmpBlock(destData.getSize(), /*initialiseToZero*/true); GZIPCompressorOutputStream GZIPEnc(&outputStream, /*compressionLevel*/0, /*deleteDestStreamWhenDestroyed*/false, /*windowBits*/0); if (isPatchModified() || midCC_editBuffer.isMidiCCmodified()) @@ -729,10 +734,10 @@ void JaySynthAudioProcessor::getStateInformation (MemoryBlock& destData) GZIPEnc.write(tmpBlock.getData(), tmpBlock.getSize()); outputStream.flush(); -#if 0 -//#ifdef SYNTH_DEBUG +#if 1 { - File file(String("C:\\Users\\jens\\JaySynth\\bank.xml")); + File pluginfile = File::getSpecialLocation (File::currentExecutableFile).getParentDirectory(); + File file(pluginfile.getFullPathName() + String("/bank.xml")); file.create(); xml->writeToFile (/*const File &destinationFile*/file, /*const String &dtdToUse*/"JSYNTH_BANK_FILE" /*, const String &encodingType="UTF-8", int lineWrapLength=60*/); }