Files
songbird/Cargo.toml
Kyle Simpson c60c454cf5 Driver/receive: Implement audio reorder/jitter buffer (#156)
This PR Introduces a new `VoiceTick` event which collects and reorders all RTP packets to smooth over network instability, as well as to synchronise user audio streams. Raw packet events have been moved to `RtpPacket`, while `SpeakingUpdate`s have been removed as they can be easily computed using the `silent`/`speaking` audio maps included in each event.

Closes #146.
2023-11-20 00:02:55 +00:00

170 lines
4.8 KiB
TOML

[package]
authors = ["Kyle Simpson <kyleandrew.simpson@gmail.com>"]
description = "An async Rust library for the Discord voice API."
documentation = "https://docs.rs/songbird"
edition = "2021"
homepage = "https://github.com/serenity-rs/songbird"
include = ["src/**/*.rs", "Cargo.toml", "build.rs"]
keywords = ["discord", "api", "rtp", "audio"]
license = "ISC"
name = "songbird"
readme = "README.md"
repository = "https://github.com/serenity-rs/songbird.git"
rust-version = "1.61"
version = "0.3.0"
[dependencies]
async-trait = { optional = true, version = "0.1" }
audiopus = { optional = true, version = "0.3.0-rc.0" }
byteorder = { optional = true, version = "1" }
bytes = { optional = true, version = "1" }
dashmap = { optional = true, version = "5" }
derivative = "2"
discortp = { default-features = false, features = ["discord", "pnet", "rtp"], optional = true, version = "0.5" }
flume = { optional = true, version = "0.10" }
futures = "0.3"
once_cell = { optional = true, version = "1" }
parking_lot = { optional = true, version = "0.12" }
pin-project = "1"
rand = { optional = true, version = "0.8" }
reqwest = { default-features = false, features = ["stream"], optional = true, version = "0.11" }
ringbuf = { optional = true, version = "0.3" }
rubato = { optional = true, version = "0.12" }
rusty_pool = { optional = true, version = "0.7" }
serde = { version = "1", features = ["derive"] }
serde-aux = { optional = true, version = "4"}
serde_json = "1"
simd-json = { features = ["serde_impl"], optional = true, version = "0.7.0" }
socket2 = { optional = true, version = "0.4" }
streamcatcher = { optional = true, version = "1" }
tokio = { default-features = false, optional = true, version = "1.0" }
tokio-tungstenite = { optional = true, version = "0.17" }
tokio-util = { features = ["io"], optional = true, version = "0.7" }
tracing = { version = "0.1", features = ["log"] }
tracing-futures = "0.2"
twilight-gateway = { default-features = false, optional = true, version = "0.14.0" }
twilight-model = { default-features = false, optional = true, version = "0.14.0" }
typemap_rev = { optional = true, version = "0.2" }
url = { optional = true, version = "2" }
uuid = { features = ["v4"], optional = true, version = "1" }
xsalsa20poly1305 = { features = ["std"], optional = true, version = "0.9" }
[dependencies.serenity]
version = "0.11"
default-features = false
features = ["voice", "gateway"]
optional = true
[dependencies.serenity-voice-model]
version = "0.11"
optional = true
[dependencies.symphonia]
git = "https://github.com/pdeljanov/Symphonia"
default-features = false
optional = true
version = "0.5"
[dependencies.symphonia-core]
git = "https://github.com/pdeljanov/Symphonia"
optional = true
version = "0.5"
[dev-dependencies]
criterion = "0.4"
ntest = "0.9"
symphonia = { version = "0.5", features = ["aac", "isomp4", "mp3"], git = "https://github.com/pdeljanov/Symphonia" }
utils = { path = "utils" }
tokio = { version = "1", features = ["rt", "rt-multi-thread"] }
[features]
# Core features
default = [
"driver",
"gateway",
"rustls",
"serenity",
]
gateway = [
"dep:async-trait",
"dep:dashmap",
"dep:flume",
"dep:once_cell",
"dep:parking_lot",
"dep:tokio",
"tokio?/sync",
"tokio?/time",
]
driver = [
"dep:async-trait",
"dep:audiopus",
"dep:byteorder",
"dep:discortp",
"dep:reqwest",
"dep:flume",
"dep:once_cell",
"dep:parking_lot",
"dep:rand",
"dep:ringbuf",
"dep:rubato",
"dep:rusty_pool",
"dep:serde-aux",
"dep:serenity-voice-model",
"dep:socket2",
"dep:streamcatcher",
"dep:symphonia",
"dep:symphonia-core",
"dep:tokio",
"dep:tokio-tungstenite",
"dep:tokio-util",
"dep:typemap_rev",
"dep:url",
"dep:uuid",
"dep:xsalsa20poly1305",
"tokio?/fs",
"tokio?/io-util",
"tokio?/macros",
"tokio?/net",
"tokio?/process",
"tokio?/rt",
"tokio?/sync",
"tokio?/time",
]
rustls = [
"reqwest?/rustls-tls",
"serenity?/rustls_backend",
"tokio-tungstenite?/rustls-tls-webpki-roots",
"twilight-gateway?/rustls-native-roots",
]
native = [
"reqwest?/native-tls",
"serenity?/native_tls_backend",
"tokio-tungstenite?/native-tls",
"twilight-gateway?/native",
]
twilight = ["dep:twilight-gateway","dep:twilight-model"]
# Behaviour altering features.
builtin-queue = []
receive = ["dep:bytes", "discortp?/demux", "discortp?/rtcp"]
# Used for docgen/testing/benchmarking.
full-doc = ["default", "twilight", "builtin-queue", "receive"]
internals = []
[[bench]]
name = "base-mixing"
path = "benches/base-mixing.rs"
required-features = ["internals"]
harness = false
[[bench]]
name = "mixing-task"
path = "benches/mixing-task.rs"
required-features = ["internals"]
harness = false
[package.metadata.docs.rs]
features = ["full-doc"]
rustdoc-args = ["--cfg", "docsrs"]