Aiff2Wav

 Please read this document in entirety.  I took the time to make it explicit,
 clear, and very useful.  It took me longer to write it than it will ever take you
 to read it.  Therefore, you owe it to both of us to read it.  OK?

 Aiff2Wav is an OS/2 Presentation Manager program that converts AIFF (Audio
 Interchange Format) files (used on the Macintosh) to WAVE format (used on
 clones).

 This is version 1.0.

 Some of the words in this manual are highlighted in bold text, such as
 MPC Enforce.  These are words that refer to Aiff2Wav options which you
 can choose.  Words that are in colored text such as Read This are meant
 to be emphasized.  Words in italics refer to aspects of OS/2.


COPYRIGHT

 This OS/2 Online Book and the related file AIFF2WAV.EXE are all copyright
 1995 by Jeff Glatt.  These files are freely redistributable, and may be used
 by and distributed along with any software, be it commercial or otherwise,
 provided that these files are not internally modified, nor specifically sold as
 a complete product by themselves.  The only price that you have to pay is
 the one that you're already paying by spending all of your time in front of a
 computer instead of developing healthier outlets.

 NOT SO STANDARD DISCLAIMER:

 These programs are provided "as is" without warranty of any kind either
 expressed or implied or tatooed in a place that only a few people have ever
 seen, including but not limited to the implied warranties of merchantability,
 fitness for a particular purpose, and the dubious assumption that the
 software has been created by a sane individual who would never do
 anything that may hurt you. The entire risk as to the results and
 performance of the programs is assumed by you or someone who looks
 exactly like you.  Jeff Glatt does not guarantee that the functions in these
 programs will meet your requirements, especially if your requirements
 involve lots of latex and some docile, domesticated animal.  Nor does Jeff
 Glatt warranty the programs to be uninterruptable or error-free, although
 mercifully free of "General Protection Faults".  If you use said programs, you
 can not say anything nasty about the author, even if the programs
 inadvertently cause the erasure of your collection of X-rated GIFs of a
 conservative, overweight and overrated TV "personality" plooking himself
 vigorously with his royalty checks from some rancid paperback.  Jeff Glatt is
 not responsible for any damages as a result of anything that he has done,
 or hasn't done, or was supposed to do but never got around to it, and
 furthermore, he doesn't even care so leave him alone, ratface.  You may
 have more or less protections in certain states of the union, depending
 upon how far your local politician is willing to bend over for some bribe
 from a business lobbyist.  Just remember that Jeff Glatt has no money, so
 don't bother suing him as a result of any damages caused by this OS/2
 program.  Tell your greasy lawyer to go after IBM, and make sure that you
 pick 12 really stupid pinheads for the jury.  If swallowed, induce vomiting
 immediately by contemplating the asthetics of Microsoft Windows.

 OS/2 is a trademark of International Business Machines Corporation.

 Windows is a trademark of Microsoft Incorporated, and furthermore, Bill
 Gates is to blame for it.

 If you have suggestions, comments, criticisms, and anything else other than
 dollar bills, then send them to someone else because you got it for free,
 and you know what you get for nothing?  But, if you do need to contact the
 author, then either phone some of the more prominent psychiatrict clinics in
 central New York state, or try this:

 Jeff Glatt
 6 Sycamore Drive East
 New Hartford, NY 13413
 (315) 735-5350


OPERATION

 Aiff2Wav is run from an OS/2 Command Prompt and has the following syntax:

 Aiff2Wav [/U /E] AIFF_filename [WAVE_filename]

 The items in brackets are optional.  Any, all, or none of these may be
 specified or omitted.	Options are preceded by a / character.	These can be
 placed anywhere (ie, after the source and destination filenames, inbetween
 the filenames, etc).  The destination WAVE_filename is optional, but if
 specified, it must be somewhere after the source (ie, AIFF_filename).

 The arguments are:

 AIFF_filename		  The name of the AIFF file (that Aiff2Wav is going to
			  convert).  If no filename is given, Aiff2Wav displays its
			  help template, and terminates.

 WAVE_filename		 WAVE_filename is the name of the new WAVE
			  file that you want Aiff2Wav to create.  This argument allows
			  you to choose a particular name for the resulting WAVE file.
			  If you don't supply WAVE_filename, then Aiff2Wav
			  creates a new name using the original file's name with
			  a .WAV extension (ie, any original extension is
			  stripped from the filename).

			  Note:  The WAVE_filename can't be the same as the
				 AIFF_filename (ie, Aiff2Wav must not overwrite
				 the original file) or the file may be destroyed
				 and the conversion ruined.

 /U			  Specify the /U option if the AIFF file has unsigned
			  waveform data.  (ie, For 8-bit, the lowest value is 0
			  and the highest is 255).  WAVE format requires data to
			  be signed.  (ie, For 8-bit, the lowest value is -128 and
			  the highest value is 127).  Some programs write AIFF
			  files with data in unsigned form.  Other programs use
			  signed form.	Unfortunately, there's no way to
			  determine which form was used by examing the AIFF
			  file.  (ie, This is a problem with the AIFF format due to
			  faulty interpretations of the original specification).
			  You'll have to make the determination whether you
			  need to use this option.  If a resulting WAVE
			  conversion file sounds distorted without using the /U
			  option, then try using /U and compare the sound of
			  another conversion.  One of the two versions will
			  definitely sound more distorted than the other.

 /E		      Enables MPC Enforcement.	If the AIFF waveform's
			  Sample Rate is not one of the 3 Windows MultiMedia
			  Rates of 11.025, 22.05, or 44.1 kHz sample rates, it is
			  set to the nearest such rate.  Note that Aiff2Wav
			  doesn't interpolate the data.  It just changes the
			  sample rate, so the waveform's pitch may end up
			  being transposed.  If MPC Enforce is off, then the
			  waveform's original sample rate is preserved.  If you
			  don't specify /E, Aiff2Wav does not alter the original
			  rate.

 Note:	It doesn't matter if you use lower or upper case on the options (ie, /E
	or /e).


ERRATA

 Aiff2Wav automatically strips any Macintosh binary header from the AIFF file.


ERRORS

 Here are the possible error messages that you may see.  Following each
 message is a description of likely causes for that error and possible
 remedies.

 When Aiff2Wav finally terminates, it returns an Error Result (ie, number) to
 the OS.  A 0 returned value indicates that the operation was a success.
 Non-zero values are errors.  Note that this is returned in the REXX special
 variable RC when calling Aiff2Wav from a REXX script.

Can't open XXX!

 Synopsis	An AIFF file, that you asked Aiff2Wav to convert, didn't open.  XXX
		     is the AIFF name that you supplied.

 Cause		The filename that you specified is incorrect.
 Cure		Check the filename that you entered.  Did you specify some
		directory and file that exists?

		Note:  Aiff2Wav does not support wildcards.

 Cause		Some other program has this filename currently in use, and is
		preventing Aiff2Wav from reading it.
 Cure		Make that other program close this filename.

 Result 	RC = -4


XXX is not an AIFF file!

 Synopsis	You tried to convert a file that isn't an AIFF file.  All AIFF files
		must begin with a certain header.  This one doesn't and so it
		isn't an AIFF file.  XXX is the AIFF filename that you supplied.

 Cause		The file is corrupt.
 Cure		Use my utility WAVECHK.EXE to check that the file is an
		uncorrupted AIFF file.	If corrupted, use a backup copy.

 Cause		The file is in some format other than an AIFF file.
 Cure		Use my utility WAVECHK.EXE to check that the file is indeed an
		AIFF file.  If not, use another file conversion program to convert
		this file to WAVE format.

 Result 	RC = -5


Bad AIFF file!

 Synopsis	While loading an AIFF file to be converted, an error was
		encountered.

 Cause		The file is corrupt.
 Cure		Use my utility WAVECHK.EXE to check that the file is an
		uncorrupted AIFF file.	If corrupted, use a backup copy.

 Result 	RC = -7


Can't create XXX!

 Synopsis	The new WAVE file, that you asked Aiff2Wav to create, didn't
		open.  XXX is the WAVE filename that you supplied.

 Cause		The filename that you specified is incorrect.
 Cure		Check the filename that you entered.  Did you specify some
		directory that doesn't exist?  Aiff2Wav only creates files; not
		new directories.

 Cause		Some other program has this filename currently in use, and is
		preventing Aiff2Wav from writing to it.
 Cure		Make that other program close this filename.

 Cause		The file exists, but although you agreed to overwrite it, it has
		its READONLY bit set, so Aiff2Wav can't overwrite it.
 Cure		Use OS/2's ATTRIB command to turn off the READONLY status
		of this file.

 Cause		You chose to save data upon some media that is
		write-protected.
 Cure		Remove the write-protection.

 Result 	RC = -6


Bad write to WAVE file!

 Synopsis	In saving a new WAVE file, Aiff2Wav encountered an error
		writing the data to the file.

 Cause		The media is full.
 Cure		Make sure that there is enough room on the media to contain
		the new WAVE file that Aiff2Wav creates.  Aiff2Wav doesn't
		predict required space before converting the data, so use your
		own judgment.

 Result 	RC = -8
