Search the Community
Showing results for tags 'DirectSound'.
-
DirectSound UDF play audio files, record microphone, apply effects or create your own sound - check out the examples Download: https://autoit.de/index.php/Attachment/69-DirectSound-7z/ Or visit the original topic at the german forum - link in my signature
- 3 replies
-
- DirectSound
- MP3
- (and 4 more)
-
With the release of latest beta v3.3.7.22 code regarding Interfaces is completely finished. This allows native usage of many objects that required additional UDFs before (mainly AutoItObject). No more. As example I will show how to use few DirectSound interfaces using nothing but built-in functions. Script this was based on was posted (I have highlighted keywords). DirecSound's IDirectSound8 in combination with IDirectSoundBuffer interface imitates old beep sound. Include script: DSBeep.au3 An example could be (one of AZIJO's songs): #include "DSBeep.au3" Opt("MustDeclareVars", 1) HotKeySet("{ESC}", "_Quit") ; Error monitoring (thru the life time of the script) Global $oErrorObject = ObjEvent("AutoIt.Error", "_ErrFunc") ; Implemenation Func _ErrFunc($oError) ConsoleWrite("COM Error, ScriptLine(" & $oError.scriptline & ") : Number 0x" & Hex($oError.number, 8) & " - " & $oError.windescription & @CRLF) EndFunc ;==>_ErrFunc ; Initialize DSBeep _StartDSBeep() ; Play _Beep(8, 4, 100, 0, 0.8, 0) ; set tempo and tone _Beep(7,4,100) _Beep(8,4,100) _Beep(9,4,100) _Beep(8,4,100,100) _Beep(1,5,100,100) _Beep(8, 4, 100, 0, 1) ; new tempo _Beep(7,4,100) _Beep(8,4,100) _Beep(9,4,100) _Beep(8,4,100,100) _Beep(12,4,100,100) _Beep(8,4,100) _Beep(7,4,100) _Beep(8,4,100) _Beep(9,4,100) _Beep(8,4,100) _Beep(6, 5, 100, 0, 0.8) ; new tempo _Beep(3,5,100) _Beep(12,4,100) _Beep(8,4,100) _Beep(6,4,100) _Beep(5,4,100) _Beep(4,4,200,300) _Beep(1,5,100) _Beep(12,4,100) _Beep(11,4,100) _Beep(9,4,100) _Beep(1,5,100,100) _Beep(6,5,100,100) _Beep(4,5,100) _Beep(3,5,100) _Beep(1,5,100) _Beep(8,4,100) _Beep(1,5,100,100) _Beep(4,5,100,100) _Beep(4,5,100) _Beep(3,5,100) _Beep(1,5,100) _Beep(3,5,100) _Beep(3,4,100) _Beep(7,4,100) _Beep(10,4,100) _Beep(1,5,100) _Beep(4,5,100) _Beep(3,5,100) _Beep(1,5,100) _Beep(3,5,250,250) ;=========================== _Beep(8, 4, 100, 0, 1.1) ; new tempo _Beep(7, 4, 100) _Beep(8, 4, 100) _Beep(9, 4, 100) _Beep(8, 4, 100, 100) _Beep(1, 5, 100, 100) _Beep(8, 4, 100) _Beep(7, 4, 100) _Beep(8, 4, 100) _Beep(9, 4, 100) _Beep(8, 4, 100, 100) _Beep(12, 4, 100, 100) _Beep(8, 4, 100) _Beep(7, 4, 100) _Beep(8, 4, 100) _Beep(9, 4, 100) _Beep(8, 4, 100) _Beep(6, 5, 100) _Beep(3, 5, 100) _Beep(12, 4, 100) _Beep(8, 4, 100) _Beep(6, 4, 100) _Beep(5, 4, 100) _Beep(4, 4, 200, 300) _Beep(1, 5, 100) _Beep(12, 4, 100) _Beep(11, 4, 100) _Beep(9, 4, 100) _Beep(1, 5, 100, 100) _Beep(6, 5, 100, 100) _Beep(4, 5, 100) _Beep(3, 5, 100) _Beep(1, 5, 100) _Beep(8, 4, 100) _Beep(1, 5, 100, 100) _Beep(4, 5, 100, 100) _Beep(4, 5, 100) _Beep(3, 5, 100) _Beep(1, 5, 100) _Beep(3, 5, 100) ;============================= _Beep(8, 4, 100) _Beep(12, 4, 100) _Beep(3, 5, 100) _Beep(8, 5, 100) _Beep(6, 5, 100) _Beep(4, 5, 100) _Beep(3, 5, 100) _Beep(1, 5, 300, 200) _Beep(3, 5, 100, 0, 1.8) ; new tempo _Beep(1, 5, 100) _Beep(12, 4, 100) _Beep(11, 4, 100) _Beep(4, 4, 100) _Beep(8, 4, 100) _Beep(11, 4, 100) _Beep(4, 4, 100) _Beep(8, 4, 100) _Beep(11, 4, 100) _Beep(12, 4, 100) _Beep(1, 5, 150, 150) _Beep(9, 4, 200, 100) _Beep(3, 5, 100) _Beep(1, 5, 100) _Beep(12, 4, 100) _Beep(11, 4, 100) _Beep(3, 4, 100) _Beep(6, 4, 100) _Beep(11, 4, 100) _Beep(3, 4, 100) _Beep(6, 4, 100) _Beep(11, 4, 100) _Beep(12, 4, 100) _Beep(1, 5, 150, 150) _Beep(8, 4, 200, 100) _Beep(4, 5, 100, 0, 1.1) ; new tempo _Beep(3, 5, 100) _Beep(6, 5, 100) _Beep(4, 5, 100) _Beep(3, 5, 100) _Beep(1, 5, 100) _Beep(4, 5, 100) _Beep(3, 5, 100) _Beep(1, 5, 100) _Beep(11, 4, 100) _Beep(3, 5, 150, 150) _Beep(11, 4, 300, 100) _Beep(3, 5, 100) _Beep(1, 5, 100) _Beep(4, 5, 100) _Beep(3, 5, 100) _Beep(1, 5, 100) _Beep(11, 4, 100) _Beep(3, 5, 100) _Beep(1, 5, 100) _Beep(11, 4, 100) _Beep(9, 4, 100) _Beep(11, 4, 400, 100) _Beep(3, 5, 100, 0, 1.8) ; new tempo _Beep(1, 5, 100) _Beep(12, 4, 100) _Beep(11, 4, 100) _Beep(4, 4, 100) _Beep(8, 4, 100) _Beep(11, 4, 100) _Beep(4, 4, 100) _Beep(8, 4, 100) _Beep(11, 4, 100) _Beep(12, 4, 100) _Beep(1, 5, 150, 150) _Beep(9, 4, 200, 100) _Beep(3, 5, 100) _Beep(1, 5, 100) _Beep(12, 4, 100) _Beep(11, 4, 100) _Beep(3, 4, 100) _Beep(6, 4, 100) _Beep(11, 4, 100) _Beep(3, 4, 100) _Beep(6, 4, 100) _Beep(11, 4, 100) _Beep(12, 4, 100) _Beep(1, 5, 150, 150) _Beep(8, 4, 150, 150) _Beep(4, 5, 100, 0, 1.2) ; new tempo _Beep(3, 5, 100) _Beep(2, 5, 100) _Beep(1, 5, 100) _Beep(12, 4, 100) _Beep(1, 5, 100) _Beep(3, 5, 100) _Beep(6, 5, 100) _Beep(4, 5, 100) _Beep(3, 5, 100) _Beep(1, 5, 100) _Beep(4, 5, 100) _Beep(11, 4, 100) _Beep(4, 5, 100) _Beep(8, 5, 100) _Beep(11, 5, 100, 0, 0.8) ; new tempo _Beep(10, 5, 100) _Beep(9, 5, 100) _Beep(8, 5, 100) _Beep(6, 5, 100) _Beep(4, 5, 100) _Beep(3, 5, 100) _Beep(1, 5, 100) _Beep(11, 4, 100) _Beep(9, 4, 100, 0, 0.5) ; new tempo _Beep(8, 4, 100) _Beep(6, 4, 100, 0, 0.2) ; new tempo _Beep(4, 4, 200) ; Stop the engine _StopDSBeep() ; Exit (redundant) _Quit() Func _Quit() Exit EndFunc ;==>_Quit Have that code in the same folder as DSBeep.au3.
- 4 replies
-
- DirectSound
- IDirectSound8
-
(and 1 more)
Tagged with: