Guys, I know this have been discussed before, but it didn't help me out, and google didn't help and nor the forum search... so, what I'm trying to figure out is how the heck can I use the JUCE WAV class to read loop point information from a WAV file?
There is no loop point info in a normal WAV file - you can pull out Acid and BWAV data if it was saved in thpse formats, and you might find some clues in there.
If the wav files contain loop or cue data it will be written into the AudioFormatReader's metadataValues member. Take a look at to top of juce_WavAudioFormat.cpp to see where all the different chunks get parsed.
Another thing I don't get, how come WAV files don't have loop points if all my life as a VST coder I have using WAV files that have loop points? I used SoundForget to add those, and now Wavosaur.
I still can't figure out how to extract the loop-start and loop-end using the JUCE code. :-(
Like I said, the info you're talking about is probably in some sort of custom chunk. It's not part of the core WAV spec though, so not all files will contain this.
And like Dave said, look at the metadata. If you open one of the files you're trying to read, and print out all of its metadata values, it should be pretty clear which ones you need to use.
It really seems like the loop points are already available in juce wavAudioFormat. All read in and ready to use! Or am I staring at some dead code leftovers?