0
0

Hi!

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!

FMOD_SYSTEM *fSystem;
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!

Many thanks,

Gregzo

  • You must to post comments
0
0

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.

  • You must to post comments
0
0

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.

  • You must to post comments
0
0

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!

Gregzo

  • You must to post comments
0
0

Can you try adding FMOD_System_SetOutput to the playsound example to verify that the example correctly outputs the wav file.

Also, what platform are you having troubles with?

  • You must to post comments
0
0

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…

Cheers,

Gregzo

  • You must to post comments
Showing 5 results
Your Answer

Please first to submit.