It seems that since some versions (don’t know when it started) there is a problem with readData on a CD always returning data starting from the first track.
The cd player example works fine, so I think it’s a problem with readData only.

Here’s what I try:
fmod_result = fmod_system->createSound(fileName, (FMOD_MODE)(FMOD_SOFTWARE | FMOD_2D | FMOD_CREATESTREAM | FMOD_OPENONLY),NULL , &fmod_sound);
fmod_sound->getSubSound(subsound, &fmod_sound);
fmod_result = fmod_sound->getLength(&length, FMOD_TIMEUNIT_PCM);
fmod_result = fmod_sound->readData(tmpBuffer, 512, read);
The length returned is correct and different for each track (so I assume getSubSound was working correct), but readData always returns data from the first track.

  • You must to post comments

Adding fmod_sound->seekData(0) after the getsubsound call does indeed seem to solve the problem.
The strange thing is also that according to some users it is working fine, so it may be a problem with some cd drivers only.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.