So, as far as I understand, it looks to the working directory of my newly created file, and looks for a file named" MyImpulse.wav". And it works like a charm when run from the IDE. However, when I build the actual standalone application, and include the impulse Wav file to the applications directory, it gets completely bypassed, leaving only a dry signal. I can only assume it can’t actually find the wav file.
The working directory is not guaranteed to be the same directory where the executable file is. Use File::getSpecialLocation with currentExecutableFile instead.
However, it doesn’t work when run from either the IDE, or the standalone applications. Tried for both release and debug builds, with the wav files definitely included in the directories. Really unsure of what’s happening here, Unless I’m making some obvious syntactical error, it should at least load it in the IDE, since the previous implementation was fetching the file.
my .wav file is in the same exact directory level as the executable, so I tried .getSiblingFile as well, but to no avail.
You are calling a static function, when you do the IRFile.getSpecialLocation(File::currentExecutableFile).getChildFile(“IR.wav”).
The correct call should look like: File::getSpecialLocation (File::currentExecutableFile).getSiblingFile ("IR.wav").
Next remark, for a first test I use a folder that I know for sure it exists and I know where it is: user desktop:
After changing to the static member function it seems to work for both builds! Not sure why this is the case, but I have a new priority topic to study and understand better.
Thank you very much for the advice.