Article View: borland.public.cppbuilder.nativeapi
Article #17246Re: PlaySound() API fuction control?
From: Remy Lebeau (TeamB)
Date: Mon, 31 Mar 2003 19:49
Date: Mon, 31 Mar 2003 19:49
20 lines
1821 bytes
1821 bytes
"Jeff Douglass" <.> wrote in message news:3e8894b1$1@newsgroups.borland.com... > Here is the problem. Sometimes, due to the app doing something > else like loading a form with data the trigger interval is inconsistant > which results in the sound getting played with a second and a half > interval followed by a half second interval. TTimer uses the WM_TIMER message and as such is directly tied to the application's message queue. Anything that delays processing of messages is going to effect the timer. You don't need a timer at all, though. PlaySound() supports looping sounds. Simply pass the SND_ASYNC and SND_LOOP flags when calling PlaySound() the first time, and then pass NULL as the pszSound parameter a second time to stop the playing. You don't need to keep calling PlaySound() repeatedly over and over manually. Gambit
Technical Details
Message-ID:
<3e889be0$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-06!sn-xit-09!supernews.com!iad-peer.news.verio.net!news.verio.net!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mailReferences:
<3e8894b1$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,222458dfba824527 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-03-31 11:54:09 PST From: "Remy Lebeau \(TeamB\)" <gambit47@yahoo.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <3e8894b1$1@newsgroups.borland.com> Subject: Re: PlaySound() API fuction control? Date: Mon, 31 Mar 2003 11:49:50 -0800 Lines: 22 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 NNTP-Posting-Host: 207.175.226.26 Message-ID: <3e889be0$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1049140192 207.175.226.26 (31 Mar 2003 11:49:52 -0800) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-06!sn-xit-09!supernews.com!iad-peer.news.verio.net!news.verio.net!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail