I’m a total FMOD noob and been spending a few hours too much trying to solve a problem not even knowing if it’s possible.
Help is much appreciated.
Problem: I want to create a buffer (like 2-10sec long), then play this in a circular manner at the same time being able to affect and change the buffer (like pressing keys on keyboard to make sounds) within the values -1 to 1 to be able to do some custom DSP realtime effects.
So stream directly to soundcard from a real-time generated signal..
I want to handle this in memory only, and I’m getting stuck when trying to create the sound and point to my buffer. Could someone please provide a quick sample for this? Or a hint for what to search for in the manual
So far tried with something like this:
System_Create( &m_fmodSystem );
m_fmodSystem->init(100, FMOD_INIT_NORMAL, 0);
FMOD_CREATESOUNDEXINFO exinfo; memset(&exinfo, 0, sizeof(exinfo)); exinfo.cbsize = sizeof(exinfo); exinfo.length = 10 * 44100 * sizeof(float);//10sec exinfo.numchannels = 1; exinfo.defaultfrequency = 44100; m_fmodSystem->createSound("dunnoWhatToWriteHere", FMOD_OPENMEMORY_POINT, &exinfo, &m_fmodSound); m_fmodSound->setLoopCount(20); m_fmodSystem->getChannel(FMOD_CHANNEL_FREE, &m_fmodChannel); m_fmodChannel->setVolume(1.0); m_fmodSystem->playSound(FMOD_CHANNEL_REUSE, m_fmodSound, false, &m_fmodChannel); //loop 20 times and affect the buffer here just before fmod should play it...possible ?
thanks in advance if anyone takes time to answer. I’ve tried to search the forums but maybe I use the wrong keywords. I’m not used to audio terms and what to use..
- Xorath asked 10 years ago
Please login first to submit.