0
0

Hello :)

Would someone be kind enough to provide an example of a mod player in VB using fmod.dll.

I am experiencing errors at the very start when trying to initialize FMOD.

I add the fmod.bas file and link the .dll file ok.

Problem is when I try to initialize FSOUND_Init on the Form.

I understand that after initalizing FSOUND I then use FMUSIC_LoadSong to load the module and then FMUSIC_PlaySong to play the mod.

Is the correct ?

I only have a Form with two command buttons Stop/Play to start with to learn. :)

An example would be great :)

regards
Paul
UK

  • You must to post comments
0
0

What do you mean you link the dll file?? You should only need to add fmod.bas to your project and put the dll either in the project folder or your system directory.
Heres some code that will play a mod for you:

[code:3nvy951q]
Dim Module as long

Sub Form_Load()
FSOUND_Init(44100,32,FSOUND_INIT_GLOBALFOCUS)
Module = FMUSIC_LoadSong("file.mod")
End Sub

Sub CmdPlay_Click()
FMUSIC_PlaySong Module
End Sub

Sub CmdStop_Click()
FMUSIC_StopSong Module
End Sub
[/code:3nvy951q]

  • You must to post comments
0
0

hI Paranoid_Android

Thx for the code :)

Is it possible to include the .mod in a resource file and then load and play ?

I have tried but does not work. :(

regards

  • You must to post comments
0
0

This is not possible in vb but you can create your own data file format 😉

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.