// SFX.D
// Soundsystem related preferences & Class-Definitions
CLASS C_SNDSYS_CFG
{
	VAR FLOAT	volume;
	VAR INT		bitResolution;
	VAR INT		sampleRate;
	VAR INT		useStereo;
	VAR INT		numSFXChannels;
	VAR INT		reverbBufferSize;
	VAR FLOAT	reverbReflectionTime;
	VAR FLOAT	reverbDecayTime;
};

// Base Class
CLASS C_SFX
{
    VAR STRING      file;				// sfx filename
    VAR INT         pitchOff;			// pitchoffset in semitones
    VAR INT         pitchVar;			// semitone-variance
    VAR INT         vol;				// 0..1
    VAR INT         loop;				// 0/1
    VAR FLOAT       reverbLevel;		// 0..1
    VAR STRING	    pfxName;
};

// SFX Prototype with default parameters
PROTOTYPE C_SFX_DEF(C_SFX)
{
    file                    = "";
    pitchOff                = 0;
    pitchVar                = 0;
    vol                     = 100;   // 0..127
    loop                    = 0;	 // 0=off; 1=on
	reverbLevel				= 0.0;
};

INSTANCE sndSysConfig(C_SNDSYS_CFG)
{
	volume 				= 1;   		// 0..1
	bitResolution		= 16;		// 8 / 16
	sampleRate			= 22100;	// 11050 - 44100 prefered
	useStereo			= 0;		// 1 / 0
	numSFXChannels		= 16;		// 1 - 32
	reverbbuffersize	= 262144;
    reverbreflectiontime= 0.300000012;
    reverbdecaytime		= 1.;
};
