Hello all,
I have the frequency response data of a filter stored in a text file which I am trying to get my plugin to read and store in arrays upon loading.
In the plugin processor’s constructor I have the following code:
FILE *file1;
file1 = fopen("TF1.txt", "r");
for(int i = 0; i < 2048; i++)
{
fscanf(file1, "%f", &realNumber[i]);
fscanf(file1, "%s", &imaginarySign[i]);
fscanf(file1, "%f", &unsignedImaginaryNumber[i]);
fscanf(file1, "%s", &imaginarySymbol[i]);
}
This code works absolutely fine in a simple command-line version of my filter plugin, however after I (successfully) build my juce project in xCode, the plugin crashes when trying to load a new instance of it in Reaper or Cubase. It is the ‘fscanf’ lines that are causing the plugin to crash.
At first I thought I hadn’t saved the text file in the right location but after copying and pasting it in every possible location in my juce project folder and the xcode derived data folder I am guessing I am missing something.
