Creating a beep sound
-
how can i create like a beep sound, but make it play through the speakers and not the computer's internal speaker? (so, obviously, Console.Beep() is not what i need).
-
how can i create like a beep sound, but make it play through the speakers and not the computer's internal speaker? (so, obviously, Console.Beep() is not what i need).
You can P/Invoke
MessageBeep()
. The declaration can be found on pinvoke.net, for example.Regards, mav -- Black holes are the places where God divided by 0...
-
You can P/Invoke
MessageBeep()
. The declaration can be found on pinvoke.net, for example.Regards, mav -- Black holes are the places where God divided by 0...
But those are just system sounds...how can i create my own sound?
-
But those are just system sounds...how can i create my own sound?
Ok, if the standard beep isn't good enough for you ;P, you can still use the
System.Media.SoundPlayer
class.Regards, mav -- Black holes are the places where God divided by 0...
-
Ok, if the standard beep isn't good enough for you ;P, you can still use the
System.Media.SoundPlayer
class.Regards, mav -- Black holes are the places where God divided by 0...
Again, i don't want to load an external file, i want to CREATE a sound at runtime
-
how can i create like a beep sound, but make it play through the speakers and not the computer's internal speaker? (so, obviously, Console.Beep() is not what i need).
sharpiesharpie wrote:
how can i create like a beep sound, but make it play through the speakers and not the computer's internal speaker?
Is this article on a simple beep[^] what you are looking for?
Upcoming events: * Glasgow: Geek Dinner (5th March) * Edinburgh: Web Security Conference Day for Windows Developers (12th April) My: Website | Blog | Photos
-
Again, i don't want to load an external file, i want to CREATE a sound at runtime
If you said precisely what you want and what you don't want we wouldn't have to guess... :( Anyway, in that case you should start reading about the WAV format. Basically you create a buffer for the audio data, write a
WAVEFORMAT
(look it up in MSDN) to it and add the samples you want to play. That's the most flexible you can get.Regards, mav -- Black holes are the places where God divided by 0...