public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Win95 program to play audio file
@ 1998-07-11 10:48 Bhaskar Bhattacharya
  0 siblings, 0 replies; 4+ messages in thread
From: Bhaskar Bhattacharya @ 1998-07-11 10:48 UTC (permalink / raw)
  To: gnu-win32

Hello:

I just tried to compile an example program from the Charles Petzold
book on programming Windows 95. It contains a function call

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

I coudn't find a header file for this function. I get the error message

gcc -c -Wall -Ic:/Cygnus/b19/H-i386-cygwin32/i386-cygwin32/include
hellowin.c
hellowin.c: In function `WndProc':
hellowin.c:65: warning: implicit declaration of function `PlaySound'
hellowin.c:65: `SND_FILENAME' undeclared (first use this function)
hellowin.c:65: (Each undeclared identifier is reported only once
hellowin.c:65: for each function it appears in.)
hellowin.c:65: `SND_ASYNC' undeclared (first use this function)
MAKE.EXE: *** [hellowin.o] Error 1

Has anybody compiled a program involving playing sound files ? If yes,
would someone please share a code fragment with me ?

thanks,

Bhaskar Bhattacharya
PS. The program compiles (and runs) fine if that line is commented out.
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Win95 program to play audio file
       [not found] <199807151621.NAA16633@swan2.uspnet.usp.br>
@ 1998-07-15 20:50 ` Bhaskar Bhattacharya
  0 siblings, 0 replies; 4+ messages in thread
From: Bhaskar Bhattacharya @ 1998-07-15 20:50 UTC (permalink / raw)
  To: gnu-win32

Thanks a lot for all the help in solving the problem. It compiled
smoothly with the mmsystem.h file sent to me by Hilton Fernandes.
I have now got a little hint of how to proceed in such situations,
and learnt a few things.

Bhaskar
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Win95 program to play audio file
  1998-07-13  1:02 Robin Crampton
@ 1998-07-13 20:48 ` Bhaskar Bhattacharya
  0 siblings, 0 replies; 4+ messages in thread
From: Bhaskar Bhattacharya @ 1998-07-13 20:48 UTC (permalink / raw)
  To: gnu-win32

OK, I tried including mmsystems.h but got a whole lot of syntax errors
in preprocessing. The keywords NEAR and FAR caused problems and when I
removed all references to them in the header file, other typedefs like
WINMAPI started problems. I am quite frustrated trying to figure out
which header files I need for a successful compile.

thanks,

Bhaskar

Robin Crampton wrote:
> 
> You need to include mmsystem.h.  It doesn't come with Cygwin32.
> Link with libwinmm.a.
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: Win95 program to play audio file
@ 1998-07-13  1:02 Robin Crampton
  1998-07-13 20:48 ` Bhaskar Bhattacharya
  0 siblings, 1 reply; 4+ messages in thread
From: Robin Crampton @ 1998-07-13  1:02 UTC (permalink / raw)
  To: gnu-win32, bhaskar

You need to include mmsystem.h.  It doesn't come with Cygwin32.
Link with libwinmm.a.  

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1998-07-15 20:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-07-11 10:48 Win95 program to play audio file Bhaskar Bhattacharya
1998-07-13  1:02 Robin Crampton
1998-07-13 20:48 ` Bhaskar Bhattacharya
     [not found] <199807151621.NAA16633@swan2.uspnet.usp.br>
1998-07-15 20:50 ` Bhaskar Bhattacharya

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).