SPB Git

Repository Public License

storage.md 3.5 KB

# Storage

Recording storage layout

# Layout

text
Application Support/ORIXAudio/
├── Recordings/
│   └── <recording uuid>/
│       ├── audio.<ext>        the library file (wav, m4a, or the imported file's own extension)
│       ├── waveform.owf       waveform summary, 40 bytes per 512-sample bucket
│       ├── analysis.json      AnalysisReport
│       ├── transcript.json    Transcript
│       ├── notes.json         MeetingNotes
│       ├── edit.json          EditDocument with its undo history
│       └── merge-xxxxxxxx.*   copies of recordings appended in the editor
└── Capture/
    ├── <session uuid>.caf     PCM master of a recording in progress
    └── <session uuid>.json    sidecar: title, start, preset, markers, participants, locale

tmp/Exports/<uuid>/…           files handed to the share sheet; purged at launch

The SwiftData store (default location) holds three models:

Model Fields of note
Recording id, title, date, duration, kind, source, file name, codec, sample rate, channels, bit depth, size, lossless flag, favourite, deleted-at, notes, participants, markers (JSON), original file name, locale, transcript / analysis status, has-notes, peak, integrated loudness, folder
Folder name; recordings are detached, not deleted, when a folder is removed
Workflow name, steps (JSON), trigger, symbol

If the store cannot be opened the app falls back to an in-memory store so it stays usable; the audio folders are untouched.

# Why files and not database blobs

  • A recording is a folder: duplicate copies it, delete removes it, nothing can be orphaned across two systems.
  • Large derived data (a waveform for a two-hour file is about 27 MB) never loads with the library list.
  • Sidecars are plain JSON and a documented binary format, readable without the app.

# Write safety

Data How it is written
Capture master append-only CAF, valid after each write, fsync every 2 s
Library file from a recording encoded under a temporary name, re-opened and duration-checked, then moved into place
Exports and editor renders written under a temporary name and moved only when complete; a cancelled export leaves no file (tested)
Sidecars Data.write with .atomic
Imports copied into a new folder; the folder is removed if the import fails (tested)

# Protection

Folders and files carry the complete until first user authentication class: encrypted at rest, readable after the first unlock following a restart. This is the strictest class that still allows writing while the device is locked, which recording requires. The optional Face ID / passcode lock is an interface lock on top of that, not a second layer of encryption.

The simulator does not enforce data protection, so the class is asserted in a test but its effect has not been observed on a device.

# Deletion

Deleting moves a recording to Recently Deleted (a date on the model; files stay). After 30 days, or on "Delete now", the folder and the model are removed. Recovered captures that are discarded delete the master and sidecar.

# Backups and sync

There is no iCloud sync and no CloudKit. Application Support is included in device backups by default, so recordings travel with an iCloud or computer backup if the user has one.

Files main
Menu

Theme