I’m a Fmod Designer user trying to get a better understanding of the programmer’s side of things. I’m writing little programs in C to test my events, cues, reverbs and parameters. So far so good…
Except I’m now trying out the wavwriter, and am getting a file of the right length but with no content! And no errors… Here’s my wavwriter related code, any help very much appreciated!
result = FMOD_System_Create(&fSystem);
result = FMOD_System_SetOutput (fSystem, FMOD_OUTPUTTYPE_WAVWRITER);
result = FMOD_System_Init (fSystem, 32, FMOD_INIT_NORMAL, "test.wav");
And releasing fSystem after the main while loop.
My program plays events and cues fine, just doesn’t write anything to the wav. Please help!
- Gregzo asked 6 years ago
Wav writer is an output mode replacement, therefore it cannot connect to speakers as well as a file. If you need both, the simplest method is to create a custom DSP, memcpy the values through from input to output and fwrite out a copy of the data too. That forum post you linked is still the way things are done today.
I sounds like you are actually creating two system objects.
When you use the event system, you extract the underlying system object by using EventSystem::getSystemObject, then you can apply the correct output mode, init the system, then init the event system.
Hi Mathew, and thanks for the quick reply!
I’m running windows xp 2002 edition, and the latest stable versions of fmodex and fmod designer.
SetOutput to wavwriter in the playsound example works perfectly.
Do I have to somehow route the MusicSystem and the EventSystem to get it to work in my program? Also, I understand that when setting the output to wavwriter, sounds are not coming through the speakers anymore. But in my program, they still are.
Many thanks for helping a newbie!
Thanks, it’s working! I’m now trying to record and playback at the same time. I found this post from 2009: viewtopic.php?f=7&t=12422&p=43916&hilit=Wavwriter#p43916
Have things evolved since then? Or is it still the only way? I’m quite new to coding, and it would save me a lot of time if wavwriter could do its job without cutting the speakers output…
Please login first to submit.