| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
| |
This reverts commit 83a0c85b0bf87cb4272b5d6e189d139fc31a6d23.
This makes voice sending work again.
|
| | |
|
| |
|
|
|
|
| |
Add a method for specifying custom ffmpeg arguments.
Closes #266.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit monomorphizes all functions, turning functions like:
```rust
fn foo<T: Into<Bar>>(baz: T) {
baz = baz.into();
// function here
}
```
Into functions like:
```rust
fn foo<T: Into<Bar>>(baz: T) {
_foo(baz.into())
}
fn _foo(baz: Bar) {
// function here
}
```
This avoids binary bloat and improves build times, by reducing the amount of
code duplication.
|
| | |
|
| |
|
|
| |
Turns out `wait` was a little *too* cooperative. Holdover until we
change to real ffmpeg bindings.
|
| | |
|
| | |
|
| |
|
|
|
| |
This makes them easier to be found by tools like rls.
Also update struct inits to use the shorthand version for `x: x`.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Backport parts of 7d162b9.
* Silent frame fixes.
* Read-only playback position.
* Opus Softclip for audio mixing.
* Documentation for Audio structs.
Not included (for now):
* Bitrate control
* Gutting/rework of Voice OpCodes, Heartbeats
* Opus stream mixing
* Minor adjustments due to manual edits.
|
| | |
|
| |
|
|
|
| |
Fix broken links caused by the `model` module changes in v0.5.0, which
split up the module into sub-modules for better organization.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Fix Speaking state, use latest voice API version
* Speaking state would remain stuck on after playing particularly long
stretches of audio. So far as I can tell, playing 5 frames of silence
BEFORE changing the state seems to do the trick.
* Added new constant to make sure the library uses v3 of the voice api,
which it is written for.
* Heartbeat interval adjusted by * .75 as recommended by Discord.
* Initial version of new Audio wrapper.
* Single audio file case, as before..
* Loop over all available audio samples.
* Combine audio streams, account for volume.
* Cheaper explicit Opus silence frames.
As per Discord's recommendation, use a well-known 3-byte silence frame when needed.
* A bit of cleanup
Cleanup some of the code, rename some short-form fields to longer forms
(e.g. `s/src/source`), and remove a breaking change.
`Handler::play` was changed to return `LockedAudio` instead of `()`. If
someone were to rely on `Handler::play` returning `()`, the return type
change would break their code. Instead, this functionality has been
added to a new `Handler::play_returning` function.
|
| |
|
|
|
| |
Technically a bugfix because this made it sort of unusable; instead,
users need to explicitly `Some(Box::new(receiver))`.
|
| | |
|
| |
|
|
|
|
|
| |
The websocket loop for voice events is terminated whenever a websocket
message is successfully sent. This is caused by a bug that was
introduced in
https://github.com/zeyla/serenity/commit/c8536c111117f26833fb1bceff734ac1abc55479#diff-6a8a0bad68abd05790cdc2c2ba043ec6L457,
due to an improperly implemented clippy lint.
|
| |
|
|
|
| |
Add code to strip RTP header extensions from an incoming voice stream,
if they are present.
See https://tools.ietf.org/html/rfc5285 for more info.
|
| | |
|
| |
|
|
|
|
|
| |
Instead of communicating over the gateway in a split form of a
`serde_json::Value` or a `client::bridge::gateway::ShardClientMessage`,
wrap them both into a single enum for better interaction between the
client, gateway, and voice modules.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
Implement Deserialize for `model::event::GatewayEvent` and
`model::event::VoiceEvent`, and derive it for `model::event::Event`.
Due to the natural potential slowness of deserializing into`Event`
(attempting to deserialize into each variant until successful), a
function named `model::event::deserialize_event_with_type` is provided
for quickly deserializing into a known type if the dispatch type is
known.
|
| | |
|
| |\ |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| |
| | |
Fixes #174
|
| | |
| |
| |
| | |
Makes the compiliation time just a bit worse
|
| | |
| |
| |
| | |
Fixes #168
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Switch to the `parking_lot` crate's implementations of
`std::sync::Mutex` and `std::sync::RwLock`, which are more efficient.
A writeup on why `parking_lot` is more efficient can be read here:
<https://github.com/Amanieu/parking_lot>
Upgrade path:
Modify `mutex.lock().unwrap()` usage to `mutex.lock()` (not needing to
unwrap or handle a result), and
`rwlock.read().unwrap()`/`rwlock.write().unwrap()` usage to
`rwlock.read()` and `rwlock.write()`.
For example, modify:
```rust
use serenity::CACHE;
println!("{}", CACHE.read().unwrap().user.id);
```
to:
```rust
use serenity::CACHE;
println!("{}", CACHE.read().user.id);
```
|
| | | |
|
| | | |
|
| | |
| |
| | |
Fixes #174
|
| | |
| |
| |
| | |
Makes the compiliation time just a bit worse
|
| | |
| |
| |
| | |
Fixes #168
|
| |/ |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
Also not quite sure if they goofed rustfmt or something, but its changes it did were a bit bizarre.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|