pub unsafe extern "C" fn aic_processor_process_planar(
processor: *mut AicProcessor,
audio: *const *mut f32,
num_channels: u16,
num_frames: usize,
) -> TypeExpand description
Processes audio with separate buffers for each channel (planar layout).
Enhances speech in the provided audio buffers in-place.
Memory Layout:
audiois an array of pointers, one pointer per channel- Each pointer points to a separate buffer containing
num_framessamples for that channel - Example for 2 channels, 4 frames:
audio[0] -> [ch0_f0, ch0_f1, ch0_f2, ch0_f3]audio[1] -> [ch1_f0, ch1_f1, ch1_f2, ch1_f3]
The planar function allows a maximum of 16 channels.
§Parameters
processor: Initialized processor instance. Must not be NULL.audio: Array ofnum_channelspointers, each pointing to a buffer ofnum_framesfloats. Must not be NULL.num_channels: Number of channels (must match initialization).num_frames: Number of samples per channel (must match initialization value, or ifallow_variable_frameswas enabled, must be ≤ initialization value).
§Note
All channels are mixed to mono for processing. To process channels independently, create separate processor instances.
§Returns
AIC_ERROR_CODE_SUCCESS: Audio processed successfullyAIC_ERROR_CODE_NULL_POINTER:processororaudiois NULLAIC_ERROR_CODE_NOT_INITIALIZED: Processor has not been initializedAIC_ERROR_CODE_AUDIO_CONFIG_MISMATCH: Channel or frame count mismatchAIC_ERROR_CODE_ENHANCEMENT_NOT_ALLOWED: SDK key was not authorized or process failed to report usage. Check if you have internet connection.
§Safety
- Real-time safe: Can be called from audio processing threads.
- This function is not thread-safe. Do not call this function from multiple threads.