0
0

Hi, guys.

I am grabbing data from the game with custom DSP and I need to undestand at what frequency samples are coming in into read callback.

system->getSoftwareFormat returns me 48000 while dsp->getDefaults return 44100, what is the most correct way to figure it out?

And how I can force my DSP to work on 44100?

Thanks.

  • You must to post comments
0
0

[quote="brett":3a8coyod]getSoftwareFormat is the correct one.

If you want it to run at any sample rate, play it as a channel rather than using addDSP.
Use System::playDSP then Channel::setFrequency to get your desired rate.[/quote:3a8coyod]

Thanks for your reply, but I still having problems with this, here what I had:

checkResult(system->createDSP(&dspdesc, &dsp));
checkResult(dsp->setBypass(false));
checkResult(system->addDSP(dsp, 0));

This code was working but on system frequency (48000) and I wanted it to be on 44100, so I did this:

checkResult(system->createDSP(&dspdesc, &dsp));
checkResult(dsp->setBypass(false));

FMOD::Channel *channel = NULL;
checkResult(system->playDSP(FMOD_CHANNEL_REUSE, dsp, false, &channel));
checkResult(channel->setFrequency(44100.00));

after I do this all the samples I am getting in callback of my DSP have 0 value.

And I want to get all the sounds played at 441000 frequency in real time.

Thanks

  • You must to post comments
0
0

getSoftwareFormat is the correct one.

If you want it to run at any sample rate, play it as a channel rather than using addDSP.
Use System::playDSP then Channel::setFrequency to get your desired rate.

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.