Skip to content

Commit 0bf5773

Browse files
committed
fix compiler features, add 128-channels
1 parent 4e69fa8 commit 0bf5773

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

Cargo.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,8 @@ hound = "3.0"
1818
error-chain = "0.7"
1919
parking_lot = "0.3"
2020
uuid = { version = "0.3", features = ["v4"] }
21+
22+
[features]
23+
24+
512-players = []
25+
128-channels = []

src/lib.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,12 @@ pub const MAX_PLAYERS: usize = 256;
4242
#[cfg(feature = "512-players")]
4343
pub const MAX_PLAYERS: usize = 512;
4444
/// The maximum amount of channels that can be created.
45+
///
46+
/// Can be increased to 128 with the `128-channels` feature.
47+
#[cfg(not(feature = "128-channels"))]
4548
pub const MAX_CHANS: usize = 64;
49+
#[cfg(feature = "128-channels")]
50+
pub const MAX_CHANS: usize = 128;
4651
/// The size of a stream's buffer, in samples.
4752
pub const STREAM_BUFFER_SIZE: usize = 100_000;
4853
/// The size of the communication buffer between audio thread and main thread, in messages.

0 commit comments

Comments
 (0)