Skip to content

Commit

Permalink
TrackQueues: Convenience methods and extension (#7)
Browse files Browse the repository at this point in the history
* Adds a uuid field to tracks and handles to make it easier to identify and match event sources after the fact.
* Adds optional feature "builtin-queue" to expose a queue on every driver, as a convenience for users who can guarantee they'll need a queue for every driver/call.
* Adds methods to queues to allow access to the currently running track handle, remove a specified queue entry, as well as to mutate the underlying queue from a closure.
  • Loading branch information
FelixMcFelix authored Nov 16, 2020
1 parent 047ce03 commit de65225
Show file tree
Hide file tree
Showing 7 changed files with 387 additions and 119 deletions.
10 changes: 9 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,11 @@ default-features = false
optional = true
version = "2"

[dependencies.uuid]
optional = true
version = "0.8"
features = ["v4"]

[dependencies.xsalsa20poly1305]
optional = true
version = "0.6"
Expand Down Expand Up @@ -135,9 +140,9 @@ driver = [
"tokio/sync",
"tokio/time",
"url",
"uuid",
"xsalsa20poly1305",
]
youtube-dlc = []
rustls = ["async-tungstenite/tokio-rustls"]
native = ["async-tungstenite/tokio-native-tls"]
serenity-rustls = ["serenity/rustls_backend", "rustls", "gateway", "serenity-deps"]
Expand All @@ -149,6 +154,9 @@ simd-zlib = ["twilight-gateway/simd-zlib"]
stock-zlib = ["twilight-gateway/stock-zlib"]
serenity-deps = ["async-trait"]

youtube-dlc = []
builtin-queue = []

[[bench]]
name = "mixing"
path = "benches/mixing.rs"
Expand Down
1 change: 1 addition & 0 deletions examples/serenity/voice_events_queue/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ tracing-subscriber = "0.2"
tracing-futures = "0.2"

[dependencies.songbird]
features = ["builtin-queue"]
path = "../../../"

[dependencies.serenity]
Expand Down
Loading

0 comments on commit de65225

Please sign in to comment.