0
0

Something rather small, but still a release quality issue…

In \api\lib\ there is a .zip called libfmodex.zip. It contains a file called libfmodex.a

There is also a file called libfmodex.a in the \api\lib\ directory.

From the contents of the files, it would appear that the one in the directory is newer, so in that case perhaps the .zip file is not supposed to be there?

I’ll keep trying out this build and let you know if I find anything else.

Cliff :)

  • You must to post comments
0
0

Ok, I modified the playstream example so I could try reverb. I’ve tracked the problem down to FMOD_System_GetDriverCaps(). If it is called after FMOD_System_Init(), then I cannot call the FMOD_System_SetReverbProperties() without a crash. Moving the call before the Init fixed it.

If the next release fixes the 3D sound speaker issue (all speakers are playing) then I should be out of bugs to report 8)

  • You must to post comments
0
0

I don’t see FMOD_TIMEUNIT_RAWBYTES defined in the BAS module. What is the value for this flag?

There is a FMOD_TIMEUNIT_PCMBYTES (equivalent to &H4), which–as with the alpha builds–returns a decoded byte length.

  • SD
  • You must to post comments
0
0

I just noticed a small bug in the documentation:
In System::playSound, it says:
Use the value FMOD_MISC_VALUES.html”>FMOD_CHANNEL_FREE to get FMOD to pick a free channel. Otherwise specify a channel number from 0 to the ‘maxchannels’ value specified in System::init minus 1. FMOD_MISC_VALUES.html”>FMOD_CHANNEL_ALL plays the sound on all channels.

I suppose that ‘FMOD_MISC_VALUES.html”>’ doesn’t belong there and should ‘ve been a link.

A second thing: I’ve just started trying out fmod ex in visual basic, and I have added the following declaration:
[code:ln1w148d]Public Declare Function FMOD_System_CreateSound2 Lib "fmodex.dll" Alias "FMOD_System_CreateSound" (ByVal System As Long, ByVal name_or_data As String, ByVal mode As FMOD_MODE, ByVal exinfo As Long, ByRef Sound As Long) As FMOD_RESULT[/code:ln1w148d]
That way, I can use ‘Byval 0’ as a parameter for the exinfo if I don’t need it.
With the original declaration, it always expects a var with the structure of exinfo, so you’d always have to pass an exinfo filled with zeros.

I think I’ll also need another declaration for passing a data pointer instead of a String in case I want to load from memory rather than from disc, however that may not be necessary anymore with the new FMOD_CREATESTATICSTREAM flag.
That declaration would then be
[code:ln1w148d]Public Declare Function FMOD_System_CreateSound3 Lib "fmodex.dll" Alias "FMOD_System_CreateSound" (ByVal System As Long, ByRef bytedata As Byte, ByVal mode As FMOD_MODE, ByVal exinfo As Long, ByRef Sound As Long) As FMOD_RESULT[/code:ln1w148d]

Other than that fmodex seems to be working really nice already!

  • You must to post comments
0
0

[quote="Adion":3vrkct97]I just noticed a small bug in the documentation:
In System::playSound, it says:
Use the value FMOD_MISC_VALUES.html”>FMOD_CHANNEL_FREE to get FMOD to pick a free channel. Otherwise specify a channel number from 0 to the ‘maxchannels’ value specified in System::init minus 1. FMOD_MISC_VALUES.html”>FMOD_CHANNEL_ALL plays the sound on all channels.

I suppose that ‘FMOD_MISC_VALUES.html”>’ doesn’t belong there and should ‘ve been a link.

A second thing: I’ve just started trying out fmod ex in visual basic, and I have added the following declaration:
[code:3vrkct97]Public Declare Function FMOD_System_CreateSound2 Lib "fmodex.dll" Alias "FMOD_System_CreateSound" (ByVal System As Long, ByVal name_or_data As String, ByVal mode As FMOD_MODE, ByVal exinfo As Long, ByRef Sound As Long) As FMOD_RESULT[/code:3vrkct97]
That way, I can use ‘Byval 0’ as a parameter for the exinfo if I don’t need it.
With the original declaration, it always expects a var with the structure of exinfo, so you’d always have to pass an exinfo filled with zeros.

I think I’ll also need another declaration for passing a data pointer instead of a String in case I want to load from memory rather than from disc, however that may not be necessary anymore with the new FMOD_CREATESTATICSTREAM flag.
That declaration would then be
[code:3vrkct97]Public Declare Function FMOD_System_CreateSound3 Lib "fmodex.dll" Alias "FMOD_System_CreateSound" (ByVal System As Long, ByRef bytedata As Byte, ByVal mode As FMOD_MODE, ByVal exinfo As Long, ByRef Sound As Long) As FMOD_RESULT[/code:3vrkct97]

Other than that fmodex seems to be working really nice already![/quote:3vrkct97]
I suggest just making the exinfo and Filename parameters As Any instead, so that you can have one declaration for all the various uses.

That, or at least give them better names than ‘createsound2’ and ‘createsound3’. For example, ‘CreateSoundExinfo’ and ‘CreateSoundFromMemory’.

  • You must to post comments
0
0

[quote="Janus":2mao1u4c]I suggest just making the exinfo and Filename parameters As Any instead, so that you can have one declaration for all the various uses.

That, or at least give them better names than ‘createsound2’ and ‘createsound3’. For example, ‘CreateSoundExinfo’ and ‘CreateSoundFromMemory’.[/quote:2mao1u4c]
Of course good names are better, I was just showing that other declarations may be necessary as well.
As Any could be a solution as well, the only thing that I’m not sure about is if passing a filename will work correctly if it is passed by reference.
I seem to remember that I’ve had some problems passing strings byref from visual basic to c.

I’ve also found 2 other issues:
– The multispeakeroutput example is not working in beta 17, I tried both the visual basic example and the compiled c example, and they both play all sound on both front speakers.
When I try the same with beta 16, the sound plays correctly on different speakers.

  • Using CreateSoundFromMemory ( :) ) didn’t work correctly when using FMOD_NONBLOCKING. I got a handle upon opening and no error, but when I check the OpenState, it always gives me the ERRORSTATE. The command to check the openstate gave FMOD_OK as result.
    When I remove the nonblocking flag, it opens fine.
  • You must to post comments
0
0

Thanks

[quote="brett":3e6njvtn]Oh and regarding the VB function names with numbers, FMUSIC_LoadSongEx2 ring a bell Adion? ๐Ÿ˜› 8)[/quote:3e6njvtn]
Hehe, I remember, but hey, they got the job done ๐Ÿ˜›

Just one more issue that I noticed: FMOD_Sound_GetLength always seems to return 0 in visual basic. (You can also see that in the vb example multispeakeroutput, the length indicates 0:0)
I haven’t checked if this was also in earlier betas.
Result of the function is FMOD_OK, and when I create a wrapper function in c, it returns the length just fine.

  • You must to post comments
0
0

I’m having a problem with FMOD_System_SetReverbProperties(). I get a crash if I call it with any of the presets.

[code:2regzme3]
static FMOD_SYSTEM *_system = NULL;
static int hasEAX = FALSE;
static SOUNDEAX modeEAX = SOUND_EAX_OFF;

static FMOD_REVERB_PROPERTIES propEAX[] = {
FMOD_PRESET_OFF,
FMOD_PRESET_GENERIC,
FMOD_PRESET_PADDEDCELL,
FMOD_PRESET_ROOM,
FMOD_PRESET_BATHROOM,
FMOD_PRESET_LIVINGROOM,
FMOD_PRESET_STONEROOM,
FMOD_PRESET_AUDITORIUM,
FMOD_PRESET_CONCERTHALL,
FMOD_PRESET_CAVE,
FMOD_PRESET_ARENA,
FMOD_PRESET_HANGAR,
FMOD_PRESET_CARPETTEDHALLWAY,
FMOD_PRESET_HALLWAY,
FMOD_PRESET_STONECORRIDOR,
FMOD_PRESET_ALLEY,
FMOD_PRESET_FOREST,
FMOD_PRESET_CITY,
FMOD_PRESET_MOUNTAINS,
FMOD_PRESET_QUARRY,
FMOD_PRESET_PLAIN,
FMOD_PRESET_PARKINGLOT,
FMOD_PRESET_SEWERPIPE,
FMOD_PRESET_UNDERWATER,
FMOD_PRESET_DRUGGED,
FMOD_PRESET_DIZZY,
FMOD_PRESET_PSYCHOTIC,
};

void Sound_EAX_Set(SOUNDEAX mode)
{
FMOD_REVERB_PROPERTIES *props;

if (!_system) return;
if (!hasEAX) return;
if (modeEAX == mode) return;

modeEAX = mode;
props = propEAX + mode;
FMOD_System_SetReverbProperties(_system,props);
}
[/code:2regzme3]

Yes, _system is valid and plays sounds fine, and hasEAX is TRUE:

[code:2regzme3]
FMOD_CAPS caps;

result = FMOD_System_GetDriverCaps(_system,0,&caps,&minfreq,&maxfreq);
hasEAX = (caps & (FMOD_CAPS_REVERB_EAX2 | FMOD_CAPS_REVERB_EAX3 |
FMOD_CAPS_REVERB_EAX4 | FMOD_CAPS_REVERB_I3DL2)) ? TRUE : FALSE;
[/code:2regzme3]

  • You must to post comments
0
0

Hi,

I just tested the code and it seems to work fine for me. Perhaps
[code:3soxg4g6]
props = propEAX + mode;
[/code:3soxg4g6]
is indexing outside the array bounds? I assume SOUNDEAX is an enum?

  • You must to post comments
0
0

No, mode is an enum based from 0, but it is in range. Stepping over the FMOD_System_SetReverbProperties() causes the crash… I’ve looked at props and it points to valid reverb data. I’ve tried different presets all with crashes.

I get “Unhandled exception (FMODEX.DLL): 0xC0000005: Access Violation.”

Here is the disassembly at the crash point:
[code:1gswf4cz]
10045D50 mov ecx,dword ptr [eax]
10045D52 push 70h
10045D54 push edx
10045D55 push 0
10045D57 push 0
10045D59 lea edx,[ebp-10h]
10045D5C push 1
[/code:1gswf4cz]

Here are the registers:
[code:1gswf4cz]
EAX = 00000000 EBX = 7FFDF000 ECX = 00000004
EDX = 0012B7CC ESI = 09A9A620 EDI = 0012B83C
EIP = 10045D50 ESP = 0012B7C4 EBP = 0012B84C
EFL = 00000212
[/code:1gswf4cz]

  • You must to post comments
Showing 9 results
Your Answer

Please first to submit.