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