I need a complete example and working in visual basic of since(as,like) FMOD’s spectrum using.
Thank you!!

  • You must to post comments

This example will give you 33 single values (0-32) for current spectrum;
(It doesn’t you give the full spectrum)
actually, xSingleA1(0) is not used as spectrum -> 32 single values (1-32)

‘ Declarations
Option Explicit
Option Base 0

Private Declare Sub RtlMoveMemory Lib “kernel32” (lpvDest As Any, lpvSource As Any, ByVal cbCopy As Long)
Private Declare Function FSOUND_DSP_GetSpectrum Lib “fmod.dll” Alias “_FSOUND_DSP_GetSpectrum@0” () As Long
Private Declare Function FSOUND_DSP_GetFFTUnit Lib “fmod.dll” Alias “_FSOUND_DSP_GetFFTUnit@0” () As Long
Private Declare Function FSOUND_DSP_SetActive Lib “fmod.dll” Alias “_FSOUND_DSP_SetActive@8” (ByVal unit As Long, ByVal active As Integer) As Long
Public Const SpectrumWidthC As Long = 33& ‘Count
Public Const SpectrumWidthD As Long = 32& ‘MaxIndex
Public Const SpectrumWidthX As Long = 132& ‘ Memory Size
Public xSingleA1(SpectrumWidthD) As Single

‘ This to activate/deactivate spectrum
Public Sub Wrapper_SetSpectrum(ByVal status As Boolean)
Call FSOUND_DSP_SetActive(FSOUND_DSP_GetFFTUnit(), status)
End Sub

‘ This to get the spectrum
Public Sub Wrapper_GetSpectrum(ByRef xSingleA1() As Single)
Static xLong1 As Long

xLong1 = FSOUND_DSP_GetSpectrum
If xLong1 = 0 Then
Erase xSingleA1()
Call RtlMoveMemory(xSingleA1(0), ByVal xLong1, SpectrumWidthX)
End If
End Sub

Code portions taken from QuickPlayer (http://www.ctuser.net)

  • You must to post comments

Thank you for answering.
Really I do not achieve the example makes work.
Not which is the problem.
If the possibility exists of manmdarme an example working, I am grateful for it to you!

  • You must to post comments

Here’s that example in a working form.
Please read the readme.txt file!
Please also do not redistribute.


  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.