So I’ve managed to hack together a little tool for recording x Frames (5) of audio at a given Framerate (25) using the awesome ofxLibsndfileRecorder for recording, playback and saving. Works fine on my laptop (2014 MBP 10.8.5) and on an old 2006 MB (10.6.8), however testing on another machine, it never manages to write the temp.wav file needed for everything to work.
I moved my temp.wav file to ‘…/’ of the data folder- since that was the first issue I found when moving the binary to the desktop… perhaps the data folder is intended for reading only? I had thought of storing this temp.wav file in the ‘~/Documents/appname’ path- but couldn’t get ofxLibsndfileRecorder to recognize or find that path for saving to.
In the end, it’s surely wasting hard drive space and speed by even storing audio in this temp.wav file. The main question is- how do I go about moving this temp audio to the buffer?? I’ve been combing these forums and google for examples using the ofSoundBuffer (having found the ofSoundBuffer .h + .cpp here) along with some documentation here - nevertheless, I’m wondering if ofSoundBuffer is even designed for this setup? I now see there is an ofBufferSound example in the works… however it’s based on generative sound, rather than recorded, sampled/playedback, and exported/saved. Are those possible with it… could someone offer some guidance [even minor snippets for C++ issues that might not be obvious]? Experienced in Processing and slowly gaining ground in oF.
The code thus far for the project can be found here: audioFrames