How do you include sound files in C++?

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: Jun 2007
Posts: 2,462
Reputation: zandiago is on a distinguished road 
Solved Threads: 25
Featured Poster
zandiago's Avatar
zandiago zandiago is offline Offline
Nearly a Posting Maven

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

 
0
  #11
Sep 28th, 2007
Do you have the soun/clip in a WAV file?
Reply With Quote Quick reply to this message  
Join Date: Sep 2007
Posts: 11
Reputation: eeneilson is an unknown quantity at this point 
Solved Threads: 0
eeneilson eeneilson is offline Offline
Newbie Poster

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

 
0
  #12
Sep 28th, 2007
yes
Reply With Quote Quick reply to this message  
Join Date: Sep 2007
Posts: 11
Reputation: eeneilson is an unknown quantity at this point 
Solved Threads: 0
eeneilson eeneilson is offline Offline
Newbie Poster

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

 
0
  #13
Oct 1st, 2007
Still here?
Reply With Quote Quick reply to this message  
Join Date: Jun 2007
Posts: 2,462
Reputation: zandiago is on a distinguished road 
Solved Threads: 25
Featured Poster
zandiago's Avatar
zandiago zandiago is offline Offline
Nearly a Posting Maven

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

 
0
  #14
Oct 1st, 2007
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.
Reply With Quote Quick reply to this message  
Join Date: Sep 2007
Posts: 11
Reputation: eeneilson is an unknown quantity at this point 
Solved Threads: 0
eeneilson eeneilson is offline Offline
Newbie Poster

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

 
0
  #15
Oct 1st, 2007
ok thx pls do talk to the guy that you mentioned id really appreciate it thx
Reply With Quote Quick reply to this message  
Join Date: Sep 2007
Posts: 11
Reputation: eeneilson is an unknown quantity at this point 
Solved Threads: 0
eeneilson eeneilson is offline Offline
Newbie Poster

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

 
0
  #16
Oct 5th, 2007
......
Reply With Quote Quick reply to this message  
Join Date: Apr 2004
Posts: 759
Reputation: Killer_Typo will become famous soon enough Killer_Typo will become famous soon enough 
Solved Threads: 35
Killer_Typo's Avatar
Killer_Typo Killer_Typo is offline Offline
Master Poster

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

 
0
  #17
Oct 5th, 2007
What effort have you given this?

Can you post any code?

Some great tutorials have been posted that should get you started.
Dont forget to spread the reputation to those that deserve!
Reply With Quote Quick reply to this message  
Join Date: Jun 2007
Posts: 2,462
Reputation: zandiago is on a distinguished road 
Solved Threads: 25
Featured Poster
zandiago's Avatar
zandiago zandiago is offline Offline
Nearly a Posting Maven

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

 
0
  #18
Oct 7th, 2007
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
Reply With Quote Quick reply to this message  
Join Date: Aug 2007
Posts: 33
Reputation: fzafarani is an unknown quantity at this point 
Solved Threads: 1
fzafarani's Avatar
fzafarani fzafarani is offline Offline
Light Poster

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

 
0
  #19
Oct 7th, 2007
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;
}
Farzad Zafarani
Reply With Quote Quick reply to this message  
Join Date: Aug 2007
Posts: 33
Reputation: fzafarani is an unknown quantity at this point 
Solved Threads: 1
fzafarani's Avatar
fzafarani fzafarani is offline Offline
Light Poster

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

 
0
  #20
Oct 7th, 2007
Well, I've heard about it, try this code! but it think it works on
old compiler such as Turbo C++ V3.

  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. }
Farzad Zafarani
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC