/* Automatically generated header! Do not edit! */

#ifndef _PPCPRAGMA_DBPLAYER_H
#define _PPCPRAGMA_DBPLAYER_H
#ifdef __GNUC__
#ifndef _PPCINLINE__DBPLAYER_H
#include <powerup/ppcinline/.h>
#endif
#else

#ifndef POWERUP_PPCLIB_INTERFACE_H
#include <powerup/ppclib/interface.h>
#endif

#ifndef POWERUP_GCCLIB_PROTOS_H
#include <powerup/gcclib/powerup_protos.h>
#endif

#ifndef NO_PPCINLINE_STDARG
#define NO_PPCINLINE_STDARG
#endif/* SAS C PPC inlines */

#ifndef DBPLAYER_BASE_NAME
#define DBPLAYER_BASE_NAME DBPlayerBase
#endif /* !DBPLAYER_BASE_NAME */

#define	DBM_CheckPosition(songpos, pattpos)	_DBM_CheckPosition(DBPLAYER_BASE_NAME, songpos, pattpos)

static __inline BOOL
_DBM_CheckPosition(void *DBPlayerBase, WORD songpos, WORD pattpos)
{
struct Caos	MyCaos;
	MyCaos.M68kCacheMode	=	IF_CACHEFLUSHALL;
//	MyCaos.M68kStart	=	NULL;
//	MyCaos.M68kSize		=	0;
	MyCaos.PPCCacheMode	=	IF_CACHEFLUSHALL;
//	MyCaos.PPCStart		=	NULL;
//	MyCaos.PPCSize		=	0;
	MyCaos.d0		=(ULONG) songpos;
	MyCaos.d1		=(ULONG) pattpos;
	MyCaos.caos_Un.Offset	=	(-54);
	MyCaos.a6		=(ULONG) DBPlayerBase;	
	return((BOOL)PPCCallOS(&MyCaos));
}

#define	DBM_Get7Command()	_DBM_Get7Command(DBPLAYER_BASE_NAME)

static __inline WORD
_DBM_Get7Command(void *DBPlayerBase)
{
struct Caos	MyCaos;
	MyCaos.M68kCacheMode	=	IF_CACHEFLUSHALL;
//	MyCaos.M68kStart	=	NULL;
//	MyCaos.M68kSize		=	0;
	MyCaos.PPCCacheMode	=	IF_CACHEFLUSHALL;
//	MyCaos.PPCStart		=	NULL;
//	MyCaos.PPCSize		=	0;
	MyCaos.caos_Un.Offset	=	(-60);
	MyCaos.a6		=(ULONG) DBPlayerBase;	
	return((WORD)PPCCallOS(&MyCaos));
}

#define	DBM_GetModuleAttrA(taglist)	_DBM_GetModuleAttrA(DBPLAYER_BASE_NAME, taglist)

static __inline VOID
_DBM_GetModuleAttrA(void *DBPlayerBase, struct TagItem *taglist)
{
struct Caos	MyCaos;
	MyCaos.M68kCacheMode	=	IF_CACHEFLUSHALL;
//	MyCaos.M68kStart	=	NULL;
//	MyCaos.M68kSize		=	0;
	MyCaos.PPCCacheMode	=	IF_CACHEFLUSHALL;
//	MyCaos.PPCStart		=	NULL;
//	MyCaos.PPCSize		=	0;
	MyCaos.a0		=(ULONG) taglist;
	MyCaos.caos_Un.Offset	=	(-66);
	MyCaos.a6		=(ULONG) DBPlayerBase;	
	PPCCallOS(&MyCaos);
}

#ifndef NO_PPCINLINE_STDARG
#define DBM_GetModuleAttr(tags...) \
	({ULONG _tags[] = { tags }; DBM_GetModuleAttrA((struct TagItem *)_tags);})
#endif /* !NO_PPCINLINE_STDARG */

#define	DBM_SetPosition(songpos, patternpos)	_DBM_SetPosition(DBPLAYER_BASE_NAME, songpos, patternpos)

static __inline VOID
_DBM_SetPosition(void *DBPlayerBase, UWORD songpos, UWORD patternpos)
{
struct Caos	MyCaos;
	MyCaos.M68kCacheMode	=	IF_CACHEFLUSHALL;
//	MyCaos.M68kStart	=	NULL;
//	MyCaos.M68kSize		=	0;
	MyCaos.PPCCacheMode	=	IF_CACHEFLUSHALL;
//	MyCaos.PPCStart		=	NULL;
//	MyCaos.PPCSize		=	0;
	MyCaos.d0		=(ULONG) songpos;
	MyCaos.d1		=(ULONG) patternpos;
	MyCaos.caos_Un.Offset	=	(-42);
	MyCaos.a6		=(ULONG) DBPlayerBase;	
	PPCCallOS(&MyCaos);
}

#define	DBM_SetVolume(volume)	_DBM_SetVolume(DBPLAYER_BASE_NAME, volume)

static __inline VOID
_DBM_SetVolume(void *DBPlayerBase, WORD volume)
{
struct Caos	MyCaos;
	MyCaos.M68kCacheMode	=	IF_CACHEFLUSHALL;
//	MyCaos.M68kStart	=	NULL;
//	MyCaos.M68kSize		=	0;
	MyCaos.PPCCacheMode	=	IF_CACHEFLUSHALL;
//	MyCaos.PPCStart		=	NULL;
//	MyCaos.PPCSize		=	0;
	MyCaos.d0		=(ULONG) volume;
	MyCaos.caos_Un.Offset	=	(-48);
	MyCaos.a6		=(ULONG) DBPlayerBase;	
	PPCCallOS(&MyCaos);
}

#define	DBM_StartModule(module, size, modeid, frequency, flags)	_DBM_StartModule(DBPLAYER_BASE_NAME, module, size, modeid, frequency, flags)

static __inline ULONG
_DBM_StartModule(void *DBPlayerBase, APTR module, ULONG size, ULONG modeid, ULONG frequency, ULONG flags)
{
struct Caos	MyCaos;
	MyCaos.M68kCacheMode	=	IF_CACHEFLUSHALL;
//	MyCaos.M68kStart	=	NULL;
//	MyCaos.M68kSize		=	0;
	MyCaos.PPCCacheMode	=	IF_CACHEFLUSHALL;
//	MyCaos.PPCStart		=	NULL;
//	MyCaos.PPCSize		=	0;
	MyCaos.a0		=(ULONG) module;
	MyCaos.d0		=(ULONG) size;
	MyCaos.d1		=(ULONG) modeid;
	MyCaos.d2		=(ULONG) frequency;
	MyCaos.d3		=(ULONG) flags;
	MyCaos.caos_Un.Offset	=	(-30);
	MyCaos.a6		=(ULONG) DBPlayerBase;	
	return((ULONG)PPCCallOS(&MyCaos));
}

#define	DBM_StopModule()	_DBM_StopModule(DBPLAYER_BASE_NAME)

static __inline VOID
_DBM_StopModule(void *DBPlayerBase)
{
struct Caos	MyCaos;
	MyCaos.M68kCacheMode	=	IF_CACHEFLUSHALL;
//	MyCaos.M68kStart	=	NULL;
//	MyCaos.M68kSize		=	0;
	MyCaos.PPCCacheMode	=	IF_CACHEFLUSHALL;
//	MyCaos.PPCStart		=	NULL;
//	MyCaos.PPCSize		=	0;
	MyCaos.caos_Un.Offset	=	(-36);
	MyCaos.a6		=(ULONG) DBPlayerBase;	
	PPCCallOS(&MyCaos);
}

#endif /* SASC Pragmas */
#endif /* !_PPCPRAGMA_DBPLAYER_H */
