From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, FREEMAIL_REPLY autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,9750cd85c475a61f X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!news.glorb.com!feeder.xsnews.nl!feeder1.cambrium.nl!feed.tweaknews.nl!npeer.de.kpn-eurorings.net!newsfeed.arcor.de!news.arcor.de!not-for-mail Newsgroups: comp.lang.ada Subject: Re: playsound From: Bernd.Specht@gmx.com (Bernd Specht) References: Organization: No company Message-ID: User-Agent: Xnews/4.05.03 Date: 24 Jun 2005 19:16:56 GMT NNTP-Posting-Date: 24 Jun 2005 21:16:56 MEST NNTP-Posting-Host: 030112cc.newsread4.arcor-online.net X-Trace: DXC=J5\2lFRJ8g5::C@ZGckeZ1:ejgIfPPld4jW\KbG]kaM8]kI_X=5Kea6LfQ]2cE4?40mfobaMi:^o>QfEN5o;5\`43h7LYL[]1N0 X-Complaints-To: abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:11627 Date: 2005-06-24T21:16:56+02:00 List-Id: sisi.ard@laposte.net (Sylvain) wrote in news:e465bcf0.0506240558.5f62f511 @posting.google.com: > Can you give me a piece of code which explain me how to use the > Playsound API please ? > > Thx, Bye ! > First do a with for the bindings: with Win32.Mmsystem; Then call PlaySound like this: ... xBool : Win32.BOOL; SoundFName : String := "ringin.wav" & Ascii.Nul; function AdrToLpcstr is new Unchecked_Conversion (System.Address, Win32.LPCSTR); begin Conn := Get_Router_State; if Conn = Is_Connected then xBool := Win32.Mmsystem.PlaySound (AdrToLpcstr (SoundFName'Address), System.Null_Address, Win32.Mmsystem.SND_FILENAME); end if; ...