I’ve been using/learning Juce since April. I love it! My current goal is to make a plug-in that is basically an EZkeys type plug-in which uses samples (.wav files) taken from a keyboard instrument. So there will be a picture of a keyboard in which the user will be able to click on any of its keys to play the desired pitch. At the moment I’m using a textButton as a test, to make sure it is done correctly. The best way to describe the issue that I’m having is that the sound that’s played once the button is clicked seems to play in a lower pitch than the .wav file. There also seems to be a memory leak happening somewhere.
Here is what I did: I created an audioDeviceManager object and used initializeWithDefaultDevices(0,2) in the PluginEditor’s constructor. Then, using the buttonStateChanged function, if the button isDown() it uses the playSound() function where I pass the binary data of the .wav file. For some reason the pitch of that .wav file becomes lower (maybe other issues in the audio that I haven’t noticed as well).
I notice that the memory leak warning appears only if the user clicks the button (so only if there is audio output). So I definitely feel like I’m doing something wrong. I’m under the impression that the playSound() function handles everything required to output sound.