summaryrefslogtreecommitdiff
path: root/doc/TOOLS_REFERENCE.md
blob: 861446394f960a8a56ee04c540ae10430d901a98 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# Developer Tools Reference

Comprehensive reference for all developer tools in the project.

---

## Windows Cross-Compilation

```bash
# Fetch dependencies
./scripts/fetch_win_deps.sh

# Build Windows binary
./scripts/build_win.sh

# Run with Wine
./scripts/run_win.sh
```

---

## spectool (Audio Analysis)

```bash
# Build
cmake -S . -B build -DDEMO_BUILD_TOOLS=ON
cmake --build build -j4

# Analyze WAV/MP3 → .spec (v2 OLA format)
./build/spectool analyze input.wav output.spec
./build/spectool analyze input.wav output.spec --normalize        # normalize to RMS 0.15
./build/spectool analyze input.wav output.spec --normalize 0.20   # custom RMS target

# Decode .spec → mono 16-bit WAV (32 kHz, IDCT-OLA synthesis)
./build/spectool wav input.spec output.wav

# Play .spec file via audio device
./build/spectool play input.spec

# Generate test spectrogram (C major scale)
./build/spectool test_gen output.spec
```

---

## Code Coverage (macOS)

```bash
# Install lcov
brew install lcov

# Generate coverage report
./scripts/gen_coverage_report.sh [target_dir]
```

Creates HTML coverage report.

---

## Submodule Updates

```bash
cd third_party/wgpu-native
git fetch
git checkout trunk
git reset --hard origin/trunk
cd ../..
git add third_party/wgpu-native
git commit -m "chore: Update wgpu-native"
```

Updates wgpu-native to latest trunk.