Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Jan 4, 2009 21:00:20 GMT -5
Hello Guilect,
is it possible to use fmod.dll ? And at which place must fmod be present ? I had a few trials but the compunter crashed !
An example: ms = Dll.DllApi("fmod","_FMUSIC_LoadSong@4", fileName) I have all Functions ready ! By the way: oggsetvolume has an error If you start your program twice you will get an automation error ! First it runs well, but on the next start it will give this error message. Also the sound volume will not changed, stays consistent .
Heh, i am writing a game for testing my game engine. I have to say, it runs fine at the moment here ! I was thinking about background music , what could be good in some games ? Here in game are running 600 sprites with 40 fps without jolt. That are very a lot of images. When i get back your windows (hWnd) handle, whereupon shows the handle ? On the form (Windows) or on the Backbuffer ?
From each Basic dialect is Brutus2D really the best to programming !
Thank you Guilect.
|
|
|
Post by Guilect on Jan 5, 2009 16:42:22 GMT -5
Hi peter,
the fmod.dll typically goes into the folder that has your source code in it that is trying to use the fmod.dll. This way your program should always work. If it is put into the systems32 folder you can only have one version in there, and it may be necassary for it to be various versions for different programs that are making calls to it. So some programs would work while others might not.
Could you post or send me your fmod headers and example code and I will take a look at it. This will be quicker than me trying to redo what you already have done.
I will look into the oggsetvolume issue you noticed.
GethWnd() returns the handle to the window (form).
Regards, Guilect
|
|
|
Post by Guilect on Jan 5, 2009 17:07:23 GMT -5
For the problem of running an ogg file twice, do not use the command "'music.OggTerminate" and it will work properly. B2D automatically terminates this upon program exit.
Once this was done, I had no problems using music.oggsetvolume to change the volume.
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Jan 5, 2009 19:27:17 GMT -5
Hi Guilect,
That problem is this here:
Declare Function FSOUND_Init Lib "fmod.dll" Alias "_FSOUND_Init@12" (ByVal mixrate As Long, ByVal maxchannels As Long, ByVal flags As FSOUND_INITMODES) As Byte
What can i do for it ? "ByVal FSOUND_INITMODES AS Byte"
It wants a byte array !
|
|
|
Post by Guilect on Jan 5, 2009 20:45:39 GMT -5
An working VB example that I have on my system looks like this :
Public Function Init(ByVal lFreq As Long, lChannels As Long, ByVal lBufferMs As Long) 'This function must be called before any other 'It initializes the fmod system On Error Resume Next Call FSOUND_SetBufferSize(lBufferMs) Call FSOUND_SetOutput(FSOUND_OUTPUT_DSOUND) Init = FSOUND_Init(lFreq, lChannels, 0)
End Function
So for _FSOUND_Init, I would say just set the last parameter to 0.
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Jan 5, 2009 23:16:24 GMT -5
|
|
|
Post by Guilect on Jan 6, 2009 18:05:05 GMT -5
I tried. No go.
|
|