Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

playing wav files with visual C++ ?

briang5briang5 Posts: 34Member
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

Comments

  • AsmGuru62AsmGuru62 Posts: 6,519Member
    : 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
    :
    [blue]Try this:

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/multimed/htm/_win32_playsound.asp
    [/blue]
  • briang5briang5 Posts: 34Member
    : : 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
    : :
    : [blue]Try this:
    :
    : http://msdn.microsoft.com/library/default.asp?url=/library/en-us/multimed/htm/_win32_playsound.asp
    : [/blue]
    :


    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 [email protected]





    Any ideas ?

    Thanks

  • DB1DB1 Posts: 1,142Member
    : : : 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
    : : :
    : : [blue]Try this:
    : :
    : : http://msdn.microsoft.com/library/default.asp?url=/library/en-us/multimed/htm/_win32_playsound.asp
    : : [/blue]
    : :
    :
    :
    : 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 [email protected]
    :
    :
    :
    :
    :
    : Any ideas ?
    :
    : Thanks
    :
    :


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




    [italic][blue]To understand recursive, first you need to understand recursive[/blue][/italic]

  • AsmGuru62AsmGuru62 Posts: 6,519Member
    [blue]In VC++ 6.0 go: Project -> Settings -> Tab 'Link': in the box "Object/library modules:" specify winmm.lib at the end of the line.
    [/blue]
  • briang5briang5 Posts: 34Member
    : [blue]In VC++ 6.0 go: Project -> Settings -> Tab 'Link': in the box "Object/library modules:" specify winmm.lib at the end of the line.
    : [/blue]
    :

    Thanks guys. I was able to get the wave file playing from my program with your help.
  • dorwin1990dorwin1990 Posts: 7Member
    : [blue]In VC++ 6.0 go: Project -> Settings -> Tab 'Link': in the box "Object/library modules:" specify winmm.lib at the end of the line.
    : [/blue]
    :

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

    thanx

  • AsmGuru62AsmGuru62 Posts: 6,519Member
    : : [blue]In VC++ 6.0 go: Project -> Settings -> Tab 'Link': in the box "Object/library modules:" specify winmm.lib at the end of the line.
    : : [/blue]
    : :
    :
    : Please give me the entire syntax of playing a wav file in vc++ 6.0
    :
    : thanx
    :
    :
    [blue]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/multimed/htm/_win32_playsound.asp[/blue]
  • dorwin1990dorwin1990 Posts: 7Member
    thanx but i dont get it. can u send me the source code. im kinda newbie. only work on turbo.

    dorwin

    : : : [blue]In VC++ 6.0 go: Project -> Settings -> Tab 'Link': in the box "Object/library modules:" specify winmm.lib at the end of the line.
    : : : [/blue]
    : : :
    : :
    : : Please give me the entire syntax of playing a wav file in vc++ 6.0
    : :
    : : thanx
    : :
    : :
    : [blue]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/multimed/htm/_win32_playsound.asp[/blue]
    :

Sign In or Register to comment.