0
0

Hello. I’ve dug up some old VB code and got it working with fmod.
Specifically, I can load and playback multiple wavs at the same time.

I’m trying to compile one of the VB examples that came with fmod.
When I hit this line in the recordtodisk example:

result = FMOD_System_SetRecordDriver(system, ComboRecord.ListIndex)
ERRCHECK (result)

I get "Error – Sub or Function not defined".
I’ve checked the Declares section in the module and there’s no mention of such a function in the dll. Where can I find a list of all functions in the fmod DLL?

Does anyone know what the name of this function is or how to declare it for use with creaky old (but still cool) VB6?

Thanks, Chris

  • You must to post comments
0
0

The VB6 wrapper is a little out of date. There is no ‘SetRecordDriver’ function anymore. Instead you should just use:
[code:2ke7ogr0]
FMOD_RESULT FMOD_System_RecordStart(
FMOD_SYSTEM * system,
int id,
FMOD_SOUND * sound,
FMOD_BOOL loop
);
Parameters
id
Enumerated driver ID. This must be in a valid range delimited by System::getRecordNumDrivers.

sound
User created sound for the user to record to.

loop
Boolean flag to tell the recording engine whether to continue recording to the provided sound from the start again, after it has reached the end. If this is set to true the data will be continually be overwritten once every loop. See remarks.

[/code:2ke7ogr0]

  • You must to post comments
0
0

Thanks for the reply – it’s just what I was looking for!
I’ve now created a load of wavs and have built a front-end sequencer to allow users to position them with millisecond precision (it’s actually an old app ressurected, hence old VB6). This generates a list of timecodes and an index to say which wav should play when.

My playback routine is working nicely – I basically sort the list then get the number of milliseconds since playback started and any wavs that have an earlier timecode and haven’t yet been played get kicked off.
The playback isn”t millisecond-precise but it’s good enough!

What I’d like to do is have the user mixdown their sequence to a single wav/mp3. Could anyone offer any pointers? My first thought was to somehow capture the speaker output during playback and write this to file, but I’m sure some clever bod on here will know how to do it in non-realtime (i.e. faster?)

My sequencer output is something like:
1049,1
2365,2
3100,1
3140,0
etc
where the first value is the time in ms and the second value is the index number of the pre-loaded wav, loaded using FMOD_System_CreateSound(system, sFileName, FMOD_HARDWARE, Sound(Index))

-all my sounds are loaded into the array Sound(0-12)
Thanks again for all the help so far!
Chris

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.