Just an FYI so that this solution is recorded in the forum somewhere for anyone attempting this later (as I wasn’t able to find a solution here either) I was able to build 1.70 and get it working with BCB5, preliminary findings: (not all this cleanup is required, some is just for annoying warnings)
in sound.h all the declarations inside the extern “C” should be prefixed with “extern” (that fixes the error that started this thread), remove one of the dups of FSOUND_BufferSize, give FSOUND_Channel it’s “256” dimension
in mixer_fpu_ramp.c there are several asm statements that reference structure offsets that need to have their syntax changed slightly to the form: mov edx, [ebx].(FSOUND_SAMPLE)length (there may be other syntax if using TASM separately or not ideal mode, or whatever)
in mixer_fpu_ramp.c wrap the asm comment “; 100 hz” inside a c comment /**/
in mixer_clipcopy.c I kept getting fp “invalid op” runtime exceptions in the fld/fistp asm block, these went away when I replaced with “int val = (int)(*srcptr++);” – did not trace output any deeper to determine cause (perhaps eax being used elsewhere and getting trashed?)
aside: interestingly, when I built the demo+lib source together that fp bug didn’t occur, only when building a separate library then linking it to the demo main, so it may be an optimizer thing?
typecast calls to FSOUND_Memory_Calloc – actually I did a lot of typecasting to remove warnings, I forget which ones it actually errored on (with “cannot convert xxx to yyy”), suggest you fix them all anyway
Or you might want to turn off W8004 (assigned but not used) and W8012 (compare sign to unsign) warnings with #pragma warn, as there are a lot of those (unless you want to add the typecasts)
There might be quicker ways to get it compiled with various “MFC” compatibility switches in the project options, but I avoided using those to try and get “cleaner” BCB code, so I have no info re: that approach.
- davbol answered 13 years ago
- You must login to post comments
Please login first to submit.