0
0

Can anybody help me? I want to use FMOD in VB.NET. I imported the fmod.bas file, en transformed it to VB.NET code. But when I do that, my first 50 lines of code gives me errors. Under here, u can find my code, and the error I get is “statement is not valid in namespace”.
Does anybody know what I did wrong?

Thx

‘UPGRADE_WARNING: Structure FSOUND_OUTPUTTYPES may require marshalling attributes to be passed as an argument in this Declare statement. Click for more: ‘ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword=”vbup1050″‘
Public Declare Function FSOUND_SetOutput Lib “fmod.dll” Alias “_FSOUND_SetOutput@4” (ByVal outputtype As FSOUND_OUTPUTTYPES) As Byte
Public Declare Function FSOUND_SetDriver Lib “fmod.dll” Alias “_FSOUND_SetDriver@4” (ByVal driver As Integer) As Byte
‘UPGRADE_WARNING: Structure FSOUND_MIXERTYPES may require marshalling attributes to be passed as an argument in this Declare statement. Click for more: ‘ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword=”vbup1050″‘
Public Declare Function FSOUND_SetMixer Lib “fmod.dll” Alias “_FSOUND_SetMixer@4” (ByVal mixer As FSOUND_MIXERTYPES) As Byte
Public Declare Function FSOUND_SetBufferSize Lib “fmod.dll” Alias “_FSOUND_SetBufferSize@4” (ByVal lenms As Integer) As Byte
Public Declare Function FSOUND_SetHWND Lib “fmod.dll” Alias “_FSOUND_SetHWND@4” (ByVal hwnd As Integer) As Byte
Public Declare Function FSOUND_SetMinHardwareChannels Lib “fmod.dll” Alias “_FSOUND_SetMinHardwareChannels@4” (ByVal Min As Short) As Byte
Public Declare Function FSOUND_SetMaxHardwareChannels Lib “fmod.dll” Alias “_FSOUND_SetMaxHardwareChannels@4” (ByVal Min As Short) As Byte
Public Declare Function FSOUND_SetMemorySystem Lib “fmod.dll” Alias “_FSOUND_SetMemorySystem@20” (ByVal pool As Integer, ByVal poollen As Integer, ByVal useralloc As Integer, ByVal userrealloc As Integer, ByVal userfree As Integer) As Byte
‘UPGRADE_WARNING: Structure FSOUND_INITMODES may require marshalling attributes to be passed as an argument in this Declare statement. Click for more: ‘ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword=”vbup1050″‘
Public Declare Function FSOUND_Init Lib “fmod.dll” Alias “_FSOUND_Init@12” (ByVal mixrate As Integer, ByVal maxchannels As Integer, ByVal flags As FSOUND_INITMODES) As Byte
Public Declare Function FSOUND_Close Lib “fmod.dll” Alias “_FSOUND_Close@0” () As Integer
Public Declare Function FSOUND_Update Lib “fmod.dll” Alias “_FSOUND_Update@0” () As Integer
‘UPGRADE_WARNING: Structure FSOUND_SPEAKERMODES may require marshalling attributes to be passed as an argument in this Declare statement. Click for more: ‘ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword=”vbup1050″‘
Public Declare Function FSOUND_SetSpeakerMode Lib “fmod.dll” Alias “_FSOUND_SetSpeakerMode@4” (ByVal speakermode As FSOUND_SPEAKERMODES) As Integer
Public Declare Function FSOUND_SetSFXMasterVolume Lib “fmod.dll” Alias “_FSOUND_SetSFXMasterVolume@4” (ByVal volume As Integer) As Integer
Public Declare Function FSOUND_SetPanSeperation Lib “fmod.dll” Alias “_FSOUND_SetPanSeperation@4” (ByVal pansep As Single) As Integer
Public Declare Function FSOUND_File_SetCallbacks Lib “fmod.dll” Alias “_FSOUND_File_SetCallbacks@20” (ByVal OpenCallback As Integer, ByVal CloseCallback As Integer, ByVal ReadCallback As Integer, ByVal SeekCallback As Integer, ByVal TellCallback As Integer) As Integer
Public Declare Function FSOUND_GetError Lib “fmod.dll” Alias “_FSOUND_GetError@0” () As FMOD_ERRORS
Public Declare Function FSOUND_GetVersion Lib “fmod.dll” Alias “_FSOUND_GetVersion@0” () As Single
Public Declare Function FSOUND_GetOutput Lib “fmod.dll” Alias “_FSOUND_GetOutput@0” () As FSOUND_OUTPUTTYPES
Public Declare Function FSOUND_GetOutputHandle Lib “fmod.dll” Alias “_FSOUND_GetOutputHandle@0” () As Integer
Public Declare Function FSOUND_GetDriver Lib “fmod.dll” Alias “_FSOUND_GetDriver@0” () As Integer
Public Declare Function FSOUND_GetMixer Lib “fmod.dll” Alias “_FSOUND_GetMixer@0” () As FSOUND_MIXERTYPES
Public Declare Function FSOUND_GetNumDrivers Lib “fmod.dll” Alias “_FSOUND_GetNumDrivers@0” () As Integer
Public Declare Function FSOUND_GetDriverName Lib “fmod.dll” Alias “_FSOUND_GetDriverName@4” (ByVal id As Integer) As Integer
Public Declare Function FSOUND_GetDriverCaps Lib “fmod.dll” Alias “_FSOUND_GetDriverCaps@8” (ByVal id As Integer, ByRef caps As Integer) As Byte
Public Declare Function FSOUND_GetOutputRate Lib “fmod.dll” Alias “_FSOUND_GetOutputRate@0” () As Integer
Public Declare Function FSOUND_GetMaxChannels Lib “fmod.dll” Alias “_FSOUND_GetMaxChannels@0” () As Integer
Public Declare Function FSOUND_GetMaxSamples Lib “fmod.dll” Alias “_FSOUND_GetMaxSamples@0” () As Integer
Public Declare Function FSOUND_GetSFXMasterVolume Lib “fmod.dll” Alias “_FSOUND_GetSFXMasterVolume@0” () As Integer
Public Declare Function FSOUND_GetNumHWChannels Lib “fmod.dll” Alias “_FSOUND_GetNumHWChannels@12” (ByRef num2d As Integer, ByRef num3d As Integer, ByRef total As Integer) As Object
Public Declare Function FSOUND_GetChannelsPlaying Lib “fmod.dll” Alias “_FSOUND_GetChannelsPlaying@0” () As Integer
Public Declare Function FSOUND_GetCPUUsage Lib “fmod.dll” Alias “_FSOUND_GetCPUUsage@0” () As Single
Public Declare Sub FSOUND_GetMemoryStats Lib “fmod.dll” Alias “_FSOUND_GetMemoryStats@8” (ByRef currentalloced As Integer, ByRef maxalloced As Integer)
‘UPGRADE_WARNING: Structure FSOUND_MODES may require marshalling attributes to be passed as an argument in this Declare statement. Click for more: ‘ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword=”vbup1050″‘
Public Declare Function FSOUND_Sample_Load Lib “fmod.dll” Alias “_FSOUND_Sample_Load@20” (ByVal index As Integer, ByVal name As String, ByVal mode As FSOUND_MODES, ByVal offset As Integer, ByVal length As Integer) As Integer
Public Declare Function FSOUND_Sample_Alloc Lib “fmod.dll” Alias “_FSOUND_Sample_Alloc@28” (ByVal index As Integer, ByVal length As Integer, ByVal mode As Integer, ByVal deffreq As Integer, ByVal defvol As Integer, ByVal defpan As Integer, ByVal defpri As Integer) As Integer
Public Declare Function FSOUND_Sample_Free Lib “fmod.dll” Alias “_FSOUND_Sample_Free@4” (ByVal sptr As Integer) As Integer
Public Declare Function FSOUND_Sample_Upload Lib “fmod.dll” Alias “_FSOUND_Sample_Upload@12” (ByVal sptr As Integer, ByRef srcdata As Integer, ByVal mode As Integer) As Byte
Public Declare Function FSOUND_Sample_Lock Lib “fmod.dll” Alias “_FSOUND_Sample_Lock@28” (ByVal sptr As Integer, ByVal offset As Integer, ByVal length As Integer, ByRef ptr1 As Integer, ByRef ptr2 As Integer, ByRef len1 As Integer, ByRef len2 As Integer) As Byte
Public Declare Function FSOUND_Sample_Unlock Lib “fmod.dll” Alias “_FSOUND_Sample_Unlock@20” (ByVal sptr As Integer, ByVal sptr1 As Integer, ByVal sptr2 As Integer, ByVal len1 As Integer, ByVal len2 As Integer) As Byte
‘UPGRADE_WARNING: Structure FSOUND_MODES may require marshalling attributes to be passed as an argument in this Declare statement. Click for more: ‘ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword=”vbup1050″‘
Public Declare Function FSOUND_Sample_SetMode Lib “fmod.dll” Alias “_FSOUND_Sample_SetMode@8” (ByVal sptr As Integer, ByVal mode As FSOUND_MODES) As Byte
Public Declare Function FSOUND_Sample_SetLoopPoints Lib “fmod.dll” Alias “_FSOUND_Sample_SetLoopPoints@12” (ByVal sptr As Integer, ByVal loopstart As Integer, ByVal loopend As Integer) As Byte
Public Declare Function FSOUND_Sample_SetDefaults Lib “fmod.dll” Alias “_FSOUND_Sample_SetDefaults@20” (ByVal sptr As Integer, ByVal deffreq As Integer, ByVal defvol As Integer, ByVal defpan As Integer, ByVal defpri As Integer) As Byte
Public Declare Function FSOUND_Sample_SetDefaultsEx Lib “fmod.dll” Alias “_FSOUND_Sample_SetDefaultsEx@32” (ByVal sptr As Integer, ByVal deffreq As Integer, ByVal defvol As Integer, ByVal defpan As Integer, ByVal defpri As Integer, ByVal varfreq As Integer, ByVal varvol As Integer, ByVal varpan As Integer) As Byte
Public Declare Function FSOUND_Sample_SetMinMaxDistance Lib “fmod.dll” Alias “_FSOUND_Sample_SetMinMaxDistance@12” (ByVal sptr As Integer, ByVal Min As Single, ByVal max As Single) As Byte
Public Declare Function FSOUND_Sample_SetMaxPlaybacks Lib “fmod.dll” Alias “_FSOUND_Sample_SetMaxPlaybacks@8” (ByVal sptr As Integer, ByVal max As Integer) As Byte
Public Declare Function FSOUND_Sample_Get Lib “fmod.dll” Alias “_FSOUND_Sample_Get@4” (ByVal sampno As Integer) As Integer
Public Declare Function FSOUND_Sample_GetName Lib “fmod.dll” Alias “_FSOUND_Sample_GetName@4” (ByVal sptr As Integer) As Integer
Public Declare Function FSOUND_Sample_GetLength Lib “fmod.dll” Alias “_FSOUND_Sample_GetLength@4” (ByVal sptr As Integer) As Integer
Public Declare Function FSOUND_Sample_GetLoopPoints Lib “fmod.dll” Alias “_FSOUND_Sample_GetLoopPoints@12” (ByVal sptr As Integer, ByRef loopstart As Integer, ByRef loopend As Integer) As Byte
Public Declare Function FSOUND_Sample_GetDefaults Lib “fmod.dll” Alias “_FSOUND_Sample_GetDefaults@20” (ByVal sptr As Integer, ByRef deffreq As Integer, ByRef defvol As Integer, ByRef defpan As Integer, ByRef defpri As Integer) As Byte
Public Declare Function FSOUND_Sample_GetDefaultsEx Lib “fmod.dll” Alias “_FSOUND_Sample_GetDefaultsEx@32” (ByVal sptr As Integer, ByRef deffreq As Integer, ByRef defvol As Integer, ByRef defpan As Integer, ByRef defpri As Integer, ByRef varfreq As Integer, ByRef varvol As Integer, ByRef varpan As Integer) As Byte
Public Declare Function FSOUND_Sample_GetMode Lib “fmod.dll” Alias “_FSOUND_Sample_GetMode@4” (ByVal sptr As Integer) As Integer
Public Declare Function FSOUND_Sample_GetMinMaxDistance Lib “fmod.dll” Alias “_FSOUND_Sample_GetMinMaxDistance@12” (ByVal sptr As Integer, ByRef Min As Single, ByRef max As Single) As Byte
Public Declare Function FSOUND_PlaySound Lib “fmod.dll” Alias “_FSOUND_PlaySound@8” (ByVal channel As Integer, ByVal sptr As Integer) As Integer
Public Declare Function FSOUND_PlaySoundEx Lib “fmod.dll” Alias “_FSOUND_PlaySoundEx@16” (ByVal channel As Integer, ByVal sptr As Integer, ByVal dsp As Integer, ByVal startpaused As Byte) As Integer
Public Declare Function FSOUND_StopSound Lib “fmod.dll” Alias “_FSOUND_StopSound@4” (ByVal channel As Integer) As Byte
Public Declare Function FSOUND_SetFrequency Lib “fmod.dll” Alias “_FSOUND_SetFrequency@8” (ByVal channel As Integer, ByVal freq As Integer) As Byte
Public Declare Function FSOUND_SetVolume Lib “fmod.dll” Alias “_FSOUND_SetVolume@8” (ByVal channel As Integer, ByVal Vol As Integer) As Byte
Public Declare Function FSOUND_SetVolumeAbsolute Lib “fmod.dll” Alias “_FSOUND_SetVolumeAbsolute@8” (ByVal channel As Integer, ByVal Vol As Integer) As Byte
Public Declare Function FSOUND_SetPan Lib “fmod.dll” Alias “_FSOUND_SetPan@8” (ByVal channel As Integer, ByVal pan As Integer) As Byte
Public Declare Function FSOUND_SetSurround Lib “fmod.dll” Alias “_FSOUND_SetSurround@8” (ByVal channel As Integer, ByVal surround As Integer) As Byte
Public Declare Function FSOUND_SetMute Lib “fmod.dll” Alias “_FSOUND_SetMute@8” (ByVal channel As Integer, ByVal mute As Byte) As Byte
Public Declare Function FSOUND_SetPriority Lib “fmod.dll” Alias “_FSOUND_SetPriority@8” (ByVal channel As Integer, ByVal Priority As Integer) As Byte
Public Declare Function FSOUND_SetReserved Lib “fmod.dll” Alias “_FSOUND_SetReserved@8” (ByVal channel As Integer, ByVal reserved As Integer) As Byte
Public Declare Function FSOUND_SetPaused Lib “fmod.dll” Alias “_FSOUND_SetPaused@8” (ByVal channel As Integer, ByVal Paused As Byte) As Byte
Public Declare Function FSOUND_SetLoopMode Lib “fmod.dll” Alias “_FSOUND_SetLoopMode@8” (ByVal channel As Integer, ByVal loopmode As Integer) As Byte
Public Declare Function FSOUND_SetCurrentPosition Lib “fmod.dll” Alias “_FSOUND_SetCurrentPosition@8” (ByVal channel As Integer, ByVal offset As Integer) As Byte
Public Declare Function FSOUND_3D_SetAttributes Lib “fmod.dll” Alias “_FSOUND_3D_SetAttributes@12” (ByVal channel As Integer, ByRef Pos As Single, ByRef vel As Single) As Byte
Public Declare Function FSOUND_3D_SetMinMaxDistance Lib “fmod.dll” Alias “_FSOUND_3D_SetMinMaxDistance@12” (ByVal channel As Integer, ByVal Min As Single, ByVal max As Single) As Byte
Public Declare Function FSOUND_IsPlaying Lib “fmod.dll” Alias “_FSOUND_IsPlaying@4” (ByVal channel As Integer) As Byte
Public Declare Function FSOUND_GetFrequency Lib “fmod.dll” Alias “_FSOUND_GetFrequency@4” (ByVal channel As Integer) As Integer
Public Declare Function FSOUND_GetVolume Lib “fmod.dll” Alias “_FSOUND_GetVolume@4” (ByVal channel As Integer) As Integer
Public Declare Function FSOUND_GetAmplitude Lib “fmod.dll” Alias “_FSOUND_GetAmplitude@4” (ByVal channel As Integer) As Integer
Public Declare Function FSOUND_GetPan Lib “fmod.dll” Alias “_FSOUND_GetPan@4” (ByVal channel As Integer) As Integer
Public Declare Function FSOUND_GetSurround Lib “fmod.dll” Alias “_FSOUND_GetSurround@4” (ByVal channel As Integer) As Byte
Public Declare Function FSOUND_GetMute Lib “fmod.dll” Alias “_FSOUND_GetMute@4” (ByVal channel As Integer) As Byte
Public Declare Function FSOUND_GetPriority Lib “fmod.dll” Alias “_FSOUND_GetPriority@4” (ByVal channel As Integer) As Integer
Public Declare Function FSOUND_GetReserved Lib “fmod.dll” Alias “_FSOUND_GetReserved@4” (ByVal channel As Integer) As Byte
Public Declare Function FSOUND_GetPaused Lib “fmod.dll” Alias “_FSOUND_GetPaused@4” (ByVal channel As Integer) As Byte
Public Declare Function FSOUND_GetLoopMode Lib “fmod.dll” Alias “_FSOUND_GetLoopMode@4” (ByVal channel As Integer) As Integer
Public Declare Function FSOUND_GetCurrentPosition Lib “fmod.dll” Alias “_FSOUND_GetCurrentPosition@4” (ByVal channel As Integer) As Integer
Public Declare Function FSOUND_GetCurrentSample Lib “fmod.dll” Alias “_FSOUND_GetCurrentSample@4” (ByVal channel As Integer) As Integer
Public Declare Function FSOUND_GetCurrentLevels Lib “fmod.dll” Alias “_FSOUND_GetCurrentLevels@12” (ByVal channel As Integer, ByRef l As Single, ByRef r As Single) As Byte
Public Declare Function FSOUND_GetNumSubChannels Lib “fmod.dll” Alias “_FSOUND_GetNumSubChannels@4” (ByVal channel As Integer) As Integer
Public Declare Function FSOUND_GetSubChannel Lib “fmod.dll” Alias “_FSOUND_GetSubChannel@8” (ByVal channel As Integer, ByVal subchannel As Integer) As Integer
Public Declare Function FSOUND_3D_GetAttributes Lib “fmod.dll” Alias “_FSOUND_3D_GetAttributes@12” (ByVal channel As Integer, ByRef Pos As Single, ByRef vel As Single) As Byte
Public Declare Function FSOUND_3D_GetMinMaxDistance Lib “fmod.dll” Alias “_FSOUND_3D_GetMinMaxDistance@12” (ByVal channel As Integer, ByRef Min As Single, ByRef max As Single) As Byte
Public Declare Function FSOUND_3D_Listener_SetCurrent Lib “fmod.dll” Alias “_FSOUND_3D_Listener_SetCurrent@8” (ByVal current As Integer) As Integer
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 Integer
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 Integer
Public Declare Function FSOUND_3D_SetDopplerFactor Lib “fmod.dll” Alias “_FSOUND_3D_SetDopplerFactor@4” (ByVal fscale As Single) As Integer
Public Declare Function FSOUND_3D_SetDistanceFactor Lib “fmod.dll” Alias “_FSOUND_3D_SetDistanceFactor@4” (ByVal fscale As Single) As Integer
Public Declare Function FSOUND_3D_SetRolloffFactor Lib “fmod.dll” Alias “_FSOUND_3D_SetRolloffFactor@4” (ByVal fscale As Single) As Integer
‘UPGRADE_WARNING: Structure FSOUND_FX_MODES may require marshalling attributes to be passed as an argument in this Declare statement. Click for more: ‘ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword=”vbup1050″‘
Public Declare Function FSOUND_FX_Enable Lib “fmod.dll” Alias “_FSOUND_FX_Enable@8” (ByVal channel As Integer, ByVal fx As FSOUND_FX_MODES) As Integer
Public Declare Function FSOUND_FX_Disable Lib “fmod.dll” Alias “_FSOUND_FX_Disable@4” (ByVal channel As Integer) As Byte
Public Declare Function FSOUND_FX_SetChorus Lib “fmod.dll” Alias “_FSOUND_FX_SetChorus@32” (ByVal fxid As Integer, ByVal WetDryMix As Single, ByVal Depth As Single, ByVal Feedback As Single, ByVal Frequency As Single, ByVal Waveform As Integer, ByVal Delay As Single, ByVal Phase As Integer) As Byte
Public Declare Function FSOUND_FX_SetCompressor Lib “fmod.dll” Alias “_FSOUND_FX_SetCompressor@28” (ByVal fxid As Integer, 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
Public Declare Function FSOUND_FX_SetDistortion Lib “fmod.dll” Alias “_FSOUND_FX_SetDistortion@24” (ByVal fxid As Integer, ByVal Gain As Single, ByVal Edge As Single, ByVal PostEQCenterFrequency As Single, ByVal PostEQBandwidth As Single, ByVal PreLowpassCutoff As Single) As Byte
Public Declare Function FSOUND_FX_SetEcho Lib “fmod.dll” Alias “_FSOUND_FX_SetEcho@24” (ByVal fxid As Integer, ByVal WetDryMix As Single, ByVal Feedback As Single, ByVal LeftDelay As Single, ByVal RightDelay As Single, ByVal PanDelay As Integer) As Byte
Public Declare Function FSOUND_FX_SetFlanger Lib “fmod.dll” Alias “_FSOUND_FX_SetFlanger@32” (ByVal fxid As Integer, ByVal WetDryMix As Single, ByVal Depth As Single, ByVal Feedback As Single, ByVal Frequency As Single, ByVal Waveform As Integer, ByVal Delay As Single, ByVal Phase As Integer) As Byte
Public Declare Function FSOUND_FX_SetGargle Lib “fmod.dll” Alias “_FSOUND_FX_SetGargle@12” (ByVal fxid As Integer, ByVal RateHz As Integer, ByVal WaveShape As Integer) As Byte
Public Declare Function FSOUND_FX_SetI3DL2Reverb Lib “fmod.dll” Alias “_FSOUND_FX_SetI3DL2Reverb@52” (ByVal fxid As Integer, ByVal Room As Integer, ByVal RoomHF As Integer, ByVal RoomRolloffFactor As Single, ByVal DecayTime As Single, ByVal DecayHFRatio As Single, ByVal Reflections As Integer, ByVal ReflectionsDelay As Single, ByVal Reverb As Integer, ByVal ReverbDelay As Single, ByVal Diffusion As Single, ByVal Density As Single, ByVal HFReference As Single) As Byte
Public Declare Function FSOUND_FX_SetParamEQ Lib “fmod.dll” Alias “_FSOUND_FX_SetParamEQ@16” (ByVal fxid As Integer, ByVal Center As Single, ByVal Bandwidth As Single, ByVal Gain As Single) As Byte
Public Declare Function FSOUND_FX_SetWavesReverb Lib “fmod.dll” Alias “_FSOUND_FX_SetWavesReverb@20” (ByVal fxid As Integer, ByVal InGain As Single, ByVal ReverbMix As Single, ByVal ReverbTime As Single, ByVal HighFreqRTRatio As Single) As Byte
Public Declare Function FSOUND_Stream_SetBufferSize Lib “fmod.dll” Alias “_FSOUND_Stream_SetBufferSize@4” (ByVal ms As Integer) As Byte

  • You must to post comments
Showing 0 results
Your Answer

Please first to submit.