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).
- 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.
- Mentos asked 11 years ago
- You must login to post comments
Please login first to submit.