I want 2 get spectrum from PCM, that is being feed in real time from another process using inter process communication.
I want to know the best way to feed PCM data and use getSpectrum from continuous stream to analyze, without rendering to speakers, if possible at maximum rendering speed.
I have my ideas of how I think it could be done, I am not certain I choose correct approach and I still have problems. Any help on specific problem is also appreciated.
My questions are:
1. How do I make sound process PCM data indefinitely
2. What mechanism do I use to ‘feed’ PCM data
More info to show what I am at with this:
I have problems creating appropriately initialized sound/channel. I figured out two solutions but have problems with both:
– have PCM read callback function, problem is it is being called even before there is data available, plays only until buffer it exhausted or loops same data
– other option is FMOD_OPENUSER, documentation states: "…If a user created ‘sample’ is created with no read callback, the sample will be empty. [b:2cdempvh]Use Sound::lock and Sound::unlock to place sound data into the sound[/b:2cdempvh] if this is the case.", but I need some sample code (C/C++ if possible) of how to do this.
Thanks, any info appreciated
- D3F84U asked 5 years ago
- You must login to post comments