I’m trying to set up my JUCE project to use Opus’ C API. I don’t know much about using APIs so I was wondering whether you could help me using C functions in C++, and more precisely in a JUCE plugin.
Opus is an open-source audio codec and provides an API which basically enables developers to encode, decode and analyze audio signals. I would like to use some of these functions in my plugin.
Since most of the API’s guidelines explain how to use the functions in C language, I must admit I’m a little lost.
Example from opus.h:
//Since Opus is a stateful codec, the encoding process starts with creating an encoder state. //this can be done with: @code int error; OpusEncoder *enc; enc = opus_encoder_create(Fs, channels, application, &error); @endcode
The tutorials say I should develop most of my code inside
ProjectNameAudioProcessor::processBlock but I’m not sure how to use the C functions in there.
Any way you could help me?
Thank you so much in advance!
I hope you’re shining in these dark Covid-19 times. But the bright side is we all slowly get to work from home, which isn’t so bad after all.