0
0

Hi,

I’m trying the following:
– you’re playing a game with sound
– in replay mode you get the option to save an AVI file
– the replay should contain audio
– after the replay, normal gameplay plus sound must continue

I have 2 solutions for this:
1. Switch FMOD_OUTTYPE_xx during the replay. However, this means (it seems) I need to release() and reopen the FMOD::System. Which means I have to reload all samples, and currently my system doesn’t administer which samples have been loaded in one location. Is it very hard to make switches to this virtual output device possible? (so from DSOUND to WAVWRITER and back again; I assume WAVWRITER is a software interface).

  1. During the replay, keep control of the mixer; as it’s writing to disk (images as well), the process is NOT realtime (unlike Fraps, hm) so the audio, if recorded through WAVWRITER, would be too slow. Therefore you’d need a sort of ‘ProduceAudioForSomeTime(t)’ which could keep audio in sync with the video generated. Is there something like this? (i.e. a mixer which doesn’t work on realtime but rather gets its time directly, so if I’m generating a 25fps AVI I can call mixer->GenerateSamplesFor(40ms) every graphics frame. For a software driver, this would be possible at least (since probably FMOD does that internally anyway).

Perhaps any other solutions exist. I tried switching to WAVWRITER on the fly (without recreating the FMOD::System variable) but that is ofcourse ignored currently.

Also, the WAVWRITER output seems doubled; my wav files are twice as long (in time) as they should be. I tried setFormat(44100,FMOD_SOUND_FORMAT_PCM16,1,0) but that didn’t help.

  • You must to post comments
0
0

I’ve tried the DSP approach, which seems to work quite well. Generates a .wav file on the fly. It does seem like the DSP’s are handled before 3D Doppler and such? (seems the pitch varies a little bit w.r.t. the original)

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.