Import the sdk

#include <Iris/Iris.h>

Initialisation

iris-sdk must be initialised once before use. After successful initialisation the available functionality will be dependent on the licence supplied.

There are two overloads of the init() function. To initialise with a licence and key from the default location use simply call init() with no parameters.

To initialise with a licence from strings use init(licence, key).

The returned Info contains details of the initialisation status and licence expiry time. If the licence is valid then available processors will contain a list of all the processors available for use. The contents of this will vary dependent on the licence used. These values will be used later to create an audio processing context via an audio context request.

auto info = Iris::init();
std::cout << "Initialised iris-sdk << info.version <<  " for " << info.name << std::endl;

// Check licence is valid
if (info.status != Iris::LicenceStatus::licenceValid) {
  std::cout << "Unable to initialise iris-sdk" << std::endl;
  exit(0);
}

// Check licence is valid
for (auto& processor : info.availableProcessors) {
  std::cout << "\t" << processor << std::endl;
}

Note

init(licence, key) expects the contents of the licence and key files as strings, not a path to their location on disk.