0
0

Hello, I am quite new to FMOD, and I need a question answered. What is the best method of acquiring the total length of a CD (i.e. the combined length of all tracks). I want to be able to display it’s length in the format “minutes:seconds:milliseconds”.

BTW, FMOD is a great library. It is alot easier to use than DirectAudio, and seems to be more powerful.

  • You must to post comments
0
0

If you’re using the FSOUND_CD_xxx functions, use FSOUND_CD_GetNumTracks to find out how many tracks there are and then call FSOUND_CD_GetTrackLength for each track.

If you’re using the FSOUND_Stream_xxx functions (i.e. CDDA), use FSOUND_Stream_GetNumSubStreams to find out how many tracks there are and then call FSOUND_Stream_GetLength or FSOUND_Stream_GetLengthMs for each track. See the samples\cdda example if you need further clarification.

Cheers,

  • You must to post comments
0
0

Kewl, thanx. Also, this brings up another question. Is there any benefit to playing a CD using the FSOUND_Stream_XXX functions as apposed to the FSOUND_CD_XXX functions?

  • You must to post comments
0
0

The FSOUND_Stream_xxx functions read the CD digitally so the stream can be treated like a normal file stream i.e. you can change the frequency, attach DSP units to it, write it out to file etc. The FSOUND_CD_xxx functions play the CD in analog mode so it takes less CPU time but you can’t access the playing data or change frequency or anything like that.

  • You must to post comments
0
0

Is selecting each substream with FSOUND_Stream_SetSubStream and then getting the length the only way? I’ve found that this method takes a tremendous amount of time because you have to poll FSOUND_Stream_GetOpenState and wait for the stream to be ready again before getting the length. Maybe I’m just overlooking something. Any insights on this matter would be greatly appreciated.

  • You must to post comments
0
0

Okay, I’ve used the “d:*!” argument to do a quick open, but it still takes a considerable amount of time to acquire the length of each track. Is there somthing I’m doing wrong?

  • You must to post comments
0
0

You’re probably doing something wrong. Once a CDDA stream is opened with quick-open, getting a track length should be a sub-millisecond operation. Are you absolutely sure it’s quick-opened when you read the track lengths?

  • You must to post comments
0
0

Okay, I’m dumb. I did make a mistake. I simple case of using the wrong identifier when calling FSOUND_Stream_Open. Thanx for the help though.

  • You must to post comments
Showing 7 results
Your Answer

Please first to submit.