0
0

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.

Questions:
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:

[code:omto1fy1]
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)
‘MsgBox(Result.ToString)
Result = fmod.FMOD_System_Init(FmodSystem, 100, fmod.FMOD_INITFLAGS.FMOD_INIT_NORMAL, 0)
‘MsgBox(Result.ToString)

End Sub

[/code:omto1fy1]

This works fine. The Result says FMOD_OK

[code:omto1fy1]
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)
‘MsgBox(Result.ToString)
Result = fmod.FMOD_System_PlaySound(FmodSystem, fmod.FMOD_CHANNELINDEX.FMOD_CHANNEL_FREE, Sound, False, Channel_a)

    'MsgBox(Result.ToString)
End Sub

[/code:omto1fy1]

This works as well. The file is playing!

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

    End Try

End Sub

[/code:omto1fy1]

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?

thx

  • You must to post comments
Showing 0 results
Your Answer

Please first to submit.