also looking at this
feat(media): add bounded PCM capture, owned snapshots and A/V streaming
#917
11 files
+683
-0
| @@ -0,0 +1,13 @@ | ||
| 1 | /* Home ALSA capture bridge, MIT. Opaque system ABI; S16LE interleaved PCM. */ | |
| 2 | #ifndef HOME_NATIVE_CAPTURE_H | |
| 3 | #define HOME_NATIVE_CAPTURE_H | |
| 4 | #include <stdint.h> | |
| 5 | typedef struct home_audio_capture home_audio_capture; | |
| 6 | typedef struct { uint32_t sample_rate,channels,block_frames; } home_capture_config; | |
| 7 | int home_audio_open(const home_capture_config *,const char *device,home_audio_capture **); | |
| 8 | /* 0 success, 1 timeout, negative error. timestamp is first sample in CLOCK_BOOTTIME | |
| 9 | * ns. Anchored sample counting avoids scheduler jitter; measured error is returned. | |
| 10 | * XRUNs/disconnects or clock error >100 ms fail explicitly; no silent recovery. */ | |
| 11 | int home_audio_read(home_audio_capture *,uint8_t *,uint32_t capacity_frames,uint32_t timeout_ms,uint32_t *frames,uint64_t *timestamp_ns,int64_t *clock_error_ns); | |
| 12 | void home_audio_close(home_audio_capture *); | |
| 13 | #endif | |