/* proto/ahi_sub.h - minimal stub for building an AHI sub-library driver.
 *
 * In a normal AmigaOS build, proto/ahi_sub.h provides library-call inlines.
 * Here we just forward-declare the internal _AHIsub_* functions and provide
 * convenience macros for the one internal call drivers make (AHIsub_Stop in
 * _AHIsub_Start to kill any already-running playback before restarting).
 *
 * AHIsubBase must be in scope as a struct DriverBase* local variable.
 */

#ifndef PROTO_AHISUB_H
#define PROTO_AHISUB_H

#include <exec/types.h>
#include <utility/tagitem.h>
#include <libraries/ahi_sub.h>

struct DriverBase;

/* Forward declarations for the internal driver functions */
ULONG _AHIsub_AllocAudio(struct TagItem *tagList, struct AHIAudioCtrlDrv *AudioCtrl, struct DriverBase *AHIsubBase);
void  _AHIsub_FreeAudio(struct AHIAudioCtrlDrv *AudioCtrl, struct DriverBase *AHIsubBase);
void  _AHIsub_Disable(struct AHIAudioCtrlDrv *AudioCtrl, struct DriverBase *AHIsubBase);
void  _AHIsub_Enable(struct AHIAudioCtrlDrv *AudioCtrl, struct DriverBase *AHIsubBase);
ULONG _AHIsub_Start(ULONG Flags, struct AHIAudioCtrlDrv *AudioCtrl, struct DriverBase *AHIsubBase);
void  _AHIsub_Update(ULONG Flags, struct AHIAudioCtrlDrv *AudioCtrl, struct DriverBase *AHIsubBase);
void  _AHIsub_Stop(ULONG Flags, struct AHIAudioCtrlDrv *AudioCtrl, struct DriverBase *AHIsubBase);
LONG  _AHIsub_GetAttr(ULONG Attribute, LONG Argument, LONG DefValue, struct TagItem *tagList, struct AHIAudioCtrlDrv *AudioCtrl, struct DriverBase *AHIsubBase);
ULONG _AHIsub_HardwareControl(ULONG Attribute, LONG Argument, struct AHIAudioCtrlDrv *AudioCtrl, struct DriverBase *AHIsubBase);

/* AHIsub_Stop() - used by _AHIsub_Start to stop any prior playback */
//#define AHIsub_Stop(flags, ctrl) _AHIsub_Stop((flags), (ctrl), AHIsubBase)

#endif /* PROTO_AHISUB_H */
