943,621 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Unsolved
  • Views: 6062
  • C++ RSS
You are currently viewing page 2 of this multi-page discussion thread; Jump to the first page
Sep 28th, 2007
0

Re: How do you include sound files in C++?

Do you have the soun/clip in a WAV file?
Featured Poster
Reputation Points: 129
Solved Threads: 26
Nearly a Posting Maven
zandiago is offline Offline
2,463 posts
since Jun 2007
Sep 28th, 2007
0

Re: How do you include sound files in C++?

yes
Reputation Points: 10
Solved Threads: 0
Newbie Poster
eeneilson is offline Offline
11 posts
since Sep 2007
Oct 1st, 2007
0

Re: How do you include sound files in C++?

Still here?
Reputation Points: 10
Solved Threads: 0
Newbie Poster
eeneilson is offline Offline
11 posts
since Sep 2007
Oct 1st, 2007
0

Re: How do you include sound files in C++?

I'll check around, i know someone who did it recently. You may also want to check the following to see if they help you: http://www.codeguru.com/Cpp/G-M/mult...cle.php/c4739/

There is a playsound() function that will may sound files....but i think it has a limit of 100kb.
Featured Poster
Reputation Points: 129
Solved Threads: 26
Nearly a Posting Maven
zandiago is offline Offline
2,463 posts
since Jun 2007
Oct 1st, 2007
0

Re: How do you include sound files in C++?

ok thx pls do talk to the guy that you mentioned id really appreciate it thx
Reputation Points: 10
Solved Threads: 0
Newbie Poster
eeneilson is offline Offline
11 posts
since Sep 2007
Oct 5th, 2007
0

Re: How do you include sound files in C++?

......
Reputation Points: 10
Solved Threads: 0
Newbie Poster
eeneilson is offline Offline
11 posts
since Sep 2007
Oct 5th, 2007
0

Re: How do you include sound files in C++?

What effort have you given this?

Can you post any code?

Some great tutorials have been posted that should get you started.
Reputation Points: 152
Solved Threads: 39
Master Poster
Killer_Typo is offline Offline
778 posts
since Apr 2004
Oct 7th, 2007
0

Re: How do you include sound files in C++?

If you want to try it out the command is

Beep (fequency in cycles, duration in milliseconds); // The capital letter 'B' is mandatory

An additional compiler directive is needed:
#include <windows.h>

Beep(1000, 2000); will make a sound of 1000 cycles for 2 seconds
Featured Poster
Reputation Points: 129
Solved Threads: 26
Nearly a Posting Maven
zandiago is offline Offline
2,463 posts
since Jun 2007
Oct 7th, 2007
0

Re: How do you include sound files in C++?

Well, I've heared about it, try this code! but it think it works on
old compiler such as Turbo C++ V3.

[code=c++]
#include <stdio.h>
#include <conio.h>
#include <stdlib.h>
#include <dos.h>

int main()
{
clrscr();
sound(100);
delay(100); //or you can use pause
nosound(); // for stopping sound
return 0;
}
Reputation Points: 10
Solved Threads: 1
Light Poster
fzafarani is offline Offline
33 posts
since Aug 2007
Oct 7th, 2007
0

Re: How do you include sound files in C++?

Well, I've heard about it, try this code! but it think it works on
old compiler such as Turbo C++ V3.

c++ Syntax (Toggle Plain Text)
  1. #include <stdio.h>
  2. #include <conio.h>
  3. #include <stdlib.h>
  4. #include <dos.h>
  5.  
  6. int main()
  7. {
  8. clrscr();
  9. sound(100);
  10. delay(100); //or you can use pause
  11. nosound(); // for stopping sound
  12. return 0;
  13. }
Reputation Points: 10
Solved Threads: 1
Light Poster
fzafarani is offline Offline
33 posts
since Aug 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: Sum of Series help
Next Thread in C++ Forum Timeline: Confusing Problem





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC