0
0

When I try to use any of the CD functions
provided with Fmod, I get an Error.
I`ve noticed that in the C++ Api,it is written lik this : FSOUND_CD_Eject(cddevice)
But in the VB Api that same function is not
‘waiting’ for any parameter.
What Should I Do ?
Can SomeOne Help me please ?

  • You must to post comments
0
0

t = FSOUND_CD_Eject(0)
myerrorstring = FSOUND_GetErrorString(FSOUND_GetError)

It returns “No error”.

What am I doing wrong ? ? ?

  • You must to post comments
0
0

I tryed the sample program (which is written in c )
Everything works fine EXEPT for the CD functions.
When I press on a button realated to the CD func. It Does Nothing.
Maybe it`s a problem with my computer Setup ?

  • You must to post comments
0
0

Hi ! In fact, i ve noticed this pb and i ve updated the .bas module so now it works. I ll send it to you this evening (i m at work now).

  • You must to post comments
0
0

I am having the same problems, I’ve updated my .bas file but still none of the CD functions work. Could this be a problem with the DLL??? When I try to eject it gives me “Unknown Error” not “No Error”. So I dont know what Im doing wrong.

Fsound_CD_Eject(0)
MsgBox FSOUND_GetErrorString(FSOUND_GetError)

Returns “Unknown error”

  • You must to post comments
0
0

I think the cd functions have been updated in the latest version, it should work if you just add Byval drive as Byte to the parameters.
The complete CD Functions part would look like :

[code:1me45vi9]
‘************
‘* FSOUND CD
‘************
Public Declare Function FSOUND_CD_Play Lib "fmod.dll" Alias "_FSOUND_CD_Play@4" (ByVal drive As Byte, ByVal Track As Long) As Byte
Public Declare Function FSOUND_CD_SetPlayMode Lib "fmod.dll" Alias "_FSOUND_CD_SetPlayMode@4" (ByVal drive As Byte, ByVal mode As FSOUND_CDPLAYMODES) As Long
Public Declare Function FSOUND_CD_Stop Lib "fmod.dll" Alias "_FSOUND_CD_Stop@0" (ByVal drive As Byte) As Byte
Public Declare Function FSOUND_CD_SetPaused Lib "fmod.dll" Alias "_FSOUND_CD_SetPaused@4" (ByVal drive As Byte, ByVal Paused As Byte) As Byte
Public Declare Function FSOUND_CD_SetVolume Lib "fmod.dll" Alias "_FSOUND_CD_SetVolume@4" (ByVal drive As Byte, ByVal volume As Long) As Byte
Public Declare Function FSOUND_CD_Eject Lib "fmod.dll" Alias "_FSOUND_CD_Eject@0" (ByVal drive As Byte) As Byte

Public Declare Function FSOUND_CD_GetPaused Lib "fmod.dll" Alias "_FSOUND_CD_GetPaused@0" (ByVal drive As Byte) As Byte
Public Declare Function FSOUND_CD_GetTrack Lib "fmod.dll" Alias "_FSOUND_CD_GetTrack@0" (ByVal drive As Byte) As Long
Public Declare Function FSOUND_CD_GetNumTracks Lib "fmod.dll" Alias "_FSOUND_CD_GetNumTracks@0" (ByVal drive As Byte) As Long
Public Declare Function FSOUND_CD_GetVolume Lib "fmod.dll" Alias "_FSOUND_CD_GetVolume@0" (ByVal drive As Byte) As Long
Public Declare Function FSOUND_CD_GetTrackLength Lib "fmod.dll" Alias "_FSOUND_CD_GetTrackLength@4" (ByVal drive As Byte, ByVal Track As Long) As Long
Public Declare Function FSOUND_CD_GetTrackTime Lib "fmod.dll" Alias "_FSOUND_CD_GetTrackTime@0" (ByVal drive As Byte) As Long
[/code:1me45vi9]

  • You must to post comments
0
0

mmhh it doesn’t work anymore for me … (??)

  • You must to post comments
0
0

10nX, I`ll try it later.
by the way, where can I get the latest
” fmod.bas ” ?

  • You must to post comments
0
0

Ok I’ve gotton CD functions to work in VB.

Here is what I did:
[code:1faitz6z]
Const CDDevice = 0

‘Play
If CDLoaded = true then
FSOUND_CD_Play CDDevice, FSOUND_CD_GetTrack(CDDevice)
end if

‘Pause
If CDLoaded = true then
FSOUND_CD_Play CDDevice, FSOUND_CD_GetTrack(CDDevice)
end if

‘Stop
If CDLoaded = true then
FSOUND_CD_Stop CDDevice
end if

‘Displaying Tracks
lblTracks.Caption = FSOUND_CD_GetTrack(CDDevice) & "/" & FSOUND_CD_GetNumTracks(CDDevice) & " Tracks"

[/code:1faitz6z]

Hope it helps!

  • You must to post comments
0
0
0
0

Oh and CDLoaded is just a Boolean statement, which is switched when you press a button, maybe called “Load CD” if you want.

  • You must to post comments
0
0

10nX for the Fmod.Bas.

Ive used the newer version but got this err:
"Can
t find DLL entry poin _FSOUND_CD_EJECT@0 in fmod.dll”

I think I`ve passed the wrong parameter to the function.
Can someone please tell me what the right
parameter for “ByVal drive As Byte” should be ?

10nx.

  • You must to post comments
0
0

Ok this works fine, but what are you doing with 2 cd devices?

Best Regards Tony

  • You must to post comments
0
0

Are u sure you are using the new bas ? Because i have this declaration :

Public Declare Function FSOUND_CD_Eject Lib “fmod.dll” Alias “_FSOUND_CD_Eject@4” (ByVal drive As Byte) As Byte

<— “_FSOUND_CD_Eject@4” and not “”_FSOUND_CD_Eject@0”

drive parameter could be 0 for the first cd drive or the drive letter.

  • You must to post comments
0
0

[quote:m907crva]Ok this works fine, but what are you doing with 2 cd devices? [/quote:m907crva]

I dont know what you mean.

  • You must to post comments
0
0

My mistake . . .
๐Ÿ˜†

  • You must to post comments
0
0

What I mean is that the default CD-device is reacting on that
const CdDrive 0,
but my second device gives no reaction on anything not 1 or not H.
I did it whit a listindex of a combobox, and this is working also for the default device.

Best Regards
Tony

  • You must to post comments
0
0

Still problems . . .
๐Ÿ˜•
Now there is no errors but when I tryed using
FSOUND_CD_Eject(0) or FSOUND_CD_Eject(e)
It returned FALSE.

any ideas ? ? ?

  • You must to post comments
0
0

Is it possible to get access to a (no default) second CD device in visual basic?
My default device calls “G” and is reacting on “the default device 0”, my second device calls “H” and gives no reaction on anything.

Best regards

Tony

  • You must to post comments
0
0

Does the function return Byte (… As Byte)?
In this case it would return 0 on error and 1 on success.
If 0 you can try FSOUND_GetErrorString to find out whats wrong.

  • You must to post comments
0
0

You should be able to use the drive letter to use multiple CD devices. The documentation says that you have to put the drive letter in single quotes.

e.g ‘G’ would be drive G:

But it seems to me that using single quotes would just comment the line out, so try double quotations too.

  • You must to post comments
Showing 20 results
Your Answer

Please first to submit.