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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...