Franklin Wei | a855d62 | 2017-01-21 15:18:31 -0500 | [diff] [blame] | 1 | /* |
| 2 | Copyright (C) 1994-1995 Apogee Software, Ltd. |
| 3 | |
| 4 | This program is free software; you can redistribute it and/or |
| 5 | modify it under the terms of the GNU General Public License |
| 6 | as published by the Free Software Foundation; either version 2 |
| 7 | of the License, or (at your option) any later version. |
| 8 | |
| 9 | This program is distributed in the hope that it will be useful, |
| 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| 12 | |
| 13 | See the GNU General Public License for more details. |
| 14 | |
| 15 | You should have received a copy of the GNU General Public License |
| 16 | along with this program; if not, write to the Free Software |
| 17 | Foundation, 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 Atanasov | 183e45e | 2019-07-28 23:31:50 +0300 | [diff] [blame^] | 35 | #include <inttypes.h> |
Franklin Wei | a855d62 | 2017-01-21 15:18:31 -0500 | [diff] [blame] | 36 | |
| 37 | typedef struct |
| 38 | { |
| 39 | int MaxVoices; |
| 40 | int MaxSampleBits; |
| 41 | int MaxChannels; |
| 42 | } fx_device; |
| 43 | |
| 44 | #define MonoFx 1 |
| 45 | #define StereoFx 2 |
| 46 | |
| 47 | typedef 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 | |
| 58 | enum 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 | |
| 71 | enum 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 | |
| 81 | char *FX_ErrorString( int ErrorNumber ); |
| 82 | int FX_SetupCard( int SoundCard, fx_device *device ); |
| 83 | int FX_GetBlasterSettings( fx_blaster_config *blaster ); |
| 84 | int FX_SetupSoundBlaster( fx_blaster_config blaster, int *MaxVoices, int *MaxSampleBits, int *MaxChannels ); |
| 85 | int FX_Init( int SoundCard, int numvoices, int numchannels, int samplebits, unsigned mixrate ); |
| 86 | int FX_Shutdown( void ); |
| 87 | int FX_SetCallBack( void ( *function )( int32_t ) ); |
| 88 | void FX_SetVolume( int volume ); |
| 89 | int FX_GetVolume( void ); |
| 90 | |
| 91 | void FX_SetReverseStereo( int setting ); |
| 92 | int FX_GetReverseStereo( void ); |
| 93 | void FX_SetReverb( int reverb ); |
| 94 | void FX_SetFastReverb( int reverb ); |
| 95 | int FX_GetMaxReverbDelay( void ); |
| 96 | int FX_GetReverbDelay( void ); |
| 97 | void FX_SetReverbDelay( int delay ); |
| 98 | |
| 99 | int FX_VoiceAvailable( int priority ); |
| 100 | int FX_EndLooping( int handle ); |
| 101 | int FX_SetPan( int handle, int vol, int left, int right ); |
| 102 | int FX_SetPitch( int handle, int pitchoffset ); |
| 103 | int FX_SetFrequency( int handle, int frequency ); |
| 104 | |
| 105 | int FX_PlayVOC( uint8_t *ptr, int pitchoffset, int vol, int left, int right, |
| 106 | int priority, uint32_t callbackval ); |
| 107 | int 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 ); |
| 110 | int FX_PlayWAV( uint8_t *ptr, int pitchoffset, int vol, int left, int right, |
| 111 | int priority, uint32_t callbackval ); |
| 112 | int 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 ); |
| 115 | int FX_PlayVOC3D( uint8_t *ptr, int32_t pitchoffset, int32_t angle, int32_t distance, |
| 116 | int32_t priority, uint32_t callbackval ); |
| 117 | int FX_PlayWAV3D( uint8_t *ptr, int pitchoffset, int angle, int distance, |
| 118 | int priority, uint32_t callbackval ); |
| 119 | int 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 ); |
| 122 | int 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 ); |
| 125 | int32_t FX_Pan3D( int handle, int angle, int distance ); |
| 126 | int32_t FX_SoundActive( int32_t handle ); |
| 127 | int32_t FX_SoundsPlaying( void ); |
| 128 | int32_t FX_StopSound( int handle ); |
| 129 | int32_t FX_StopAllSounds( void ); |
| 130 | int32_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 ); |
| 133 | int FX_StartRecording( int MixRate, void ( *function )( char *ptr, int length ) ); |
| 134 | void FX_StopRecord( void ); |
| 135 | |
| 136 | #endif |