C and C++

Moderators: None (Apply to moderate this forum)
Number of threads: 28695
Number of posts: 94715

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
playing wav files with visual C++ ? Posted by briang5 on 27 Nov 2004 at 9:32 AM
I want to play a wav file in my visual C++ program. I havent been able to find any examples of this. Can any one help me ? Thanks
Report
Re: playing wav files with visual C++ ? Posted by AsmGuru62 on 27 Nov 2004 at 2:43 PM
: I want to play a wav file in my visual C++ program. I havent been able to find any examples of this. Can any one help me ? Thanks
:
Try this:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/multimed/htm/_win32_playsound.asp

Report
Re: playing wav files with visual C++ ? Posted by briang5 on 27 Nov 2004 at 10:02 PM
: : I want to play a wav file in my visual C++ program. I havent been able to find any examples of this. Can any one help me ? Thanks
: :
: Try this:
:
: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/multimed/htm/_win32_playsound.asp
:

:


I am trying to do this with a simple dialog program using MFC with visual studios 6.0. I am using a win 98 platform.


I tried:

PlaySound("test.wav", NULL, SND_FILENAME | SND_ASYNC);


At the top of the file that I am trying to use the Playsound function, i added the following:

#include "Windows.h"
#include "Mmsystem.h"


I am getting the following error:

drawDlg.obj : error LNK2001: unresolved external symbol __imp__PlaySoundA@12





Any ideas ?

Thanks

Report
Re: playing wav files with visual C++ ? Posted by DB1 on 28 Nov 2004 at 3:41 AM
: : : I want to play a wav file in my visual C++ program. I havent been able to find any examples of this. Can any one help me ? Thanks
: : :
: : Try this:
: :
: : http://msdn.microsoft.com/library/default.asp?url=/library/en-us/multimed/htm/_win32_playsound.asp
: :

: :
:
:
: I am trying to do this with a simple dialog program using MFC with visual studios 6.0. I am using a win 98 platform.
:
:
: I tried:
:
: PlaySound("test.wav", NULL, SND_FILENAME | SND_ASYNC);
:
:
: At the top of the file that I am trying to use the Playsound function, i added the following:
:
: #include "Windows.h"
: #include "Mmsystem.h"
:
:
: I am getting the following error:
:
: drawDlg.obj : error LNK2001: unresolved external symbol __imp__PlaySoundA@12
:
:
:
:
:
: Any ideas ?
:
: Thanks
:
:


You'll need to link your project with winmm.lib




To understand recursive, first you need to understand recursive

Report
Re: playing wav files with visual C++ ? Posted by AsmGuru62 on 28 Nov 2004 at 8:24 AM
In VC++ 6.0 go: Project -> Settings -> Tab 'Link': in the box "Object/library modules:" specify winmm.lib at the end of the line.

Report
Re: playing wav files with visual C++ ? Thanks guys .... Posted by briang5 on 28 Nov 2004 at 10:09 AM
: In VC++ 6.0 go: Project -> Settings -> Tab 'Link': in the box "Object/library modules:" specify winmm.lib at the end of the line.
:

:

Thanks guys. I was able to get the wave file playing from my program with your help.
Report
Re: playing wav files with visual C++ ? Posted by dorwin1990 on 21 Jul 2006 at 2:05 PM
: In VC++ 6.0 go: Project -> Settings -> Tab 'Link': in the box "Object/library modules:" specify winmm.lib at the end of the line.
:

:

Please give me the entire syntax of playing a wav file in vc++ 6.0

thanx

Report
Re: playing wav files with visual C++ ? Posted by AsmGuru62 on 21 Jul 2006 at 8:29 PM
: : In VC++ 6.0 go: Project -> Settings -> Tab 'Link': in the box "Object/library modules:" specify winmm.lib at the end of the line.
: :

: :
:
: Please give me the entire syntax of playing a wav file in vc++ 6.0
:
: thanx
:
:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/multimed/htm/_win32_playsound.asp
Report
Re: playing wav files with visual C++ ? Posted by dorwin1990 on 22 Jul 2006 at 10:37 AM
thanx but i dont get it. can u send me the source code. im kinda newbie. only work on turbo.

dorwin

: : : In VC++ 6.0 go: Project -> Settings -> Tab 'Link': in the box "Object/library modules:" specify winmm.lib at the end of the line.
: : :

: : :
: :
: : Please give me the entire syntax of playing a wav file in vc++ 6.0
: :
: : thanx
: :
: :
: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/multimed/htm/_win32_playsound.asp
:




 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.