home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga MA Magazine 1998 #6
/
amigamamagazinepolishissue1998.iso
/
coders
/
jËzyki_programowania
/
logo
/
powerlogo
/
sound
/
sound.doc
< prev
next >
Wrap
Text File
|
1992-11-14
|
5KB
|
129 lines
*** Sound.DOC ***
"Sound" is copyright © 1988 by:
Richard Lee Stockton
21305 60th Ave W.
Mountlake Terrace, WA 98043
Voice phone: (206) 776-1253
but may be freely distributed as long as no profit is made from its
distribution or sale without my written permission. I call this concept
"FreeWare", you can call it whatcha want.
I also include the source code, (Manx 3.4/3.6), in the hope that it will
be of benefit to someone in the Amiga programming community. Feel free to
alter it at will (but at your own risk!). I _would_ appreciate receiving a
copy of whatever it may become, and it is always nice to be credited,
perhaps just a few lines of glowing tribute. ;^)
Long Live Leo and All the Little Schwabie's!
*** DESCRIPTION ***
Sound will attempt to feed <SOUNDfilename>'s data to the audio device.
It will "sound" files containing ANY kind of data (try "Sound Sound" :-) and
of ANY length. If you have expansion memory, "Sound" will store data in
FAST RAM, and use only 4-5K of CHIP RAM to actually sound the data. This is
the magic of "double-buffering".
If the STEREO flag is turned ON, the data will be split and played in
stereo. Otherwise, identical data is sent to left and right channels.
Perfect Sound (tm) samples in stereo will automatically sound in stereo.
These are the only stereo samples I've seen, so I don't know if the code
used is universal (in IFF) for STEREO.
If called from WorkBench by double-clicking on a project icon, Sound
will search the "ToolTypes" entries in the project icon for "STEREO",
"CHANNEL", "CYCLES", and "SAMPLES_PER_SECOND". If found, these values will
override any IFF values read from the SOUNDfile.
WorkBench "extended selection" is supported. Hold down the [SHIFT] key
and select (click) a group of sound-file icons. Double-click the last one
to hear them "sound"ed in order.
If called from CLI, over-riding values for STEREO, CHANNEL, CYCLES,
and/or SAMPLES_PER_SECOND may be specified in the command line (See below).
If no settings for STEREO, CYCLES, CHANNEL, and/or SAMPLES_PER_SECOND
are found, in the file itself or in the calling arguments, STEREO defaults
to OFF, CYCLES to 1, left and right both on, and SAMPLES_PER_SECOND to 10000.
*** ABORT! ***
!!! Sound may be aborted by typing CTRL-C from the keyboard. !!!
If CTRL-C does NOT abort the sound, click on the Sound "Status"
line, (the top line), then CTRL-C again.
*** USAGE ***
NOTE!!! "Sound" should be in your "C:" directory (ie, "copy Sound C:"),
before the following USAGEs will work!
USAGE: (from CLI)
Sound <filename> [CHANNEL] [STEREO] [CYCLES] [SAMPLES_PER_SECOND] [QUIET]
The filename MUST be the first argument, then the other arguments may be
in any order or missing (see below for valid values). "Sound" alone will
display a USAGE message. Sound will "sound" the file, then display the
SAMPLES_PER_SECOND (if the file was found) and STEREO if the sample was
played in stereo.
There is one additional command when called from CLI (or a scriptfile)
QUIET or just "Q" will disable the StatusLine that usually appears on the
top line.
(SAMPLES_PER_SECOND=10000 probably means it wasn't an IFF sound file.)
Although maximum CYCLES = 65535, from CLI the maximum is 55.
USAGE: (from WorkBench)
Double-click on project icon whose Default Tool is set to "C:Sound".
Extended selection is supported. See above.
ToolTypes: STEREO= CYCLES= SAMPLES_PER_SECOND=
CHANNEL= SOURCE= AUTHOR=
Valid Values: (these values stored in the .info file)
STEREO ON - OFF default=off. Not case sensitive.
File is split left/right.
CYCLES 0 - 65535 0 = sound loops until aborted.
Use Abort Button to stop.
SAMPLES_PER_SECOND 1000 - 65535 greater than 30000 seems to have
no effect, but MAX = 64k.
CHANNEL RIGHT or LEFT (r or l) Useful for effects.
SOURCE any text Where did this sound come from?
AUTHOR any text Immortality, if ya want it...
*** ARGUMENT PRIORITIES ***
Arguments from CLI or in the WorkBench Icon override any IFF info.
IFF file info overrides the default values.
Defaults: STEREO = off, CYCLES = 1, both CHANNELS,
SAMPLES_PER_SECOND = 10000
*** OTHER STUFF ***
Included in this arc file are a sample project icon and its related
data file (Gunshot.info and Gunshot) as well as Sound, Sound.c and this
file. The source code was compiled using Manx Aztec 3.6.
Feel free to design your own icons, any project icon should work.
Just make the Default Tool in the icon "C:Sound" and make sure that Sound is
in your C: directory.
Updated 12-2-88 Stay Warm & Enjoy! - Richard