how can i read the cue-list in a Wave File?
i think, there was a post before on this subject:
bret said something like:
“interesting, yeah i was going to add some functionality for the sync callback stuff.. i was going to add ways to add and delete your own callback points, so i guess being able to list them would be useful as well.”
i think, i could just read the RIFF Format of the Wave File:
RIFF ‘WAVE’ (wave file)
<fmt > (format description)
11025 frames per sec
11025 bytes per sec
1 bytes per frame
8 bits per sample
<data> (waveform data – 52862 bytes)
<cue > (cue points)
#1: sample 23168 (playlist position 23168)
#2: sample 30976 (playlist position 30976)
#3: sample 35520 (playlist position 35520)
#4: sample 38816 (playlist position 38816)
#5: sample 42400 (playlist position 42400)
#6: sample 44976 (playlist position 44976)
#7: sample 48960 (playlist position 48960)
like in the RiffViewer app from:
but after reading infos in the net and as a slow-brain i don’t get it right.
maybe someone is also interested on this topic and there are some solutions.
o.k. , i know the FSOUND_Stream_SetSynchCallback, and i’m using it
like in the “fmod” eyample code. great example, by the way. 😀
my idea was:
when i edit the samples in cooledit i can save markers within the wave file.
i thought it would be nice, when i read the wave in fmod, i could read the <plst> Riff chunk where the <playlist> information of the markers is stored.
then i could reach every marker directly, because i have the cue-informations when i load the file.
i could jump within the sample from marker to marker and do some
weird sound stuff. 😮
thats more an idea for a music aplication than for syncronising some openGL engine to the sound. or something like that.
i thought it would be nice when you have access to the RIFF information
of the wave file.
more like a wave file analysis.
well, i worked on the getting-the-cue-list-problem the last days.
i have a very ugly solution on my machine, but it works !!! 😉
i use the <mmsystem.h> functions to read the IFF chunks.
(you don’t have to use fmod for this 😉 )
ruffly, that means:
mmioOpen // open the file
the Four-Charakter-Code for the chunk, you want to search for:
1. ‘W’,’A’,’V’,’E’ // the header
2. ‘f’,’m’,’t’,’ ‘ // some other header 😉
3. ‘d’,’a’,’t’,’a’ // the music
4. ‘c’,’u’,’e’,’ ‘ // the cues
mmioDescend // scan the file for the FOURCC
mmioRead // read the chunk into your struct
mmioAscend // leave the file for the next search
// you have to De,- Ascend for each FOURCC !!!!!!!!!!!!!!
mmioClose // close the file when finished with everything
(maybe i should post some example code here ?) 😆
for everybody who is interestet in the WAVE Format for windows.
i recomment to check this out, because
there is everything you’ll need to solve this problem.
and you get some funny facts ’bout the WAVE format itsself.
so, just “rtfm”, like always.
Please login first to submit.