Skip to content

Commit

Permalink
Merge pull request #332 from HEnquist/next30
Browse files Browse the repository at this point in the history
Next30
  • Loading branch information
HEnquist authored Jan 11, 2025
2 parents 76aa55d + 346ffdd commit baf6a44
Show file tree
Hide file tree
Showing 70 changed files with 4,334 additions and 2,635 deletions.
47 changes: 32 additions & 15 deletions .github/workflows/ci_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
#container: ubuntu:20.04
steps:
- name: Checkout sources
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Update package list
run: sudo apt-get update
Expand Down Expand Up @@ -44,7 +44,7 @@ jobs:
run: cargo test --features bluez-backend,cpal-backend,jack-backend,pulse-backend,

- name: Run cargo test with all optional features
run: cargo test --features 32bit,debug,fftw,secure-websocket
run: cargo test --features 32bit,debug,secure-websocket

- name: Run cargo fmt
run: cargo fmt --all -- --check
Expand All @@ -57,7 +57,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
Expand All @@ -81,7 +81,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
Expand All @@ -105,7 +105,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
Expand All @@ -131,7 +131,7 @@ jobs:
runs-on: windows-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
Expand All @@ -142,12 +142,28 @@ jobs:
- name: Run cargo test
run: cargo test --no-default-features

check_test_windows7:
name: Check and test Windows7 (rustc 1.75)
runs-on: windows-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4

- name: Install stable toolchain
uses: dtolnay/[email protected]

- name: Run cargo check
run: cargo check --no-default-features

- name: Run cargo test
run: cargo test --no-default-features

check_test_macos:
name: Check and test macOS
runs-on: macos-latest
name: Check and test macOS Intel
runs-on: macos-13
steps:
- name: Checkout sources
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
Expand All @@ -159,19 +175,20 @@ jobs:
run: cargo test --no-default-features

check_macos_arm:
name: Check macOS aarch64
name: Check and test macOS Arm
runs-on: macos-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: aarch64-apple-darwin

- name: Run cargo check for arm
run: cargo check --target aarch64-apple-darwin
- name: Run cargo check
run: cargo check --no-default-features

- name: Run cargo test
run: cargo test --no-default-features



Expand Down
49 changes: 35 additions & 14 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
#container: ubuntu:20.04
steps:
- name: Checkout sources
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Update package list
run: sudo apt-get update
Expand Down Expand Up @@ -51,7 +51,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
Expand Down Expand Up @@ -85,7 +85,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
Expand Down Expand Up @@ -117,7 +117,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
Expand Down Expand Up @@ -149,7 +149,7 @@ jobs:
runs-on: windows-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
Expand All @@ -168,12 +168,35 @@ jobs:
asset_name: camilladsp-windows-amd64.zip
tag: ${{ github.ref }}

windows7:
name: Windows7
runs-on: windows-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4

- name: Install stable toolchain
uses: dtolnay/[email protected]

- name: Build
run: cargo build --release

- name: Compress
run: powershell Compress-Archive target/release/camilladsp.exe camilladsp.zip

- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: camilladsp.zip
asset_name: camilladsp-windows7-amd64.zip
tag: ${{ github.ref }}
macos:
name: macOS
runs-on: macos-latest
name: macOS Intel
runs-on: macos-13
steps:
- name: Checkout sources
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
Expand All @@ -194,22 +217,20 @@ jobs:


macos_arm:
name: macOS aarch64
name: macOS Arm
runs-on: macos-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: aarch64-apple-darwin

- name: Build
run: cargo build --release --target aarch64-apple-darwin
run: cargo build --release

- name: Compress
run: tar -zcvf camilladsp.tar.gz -C target/aarch64-apple-darwin/release camilladsp
run: tar -zcvf camilladsp.tar.gz -C target/release camilladsp

- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,7 @@ default_config.yml
active_config.yml
camilladsp.log
configs/
coeffs/
coeffs/
.venv
*.csv
*.exe
26 changes: 26 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,29 @@
## v3.0.0
New features:
- Optional multithreaded filter processing.
- Request higher proprity of audio threads for improved stability.
- Add a signal generator capture device.
- Optionally write wav header when outputting to file or stdout.
- Add `WavFile` capture device type for reading wav files.
- Optional limit for volume controls.
- Add websocket command for reading all faders with a single call.
- Linux: Subscribe to capture device control events for volume, sample rate and format changes.
- Linux: Optionally select Alsa sample format automatically.
- Improved controller for rate adjustment.
- Command line options for setting aux volume and mute.
- Optional user-defined volume limits for volume adjust commands.
- Add noise gate.
- Add optional channel labels for capture devices and mixers.
- Optional log file rotation.
Changes:
- Remove the optional use of FFTW instead of RustFFT.
- Rename `File` capture device to `RawFile`.
- Filter pipeline steps take a list of channels to filter instead of a single one.
Bugfixes:
- Windows: Fix compatibility issues for some WASAPI devices.
- MacOS: Support devices appearing as separate capture and playback devices.
- Linux: Improved Alsa error handling.

## v2.0.3
Bugfixes:
- MacOS: Fix using Aggregate devices for playback.
Expand Down
26 changes: 13 additions & 13 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[package]
name = "camilladsp"
version = "2.0.3"
name = "CamillaDSP"
version = "3.0.0"
authors = ["Henrik Enquist <[email protected]>"]
edition = "2021"
description = "A flexible tool for processing audio"
rust-version = "1.61"
rust-version = "1.74"

[features]
default = ["websocket"]
Expand All @@ -15,7 +15,6 @@ bluez-backend = ["zbus"]
32bit = []
websocket = ["tungstenite"]
secure-websocket = ["websocket", "native-tls", "tungstenite/native-tls"]
FFTW = ["fftw"]
debug = []
avoid-rustc-issue-116359 = []

Expand All @@ -28,9 +27,9 @@ name = "camilladsp"
path = "src/bin.rs"

[target.'cfg(target_os="linux")'.dependencies]
alsa = "0.8.1"
alsa = "0.9.0"
alsa-sys = "0.3.1"
nix = "0.23"
nix = { version = "0.28", features = ["poll", "signal"] }
zbus = { version = "3.0.0", optional = true }

[target.'cfg(target_os="macos")'.dependencies]
Expand All @@ -42,8 +41,8 @@ dispatch = "0.2.0"
[target.'cfg(target_os="windows")'.dependencies]
#wasapi = { path = "../../rust/wasapi" }
#wasapi = { git = "https://github.com/HEnquist/wasapi-rs", branch = "win041" }
wasapi = "0.13.0"
windows = {version = "0.48.0", features = ["Win32_System_Threading", "Win32_Foundation"] }
wasapi = "0.15.0"
windows = {version = "0.57.0", features = ["Win32_System_Threading", "Win32_Foundation"] }

[dependencies]
serde = { version = "1.0", features = ["derive"] }
Expand All @@ -52,13 +51,12 @@ serde_json = "1.0"
serde_with = "1.11"
realfft = "3.0.0"
#realfft = { git = "https://github.com/HEnquist/realfft", branch = "better_errors" }
fftw = { version = "0.7.0", optional = true }
num-complex = "0.4"
num-traits = "0.2"
signal-hook = "0.3.8"
rand = { version = "0.8.3", default_features = false, features = ["small_rng", "std"] }
rand = { version = "0.8.3", default-features = false, features = ["small_rng", "std"] }
rand_distr = "0.4.3"
clap = "2.33.0"
clap = { version = "4.5.4", features = ["cargo"] }
lazy_static = "1.4.0"
log = "0.4.14"
flexi_logger = { version = "0.27.2", features = ["async", "colors"] }
Expand All @@ -67,15 +65,17 @@ tungstenite = { version = "0.21.0", optional = true }
native-tls = { version = "0.2.7", optional = true }
libpulse-binding = { version = "2.0", optional = true }
libpulse-simple-binding = { version = "2.0", optional = true }
rubato = "0.14.1"
#rubato = { git = "https://github.com/HEnquist/rubato", branch = "next-0.13" }
rubato = "0.15.0"
#rubato = { git = "https://github.com/HEnquist/rubato", branch = "optional_fft" }
cpal = { version = "0.13.3", optional = true }
#rawsample = { path = "../../rust/rawsample" }
#rawsample = { git = "https://github.com/HEnquist/rawsample", branch = "main" }
rawsample = "0.2.0"
circular-queue = "0.2.6"
parking_lot = { version = "0.12.1", features = ["hardware-lock-elision"] }
crossbeam-channel = "0.5"
rayon = "1.10.0"
audio_thread_priority = { version = "0.32.0", default-features = false }

[build-dependencies]
version_check = "0.9"
Expand Down
6 changes: 6 additions & 0 deletions FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@

Note the extra padding bytes (`0x00`) in S24LE. This scheme means that the samples get an "easier" alignment in memory, while wasting some space. In practice, this format isn't used much.

- Why don't I get any sound on MacOS?

Apps need to be granted access to the microphone in order to record sound from any source.
Without microphone access, things appear to be running well but only silence is recorded.
See [Microphone access](./backend_coreaudio.md#microphone-access)

## Filtering

- I only have filters with negative gain, why do I get clipping anyway?
Expand Down
Loading

0 comments on commit baf6a44

Please sign in to comment.