0
0

Hello, I’m having a problem with recording and playback. I read a lot of information from you in the forum, but I still have the same problem.

The following is the code snippet I am using in my application:

result = FMOD_System_RecordStart(FSystem, ComboBoxRecord->ItemIndex, FSound, true);
ERRCHECK(result);
Sleep(100);                         /* Give it some time to record something */
result = FMOD_System_PlaySound(FSystem, FMOD_CHANNEL_REUSE, FSound, FALSE, &FChannel);
ERRCHECK(result);

When recording starts waiting 100 milliseconds and then start playing. At the end of 10 hours, the delay is 3 to 4 seconds.
How can I make the recording and reproduction remain synchronized?.

  • You must to post comments
0
0

Once you have your initial delay you can monitor how much distance there is between the read and write heads by comparing the channel play position with the position reported by System::getRecordPosition.

If you notice the distance between the heads is drifting you can correct it by subtly changing the frequency of the playback. So set the frequency slightly higher to catch up to the read head, or slightly less to buffer up more.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.