I’ve doing a real time plugin.
Because my process is optimized for 48 kHz, I need to use resamplers and to know the current sample rate.
Everything is working fine except with Final Cut Pro X (FCPX).
Let’s say I use a project at 44.1 kHz with an audio file having the same sample rate.
This doesn’t work. It seems that my resamplers don’t get the right sample rate. I tried different values of sample rate and see that final cut has an option called
FrameRate which is set to 24.
I tried a sample rate of “24000” and it seems to work magically. The thing is whenever I tried to change the frame rate in FCPX, I’ve alway get
fps24 with the following code in the processor:
auto playhead = getPlayHead(); AudioPlayHead::CurrentPositionInfo result; playhead->getCurrentPosition(result); std::cout << "FrameRate: " << result.frameRate << std::endl;
To be honest I’m a bit lost because I don’t have any experience in video editing software and I don’t know how to get the right sample rate in this situation.
Am I missing something?