How to access individual samples in playback-only audio files?


I have been trying to do sample-level manipulation of an audio file similar to what you can do with streaming input from ofSoundStream. But it doesn’t appear that ofSoundPlayer allows for access to an audio file in that way… is that correct? I’ve been looking at fmod.h for quite a while, but I am new to openFrameworks and the the other libraries within it and have not been able to figure out how to get the file pointer that would let me interact with a sample.

Does anyone here know of a way that can be done, or if there’s something that I maybe overlooked?

Thanks very much for any help!

I’m just starting with Openframeworks myself, but i was instructed to check out the libsndfile library for getting sample-by-sample access to audio. I wrote two little tutorials for getting it up and running with xcode here:

What I’m currently trying to do, is pipe a simple buffer of samples to the OF sound stream, or jam it into a soundplayer object, and I dont know how to do that.