refactor: make audio mandatory and split iced app modules

This commit is contained in:
ReTeamSpeak
2026-05-13 15:50:16 +09:00
parent abf380476f
commit 57456a8147
28 changed files with 2902 additions and 1504 deletions
+60 -20
View File
@@ -20,17 +20,17 @@ Desktop TeamSpeak 3 client built with `iced` and `tsclientlib` for Windows, Linu
- Mute speaker/output state and sync it to TeamSpeak
- Toggle headset/output hardware state and sync it to TeamSpeak
- Toggle AFK state and sync it to TeamSpeak
- Import TeamSpeak identity from the local TS3 `settings.db`
- Import TeamSpeak identity from an exported identity string or file
- Select input and output audio devices
- Push-to-talk and continuous voice modes
- Noise cancellation selection in settings
- Local per-user mute and volume controls in the channel tree
- Persistent bookmarks, favorites, recents, and settings
## Current Gaps
- ServerQuery page is UI-only right now; execution is intentionally stubbed
- Bookmarks are currently in-memory only
- Identity import requires the `rusqlite` feature
- Full audio build requires system audio/build dependencies
- Remote audio playback still needs runtime validation against a real TeamSpeak server
- The legacy `src/README.md` and root `Dockerfile` still need to be reconciled with the current app layout
## Build
@@ -43,26 +43,62 @@ cd src
cargo check -p re-teamspeak
```
### With identity import
### Audio Build
Host builds need system audio libraries and a Rust toolchain new enough for `sonora`.
On Linux that generally means `cmake`, `pkg-config`, `libasound2-dev`, and `libopus-dev`.
Direct host build:
```bash
cd src
cargo check -p re-teamspeak --features rusqlite
cargo check -p re-teamspeak
```
### With audio and identity import
On systems missing packages, use Podman:
Repeatable Podman build:
```bash
podman run --rm -v $(pwd):/workspace:Z -w /workspace/src \
docker.io/library/debian:trixie bash -lc '
apt-get update -qq &&
apt-get install -y -qq \
build-essential curl cmake pkg-config libasound2-dev libssl-dev &&
curl --proto "=https" --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y &&
. /root/.cargo/env &&
cargo check -p re-teamspeak --features audio,rusqlite
./scripts/check-audio-podman.sh
```
### Run the app in Podman
From a desktop shell with `WAYLAND_DISPLAY` or `DISPLAY` set:
```bash
./scripts/run-audio-podman.sh
```
The runtime wrapper will try to pass through:
- `/dev/snd`
- `/dev/dri`
- PulseAudio socket
- PipeWire socket
- user D-Bus socket
- Wayland socket or X11 socket
If you want to validate the container wiring without launching the GUI app, pass a custom command:
```bash
./scripts/run-audio-podman.sh -- /usr/bin/env
```
Override image or features when needed:
```bash
RETEAMSPEAK_AUDIO_IMAGE=docker.io/library/rust:1.91-bookworm \
./scripts/check-audio-podman.sh
```
Equivalent raw Podman command:
```bash
podman run --rm -v "$(pwd):/workspace:Z" -w /workspace/src \
docker.io/library/rust:1.91-bookworm bash -lc '
apt-get update >/dev/null &&
apt-get install -y --no-install-recommends pkg-config libasound2-dev libopus-dev >/dev/null &&
/usr/local/cargo/bin/cargo check -p re-teamspeak
'
```
@@ -76,9 +112,13 @@ src/
└── src/
├── main.rs
├── audio.rs
├── noise_cancel.rs
├── identity.rs
── theme.rs
── icons.rs
├── noise_cancel.rs
├── persistence.rs
├── theme.rs
├── types.rs
└── view.rs
```
## Reference Material