Commit Graph

76 Commits

Author SHA1 Message Date
Kyle Simpson
9fdbcd77be Driver: Handle receiving large non-standard packets (#23)
Discord's web client on Firefox seems to send very large packets,
ranging from 20ms to 60ms at different times and systems. This adapts
the UDP Rx task to remember the largest packet needed for any SSRC
in a call and preallocate that much, which also allows it to decode
such packets.
2020-12-04 13:55:22 +00:00
baguette
57df3fe53a TrackHandle: add metadata field (#25)
* Adds metadata field to TrackHandle.

Co-authored-by: Kyle Simpson <kyleandrew.simpson@gmail.com>
2020-12-04 13:43:35 +00:00
Kyle Simpson
94157b12bc Docs: Move to new intra-doc links, make events non-exhaustive. (#19)
Far cleaner and more reliable than the old doc-link pattern. Also allowed me to spot some event types and sources which should have been made non_exhaustive.
2020-11-24 19:52:23 +00:00
Maspenguin
1ada46d24b Fix: Remove serenity default features (#18)
Allows use of songbird without serenity's framework.
2020-11-23 10:43:24 +00:00
baguette
69acea8664 TrackQueue: Add current_queue method (#16) 2020-11-19 00:33:00 +00:00
Kyle Simpson
2da5901930 Input: Make restartable sources fully async. (#15)
Redresses a previous holdover from an attempt to get Restartable sources to work more neatly inside the synchronous mixer thread. This prevents `Restartable::*` from blocking without warning.

The initial fix at the time was to perform the restart work on a task provided by the tokio runtime as `executor::block_on` needs to be run from within a valid async runtime. Naturally, this completely missed the point that these closures should/could be async, without any need to fudge async functions into a sync wrapper.

Also removes the `From` for normal closures, as this will probably act as a footgun for folks on a single-threaded executor.
2020-11-18 20:48:34 +00:00
( ͡° ͜ʖ ͡°)
cb7d8cc618 Lint: Clippy warning cleanup (#8) 2020-11-16 15:54:29 +00:00
Kyle Simpson
de652250d8 TrackQueues: Convenience methods and extension (#7)
* 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.
2020-11-16 08:57:54 +00:00
Alex M. M
047ce0379a Docs: Add a dependencies section in the README (#2) 2020-11-14 20:23:49 +00:00
Kyle Simpson
45b1fb13bf Docs: describe youtube-dlc feature 2020-11-13 22:41:01 +00:00
( ͡° ͜ʖ ͡°)
6702520b7c Offer youtube-dlc as an alternative to youtube-dl (#1)
* Adds youtube-dlc feature.
2020-11-13 22:27:28 +00:00
Kyle Simpson
a9f8d6c93a Fix: Use correct tokio features for driver-only mode 2020-11-13 19:32:03 +00:00
Kyle Simpson
35d262d946 CI round 2 2020-11-13 19:15:33 +00:00
Kyle Simpson
c5ce107d55 Attempt CI similar to serenity 2020-11-13 18:56:18 +00:00
Kyle Simpson
09da85bfc3 Some updated links, move to current/next branches. 2020-11-13 17:55:36 +00:00
Alex M. M
a778d24941 Add the ISC license 2020-11-13 16:45:59 +01:00
Alex M. M
4f5b767dba Fix links in the README regarding examples 2020-11-13 16:41:35 +01:00
Alex M. M
f5bf54a63d Move examples from the Serenity repository 2020-11-13 16:20:57 +01:00
Alex M. M
4a897a7b76 Remove mentions of versions to Serenity git dependencies 2020-11-13 15:07:29 +01:00
Alex M. M
ec7f5bca2d Add a .gitignore file as songbird is in its own repository 2020-11-13 14:56:31 +01:00
Alex M. M
6724655351 Update Cargo.toml to reflect the separation of songbird from Serenity's repository 2020-11-13 14:55:38 +01:00
Kyle Simpson
868785ba71 Update versions for twilight and serenity-voice-model in songbird (#1075) 2020-11-12 13:34:23 +01:00
Kyle Simpson
8b7f388f7b Implement Songbird driver configuration (#1074) 2020-11-11 23:40:09 +01:00
Kyle Simpson
26c9c9117c Handle Voice close codes, prevent Songbird spinning WS threads (#1068)
Voice `CloseCode`s now map to a type rather than a collection of constants. Correct close code handling in this way terminates the websocket task when there is no likelihood of resuming, which was causing leftover tasks to spin at the `tokio::select` in some circumstances (i.e., ::leave, which keeps the `Driver` alive).
2020-11-08 22:28:40 +01:00
Kyle Simpson
38a55da88b Document intents for Songbird (#1061) 2020-11-06 00:25:29 +01:00
Kyle Simpson
7e4392ae68 Voice Rework -- Events, Track Queues (#806)
This implements a proof-of-concept for an improved audio frontend. The largest change is the introduction of events and event handling: both by time elapsed and by track events, such as ending or looping. Following on from this, the library now includes a basic, event-driven track queue system (which people seem to ask for unusually often). A new sample, `examples/13_voice_events`, demonstrates both the `TrackQueue` system and some basic events via the `~queue` and `~play_fade` commands.

Locks are removed from around the control of `Audio` objects, which should allow the backend to be moved to a more granular futures-based backend solution in a cleaner way.
2020-10-31 12:19:07 +01:00