Several problems building projects out of the box:
1) You have renamed the lib files (eg from fmodexvc.lib to fmodex_vc.lib), but not updated the example projects.
2) When compiling playstream and cdda, I get a warning: “warning C4013: ‘FMOD_Sound_GetLengthMs’ undefined; assuming extern returning int”
I couldn’t see FMOD_Sound_GetLengthMs defined anywhere in the header.
3) The new changes with removing FMOD_DONTPREBUFFER and using FMOD_OPENONLY instead, have not been carried over into the cdda example, and won’t compile without changes
4) Examples that use FMOD_Sound_GetTag are out of date, as it appears you have changed from using an int, to using a const char *. Once again, can be fixed, but not working out of the box.
I’m not sure, but I think I may have found a problem with loading a sound paused while another is still playing?
Basically I was playing my stream (using the playstream example), and I would then detect when there was about 2 seconds left, and tell it to ‘PlaySound’ the second sound I had already created, but with the parameter paused set to TRUE, so that I could then tell it to play as soon as I got the end of file callback.
So just before the printf statement, I added
[code:2oqsv61u] if (lenms – ms <= 2000)
if (g_channel2 == 0)
// Preload the sound now.
result = FMOD_System_PlaySound(g_system, FMOD_CHANNEL_FREE, g_sound2, TRUE, &g_channel2);
(g_channel2 and g_sound2 are two more global variables I added to the top, and I also added a CreateSound call for the g_sound2 prior to the main loop)
When I do this, it seems to pause the other channel that is currently playing as well! If I change the paused to FALSE then it works fine (however it plays it at the wrong time, and hence not what I want)
Is this how it is supposed to function (and I have totally misunderstood how it is supposed to work), or is this a bug?
I’ve started putting together a FMod Ex Type Library for VB6 users. Right now it has all the 0.5 structs and enums defined, and I’m working on the functions…
Brett, VB isn’t letting me call the cdecl functions you’re exporting from FMod Ex (almost all of them are cdecl as far as I can tell)… it either throws up an error message (Bad DLL Calling Convention) or crashes. Is there any way we can get FMod Ex to be all stdcall, at least on win32?
[quote="brett":ezkzkzk2]fmod 3 used to be cdecl and it worked, it was only the callbacks that needed to be stdcall in VB. It was only 3.6 or someting that switched to stdcall.[/quote:ezkzkzk2]
Dunno what to tell you, I’m getting random crashes and FMod Ex isn’t working at all for me from VB. It either returns error 38 (a driver call failed) or crashes. The C++ examples build and run fine…
[quote="brett":32ii3w0w][quote="Janus":32ii3w0w][quote="brett":32ii3w0w]fmod 3 used to be cdecl and it worked, it was only the callbacks that needed to be stdcall in VB. It was only 3.6 or someting that switched to stdcall.[/quote:32ii3w0w]
Dunno what to tell you, I’m getting random crashes and FMod Ex isn’t working at all for me from VB. It either returns error 38 (a driver call failed) or crashes. The C++ examples build and run fine…[/quote:32ii3w0w]
It looks like a VB issue that you’ll have to sort out. Something is probably being corrupted by the calling convention VB is using or the IDE.
We won’t be going back to stdcall unless absolutely nescessary.[/quote:32ii3w0w]
I’ve been doing some research and experiments, and it looks like VB just doesn’t like cdecl. I can barely get FMod4 to work with cdecl, but it only works when compiled – the IDE [b:32ii3w0w]crashes[/b:32ii3w0w] when trying to run with a properly written FMod type library. If I take out the ‘_cdecl’ markers in the type library, it runs, but then it doesn’t work because the calling convention is mishandled. It’s rather baffling, really. I can’t imagine why the compiler would handle it right but the IDE wouldn’t.
I’m going to see if maybe I can trick it somehow.
[b:32ii3w0w]Edit[/b:32ii3w0w]: Also, I get a crash in fmodex.dll if I try and play an OGG as a stream. MP3 and WMA files work fine.
[b:32ii3w0w]Edit #2[/b:32ii3w0w]: The IDE doesn’t like FMod using a .BAS file, either. ‘Bad DLL Calling Convention’.
I guess you could just drop VB6 support. I could probably manage to write a C++ wrapper for my needs. I know it wouldn’t be terribly easy to switch to stdcall, anyway…
[quote="brett":tziq7uq1]As i said, FMOD 3 -always- worked with VB and cdecl. why wouldnt this one? I’m sure it isnt impossible and other people are doing it with other libraries.[/quote:tziq7uq1]I don’t know what to tell you other than I’ve tested it thoroughly and the only way I’ve gotten it to work is to compile it using a type library. The IDE crashes or throws up error messages otherwise.
I’ll try and install VB6 and FMOD Ex on a test machine to make sure it’s not just a configuration issue of some sort.
We are fascinated about the feature list
but will you inlude more samples in the future?
Lots of people post sometimes interesting code-fraquments,
thats nice, but something more would be beautiful.
I think you can do so much with fmod4, but the samples included
only show a minimal subset…:-(
and: whats about a reall working .NET (C#?) sample?
most of the links about .net samples are dead, or are old and use
a last question: any ideas when fmod4 becomes a final version for production use?
hope to hear from you
Please login first to submit.