#ifndef MPBUF_H
#define MPBUG_H

// constants for BUF_GetState()
//
#define BUF_STOPPED        0
#define BUF_STOPPING       1
#define BUF_PLAYING        2
#define BUF_STALLED        3

// constants for BUF_Lock()
//
#define BUF_FROMWRITEPOS  -1

extern long      BUF_GetSize();
extern long      BUF_GetCount();
extern long      BUF_GetFreeBytes();
extern void      BUF_GetPositions(long *playpos, long *writepos);
extern int       BUF_GetState();
extern void      BUF_SetThreshold(long threshold);

extern void      BUF_Lock(long offset, long length,
                          char **buf1, long *len1,
                          char **buf2, long *len2 );
extern void      BUF_Unlock(long bytesWritten);
extern unsigned  BUF_Write(char *src, unsigned length);

extern void      BUF_Play();
extern void      BUF_Stop();
extern void      BUF_Flush();
extern void      BUF_Clear();

extern long      BUF_Init(long minsize, long maxsize);
extern void      BUF_Done();

#endif
