tools/adflib: build only host variant which is used by Sam440 target
[AROS.git] / workbench / devs / AHI / Drivers / EMU10kx / voicemgr.h
blobf17d885cc96888fe2bca3cd76b1650b73cddcccc
1 /*
2 **********************************************************************
3 * sblive_voice.h -- EMU Voice Resource Manager header file
4 * Copyright 1999, 2000 Creative Labs, Inc.
6 **********************************************************************
8 * Date Author Summary of changes
9 * ---- ------ ------------------
10 * October 20, 1999 Bertrand Lee base code release
12 **********************************************************************
14 * This program is free software; you can redistribute it and/or
15 * modify it under the terms of the GNU General Public License as
16 * published by the Free Software Foundation; either version 2 of
17 * the License, or (at your option) any later version.
19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
24 * You should have received a copy of the GNU General Public
25 * License along with this program; if not, write to the Free
26 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
27 * USA.
29 **********************************************************************
32 #ifndef _VOICEMGR_H
33 #define _VOICEMGR_H
35 #include "hwaccess.h"
37 /* struct emu_voice.usage flags */
38 #define VOICE_USAGE_FREE 0x01
39 #define VOICE_USAGE_MIDI 0x02
40 #define VOICE_USAGE_PLAYBACK 0x04
42 /* struct emu_voice.flags flags */
43 #define VOICE_FLAGS_STEREO 0x02
44 #define VOICE_FLAGS_16BIT 0x04
46 struct voice_param
48 /* FX bus amount send */
50 u32 send_routing;
51 // audigy only:
52 u32 send_routing2;
54 u32 send_dcba;
55 // audigy only:
56 u32 send_hgfe;
59 u32 initial_fc;
60 u32 fc_target;
62 u32 initial_attn;
63 u32 volume_target;
65 u32 byampl_env_sustain;
66 u32 byampl_env_decay;
69 struct voice_mem {
70 int emupageindex;
71 #ifdef AHI
72 void *addr;
73 dma_addr_t dma_handle;
74 #else
75 void *addr[BUFMAXPAGES];
76 dma_addr_t dma_handle[BUFMAXPAGES];
77 #endif
78 u32 pages;
81 struct emu_voice
83 struct emu10k1_card *card;
84 u8 usage; /* Free, MIDI, playback */
85 u8 num; /* Voice ID */
86 u8 flags; /* Stereo/mono, 8/16 bit */
88 u32 startloop;
89 u32 endloop;
90 u32 start;
92 u32 initial_pitch;
93 u32 pitch_target;
95 struct voice_param params[2];
97 struct voice_mem mem;
100 int emu10k1_voice_alloc_buffer(struct emu10k1_card *, struct voice_mem *, u32);
101 void emu10k1_voice_free_buffer(struct emu10k1_card *, struct voice_mem *);
102 int emu10k1_voice_alloc(struct emu10k1_card *, struct emu_voice *);
103 void emu10k1_voice_free(struct emu_voice *);
104 void emu10k1_voice_playback_setup(struct emu_voice *);
105 void emu10k1_voices_start(struct emu_voice *, unsigned int, int);
106 void emu10k1_voices_stop(struct emu_voice *, int);
108 #endif /* _VOICEMGR_H */