pub unsafe extern "C" fn aic_processor_process_interleaved(
processor: *mut AicProcessor,
audio: *mut f32,
num_channels: u16,
num_frames: usize,
) -> TypeExpand description
Processes audio with interleaved channels in a single buffer.
Enhances speech in the provided audio buffer in-place.
Memory Layout:
- Single contiguous buffer with channels interleaved
- Buffer size:
num_channels*num_framesfloats - Example for 2 channels, 4 frames:
audio -> [ch0_f0, ch1_f0, ch0_f1, ch1_f1, ch0_f2, ch1_f2, ch0_f3, ch1_f3]
§Parameters
processor: Initialized processor instance. Must not be NULL.audio: Single buffer containing interleaved audio data of sizenum_channels*num_frames. 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.