Next: Example: translate
Up: GRASP Routines: General purpose
Previous: Example: makesounds program
  Contents
0
sound(short *array,int n,char *name,int filenumber)
This is just like the function audio() except that it writes
the sound data into a file of the form *.au.
The arguments are:
- array: Input. The array that you want to hear.
- n: Input. The number of array elements that you want to hear.
The elements used are array[0..n-1].
- name: Input. Used to construct the output file name.
- filenumber: Input. The value of
used to construct the output file name.
This function produces an output file with 16-bit PCM linear coding,
containing sound data. The name of the file is:
name.
.au where
is the integer specified by filenumber.
Note that if
then
is ``expanded" or ``padded" to three
digits. For example, calling
sound(array,4800,"growl",9)
will produce the file
growl.009.au
containing
second of sound.
Note: see the Warning that goes with audio().
- Authors:
Bruce Allen, ballen@dirac.phys.uwm.edu
- Comments:
This routine could be modified to permit a bit more freedom in
setting the volume and/or the sample rate.
Next: Example: translate
Up: GRASP Routines: General purpose
Previous: Example: makesounds program
  Contents
Bruce Allen
2000-11-19