Hi folks,

I’m new to fmod and I do have some questions. I’m using Win Vista 32Bit, Visual Studio 2005 and Visual Basic.Net.

1.) Is there any tutorial using FmodEX with my settings?
2.) Is there a new Module using the functions of the DLL for .NET (not for VB 6)
3.) Does anybody have a code sample for me to look at?

I already tried playing some audio files. It took a while but I got it working so far. Here is my code:

Public Class Form1
Dim Result As fmod.FMOD_RESULT
Dim FmodSystem As Long
Dim Sound As Long
Dim Channel_a As Long

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Result = fmod.FMOD_System_Create(FmodSystem)
Result = fmod.FMOD_System_Init(FmodSystem, 100, fmod.FMOD_INITFLAGS.FMOD_INIT_NORMAL, 0)

End Sub


This works fine. The Result says FMOD_OK

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Result = fmod.FMOD_System_CreateSoundEx(FmodSystem, "C:\audio\wave2.mp3", fmod.FMOD_MODE.FMOD_HARDWARE, 0, Sound)
Result = fmod.FMOD_System_PlaySound(FmodSystem, fmod.FMOD_CHANNELINDEX.FMOD_CHANNEL_FREE, Sound, False, Channel_a)

End Sub


This works as well. The file is playing!

Now I tried to pause the channel:
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
Result = fmod.FMOD_Channel_SetPaused(Channel_a, True)
Catch ex As Exception

    End Try

End Sub


Now I get a "PInvokeStackImbalance" error. File is still playing!!!!

What’s the problem? Is it my Code or does fmod not working prop. with Vista?


  • You must to post comments
Showing 0 results
Your Answer

Please first to submit.