0
0

Thank you for answering!!!

I am using this code inside a timer but when I execute it the program is hung

Option Explicit

Dim spec(512) as Single
dim counter as Integer

Private Sub Form_Load()
fftunit = FSOUND_DSP_GetFFTUnit()
FSOUND_DSP_SetActive fftunit, True
End Sub

Private Sub Timer1_Timer()
Call GetSpectrum(spec())
for counter = 0 to 511
debug.print spec(counter)
next counter
End Sub

If sos so nice you prune me to help to solve this problem??
Thank you.
Sebastian!

  • You must to post comments
0
0

Make all variables local (put them inside the timer) and use :

for i = 0 to Ubound(spec)

Just in case.

  • You must to post comments
0
0

Thank you.
The whole code that I use is the fact that sent previously. When I execute it it is labelled and is closed.
On having extracted this line ” CopyMemory Spectrum (0), ByVal lpSpectrum, nrOfVals * 4 ” as the function GetSpectrum it(he,she) stops being labelled but I do not have sample.
Which is the problem??

  • You must to post comments
0
0

Mmmh it is quite long the last time i used VB, try with Call GetSpectrum(spec) (without the () ).
Btw, try your app compiled and not from the IDE, this is the only things i can tell you with your given informations :)

  • You must to post comments
0
0

I am grateful to you that you worry for my problem.
One exists possibility of an example arming myself in order that I could see since(as,like) it works.
Really I do not find information in Internet.
You are my only help.
Thank you
excuse me for my Englishman
Sebastian!

  • You must to post comments
Showing 4 results
Your Answer

Please first to submit.