Sorry, I’ve tried searching to avoid writing a topic answered before but didn’t find anything. I’ve found that using FMODs method of getting the frequency doesn’t work on streams, is this true? I thought that it would get whatever was being played through FMOD, am I doing anything wrong?
- identitycrisisuk asked 15 years ago
Ehm, post misread, now I see you want the spectrum, not frequency.
To get the spectrum from a stream you have to turn on the FFT unit, disabled by default
var P: pointer;
Now you have access to spectrum data calling GetSpectrum
type TData: Array[0..511] Of Single;
var Data: @TData;
NOW that’s all!
[quote="brett":2nj4wlsq]streams will show up the same as samples in the spectrum, there is nothing special about them. Only if they are FSOUND_HW2D or FSOUND_HW3D they wont show up because they are not playing in fmod’s dsp system.[/quote:2nj4wlsq]
Ah that’ll be it, dang cos I really want to use HW2D to make sure that they start playing with the minimum delay. Oh well, I guess I can calculate it myself thru callbacks, just was getting a bit confused when the spectrum was returning me a blank array.
- identitycrisisuk answered 15 years ago
[quote="identitycrisisuk":1nwklu75]dang cos I really want to use HW2D to make sure that they start playing with the minimum delay.[/quote:1nwklu75]
Umm, FMOD is pretty damn fast, and I would think that in alot of circumstances it would be faster at starting a sound playing than the hardware is.
I have completely given up on hardware and leave FMOD to handle everything, it works better and more consistantly (for me anyway ;))
You have to assign a channel to the stream just opened
var Ch: integer;
Ch:= FSOUND_Stream_Play(MyOpenedStream, Flags, 0, 0);
then you can access the frequency trhu the channel
That’s all 😉
Please login first to submit.