You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: CHANGELOG.md
+204-1
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,140 @@
1
1
# Changelog
2
2
3
-
## [0.3.2] - 2023-04-09
3
+
## [0.4.0] — 2023-11-20 — **Nightingale**
4
+
5
+
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.
6
+
7
+
In keeping with the spirit of this release's passerine of choice, *songbird* now sings more melodiously than ever!
8
+
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.
9
+
10
+
---
11
+
12
+
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**](https://github.com/pdeljanov/Symphonia).
13
+
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.
14
+
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!
15
+
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](https://github.com/bwmarrin/dca) format.
16
+
Given that many sites will serve WebM, this is a significant saving on CPU time for many playback use cases.
17
+
Additionally, we now handle HTTP reconnection logic internally, offering more reliable behaviour than certain `downloader -> ffmpeg` process chains would provide.
18
+
Symphonia format support is [significant](https://github.com/pdeljanov/Symphonia?tab=readme-ov-file#formats-demuxers), and you can enable and disable exactly the codecs and containers you need at compile-time.
19
+
20
+
Voice receive has been given its own fair share of improvements.
21
+
Most importantly, all receive sessions now make use of per-user *jitter buffers* – *songbird* 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.
22
+
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.
23
+
24
+
Finally, songbird now includes a new deadline-aware audio scheduler, which will pack as many concurrent `Call`s as possible onto a single thread.
25
+
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.
26
+
This is also helped by how we now park all `Call`s without any active `Track`s onto a single shared event handling async task.
27
+
28
+
---
29
+
30
+
All in all, we're really excited to see what you build with these new tools and performance improvements.
31
+
32
+
Thanks to the following for their contributions:
33
+
34
+
-[@Erk-]
35
+
-[@fee1-dead]
36
+
-[@FelixMcFelix]
37
+
-[@GnomedDev]
38
+
-[@jontze]
39
+
-[@maxall41]
40
+
-[@Sebbl0508]
41
+
-[@tazz4843]
42
+
-[@vicky5124]
43
+
44
+
### Upgrade Pathway
45
+
46
+
**Inputs**:
47
+
*`ytdl` etc. are removed and replaced with new lazy initialisers – [read the docs on how to create sources from a URL or local path](https://serenity-rs.github.io/songbird/next/songbird/input/index.html#common-sources).
48
+
* All inputs are now lazy by default, so `Restartable` is no longer needed.
49
+
* 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.
50
+
* 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.
51
+
* 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](https://serenity-rs.github.io/songbird/next/songbird/input/enum.Input.html), particularly if you want to make use of metadata.
52
+
* Songbird's audio systems have undergone the most change in this release, so this list is non-exhaustive.
53
+
54
+
**Tracks**:
55
+
*`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`.
56
+
*`TrackHandle`s are now created only from `Driver::play`/`play_input` and related methods.
57
+
*`tracks::create_player` is removed in favour of the above methods on `Driver`.
58
+
59
+
**Voice Receive**:
60
+
* Users of voice receive will now need to enable the `"receive"` feature.
61
+
*`CoreEvent::VoicePacket` has now split into two events: `RtpPacket` and `VoiceTick`.
62
+
`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.
63
+
* Per-user jitter buffer sizes can be configured using `Config::playout_buffer_length` and `::playout_spike_length`.
0 commit comments