I'd like to record audio from a microphone and I'd like the user to be able to add cue points during the recording so when he loads the file afterwards, he can jump easily to a specific position.
I don't really know what file format I should use and how to store the metadata (cue points)
I thought about
What do you think?
Did you know that the WAV file format supports embedded CUE chunks?
The spec says:
The <cue-ck> cue-points chunk identifies a series of positions in
the waveform data stream. The <cue-ck> is defined as follows:
<cue-ck> -> cue( <dwCuePoints:DWORD> // Count of cue points
<cue-point>... ) // Cue-point table
<cue-point> -> struct {
DWORD dwName;
DWORD dwPosition;
FOURCC fccChunk;
DWORD dwChunkStart;
DWORD dwBlockStart;
DWORD dwSampleOffset;
}
For a WAV file with a single data chunk (the standard), fccChunk should be "data", chunkStart and blockStart are 0, and SampleOffset is the sample you want to mark.
This might be the most portable way to record your cues.