Ajouts de musique et irrKlang.
This commit is contained in:
33
SQCSim2021/external/irrKlang-1.6.0/examples.net/VisualBasic.01.HelloWorld/Module1.vb
vendored
Normal file
33
SQCSim2021/external/irrKlang-1.6.0/examples.net/VisualBasic.01.HelloWorld/Module1.vb
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
Imports IrrKlang
|
||||
|
||||
Module Module1
|
||||
|
||||
Sub Main()
|
||||
|
||||
' start up the engine
|
||||
Dim engine As New ISoundEngine
|
||||
|
||||
' To play a sound, we only to call play2D(). The second parameter
|
||||
' tells the engine to play it looped.
|
||||
|
||||
engine.Play2D("../../media/getout.ogg", True)
|
||||
|
||||
Console.Out.WriteLine("")
|
||||
Console.Out.WriteLine("Hello World")
|
||||
|
||||
Do
|
||||
Console.Out.WriteLine("Press any key to play some sound, press 'q' to quit.")
|
||||
|
||||
' play a single sound
|
||||
engine.Play2D("../../media/bell.wav")
|
||||
|
||||
Loop While _getch() <> 113 ' until 'the key "q" is pressed
|
||||
|
||||
End Sub
|
||||
|
||||
' some simple function for reading keys from the console
|
||||
<System.Runtime.InteropServices.DllImport("msvcrt")> _
|
||||
Public Function _getch() As Integer
|
||||
End Function
|
||||
|
||||
End Module
|
Reference in New Issue
Block a user