English
Source / code snippets

Winmm.dll, Playsound, Stop

 

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:
CompileMarkSeparation
CLS
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#
 
XProfan 10
TC-Programming [...] 
XProfan 8.0 - 10.0 - X2 - X3 - X4

08/31/13  
 



have the the good Order halber time to Source moved -
then becomes your Profil too dahingehend extended -
if you look like: [...]  right under "Quelltexte/...".
 
07/10/14  
 




Georg
Teles
aah ok, sees well from
 
XProfan X2
TC-Programming [...] 
XProfan 8.0 - 10.0 - X2 - X3 - X4

08/16/14  
 



Zum Quelltext


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

7.273 Views

Untitledvor 0 min.
Gast.0815 vor 4 Tagen
H.Brill08/31/24
Georg Teles08/29/24
Member 862464105/12/24
More...

Themeninformationen

this Topic has 2 subscriber:

Georg Teles (2x)
iF (1x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie