ambiera home ambiera home

Ambiera Forum

Discussions, Help and Support.

Create a new account, Search, or Login:
Name:  Password:
Ambiera Forum > irrKlang
How to capture sound events on vb.net
Author Text

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

Hello, I need help with sound events on vb.net.

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 vb.net.


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"


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

Can anyone help me, please?


niko
Moderator
Quote
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: "Internat?onal" (you are not logged in)


Text:

 

  

Forum Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


   





Software: Ambiera Light Forum. © 2008-2019 Nikolaus Gebhardt, Ambiera e.U.