home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 5_2007-2008.ISO / data / Zips / Mod_Player20330311252006.psc / fmod.bas < prev   
BASIC Source File  |  2006-11-19  |  70KB  |  871 lines

  1. Attribute VB_Name = "FMod"
  2. Option Explicit
  3.  
  4. '
  5. 'FMOD VB6 Module
  6. '
  7.  
  8. Public Const FMOD_VERSION = 3.75
  9.  
  10. '************
  11. '* Enums
  12. '************
  13.  
  14.  
  15. ' FMOD_ERRORS
  16. ' On failure of commands in FMOD, use FSOUND_GetError to attain what happened.
  17. '
  18. Public Enum FMOD_ERRORS
  19.     FMOD_ERR_NONE             ' No errors
  20.     FMOD_ERR_BUSY             ' Cannot call this command after FSOUND_Init.  Call FSOUND_Close first.
  21.     FMOD_ERR_UNINITIALIZED    ' This command failed because FSOUND_Init was not called
  22.     FMOD_ERR_INIT             ' Error initializing output device.
  23.     FMOD_ERR_ALLOCATED        ' Error initializing output device, but more specifically, the output device is already in use and cannot be reused.
  24.     FMOD_ERR_PLAY             ' Playing the sound failed.
  25.     FMOD_ERR_OUTPUT_FORMAT    ' Soundcard does not support the features needed for this soundsystem (16bit stereo output)
  26.     FMOD_ERR_COOPERATIVELEVEL ' Error setting cooperative level for hardware.
  27.     FMOD_ERR_CREATEBUFFER     ' Error creating hardware sound buffer.
  28.     FMOD_ERR_FILE_NOTFOUND    ' File not found
  29.     FMOD_ERR_FILE_FORMAT      ' Unknown file format
  30.     FMOD_ERR_FILE_BAD         ' Error loading file
  31.     FMOD_ERR_MEMORY           ' Not enough memory
  32.     FMOD_ERR_VERSION          ' The version number of this file format is not supported
  33.     FMOD_ERR_INVALID_PARAM    ' An invalid parameter was passed to this function
  34.     FMOD_ERR_NO_EAX           ' Tried to use an EAX command on a non EAX enabled channel or output.
  35.     FMOD_ERR_CHANNEL_ALLOC    ' Failed to allocate a new channel
  36.     FMOD_ERR_RECORD           ' Recording is not supported on this machine
  37.     FMOD_ERR_MEDIAPLAYER      ' Windows Media Player not installed so cannot play wma or use internet streaming.
  38.     FMOD_ERR_CDDEVICE         ' An error occured trying to open the specified CD device
  39. End Enum
  40.  
  41.  
  42. ' FSOUND_OUTPUTTYPES
  43. ' These output types are used with FSOUND_SetOutput, to choose which output driver to use.
  44. ' FSOUND_OUTPUT_DSOUND will not support hardware 3d acceleration if the sound card driver
  45. ' does not support DirectX 6 Voice Manager Extensions.
  46. ' FSOUND_OUTPUT_WINMM is recommended for NT and CE.
  47. '
  48. Public Enum FSOUND_OUTPUTTYPES
  49.     FSOUND_OUTPUT_NOSOUND   ' NoSound driver, all calls to this succeed but do nothing.
  50.     FSOUND_OUTPUT_WINMM     ' Windows Multimedia driver.
  51.     FSOUND_OUTPUT_DSOUND    ' DirectSound driver.  You need this to get EAX2 or EAX3 support, or FX api support.
  52.     FSOUND_OUTPUT_A3D       ' A3D driver.
  53.  
  54.     FSOUND_OUTPUT_OSS       ' Linux/Unix OSS (Open Sound System) driver, i.e. the kernel sound drivers.
  55.     FSOUND_OUTPUT_ESD       ' Linux/Unix ESD (Enlightment Sound Daemon) driver.
  56.     FSOUND_OUTPUT_ALSA      ' Linux Alsa driver.
  57.  
  58.     FSOUND_OUTPUT_ASIO      ' Low latency ASIO driver
  59.     FSOUND_OUTPUT_XBOX      ' Xbox driver
  60.     FSOUND_OUTPUT_PS2       ' PlayStation 2 driver
  61.     FSOUND_OUTPUT_MAC       ' Mac SoundMager driver
  62.     FSOUND_OUTPUT_GC        ' Gamecube driver
  63.     FSOUND_OUTPUT_PSP           ' PlayStation Portable driver
  64.  
  65.     FSOUND_OUTPUT_NOSOUND_NONREALTIME  ' This is the same as nosound, but the sound generation is driven by FSOUND_Update
  66. End Enum
  67.  
  68.  
  69. ' FSOUND_MIXERTYPES
  70. ' These mixer types are used with FSOUND_SetMixer, to choose which mixer to use, or to act
  71. ' upon for other reasons using FSOUND_GetMixer.
  72. ' It is not nescessary to set the mixer.  FMOD will autodetect the best mixer for you.
  73. '
  74. Public Enum FSOUND_MIXERTYPES
  75.     FSOUND_MIXER_AUTODETECT         ' CE/PS2 Only - Non interpolating/low quality mixer
  76.     FSOUND_MIXER_BLENDMODE          ' removed / obsolete.
  77.     FSOUND_MIXER_MMXP5              ' removed / obsolete.
  78.     FSOUND_MIXER_MMXP6              ' removed / obsolete.
  79.  
  80.     FSOUND_MIXER_QUALITY_AUTODETECT ' All platforms - Autodetect the fastest quality mixer based on your cpu.
  81.     FSOUND_MIXER_QUALITY_FPU        ' Win32/Linux only - Interpolating/volume ramping FPU mixer.
  82.     FSOUND_MIXER_QUALITY_MMXP5      ' Win32/Linux only - Interpolating/volume ramping FPU mixer.
  83.     FSOUND_MIXER_QUALITY_MMXP6      ' Win32/Linux only - Interpolating/volume ramping ppro+ MMX mixer.
  84.     
  85.     FSOUND_MIXER_MONO               ' CE/PS2 only - MONO non interpolating/low quality mixer. For speed
  86.     FSOUND_MIXER_QUALITY_MONO       ' CE/PS2 only - MONO Interpolating mixer.  For speed
  87. End Enum
  88.  
  89.  
  90. ' FMUSIC_TYPES
  91. ' These definitions describe the type of song being played.
  92. ' See FMUSIC_GetType
  93. '
  94. Public Enum FMUSIC_TYPES
  95.     FMUSIC_TYPE_NONE
  96.     FMUSIC_TYPE_MOD         'Protracker / Fasttracker
  97.     FMUSIC_TYPE_S3M         'ScreamTracker 3
  98.     FMUSIC_TYPE_XM          'FastTracker 2
  99.     FMUSIC_TYPE_IT          'Impulse Tracker.
  100.     FMUSIC_TYPE_MIDI        'MIDI file
  101.     FMUSIC_TYPE_FSB         'FMOD Sample Bank file
  102. End Enum
  103.  
  104.  
  105. ' FSOUND_DSP_PRIORITIES
  106. ' These default priorities are used by FMOD internal system DSP units.  They describe the
  107. ' position of the DSP chain, and the order of how audio processing is executed.
  108. ' You can actually through the use of FSOUND_DSP_GetxxxUnit (where xxx is the name of the DSP
  109. ' unit), disable or even change the priority of a DSP unit.
  110. '
  111. Public Enum FSOUND_DSP_PRIORITIES
  112.     FSOUND_DSP_DEFAULTPRIORITY_CLEARUNIT = 0           'DSP CLEAR unit - done first
  113.     FSOUND_DSP_DEFAULTPRIORITY_SFXUNIT = 100           'DSP SFX unit - done second
  114.     FSOUND_DSP_DEFAULTPRIORITY_MUSICUNIT = 200         'DSP MUSIC unit - done third
  115.     FSOUND_DSP_DEFAULTPRIORITY_USER = 300              'User priority, use this as reference for your own dsp units
  116.     FSOUND_DSP_DEFAULTPRIORITY_FFTUNIT = 900           'This reads data for FSOUND_DSP_GetSpectrum, so it comes after user units
  117.     FSOUND_DSP_DEFAULTPRIORITY_CLIPANDCOPYUNIT = 1000  'DSP CLIP AND COPY unit - last
  118. End Enum
  119.  
  120.  
  121. ' FSOUND_CAPS
  122. ' Driver description bitfields.  Use FSOUND_Driver_GetCaps to determine if a driver enumerated
  123. ' has the settings you are after.  The enumerated driver depends on the output mode, see
  124. ' FSOUND_OUTPUTTYPES
  125. '
  126. Public Enum FSOUND_CAPS
  127.     FSOUND_CAPS_HARDWARE = &H1       ' This driver supports hardware accelerated 3d sound.
  128.     FSOUND_CAPS_EAX2 = &H2           ' This driver supports EAX 2 reverb
  129.     FSOUND_CAPS_EAX3 = &H10          ' This driver supports EAX 3 reverb
  130. End Enum
  131.  
  132.  
  133. ' FSOUND_MODES
  134. ' Sample description bitfields, OR them together for loading and describing samples.
  135. ' NOTE.  If the file format being loaded already has a defined format, such as WAV or MP3, then
  136. ' trying to override the pre-defined format with a new set of format flags will not work.  For
  137. ' example, an 8 bit WAV file will not load as 16bit if you specify FSOUND_16BITS.  It will just
  138. ' ignore the flag and go ahead loading it as 8bits.  For these type of formats the only flags
  139. ' you can specify that will really alter the behaviour of how it is loaded, are the following.
  140. '
  141. ' Looping behaviour - FSOUND_LOOP_OFF, FSOUND_LOOP_NORMAL, FSOUND_LOOP_BIDI
  142. ' Load destination - FSOUND_HW3D, FSOUND_HW2D, FSOUND_2D
  143. ' Loading behaviour - FSOUND_NONBLOCKING, FSOUND_LOADMEMORY, FSOUND_LOADRAW, FSOUND_MPEGACCURATE, FSOUND_MPEGHALFRATE, FSOUND_FORCEMONO
  144. ' Playback behaviour - FSOUND_STREAMABLE, FSOUND_ENABLEFX
  145. ' PlayStation 2 only - FSOUND_USECORE0, FSOUND_USECORE1, FSOUND_LOADMEMORYIOP
  146. '
  147. ' See flag descriptions for what these do.
  148. '
  149. Public Enum FSOUND_MODES
  150.     FSOUND_LOOP_OFF = &H1             ' For non looping samples.
  151.     FSOUND_LOOP_NORMAL = &H2          ' For forward looping samples.
  152.     FSOUND_LOOP_BIDI = &H4            ' For bidirectional looping samples.  (no effect if in hardware).
  153.     FSOUND_8BITS = &H8                ' For 8 bit samples.
  154.     FSOUND_16BITS = &H10              ' For 16 bit samples.
  155.     FSOUND_MONO = &H20                ' For mono samples.
  156.     FSOUND_STEREO = &H40              ' For stereo samples.
  157.     FSOUND_UNSIGNED = &H80            ' For source data containing unsigned samples.
  158.     FSOUND_SIGNED = &H100             ' For source data containing signed data.
  159.     FSOUND_DELTA = &H200              ' For source data stored as delta values.
  160.     FSOUND_IT214 = &H400              ' For source data stored using IT214 compression.
  161.     FSOUND_IT215 = &H800              ' For source data stored using IT215 compression.
  162.     FSOUND_HW3D = &H1000              ' Attempts to make samples use 3d hardware acceleration. (if the card supports it)
  163.     FSOUND_2D = &H2000                ' Ignores any 3d processing.  overrides FSOUND_HW3D.  Located in software.
  164.     FSOUND_STREAMABLE = &H4000        ' For realtime streamable samples.  If you dont supply this sound may come out corrupted.
  165.     FSOUND_LOADMEMORY = &H8000        ' For FSOUND_Sample_Load - name will be interpreted as a pointer to data
  166.     FSOUND_LOADRAW = &H10000          ' For FSOUND_Sample_Load/FSOUND_Stream_Open - will ignore file format and treat as raw pcm.
  167.     FSOUND_MPEGACCURATE = &H20000     ' For FSOUND_Stream_Open - scans MP2/MP3 (VBR also) for accurate FSOUND_Stream_GetLengthMs/FSOUND_Stream_SetTime.
  168.     FSOUND_FORCEMONO = &H40000        ' For forcing stereo streams and samples to be mono - needed with FSOUND_HW3D - incurs speed hit
  169.     FSOUND_HW2D = &H80000             ' 2d hardware sounds.  allows hardware specific effects
  170.     FSOUND_ENABLEFX = &H100000        ' Allows DX8 FX to be played back on a sound.  Requires DirectX 8 - Note these sounds cant be played more than once, or have a changing frequency
  171.     FSOUND_MPEGHALFRATE = &H200000    ' For FMODCE only - decodes mpeg streams using a lower quality decode, but faster execution
  172.     FSOUND_XADPCM = &H400000          ' For XBOX only - Describes a user sample that its contents are compressed as XADPCM
  173.     FSOUND_VAG = &H800000             ' For PS2 only - Describes a user sample that its contents are compressed as Sony VAG format.
  174.     FSOUND_NONBLOCKING = &H1000000    ' For FSOUND_Stream_Open - Causes stream to open in the background and not block the foreground app - stream plays only when ready.
  175.     FSOUND_GCADPCM = &H2000000        ' For Gamecube only - Contents are compressed as Gamecube DSP-ADPCM format
  176.     FSOUND_MULTICHANNEL = &H4000000   ' For PS2 only - Contents are interleaved into a multi-channel (more than stereo) format
  177.     FSOUND_USECORE0 = &H8000000       ' For PS2 only - Sample/Stream is forced to use hardware voices 00-23
  178.     FSOUND_USECORE1 = &H10000000      ' For PS2 only - Sample/Stream is forced to use hardware voices 24-47
  179.     FSOUND_LOADMEMORYIOP = &H20000000 ' For PS2 only - "name" will be interpreted as a pointer to data for streaming and samples.  The address provided will be an IOP address
  180.         FSOUND_IGNORETAGS = &H40000000    ' Skips id3v2 etc tag checks when opening a stream, to reduce seek/read overhead when opening files (helps with CD performance)
  181.     FSOUND_STREAM_NET = &H80000000    ' Specifies an internet stream
  182.     
  183.     FSOUND_NORMAL = FSOUND_16BITS Or FSOUND_SIGNED Or FSOUND_MONO
  184. End Enum
  185.  
  186.  
  187. ' FSOUND_CDPLAYMODES
  188. ' Playback method for a CD Audio track, with FSOUND_CD_SetPlayMode
  189. '
  190. Public Enum FSOUND_CDPLAYMODES
  191.     FSOUND_CD_PLAYCONTINUOUS         'Starts from the current track and plays to end of CD.
  192.     FSOUND_CD_PLAYONCE               'Plays the specified track then stops.
  193.     FSOUND_CD_PLAYLOOPED             'Plays the specified track looped, forever until stopped manually.
  194.     FSOUND_CD_PLAYRANDOM             'Plays tracks in random order
  195. End Enum
  196.  
  197.  
  198. ' FSOUND_CHANNELSAMPLEMODE
  199. ' Miscellaneous values for FMOD functions.
  200. ' FSOUND_PlaySound, FSOUND_PlaySoundEx, FSOUND_Sample_Alloc, FSOUND_Sample_Load, FSOUND_SetPan
  201. '
  202. Public Enum FSOUND_CHANNELSAMPLEMODE
  203.     FSOUND_FREE = -1                 ' definition for dynamically allocated channel or sample
  204.     FSOUND_UNMANAGED = -2            ' definition for allocating a sample that is NOT managed by fsound
  205.     FSOUND_ALL = -3                  ' for a channel index or sample index, this flag affects ALL channels or samples available!  Not supported by all functions.
  206.     FSOUND_STEREOPAN = -1            ' definition for full middle stereo volume on both channels
  207.     FSOUND_SYSTEMCHANNEL = -1000     ' special channel ID for channel based functions that want to alter the global FSOUND software mixing output channel
  208.     FSOUND_SYSTEMSAMPLE = -1000      ' special sample ID for all sample based functions that want to alter the global FSOUND software mixing output sample
  209. End Enum
  210.  
  211.  
  212. ' FSOUND_REVERB_PROPERTIES
  213. ' FSOUND_Reverb_SetProperties, FSOUND_Reverb_GetProperties, FSOUND_REVERB_PROPERTYFLAGS
  214. '
  215. Public Type FSOUND_REVERB_PROPERTIES
  216.                                     ' MIN     MAX    DEFAULT DESCRIPTION
  217.     Environment         As Long     ' 0       25     0       sets all listener properties
  218.     EnvSize             As Single   ' 1.0     100.0  7.5     environment size in meters
  219.     EnvDiffusion        As Single   ' 0.0     1.0    1.0     environment diffusion
  220.     Room                As Long     ' -10000  0      -1000   room effect level (at mid frequencies)
  221.     RoomHF              As Long     ' -10000  0      -100    relative room effect level at high frequencies
  222.     RoomLF              As Long     ' -10000  0      0       relative room effect level at low frequencies
  223.     DecayTime           As Single   ' 0.1     20.0   1.49    reverberation decay time at mid frequencies
  224.     DecayHFRatio        As Single   ' 0.1     2.0    0.83    high-frequency to mid-frequency decay time ratio
  225.     DecayLFRatio        As Single   ' 0.1     2.0    1.0     low-frequency to mid-frequency decay time ratio
  226.     Reflections         As Long     ' -10000  1000   -2602   early reflections level relative to room effect
  227.     ReflectionsDelay    As Single   ' 0.0     0.3    0.007   initial reflection delay time
  228.     ReflectionsPan(3)   As Single   '                0,0,0   early reflections panning vector
  229.     Reverb              As Long     ' -1000   2000   200     late reverberation level relative to room effect
  230.     ReverbDelay         As Single   ' 0.0     0.1    0.011   late reverberation delay time relative to initial reflection
  231.     ReverbPan(3)        As Single   '                0,0,0   late reverberation panning vector
  232.     EchoTime            As Single   ' .075    0.25   0.25    echo time
  233.     EchoDepth           As Single   ' 0.0     1.0    0.0     echo depth
  234.     ModulationTime      As Single   ' 0.04    4.0    0.25    modulation time
  235.     ModulationDepth     As Single   ' 0.0     1.0    0.0     modulation depth
  236.     AirAbsorptionHF     As Single   ' -100    0.0    -5.0    change in level per meter at high frequencies
  237.     HFReference         As Single   ' 1000.0  20000  5000.0  reference high frequency (hz)
  238.     LFReference         As Single   ' 20.0    1000.0 250.0   reference low frequency (hz)
  239.     RoomRolloffFactor   As Single   ' 0.0     10.0   0.0     like FSOUND_3D_SetRolloffFactor but for room effect
  240.     Diffusion           As Single   ' 0.0     100.0  100.0   Value that controls the echo density in the late reverberation decay. (xbox only)
  241.     Density             As Single   ' 0.0     100.0  100.0   Value that controls the modal density in the late reverberation decay (xbox only)
  242.     flags               As Long     '                        modifies the behavior of above properties
  243. End Type
  244.  
  245.  
  246. ' FSOUND_REVERB_FLAGS
  247. ' Values for the Flags member of the FSOUND_REVERB_PROPERTIES structure.
  248. '
  249. Public Enum FSOUND_REVERB_PROPERTYFLAGS
  250.     FSOUND_REVERBFLAGS_DECAYTIMESCALE = &H1          ' EnvironmentSize affects reverberation decay time
  251.     FSOUND_REVERBFLAGS_REFLECTIONSSCALE = &H2        ' EnvironmentSize affects reflection level
  252.     FSOUND_REVERBFLAGS_REFLECTIONSDELAYSCALE = &H4   ' EnvironmentSize affects initial reflection delay time
  253.     FSOUND_REVERBFLAGS_REVERBSCALE = &H8             ' EnvironmentSize affects reflections level
  254.     FSOUND_REVERBFLAGS_REVERBDELAYSCALE = &H10       ' EnvironmentSize affects late reverberation delay time
  255.     FSOUND_REVERBFLAGS_DECAYHFLIMIT = &H20           ' AirAbsorptionHF affects DecayHFRatio
  256.     FSOUND_REVERBFLAGS_ECHOTIMESCALE = &H40          ' EnvironmentSize affects echo time
  257.     FSOUND_REVERBFLAGS_MODULATIONTIMESCALE = &H80    ' EnvironmentSize affects modulation time
  258.     FSOUND_REVERB_FLAGS_CORE0 = &H100                ' PS2 Only - Reverb is applied to CORE0 (hw voices 0-23)
  259.     FSOUND_REVERB_FLAGS_CORE1 = &H200                ' PS2 Only - Reverb is applied to CORE1 (hw voices 24-47)
  260.     FSOUND_REVERBFLAGS_DEFAULT = FSOUND_REVERBFLAGS_DECAYTIMESCALE Or FSOUND_REVERBFLAGS_REFLECTIONSSCALE Or FSOUND_REVERBFLAGS_REFLECTIONSDELAYSCALE Or FSOUND_REVERBFLAGS_REVERBSCALE Or FSOUND_REVERBFLAGS_REVERBDELAYSCALE Or FSOUND_REVERBFLAGS_DECAYHFLIMIT Or FSOUND_REVERB_FLAGS_CORE0 Or FSOUND_REVERB_FLAGS_CORE1
  261. End Enum
  262.  
  263.  
  264. ' FSOUND_REVERB_CHANNELPROPERTIES
  265. ' Structure defining the properties for a reverb source, related to a FSOUND channel.
  266. ' FSOUND_Reverb_SetEnvironment, FSOUND_Reverb_SetEnvironmentAdvanced
  267. '
  268. Public Type FSOUND_REVERB_CHANNELPROPERTIES
  269.     Direct               As Long     ' direct path level (at low and mid frequencies)
  270.     DirectHF             As Long     ' relative direct path level at high frequencies
  271.     Room                 As Long     ' room effect level (at low and mid frequencies)
  272.     RoomHF               As Long     ' relative room effect level at high frequencies
  273.     Obstruction          As Long     ' main obstruction control (attenuation at high frequencies)
  274.     ObstructionLFRatio   As Single   ' obstruction low-frequency level re. main control
  275.     Occlusion            As Long     ' main occlusion control (attenuation at high frequencies)
  276.     OcclustionLFRatio    As Single   ' occlusion low-frequency level re. main control
  277.     OcclusionRoomRatio   As Single   ' relative occlusion control for room effect
  278.     OcclusionDirectRatio As Single   ' relative occlusion control for direct path
  279.     Exclusion            As Long     ' main exlusion control (attenuation at high frequencies)
  280.     ExclusionLFRatio     As Single   ' exclusion low-frequency level re. main control
  281.     OutsideVolumeHF      As Long     ' outside sound cone level at high frequencies
  282.     DopplerFactor        As Single   ' like DS3D flDopplerFactor but per source
  283.     RolloffFactor        As Single   ' like DS3D flRolloffFactor but per source
  284.     RoomRolloffFactor    As Single   ' like DS3D flRolloffFactor but for room effect
  285.     AirAbsorptionFactor  As Single   ' multiplies AirAbsorptionHF member of FSOUND_REVERB_PROPERTIES
  286.     flags                As Long     ' modifies the behavior of properties
  287. End Type
  288.  
  289.  
  290. ' FSOUND_REVERB_CHANNELFLAGS
  291. ' Values for the Flags member of the FSOUND_REVERB_CHANNELPROPERTIES structure.
  292. '
  293. Public Enum FSOUND_REVERB_CHANNELFLAGS
  294.     FSOUND_REVERB_CHANNELFLAGS_DIRECTHFAUTO = &H1   ' Automatic setting of Direct due to distance from listener
  295.     FSOUND_REVERB_CHANNELFLAGS_ROOMAUTO = &H2       ' Automatic setting of Room due to distance from listener
  296.     FSOUND_REVERB_CHANNELFLAGS_ROOMHFAUTO = &H4     ' Automatic setting of RoomHF due to distance from listener
  297.     FSOUND_REVERB_CHANNELFLAGS_DEFAULT = FSOUND_REVERB_CHANNELFLAGS_DIRECTHFAUTO Or FSOUND_REVERB_CHANNELFLAGS_ROOMAUTO Or FSOUND_REVERB_CHANNELFLAGS_ROOMHFAUTO
  298. End Enum
  299.  
  300.  
  301. ' FSOUND_FX_MODES
  302. ' These values are used with FSOUND_FX_Enable to enable DirectX 8 FX for a channel.
  303. '
  304. Public Enum FSOUND_FX_MODES
  305.     FSOUND_FX_CHORUS
  306.     FSOUND_FX_COMPRESSOR
  307.     FSOUND_FX_DISTORTION
  308.     FSOUND_FX_ECHO
  309.     FSOUND_FX_FLANGER
  310.     FSOUND_FX_GARGLE
  311.     FSOUND_FX_I3DL2REVERB
  312.     FSOUND_FX_PARAMEQ
  313.     FSOUND_FX_WAVES_REVERB
  314. End Enum
  315.  
  316.  
  317. 'FSOUND_SPEAKERMODES
  318. 'These are speaker types defined for use with the FSOUND_SetSpeakerMode command.
  319. 'Note - Only reliably works with FSOUND_OUTPUT_DSOUND or FSOUND_OUTPUT_XBOX output modes.  Other output modes will only
  320. 'interpret FSOUND_SPEAKERMODE_MONO and set everything else to be stereo.
  321. 'Using either DolbyDigital or DTS will use whatever 5.1 digital mode is available if destination hardware is unsure.
  322. '
  323. Public Enum FSOUND_SPEAKERMODES
  324.     FSOUND_SPEAKERMODE_DOLBYDIGITAL  ' The audio is played through a speaker arrangement of surround speakers with a subwoofer.
  325.     FSOUND_SPEAKERMODE_HEADPHONE     ' The speakers are headphones.
  326.     FSOUND_SPEAKERMODE_MONO          ' The speakers are monaural.
  327.     FSOUND_SPEAKERMODE_QUAD          ' The speakers are quadraphonic.
  328.     FSOUND_SPEAKERMODE_STEREO        ' The speakers are stereo (default value).
  329.     FSOUND_SPEAKERMODE_SURROUND      ' The speakers are surround sound.
  330.     FSOUND_SPEAKERMODE_DTS           ' The audio is played through a speaker arrangement of surround speakers with a subwoofer.
  331.     FSOUND_SPEAKERMODE_PROLOGIC2     ' Dolby Prologic 2.  Playstation 2 and Gamecube only
  332. End Enum
  333.  
  334.  
  335. ' FSOUND_INIT_FLAGS
  336. ' Initialization flags.  Use them with FSOUND_Init in the flags parameter to change various behaviour.
  337. ' FSOUND_INIT_ENABLESYSTEMCHANNELFX Is an init mode which enables the FSOUND mixer buffer to be affected by DirectX 8 effects.
  338. ' Note that due to limitations of DirectSound, FSOUND_Init may fail if this is enabled because the buffersize is too small.
  339. ' This can be fixed with FSOUND_SetBufferSize.  Increase the BufferSize until it works.
  340. ' When it is enabled you can use the FSOUND_FX api, and use FSOUND_SYSTEMCHANNEL as the channel id when setting parameters.
  341. '
  342. Public Enum FSOUND_INITMODES
  343.     FSOUND_INIT_USEDEFAULTMIDISYNTH = &H1       'Causes MIDI playback to force software decoding.
  344.     FSOUND_INIT_GLOBALFOCUS = &H2               'For DirectSound output - sound is not muted when window is out of focus.
  345.     FSOUND_INIT_ENABLESYSTEMCHANNELFX = &H4     'For DirectSound output - Allows FSOUND_FX api to be used on global software mixer output!
  346.     FSOUND_INIT_ACCURATEVULEVELS = &H8          'This latency adjusts FSOUND_GetCurrentLevels, but incurs a small cpu and memory hit
  347.     FSOUND_INIT_PS2_DISABLECORE0REVERB = &H10   'PS2 only - Disable reverb on CORE 0 to regain SRAM
  348.     FSOUND_INIT_PS2_DISABLECORE1REVERB = &H20   'PS2 only - Disable reverb on CORE 1 to regain SRAM
  349.     FSOUND_INIT_PS2_SWAPDMACORES = &H40         'PS2 only - By default FMOD uses DMA CH0 for mixing, CH1 for uploads, this flag swaps them around
  350.     FSOUND_INIT_DONTLATENCYADJUST = &H80        'Callbacks are not latency adjusted, and are called at mix time.  Also information functions are immediate
  351.     FSOUND_INIT_GC_INITLIBS = &H100             'Gamecube only - Initializes GC audio libraries
  352.     FSOUND_INIT_STREAM_FROM_MAIN_THREAD = &H200 'Turns off fmod streamer thread, and makes streaming update from FSOUND_Update called by the user
  353.     FSOUND_INIT_PS2_USEVOLUMERAMPING = &H400    'PS2 only   - Turns on volume ramping system to remove hardware clicks.
  354.     FSOUND_INIT_DSOUND_DEFERRED = &H800         'Win32 only - For DirectSound output.  3D commands are batched together and executed at FSOUND_Update.
  355.     FSOUND_INIT_DSOUND_HRTF_LIGHT = &H1000      'Win32 only - For DirectSound output.  FSOUND_HW3D buffers use a slightly higher quality algorithm when 3d hardware acceleration is not present.
  356.     FSOUND_INIT_DSOUND_HRTF_FULL = &H2000       'Win32 only - For DirectSound output.  FSOUND_HW3D buffers use full quality 3d playback when 3d hardware acceleration is not present.
  357.     FSOUND_INIT_XBOX_REMOVEHEADROOM = &H4000    'XBox only - By default directsound attenuates all sound by 6db to avoid clipping/distortion.  CAUTION.  If you use this flag you are responsible for the final mix to make sure clipping / distortion doesn't happen.
  358.     FSOUND_INIT_PSP_SILENCEONUNDERRUN = &H8000  'PSP only - If streams skip / stutter when device is powered on, either increase stream buffersize, or use this flag instead to play silence while the UMD is recovering.
  359. End Enum
  360.  
  361.  
  362. ' FSOUND_STREAM_NET_STATUS
  363. ' Status values for internet streams. Use FSOUND_Stream_Net_GetStatus to get the current status of an internet stream.
  364. '
  365. Public Enum FSOUND_STREAM_NET_STATUS
  366.     FSOUND_STREAM_NET_NOTCONNECTED         ' Stream hasn't connected yet
  367.     FSOUND_STREAM_NET_CONNECTING           ' Stream is connecting to remote host
  368.     FSOUND_STREAM_NET_BUFFERING            ' Stream is buffering data
  369.     FSOUND_STREAM_NET_READY                ' Stream is ready to play
  370.     FSOUND_STREAM_NET_ERROR                ' Stream has suffered a fatal error
  371. End Enum
  372.  
  373.  
  374. ' FSOUND_TAGFIELD_TYPE
  375. ' Describes the type of a particular tag field.
  376. ' See FSOUND_Stream_GetNumTagFields, FSOUND_Stream_GetTagField, FSOUND_Stream_FindTagField
  377. '
  378. Public Enum FSOUND_TAGFIELD_TYPE
  379.     FSOUND_TAGFIELD_VORBISCOMMENT = 0     ' A vorbis comment
  380.     FSOUND_TAGFIELD_ID3V1                 ' Part of an ID3v1 tag
  381.     FSOUND_TAGFIELD_ID3V2                 ' An ID3v2 frame
  382.     FSOUND_TAGFIELD_SHOUTCAST             ' A SHOUTcast header line
  383.     FSOUND_TAGFIELD_ICECAST               ' An Icecast header line
  384.     FSOUND_TAGFIELD_ASF                   ' An Advanced Streaming Format header line
  385. End Enum
  386.  
  387.  
  388. ' FSOUND_STATUS_FLAGS
  389. ' These values describe the protocol and format of an internet stream. Use FSOUND_Stream_Net_GetStatus to retrieve this information for an open internet stream.
  390. '
  391. Public Enum FSOUND_STATUS_FLAGS
  392.     FSOUND_PROTOCOL_SHOUTCAST = &H1
  393.     FSOUND_PROTOCOL_ICECAST = &H2
  394.     FSOUND_PROTOCOL_HTTP = &H4
  395.     FSOUND_FORMAT_MPEG = &H10000
  396.     FSOUND_FORMAT_OGGVORBIS = &H20000
  397. End Enum
  398.  
  399. ' FSOUND_TOC_TAG
  400. ' FSOUND_Stream_Open, FSOUND_Stream_FindTagField
  401. '
  402. Public Type FSOUND_TOC_TAG
  403.     TagName(3)      As Byte         ' The string "TOC" (4th character is 0), just in case this structure is accidentally treated as a string.
  404.     NumTracks       As Long         ' The number of tracks on the CD.
  405.     min(99)         As Long         ' The start offset of each track in minutes.
  406.     Sec(99)         As Long         ' The start offset of each track in seconds.
  407.     Frame(99)       As Long         ' The start offset of each track in frames.
  408. End Type
  409.  
  410.  
  411. '/* ================================== */
  412. '/* Initialization / Global functions. */
  413. '/* ================================== */
  414.  
  415.  
  416. ' PRE - FSOUND_Init functions. These cant be called after FSOUND_Init is
  417. ' called (they will fail). They set up FMOD system functionality.
  418.  
  419.  
  420. Public Declare Function FSOUND_SetOutput Lib "fmod.dll" Alias "_FSOUND_SetOutput@4" (ByVal outputtype As FSOUND_OUTPUTTYPES) As Byte
  421. Public Declare Function FSOUND_SetDriver Lib "fmod.dll" Alias "_FSOUND_SetDriver@4" (ByVal driver As Long) As Byte
  422. Public Declare Function FSOUND_SetMixer Lib "fmod.dll" Alias "_FSOUND_SetMixer@4" (ByVal mixer As FSOUND_MIXERTYPES) As Byte
  423. Public Declare Function FSOUND_SetBufferSize Lib "fmod.dll" Alias "_FSOUND_SetBufferSize@4" (ByVal lenms As Long) As Byte
  424. Public Declare Function FSOUND_SetHWND Lib "fmod.dll" Alias "_FSOUND_SetHWND@4" (ByVal hwnd As Long) As Byte
  425. Public Declare Function FSOUND_SetMinHardwareChannels Lib "fmod.dll" Alias "_FSOUND_SetMinHardwareChannels@4" (ByVal min As Integer) As Byte
  426. Public Declare Function FSOUND_SetMaxHardwareChannels Lib "fmod.dll" Alias "_FSOUND_SetMaxHardwareChannels@4" (ByVal min As Integer) As Byte
  427. Public Declare Function FSOUND_SetMemorySystem Lib "fmod.dll" Alias "_FSOUND_SetMemorySystem@20" (ByVal pool As Long, ByVal poollen As Long, ByVal useralloc As Long, ByVal userrealloc As Long, ByVal userfree As Long) As Byte
  428.  
  429. '
  430. '   Main initialization / closedown functions.
  431. '   Note : Use FSOUND_INIT_USEDEFAULTMIDISYNTH with FSOUND_Init for software override
  432. '          with MIDI playback.
  433. '        : Use FSOUND_INIT_GLOBALFOCUS with FSOUND_Init to make sound audible no matter
  434. '          which window is in focus. (FSOUND_OUTPUT_DSOUND only)
  435. '
  436.  
  437. Public Declare Function FSOUND_Init Lib "fmod.dll" Alias "_FSOUND_Init@12" (ByVal mixrate As Long, ByVal maxchannels As Long, ByVal flags As FSOUND_INITMODES) As Byte
  438. Public Declare Function FSOUND_Close Lib "fmod.dll" Alias "_FSOUND_Close@0" () As Long
  439.  
  440. '
  441. '   Runtime system level functions
  442. '
  443.  
  444. Public Declare Function FSOUND_Update Lib "fmod.dll" Alias "_FSOUND_Update@0" () As Long
  445.  
  446. Public Declare Function FSOUND_SetSpeakerMode Lib "fmod.dll" Alias "_FSOUND_SetSpeakerMode@4" (ByVal speakermode As FSOUND_SPEAKERMODES) As Long
  447. Public Declare Function FSOUND_SetSFXMasterVolume Lib "fmod.dll" Alias "_FSOUND_SetSFXMasterVolume@4" (ByVal volume As Long) As Long
  448. Public Declare Function FSOUND_SetPanSeperation Lib "fmod.dll" Alias "_FSOUND_SetPanSeperation@4" (ByVal pansep As Single) As Long
  449. Public Declare Function FSOUND_File_SetCallbacks Lib "fmod.dll" Alias "_FSOUND_File_SetCallbacks@20" (ByVal OpenCallback As Long, ByVal CloseCallback As Long, ByVal ReadCallback As Long, ByVal SeekCallback As Long, ByVal TellCallback As Long) As Long
  450.  
  451. '
  452. ' System information functions.
  453. '
  454.  
  455. Public Declare Function FSOUND_GetError Lib "fmod.dll" Alias "_FSOUND_GetError@0" () As FMOD_ERRORS
  456. Public Declare Function FSOUND_GetVersion Lib "fmod.dll" Alias "_FSOUND_GetVersion@0" () As Single
  457. Public Declare Function FSOUND_GetOutput Lib "fmod.dll" Alias "_FSOUND_GetOutput@0" () As FSOUND_OUTPUTTYPES
  458. Public Declare Function FSOUND_GetOutputHandle Lib "fmod.dll" Alias "_FSOUND_GetOutputHandle@0" () As Long
  459. Public Declare Function FSOUND_GetDriver Lib "fmod.dll" Alias "_FSOUND_GetDriver@0" () As Long
  460. Public Declare Function FSOUND_GetMixer Lib "fmod.dll" Alias "_FSOUND_GetMixer@0" () As FSOUND_MIXERTYPES
  461. Public Declare Function FSOUND_GetNumDrivers Lib "fmod.dll" Alias "_FSOUND_GetNumDrivers@0" () As Long
  462. Public Declare Function FSOUND_GetDriverName Lib "fmod.dll" Alias "_FSOUND_GetDriverName@4" (ByVal id As Long) As Long
  463. Public Declare Function FSOUND_GetDriverCaps Lib "fmod.dll" Alias "_FSOUND_GetDriverCaps@8" (ByVal id As Long, ByRef caps As Long) As Byte
  464. Public Declare Function FSOUND_GetOutputRate Lib "fmod.dll" Alias "_FSOUND_GetOutputRate@0" () As Long
  465. Public Declare Function FSOUND_GetMaxChannels Lib "fmod.dll" Alias "_FSOUND_GetMaxChannels@0" () As Long
  466. Public Declare Function FSOUND_GetMaxSamples Lib "fmod.dll" Alias "_FSOUND_GetMaxSamples@0" () As Long
  467. Public Declare Function FSOUND_GetSpeakerMode Lib "fmod.dll" Alias "_FSOUND_GetSpeakerMode@0" () As Long
  468. Public Declare Function FSOUND_GetSFXMasterVolume Lib "fmod.dll" Alias "_FSOUND_GetSFXMasterVolume@0" () As Long
  469. Public Declare Function FSOUND_GetNumHWChannels Lib "fmod.dll" Alias "_FSOUND_GetNumHWChannels@12" (ByRef num2d As Long, ByRef num3d As Long, ByRef total As Long)
  470. Public Declare Function FSOUND_GetChannelsPlaying Lib "fmod.dll" Alias "_FSOUND_GetChannelsPlaying@0" () As Long
  471. Public Declare Function FSOUND_GetCPUUsage Lib "fmod.dll" Alias "_FSOUND_GetCPUUsage@0" () As Single
  472. Public Declare Sub FSOUND_GetMemoryStats Lib "fmod.dll" Alias "_FSOUND_GetMemoryStats@8" (ByRef currentalloced As Long, ByRef maxalloced As Long)
  473.  
  474. '/* =================================== */
  475. '/* Sample management / load functions. */
  476. '/* =================================== */
  477.  
  478.  
  479. '   Sample creation and management functions
  480. '   Note : Use FSOUND_LOADMEMORY   flag with FSOUND_Sample_Load to load from memory.
  481. '          Use FSOUND_LOADRAW      flag with FSOUND_Sample_Load to treat as as raw pcm data.
  482.  
  483.  
  484. Public Declare Function FSOUND_Sample_Load Lib "fmod.dll" Alias "_FSOUND_Sample_Load@20" (ByVal index As Long, ByVal name As String, ByVal mode As FSOUND_MODES, ByVal offset As Long, ByVal length As Long) As Long
  485. Public Declare Function FSOUND_Sample_Alloc Lib "fmod.dll" Alias "_FSOUND_Sample_Alloc@28" (ByVal index As Long, ByVal length As Long, ByVal mode As Long, ByVal deffreq As Long, ByVal defvol As Long, ByVal defpan As Long, ByVal defpri As Long) As Long
  486. Public Declare Function FSOUND_Sample_Free Lib "fmod.dll" Alias "_FSOUND_Sample_Free@4" (ByVal sptr As Long) As Long
  487. Public Declare Function FSOUND_Sample_Upload Lib "fmod.dll" Alias "_FSOUND_Sample_Upload@12" (ByVal sptr As Long, ByRef srcdata As Long, ByVal mode As Long) As Byte
  488. Public Declare Function FSOUND_Sample_Lock Lib "fmod.dll" Alias "_FSOUND_Sample_Lock@28" (ByVal sptr As Long, ByVal offset As Long, ByVal length As Long, ByRef ptr1 As Long, ByRef ptr2 As Long, ByRef len1 As Long, ByRef len2 As Long) As Byte
  489. Public Declare Function FSOUND_Sample_Unlock Lib "fmod.dll" Alias "_FSOUND_Sample_Unlock@20" (ByVal sptr As Long, ByVal sptr1 As Long, ByVal sptr2 As Long, ByVal len1 As Long, ByVal len2 As Long) As Byte
  490.  
  491.  
  492. '   Sample control functions
  493.  
  494.  
  495. Public Declare Function FSOUND_Sample_SetMode Lib "fmod.dll" Alias "_FSOUND_Sample_SetMode@8" (ByVal sptr As Long, ByVal mode As FSOUND_MODES) As Byte
  496. Public Declare Function FSOUND_Sample_SetLoopPoints Lib "fmod.dll" Alias "_FSOUND_Sample_SetLoopPoints@12" (ByVal sptr As Long, ByVal loopstart As Long, ByVal loopend As Long) As Byte
  497. Public Declare Function FSOUND_Sample_SetDefaults Lib "fmod.dll" Alias "_FSOUND_Sample_SetDefaults@20" (ByVal sptr As Long, ByVal deffreq As Long, ByVal defvol As Long, ByVal defpan As Long, ByVal defpri As Long) As Byte
  498. Public Declare Function FSOUND_Sample_SetDefaultsEx Lib "fmod.dll" Alias "_FSOUND_Sample_SetDefaultsEx@32" (ByVal sptr As Long, ByVal deffreq As Long, ByVal defvol As Long, ByVal defpan As Long, ByVal defpri As Long, ByVal varfreq As Long, ByVal varvol As Long, ByVal varpan As Long) As Byte
  499. Public Declare Function FSOUND_Sample_SetMinMaxDistance Lib "fmod.dll" Alias "_FSOUND_Sample_SetMinMaxDistance@12" (ByVal sptr As Long, ByVal min As Single, ByVal max As Single) As Byte
  500. Public Declare Function FSOUND_Sample_SetMaxPlaybacks Lib "fmod.dll" Alias "_FSOUND_Sample_SetMaxPlaybacks@8" (ByVal sptr As Long, ByVal max As Long) As Byte
  501.  
  502.  
  503. '   Sample information functions
  504.  
  505.  
  506. Public Declare Function FSOUND_Sample_Get Lib "fmod.dll" Alias "_FSOUND_Sample_Get@4" (ByVal sampno As Long) As Long
  507. Public Declare Function FSOUND_Sample_GetName Lib "fmod.dll" Alias "_FSOUND_Sample_GetName@4" (ByVal sptr As Long) As Long
  508. Public Declare Function FSOUND_Sample_GetLength Lib "fmod.dll" Alias "_FSOUND_Sample_GetLength@4" (ByVal sptr As Long) As Long
  509. Public Declare Function FSOUND_Sample_GetLoopPoints Lib "fmod.dll" Alias "_FSOUND_Sample_GetLoopPoints@12" (ByVal sptr As Long, ByRef loopstart As Long, ByRef loopend As Long) As Byte
  510. Public Declare Function FSOUND_Sample_GetDefaults Lib "fmod.dll" Alias "_FSOUND_Sample_GetDefaults@20" (ByVal sptr As Long, ByRef deffreq As Long, ByRef defvol As Long, ByRef defpan As Long, ByRef defpri As Long) As Byte
  511. Public Declare Function FSOUND_Sample_GetDefaultsEx Lib "fmod.dll" Alias "_FSOUND_Sample_GetDefaultsEx@32" (ByVal sptr As Long, ByRef deffreq As Long, ByRef defvol As Long, ByRef defpan As Long, ByRef defpri As Long, ByRef varfreq As Long, ByRef varvol As Long, ByRef varpan As Long) As Byte
  512. Public Declare Function FSOUND_Sample_GetMode Lib "fmod.dll" Alias "_FSOUND_Sample_GetMode@4" (ByVal sptr As Long) As Long
  513. Public Declare Function FSOUND_Sample_GetMinMaxDistance Lib "fmod.dll" Alias "_FSOUND_Sample_GetMinMaxDistance@12" (ByVal sptr As Long, ByRef min As Single, ByRef max As Single) As Byte
  514.  
  515. '/* ============================ */
  516. '/* Channel control functions.   */
  517. '/* ============================ */
  518.  
  519.  
  520. '   Playing and stopping sounds.
  521. '   Note : Use FSOUND_FREE as the channel variable, to let FMOD pick a free channel for you.
  522. '          Use FSOUND_ALL as the channel variable to control ALL channels with one function call!
  523.  
  524.  
  525. Public Declare Function FSOUND_PlaySound Lib "fmod.dll" Alias "_FSOUND_PlaySound@8" (ByVal channel As Long, ByVal sptr As Long) As Long
  526. Public Declare Function FSOUND_PlaySoundEx Lib "fmod.dll" Alias "_FSOUND_PlaySoundEx@16" (ByVal channel As Long, ByVal sptr As Long, ByVal dsp As Long, ByVal startpaused As Byte) As Long
  527. Public Declare Function FSOUND_StopSound Lib "fmod.dll" Alias "_FSOUND_StopSound@4" (ByVal channel As Long) As Byte
  528.  
  529.  
  530. '   Functions to control playback of a channel.
  531. '   Note : FSOUND_ALL can be used on most of these functions as a channel value.
  532.  
  533.  
  534. Public Declare Function FSOUND_SetFrequency Lib "fmod.dll" Alias "_FSOUND_SetFrequency@8" (ByVal channel As Long, ByVal freq As Long) As Byte
  535. Public Declare Function FSOUND_SetVolume Lib "fmod.dll" Alias "_FSOUND_SetVolume@8" (ByVal channel As Long, ByVal Vol As Long) As Byte
  536. Public Declare Function FSOUND_SetVolumeAbsolute Lib "fmod.dll" Alias "_FSOUND_SetVolumeAbsolute@8" (ByVal channel As Long, ByVal Vol As Long) As Byte
  537. Public Declare Function FSOUND_SetPan Lib "fmod.dll" Alias "_FSOUND_SetPan@8" (ByVal channel As Long, ByVal pan As Long) As Byte
  538. Public Declare Function FSOUND_SetSurround Lib "fmod.dll" Alias "_FSOUND_SetSurround@8" (ByVal channel As Long, ByVal surround As Long) As Byte
  539. Public Declare Function FSOUND_SetMute Lib "fmod.dll" Alias "_FSOUND_SetMute@8" (ByVal channel As Long, ByVal mute As Byte) As Byte
  540. Public Declare Function FSOUND_SetPriority Lib "fmod.dll" Alias "_FSOUND_SetPriority@8" (ByVal channel As Long, ByVal Priority As Long) As Byte
  541. Public Declare Function FSOUND_SetReserved Lib "fmod.dll" Alias "_FSOUND_SetReserved@8" (ByVal channel As Long, ByVal reserved As Long) As Byte
  542. Public Declare Function FSOUND_SetPaused Lib "fmod.dll" Alias "_FSOUND_SetPaused@8" (ByVal channel As Long, ByVal Paused As Byte) As Byte
  543. Public Declare Function FSOUND_SetLoopMode Lib "fmod.dll" Alias "_FSOUND_SetLoopMode@8" (ByVal channel As Long, ByVal loopmode As Long) As Byte
  544. Public Declare Function FSOUND_SetCurrentPosition Lib "fmod.dll" Alias "_FSOUND_SetCurrentPosition@8" (ByVal channel As Long, ByVal offset As Long) As Byte
  545. Public Declare Function FSOUND_3D_SetAttributes Lib "fmod.dll" Alias "_FSOUND_3D_SetAttributes@12" (ByVal channel As Long, ByRef Pos As Single, ByRef vel As Single) As Byte
  546. Public Declare Function FSOUND_3D_SetMinMaxDistance Lib "fmod.dll" Alias "_FSOUND_3D_SetMinMaxDistance@12" (ByVal channel As Long, ByVal min As Single, ByVal max As Single) As Byte
  547.  
  548. '
  549. '   Channel information functions.
  550. '
  551.  
  552. Public Declare Function FSOUND_IsPlaying Lib "fmod.dll" Alias "_FSOUND_IsPlaying@4" (ByVal channel As Long) As Byte
  553. Public Declare Function FSOUND_GetFrequency Lib "fmod.dll" Alias "_FSOUND_GetFrequency@4" (ByVal channel As Long) As Long
  554. Public Declare Function FSOUND_GetVolume Lib "fmod.dll" Alias "_FSOUND_GetVolume@4" (ByVal channel As Long) As Long
  555. Public Declare Function FSOUND_GetAmplitude Lib "fmod.dll" Alias "_FSOUND_GetAmplitude@4" (ByVal channel As Long) As Long
  556. Public Declare Function FSOUND_GetPan Lib "fmod.dll" Alias "_FSOUND_GetPan@4" (ByVal channel As Long) As Long
  557. Public Declare Function FSOUND_GetSurround Lib "fmod.dll" Alias "_FSOUND_GetSurround@4" (ByVal channel As Long) As Byte
  558. Public Declare Function FSOUND_GetMute Lib "fmod.dll" Alias "_FSOUND_GetMute@4" (ByVal channel As Long) As Byte
  559. Public Declare Function FSOUND_GetPriority Lib "fmod.dll" Alias "_FSOUND_GetPriority@4" (ByVal channel As Long) As Long
  560. Public Declare Function FSOUND_GetReserved Lib "fmod.dll" Alias "_FSOUND_GetReserved@4" (ByVal channel As Long) As Byte
  561. Public Declare Function FSOUND_GetPaused Lib "fmod.dll" Alias "_FSOUND_GetPaused@4" (ByVal channel As Long) As Byte
  562. Public Declare Function FSOUND_GetLoopMode Lib "fmod.dll" Alias "_FSOUND_GetLoopMode@4" (ByVal channel As Long) As Long
  563. Public Declare Function FSOUND_GetCurrentPosition Lib "fmod.dll" Alias "_FSOUND_GetCurrentPosition@4" (ByVal channel As Long) As Long
  564. Public Declare Function FSOUND_GetCurrentSample Lib "fmod.dll" Alias "_FSOUND_GetCurrentSample@4" (ByVal channel As Long) As Long
  565. Public Declare Function FSOUND_GetCurrentLevels Lib "fmod.dll" Alias "_FSOUND_GetCurrentLevels@12" (ByVal channel As Long, ByRef l As Single, ByRef r As Single) As Byte
  566. Public Declare Function FSOUND_GetNumSubChannels Lib "fmod.dll" Alias "_FSOUND_GetNumSubChannels@4" (ByVal channel As Long) As Long
  567. Public Declare Function FSOUND_GetSubChannel Lib "fmod.dll" Alias "_FSOUND_GetSubChannel@8" (ByVal channel As Long, ByVal subchannel As Long) As Long
  568. Public Declare Function FSOUND_3D_GetAttributes Lib "fmod.dll" Alias "_FSOUND_3D_GetAttributes@12" (ByVal channel As Long, ByRef Pos As Single, ByRef vel As Single) As Byte
  569. Public Declare Function FSOUND_3D_GetMinMaxDistance Lib "fmod.dll" Alias "_FSOUND_3D_GetMinMaxDistance@12" (ByVal channel As Long, ByRef min As Single, ByRef max As Single) As Byte
  570.  
  571. '/* ========================== */
  572. '/* Global 3D sound functions. */
  573. '/* ========================== */
  574.  
  575. '
  576. '    See also 3d sample and channel based functions above.
  577. '    Call FSOUND_Update once a frame to process 3d information.
  578. '
  579.  
  580. Public Declare Function FSOUND_3D_Listener_SetCurrent Lib "fmod.dll" Alias "_FSOUND_3D_Listener_SetCurrent@8" (ByVal current As Long) As Long
  581. Public Declare Function FSOUND_3D_Listener_SetAttributes Lib "fmod.dll" Alias "_FSOUND_3D_Listener_SetAttributes@32" (ByVal Pos As Single, ByVal vel As Single, ByVal fx As Single, ByVal fy As Single, ByVal fz As Single, ByVal tx As Single, ByVal ty As Single, ByVal tz As Single) As Long
  582. Public Declare Function FSOUND_3D_Listener_GetAttributes Lib "fmod.dll" Alias "_FSOUND_3D_Listener_GetAttributes@32" (ByRef Pos As Single, ByRef vel As Single, ByRef fx As Single, ByRef fy As Single, ByRef fz As Single, ByRef tx As Single, ByRef ty As Single, ByRef tz As Single) As Long
  583. Public Declare Function FSOUND_3D_SetDopplerFactor Lib "fmod.dll" Alias "_FSOUND_3D_SetDopplerFactor@4" (ByVal fscale As Single) As Long
  584. Public Declare Function FSOUND_3D_SetDistanceFactor Lib "fmod.dll" Alias "_FSOUND_3D_SetDistanceFactor@4" (ByVal fscale As Single) As Long
  585. Public Declare Function FSOUND_3D_SetRolloffFactor Lib "fmod.dll" Alias "_FSOUND_3D_SetRolloffFactor@4" (ByVal fscale As Single) As Long
  586.  
  587. '/* =================== */
  588. '/* FX functions.       */
  589. '/* =================== */
  590.  
  591.  
  592. '   Functions to control DX8 only effects processing.
  593. '
  594. '   - FX enabled samples can only be played once at a time, not multiple times at once.
  595. '   - Sounds have to be created with FSOUND_HW2D or FSOUND_HW3D for this to work.
  596. '   - FSOUND_INIT_ENABLESYSTEMCHANNELFX can be used to apply hardware effect processing to the
  597. '     global mixed output of FMOD's software channels.
  598. '   - FSOUND_FX_Enable returns an FX handle that you can use to alter fx parameters.
  599. '   - FSOUND_FX_Enable can be called multiple times in a row, even on the same FX type,
  600. '     it will return a unique handle for each FX.
  601. '   - FSOUND_FX_Enable cannot be called if the sound is playing or locked.
  602. '   - FSOUND_FX_Disable must be called to reset/clear the FX from a channel.
  603.  
  604.  
  605. Public Declare Function FSOUND_FX_Enable Lib "fmod.dll" Alias "_FSOUND_FX_Enable@8" (ByVal channel As Long, ByVal fx As FSOUND_FX_MODES) As Long
  606. Public Declare Function FSOUND_FX_Disable Lib "fmod.dll" Alias "_FSOUND_FX_Disable@4" (ByVal channel As Long) As Byte
  607.  
  608. Public Declare Function FSOUND_FX_SetChorus Lib "fmod.dll" Alias "_FSOUND_FX_SetChorus@32" (ByVal fxid As Long, ByVal WetDryMix As Single, ByVal Depth As Single, ByVal Feedback As Single, ByVal Frequency As Single, ByVal Waveform As Long, ByVal Delay As Single, ByVal Phase As Long) As Byte
  609. Public Declare Function FSOUND_FX_SetCompressor Lib "fmod.dll" Alias "_FSOUND_FX_SetCompressor@28" (ByVal fxid As Long, ByVal Gain As Single, ByVal Attack As Single, ByVal Release As Single, ByVal Threshold As Single, ByVal Ratio As Single, ByVal Predelay As Single) As Byte
  610. Public Declare Function FSOUND_FX_SetDistortion Lib "fmod.dll" Alias "_FSOUND_FX_SetDistortion@24" (ByVal fxid As Long, ByVal Gain As Single, ByVal Edge As Single, ByVal PostEQCenterFrequency As Single, ByVal PostEQBandwidth As Single, ByVal PreLowpassCutoff As Single) As Byte
  611. Public Declare Function FSOUND_FX_SetEcho Lib "fmod.dll" Alias "_FSOUND_FX_SetEcho@24" (ByVal fxid As Long, ByVal WetDryMix As Single, ByVal Feedback As Single, ByVal LeftDelay As Single, ByVal RightDelay As Single, ByVal PanDelay As Long) As Byte
  612. Public Declare Function FSOUND_FX_SetFlanger Lib "fmod.dll" Alias "_FSOUND_FX_SetFlanger@32" (ByVal fxid As Long, ByVal WetDryMix As Single, ByVal Depth As Single, ByVal Feedback As Single, ByVal Frequency As Single, ByVal Waveform As Long, ByVal Delay As Single, ByVal Phase As Long) As Byte
  613. Public Declare Function FSOUND_FX_SetGargle Lib "fmod.dll" Alias "_FSOUND_FX_SetGargle@12" (ByVal fxid As Long, ByVal RateHz As Long, ByVal WaveShape As Long) As Byte
  614. Public Declare Function FSOUND_FX_SetI3DL2Reverb Lib "fmod.dll" Alias "_FSOUND_FX_SetI3DL2Reverb@52" (ByVal fxid As Long, ByVal Room As Long, ByVal RoomHF As Long, ByVal RoomRolloffFactor As Single, ByVal DecayTime As Single, ByVal DecayHFRatio As Single, ByVal Reflections As Long, ByVal ReflectionsDelay As Single, ByVal Reverb As Long, ByVal ReverbDelay As Single, ByVal Diffusion As Single, ByVal Density As Single, ByVal HFReference As Single) As Byte
  615. Public Declare Function FSOUND_FX_SetParamEQ Lib "fmod.dll" Alias "_FSOUND_FX_SetParamEQ@16" (ByVal fxid As Long, ByVal Center As Single, ByVal Bandwidth As Single, ByVal Gain As Single) As Byte
  616. Public Declare Function FSOUND_FX_SetWavesReverb Lib "fmod.dll" Alias "_FSOUND_FX_SetWavesReverb@20" (ByVal fxid As Long, ByVal InGain As Single, ByVal ReverbMix As Single, ByVal ReverbTime As Single, ByVal HighFreqRTRatio As Single) As Byte
  617.  
  618. ' ========================= */
  619. ' File Streaming functions. */
  620. ' ========================= */
  621.  
  622. '
  623. '    Note : Use FSOUND_LOADMEMORY   flag with FSOUND_Stream_Open to stream from memory.
  624. '           Use FSOUND_LOADRAW      flag with FSOUND_Stream_Open to treat stream as raw pcm data.
  625. '           Use FSOUND_MPEGACCURATE flag with FSOUND_Stream_Open to open mpegs in 'accurate mode' for settime/gettime/getlengthms.
  626. '           Use FSOUND_FREE as the 'channel' variable, to let FMOD pick a free channel for you.
  627. '
  628.  
  629. Public Declare Function FSOUND_Stream_SetBufferSize Lib "fmod.dll" Alias "_FSOUND_Stream_SetBufferSize@4" (ByVal ms As Long) As Byte
  630.  
  631. Public Declare Function FSOUND_Stream_Open Lib "fmod.dll" Alias "_FSOUND_Stream_Open@16" (ByVal filename As String, ByVal mode As FSOUND_MODES, ByVal offset As Long, ByVal length As Long) As Long
  632. Public Declare Function FSOUND_Stream_Open2 Lib "fmod.dll" Alias "_FSOUND_Stream_Open@16" (ByRef data As Byte, ByVal mode As FSOUND_MODES, ByVal offset As Long, ByVal length As Long) As Long
  633. Public Declare Function FSOUND_Stream_Create Lib "fmod.dll" Alias "_FSOUND_Stream_Create@20" (ByVal callback As Long, ByVal length As Long, ByVal mode As Long, ByVal samplerate As Long, ByVal userdata As Long) As Long
  634. Public Declare Function FSOUND_Stream_Close Lib "fmod.dll" Alias "_FSOUND_Stream_Close@4" (ByVal stream As Long) As Byte
  635.  
  636. Public Declare Function FSOUND_Stream_Play Lib "fmod.dll" Alias "_FSOUND_Stream_Play@8" (ByVal channel As Long, ByVal stream As Long) As Long
  637. Public Declare Function FSOUND_Stream_PlayEx Lib "fmod.dll" Alias "_FSOUND_Stream_PlayEx@16" (ByVal channel As Long, ByVal stream As Long, ByVal dsp As Long, ByVal startpaused As Byte) As Long
  638. Public Declare Function FSOUND_Stream_Stop Lib "fmod.dll" Alias "_FSOUND_Stream_Stop@4" (ByVal stream As Long) As Byte
  639.  
  640. Public Declare Function FSOUND_Stream_SetPosition Lib "fmod.dll" Alias "_FSOUND_Stream_SetPosition@8" (ByVal stream As Long, ByVal positition As Long) As Byte
  641. Public Declare Function FSOUND_Stream_GetPosition Lib "fmod.dll" Alias "_FSOUND_Stream_GetPosition@4" (ByVal stream As Long) As Long
  642. Public Declare Function FSOUND_Stream_SetTime Lib "fmod.dll" Alias "_FSOUND_Stream_SetTime@8" (ByVal stream As Long, ByVal ms As Long) As Byte
  643. Public Declare Function FSOUND_Stream_GetTime Lib "fmod.dll" Alias "_FSOUND_Stream_GetTime@4" (ByVal stream As Long) As Long
  644. Public Declare Function FSOUND_Stream_GetLength Lib "fmod.dll" Alias "_FSOUND_Stream_GetLength@4" (ByVal stream As Long) As Long
  645. Public Declare Function FSOUND_Stream_GetLengthMs Lib "fmod.dll" Alias "_FSOUND_Stream_GetLengthMs@4" (ByVal stream As Long) As Long
  646.  
  647. Public Declare Function FSOUND_Stream_SetMode Lib "fmod.dll" Alias "_FSOUND_Stream_SetMode@8" (ByVal stream As Long, ByVal mode As Long) As Byte
  648. Public Declare Function FSOUND_Stream_GetMode Lib "fmod.dll" Alias "_FSOUND_Stream_GetMode@4" (ByVal stream As Long) As Long
  649. Public Declare Function FSOUND_Stream_SetLoopPoints Lib "fmod.dll" Alias "_FSOUND_Stream_SetLoopPoints@12" (ByVal stream As Long, ByVal loopstartpcm As Long, ByVal loopendpcm As Long) As Byte
  650. Public Declare Function FSOUND_Stream_SetLoopCount Lib "fmod.dll" Alias "_FSOUND_Stream_SetLoopCount@8" (ByVal stream As Long, ByVal count As Long) As Byte
  651. Public Declare Function FSOUND_Stream_GetOpenState Lib "fmod.dll" Alias "_FSOUND_Stream_GetOpenState@4" (ByVal stream As Long) As Long
  652. Public Declare Function FSOUND_Stream_GetSample Lib "fmod.dll" Alias "_FSOUND_Stream_GetSample@4" (ByVal stream As Long) As Long
  653. Public Declare Function FSOUND_Stream_CreateDSP Lib "fmod.dll" Alias "_FSOUND_Stream_CreateDSP@16" (ByVal stream As Long, ByVal callback As Long, ByVal Priority As Long, ByVal userdata As Long) As Long
  654.  
  655. Public Declare Function FSOUND_Stream_SetEndCallback Lib "fmod.dll" Alias "_FSOUND_Stream_SetEndCallback@12" (ByVal stream As Long, ByVal callback As Long, ByVal userdata As Long) As Byte
  656. Public Declare Function FSOUND_Stream_SetSyncCallback Lib "fmod.dll" Alias "_FSOUND_Stream_SetSyncCallback@12" (ByVal stream As Long, ByVal callback As Long, ByVal userdata As Long) As Byte
  657.  
  658. Public Declare Function FSOUND_Stream_AddSyncPoint Lib "fmod.dll" Alias "_FSOUND_Stream_AddSyncPoint@12" (ByVal stream As Long, ByVal pcmoffset As Long, ByVal name As String) As Long
  659. Public Declare Function FSOUND_Stream_DeleteSyncPoint Lib "fmod.dll" Alias "_FSOUND_Stream_DeleteSyncPoint@4" (ByVal point As Long) As Byte
  660. Public Declare Function FSOUND_Stream_GetNumSyncPoints Lib "fmod.dll" Alias "_FSOUND_Stream_GetNumSyncPoints@4" (ByVal stream As Long) As Long
  661. Public Declare Function FSOUND_Stream_GetSyncPoint Lib "fmod.dll" Alias "_FSOUND_Stream_GetSyncPoint@8" (ByVal stream As Long, ByVal index As Long) As Long
  662. Public Declare Function FSOUND_Stream_GetSyncPointInfo Lib "fmod.dll" Alias "_FSOUND_Stream_GetSyncPointInfo@8" (ByVal point As Long, ByRef pcmoffset As Long) As Long
  663.  
  664. Public Declare Function FSOUND_Stream_SetSubStream Lib "fmod.dll" Alias "_FSOUND_Stream_SetSubStream@8" (ByVal stream As Long, ByVal index As Long) As Byte
  665. Public Declare Function FSOUND_Stream_GetNumSubStreams Lib "fmod.dll" Alias "_FSOUND_Stream_GetNumSubStreams@4" (ByVal stream As Long) As Long
  666. Public Declare Function FSOUND_Stream_SetSubStreamSentence Lib "fmod.dll" Alias "_FSOUND_Stream_SetSubStreamSentence@12" (ByVal stream As Long, ByRef sentencelist As Long, ByVal numitems As Long) As Byte
  667.  
  668. Public Declare Function FSOUND_Stream_GetNumTagFields Lib "fmod.dll" Alias "_FSOUND_Stream_GetNumTagFields@8" (ByVal stream As Long, ByRef num As Long) As Byte
  669. Public Declare Function FSOUND_Stream_GetTagField Lib "fmod.dll" Alias "_FSOUND_Stream_GetTagField@24" (ByVal stream As Long, ByVal num As Long, ByRef tagtype As Long, ByRef name As Long, ByRef value As Long, ByRef length As Long) As Byte
  670. Public Declare Function FSOUND_Stream_FindTagField Lib "fmod.dll" Alias "_FSOUND_Stream_FindTagField@20" (ByVal stream As Long, ByVal tagtype As Long, ByVal name As String, ByRef value As Long, ByRef length As Long) As Byte
  671.  
  672. '
  673. '   Internet streaming functions
  674. '
  675.  
  676. Public Declare Function FSOUND_Stream_Net_SetProxy Lib "fmod.dll" Alias "_FSOUND_Stream_Net_SetProxy@4" (ByVal proxy As String) As Byte
  677. Public Declare Function FSOUND_Stream_Net_GetLastServerStatus Lib "fmod.dll" Alias "_FSOUND_Stream_Net_GetLastServerStatus@0" () As Long
  678. Public Declare Function FSOUND_Stream_Net_SetBufferProperties Lib "fmod.dll" Alias "_FSOUND_Stream_Net_SetBufferProperties@12" (ByVal buffersize As Long, ByVal prebuffer_percent As Long, ByVal rebuffer_percent As Long) As Byte
  679. Public Declare Function FSOUND_Stream_Net_GetBufferProperties Lib "fmod.dll" Alias "_FSOUND_Stream_Net_GetBufferProperties@12" (ByRef buffersize As Long, ByRef prebuffer_percent As Long, ByRef rebuffer_percent As Long) As Byte
  680. Public Declare Function FSOUND_Stream_Net_SetMetadataCallback Lib "fmod.dll" Alias "_FSOUND_Stream_Net_SetMetadataCallback@12" (ByVal stream As Long, ByVal callback As Long, ByVal userdata As Long) As Byte
  681. Public Declare Function FSOUND_Stream_Net_GetStatus Lib "fmod.dll" Alias "_FSOUND_Stream_Net_GetStatus@20" (ByVal stream As Long, ByRef status As Long, ByRef bufferpercentused As Long, ByRef bitrate As Long, ByRef flags As Long) As Byte
  682.  
  683. '/* =================== */
  684. '/* CD audio functions. */
  685. '/* =================== */
  686.  
  687.  
  688. '   Note : 0 = default cdrom.  Otherwise specify the drive letter, for example. 'D'.
  689.  
  690.  
  691. Public Declare Function FSOUND_CD_Play Lib "fmod.dll" Alias "_FSOUND_CD_Play@8" (ByVal drive As Byte, ByVal Track As Long) As Byte
  692. Public Declare Function FSOUND_CD_SetPlayMode Lib "fmod.dll" Alias "_FSOUND_CD_SetPlayMode@8" (ByVal drive As Byte, ByVal mode As FSOUND_CDPLAYMODES) As Long
  693. Public Declare Function FSOUND_CD_Stop Lib "fmod.dll" Alias "_FSOUND_CD_Stop@4" (ByVal drive As Byte) As Byte
  694. Public Declare Function FSOUND_CD_SetPaused Lib "fmod.dll" Alias "_FSOUND_CD_SetPaused@8" (ByVal drive As Byte, ByVal Paused As Byte) As Byte
  695. Public Declare Function FSOUND_CD_SetVolume Lib "fmod.dll" Alias "_FSOUND_CD_SetVolume@8" (ByVal drive As Byte, ByVal volume As Long) As Byte
  696. Public Declare Function FSOUND_CD_SetTrackTime Lib "fmod.dll" Alias "_FSOUND_CD_SetTrackTime@8" (ByVal drive As Byte, ByVal ms As Long) As Byte
  697. Public Declare Function FSOUND_CD_OpenTray Lib "fmod.dll" Alias "_FSOUND_CD_OpenTray@8" (ByVal drive As Byte, ByVal openState As Byte) As Byte
  698.  
  699. Public Declare Function FSOUND_CD_GetPaused Lib "fmod.dll" Alias "_FSOUND_CD_GetPaused@4" (ByVal drive As Byte) As Byte
  700. Public Declare Function FSOUND_CD_GetTrack Lib "fmod.dll" Alias "_FSOUND_CD_GetTrack@4" (ByVal drive As Byte) As Long
  701. Public Declare Function FSOUND_CD_GetNumTracks Lib "fmod.dll" Alias "_FSOUND_CD_GetNumTracks@4" (ByVal drive As Byte) As Long
  702. Public Declare Function FSOUND_CD_GetVolume Lib "fmod.dll" Alias "_FSOUND_CD_GetVolume@4" (ByVal drive As Byte) As Long
  703. Public Declare Function FSOUND_CD_GetTrackLength Lib "fmod.dll" Alias "_FSOUND_CD_GetTrackLength@8" (ByVal drive As Byte, ByVal Track As Long) As Long
  704. Public Declare Function FSOUND_CD_GetTrackTime Lib "fmod.dll" Alias "_FSOUND_CD_GetTrackTime@4" (ByVal drive As Byte) As Long
  705.  
  706. '/* ============== */
  707. '/* DSP functions. */
  708. '/* ============== */
  709.  
  710.  
  711. '   DSP Unit control and information functions.
  712. '   These functions allow you access to the mixed stream that FMOD uses to play back sound on.
  713.  
  714.  
  715. Public Declare Function FSOUND_DSP_Create Lib "fmod.dll" Alias "_FSOUND_DSP_Create@12" (ByVal callback As Long, ByVal Priority As Long, ByVal param As Long) As Long
  716. Public Declare Function FSOUND_DSP_Free Lib "fmod.dll" Alias "_FSOUND_DSP_Free@4" (ByVal unit As Long) As Long
  717. Public Declare Function FSOUND_DSP_SetPriority Lib "fmod.dll" Alias "_FSOUND_DSP_SetPriority@8" (ByVal unit As Long, ByVal Priority As Long) As Long
  718. Public Declare Function FSOUND_DSP_GetPriority Lib "fmod.dll" Alias "_FSOUND_DSP_GetPriority@4" (ByVal unit As Long) As Long
  719. Public Declare Function FSOUND_DSP_SetActive Lib "fmod.dll" Alias "_FSOUND_DSP_SetActive@8" (ByVal unit As Long, ByVal active As Integer) As Long
  720. Public Declare Function FSOUND_DSP_GetActive Lib "fmod.dll" Alias "_FSOUND_DSP_GetActive@4" (ByVal unit As Long) As Byte
  721.  
  722.  
  723. '   Functions to get hold of FSOUND 'system DSP unit' handles
  724.  
  725.  
  726. Public Declare Function FSOUND_DSP_GetClearUnit Lib "fmod.dll" Alias "_FSOUND_DSP_GetClearUnit@0" () As Long
  727. Public Declare Function FSOUND_DSP_GetSFXUnit Lib "fmod.dll" Alias "_FSOUND_DSP_GetSFXUnit@0" () As Long
  728. Public Declare Function FSOUND_DSP_GetMusicUnit Lib "fmod.dll" Alias "_FSOUND_DSP_GetMusicUnit@0" () As Long
  729. Public Declare Function FSOUND_DSP_GetFFTUnit Lib "fmod.dll" Alias "_FSOUND_DSP_GetFFTUnit@0" () As Long
  730. Public Declare Function FSOUND_DSP_GetClipAndCopyUnit Lib "fmod.dll" Alias "_FSOUND_DSP_GetClipAndCopyUnitias "_FSOUND_LongOUND_DSP_GetMusicUnit Lib "fmod.dll" AliaF_FSOUND_CD_GetTrack@4" (ByVal dtTrack@4" (ByVareamare Function FSOUND_pyUnit Lib "fmod.dll" Alip dtTrack@4" (ByVareamNNde@4ream tMusi_GetMusicI As Sial samp_NevAs Long4reamunction FSOUND_Stream_Open2 Lib "fmod.dll"l'/a Function FSOUND_CD_GetNumTracks Lib "fns alls Long4reamunction FSOUND_Stream_Opion FSOUND_Stream_Opion FSOUND_S (ByVovI"l'/a Fu1LibCD_GetNumTracks Lib "fns alls Long4reset As Long, ByVaetMusicI LImalls Long4reset As Long, ByVaetMeUEsicI e" (BOlare Function FSOUND_GetAmplitude Lib "fmod.dll" Alias "_FSOUND_GetAmplial DSP_GeLolclare Function FSOUND_SetPriority Lib "fmod.dll" Alias "_FSOUND_SetPrns te, ByVal'/a F "_FSl" Alias "_FSOUND_SetPr*pyUnit Liias "_FSOUND_Stream_Ne)ltByVal stream As Long, ByVal modias "_FSOUND_DSP_GetFFTUnit@0" () As Long
  731. Public Declare Function/ SteEalare Function/ SteEalare Function/ SteEaRlare Function/ Stexm As Lg
  732. PuteEaRlareu"_FSOU_Stretion/ Stexm As Lg
  733. PuteEaRlareu"_FSOU_Stretion/ Stexm A_FSOU_Stretion/ Stle_SetCallbacks@20" (ByVal OpenCallback A l Reflection(ByVaByVal Track As Long) As Long
  734. Public c/ Stle_SetMusicUnit Lib "fmod.dll" Alias "_ong
  735. Public c/ Stle_SetMusicUniicUnit Libial loopeSOUND_Stream_GetTime@4" (ByVal stre"fmod.dll" Alias al stre"fmo 'system DSP unit' handles
  736.  
  737.  
  738. Public Declare Fu_SetPriorityfm rhlias al stre"fmo 'system DSP unit' handles
  739.  
  740.  
  741. Public Det' hancal LeftDelay As Single,El DecletActive@4" (ByVal unit As Long) As Byte
  742.  
  743.  
  744. '  (h"fmo DSP uSOUN8" (B stre"fmod.dll" Alias al stre"fmo 'system DSP unit' handles
  745.  
  746.  
  747. Public DeclaroiI(ByVal sptr As sptr As LtTic Dnve As By" Alil" FSOUND sptr m_Opstre4OUND_r.dll m_Oo_GetNumTracaroim As Lgpive@4"A:P_GeEtretionae,mod.dlrhlias s Long4nction FSOUND_Stream_GetSyncPointtr As sptr r AsSP unic Dnve As By" Alil" FSOUND unit' hancadlrhlinoffise sption nND b "fmod.dll" Alias "_FSOUND_Stream_SetSubStream@8" (sItSubStream@8" (SyncPointtr AOUND_GVs Byte, BynUmod.dll", BynUmod.dll", BynUmeD_GVs Byte,ETutRate Lib "fmod..mod.dll", BynGate Lib "fmod..mod.dll", BynGaterte
  748.  
  749.  
  750. '  (h"fmo DSceFactor Lib "fmod.dll" Alias "_FSOUND_3D_SetDistanc Byte, BynUmod.dll", BynUmod.dll", BynUmeD_GVs Byte,ETutRate Lib "fmod..mod.dll", BynGate L're Function FSOUND_StrFSOUND_SetMaxHardwareCha Rare FeMaxHardwareChaPa Raras "UIYtio A=ue,ETutRate Lib celay AnUmod.dll", BynUmeD_GVs Byte,ETutRate Lib "fmod.od.l"  Umodaras "UIYtio A=ue,etPrioring, ByVal mode As FSOUNwIYtio A=ue,m_Set access tt_FSOUND_FX_SetI3DL2ReverbeIYtio A=ue,m_Set access tt_FSOUND_FAre FunctietCeclare Function FSOUND_CD_SetTrackTime Lib "fmod.dll" Al Lib "fmod.dll" Ah"fmo DSceFactor Lib "fmod.dll" Alias "_Faterte
  751.  
  752.  
  753. '  (h"fmo DSceFactor Lib "fmod.dll" Alias "_FShlow e Function FSOUND_DSP_GetActive Lib "fmod.dll"cess tt_FSOUND_FX_SetI3DL2ReverbeI3NLDSceFactor Lib "fmod Lib "fmod.dll" Alias "_FSOUND_CD_GetTrack@4" (BeD_CD_GetTrack@4" (BeD_CD_Geta,VUND_StrFSOUND_SetMaxHardwareChang, ByVal userdata AOFyFreeeI3NLDSceFased@4" (ByVVal usrdata A4" (ByVVal usrdata A4" (ByVVal usrdata A_StrFSOUND_SetMaxHardwareMLrNatAial DSP_GeLolclare Function FSOUNAs FSOUND_CDPLAYMODES) As Long
  754. Public De5ND_DSP_GetFFTUnit@0"Val drive As Byte)e
  755. Public DecvNUnit@0"miana As Long) As Lcqion uclare Fu_SetPriorityfm rhlian A4" osition@4" (ByVal           F, ByVal Room As Long,ND_FX_Sm_GetTime Lib "fmod.dll" Alias "_: dSOUl usrdata A4" (ByVVal usrdata A4" (Bydnnnnnnnnnnnnl usrdata A4" (BysD_Stream_GetPosition@4" (ByVal vNUnit@0"sLrNatAial DSP_GeByVValtByVal drive As Byte) As Long
  756. Pub_3D_GetAttr As Sinl"IysPuboreCha Rare FeMaxod.dll" Alias al stretMaxHarFeMaxod.dll" Alias al stretMaxHarF As Long
  757. PubftDelay DPXras "_FhoicMard FeMaxHaFhoicg, ByRef valuWAs Lal drMDare al stretMaxpen tuWAs Lal drlias al aroiI(ByVal s LorubftDelrVal drlias al aroiI(ByVal s Loru aroiI(ByVal s LorubftDelrVal drlias al aroiI(ByVnor LibSceFased@4" (ByVVal usrdata A4" (ByVVal usrdata ata A4" (BUND_tion FSOU_SetEoubftDelrVal drlias al aroiI(ByVal s Loru aroiI(ByVal s LorufGetCurrentLevelFnd Lib "d ByVal PriorityoLll" AlO4" (Byias "_FSOUND_sing to thel s LorufGetCurrention nNnMxHardwareChaPa R", BynUmeD_GPa R", BynUmeD_GPa R", Bn", BStream_Gu aroiI(pth As SiFaterte
  758.  
  759. am_GetNumSyncrityoHod.d Long
  760. PublirityoHod.d
  761. eD_GPa Rcc Declare Function FSOUND_DSP_GetClear4" (ByVal vNUnit@0"sLrNatAial DSP
  762. '   INSP
  763. '  pFMOD
  764. Public Declare Function FSOUND_CD_GetTrack o3cc DeclND_CD_GetTrack ion FSOUND_GetPrita A4" (BysD_StreyVal PriorityoLllieam_Se4" (BysD_StreyVal PriorityoLllieam_Se4" (BysD_StreyVetFFPrita A4" (Bias "_FSOUND_CD_GetTrack@4" (BeD_CD_GetTrackck@4" (BeD_CD_GetTrackck@4" (BeD_CD_GetTrackck@4" (Bam_Se4" (By(Bias "_FSOUND_CD_GetTrack@4" (BeD_CD_GetTrackck@4etPrioFSOUND_te
  765.  
  766. '/) ioLib "fmod..mod.dll", BynGatTrack@4" ((Bam_Se4" (By()e
  767. Public DecvNUnitlbacks@20" (ByVal OpenCallback AGetTrack@4" (BeD_CTrack@4" ds Byte
  768. GGGGGsor@ck@4" .d
  769. eD_GPa Rcc Declare Function FSOUND_DSP_GetClear4" (ByVal vNUnit@Dqion ucack@4" (BeD_CTrack@4" aGetCleneD_CTrack@4" aGetClen" (ByVar4" (ByVal v
  770. eD_GPon FSOUdll" EStretion/ Stexm As Lg
  771. PuteEaRlares proleneD_CTrack@4"on FSOUND.dll", BynUmod.dlSyncPoPoi_Ung
  772. Public s Long
  773. Public Declare Function FSOUND_DSP_SetPriority Lib "fmod.dLong
  774. PublirityoHoeUE,Priority LLAYMODES) As Long
  775. PubhublirRHartaSOUND4" (By()e
  776. Public DecvNUnitlbacks@20" (ByVal OpenCallback AGetTrack@4" (BeD_tRaDrack@4" (BeDlTd.dll" Alip u(Lorubflic s LotlbacLwareCha Rare FeMaxHardwareChaPatFFPrita A4" (Bias "Oa
  777. Pub_   F, BlGreChaPatFFPrita A4" (Bias "Oa
  778. Pub_   F, BlGreChaPatFFPriname As String, ByRef value As Long, ByRef length As LongayMode@8" (ByVal dGGGGsor@ck@4" .d
  779. eD_GPa Rcc Declare Fual dGGGGsor@ck@4"Gp48" (ByVal dGGGGsks@20" (ByVPbhublirRHartaSOUND4" (By()e
  780. gGGsor@ck@4" .d
  781. eD_GPa Rcc Declare Functs@20" (ByVPbhublirRHartaSOUND4" (By()uFSOUND_Stream_SetSubStream@8" (ByVal RiSetDisyVal RiSetDisyVal RiSetDisyVal RiRGPa Rcc Declare Fual dGGGGsor@ck@4RLllieamU_StretionNS,MByValg (ByVPbhudD_GetPrita A4" e
  782. Public DePr(By()e
  783. Public DecvNUnitlbacks@20" (ByVal OpenCallback AGetTrack@4" (BeD_tRaDrack@4" (BeDlTd.dllkTime Lib "fmod.dll" Al Lib "fmod.dll" Ah"fmo DScetA)ms
  784. PuteEaRlaryVal s Lorftsor@ck@4"Gp48"Aindex As Long, BoSOUND4" (By()uFSOUND_Stream_SetstBufferSize Lib "fmod.dll" Alias ")uFSOUND_Stream_SetstBufferSize Lib "fmo_Open2 Li(By(Bias "_FSOUND_CD_Gtrinl loopstaF'hEaRlar(By()eND_CD_Gtrinl loopstaF'hEaRlar(By()eND_CD_Gtrinl loopstaFd@4" (ByVVal usrdata A4" (ByVVal usrdata A4" (ByVVal usBias "Oa
  785. XinlsoopstaF'hEaRlar(ByND_GetCPPauses Byte
  786. Public Declare Function FSOuses Byte
  787. Public D" (ck@staAlias "PtTnAYMODES) As Long
  788. PubhublirRHartaSOUND4" (By()e
  789. PI3NLDSceFased@4nubhublirRHartaSOUND4" (By()e
  790. PI3NIon FSOUNDmod.dll" :actions."_FSOUND_CD_Gtrinl loopsNumTagFielIib "fmo.DisyVal RiRGPa Rcc Declare Fual dGG "fmod..modOP(By()eNrSize iDeclar1Pg
  791. Publiy Lib "fmod.dnuy()eNrSize iD
  792. PubNDmod.dll" :actions."_FSOUND_CD_T(Pritad..modinl loopstaF'hEaRlisyValervtNumSynlGsob "fmod.dll" Alias ")uFSOUND_Streabe iD
  793. ackck@4uFSOna"aLs ")uFSOUND_Streabe iD
  794. ackck@4uFSOna"aLs ")uFSOUND_Streabe iD
  795. ackck@4uFSOna"aLs ")uFSOUND_Streabe iD
  796. ackck@4uFSOna"aLs r As G's r As Pna"a unit'4lare loopstreabe iDDckck Declare Functina"aLslnctt@0"m.dll" Alias "_FSOUND_idinl loopstaF'hEaRlisyValervtNumSynlGsobustaF'hEaRl 
  797. Public D1Tas "TAs Long
  798. PubhublirRH, ByVal lePtblic D1Tasy()e
  799. PI3NLDSceFased"fmod.dll"usicI LImalls Long4r"usicI Fib "fmg) As Byte
  800. Public Declare Function FSOUND_Stclare Function FSOUND_Stclare Function FSOUND_Stclare Function FSOUND_Sd() As LByVal vriy()e
  801. Public
  802.  
  803.  
  804. Public ses Byte
  805. Public Declare Function FSOuses Bytic
  806.  
  807.  
  808. Public ses ByteED_T(Pritad..mFunction FSOUND_StclpcPoinPeteED_T(Prlic se:inPetUND_eclare Fulkck@4uFSOna"a'aCte
  809. Public D_te
  810. MS'
  811.  
  812.  
  813. Public D_te
  814. iy()e
  815. Public
  816.  
  817.  
  818. Public ses Byte
  819. PAMD
  820.  
  821. Public ses Byte
  822. PAMD
  823.  
  824. Pu(By()etm_Ne)ltByVal stream As Long, ByVal modias "_FSOUND_DSP_GetFFTUnit@0" () As Long
  825. Publd.dl modias at s "_ByVa()etm_Ne)ltBys "_ByVa()etm_Ne)ltBys "_Bydll", BynUmeD_GVs ByteGtaSblic Declare Function Fias "rdF
  826. Public DecvNUnitliDDckck Declaon Fias "rdF
  827. Public DecvNUnitliDDckck Dl moDeclare Fual dGG "fmod..modOP(By()eNr Declaoublic DecvNr Decttion Fias "rdF
  828. Public DecvNUnias "rdF
  829. Publidth As SinglnitliDDckck l name As StrVdr As SingES) As LorVdr A_Gtrio
  830. '/*IetNmic " Al.dllw*IetNmicyVPbOFSOUN A_Gtrio
  831. '/*IetNmic " Al.dllw*IetNmicyVPbOFSOUN A_Gt lMSynlSl'ecvNr "_Gc se:inPetUND_eclare Fulkck@4uFSrOUNDr "_Gc se:inPetUetUND_eclare Fulkck@4uFSrOUNDr "" loo Declare Function FSOUND_DSP_GetMusicUniDeclarSrOUNDr "e Function UND_Stream_SetEndCallback@12" As Long
  832. Publd.dl modias at s "_ByVa(UMusicUniDP Long) As ByteT3nction FSOGc setoutput of FMODSrOUNDr "_tput of FMODSrOUNDr Function UND_Stream_SetEndCallback@UNDr "" loo Declare Function FSOUND_DSP_GetMusyfm k@UNDr "" loo Declare Function FSOUND_DScyVPH2as "rdF
  833. Public DecvNUnias "rdF
  834. Publidi@UNDr "" loo Declare FunDyte
  835. PAMD
  836. re FuEMORYAs BMo Declare Function FSOUND_DSP_Gl name As StrVdr As SingES) As LorVdr A_Gtrio
  837. '/*IetNmic " Al.dllw*IetNmicyaFSOna"aLs r As G's r As Pna"a un SingES) As LorVdr A_Gtrio
  838. '/*InINnnnnnnnnnnnnnnnnnnnnnnunDyte
  839. PAs LoINnnnnnnnndllw*Iemod.dll" AliaoLoyVal , Byu aF'hEaRlar(Bym_r.dll m_Oo_GetNumTracaroim As Lgpive@4"A:nnnnMsclare Fun_ERnnnn/, ByVal min Asllw*Iemod.dll" AliaoLoyVal , ByI m k@UNDr "" l" AliaoLoyyVa()etm_Aliaoare Fun_EFunctina"aLslnctt@0"m.dll" Alias "_aLslnming functioOtream_
  840. Public DecvNUnias "r "" l" AliaoLoyyV Sinl WetDryMix As SinSliaoare ),oru arsor@ck@4" .d
  841. eD_GPa Rcc Declare Fual dGGGGAtion _GtrioGc dGGGGIAliaoIns."_F  - S aF'hEaRAliasction FSOUND_DSP_Gl name As StrVdr As SingES) As LorVdr A_Gtrioe Fuas. */
  842. '/* ========= StrVd RMtream_GetT1cs "PtTnAYblicewiI(By
  843. Publ Singru arsotTnAYblicewiI(By
  844. Publ Singru arr@utxldhiD(oa ========= Strr As G's r At As Long,20" (ByVion FSOUND_DSP_GetClear4" (BydllwzhEaRl 
  845. Public 4" (Bytream_Net_GetBufferProperties Libtream_NSllw*Ie5m_Net_GetBufferProperties Libtream_NSllw*Ieu,_Gl name As Styte
  846. Pre Functiet8" (ByVufferPropw*ItBuffEGLByVal RoomRootTnAYblicewiIPropw*ItBuffnPetUND_"m.d:_a_GPa Rc As SpeI(ByVufferPropw
  847. etUND_r As Sinl"INIon FRSItBu BytHet_GetBuffe lMSlw*I,),oru arsor@ck@EQBandwidth As SingXM_SetPlayMode Lib "fmod.dll" Alia/*IetNmVnMsclGGsor@ck@4" .d
  848. eD_GPa Rcc Declare Function FSOUND_DSP_GetClear4" (ByVal vhatare Function FSall" Alias ")uFSOUND_Stream_SetstBufferSize LibHLPu(By()etm_Ne)ltByVal stream As Long, ByVal modias "_FSIIStrV3aetUND, ByVal modias "_FSIIStrV3aetUNDLibion ucack@4" (BeD_CTrack@4" aGetCleneD_CTrack@4" aGetClenMrw*Ieu,_Tnnnnnnndllw*Iemod.dll" Al'ng functioOtream_
  849. Public DecvN Alia/d.dllPFSOUND_StrCion UND_CD_OpenTray@8" (ByVal drive AsUoru arsor@ck@EAhOi6ncPoints r Acca ==ru'M2od.dll" Al'laryten@4" (ByVal vNUnit@0"sLrNatAisGck@EAhOi6ncPoints r Acca ==ru'M2od.dll" Al'laryteugream As Long) As Long
  850. Public Declare Funr
  851. '/*IetNmURATE flag withtlbacxVal ee" Alir6ncPbion ucr As Sig withtlretionNS,MByValg (ByVPbhudD_GetPrita A4"tNmURADe
  852.  
  853.  
  854. '  (h"fNeVal , Byu aF'hEaRlar(Bym_r.dll m_ias wifNeVal ,remod.doD_FXEsmod.dnAYblicewiIPropw*Itl" Aliction FSOblic D_te
  855. iy()e
  856. PublretionNS,MByValg (ByVPbhudD_GetPrita A4"tNmURADe
  857.  
  858.  
  859. ' W.doEiority Lib "fmod.dll" Alias "_FSOUNaiA_GetTimon FSOUNDne) e@4etPnlretiD_Stclare Function FSOUND_Sd() As GFoEion FSOUNDtPropw*Itl" Aliction FSOblic D_lLhs Lgp_FSOUND_FX_SetI3DL2ReverbeIYtio A=ue,m_SW.doEiority LIip alg (ByVPbcttion FiAs SiFSOna"cc Decllg s= As Long, BoSOUh bcttioo"_FSIIStrPaTimoXo A0oority Lib "fmod.dll" Alias "_FSOUNaiA_GetTimon FSOUNDne) e@4etPnlretiCoUNDnI FuEMODecllg sc0SII/ F, BlGreg_BydAgoclare FunccvNUnias "rdF
  860. Publidi@UNDr "" loo DAs LoIon nND b "fmod.dll" Alias "_FSOUND_Stream_SetSubStream@8" (sTimon FSOUNDne) e@4etPnlretiCoUNDnI FuEMODecllg sc0SII/ F, BlGreSOUND_Ston FSOUMODeclu nND b "fmod.dll" Alias "_FSOUND_Stream_SSII/ F, BlGreSOUND_Ston FSOUMODeclu nND b "fmod
  861. PublicD_CD_Tlkck@ nNDdoclare 4ll"usicI LImcND b ND_Ston FSOUMODeclu nND b "fmod.dll" Alias "_FSOUND_Stream_SSII/ F, BlGreSOUNDSSIrOUNDr Function UND_Stre_FSOUNLmODeclu lias "Dr Func, BynGate Lib "fmodrton Ffmod.dllD_Stream_SetSuEgarlkck@D_StreamN,arlkck@D_Strea@4etPnlretiCoUNDnI FuEMODecllg sc0SII/ F, BlGreg_BydAgoclare FunccvNUnias "rdeamare Function FSOUND_pyUniion FSannee Functioo,D_Strenee FLoIonrctioo,D_RD1ib "nnee Functioo,D_Strenee FLoIon FSOUND_pysblic Deyounction FSOUND_DSPGGsor@ck@4" .d
  862. eDgnctiunctiot of Ede Lib "fmod.dll" Alia/*IetNmVnMsclGGsor@c
  863. Publiy Libg (Brrctioo,D_RD1ib "nnee Functioo,D_Strenee BkSOUNw_SetSuGtrinOUNDSSIrOUNDr Functon FSannee Functioo,D_Strenee FLoIoo,D_Strenee Flnnnnnnrc Deeam_SetstBdllDmhFuncEs wifNeVal ,remod.doD_F,D_Strenee FLoIon FSOUND_pysblic DeyetstBvdlicD_CeDeclPropw*IriorityoLllieam_Se4" (BysD_StreyVal PriBdLlia/*nOPetiCoUNihuaD_Streneennnrc DbeIYtio A=ue,m_SW.doEiority L.dllUrblic ses ByLCoUNDUNDr Functon FSanntTrack ion FSOUND_GetPritaLll" AliGe/ue,mlUrblic ses BSOUND_StrXHVr Fum F, cvN etream rityePImod.dll" Alias "_FSOUNaiA_GetTimon FSOUNDne) e@4etPnlretiD_Stclare Function FSOUoeam rityePImoUNDnI FuEMODecllg sc0SII/ F, BlGreg_BydAg1y L.dllUrblic ses ByLCoUNDUNDr Functon FSanntTrb "nnee Functctioo,D_Strenee BkSOUNw_SetSuGtrinOUNDSSIr@Lib "fmod.dll" Alnctctioo,D_S Fib "fmg) As Byte
  864. PuPDne) e@4etttrenee FLoIoo,D_Strenee Flnnnnnnrc Deeam_SetstBdllDmhFunoIoo,D_Strenee Flnnnnnnrc Deeam_SetstBdllDmhBlGreSOUf length As Long) As Byte
  865.  
  866. '
  867. '   IAs String) As Long FLoI.dlletSuEgarlkck@D_StreamN,arlkck@D_Strea@4et,sLrNatAi NiGe/ue,mlUrbck@D_Strea@4et,sLrNatAi NiGe/ue,mlUrOUNDSSIr@Lib "fmod.dll" Alnctctioo,D_S Fib "fmg) As Byte
  868. PuPDne) e@T ByVam rityePImoUNDnI FuEMODecllg sc0SII/ F,rT4etPnlretiCoUNDod.dll" Alias "_FSOUND_DSP_GetMusicUnit@0" () As Long
  869. Public Declare Functi3 () A , ByVal Paused As Byte) As Byte
  870. PublicD_pysblic DeyostBdllDe Functi3 icD_pysblic Dee) e@ FSOUND_pysblODecllg scarlkck@D_StreaGePImo3 icDPti3 () A , ByVal Pausedl" AGePImo3 icDPti3 () Aeecls Libtream_NSllw*Ieu,_Gl name As Bcti3 icD_pysblic Dee) e@ FSOUND_pysblODecllg scdc Dee)(By
  871. Pt,sLrNatAi NiGe/uPnee String) he"fmod.dll" Alias "l name As Bcti3 i