sac_stats.h
SPARK Audio Core statistics.
- Copyright
Copyright (C) 2026 SPARK Microsystems International Inc. All rights reserved.
- License
This source code is proprietary and subject to the SPARK Microsystems Software EULA found in this package in file EULA.txt.
- Author
SPARK FW Team.
Functions
-
sac_statistics_t *sac_pipeline_update_stats(sac_pipeline_t *pipeline, sac_status_t *status)
Update the SPARK Audio Core pipeline statistics.
Note
After calling this function, the statistics inside the pipeline instance will be updated. The function also returns a reference to these internal statistics so they can be used by the caller.
- Parameters:
pipeline – [in] Pipeline instance.
status – [out] Status code.
- Returns:
Reference to the statistics.
-
int sac_pipeline_format_stats(sac_pipeline_t *pipeline, char *buffer, uint16_t size, sac_status_t *status)
Format the pipeline statistics as a string of characters.
- Parameters:
pipeline – [in] Pipeline instance.
buffer – [out] Buffer where to put the formatted string.
size – [in] Size of the buffer.
status – [out] Status code.
- Returns:
The formatted string length, excluding the NULL terminator.
-
uint32_t sac_pipeline_get_producer_buffer_load(sac_pipeline_t *pipeline, sac_status_t *status)
Get producer buffer load.
- Parameters:
pipeline – [in] Pipeline instance.
status – [out] Status code.
- Returns:
buffer producer load value
-
uint32_t sac_pipeline_get_consumer_buffer_load(sac_pipeline_t *pipeline, sac_status_t *status)
Get consumer buffer load.
- Parameters:
pipeline – [in] Pipeline instance.
status – [out] Status code.
- Returns:
Consumer buffer load value.
-
uint32_t sac_pipeline_get_consumer_buffer_overflow_count(sac_pipeline_t *pipeline, sac_status_t *status)
Get consumer buffer overflow count.
- Parameters:
pipeline – [in] Pipeline instance.
status – [out] Status code.
- Returns:
Consumer buffer overflow counter.
-
uint32_t sac_pipeline_get_consumer_buffer_underflow_count(sac_pipeline_t *pipeline, sac_status_t *status)
Get consumer buffer underflow count.
- Parameters:
pipeline – [in] Pipeline instance.
status – [out] Status code.
- Returns:
Consumer buffer underflow counter.
-
uint32_t sac_pipeline_get_producer_buffer_overflow_count(sac_pipeline_t *pipeline, sac_status_t *status)
Get producer buffer overflow count.
- Parameters:
pipeline – [in] Pipeline instance.
status – [out] Status code.
- Returns:
Producer buffer overflow counter.
-
uint32_t sac_pipeline_get_producer_packets_corrupted_count(sac_pipeline_t *pipeline, sac_status_t *status)
Get producer packets corrupted.
- Parameters:
pipeline – [in] Pipeline instance.
status – [out] Status code.
- Returns:
Producer packets corrupted.
-
uint32_t sac_pipeline_get_consumer_queue_peak_buffer_load(sac_pipeline_t *pipeline, sac_status_t *status)
Get consumer queue peak load.
- Parameters:
pipeline – [in] Pipeline instance.
status – [out] Status code.
- Returns:
Consumer queue peak load.
-
void sac_pipeline_reset_stats(sac_pipeline_t *pipeline, sac_status_t *status)
Reset the SPARK Audio Core stats.
- Parameters:
pipeline – [in] Pipeline instance.
status – [out] Status code.