#ifndef DAC_H
#define DAC_H

#define DAC_BUFFER_SIZE         5120	
#define DAC_HALF_BUFFER_SIZE    2560
#define DAC_FULL_VOLUME			2048

__attribute__((far)) 
extern short dataBuffer[DAC_BUFFER_SIZE];
extern volatile unsigned int dacDataPlay;
extern volatile unsigned int dacDataReady;
extern volatile unsigned int dacDataReadyPtr;
extern volatile unsigned int dacDataBufferSample;
extern volatile int dacVolume;
extern volatile int daciVolume;
extern volatile unsigned char dacVolumeLock;

void initDAC(void);
void startPlay(unsigned int, int);
void endPlay(void);
void continuePlay(void);

#endif
