0
0

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.

Cliff :)

  • You must to post comments
0
0

Hi brett,

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);
}
}[/code:2oqsv61u]

(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?

Cliff :)

  • You must to post comments
0
0

hah, of course, thought it was something I was doing wrong 😳

  • You must to post comments
0
0

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…

http://luminance.org/fmod/FMod_Ex.tlb (typelib)

http://luminance.org/fmod/FMod_Ex.idl (source)

  • You must to post comments
0
0

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?

  • You must to post comments
0
0

[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…

  • You must to post comments
0
0

I don’t know if I’ll be any help, but it works OK with C# .NET … I juste use DllImport and tell the function name…

perhaps you’re not using the correct parameters when calling the function…

  • You must to post comments
0
0

[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…

  • You must to post comments
0
0

[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.

  • You must to post comments
0
0

hi Brad!

We are fascinated about the feature list
(vst plugins?,flac-support,…)
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
older version.

a last question: any ideas when fmod4 becomes a final version for production use?

hope to hear from you :-)
bye,
Thomas.
http://www.mp3observer.com

  • You must to post comments
Showing 9 results
Your Answer

Please first to submit.