and again, sorry for posting like MAD ;P
the important part for u is at the end…
just found in the bas for vb by adion:
‘I don’t know how to handle these in VB yet…’
we have the pointer. we can simply get th epointer aof an single-array in vb and copy the memory into it
i’ve got a bunch of ideas, but there is a problem:
where i try to call DSP_GetSpectrum my vb means, that there is not such an function in the dll ?!?!? or just a typing-error with the ordinals?
and another question:
the pointer fmod returns, is it to the data of the array, or dose it also include the array-descriptor?
i don’t know how it is in c.
ok, i’ve no idea hox this is done in c++.
i just tried to set the pointer-to-the-descriptor of a singlearray tu the adrs fmod gives.
but my array is still empty.
i don’t know if the pointer fmod gives me point to the descriptor or the data or whereever to?????
As you might have already seen, I have made a very clean and easy to use function that is included in the bas file.
Using this shouldn’t be too hard, it just takes a very little bit more time/performance then in C because you have to copy the array, but that doesn’t really matter.
As you might have seen, the pointer points directly to the data. I don’t think there is any array-overhead in c.
Would it be possible to have a function to change the update-frequency of the spectrum?
I think that for some programs/purposes a less-frequent spectrum would do fine, but in my program it would be handy to have an even more accurate spectrum (for beat-detection)
I also hope the next version of fmod will be able to use the spectrum for each stream seperately and that stream-dsp’s in general can work with buffers of 25/50 ms instead of 100 ms.
You said you did this for the disk actions (reading), but you could also read 100 ms or more ahead, but pass pieces of 25/50 ms to the dsp and then to the sound card.
This way, it would even be handy to increase the buffersize to 200->500 ms or so, to make sure any disk access won’t interupt the sound, but still have accurate and fast dsp’s.
- Adion answered 16 years ago
Please login first to submit.