I'm further developing [neuralnet] to include variational autoencoders. Trying to train it on audio, I want to be able to read audio files without using Pd's [readsf~]. I have managed to read unsigned 16-bit WAV files inside the object, but when I'm trying to store the values to the object as a training dataset, Pd crashes, and I think this is related to memory reallocation.
The code can be found here https://github.com/alexdrymonitis/neuralnet/tree/develop
You'll need some audio files in a directory named "recordings", which should be in the "examples" directory (in the GitHub link the "recordings" directory doesn't exist, because it would be empty, and Git won't let you create an empty directory, if I'm not mistaken). Follow the steps in the 05-audio_variational_autoencoder.pd example, and Pd should crash. I think this happens when the `store_audio_training_sample()` function is called, in line 4407 in neuralnet.c.
Any help greatly appreciated.