Automatic Processing Configuration Mode
The Automatic Processing Configuration, introduced in MSDK 11.0.0, offers a new mechanism to configure the MimiProcessingSession for compatible Mimi Processor devices.
Note: Automatic Processing Configuration is not compatible with older existing Mimi Processors; if you need to support both types of Processors, then your application should use appropriate heuristics to determine which mode to use for each device.
Overview
Automatic Processing Configuration allows the capabilities and state of the Processor to be automatically detected by the MSDK, and used to initialize the MimiProcessingSession. In other words, Processor configuration values such as Tech-Level or Personalization Mode which were required in the Basic Processing Configuration are now “automatically” determined by the Automatic Processing Configuration simplifying the activation step significantly.
Session Activation with a MimiAutomaticProcessingConfiguration
The definition of the MimiAutomaticProcessingConfiguration simply includes the Applicator configuration to allow the MSDK to communicate with the Processor.
An example MimiProcessingSession with an Applicator with an (optional) timeout of 2 seconds can be activated as follows:
do {
let configuration = try MimiAutomaticProcessingConfiguration {
Processor {
Applicator(timeout: 2.0) { value in
// Send value to Processor and return response Data object from Processor.
}
}
}
return try await processing.activate(configuration: configuration)
} catch {
// Handle activation failure
}
Application timeout
It is also possible to set a timeout for the application of a value in the Applicator. If the value application exceeds this timeout, it will cause the entire value application sequence to fail.
Once there is an activated MimiProcessingSession, it is possible to access the processing parameters and configure them appropriately.
- Activating a session will set the
sessionproperty on theMimiProcessingControllerallowing the session to be easily referenced. - Only a single session can be activated at one time.
MimiProcessingController.sessionPublisheris aAnyPublisherand can be subscribed for changes that occur during the activation & deactivation of a session.
Tip: Most partner integrations will only need to use a single MimiProcessingSession that roughly aligns with the headphone connectivity lifecycle.
Automatic Processing Configuration Mode Reference