This is rather a problem related to my programming skills than Juce, I hope you don’t mind me asking this here anyways.
I never used C++ until I found this wonderful Framework, thanks for all the effort you put in developing this, my first steps in C++ couldn’t have been made easier.
What I want to do is very simple, have a VST that loads WAVs and plays them back when it is triggered by a MIDI-note.
I got the file to load and wrote the data in a Byte array like I am used to from OpenAL programming while Juce wants to have a float input for the sample buffer. I am a bit lost here.
It’s a 16bit WAVE file and I have no idea how to get the float representation. If I only add the first byte to the buffer I have 8bit audio, how do I add the second byte?
(-127 + Firstbyte) * 255 + (Secondbyte) is what I used to do in other programs (pascal), but this does (of course) only work with int16 values.
I have set the hosts bit rate to 16bit btw, and the sample rate is also the same, to make it as easy as possible.