ascii-chat 0.11.33
Video chat in your terminal
Loading...
Searching...
No Matches
audio.c File Reference

Audio processing options. More...

Go to the source code of this file.

Variables

const registry_entry_t g_audio_entries []
 

Detailed Description

Audio processing options.

Options for audio input/output devices, volume control, audio sources, encoding, and mixing.

Author
Zachary Fogg me@zf.nosp@m.o.gg
Date
January 2026

Definition in file lib/options/registry/audio.c.

Variable Documentation

◆ g_audio_entries

const registry_entry_t g_audio_entries[]

Definition at line 21 of file lib/options/registry/audio.c.

21 {
22 // AUDIO GROUP (client, discovery)
23 {"audio",
24 'A',
26 offsetof(options_t, audio_enabled),
27 &default_audio_enabled_value,
28 sizeof(bool),
29 "Enable audio streaming (press 'm' during rendering to toggle).",
30 "AUDIO",
31 NULL,
32 false,
33 "ASCII_CHAT_AUDIO",
34 NULL,
35 NULL,
36 false,
37 false,
39 {0},
40 NULL},
41 {"microphone-index",
42 '\0',
44 offsetof(options_t, microphone_index),
45 &default_microphone_index_value,
46 sizeof(int),
47 "Microphone device index for audio input.",
48 "AUDIO",
49 NULL,
50 false,
51 "ASCII_CHAT_MICROPHONE_INDEX",
52 NULL,
53 NULL,
54 false,
55 false,
57 {.numeric_range = {-1, 10, 1}, .examples = g_mic_examples, .input_type = OPTION_INPUT_NUMERIC},
58 NULL},
59 {"speakers-index",
60 '\0',
62 offsetof(options_t, speakers_index),
63 &default_speakers_index_value,
64 sizeof(int),
65 "Speakers device index to use for audio output.",
66 "AUDIO",
67 NULL,
68 false,
69 "ASCII_CHAT_SPEAKERS_INDEX",
70 NULL,
71 NULL,
72 false,
73 false,
75 {.numeric_range = {-1, 10, 1}, .examples = g_speakers_examples, .input_type = OPTION_INPUT_NUMERIC},
76 NULL},
77 {"microphone-volume",
78 '\0',
80 offsetof(options_t, microphone_sensitivity),
81 &default_microphone_sensitivity_value,
82 sizeof(float),
83 "Microphone volume multiplier (0.0-1.0).",
84 "AUDIO",
85 NULL,
86 false,
87 "ASCII_CHAT_MICROPHONE_VOLUME",
88 NULL,
90 false,
91 false,
93 {.numeric_range = {0, 1, 0}},
94 NULL},
95 {"ivolume",
96 '\0',
98 offsetof(options_t, microphone_sensitivity),
99 &default_microphone_sensitivity_value,
100 sizeof(float),
101 "Alias for --microphone-volume.",
102 "AUDIO",
103 NULL,
104 false,
105 "ASCII_CHAT_IVOLUME",
106 NULL,
108 false,
109 false,
111 {.numeric_range = {0, 1, 0}},
112 NULL},
113 {"speakers-volume",
114 '\0',
116 offsetof(options_t, speakers_volume),
117 &default_speakers_volume_value,
118 sizeof(float),
119 "Speakers volume multiplier (0.0-1.0; press =/- during rendering to adjust).",
120 "AUDIO",
121 NULL,
122 false,
123 "ASCII_CHAT_SPEAKERS_VOLUME",
124 NULL,
126 false,
127 false,
129 {.numeric_range = {0, 1, 0}},
130 NULL},
131 {"volume",
132 '\0',
134 offsetof(options_t, speakers_volume),
135 &default_speakers_volume_value,
136 sizeof(float),
137 "Alias for --speakers-volume.",
138 "AUDIO",
139 NULL,
140 false,
141 "ASCII_CHAT_VOLUME",
142 NULL,
144 false,
145 false,
147 {.numeric_range = {0, 1, 0}},
148 NULL},
149 {"audio-source",
150 '\0',
152 offsetof(options_t, audio_source),
153 &default_audio_source_value,
154 sizeof(audio_source_t),
155 "Select audio shown by --waveform/--fft: all (default), call, mic, or media.",
156 "AUDIO",
157 NULL,
158 false,
159 "ASCII_CHAT_AUDIO_SOURCE",
160 NULL,
162 false,
163 false,
165 {.enum_values = g_audio_source_values,
166 .enum_descriptions = g_audio_source_descs,
167 .enum_integer_values = g_audio_source_integers,
168 .input_type = OPTION_INPUT_ENUM},
169 NULL},
170 {"audio-capture-source",
171 '\0',
173 offsetof(options_t, audio_capture_source),
174 &default_audio_capture_source_value,
176 "Select local audio capture and media playback: auto, mic, media, both, or remote.",
177 "AUDIO",
178 NULL,
179 false,
180 "ASCII_CHAT_AUDIO_CAPTURE_SOURCE",
181 NULL,
183 false,
184 false,
186 {.enum_values = g_audio_capture_source_values,
187 .enum_descriptions = g_audio_capture_source_descs,
188 .enum_integer_values = g_audio_capture_source_integers,
189 .input_type = OPTION_INPUT_ENUM},
190 NULL},
191#ifdef DEBUG
192 {"audio-analysis",
193 '\0',
195 offsetof(options_t, audio_analysis_enabled),
196 &default_audio_analysis_value,
197 sizeof(bool),
198 "Enable audio analysis (debug).",
199 "AUDIO",
200 NULL,
201 false,
202 "ASCII_CHAT_AUDIO_ANALYSIS",
203 NULL,
204 NULL,
205 false,
206 false,
208 {0},
209 NULL},
210#endif
211 {"no-audio-playback",
212 '\0',
214 offsetof(options_t, audio_no_playback),
215 &default_no_audio_playback_value,
216 sizeof(bool),
217 "Disable speakers output.",
218 "AUDIO",
219 NULL,
220 false,
221 "ASCII_CHAT_NO_AUDIO_PLAYBACK",
222 NULL,
223 NULL,
224 false,
225 false,
227 {0},
228 NULL},
229 {"encode-audio",
230 '\0',
232 offsetof(options_t, encode_audio),
233 &default_encode_audio_value,
234 sizeof(bool),
235 "Enable Opus audio encoding.",
236 "AUDIO",
237 NULL,
238 false,
239 "ASCII_CHAT_ENCODE_AUDIO",
240 NULL,
241 NULL,
242 false,
243 false,
245 {0},
246 NULL},
247 {"no-encode-audio",
248 '\0',
250 offsetof(options_t, encode_audio),
251 &default_no_encode_audio_value,
252 sizeof(bool),
253 "Disable Opus audio encoding.",
254 "AUDIO",
255 NULL,
256 false,
257 "ASCII_CHAT_NO_ENCODE_AUDIO",
258 NULL,
259 NULL,
260 false,
261 false,
263 {0},
264 NULL},
265 {"no-audio-mixer",
266 '\0',
268 offsetof(options_t, no_audio_mixer),
269 &default_no_audio_mixer_value,
270 sizeof(bool),
271 "Use simple audio mixing without ducking or compression (debug mode only).",
272 "AUDIO",
273 NULL,
274 false,
275 "ASCII_CHAT_NO_AUDIO_MIXER",
276 NULL,
277 NULL,
278 false,
279 false,
281 {0},
282 NULL},
283 {"list-microphones",
284 '\0',
286 0,
287 NULL,
288 0,
289 "List available audio input devices by index and exit.",
290 "AUDIO",
291 NULL,
292 false,
293 NULL,
294 NULL,
295 NULL,
296 false,
297 false,
299 {0},
300 NULL},
301 {"list-speakers",
302 '\0',
304 0,
305 NULL,
306 0,
307 "List available audio output devices by index and exit.",
308 "AUDIO",
309 NULL,
310 false,
311 NULL,
312 NULL,
313 NULL,
314 false,
315 false,
317 {0},
318 NULL},
319
@ OPTION_INPUT_NUMERIC
Numeric value with optional min/max/step.
Definition builder.h:179
@ OPTION_INPUT_ENUM
Choose from fixed set of enum values.
Definition builder.h:178
@ OPTION_TYPE_INT
Integer value (–count 42)
Definition builder.h:163
@ OPTION_TYPE_ACTION
Action that executes and may exit (–list-webcams, etc.)
Definition builder.h:167
@ OPTION_TYPE_CALLBACK
Custom parser function.
Definition builder.h:166
@ OPTION_TYPE_BOOL
Boolean flag (–flag, no value)
Definition builder.h:162
audio_source_t
Audio source selected for visualization.
@ OPTION_MODE_BINARY
Binary-level options (parsed before mode detection)
@ OPTION_MODE_CLIENT
Client mode (bit 1)
@ OPTION_MODE_DISCOVERY
Discovery mode (bit 4)
@ OPTION_MODE_SERVER
Server mode (bit 0)
@ OPTION_MODE_MIRROR
Mirror mode (bit 2)
const char * g_audio_capture_source_values[]
Definition metadata.c:161
const char * g_audio_source_descs[]
Definition metadata.c:157
const char * g_speakers_examples[]
Definition metadata.c:188
const int g_audio_capture_source_integers[]
Definition metadata.c:164
const char * g_audio_source_values[]
Definition metadata.c:154
const char * g_mic_examples[]
Definition metadata.c:187
const char * g_audio_capture_source_descs[]
Definition metadata.c:167
const int g_audio_source_integers[]
Definition metadata.c:156
#define REGISTRY_TERMINATOR()
Initialize a terminator entry (sentinel value for array end) Uses designated initializers to properly...
bool parse_audio_source(const char *arg, void *dest, char **error_msg)
Parse visualization source option (–audio-source)
Definition parsers.c:1161
bool parse_audio_capture_source(const char *arg, void *dest, char **error_msg)
Definition parsers.c:1197
bool parse_volume(const char *arg, void *dest, char **error_msg)
Custom parser for volume options (–volume, –speakers-volume, –microphone-volume)
Definition parsers.c:1095
#define bool
Definition stdbool.h:61
Consolidated options structure.