/*
 *               Copyright (C) 2006, BroadOn Communications Corp.
 *
 *  These coded instructions, statements, and computer programs contain
 *  unpublished  proprietary information of BroadOn Communications Corp.,
 *  and  are protected by Federal copyright law. They may not be disclosed
 *  to  third  parties or copied or duplicated in any form, in whole or in
 *  part, without the prior written consent of BroadOn Communications Corp.
 *
 */

#ifndef __AUDBUF_H__
#define __AUDBUF_H__

/* overflow policies */
#define AUDBUF_OVERFLOW_DISCARD_OLD  0
#define AUDBUF_OVERFLOW_DISCARD_NEW  1

/* audio open flags */
#define O_RDONLY  0x0
#define O_WRONLY  0x1
#define O_RDWR    0x2

/* audio read/write mode */
#define MONO    0
#define STEREO  1

IOSError audbufOpen(u8 flags, u32 config, u32 readSize, u8 *inbuf, u32 inbufSize, u32 inOverflowConfig, u8 *outbuf, u32 outbufSize, u32 outOverflowConfig);
int audbufGetVolumeMin(void);
int audbufGetVolumeMax(void);
int audbufGetVolumeMute(void);
IOSError audbufSetVolume(int vol);
IOSError audbufGetVolume();
IOSError audbufGetHeadset();
IOSError audbufWrite(char *buf, int size, int mode);
IOSError audbufRead(char *buf, int size, int mode, int block);
IOSError audbufClose();

#endif /* __AUDBUF_H__ */
