Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > irrKlang
How to capture sound events on

Registered User
2017-12-22 16:15:02

Hello, I need help with sound events on

I have this code that works very well, but I need to get the sound events and I do not understand the examples in c , could you help me please? You could give me an example on

This is my code:

Imports irrklang

Public Class MainForm

Private Engine As New irrklang.ISoundEngine
Private CurrentSound As irrklang.ISound

Private Sub PlayNewItem(ByVal Source as string)

CurrentSound = Engine.Play2D(SourceFile, False, False, StreamMode.NoStreaming)
CurrentSound.Volume =TrackBar1.Value / 100.0F
End Sub

Private Sub btnPlay_Click(ByVal sender As System.Object,
ByVal e As System.EventArgs) _
Handles btnPlay.Click

Call PlayNewItem(ListView1.Item(0).SubItems(5).Text)
End Sub

End Class

Thanks for your help"

Registered User
2017-12-26 01:29:42

Can anyone help me, please?

2017-12-27 06:12:03

You basically only need to call setSoundEventReceiver to an ISound you want to track, so for example

Dim playingsound As ISound = engine.Play3D("somefile.mp3", 0, 0, 0, True)
playingsound.setSoundStopEventReceiver (yourreceiver);

Where yourreceiver is the implementation of the "Public Interface ISoundStopEventReceiver" interface.

If that's too complicated, just check from time to time the IsFinnished property ot the playingsound, works just as well.

Create reply:

Posted by: (you are not logged in)

Enter the missing letter in: "Internati?nal" (you are not logged in)




Possible Codes

Feature Code
Link [url] [/url]
Bold [b]bold text[/b]
Image [img][/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]



Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact