gcc, PlaySound(), Vista

Nicholas Volk nvolk@bitlips.fi
Tue Aug 5 14:03:00 GMT 2008


Hi all,

I notice that Window's PlaySound() function makes my program crash when
using Cygwin's gcc with Vista. The problem does not exist in XP. Also the
problem vanishes when using -mno-cygwin option with Vista. The attached C
file contains a simple program (it just contains a char array of audio
data and a PlaySound() call which gets the data as argument) that causes
the problem. Meaning that

$ gcc -c -o poc.o poc.c ; gcc poc.exe poc.o -lwinmm
$ ./poc.exe

starts to speak, but the program crashes within PlaySound() soon after the
start. However, the following work fine:

$ gcc -c -o poc.o poc.c ; gcc poc.exe poc.o -lwinmm
$ ./poc.exe

Not a problem for me, since -mno-cygwin works for me. Just curious what
might be causing this...

BR,
  Nicholas
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: poc.c
URL: <http://cygwin.com/pipermail/cygwin/attachments/20080805/7f465713/attachment.c>
-------------- next part --------------
--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


More information about the Cygwin mailing list