ascii-chat 0.11.33
Video chat in your terminal
Loading...
Searching...
No Matches
audio_batch_packet_t Struct Reference

Audio batch packet structure (Packet Type 28) More...

#include <include/ascii-chat/network/packet/packet.h>

Data Fields

uint32_t batch_count
 Number of audio chunks in this batch (usually AUDIO_BATCH_COUNT = 32)
 
uint32_t total_samples
 Total audio samples across all chunks (typically 8192)
 
uint32_t sample_rate
 Sample rate in Hz (e.g., 44100, 48000)
 
uint32_t channels
 Number of audio channels (1=mono, 2=stereo)
 

Detailed Description

Audio batch packet structure (Packet Type 28)

Contains multiple audio chunks batched together for efficiency. Reduces packet overhead by aggregating 32 chunks (8192 samples) per packet.

Note
Audio samples follow this header in the packet payload.
Format: float samples[total_samples] (interleaved if stereo)
At 44.1kHz, this represents ~186ms of audio per batch.

Definition at line 904 of file packet.h.

Field Documentation

◆ batch_count

uint32_t audio_batch_packet_t::batch_count

Number of audio chunks in this batch (usually AUDIO_BATCH_COUNT = 32)

Definition at line 906 of file packet.h.

Referenced by acip_send_audio_batch(), and audio_parse_batch_header().

◆ channels

uint32_t audio_batch_packet_t::channels

Number of audio channels (1=mono, 2=stereo)

Definition at line 912 of file packet.h.

Referenced by acip_send_audio_batch(), and audio_parse_batch_header().

◆ sample_rate

uint32_t audio_batch_packet_t::sample_rate

Sample rate in Hz (e.g., 44100, 48000)

Definition at line 910 of file packet.h.

Referenced by acip_send_audio_batch(), and audio_parse_batch_header().

◆ total_samples

uint32_t audio_batch_packet_t::total_samples

Total audio samples across all chunks (typically 8192)

Definition at line 908 of file packet.h.

Referenced by acip_send_audio_batch(), and audio_parse_batch_header().


The documentation for this struct was generated from the following file: