/* $Filename:       WormWars/Source/sfx.h $
 * $VER:            WormWars 4.0 (1.11.98) $
 * $Description:    Header file for sfx.c $
 *
 * © Copyright 1993-1998 James R. Jacobs of Amigan Software.
 * Freely distributable.
 *
 * Release version.

#INCLUDES -------------------------------------------------------------- */

#include <exec/types.h>
#include <exec/memory.h>
#include <devices/audio.h>
#include <dos/dos.h>
#include <libraries/iffparse.h>

#include <stdio.h>

#include "ww.h"

// #DEFINES ---------------------------------------------------------------

#define ID_8SVX					MAKE_ID('8','S','V','X')
#define ID_BODY					MAKE_ID('B','O','D','Y')
#define ID_VHDR					MAKE_ID('V','H','D','R')
#define Unity 0x10000L			// Unity = Fixed 1.0 = maximum volume

#define PALCLOCK				3546895L
#define VOLUME					63

// PUBLIC STRUCTURES -----------------------------------------------------

struct Chunk
{	LONG ckID;
	LONG ckSize;
	LONG ckType;
	void* ckData;
	struct Chunk* ckNext;
};

// TYPEDEFS ---------------------------------------------------------------

typedef LONG Fixed;				/* A fixed-point value, 16 bits to the left
								of the point and 16 to the right. A Fixed
								is a number of 2**16ths, ie. 65536ths. */
typedef struct {
	ULONG oneShotHiSamples,		// # samples in the high octave 1-shot part
		repeatHiSamples,		// # samples in the high octave repeat part
		samplesPerHiCycle;		// # samples/cycle in high octave, else 0
	UWORD samplesPerSec;		// data sampling rate
	UBYTE ctOctave,				// # of octaves of waveforms
		sCompression;			// data compression technique used
	Fixed volume;				/* playback nominal volume from 0 to Unity
								(full volume). Map this value into the
								output hardware's dynamic range (0-64). */
} Voice8Header;

// Must have blank line at EOF.
