/* # Taken from xlock, many authors... # # All Rights Reserved # # Permission to use, copy, modify, and distribute this software and # its documentation for any purpose and without fee is hereby granted, # provided that the above copyright notice appear in all copies and # that both that copyright notice and this permission notice appear in # supporting documentation, and that the name of the author not be # used in advertising or publicity pertaining to distribution of the # software without specific, written prior permission. # # This program is distributed in the hope that it will be "useful", # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # */ #if defined(USE_RPLAY) || defined(USE_NAS) || defined(USE_VMSPLAY) || defined(USE_ESOUND) || defined (WINVER) || defined(DEF_PLAY) #include #include #include #include "file.h" #include "sound.h" #ifdef WINVER #define STRICT #include #include static void play_sound(char *fileName) { (void) PlaySound(fileName, NULL, SND_ASYNC | SND_FILENAME); } #endif #ifdef USE_RPLAY #include static void play_sound(char *fileName) { int rplay_fd = rplay_open_default(); if (rplay_fd >= 0) { rplay_sound(rplay_fd, fileName); rplay_close(rplay_fd); } } #endif #ifdef USE_NAS /* Gives me lots of errors when I compile nas-1.2p5 -- xlock maintainer */ /*- * Connect each time, because it might be that the server was not running * when xlock first started, but is when next nas_play is called */ #include