![]() |
| | #1 |
| Registered User Join Date: Nov 2009
Posts: 3
| I came across a function "fopen", but i think its for opening text file. If i m wrong with that, can anyone tell me how to open audio file using "fopen". |
| yugal0007 is offline | |
| | #2 |
| Registered User Join Date: Jan 2009
Posts: 30
| There are three ways that I know of to play an audio file: MCI waveOut DirectSound I haven't really used them that much, so I can't help you at all with how to use them. Google their names to find out about them. |
| DeadPlanet is offline | |
| | #3 |
| Registered User Join Date: Nov 2009
Posts: 3
| Thanks i will try it. |
| yugal0007 is offline | |
| | #4 |
| &TH of undefined behavior Join Date: Aug 2001
Posts: 5,183
| If you just want it to open in the app that the user has installed for that file type (Winamp, Windows Media Player, etc) try ShellExecute Cprogramming.com FAQ > Run a program from within a program
__________________ "If A is success in life, then A equals x plus y plus z. Work is x; y is play; and z is keeping your mouth shut." Albert Einstein (1879 - 1955) Board Rules |
| Fordy is offline | |
| | #5 |
| train spotter Join Date: Aug 2001 Location: near a computer
Posts: 3,359
| simplest way is with PlaySound() from Winmm.lib Code: char szFullPath[MAX_PATH]="c://sounds//somesound.wav"; PlaySound(szFullPath, NULL, SND_FILENAME);
__________________ "Man alone suffers so excruciatingly in the world that he was compelled to invent laughter." Friedrich Nietzsche "I spent a lot of my money on booze, birds and fast cars......the rest I squandered." George Best "If you are going through hell....keep going." Winston Churchill |
| novacain is offline | |
![]() |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Data Structure Eror | prominababy | C Programming | 3 | 01-06-2009 09:35 AM |
| Can we have vector of vector? | ketu1 | C++ Programming | 24 | 01-03-2008 05:02 AM |
| gcc link external library | spank | C Programming | 6 | 08-08-2007 03:44 PM |
| fopen(); | GanglyLamb | C Programming | 8 | 11-03-2002 12:39 PM |
| My program, anyhelp | @licomb | C Programming | 14 | 08-14-2001 10:04 PM |