0
0

Hi, I’m using FMOD to make an audio player for windows using Borland C++ Builder. Just for my own gratification really and to learn how to use the library for possible use in any games I make.

So far it works a treat and I’m really enjoying using the library, the media player works fine but I have a slight problem when playing CDs. I’m playing them in Continuous mode and have a timer set for one second that updates track and time information. When the CD finishes I assumed that I could check in the timer function for the track using:

[code:annhsaj4]if(FSOUND_CD_GetTrack(0) == 0) do stuff;[/code:annhsaj4]

This assumed that as the CD is finished the function would return 0 but the function is still returning the last track number. Does anyone have any ideas how I can get around this? I thought I could check for the last track, get the track time and predict the end of the CD but I’d prefer a safer and less convoluted option! :)

  • You must to post comments
0
0

No joy working this one out, I’ve even tried getting the time of the last track and stopping when the last track current time equals or exceeds it. That doesn’t want to work either…AAARRGHH!

[code:jre2l5im]
time = FSOUND_CD_GetTrackTime(0);
if((FSOUND_CD_GetTrack(0)) == (FSOUND_CD_GetNumTracks(0)))
{
if(time >= FSOUND_CD_GetTrackLength(0,track+1))
{
StopClick(Stop);
}
}
[/code:jre2l5im]

ps. track+1 is correct to get the current track’s time.
Any thoughts? anbody out there??? :(

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.