Jump to content
Sign in to follow this  
Blackninja543

Sound in C++

Recommended Posts

#include <windows.h>
#include <conio.h>

int main(int argc, char *argv[])
{
Beep(500,500); //Beep( Frequence(hz), milliseconds )

getch();
return 0;
}

 

I think this might help with what you need to do. However I would also play around with it rather then use the code that I have used.

Edited by Blackninja543

Share this post


Link to post
Share on other sites

Yeah that's alright, I was just pointing out the limitation of the function

 

There are many libraries out there to actually output sound files, but they aren't even nearly as simple as the example above

Edited by Zertz

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×