I'm wondering about building a Music + video art project where the video is dynamically generated based on the audio. So I was wondering, is there a way for me to poll data from the sound buffer?
Basically I want to do:
// Declare a new music
sf::Music music;
// Open it from an audio file
if (!music.openFromFile("music.ogg"))
{
// error...
}
// Change some parameters
music.setLoop(true); // make it loop
// Play it
music.play();
And then every frame I want to check what the music has done since last frame. Does SFML have a way to do this? I assume it does since the audio module seems pretty powerful and people are recording audio with it?
Basically, think Audiosurf, I want to use the waveform to find the pitch and volume to use as inputs to generate visuals instead of a track.
Edit: some more info.
Basically, the part I'm having a problem with is accessing the sound data, also I'm not sure what format it's going to be in.