Article View: borland.public.cppbuilder.nativeapi
Article #17245PlaySound() API fuction control?
From: Jeff Douglass
Date: Mon, 31 Mar 2003 19:12
Date: Mon, 31 Mar 2003 19:12
15 lines
1795 bytes
1795 bytes
I have a BCB 5 app that when a condition occures plays a .wav file every second to notify the user that the condition has occured. It continues this untill the user acknowledges the condition via a menu item. It is implemented by placing the PlaySound() call inside the Ontimer event of a TTimer componenet with the interval set to 1000. Easy enough. 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. I am looking for a way to make the interval more reliable so no mater what is going on the sound is played every second. I thought about moving the PlaySound call to a seperate thread that has a higher priority than the actual app, but wanted to get some feedback and other ideas from other people. Thanks for any advice. Jeff
Technical Details
Message-ID:
<3e8894b1$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,222458dfba824527,start X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-03-31 11:24:44 PST From: "Jeff Douglass" <.> Newsgroups: borland.public.cppbuilder.nativeapi Subject: PlaySound() API fuction control? Date: Mon, 31 Mar 2003 12:12:01 -0700 Lines: 19 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 NNTP-Posting-Host: 68.2.177.21 Message-ID: <3e8894b1$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1049138353 68.2.177.21 (31 Mar 2003 11:19:13 -0800) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail