Re:Does WAV player exist?

Tfork@aol.com
XXX, 3 Apr 1994 13:12:31 -0400 (EDT)

WAV.ZIP - January 6, 1994

Distribution
------------
Copyright (c) Geoworks 1994 -- All Rights Reserved
All files contained within this zip file are copyrighted by Geoworks.
Re-distribution of any of these files in any way is prohibited without
the express permission of Geoworks.

Description
-----------
Geoworks has written a new library which allows the Zoomer to play
standard .WAV file sampled sounds. You are free to use this library
and to install it (the WAV.GEO file) on any Zoomer.

Packing List
------------
wav.geo - The library itself
wavec.geo - Error checking version of the library
readme.txt - This file
wav.ldf - Library Definition File, used by programming tools.
wav.sym - Symbolic debugging information
wavec.sym - Symbolic debugging information for EC version
wav.goh - Goc header file

Installation Instructions
-------------------------
Create a directory called WAV in your \pcgeos\library directory.
Copy the following files to your host machine:
wav.geo ==> \pcgeos\library\wav
wavec.geo ==> \pcgeos\library\wav
wav.sym ==> \pcgeos\library\wav
wavec.sym ==> \pcgeos\library\wav
wav.ldf ==> \pcgeos\include\ldf
wav.goh ==> \pcgeos\include
Copy WAV.GEO to the SYSTEM directory on your Zoomer's RAM disk.

You can copy these files to a desktop PC simulating a Zoomer,
though they will make no sound on a non-Zoomer machine:
wav.geo ==> \geosnc\system
wavec.geo ==> \geosec\system

Instructions for Use
--------------------
The library did not go out with the original Zoomer, so you will
have to install it on the user's machine. The library is in a file
called WAV.GEO, which should be installed to the SYSTEM directory
of the user's RAM drive. The header information for the library is
in the file WAV.GOH.

There are two routines available. PlaySoundFromFile() is ideal for
playing short sounds on threads which are not time-critical (i.e.
threads which are not your application's UI thread). It plays the
sound in an already opened .WAV file. The calling thread will not
continue until the sound finishes playing, and thus it is a bad
idea to call this routine to play a long sound.

WavPlayFile() takes the path and file name of a .WAV file. It
spawns a background thread to open the file and play the sound.
This is the routine to use to play long sounds or to play sounds
from a time-critical thread.

Sample Code
------------
{ /* Plays the sound in "TEST.WAV" on a different thread
* (execution continues on this thread while the sound
* plays in the background) */
WavPlayFile(SP_USER_DATA, "SOUND", "TEST.WAV");
}
{ /* Plays the sound in "TEST.WAV" on the current thread. */
FileHandle fh; (void) FileSetCurrentPath(SP_USER_DATA, "SOUND");
fh = FileOpen("TEST.WAV", FILE_ACCESS_R | FILE_DENY_W);
if (fh) { PlaySoundFromFile(fh); (void) FileClose(fh, TRUE); };
}