|
-
July 22nd, 1999, 05:11 AM
#1
How do I do an asynchrnous Beep?
For NT 4.0
I want generate a beep with frequency and duration: the api 'Beep' is synchronous, however. So how can I do something similar asynchronously.
(I've tried using a separate thread just for beeping, but because the thread isn't actually sleeping during the
beep call, it prevents the rest of the process running as well.)
-
July 22nd, 1999, 07:26 AM
#2
Re: How do I do an asynchrnous Beep?
try using the separate thread, but make it lowest thread priority. that may help. don't know for sure.
miked
-
July 22nd, 1999, 10:09 AM
#3
Re: How do I do an asynchrnous Beep?
You can also use PlaySound() and MessageBeep() which gives you option to play sounds async. These function however donot give you the option of playing sound at different frequency and duration.
-
July 23rd, 1999, 04:12 AM
#4
Re: How do I do an asynchrnous Beep?
Yeah that's the problem! Also the target platform does not have a sound card, so playsound is not an option. The separtae thread at a lower priority doesn't work either.
-
July 23rd, 1999, 10:27 AM
#5
Re: How do I do an asynchrnous Beep?
How long are you trying to play the sound any way? I am curuious why a separate thread didn't solve your problem. What exactly happens to your application when you run the other thread to make the beep?
Any way if you absolutely want to make this work, you can do so by directly programming your speaker port. You will however need a KDD (kernel mode device driver) to access the i/o Port. If you are interested in this route, let me know.
-
July 29th, 1999, 03:13 AM
#6
Re: How do I do an asynchrnous Beep?
Okay, okay. I was wrong! (Sorry)
The lower priority thread did work...once I sorted out a problem with statis timer procs, and calling
SetTimer from the correct thread!
Thanks.
-
October 19th, 2008, 11:40 AM
#7
Re: How do I do an asynchrnous Beep?
To Ian Wills:
This may sound absurd but, could I peak at your code as to how you got the beep to work asynchronously? The reason I ask is because I haven't learned anything about lower priority threads and such.
-
October 19th, 2008, 01:47 PM
#8
Re: How do I do an asynchrnous Beep?
 Originally Posted by sk8ajoe
To Ian Wills:
This may sound absurd but, could I peak at your code as to how you got the beep to work asynchronously? The reason I ask is because I haven't learned anything about lower priority threads and such.
There are dozens of samples of creating threads (MSDN/Codeguru/etc) all you have to do is create the thread and in the thread PROC call the ::Beep() function.
Cheers
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|