Skip to content

Latest commit

 

History

History
999 lines (794 loc) · 58.6 KB

CHANGELOG.md

File metadata and controls

999 lines (794 loc) · 58.6 KB

Changelog

v0.4.4 — 2024-11-11

This patch release adds support for Discord's new voice cryptosystems, based on AES256-GCM and XChaCha20Poly1305. Their use will be mandatory as of 2024-11-18, as will upgrading to Songbird v0.4.4. Upgrading to this patch version will allow for you to seamlessly negotiate and use those modes, which offer stronger authentication and integrity checking over the cleartext portions of RTP headers.

Thanks to the following for their contributions:

Added

Fixed

Changed

v0.4.3 — 2024-07-17

This patch release fixes features in dependencies and reverts a breaking tokio-tungstenite update.

Thanks to the following for their contributions:

Fixed

v0.4.2 — 2024-07-08

This patch release adds in support for HLS and M3U8 stream playback, in addition to several bugfixes.

Thanks to the following for their contributions:

Changed

v0.4.1 — 2024-02-29

This patch release includes several fixes to how audio tasks behave when moved between channels, and prevents a crash on zero-length packets in 48kHz Ogg Vorbis files. We've also added to YoutubeDl so you can now make use of ytdl's built-in search functionality.

Thanks to the following for their contributions:

Added

Changed

Fixed

v0.4.0 — 2023-11-27 — Nightingale

Possessing a beautiful, creative, and evocative song through both night and day, the humble Nightingale has long been seen as a symbol of poetry and love.

In keeping with the spirit of this release's passerine of choice, songbird now sings more melodiously than ever! This release has been a long time coming, and as such Nightingale brings several huge changes to how songbird is used and how it performs.


The largest change by far is a complete overhaul of all code relating to audio decoding, mixing, and loading from different locations, driven by Symphonia. Broadly, this means that we handle every part of the audio pipeline in-process and ffmpeg is entirely removed, saving significant memory and CPU and letting you scale to more voice calls on one box. Another boon is that reading in-memory audio now Just Works: if you can treat it as a &[u8], then you're good to go! Having this level of control also lets us expand our list of file-formats supporting direct Opus passthrough to include Ogg Opus and WebM/MKV, as well as the DCA format. Given that many sites will serve WebM, this is a significant saving on CPU time for many playback use cases. Additionally, we now handle HTTP reconnection logic internally, offering more reliable behaviour than certain downloader -> ffmpeg process chains would provide. Symphonia format support is significant, and you can enable and disable exactly the codecs and containers you need at compile-time.

Voice receive has been given its own fair share of improvements. Most importantly, all receive sessions now make use of per-user jitter bufferssongbird will now delay decoding of all users to correctly reorder audio packets, smooth out network latency jitter, and to help synchronize playback of several speakers. Receive functionality is now feature-gated and disabled by default, and so won't affect compile-time or runtime performance if you don't want to make use of it.

Finally, songbird now includes a new deadline-aware audio scheduler, which will pack as many concurrent Calls as possible onto a single thread. Compared to the previous model we now reduce thread counts, CPU use, and context switching – for context, up to 660 live Opus-passthrough-enabled calls can run on a single thread on a Ryzen 5700X. This is also helped by how we now park all Calls without any active Tracks onto a single shared event handling async task.


All in all, we're really excited to see what you build with these new tools and performance improvements.

Thanks to the following for their contributions:

Upgrade Pathway

Inputs:

  • ytdl etc. are removed and replaced with new lazy initialisers – read the docs on how to create sources from a URL or local path.
  • All inputs are now lazy by default, so Restartable is no longer needed.
  • Inputs can no longer directly output raw audio, as symphonia must always parse a container/codec pair. We've included a custom RawReader container format and the RawAdapter transform to support this.
  • Metadata is now split according to what you can learn when creating a source (AuxMetadata, e.g. info learned from a web scrape) and what metadata is encoded in a track itself (Metadata). Metadata can only be read once a track is fully initialised and parsed.
  • Songbird can now better encode an audio source's lifecycle from uninitialised, to readable, to having its headers fully parsed. Read the examples on how they can be manipulated, particularly if you want to make use of metadata.
  • Songbird's audio systems have undergone the most change in this release, so this list is non-exhaustive.

Tracks:

  • TrackHandle::action now gives temporary access to a View object – a set of current track state and extracted metadata – which can be used to fire more complex commands like seeking or pre-loading a Track by returning an Action.
  • TrackHandles are now created only from Driver::play/play_input and related methods.
  • tracks::create_player is removed in favour of the above methods on Driver.

Voice Receive:

  • Users of voice receive will now need to enable the "receive" feature.
  • CoreEvent::VoicePacket has now split into two events: RtpPacket and VoiceTick. RtpPacket corresponds to raw RTP packets received from each user and does not decode audio, while VoiceTick fires every 20ms and includes the reordered (and decoded, if so configured) audio for every user, synchronised and ready to use.
  • Per-user jitter buffer sizes can be configured using Config::playout_buffer_length and ::playout_spike_length.

Added

Changed

Fixed

v0.3.2 — 2023-04-09

This patch release fixes a WS disconnection that would occur when receiving a new opcode, which was happening due to Discord sending such an opcode upon connecting to a voice channel.

Thanks to the following for their contributions:

Fixed

v0.3.1 — 2023-03-02

This patch release applies some minor fixes, while correcting documentation errors and adjusting some organisaation in the repository.

Thanks to the following for their contributions:

Added

Fixed

v0.3.0 — 2022-07-22 — Chaffinch

Abundant and ever-curious, chaffinches are a vibrant and welcome visitor in these spring and summer months.

Making a quick and colourful splash, this breaking release mainly bumps our own dependencies and support for Discord libraries without any sweeping changes -- while adding generic support for any future rust-based Discord library. However, we have now removed support for the v0.2 series of the Tokio runtime.

Thanks to the following for their contributions:

Upgrade Pathway

  • Tokio v0.2 support has been removed in parity with other Discord libraries -- users must now migrate to v1.x.x.
  • Deprecated events (ClientConnect, DriverConnectFailed, DriverReconnectFailed and SsrcKnown) have been removed.
  • ClientConnect must now be detected using VoiceStateUpdate messages from your main gateway library of choice.
  • The remainder should be replaced with DriverDisconnect, and DriverConnect/DriverReconnect

Added

Changed

Fixed

Removed

v0.2.2 — 2022-02-13

This patch release makes it easier to create new ChildContainers, and deprecates the ClientConnect event. Users should instead make use of SpeakingStateUpdate events and Discord gateway events.

Thanks to the following for their contributions:

Added

Changed

Fixed

v0.2.1 — 2022-01-05

This patch release adds support for the yt-dlp fork of youtube-dl, and fixes track events to correctly fire events when multiple timed handlers are present on a track.

Thanks to the following for their contributions:

Added

Fixed

  • [docs] Examples: Fix unmatched quotation mark in comment. (#101) (@lajp) c:62ecfe6
  • [events] Events: fix handling of multiple timed events on a single track (#96) (@FelixMcFelix) c:e25cc14

v0.2.0 — 2021-08-17 — Magpie

Magpies are a common sight year-round; strong, intelligent, industrious, and loyal.

Taking after the humble magpie, this breaking release makes API changes favouring extensibility, patching some of the API rough spots, and adding resilience to some additional classes of failure.

Thanks to the following for their contributions:

Upgrade Pathway

  • References to songbird::{opus, Bitrate}; should now use songbird::driver::{opus, Bitrate};.
  • Custom Inputs (i.e., Reader::Extension/ExtensionSeek) now need to implement input::reader::MediaSource rather than just Read and/or Seek.
  • Sources which do not support seeking should have an unreachable!() function body or always return an error, as MediaSource::is_seekable() is used to gate support.
  • Many event handler types in songbird::EventContext have changed to unit enums, rather than struct variants.
  • New body types are included in songbird::events::context_data::*.
  • Config structs have been made non-exhaustive; they should be initialised via Config::default().
  • Channel join operations may now timeout after a default 10s—which should be handled.
  • Errors returned when joining a channel will now inform you whether you should try to leave a channel before rejoining.
  • Youtube-dl variants of songbird::input::error::Error have had their case altered from DL -> Dl.
  • TrackState sent from the driver are no longer boxed objects.
  • DriverDisconnect events have been introduced, which cover all disconnect events. As a result, DriverConnectFailed and DriverReconnectFailed are deprecated.
  • Tokio 0.2 support is deprecated. Related features will be removed as of Songbird 0.3.

Added

Changed

Fixed

v0.1.8 — 2021-07-01

This release patches a metadata parsing panic caused by Ogg files with negative start times.

Thanks to the following for their contributions:

Fixed

  • [input] Input: Fix Duration underflow on negative start time (#83) (@JellyWX) c:e58cadb

v0.1.7 — 2021-06-14

This release mainly patches an occasionally spinning task, due to a critical WebSocket read error.

Thanks to the following for their code contributions:

And special thanks to @jtscuba and @JellyWX for their efforts in reproducing, debugging and diagnosing the above issue.

Changed

Fixed

v0.1.6 — 2021-04-11

This patch release fixes a driver crash on leaving a channel, adds a utility method for requesting the current channel ID, and limits a sub-dependency to ensure compatibility with Rust v1.48.0.

Thanks to the following for their contributions:

Added

Fixed

v0.1.5 — 2021-03-23

This patch release adds bugfixes for incorrect seeking in Restartable sources and resource usage of inactive Drivers, as well as some utility methods and reduced logging.

Thanks to the following for their contributions:

Added

Changed

Fixed

v0.1.4 — 2021-02-10

This patch release updates introduces a new event type, to expose a driver's SSRC externally on connect.

Thanks to the following for their contributions:

Added

Changed

v0.1.3 — 2021-02-04

This patch release corrects the process drop logic to cleanup all chained child processes, and for Inputs to be safe to drop in async contexts. Additionally, this adds backwards-compatibility for Tokio 0.2 in serenity-based bots.

Thanks to the following for their contributions:

Added

Fixed

v0.1.2 — 2021-01-26

This patch release fixes a PID/zombie process leak affecting bots running on Linux/Mac, and prevents youtube-dl warnings from being converted into fatal errors.

This release also changes Songbird managers to use DashMap internally, which should substantially speed up concurrent shard accesses to the central call registry.

Thanks to the following for their contributions:

Changed

Fixed

v0.1.1 — 2021-01-17

This is a short patch release, fixing some error message spam under network failures, adding some new convenience event classes, as well as making it easier to cancel many event handlers.

Thanks to the following for their contributions:

Added

Fixed

v0.1.0 — 2021-01-08 — Robin

We're very excited to publish and announce the first release of Songbird, an async Rust voice library for Discord! It's been a long time coming, but all the hard work has paid off in bringing the first version of this library to completion.

Thanks to the following for their contributions:

Songbird is based heavily on serenity's voice module, which has served as its base design, informed many of the design changes, and paved a lot of the API/protocol research needed. We'd also like to thank all users who have contributed to this module in the past for laying the groundwork for Songbird:

Added

Changed

Fixed