hello list.
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)
PCM format
1 channel
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.


  • You must to post comments

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. :roll:
i thought it would be nice when you have access to the RIFF information
of the wave file.
more like a wave file analysis.


  • You must to post comments

hello list.
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
mmioFOURCC /*
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.

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.