|
libivon 0.1.0
Voice-over-IP library
|
#include <stddef.h>#include <stdint.h>Classes | |
| struct | ivon_audio_stats |
| Aggregate audio processor statistics. More... | |
| struct | ivon_speaking_event |
| Speaking state transition event. More... | |
| struct | ivon_pre_dsp_context |
| Context for pre-DSP callbacks (mono per-sender). More... | |
| struct | ivon_post_spatial_context |
| Context for post-spatial callbacks (expanded per-sender). More... | |
| struct | ivon_post_mix_context |
| Context for post-mix callbacks (final mixed stream). More... | |
| struct | ivon_audio_output_frame |
| Mixed audio output frame (copy-out). More... | |
Macros | |
| #define | IVON_AUDIO_SAMPLE_RATE 48000 |
| Default sample rate (48 kHz). | |
| #define | IVON_AUDIO_FRAME_DURATION_MS 20 |
| Frame duration in milliseconds (20 ms). | |
| #define | IVON_AUDIO_FRAME_SIZE (IVON_AUDIO_SAMPLE_RATE * IVON_AUDIO_FRAME_DURATION_MS / 1000) |
| Samples per channel per frame (960). | |
| #define | IVON_AUDIO_MAX_CHANNELS 8 |
| Maximum supported output channels (7.1 surround). | |
Typedefs | |
| typedef struct ivon_audio * | ivon_audio_t |
| C ABI types for the libivon audio processor. | |
| typedef struct ivon_packet_buffer * | ivon_packet_buffer_t |
| Opaque handle to a packet buffer from the audio processor's pool. | |
| typedef enum ivon_speaking_mode | ivon_speaking_mode_t |
| How the local user is transmitting audio. | |
| typedef enum ivon_frame_type | ivon_frame_type_t |
| How a decoded PCM frame was produced. | |
| typedef enum ivon_dsp_action | ivon_dsp_action_t |
| DSP callback return value — controls pipeline continuation. | |
| typedef enum ivon_frame_duration | ivon_frame_duration_t |
| Supported frame durations for audio codecs. | |
| typedef enum ivon_codec_sample_rate | ivon_codec_sample_rate_t |
| Supported codec-internal sample rates. | |
| typedef struct ivon_audio_config * | ivon_audio_config_t |
| Opaque audio processor configuration handle. | |
| typedef struct ivon_audio_stats | ivon_audio_stats_t |
| Aggregate audio processor statistics. | |
| typedef struct ivon_speaking_event | ivon_speaking_event_t |
| Speaking state transition event. | |
| typedef struct ivon_pre_dsp_context | ivon_pre_dsp_context_t |
| Context for pre-DSP callbacks (mono per-sender). | |
| typedef struct ivon_post_spatial_context | ivon_post_spatial_context_t |
| Context for post-spatial callbacks (expanded per-sender). | |
| typedef struct ivon_post_mix_context | ivon_post_mix_context_t |
| Context for post-mix callbacks (final mixed stream). | |
| typedef struct ivon_audio_output_frame | ivon_audio_output_frame_t |
| Mixed audio output frame (copy-out). | |
| typedef int(* | ivon_audio_pcm_source_fn) (float *pcm_out, int frame_size, void *user_data) |
| PCM source callback — pull mono float PCM from the user. | |
| typedef void(* | ivon_audio_speaking_event_fn) (const ivon_speaking_event_t *event, void *user_data) |
| Speaking state change callback. | |
| typedef ivon_dsp_action_t(* | ivon_audio_pre_dsp_fn) (ivon_pre_dsp_context_t *ctx, void *user_data) |
| Pre-DSP callback (mono per-sender, after decode). | |
| typedef ivon_dsp_action_t(* | ivon_audio_post_spatial_fn) (ivon_post_spatial_context_t *ctx, void *user_data) |
| Post-spatial callback (expanded per-sender, after channel expansion). | |
| typedef ivon_dsp_action_t(* | ivon_audio_post_mix_fn) (ivon_post_mix_context_t *ctx, void *user_data) |
| Post-mix callback (final mixed output). | |
| #define IVON_AUDIO_FRAME_DURATION_MS 20 |
Frame duration in milliseconds (20 ms).
| #define IVON_AUDIO_FRAME_SIZE (IVON_AUDIO_SAMPLE_RATE * IVON_AUDIO_FRAME_DURATION_MS / 1000) |
Samples per channel per frame (960).
| #define IVON_AUDIO_MAX_CHANNELS 8 |
Maximum supported output channels (7.1 surround).
| #define IVON_AUDIO_SAMPLE_RATE 48000 |
Default sample rate (48 kHz).
| typedef struct ivon_audio_config* ivon_audio_config_t |
Opaque audio processor configuration handle.
Create with ivon_audio_config_create(), set fields with the ivon_audio_config_set_*() functions, pass to ivon_audio_create(), then destroy with ivon_audio_config_destroy().
| typedef struct ivon_audio_output_frame ivon_audio_output_frame_t |
Mixed audio output frame (copy-out).
Returned by ivon_audio_try_read_output().
| typedef int(* ivon_audio_pcm_source_fn) (float *pcm_out, int frame_size, void *user_data) |
PCM source callback — pull mono float PCM from the user.
Called every tick (20 ms) while speaking. Fill pcm_out with frame_size samples.
| typedef ivon_dsp_action_t(* ivon_audio_post_mix_fn) (ivon_post_mix_context_t *ctx, void *user_data) |
Post-mix callback (final mixed output).
| typedef ivon_dsp_action_t(* ivon_audio_post_spatial_fn) (ivon_post_spatial_context_t *ctx, void *user_data) |
Post-spatial callback (expanded per-sender, after channel expansion).
| typedef ivon_dsp_action_t(* ivon_audio_pre_dsp_fn) (ivon_pre_dsp_context_t *ctx, void *user_data) |
Pre-DSP callback (mono per-sender, after decode).
| typedef void(* ivon_audio_speaking_event_fn) (const ivon_speaking_event_t *event, void *user_data) |
Speaking state change callback.
| typedef struct ivon_audio_stats ivon_audio_stats_t |
Aggregate audio processor statistics.
Snapshot of counters from the decoder, encoder, and pipeline. Values are approximate when the processor is running (counters are updated from worker threads without full synchronisation).
| typedef struct ivon_audio* ivon_audio_t |
C ABI types for the libivon audio processor.
Pure C header — no C++ dependencies. Defines the opaque handle, configuration structure, enumerations, and callback function-pointer typedefs used by ivon_audio.h.
Opaque handle to an audio processor instance.
| typedef enum ivon_codec_sample_rate ivon_codec_sample_rate_t |
Supported codec-internal sample rates.
This affects the encoding resolution, not the PCM pipeline rate (which is always 48 kHz).
| typedef enum ivon_dsp_action ivon_dsp_action_t |
DSP callback return value — controls pipeline continuation.
| typedef enum ivon_frame_duration ivon_frame_duration_t |
Supported frame durations for audio codecs.
Not every codec supports every duration — an invalid combination will cause ivon_audio_create() to return NULL.
| typedef enum ivon_frame_type ivon_frame_type_t |
How a decoded PCM frame was produced.
| typedef struct ivon_packet_buffer* ivon_packet_buffer_t |
Opaque handle to a packet buffer from the audio processor's pool.
| typedef struct ivon_post_mix_context ivon_post_mix_context_t |
Context for post-mix callbacks (final mixed stream).
PCM is the final mix (frame_size * channels samples, interleaved). Modify in-place.
| typedef struct ivon_post_spatial_context ivon_post_spatial_context_t |
Context for post-spatial callbacks (expanded per-sender).
PCM is expanded (frame_size * channels samples, interleaved). Modify in-place.
| typedef struct ivon_pre_dsp_context ivon_pre_dsp_context_t |
Context for pre-DSP callbacks (mono per-sender).
PCM is mono, IVON_AUDIO_FRAME_SIZE samples. Modify in-place.
| typedef struct ivon_speaking_event ivon_speaking_event_t |
Speaking state transition event.
| typedef enum ivon_speaking_mode ivon_speaking_mode_t |
How the local user is transmitting audio.
Supported codec-internal sample rates.
This affects the encoding resolution, not the PCM pipeline rate (which is always 48 kHz).
| enum ivon_dsp_action |
| enum ivon_frame_duration |
Supported frame durations for audio codecs.
Not every codec supports every duration — an invalid combination will cause ivon_audio_create() to return NULL.
| enum ivon_frame_type |
| enum ivon_speaking_mode |