add source for "racket-playsound.exe"

This commit is contained in:
Matthew Flatt 2015-12-28 07:37:04 -06:00
parent cefcbdf802
commit e08188aeda
2 changed files with 13 additions and 0 deletions
racket/src/native-libs

View File

@ -155,6 +155,9 @@ More details for Windows:
uses `-static-libgcc' and `-static-libstdc++' to statically link
those libraries. Use "depends.exe" to check DLL dependencies.
* The extra "playsound.c" program is meant to be compiled to
"racket-playsound.exe" for the "gui" library.
More details for Mac OS X:
* 32-bit binaries are built for 10.5 and up. 64-bit binaries are

View File

@ -0,0 +1,10 @@
#include <Windows.h>
/* Doesn't attempt to parse the command line in the usual way.
Instead, the whole command-line is used as a path of a
sound file to play. */
int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR ignored, int nCmdShow)
{
return PlaySoundW(GetCommandLineW(), NULL, SND_SYNC);
}