/* nas.c --- XEmacs support for the Network Audio System server. * * Author: Richard Caley * * Copyright 1994 Free Software Foundation, Inc. * Copyright 1993 Network Computing Devices, Inc. * * Permission to use, copy, modify, distribute, and sell this software and * its documentation for any purpose is hereby granted without fee, 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 Network Computing Devices, Inc. not be * used in advertising or publicity pertaining to distribution of this * software without specific, written prior permission. * * THIS SOFTWARE IS PROVIDED 'AS-IS'. NETWORK COMPUTING DEVICES, INC., * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING WITHOUT * LIMITATION ALL IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE, OR NONINFRINGEMENT. IN NO EVENT SHALL NETWORK * COMPUTING DEVICES, INC., BE LIABLE FOR ANY DAMAGES WHATSOEVER, INCLUDING * SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES, INCLUDING LOSS OF USE, DATA, * OR PROFITS, EVEN IF ADVISED OF THE POSSIBILITY THEREOF, AND REGARDLESS OF * WHETHER IN AN ACTION IN CONTRACT, TORT OR NEGLIGENCE, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ /* Synched up with: Not in FSF. */ /* This file Mule-ized by Ben Wing, 5-15-01. */ /* There are four compile-time options. * * XTOOLKIT This will be part of an Xt program. * * XTEVENTS The playing will be supervised asynchronously by the Xt event * loop. If not set, playing will be completed within the call * to play_file etc. * * ROBUST_PLAY Causes errors in nas to be caught. This means that the * program will attempt not to die if the nas server does. * * CACHE_SOUNDS Causes the sounds to be played in buckets in the NAS * server. They are named by their comment field, or if that is * empty by the filename, or for play_sound_data by a name made up * from the sample itself. */ /* CHANGES: * 10/8/94, rjc Changed names from netaudio to nas * Added back asynchronous play if nas library has * correct error facilities. * 4/11/94, rjc Added wait_for_sounds to be called when user wants to * be sure all play has finished. * 1998-10-01 rlt Added support for WAVE files. * 2002-10-16 Jon Trulson modifed this to work with NAS releases * 1.5f and higher. We were using the private variable * SoundFileInfo that doesn't exist anymore. But preserve * backward compatibility. This will not work for some * versions of NAS around 1.5b to 1.5f or so. Known to * work on 1.2p5 and 1.6. */ #include #include "lisp.h" #include "sound.h" #include "sysdep.h" #include "syssignal.h" /* NAS <= 1.2p5 defines {BIG,LITTLE}_ENDIAN in