# FreeBSD Folder Guide

This folder is the preliminary FreeBSD target layer for `sfxlib`.

Like `gfxlib2`, the idea is to keep shared Unix pieces in `sfxlib/unix/`
and let the target directory override or add only the FreeBSD-specific
parts.

## Files In This Folder

### `fb_sfx_freebsd.h`
Small FreeBSD backend header.

Job:
- exposes the FreeBSD backend state and lifecycle helpers
- keeps the target-local API obvious for later real driver work

### `sfx_freebsd.c`
FreeBSD target shim.

Job:
- provides Linux-style background feed scaffolding for unattended playback
- owns the FreeBSD driver list
- provides weak capture fallbacks only when no concrete driver overrides them

### `sfx_driver_oss.c`
FreeBSD OSS playback and capture driver.

Job:
- opens and configures `/dev/dsp`
- writes signed 16-bit PCM frames generated by the shared mixer
- reads signed 16-bit PCM capture frames from OSS input devices
- provides unattended playback through the shared BSD background worker

Capture device selection:
- `SFXLIB_OSS_CAPTURE_DEVICE`
- `SFXLIB_BSD_OSS_CAPTURE_DEVICE`
- playback device fallback, normally `/dev/dsp`

## Design Note

This is intentionally a thin target layer over the shared Unix code,
mirroring the way `gfxlib2` handles BSD targets.
