I just downloaded version 4.24.03 and when I try to run the example called "pitchdetection" it fails.
I found that the definition for "[b:75rm7m84]FMOD_System_SetRecordDriver[/b:75rm7m84]" isn’t there. I’ve searched all the source to try and find if it was just a typo without any joy.
when I open any other recording example the same issue is there.
Furthermore, If I remove the call then I find that
[/b:75rm7m84](there could be more, I just quickly found these)
are missing the ID variable in the example code.
If you remove the SetRecordDriver and associated error checking, and add an ID of 0 to the calls that are missing then it seems to work fine.
I can’t find any refrence to it in the documentation or online.
Can anyone shed some light on this?
- DrPhallus asked 8 years ago
I think It could be some miss-updated API for VB, I was fighting to start with some redeclaration (hard start)
So, this item, lets you select hardware (Which board if you have 2 o more installed)
Im newbie in FMOD, and I have this issue too. Somebody know how to fix it?
- alo2 answered 8 years ago
pitchdetection, fmodex win32api 4.29.09:
So I couldn’t get the example to work, I think the following API related modifications are required.
remove FMOD_System_SetRecordDriver usage, the index is now specified directly (ID) when calling following APIs:
In the pitchdetection example, only FMOD_System_RecordStart is used, modify to something like:
result = FMOD_System_RecordStart(system, ComboRecord.ListIndex, Sound, 1)
Add the following line to the end of the FMOD_CREATESOUNDEXINFO structure:
ignoresetfilesystem As Long
(for other projects that do not relying on this structure, see http://220.127.116.11/forum/viewtopic.php?t=9407 )
The FMOD_System_CreateSoundEx function expects a string as filename parameter, so add this modified API declaration to pass 0 properly:
Public Declare Function FMOD_System_CreateSoundEx_NoFileName Lib "fmodex.dll" Alias "FMOD_System_CreateSound" (ByVal system As Long, ByVal Name_or_data As Long, ByVal Mode As FMOD_MODE, ByRef exinfo As FMOD_CREATESOUNDEXINFO, ByRef Sound As Long) As FMOD_RESULT
The API expects a pointer (or NULL) now, the example already uses 0 (for NULL), so you only have to rename the function to FMOD_System_CreateSoundEx_NoFileName
result = FMOD_System_CreateSoundEx_NoFileName(system, 0&, (FMOD_2D Or FMOD_SOFTWARE Or FMOD_LOOP_NORMAL Or FMOD_OPENUSER), exinfo, Sound)
You may also consider to stop instead of ending the projects, so you can continue if errors occur and unload the form properly, instead of having VB crash;
To do so, update ERRCHECK:
If msgResult Then
Stop ‘ instead of End
Or modify the MsgBox to ask to continue or break, etc…
Please login first to submit.