--- a
+++ b/tools/sound/quick-play-sound.c
@@ -0,0 +1,77 @@
+#include <stdio.h>
+#include <stdlib.h>
+
+/* for OSS/Free sound */
+#include <sys/soundcard.h>
+#include <sys/ioctl.h>
+
+/* for stat */
+#include <sys/stat.h>
+#include <unistd.h>
+
+      #include <sys/types.h>
+       #include <sys/stat.h>
+       #include <fcntl.h>
+
+
+void init_oss_sound_device(void) ;
+
+int audio_device_fd ;
+
+int main(int argc, char **argv) {
+	char *sound ;
+	struct stat stat_buf ;
+	int fd ;
+	int sound_size = 0 ;
+
+	if( argc != 2 ) {
+		printf("usage: %s <filename>\n",argv[0]) ;
+		exit(0) ;
+	}
+
+	/* allocate RAM and read in the sound */
+	stat(argv[1], &stat_buf) ;
+	sound_size = stat_buf.st_size ;
+	
+	printf("sound size is %d\n",sound_size) ;
+	
+	sound = (char *) calloc( sound_size, sizeof(char) ) ;
+	
+	fd = open(argv[1],O_RDONLY) ;
+	read( fd, sound, sound_size ) ;
+	close(fd) ;
+	
+	/* initialize the sound card */
+	init_oss_sound_device() ;
+
+	/* play the sound */
+	write(audio_device_fd, sound, sound_size) ;
+	close(audio_device_fd) ;
+	
+	return(0) ;
+}
+
+
+void init_oss_sound_device(void) {
+	int format = AFMT_U8 ;
+	int channels = 1 ;
+	int speed = 8000 ;
+	int frag_size ;
+	
+	audio_device_fd = open("/dev/dsp",O_WRONLY,O_NONBLOCK) ;
+
+	/* 0x7fff0008 is a magic OSS/Free number
+	 *   7fff => no fragment limit
+	 *   0008 => fragment size of 2^8 bytes
+	 */
+	frag_size = 0x7fff0008 ;
+	ioctl(audio_device_fd, SNDCTL_DSP_SETFRAGMENT, &frag_size) ;
+
+	ioctl(audio_device_fd,SNDCTL_DSP_SETFMT,&format) ;
+
+	ioctl(audio_device_fd,SNDCTL_DSP_CHANNELS,&channels) ;
+        
+	ioctl(audio_device_fd,SNDCTL_DSP_SPEED,&speed) ;
+        
+	return ;
+}