Increasing cello_wave size in juce_demo makes compiler error


#1

i am newbie to juce and tried to mess around with the demo.
i wanted to test the sampler with a own wav file, that i converted with the binarybuilder. i replaced the cello_wav content with my own wav file (that is bigger than the cello_wav) , reset the size accordingly to the output of binarybuilder.
i get a “heap is not enough” compiler error.
i looked in the code of the demo where a Memory Block for the binary data is initialized, but found no place of such initialization to increase the memory block for the bigger binary data.

my question:
is there a way to increase the memory for the binary data (an code snippet would be very helpful)

best regards,

bernhard


#2

Well as you can see from the demo code, there’s nothing hard-coded - it just picks up the size from the binary data. So either you’re using such a huge file that it’s genuinely too big for your memory, or you’ve corrupted the binary data somehow and it’s got a strange size.

Surely it’s easy to debug this by just stopping in the demo code and seeing what size it’s actually using when it tries to load the file?


#3

i can not debug the code, since it does not compile…
(the wave file is not read during runtime, it is built in the binary data)

//const int cello_wavSize = 46348; //old size
const int cello_wavSize = 1236516;//new size

this size should work well with 700 mb of memory?

before trying to inserting my wav content into the binary data file of the demo, i added 2 separate data files (mywav.cpp and mywav.h) to the demo, and had the same error, so i did not corrupted the binary data file.

regards,

bernhard


#4

oh, it’s a compiler error - sorry, I didn’t read that bit. Well not much you can do about that, except to use a different compiler! Just load it as a real file instead of embedding it.


#5

i will not give up so fast, because i want to make a sampler with embedded files.
i tried a different compiler, i installed dev-c++ (latest release 4.9.9.2)
i installed Microsoft platform SDK and added the include path as last entry to my include path.

when i try to compile juce, i get the following error:

C:\juce\juce_1_41\juce\build\win32\devcpp\Makefile.win [Build Error] […/…/…/bin/intermediate_devcpp/juce_KeyMappingEditorComponent.o] Error 1

regards,

bernhard


#6