|
-
April 28th, 1999, 04:08 PM
#1
Playing *.Wav Files
How do you play a wav file?
source code wise i mean
Of all the things I've lost I miss my mind the most
-
April 28th, 1999, 05:00 PM
#2
Re: Playing *.Wav Files
Have a look in the multimedia section of this site.
There should be something there to help you get started.
-
April 28th, 1999, 06:15 PM
#3
Re: Playing *.Wav Files
You can play a wave file using the PlaySound function
e.g.
PlaySound("fmast.wav", NULL, SND_FILENAME | SND_ASYNC);
with, obviously, your file in place of fmast.wav
FUNKMASTER P
-
April 28th, 1999, 06:21 PM
#4
Re: Playing *.Wav Files
can this function play wav's directly from the hardrive or does the wav have to be in the project's workspace?
Of all the things I've lost I miss my mind the most
-
April 28th, 1999, 06:22 PM
#5
Re: Playing *.Wav Files
when i try to use this function it says:
error LNK2001: unresolved external symbol __imp__PlaySoundA@12
how do i fix this? im including mmsystem.h in my dialog's cpp file
Of all the things I've lost I miss my mind the most
-
April 28th, 1999, 06:25 PM
#6
Re: Playing *.Wav Files
If you specify the absolute path i.e. (C:msdevstd/bin/fmast.wav) then your file can be anywhere on the hard drive, however if you use the path (or lack there of ) that i included in the snippet, I believe the files has to be in the same directory as the code
FUNKMASTER P
-
April 28th, 1999, 06:27 PM
#7
Re: Playing *.Wav Files
oh yeah sorry forgot...
this is a pretty old function not MFC you know
trying including windows.s
i.e.
#include windows.h
FUNKMASTER P
-
April 28th, 1999, 10:12 PM
#8
Re: Playing *.Wav Files
nope including windows.h doesnt help, still has the same linking error, any other ideas?
Of all the things I've lost I miss my mind the most
-
April 30th, 1999, 02:20 AM
#9
-
April 30th, 1999, 02:27 AM
#10
Re: Playing *.Wav Files
Do everything that you have been (using the PlaySound() function), and linking to the .lib file that was given, but include the following line of code at the top of your .cpp file that you're calling the PlaySound() function in..
#include "mmsystem.h"
Have fun!
- Troy
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|