Jump to content

Sound in C++


Blackninja543

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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...