FX_MAN.H 4.5 KB

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