LibSound77 is a FORTRAN77 library that generates sound data in programs compiled with g77.
For sound output, the software currently does not support stereo output. However, work is in progress to improve this feature. A helpful example code, beep77.f, is readily available for usage in this regard. Before initiating the sound library, it is imperative to call the function ao77ini(). Once this is completed, users can set parameters for samplerate and number of channels by calling the function, ao77set(samplerate, nbrchannels).
To play a sound sample, users can use the function, ao77out(sample), which instantly puts integer*2 sound samples onto the way to the speakers. A vital step to note is to call ao77end() after cessation of the sound to release all resources.
For .WAV file usage, LibSound77 can support stereophonics files, although in an experimental stage. Users can access the writing and reading codes through the files sinus.f (for writing) and play77.f (for reading). To open a file for reading or writing, users can use the function sndfopen('plop.wav', MODE, rate, channels), whereby they can set the mode as either 'I' or 'O' and ensure that channels is either set to 1 or 2 when writing.
Samples (integer*2 values) can be added to a file through the function, sndfput(fn, sample), and for a stereo file, two samples can be added at once by calling sndfput2(fn, left, right). To retrieve a sample from a file being read, users can make use of the function, sndfget(fn, sample), which returns 1 for success, 0 for end of file and negatives for errors. Upon completion, the function, sndfclose(fn), can be used to flush all data and close the file.
A new feature that users can expect from this latest release is the inclusion of stereo input/output functions.
Version 40: N/A