Answered
0
0

I am trying to find out how to get the output sample data. So I can supply it to one of my encoders(for live streaming).

The first option I have looked at is using a custom DSP. It seems the sample rate is supplied with the callbacks in FMOD_DSP_STATE. I guess this is to encourage user to not assume a fixed sample rate? Now the issue is, is there a good way to get the samples along with essential information like the sample rate? Because the output stream needs a fixed rate.

Another option I checked is System::setOutput. This allows writing to files. But is it possible to have regular audio as well? It would be best to just have something like callbacks for output data.

  • You must to post comments
Best Answer
0
0

If you’re creating the application as well as the DSP you can call System::setSoftwareFormat() before System::init() to fix the sample rate. All non-leaf DSP units will run at this rate.

However, on platforms other than Windows, the sample rate may be changed by the output driver. You should call System::getSoftwareFormat() after System::init() to check if this has happened.

  • Tao
    Thanks for the info. I think I will default to the info from System::getSoftwareFormat() and just in case, also use a simple resampler.
  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.