| |
|
|
 Georg Teles | small example to that Play of WAVe over Winmm.dll, stop and from memory take (Eigencode, the standing not whom yellow pages functions but xd) CompileMarkSeparation $H windows.ph
CLS
Declare Win&,play$,close$,Pla&,Cld&
Win& = UseDLL("Winmm.dll")
play$ = "PlaySound"
close$ = "CloseDriver"
Pla& = ~GetProcAddress(Win&,Addr(play$))
Cld& = ~GetProcAddress(Win&,Addr(close$))
Declare fs&,mus#
fs& = filesize("sound.wav")
Dim mus#,fs&
Assign #1,"sound.wav"
Openrw #1
Blockread(#1,mus#,0,fs&)
Close #1
Call(Pla&,mus#,0,(5+8))'5 = 1x abspielen, 5+8 = Endlos wiederholen
Print "spielt ab..."
Waitinput
Call(Pla&,0,0,0)'stoppt
Print "gestoppt..."
Waitinput
Call(Cld&,mus#,0,5)'schließt und nimmt aus Arbeitsspeicher
Print "geschlossen"
Waitinput
Dispose mus#
FreeDll Win&
or vereinfacht classisch: CompileMarkSeparationCLS
Def PlaySoundWinmm(3)!"Winmm","PlaySound"
Def CloseDriverWinmm(3)!"Winmm","CloseDriver"
Declare fs&,mus#
fs& = filesize("sound.wav")
Dim mus#,fs&
Assign #1,"sound.wav"
Openrw #1
BlockRead(#1,mus#,0,fs&)
Close #1
PlaySoundWinmm(mus#,0,(5+8))'5 = 1x Play, 5+8 = unending repeat
Print "spielt ex..."
Waitinput
PlaySoundWinmm(0,0,0)'stoppt
Print "gestoppt..."
Waitinput
CloseDriverWinmm(mus#,0,5)'closes and takes from main memory
Print "geschlossen"
Waitinput
Dispose mus#
|
|
|
| |
|
|
|
 | have the the good Order halber time to Source moved - then becomes your Profil too dahingehend extended - if you look like: [...] right under "Quelltexte/...". |
|
|
| |
|
|
|
 Georg Teles | |
|
| |
|
|