954,498 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Sine waves and sound

What is the best way to use Sine waves in C++? Also, I want to, by inputting sine waves, generate a sound and vice versa. Is there a way to do this?

Karl1
Newbie Poster
1 post since Dec 2005
Reputation Points: 10
Solved Threads: 0
 

What compiler are you using? What OS?

You might try sound() which outputs a given frequency through the PC speaker. Just don't forget to call sound(0) when you're done or you'll have sound coming out of the speaker until you turn the computer off.

dwks
Posting Whiz in Training
269 posts since Nov 2005
Reputation Points: 185
Solved Threads: 28
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You