www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/07/11/19:08:45

From: bhaskar AT ieee DOT org (Bhaskar Bhattacharya)
Subject: Win95 program to play audio file
11 Jul 1998 19:08:45 -0700 :
Message-ID: <35A7A470.450270BF.cygnus.gnu-win32@ieee.org>
Mime-Version: 1.0
To: "gnu-win32 AT cygnus DOT com" <gnu-win32 AT cygnus DOT com>

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 AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019