I am having some strange syncing issues using record/play/getwavedata when there is a hiccup on the iPhone. For example, the code below works great until the system is taxed by simply adding a viewcontroller or sometimes just the App returning from the background. I have a timer using getWaveData on the channel and the data is returned properly synced until the "hiccup". After that, the time between what was recorded and what getWavedata returns can span anywhere inside the length of the recordfile. The only way I have been able to remedy this is to set the length of the recordfile to a rediculously low amount (4096) or the amount of samples I am taking. I am also calling ->update() every .03 I hope someone can help please, thx

    FMOD_CREATESOUNDEXINFO  exinfo      = {0};
    memset(&exinfo, 0, sizeof(FMOD_CREATESOUNDEXINFO));

    exinfo.cbsize           = sizeof(FMOD_CREATESOUNDEXINFO);
    exinfo.numchannels      = 1;
    exinfo.format           = FMOD_SOUND_FORMAT_PCM16;

    exinfo.defaultfrequency = OUTPUTRATE;
    //exinfo.length           = exinfo.defaultfrequency * sizeof(short) * exinfo.numchannels * 16;
    exinfo.length           = 4096 *1; 

   result = fmodSystem->createSound(NULL, FMOD_2D | FMOD_SOFTWARE | FMOD_LOOP_NORMAL | FMOD_OPENUSER, &exinfo, &pitchSound);

    result = fmodSystem->recordStart(0, pitchSound, true);
    result = fmodSystem->playSound(FMOD_CHANNEL_REUSE, pitchSound, false, &pitchChannel);
  • You must to post comments
Showing 0 results
Your Answer

Please first to submit.