/* SampleConsts.h */
/*****************************************************************************/
/*                                                                           */
/*    Out Of Phase:  Digital Music Synthesis on General Purpose Computers    */
/*    Copyright (C) 1994  Thomas R. Lawrence                                 */
/*                                                                           */
/*    This program is free software; you can redistribute it and/or modify   */
/*    it under the terms of the GNU General Public License as published by   */
/*    the Free Software Foundation; either version 2 of the License, or      */
/*    (at your option) any later version.                                    */
/*                                                                           */
/*    This program is distributed in the hope that it will be useful,        */
/*    but WITHOUT ANY WARRANTY; without even the implied warranty of         */
/*    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          */
/*    GNU General Public License for more details.                           */
/*                                                                           */
/*    You should have received a copy of the GNU General Public License      */
/*    along with this program; if not, write to the Free Software            */
/*    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.              */
/*                                                                           */
/*    Thomas R. Lawrence can be reached at tomlaw@world.std.com.             */
/*                                                                           */
/*****************************************************************************/

#ifndef Included_SampleConsts_h
#define Included_SampleConsts_h

/* SampleConsts module depends on */
/* MiscInfo.h */
/* Audit */
/* Debug */
/* Definitions */

/* this type specifies values for knowing how many bits there are in a sample */
typedef enum {eSample8bit EXECUTE(= -1934), eSample16bit} NumBitsType;

/* this type specifies mono and stereo samples */
typedef enum {eSampleMono EXECUTE(= -6131), eSampleStereo} NumChannelsType;

/* this type provides specifiers for selecting a channel */
typedef enum {eLeftChannel EXECUTE(= 18324), eRightChannel, eMonoChannel} ChannelType;

/* these values specify limits on sample values for 8 and 16 bit samples */
#define MAX8BIT (127)
#define MIN8BIT (-MAX8BIT)
#define MAX16BIT (32767)
#define MIN16BIT (-MAX16BIT)

/* these define some arbitrary (but hopefully reasonable) limits on various */
/* attributes for samples */
#define MINSAMPLINGRATE (100)
#define MAXSAMPLINGRATE (192000)
#define MINNATURALFREQ (0.01)
#define MAXNATURALFREQ (1e6)

/* this type specifies errors that can be returned from routines that try */
/* to get fixed-point arrays in the expression evaluator. */
typedef enum
	{
		eEvalSampleNoError EXECUTE(= -31251),
		eEvalSampleUndefined,
		eEvalSampleWrongChannel,
		eEvalSampleNotEnoughMemoryToCopy
	} SampleErrors;

#endif
