/* WaveTableStorageDisplay.h */

#ifndef Included_WaveTableStorageDisplay_h
#define Included_WaveTableStorageDisplay_h

/* WaveTableStorageDisplay module depends on */
/* MiscInfo.h */
/* Audit */
/* Debug */
/* Definitions */
/* SampleConsts */
/* FixedPoint */
/* Array */
/* Memory */
/* DataMunging */

#include "SampleConsts.h"
#include "FixedPoint.h"

struct WaveTableStorDispRec;
typedef struct WaveTableStorDispRec WaveTableStorDispRec;

/* create a new, empty wave table storage display object */
WaveTableStorDispRec*		NewWaveTableStorDisp(NumBitsType NumBits, long NumFrames);

/* dispose of the wave table storage object */
void										DisposeWaveTableStorDisp(WaveTableStorDispRec* StorDisp);

/* get the number of frames per table */
long										WaveTableStorDispNumFramesPerTable(WaveTableStorDispRec* StorDisp);

/* get the number of tables */
long										WaveTableStorDispNumTables(WaveTableStorDispRec* StorDisp);

/* get the number of bits for the wave table */
NumBitsType							WaveTableStorDispNumBits(WaveTableStorDispRec* StorDisp);

/* change the number of bits for the wave table */
void										SetWaveTableStorDispNumBits(WaveTableStorDispRec* StorDisp,
													NumBitsType NewNumBits);

/* get a reference to a table.  this is NOT copied, and there is no type information. */
/* The last element is a repeat of the first, and is provided for making anti-aliasing */
/* more efficient. */
largefixedsigned*				WaveTableStorDispGetTable(WaveTableStorDispRec* StorDisp,
													long Index);

/* append a new (zeroed out) table to the end of the array */
MyBoolean								WaveTableStorDispAppendEntry(WaveTableStorDispRec* StorDisp);

/* put a value into a frame in a table */
void										WaveTableStorDispSetFrame(WaveTableStorDispRec* StorDisp,
													long TableIndex, long FrameIndex, largefixedsigned Value);

/* get a value from a frame in a table */
largefixedsigned				WaveTableStorDispGetFrame(WaveTableStorDispRec* StorDisp,
													long TableIndex, long FrameIndex);

/* make a duplicate of the wave table */
WaveTableStorDispRec*		WaveTableStorDispDuplicate(WaveTableStorDispRec* Original);

#endif
