1 #ifndef LIBRARIES_AHISUB_H
2 #define LIBRARIES_AHISUB_H
5 ** $VER: ahi_sub.h 6.0 (02.02.2005)
8 ** ahi/[driver].audio definitions
10 ** (C) Copyright 1994-2005 Martin Blom
11 ** All Rights Reserved.
15 /*****************************************************************************/
19 #include <exec/types.h>
22 #ifndef UTILITY_TAGITEM_H
23 #include <utility/tagitem.h>
27 #include <devices/ahi.h>
30 #ifndef IFF_IFFPARSE_H
31 #include <libraries/iffparse.h>
34 /*****************************************************************************/
39 struct AHIAudioCtrlDrv
41 struct AHIAudioCtrl ahiac_AudioCtrl
;
42 ULONG ahiac_Flags
; /* See below for definition */
43 struct Hook
*ahiac_SoundFunc
; /* AHIA_SoundFunc */
44 struct Hook
*ahiac_PlayerFunc
; /* AHIA_PlayerFunc */
45 Fixed ahiac_PlayerFreq
; /* AHIA_PlayerFreq */
46 Fixed ahiac_MinPlayerFreq
; /* AHIA_MinPlayerFreq */
47 Fixed ahiac_MaxPlayerFreq
; /* AHIA_MaxPlayerFreq */
48 ULONG ahiac_MixFreq
; /* AHIA_MixFreq */
49 UWORD ahiac_Channels
; /* AHIA_Channels */
50 UWORD ahiac_Sounds
; /* AHIA_Sounds */
52 APTR ahiac_DriverData
; /* Unused. Store whatever you want here. */
54 struct Hook
*ahiac_MixerFunc
; /* Mixing routine Hook */
55 struct Hook
*ahiac_SamplerFunc
; /* Sampler routine Hook */
57 ULONG ahiac_BuffSamples
; /* Samples to mix this pass. */
58 ULONG ahiac_MinBuffSamples
; /* Min. samples to mix each pass. */
59 ULONG ahiac_MaxBuffSamples
; /* Max. samples to mix each pass. */
60 ULONG ahiac_BuffSize
; /* Buffer size ahiac_MixerFunc needs. */
61 ULONG ahiac_BuffType
; /* Buffer format (V2) */
62 BOOL (*ahiac_PreTimer
)(void); /* Call before mixing (V4) */
63 void (*ahiac_PostTimer
)(void); /* Call after mixing (V4) */
64 ULONG ahiac_AntiClickSamples
; /* AntiClick samples (V6) */
65 struct Hook
*ahiac_PreTimerFunc
; /* A Hook wrapper for ahiac_PreTimer (V6) */
66 struct Hook
*ahiac_PostTimerFunc
; /* A Hook wrapper for ahiac_PostTimer (V6) */
68 /* The rest is PRIVATE! Hands off! They may change any time.
69 [lots of private stuff] */
74 #define AHIDB_UserBase (AHI_TagBase+500) /* Use for driver specific tags */
79 /* AHIsub_AllocAudio return flags */
80 #define AHISF_ERROR (1<<0)
81 #define AHISF_MIXING (1<<1)
82 #define AHISF_TIMING (1<<2)
83 #define AHISF_KNOWSTEREO (1<<3)
84 #define AHISF_KNOWHIFI (1<<4)
85 #define AHISF_CANRECORD (1<<5)
86 #define AHISF_CANPOSTPROCESS (1<<6)
87 #define AHISF_KNOWMULTICHANNEL (1<<7)
89 #define AHISB_ERROR (0)
90 #define AHISB_MIXING (1)
91 #define AHISB_TIMING (2)
92 #define AHISB_KNOWSTEREO (3)
93 #define AHISB_KNOWHIFI (4)
94 #define AHISB_CANRECORD (5)
95 #define AHISB_CANPOSTPROCESS (6)
96 #define AHISB_KNOWMULTICHANNEL (7)
98 /* AHIsub_Start() and AHIsub_Stop() flags */
99 #define AHISF_PLAY (1<<0)
100 #define AHISF_RECORD (1<<1)
102 #define AHISB_PLAY (0)
103 #define AHISB_RECORD (1)
106 #define AHIACF_VOL (1<<0)
107 #define AHIACF_PAN (1<<1)
108 #define AHIACF_STEREO (1<<2)
109 #define AHIACF_HIFI (1<<3)
110 #define AHIACF_PINGPONG (1<<4)
111 #define AHIACF_RECORD (1<<5)
112 #define AHIACF_MULTTAB (1<<6) /* Private! */
113 #define AHIACF_MULTICHANNEL (1<<7)
115 #define AHIACB_VOL (0)
116 #define AHIACB_PAN (1)
117 #define AHIACB_STEREO (2)
118 #define AHIACB_HIFI (3)
119 #define AHIACB_PINGPONG (4)
120 #define AHIACB_RECORD (5)
121 #define AHIACB_MULTTAB (6) /* Private! */
122 #define AHIACB_MULTICHANNEL (7)
124 /* AHIsub_Set#? and AHIsub_(Un)LoadSound return code */
125 #define AHIS_UNKNOWN (~0U)
127 /* IFF chunk names for the audio mode file */
128 #define ID_AHIM MAKE_ID('A','H','I','M') /* AHI Modes */
129 #define ID_AUDN MAKE_ID('A','U','D','N') /* AUDio driver Name */
130 #define ID_AUDD MAKE_ID('A','U','D','D') /* AUDio driver Data */
131 #define ID_AUDM MAKE_ID('A','U','D','M') /* AUDio Mode */
133 #endif /* LIBRARIES_AHISUB_H */