/*------------ Telecommunications & Signal Processing Lab --------------
                         McGill University

Routine:
  AFmsg.h

Description:
  Message texts for the TSP audio file routines.

Author / revision:
  P. Kabal  Copyright (C) 1999
  $Revision: 1.24 $  $Date: 1999/06/14 14:22:12 $

----------------------------------------------------------------------*/

#ifndef AFmsg_h_
#define AFmsg_h_

/* File parameter printout formats */
#define AFM_Headerless	"Headerless audio file"
#define AFMF_File	" %s:"
#define AFMF_Date	"  %.30s\n"
#define AFMF_Desc	"   Description: %s\n"
#define AFMF_Duration	" (%.4g s)"
#define AFMF_Format     " (%s)\n"
#define AFMF_Name	" %s\n"
#define AFMF_NumFrame	"   Number of frames  : %ld"
#define AFMF_NumSampUnk	"   Number of samples : <unknown>"
#define AFMF_NumSamp	"   Number of samples : %ld"
#define AFMF_SFreq	"   Sampling frequency: %.6g Hz\n"
#define AFMF_NumChan	"   Number of channels: %ld"

/* Error message text */

/* Warning messages for parameter setting routines */
/* AFsetFileType
   AFsetHinfo
   AFsetNHpar
*/
#define AFM_BadFormat	"Invalid format keyword"
#define AFM_BadFType	"Invalid file type"
/*      AFM_BadNChan */
#define AFM_BadSFactor	"Invalid scale factor"
#define AFM_BadSFreq	"Invalid sampling frequency"
#define AFM_BadStart	"Invalid start value"
#define AFM_BadSwap	"Invalid swap keyword"
#define AFM_LongInfo	"Information string too long"
#define AFM_TooManyPar	"Too many parameters"

/* Input audio file: Error messages */
#define AFM_BadDLen	"Invalid data length"
#define AFM_BadHeadLen	"Invalid header length"
#define AFM_BadNChan	"Invalid number of channels"
#define AFM_BadNSamp	"Invalid number of samples"
#define AFM_DataErr	"Data format error"
#define AFM_ErrDLen	"Error, data length greater than file length"
#define AFM_NoNSamp	"Unable to determine number of samples"
#define AFM_OpenRErr	"Error opening input audio file"
#define AFM_RAuto	"Input audio file must be random access for \"auto\""
#define AFM_RRAccess	"Input audio file must be random access"
#define AFM_UnkFType	"Unknown audio file type"
#define AFM_UnsupFType	"Unsupported audio file type"

/* Output audio file: Error messages */
#define AFM_BadDataC	"Invalid data format code"
#define AFM_BadFTypeC	"Invalid output audio file type code"
/*      AFM_BadNChan */
#define AFM_BadNFrame	"Invalid number of sample frames"
#define AFM_NoFType	"No output file type specified"
#define AFM_OpenWErr	"Error opening output audio file"

/* I/O errors */
#define AFM_FilePosErr	"File positioning error"
#define AFM_LongLine	"Input line too long"
#define AFM_NoFilePos	"Cannot determine file position"
#define AFM_MoveBack	"Cannot move back in file; File must be random access"
#define AFM_ReadErr	"Read error"
#define AFM_ReadErrOffs	"Error while reading, sample offset:"
#define AFM_ReopenErr	"Cannot reopen file as text file"
#define AFM_UEoF	"Unexpected end-of-file"
#define AFM_UEoFOffs	"Unexpected end-of-file, sample offset:"
#define AFM_UpdHeadErr	"Error updating file header"	
#define AFM_WriteErr	"Write error"

/* Warning messages */
#define AFM_BadSRate	"Invalid \"sample_rate\" record"
#define AFM_FixDLen	"Fixup, data length greater than file length"
#define AFM_LowDLen	"Fixup, data length less than file length"
#define AFM_MisSRate	"Sampling frequency / \"sample_rate\" record mismatch"
#define AFM_NPSFreq	"Non-positive sampling frequency"
#define AFM_NSampNChan	"No. samples not a multiple of no. channels"
#define AFM_NoRBinMode	"Cannot set input to binary mode"
#define AFM_NoRTextMode	"Cannot set input to text mode"
#define AFM_NoWBinMode	"Cannot set output to binary mode"
#define AFM_NoWTextMode	"Cannot set output to text mode"
#define AFM_NonIntNSamp	"Non-integer number of samples"
#define AFM_OClip	"Output data clipped"
#define AFM_TruncInfo	"Header information string too long, truncated"

/* Informational message formats */
#define AFMF_BadSFreq	"%s Invalid sampling frequency: \"%g\"; using %g"
#define AFMF_NSampNChan	"%s %ld samples; %ld channels"
#define AFMF_NClip	"%s %ld data values clipped"

/* Error/warning messages for different audio file types */
#define AFM_AIFF_BadHead "Invalid AIFF/AIFF-C file header"
#define AFM_AIFF_BadId	"Invalid AIFF/AIFF-C file identifier"
#define AFM_AIFF_BadVer	"AIFF/AIFF-C file: Unrecognized version number"
#define AFM_AIFF_FixCOMM "AIFF/AIFF-C file: Fixup for invalid COMM chunk size"
#define AFM_AIFF_FixFORM "AIFF/AIFF-C file: Fixup for invalid FORM chunk size"
#define AFM_AIFF_NoIEEE	AFM_AU_NoIEEE
#define AFM_AIFF_NoSSND	"AIFF/AIFF-C file: Missing SSND chunk"
#define AFM_AIFF_UnsComp "AIFF-C file: Unsupported compression type"
#define AFM_AIFF_UnsData "AIFF-C file: Unsupported data format"
#define AFM_AIFF_UnsSSize "AIFF/AIFF-C file: Unsupported sample size"
#define AFM_AIFF_WRAccess "AIFF-C file: Output file must be random access"

#define AFM_AU_BadId	"Invalid AU audio file identifier"
#define AFM_AU_BadSRate	"AU audio file: Invalid AFsp sample_rate record"
#define AFM_AU_NoIEEE	"Host does not use IEEE float format"
#define AFM_AU_UnsData	"AU audio file: Unsupported data format"

#define AFM_BL_BadId	"Invalid SPPACK file identifier"
#define AFM_BL_UnsComp	"SPPACK file: Unsupported companding option"
#define AFM_BL_UnsData	"SPPACK file: Unsupported data format"
#define AFM_BL_UnsDomain "SPPACK file: Unsupported domain"
#define AFM_BL_UnsWLen	"SPPACK file: Unsupported data word length"

#define AFM_ES_BadId	"Invalid ESPS file identifier"
#define AFM_ES_IdMatch	"ESPS file: Identifier values do not match"
#define AFM_ES_NoSFreq	"ESPS file: Missing sampling frequency"
#define AFM_ES_UnsData	"ESPS file: Unsupported data format"
#define AFM_ES_UnsEncod	"ESPS file: Unsupported data encoding"
#define AFM_ES_UnsFea	"ESPS file: Unsupported feature file subtype"
#define AFM_ES_UnsType	"ESPS file: Unsupported file type code"

#define AFM_NH_InvSwap	"Headerless file: Invalid data format"
#define AFM_NH_NoFormat	"Headerless file: Data format not specified"

#define AFM_INRS_BadId	"Invalid INRS-Telecom file identifier"

#define AFM_SF_BadId	"Invalid IRCAM soundfile identifier"
#define AFM_SF_MisFloat	"Host and file floating-point formats may differ"
#define AFM_SF_UnsData	"IRCAM soundfile: Unsupported data format"

#define AFM_SP_BadId	"Invalid NIST SPHERE audio file identifier"
#define AFM_SP_BadHLen	"NIST SPHERE audio file: Invalid header length"
#define AFM_SP_NoInter	"NIST SPHERE audio file: Channels may not be interleaved"
#define AFM_SP_UnsByte	"NIST SPHERE audio file: Unsupported byte format"
#define AFM_SP_UnsData	"NIST SPHERE audio file: Unsupported data format"
#define AFM_SP_UnsMulaw	"NIST SPHERE audio file: Unsupported mu-law word length"
#define AFM_SP_UnsPCM	"NIST SPHERE audio file: Unsupported pcm word length"
#define AFM_SP_UnsRes	"NIST SPHERE audio file: Unsupported data resolution"

#define AFMF_SP_NoMatch	"%s No \"%s\" record in NIST SPHERE audio file header"
#define AFMF_SP_BadField \
	"%s NIST SPHERE audio file: Invalid field in \"%s\" record"

#define AFM_SW_AscCmplx	"Comdisco SPW Signal file: Complex ASCII data not supported"
#define AFM_SW_BadId	"Invalid SPW Signal file identifier"
#define AFM_SW_BadNSamp	"SPW Signal file: Invalid number of samples"
#define AFM_SW_BadSFreq	"SPW Signal file: Invalid sampling frequency"
#define AFM_SW_BadSTime	"SPW Signal file: Invalid starting time"
#define AFM_SW_LongHead	"SPW Signal file: Header too long"
#define AFM_SW_NZSTime	"SPW Signal file: Non-zero starting time"
#define AFM_SW_NoData	"SPW Signal file: Data type not specified"
#define AFM_SW_NoSFreq	"SPW Signal file: Sampling frequency not specified"
#define AFM_SW_UnkCOM	"SPW Signal file: Unknown COMMON_INFO field"
#define AFM_SW_UnkKey	"SPW Signal file: Unknown keyword"
#define AFM_SW_UnkSys	"SPW Signal file: Unknown system type"
#define AFM_SW_UnsCmplx	"SPW Signal file: Unsupported complex format"
#define AFM_SW_UnsData	"SPW Signal file: Unsupported data type"
#define AFM_SW_UnsDInfo	"SPW Signal file: Unsupported DATA_INFO record"
#define AFM_SW_UnsFixP	"SPW Signal file: Unsupported fixed point format"

#define AFM_TA_BadId	"Invalid Text file identifier"
#define AFM_TA_LongHead	"Text file: Header too long"
#define AFM_TA_NoNSamp	"Text file: Missing sampling frequency"

#define AFM_WV_BadHead	"Invalid RIFF WAVE file header"
#define AFM_WV_BadAlaw	"RIFF WAVE file: Invalid A-law data size"
#define AFM_WV_BadFloat	"RIFF WAVE file: Invalid float data size"
#define AFM_WV_BadHeader "Malformed RIFF WAVE file header"
#define AFM_WV_BadId	"Invalid RIFF WAVE file identifier"
#define AFM_WV_BadMulaw	"RIFF WAVE file: Invalid mu-law data size"
#define AFM_WV_BadPCM	"RIFF WAVE file: Invalid PCM fmt chunk size"
#define AFM_WV_BadRIFF	"RIFF WAVE file: Invalid RIFF chunk size"
#define AFM_WV_FixRIFF	"RIFF WAVE file: Fixup for invalid RIFF chunk size"
#define AFM_WV_MisNBytes "RIFF WAVE file: Mismatched sample size"
#define AFM_WV_NoIEEE	AFM_AU_NoIEEE
#define AFM_WV_UnsDSize	"RIFF WAVE file: Unsupported PCM data size"
#define AFM_WV_UnsData	"RIFF WAVE file: Unsupported data format"
#define AFM_WV_WRAccess	"RIFF WAVE file: Output file must be random access"

#endif	/* AFmsg_h_ */
