blob: 9e74a381e42495ee8b5484d1225de89d3b1ae5d4 [file] [log] [blame]
Franklin Weia855d622017-01-21 15:18:31 -05001/*
2Copyright (C) 1994-1995 Apogee Software, Ltd.
3
4This program is free software; you can redistribute it and/or
5modify it under the terms of the GNU General Public License
6as published by the Free Software Foundation; either version 2
7of the License, or (at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12
13See the GNU General Public License for more details.
14
15You should have received a copy of the GNU General Public License
16along with this program; if not, write to the Free Software
17Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18
19*/
20/**********************************************************************
21 module: FX_MAN.H
22
23 author: James R. Dose
24 date: March 17, 1994
25
26 Public header for FX_MAN.C
27
28 (c) Copyright 1994 James R. Dose. All Rights Reserved.
29**********************************************************************/
30
31#ifndef __FX_MAN_H
32#define __FX_MAN_H
33
34#include "sndcards.h"
Vencislav Atanasov183e45e2019-07-28 23:31:50 +030035#include <inttypes.h>
Franklin Weia855d622017-01-21 15:18:31 -050036
37typedef struct
38 {
39 int MaxVoices;
40 int MaxSampleBits;
41 int MaxChannels;
42 } fx_device;
43
44#define MonoFx 1
45#define StereoFx 2
46
47typedef struct
48 {
49 unsigned long Address;
50 unsigned long Type;
51 unsigned long Interrupt;
52 unsigned long Dma8;
53 unsigned long Dma16;
54 unsigned long Midi;
55 unsigned long Emu;
56 } fx_blaster_config;
57
58enum FX_ERRORS
59 {
60 FX_Warning = -2,
61 FX_Error = -1,
62 FX_Ok = 0,
63 FX_ASSVersion,
64 FX_BlasterError,
65 FX_SoundCardError,
66 FX_InvalidCard,
67 FX_MultiVocError,
68 FX_DPMI_Error
69 };
70
71enum fx_BLASTER_Types
72 {
73 fx_SB = 1,
74 fx_SBPro = 2,
75 fx_SB20 = 3,
76 fx_SBPro2 = 4,
77 fx_SB16 = 6
78 };
79
80
81char *FX_ErrorString( int ErrorNumber );
82int FX_SetupCard( int SoundCard, fx_device *device );
83int FX_GetBlasterSettings( fx_blaster_config *blaster );
84int FX_SetupSoundBlaster( fx_blaster_config blaster, int *MaxVoices, int *MaxSampleBits, int *MaxChannels );
85int FX_Init( int SoundCard, int numvoices, int numchannels, int samplebits, unsigned mixrate );
86int FX_Shutdown( void );
87int FX_SetCallBack( void ( *function )( int32_t ) );
88void FX_SetVolume( int volume );
89int FX_GetVolume( void );
90
91void FX_SetReverseStereo( int setting );
92int FX_GetReverseStereo( void );
93void FX_SetReverb( int reverb );
94void FX_SetFastReverb( int reverb );
95int FX_GetMaxReverbDelay( void );
96int FX_GetReverbDelay( void );
97void FX_SetReverbDelay( int delay );
98
99int FX_VoiceAvailable( int priority );
100int FX_EndLooping( int handle );
101int FX_SetPan( int handle, int vol, int left, int right );
102int FX_SetPitch( int handle, int pitchoffset );
103int FX_SetFrequency( int handle, int frequency );
104
105int FX_PlayVOC( uint8_t *ptr, int pitchoffset, int vol, int left, int right,
106 int priority, uint32_t callbackval );
107int FX_PlayLoopedVOC( uint8_t *ptr, int32_t loopstart, int32_t loopend,
108 int32_t pitchoffset, int32_t vol, int32_t left, int32_t right, int32_t priority,
109 uint32_t callbackval );
110int FX_PlayWAV( uint8_t *ptr, int pitchoffset, int vol, int left, int right,
111 int priority, uint32_t callbackval );
112int FX_PlayLoopedWAV( uint8_t *ptr, int32_t loopstart, int32_t loopend,
113 int32_t pitchoffset, int32_t vol, int32_t left, int32_t right, int32_t priority,
114 uint32_t callbackval );
115int FX_PlayVOC3D( uint8_t *ptr, int32_t pitchoffset, int32_t angle, int32_t distance,
116 int32_t priority, uint32_t callbackval );
117int FX_PlayWAV3D( uint8_t *ptr, int pitchoffset, int angle, int distance,
118 int priority, uint32_t callbackval );
119int FX_PlayRaw( uint8_t *ptr, uint32_t length, uint32_t rate,
120 int32_t pitchoffset, int32_t vol, int32_t left, int32_t right, int32_t priority,
121 uint32_t callbackval );
122int FX_PlayLoopedRaw( uint8_t *ptr, uint32_t length, char *loopstart,
123 char *loopend, uint32_t rate, int32_t pitchoffset, int32_t vol, int32_t left,
124 int32_t right, int32_t priority, uint32_t callbackval );
125int32_t FX_Pan3D( int handle, int angle, int distance );
126int32_t FX_SoundActive( int32_t handle );
127int32_t FX_SoundsPlaying( void );
128int32_t FX_StopSound( int handle );
129int32_t FX_StopAllSounds( void );
130int32_t FX_StartDemandFeedPlayback( void ( *function )( char **ptr, uint32_t *length ),
131 int32_t rate, int32_t pitchoffset, int32_t vol, int32_t left, int32_t right,
132 int32_t priority, uint32_t callbackval );
133int FX_StartRecording( int MixRate, void ( *function )( char *ptr, int length ) );
134void FX_StopRecord( void );
135
136#endif