0
0

Intention: Play back real-time streaming sound when someone is speaking in a microphone of what they say.

Problem: newsound comes back as a NULL pointer.

I checked out the tutorials for recordtodisk and made some modifications to suit the purpose of residing the sample in memory. I’m stumped and now have the flu to compound my pain! Please help.

Thank you,
Brandon

[code:1l4qdx1q] sound->lock(lastrecordpos * exinfo.numchannels * 2, blocklength * exinfo.numchannels * 2, &ptr1, &ptr2, &len1, &len2); /* * exinfo.numchannels * 2 = stereo 16bit. 1 sample = 4 bytes. */

          FMOD::Sound * newsound;
          memset(&exinfo2, 0, sizeof(FMOD_CREATESOUNDEXINFO));

          exinfo2.cbsize           = sizeof(FMOD_CREATESOUNDEXINFO);
          exinfo2.length           = len1;

    FMOD_RESULT result =  audio.GetSystem()->createStream((const char *)ptr1, FMOD_2D | FMOD_SOFTWARE | FMOD_OPENMEMORY, &exinfo2, &newsound);


          /*
          Unlock the sound to allow FMOD to use it again.
          */
          sound->unlock(ptr1, ptr2, len1, len2);[/code:1l4qdx1q]
  • You must to post comments
0
0

hmm thats a tough problem. I really don’t know too much about FMOD, try checking out the wow forums, if you havent already

  • You must to post comments
0
0

the basic ‘record’ example does this. So does the useplugins example (where it allows you to add fx to the sound as it plays)

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.