0
0

I was quite suprised to hear of FMod, after being a long user of the BASS sound system. I heard there was VB support so I checked out this page. Also, heard there was MIDI support, and MOD and MP3 as well as MO3 support. So I thought this was something I could use.

However, when I got here, I found no VB examples on how to use anything! So I contacted some people and got an VB example to play WAV files.. whoopie! Not a usable example. I need an example that shows how to play WAVs, MP3s, basically everything FMod can do.. however there are none..

I now have a choice. To see if any of you guys have an vb example to make this fmod usable in VB, or continue using BASS since it is superior when concerning VB users…? It has example programs needed..

  • You must to post comments
0
0

Ah, he posted that on the forum, that would describe all the confusion.. lol, I wonder why it’s not on the front page, since it was posted on 9/5/01, and sunday was 9/9/01 erk! 6% wins :smile: I wonder when the new ETA is….

  • You must to post comments
0
0

I m doing a brett’s fmod clone but there are some functions not supported for me :
– FSOUND_GetDriverName : it can work one time but whenever i relaunch the app, it crach VB,
– FSOUND_CD_GetTrack : like FSOUND_GetDriverName it crash VB but here it show me something in the taskbar (like an app minimized without window visible and a label “FSOUND CD DRIVER”),
– FSOUND_Sample_GetName : doesn’t work when i want to retrieve sample name of module.

And you ? (especially Adion)

  • You must to post comments
0
0

Woohoo! grin

/me posts news on <a href=”http://turbo.gamedev.net/”>turbo</a>…

:smile:

Do you have a new image for your front page as well? :smile:

<font size=-1>[ This Message was edited by: Sly on 2001-09-12 20:52 ]</font>

  • You must to post comments
0
0

All the functions that return strings are currently a problem in Visual Basic.
I had rather seen these functions like the default windows api (pass a pointer to a string that will be filled)
This method would work in VB, but then brett would have to add functions for vb or change the current functions.

  • You must to post comments
0
0

Yipa ! thanx a lot Brett !!!!

  • You must to post comments
0
0

i ve also done a func wich catch a pointer to string like this :

Private Declare Function ConvCStringToVBString Lib “kernel32” Alias “lstrcpyA” (ByVal lpsz As String, ByVal pt As Long) As Long ‘ Notice the As Long return value replacing the As String given by the API Viewer.
Private Declare Function CharUpper Lib “user32” Alias “CharUpperA” (ByVal lpsz As String) As Long

Private Function GetName(test As String) As String
Dim l As Long, zpos As Long
Dim s As String

'test = "yada yada"
' Retreive pointer to string from the API call
' as a long integer
l = CharUpper(test)
' Initialize string with zeroes (or anything else)
' so it will have the right size (ajust value as needed)
s = String(255, 0)
ConvCStringToVBString s, l
' Look for the null char ending the C string
zpos = InStr(s, vbNullChar)
s = Left(s, zpos - 1)
GetName = s

End Function

Don’t know why it doesn’t work ?? Brett, are u using mutex or some low level variable/func manager ? If so, i think it s the source of the pb (var mutex_unlocked properly ?)

  • You must to post comments
0
0

Sorry. Got a bit carried away there. 😉

  • You must to post comments
0
0

I’ve also been having problems retrieving sample names from MODS.

So I got Bretts FmodDOC and have started to write a module player in written completely in VB. I’ve managed to read in all the module info, such as name, sample info, pattern data and sample data. I’m also displaying pattern data as displayed in ProTracker.
The only problem I seem to be having, is getting a sample to play. The sample doesn’t have a header like wave files because its just raw data. I know how to make wave files play in VB using DirectX. I’m just wondering if theres a way of adding a wave header to the raw sample data to allow me to play the samples.

  • You must to post comments
0
0

Good news : i ve finally found out how to managed getting string from pointer from all functions ! I ve just change the api call to return LONG instead STRING so i ve the adress pointer. Then, a simple func in VB return me the string from the pointer, here what i ve done :

Option Explicit
Private Declare Function ConvCStringToVBString Lib “kernel32” Alias “lstrcpyA” (ByVal lpsz As String, ByVal pt As Long) As Long ‘ Notice the As Long return value replacing the As String given by the API Viewer.
Private Declare Function CharUpper Lib “user32” Alias “CharUpperA” (ByVal lpsz As String) As Long

Private Function GetName(lpstrTest As Long) As String
Dim zpos As Long
Dim s As String

s = String(255, 0)
ConvCStringToVBString s, lpTest
' Look for the null char ending the C string
zpos = InStr(s, vbNullChar)
s = Left(s, zpos - 1)
GetName = s

End Function

A simple test now :
‘add a command buttons a two listboxes
Private Sub Command1_Click()
Dim lptstrString As Long
Dim RetVal As String
Dim count As Long

For count = 0 To FMUSIC_GetNumSamples(HMUSIC)
lptstrString = FSOUND_Sample_GetName(FMUSIC_GetSample(HMUSIC, count))
RetVal = GetName(lptstrString)
List1.AddItem RetVal
Next count

For count = 0 To FSOUND_GetNumDrivers – 1
lptstrString = FSOUND_GetDriverName(count)
RetVal = GetName(lptstrString)
List2.AddItem RetVal
Next count

End Sub

‘ And voila ! :smile:

Note : api calls now are

Public Declare Function FSOUND_GetDriverName Lib “fmod.dll” Alias “_FSOUND_GetDriverName@4” (ByVal id As Long) As Long ‘ long = pointer

Public Declare Function FSOUND_Sample_GetName Lib “fmod.dll” Alias “_FSOUND_Sample_GetName@4” (ByVal sptr As Long) As Long

for this example, just change all others wich seems to have pb.

Note 2 : i ll finally finish my FMOD VB Clone :smile:

Swifty : i ve also done a piece of code with MOD (protracker), i m very interested in doing a MOD Engine entirely in VB. If you have something (mixing code, pattern alloc struct in vb, sample alloc/reading …) please let me know, it s an old fantasm for me :smile:
Good Luck !

  • You must to post comments
0
0

So when is the next release? Or do I need to stay permanently with BASS? This is the only thing that is holding up a project…

Plus, I currently have no reason to even purchase a commercial license until FMOD is usable in VB….

<font size=-1>[ This Message was edited by: Shannara on 2001-09-07 11:12 ]</font>

  • You must to post comments
0
0

Brett say he hope this sunday, wait and see, don’t speed him, coding such librairie is a hard work and don’t forget something : he has also a private life :smile:

  • You must to post comments
0
0

Lol, Brett didn’t say a specific day or nothing.. lol, donno where you got that from, but anyways, he did say it will be in the next release, whenever that is :smile:

  • You must to post comments
0
0

Quote from brett’s post in this forum :


Posted: 2001-09-05 15:44  
fmod 3.4 comes out with all ports at once including CE. We are aiming for this sunday.
Sorry for any inconvenience.

Or i didn’t understand well what brett mean :smile: (fmodCE this sunday ?)

  • You must to post comments
0
0

I quote Brett on Delay topic :

“For those asking when .. i will 90% guarantee that 3.4 comes out on sunday night”

That was this sunday so, it is supposed to be about to be released, wait and see.

  • You must to post comments
Showing 14 results
Your Answer

Please first to submit.