Article View: borland.public.cppbuilder.nativeapi
Article #4546Windows PlaySound () strangeness
From: Simon Elliott
Date: Thu, 05 Jan 2006 15:27
Date: Thu, 05 Jan 2006 15:27
19 lines
1525 bytes
1525 bytes
I always thought that I understood the Windows PlaySound() API function: With the flag SND_ASYNC, the sound is played asynchronously and PlaySound() returns immediately after beginning the sound. with the flag SND_SYNC, PlaySound() returns after the sound event completes. However I've been testing some code which calls PlaySound() from within a thread, with SND_SYNC set, and the PlaySound() call returns long before the sound has finished playing. For a 60 second sound, the PlaySound() call returns after less than 500 milliseconds. In fact, it's behaving a lot like it should with SND_ASYNC. This is happening both on a W2K box with SP4, and XP with SP2. Has anyone else seen this? -- Simon Elliott http://www.ctsn.co.uk
Technical Details
Message-ID:
<43bd48d6$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!newshub.sdsu.edu!logbridge.uoregon.edu!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,559afca4b538a8a3,start X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Simon Elliott" <Simon at ctsn.co.uk> Subject: Windows PlaySound () strangeness Newsgroups: borland.public.cppbuilder.nativeapi Reply-To: "Simon Elliott" <News at ctsn.co.uk> User-Agent: XanaNews/1.17.4.1 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 NNTP-Posting-Host: 82.152.41.49 Message-ID: <43bd48d6$1@newsgroups.borland.com> Date: 5 Jan 2006 08:27:02 -0700 X-Trace: newsgroups.borland.com 1136478422 82.152.41.49 (5 Jan 2006 08:27:02 -0700) Lines: 19 Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!newshub.sdsu.edu!logbridge.uoregon.edu!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail