revert between 56095 -> 55830 in arch
[AROS.git] / workbench / devs / AHI / Toccata / toccata.h
blob92208f7b41d55bd1aa955650e961b78d75c84f1c
1 /*
2 toccata.library - AHI-based Toccata emulation library
3 Copyright (C) 1997-2005 Martin Blom <martin@blom.org> and Teemu Suikki.
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version.
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
15 You should have received a copy of the GNU Library General Public
16 License along with this library; if not, write to the
17 Free Software Foundation, Inc., 59 Temple Place - Suite 330, Cambridge,
18 MA 02139, USA.
22 #ifndef TOCCATAEMUL_H
23 #define TOCCATAEMUL_H
25 #include <exec/types.h>
26 #include <exec/libraries.h>
27 #include <exec/ports.h>
28 #include <libraries/toccata.h>
30 /* Force 32 bit results */
32 #define BOOL LONG
35 /* Arguments in registers */
37 #define ASM __asm
38 #define REG(x) register __ ## x
41 /* Definitions */
43 #define PLAYERFREQ 50
45 /* Structures */
47 struct toccataprefs {
48 UBYTE ID[8];
50 LONG MixAux1Left;
51 LONG MixAux1Right;
52 LONG MixAux2Left;
53 LONG MixAux2Right;
54 LONG InputVolumeLeft;
55 LONG InputVolumeRight;
56 LONG OutputVolumeLeft;
57 LONG OutputVolumeRight;
58 LONG LoopbackVolume;
59 ULONG Mode;
60 ULONG Frequency;
61 ULONG Input;
62 ULONG MicGain;
63 LONG CaptureIoPri;
64 LONG CaptureBufferPri;
65 ULONG CaptureBlockSize;
66 ULONG MaxCaptureBlocks;
67 LONG PlaybackIoPri;
68 LONG PlaybackBufferPri;
69 ULONG PlaybackBlockSize;
70 ULONG PlaybackStartBlocks;
71 ULONG PlaybackBlocks;
73 ULONG MonoMode;
74 ULONG StereoMode;
75 ULONG LineInput;
76 ULONG Aux1Input;
77 ULONG MicInput;
78 ULONG MicGainInput;
79 ULONG MixInput;
83 struct slavemessage {
84 struct Message Msg;
85 ULONG ID;
86 APTR Data;
90 /* ID codes */
92 #define MSG_MODE 1
93 #define MSG_HWPROP 2
94 #define MSG_RAWPLAY 3
95 #define MSG_PLAY 4
96 #define MSG_RECORD 5
97 #define MSG_STOP 6
98 #define MSG_PAUSE 7
99 #define MSG_LEVELON 8
100 #define MSG_LEVELOFF 9
103 /* Externals */
105 extern char __far _LibID[];
106 extern char __far _LibName[];
108 extern struct ToccataBase *ToccataBase;
109 extern struct Process *SlaveProcess;
110 extern BOOL SlaveInitialized;
111 extern struct AHIAudioCtrl *audioctrl;
112 extern struct toccataprefs tprefs;
113 extern const Fixed negboundaries[];
114 extern const Fixed posboundaries[];
116 extern ULONG error;
118 void kprintf(char *, ...);
120 ASM void puta4(void);
122 ASM void SlaveTaskEntry(void);
123 ASM void IOTaskEntry(void);
124 ASM void HookLoad(void);
125 ASM ULONG GetRawReply(REG(a0) struct ToccataBase *);
126 ASM RawReply(void);
128 void fillhardinfo(void);
130 #endif /* TOCCATAEMUL_H */