How to Play audio file through VC++ application...

Hi

i am working with audio playing through VC++ application. Currently i
am using DirectSound API to play the audio file of PCM format (Wav).
But my this code does not play the wav files with MPEG-Layer 3 fomat.

Could anybody please help me out by any code sample the plays audio
file of any format...

Thanks in advance...

Mujtaba
0
tomujtaba (49)
11/9/2004 10:43:26 AM
vc.mfc 33608 articles. 0 followers. Follow

1 Replies
692 Views

Similar Articles

[PageSpeed] 10

This is what I started out with. It is a simple interface to the sound card.
http://www.codeguru.com/Cpp/G-M/multimedia/article.php/c1587

You may want to check out these...
http://www.codeguru.com/Cpp/G-M/multimedia/audio/article.php/c4739/
http://www.codeproject.com/audio/wave_class_for_playing_and_recording.asp

The Wav Format.
http://www.lightlink.com/tjweber/StripWav/WAVE.html
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wcewave/html/_cerefstructures.asp


Regards,
-- 
Christopher J. Holland [!MVP]
http://www.mvps.org/vcfaq/
http://www.codeguru.com
http://www.codeproject.com
http://www.naughter.com/
http://support.microsoft.com/default.aspx
http://msdn.microsoft.com/howto/
http://msdn.microsoft.com/library/
www.flounder.com/mvp_tips.htm

"Mujtaba" <tomujtaba@hotmail.com> wrote in message 
news:8f4f92aa.0411090243.16c54116@posting.google.com...
> Hi
>
> i am working with audio playing through VC++ application. Currently i
> am using DirectSound API to play the audio file of PCM format (Wav).
> But my this code does not play the wav files with MPEG-Layer 3 fomat.
>
> Could anybody please help me out by any code sample the plays audio
> file of any format...
>
> Thanks in advance...
>
> Mujtaba 


0
msnews (126)
11/9/2004 8:02:52 PM
Reply:

Similar Artilces:

Outlook .pst file #2
My Outlook pst file is locked up. I get an error message that says, "cyclic redundacy check". What is this and can this be fixed? Kevin Cochran <anonymous@discussions.microsoft.com> wrote: > My Outlook pst file is locked up. I get an error message > that says, "cyclic redundacy check". What is this and > can this be fixed? Try the Inbox Repair Tool (scanpst.exe). -- Brian Tillman Smiths Aerospace 3290 Patterson Ave. SE, MS 1B3 Grand Rapids, MI 49512-1991 Brian.Tillman is the name, smiths-aerospace.com is the domain. I don't spea...

Registring file type without using DocTemplate
I'm try to find a way to register a spesific file type (like .xxx) without using AddDocTemplate in InitInstance. Or somthing like RemoveDocTemplate after Calling RegisterShellfileType(). I wanna register multiple file type to an application, I creat an seprate ID with ICON and STRING. ...

dialog at start of application
Hi all, I'd like to show a dialog (a wizard, but that's the same thing really) right at the start of my MFC application (an MDI Frame window app) First thing I thought of is to call wiz.DoModal() in MyFrame::OnCreate but that will show the wizard before my frame shows up, which is a little akward. But what's after OnCreate? The Message loop i guess... Does any-one have a clue? ...

sound files
When a new mail message arrives in Outlook the slected notification wav file does not play. All I hear is a beep from the system speaker. The file plays through the sound card just fine when I go through control panel or select it from explorer. The same thing happens when I connect a USB device. I have reinstalled drivers for the sound card and system speaker but it still happens. Other notification wav files in Outlook, like appointment notifications work fine. Help. ...

Song file titles into Excel?
I have many MP3s on my hard drive, and I'd like to download the filenames directly into Excel. Is there a quick way to do this? Or would I have to copy-and-paste them one at a time? try this Sub anotherfindfiles() Application.ScreenUpdating = False Dim FN As String ' For File Name Dim ThisRow As Long Dim MediaFileLocation As String MediaFileLocation = "c:\yourfolder\*.mp3" FN = Dir(MediaFileLocation) Do Until FN = "" ThisRow = ThisRow + 1 Cells(ThisRow, 1) = FN FN = Dir Loop Application.ScreenUpdating = True End Su...

Deleted MDB file
I use an SD card as means of transporting my mdb file between work and home. I foolishly deleted this mdb file from my SD card in preparation for putting the current mdb file on there without realising I had made a larger number of new queries on the SD version, my own fault I know. I found a utility to undelete files (UndeleteOnClick) and it appeared that I had recovered the lost mdb, the file size looked right and the file had the MS Access icon when viewing the file in Windows Explorer. However, when I tried to open the file in Access I got the error message: Unrecognized database ...

printing files
How to setup in the first file (5 files total) on the last page, using a code to tell the system to print the next file (without opening it) and at the end of that page another code opens the next file etc.......So I can keep the page numbering continuousl You are in dreamtime. Get back to reality. It cannot be done. -- ...

MC FILES
Hi, i have an mc file containing text in english and korean languages.I have changed my System Locale to Korean and my OS is Windows 2000(English).When i compiled this mc file i am getting all the string ids in .h file.So i was not able to access these ids using FindResourceEx() as it is searching the string table for the ids and my other language id is in .h file.How can i make this fucntion to search in .h file also?Or Is there any other way where i can copy the string ids to string table -- For all problems in ur life u r the only solution. You are confused. There is not a single .h file...

Burned DVDs not playing in vcr
Can anyone help me, dvds play fine on the computer but will not play in the playstation, dvd players, etc? Thank you very much for your help. On Wed, 23 Dec 2009 17:54:02 -0800, RLBBBJ <RLBBBJ@discussions.microsoft.com> wrote: >Can anyone help me, dvds play fine on the computer but will not play in the >playstation, dvd players, etc? Thank you very much for your help. Usually PCs are quite flexible for DVD playback, where hardware devices may not be. One critical step for working with standalone DVD players is the DVD disk should be "finalised" which ...

.oft file?
I get the following message when I try and set up BCM. Your. oft file for message class IPM.contact.BCM.Account has a wrong version. Request version 2.00.3123.0, .oft form version 1.00.1616.00. Where and how do I get the version that I need? Thanks -- Lykurgo Posted from - http://www.officehelp.i Have you checked on Office/Microsoft Update to see if you have the latest SP version for BCM? -- Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. All unsolicited mail sent to my personal account will be deleted without reading. After furious head sc...

finding all empty excel files in a folder.
have a windows xp directory and in which hundereds of excel fil resides. Some of those files are empty. is there a code any one of yo all have that can search through the entire directory and find al those files and highlight them or move them to another folder. I woul truly appreciate some help here. Thanks. Stasi -- jackm ----------------------------------------------------------------------- jackm1's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=2539 View this thread: http://www.excelforum.com/showthread.php?threadid=38872 Stasi, What does "Empty&qu...

Write XML to object not a file
Still new to .Net so bare with me. Working on a client/server app. But I'm trying to build an XML file on the fly (without writing to a file) using data from my application. This info includes IP address, Port, GUID, etc. I can write to a file with no problem. But I want to output to some kind of object which I can then serialize and send across the wire to the server, which will then de-serialize it and read it. Any any ideas on how I would output the XmlTextWriter to an object so it'll be ready for serialization? thanks You may want to investigate using the XmlSerializer. ...

Not playing some files
I have Vista Home Premium with SP 2 installed WMP is Version 11.0.6002.18111 My player will play some files but not others. The files are either mp3, wma or wav. but the player will play some of the group but not others of the same group. It doesn't seem to distinguish. In other words it seems to take pot luckas to whether it will play a file or not. WMP is the default player Can you help please? On Tue, 23 Mar 2010 02:40:01 -0700, Brian S <Brian S@discussions.microsoft.com> wrote: > >I have Vista Home Premium with SP 2 installed > >WMP is...

File move, copy , FTP
Hello all, Having trouble understanding "ReadDirectoryChangesW (...)" . Using 'FILE_NOTIFY_CHANGE_CREATION' as one of the filters, we will get notification if we move or copy a file to the directory; however, if we FTP a file to the same directory we do not get notification. Doesn't FTP create a new file and make a new creation date? Any help or insight appreciated? TIA, Ray K. ...

GP 10.0 Web Applications
do client need to purchase any windows license other than named business portal users? ...

DVD plays backround music but doesn't play voice or effects
OP System: Windows 7 I put in a DVD that's around 12 years old, and the visual and the backround music works, but the voices and sound effects are absent. Anybody had this problem before? Ive got all my updates, so I think WMP just stopped supporting the some of the codecs for older DVD's. Just seemed odd, any feedback would be appreciated, thanks. On Apr 22, 10:45=A0pm, TommyTheGun <TommyThe...@discussions.microsoft.com> wrote: > OP System: Windows 7 > > I put in a DVD that's around 12 years old, and the visual and the backrou= nd > music wor...

define savinglocation for 1 file
I have made a workgroup-template for a complaint form. Several people will use this form and save it on the intranet. I want this form to be saved all in the same location without having to select this location everytime. How can I set this location automaticly for this template only. Thanks for your help. Arien ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~ View and post usenet messages directly from http://www.ExcelForum.com/ Arien, In the Thisworkbook object's codemodule, you could use code like this to cancel the user's...

Include pre-formatted files/pdf's in report
When sending out customer orders I today include an invoice and a packing list printed from MS-Access. However, I would like to add various information to the customer, such as technical information, promotions etc. These extra informations would be defined on each order, so what I am after is how to include these text fragments in the report print-out. Should this be done as images (jpegs/tiff's) or is it possible to use pdf documents? If the customer order for example contains a reference to the text fragments P017, TD061, B741, could I then get these three files printed out li...

The file gdiplus.dll is incompatible with Microsoft Outlook. Install Outlook again.
Windows XP Professional SP2 plus MS updates - I am staying clear of SP3 Outlook 2007 SP1 all MS updates installed Hi all I have had this message crop up on two occasions. Outlook restarts OK but the reading pane is missing. Has anybody else had this error and is there a fix for it? TIA Big Dave "Big Dave" <dave@here.com> wrote in message news:efzEjCNoJHA.1184@TK2MSFTNGP04.phx.gbl... > Windows XP Professional SP2 plus MS updates - I am staying clear of SP3 > Outlook 2007 SP1 all MS updates installed GDI+ is a WIndows XP subsystem. It's the Graphics Device ...

Dead Email (.pst) file?
I posted this on the 24 hr helpdesk, too... but I thought maybe more specialized Outlook users might approach this differently... I have been running Outlook 2003 for years. My .pst file is up to about 700 megs in size. As of the last week it does not: a) accept new incoming mail (although I see it downloads it at the bottom right), b) allow me to delete anything (thought that might help it out a little), c) register an error on scanpst OR Ontrack's Easyrecovery OR chkdsk on the disk OR Norton Disk Doctor (on the same disk). The repair programs register errors after I've shutdown O...

How do I change default file location for Publoisher 2007?
MS Publisher does not seem to have an easy way for changing default file locations for saving work. If anyone has figured out how to do this, please share your secrete with the rest of us. Sincerely eephraim You can create a folder, when you *save as* look for the tools menu on the upper right, add this folder to *My Places*. You can use Favorite Links in Vista. It will be an extra click. -- Mary Sauer http://msauer.mvps.org/ "eephraim" <eephraim@discussions.microsoft.com> wrote in message news:CE9FEDCA-CDE1-4BF8-9873-AF7C8937ED24@microsoft.com... > MS Publisher do...

Excel XP
I am trying to import a text file into an Excel XP worksheet, every time I attempt this I get the error 'The file may be read only or I may be trying to access a read only location'. I can import the same text file to an Excel 2000 worksheet with no problems! Is there a security filter running somewhere in the background in Excel XP? Whats my problem? Can someone help!!! I've never seen this and don't know what causes it. But there was just a recent post that had the same problem. But their file was on a network drive. When it was copied to a local drive, the import w...

Opening non-Excel Files
Is there any way to open non-excel files with excel? Thanks for any help! Jeff J. File|open, then look at all the file types that can be opened within excel. Look at the "files of type" dropdown. JAJOSEPHESQ wrote: > > Is there any way to open non-excel files with excel? > > Thanks for any help! > > Jeff J. -- Dave Peterson ec35720@msn.com ...

Application Very Slow
I am using Access 2003 FE & BE application. My BE is in the server and about 15 Nos of simultanious users accessing the database with FE (MDE format) application which is on there own Pc's. For almost all recordset operations I have used "db.OpenRecordset("", dbOpenDynaset)" type in my FE application. If only one user is using the application, then it is very fast and just after any of other user logged on to the system then the whole application performance dropping down considerably. And also two users are not using the same form as well as not using the sa...

MP11 ripping CD only plays WAV
Help! This has got to be something simple. I'm new to MP11 on Vista. Can play CD's thru MP11 fine. Ripping CD appears to complete OK, but playback from Library only works with WAV rips. Tried the WMV's and MP3. Any other format seems to lockup MP11 playback and nothing (even the WAV's) playback. Fixes upon restart of MP11. Copied MP3 file from MP11 into another box running MP10 - and it plays fine. Similar problem for me too, except that I'm using XP. Anybody know how to solve this? I even tried re-installing this thing but it just won'...