Upgrade to songbird 0.2

Signed-off-by: Aron Heinecke <aron.heinecke@t-online.de>
This commit is contained in:
Aron Heinecke 2021-09-10 20:20:54 +02:00
parent 0bb7e5e2d2
commit 99dc2c3448
4 changed files with 162 additions and 240 deletions

367
Cargo.lock generated
View file

@ -8,15 +8,6 @@ version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe"
[[package]]
name = "aead"
version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7fc95d1bdb8e6666b2b217308eeeb09f2d6728d104be3e31916cc74d15420331"
dependencies = [
"generic-array",
]
[[package]]
name = "aead"
version = "0.4.2"
@ -24,6 +15,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6e3e798aa0c8239776f54415bc06f3d74b1850f3f830b45c35cfc80556973f70"
dependencies = [
"generic-array",
"rand_core 0.6.3",
]
[[package]]
@ -33,8 +25,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "495ee669413bfbe9e8cace80f4d3d78e6d8c8d99579f97fb93bde351b185f2d4"
dependencies = [
"cfg-if 1.0.0",
"cipher 0.3.0",
"cpufeatures",
"cipher",
"cpufeatures 0.1.5",
"opaque-debug",
]
@ -53,7 +45,7 @@ version = "0.12.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2"
dependencies = [
"winapi 0.3.9",
"winapi",
]
[[package]]
@ -68,6 +60,15 @@ version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e906254e445520903e7fc9da4f709886c84ae4bc4ddaf0e093188d66df4dc820"
[[package]]
name = "arrayvec"
version = "0.4.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cd9fd44efafa8690358b7408d253adf110036b88f55672a933f01d616ad9b1b9"
dependencies = [
"nodrop",
]
[[package]]
name = "arrayvec"
version = "0.5.2"
@ -93,7 +94,7 @@ checksum = "f7cc5408453d37e2b1c6f01d8078af1da58b6cfa6a80fa2ede3bd2b9a6ada9c4"
dependencies = [
"futures-io",
"futures-util",
"log 0.4.14",
"log",
"native-tls",
"pin-project",
"tokio",
@ -105,13 +106,13 @@ dependencies = [
[[package]]
name = "async-tungstenite"
version = "0.13.1"
version = "0.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "07b30ef0ea5c20caaa54baea49514a206308989c68be7ecd86c7f956e4da6378"
checksum = "8645e929ec7964448a901db9da30cd2ae8c7fecf4d6176af427837531dbbb63b"
dependencies = [
"futures-io",
"futures-util",
"log 0.4.14",
"log",
"pin-project-lite",
"tokio",
"tokio-rustls",
@ -127,7 +128,7 @@ checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8"
dependencies = [
"hermit-abi",
"libc",
"winapi 0.3.9",
"winapi",
]
[[package]]
@ -145,7 +146,7 @@ version = "0.1.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "927791de46f70facea982dbfaf19719a41ce6064443403be631a85de6a58fff9"
dependencies = [
"log 0.4.14",
"log",
"pkg-config",
]
@ -179,12 +180,6 @@ version = "0.6.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb"
[[package]]
name = "bitflags"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4f67931368edf3a9a51d29886d245f1c3db2f1ef0dcc9e35ff70341b78c10d23"
[[package]]
name = "bitflags"
version = "1.3.1"
@ -283,16 +278,7 @@ dependencies = [
"num-traits 0.2.14",
"serde",
"time 0.1.43",
"winapi 0.3.9",
]
[[package]]
name = "cipher"
version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "12f8e7987cbd042a63249497f41aed09f8e65add917ea6566effbc56578d6801"
dependencies = [
"generic-array",
"winapi",
]
[[package]]
@ -363,10 +349,13 @@ dependencies = [
]
[[package]]
name = "cpuid-bool"
version = "0.2.0"
name = "cpufeatures"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dcb25d077389e53838a8158c8e99174c5a9d902dee4904320db714f3c653ffba"
checksum = "95059428f66df56b63431fdb4e1947ed2190586af5c5a8a8b71122bdf5a7f469"
dependencies = [
"libc",
]
[[package]]
name = "crc32fast"
@ -413,7 +402,7 @@ version = "0.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714"
dependencies = [
"cipher 0.3.0",
"cipher",
"generic-array",
"subtle",
]
@ -446,7 +435,7 @@ version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "049bb91fb4aaf0e3c7efa6cd5ef877dbbbd15b39dad06d9948de4ec8a75761ea"
dependencies = [
"cipher 0.3.0",
"cipher",
]
[[package]]
@ -524,7 +513,7 @@ checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d"
dependencies = [
"libc",
"redox_users",
"winapi 0.3.9",
"winapi",
]
[[package]]
@ -535,14 +524,12 @@ checksum = "212d0f5754cb6769937f4501cc0e67f4f4483c8d2c3e1e922ee9edbe4ab4c7c0"
[[package]]
name = "discortp"
version = "0.2.2"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9c0d482488c336a2164529765da3f645f26215df9c2033137ddedac333c8e2e8"
checksum = "fb66017646a48220b5ea30d63ac18bb5952f647f1a41ed755880895125d26972"
dependencies = [
"glob",
"pnet_macros",
"pnet_macros_support",
"syntex",
]
[[package]]
@ -551,8 +538,8 @@ version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cb7bdbff621689e4ac5a5f9d82b3b8573173a9ce20f20ddc936bde9c01ae88e5"
dependencies = [
"aead 0.4.2",
"cipher 0.3.0",
"aead",
"cipher",
"cmac",
"ctr",
"subtle",
@ -797,9 +784,9 @@ checksum = "061d3be1afec479d56fa3bd182bf966c7999ec175fcfdb87ac14d417241366c6"
dependencies = [
"cc",
"libc",
"log 0.4.14",
"log",
"rustversion",
"winapi 0.3.9",
"winapi",
]
[[package]]
@ -853,18 +840,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "45ceded7b01141664c3fc4a50199c408a6ed247e6c8415dc005e895f1d233374"
dependencies = [
"chrono",
"log 0.4.14",
"log",
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "glob"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574"
[[package]]
name = "group"
version = "0.9.0"
@ -937,7 +918,7 @@ checksum = "3c731c3e10504cc8ed35cfe2f1db4c9274c3d35fa486e3b31df46f068ef3e867"
dependencies = [
"libc",
"match_cfg",
"winapi 0.3.9",
"winapi",
]
[[package]]
@ -1006,7 +987,7 @@ checksum = "5f9f7a97316d44c0af9b0301e65010573a853a9fc97046d7331d7f6bc0fd5a64"
dependencies = [
"futures-util",
"hyper",
"log 0.4.14",
"log",
"rustls",
"tokio",
"tokio-rustls",
@ -1082,7 +1063,7 @@ checksum = "f7e2f18aece9709094573a9f24f483c4f65caa4298e2f7ae1b71cc65d853fad7"
dependencies = [
"socket2 0.3.19",
"widestring",
"winapi 0.3.9",
"winapi",
"winreg 0.6.2",
]
@ -1116,16 +1097,6 @@ dependencies = [
"wasm-bindgen",
]
[[package]]
name = "kernel32-sys"
version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d"
dependencies = [
"winapi 0.2.8",
"winapi-build",
]
[[package]]
name = "lazy_static"
version = "1.4.0"
@ -1138,8 +1109,8 @@ version = "0.7.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6607c62aa161d23d17a9072cc5da0be67cdfc89d3afb1e8d9c842bebc2525ffe"
dependencies = [
"arrayvec",
"bitflags 1.3.1",
"arrayvec 0.5.2",
"bitflags",
"cfg-if 1.0.0",
"ryu",
"static_assertions",
@ -1147,9 +1118,9 @@ dependencies = [
[[package]]
name = "libc"
version = "0.2.99"
version = "0.2.101"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a7f823d141fe0a24df1e23b4af4e3c7ba9e5966ec514ea068c93024aa7deb765"
checksum = "3cb00336871be5ed2c8ed44b60ae9959dc5b9f08539422ed43f09e34ecaeba21"
[[package]]
name = "linked-hash-map"
@ -1166,15 +1137,6 @@ dependencies = [
"scopeguard",
]
[[package]]
name = "log"
version = "0.3.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b"
dependencies = [
"log 0.4.14",
]
[[package]]
name = "log"
version = "0.4.14"
@ -1266,10 +1228,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8c2bdb6314ec10835cd3293dd268473a835c02b7b352e788be788b3c6ca6bb16"
dependencies = [
"libc",
"log 0.4.14",
"log",
"miow",
"ntapi",
"winapi 0.3.9",
"winapi",
]
[[package]]
@ -1278,7 +1240,7 @@ version = "0.3.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b9f1c5b025cda876f66ef43a113f91ebc9f4ccef34843000e0adf6ebbab84e21"
dependencies = [
"winapi 0.3.9",
"winapi",
]
[[package]]
@ -1298,7 +1260,7 @@ checksum = "48ba9f7719b5a0f42f338907614285fb5fd70e53858141f69898a1fb7203b24d"
dependencies = [
"lazy_static",
"libc",
"log 0.4.14",
"log",
"openssl",
"openssl-probe",
"openssl-sys",
@ -1314,6 +1276,12 @@ version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b93853da6d84c2e3c7d730d6473e8817692dd89be387eb01b94d7f108ecb5b8c"
[[package]]
name = "nodrop"
version = "0.1.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb"
[[package]]
name = "nom"
version = "5.1.2"
@ -1331,7 +1299,7 @@ version = "0.3.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3f6bb902e437b6d86e03cce10a7e2af662292c5dfef23b65899ea3ac9354ad44"
dependencies = [
"winapi 0.3.9",
"winapi",
]
[[package]]
@ -1421,7 +1389,7 @@ version = "0.10.35"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "549430950c79ae24e6d02e0b7404534ecf311d94cc9f861e9e4020187d13d885"
dependencies = [
"bitflags 1.3.1",
"bitflags",
"cfg-if 1.0.0",
"foreign-types",
"libc",
@ -1481,7 +1449,7 @@ dependencies = [
"libc",
"redox_syscall",
"smallvec",
"winapi 0.3.9",
"winapi",
]
[[package]]
@ -1540,37 +1508,39 @@ checksum = "3831453b3449ceb48b6d9c7ad7c96d5ea673e9b470a1dc578c2ce6521230884c"
[[package]]
name = "pnet_base"
version = "0.26.0"
version = "0.28.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b7cd5f7e15220afa66b0a9a62841ea10089f39dcaa1c29752c0b22dfc03111b5"
checksum = "25488cd551a753dcaaa6fffc9f69a7610a412dd8954425bf7ffad5f7d1156fb8"
[[package]]
name = "pnet_macros"
version = "0.26.0"
version = "0.28.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bbbd5c52c6e04aa720400f9c71cd0e8bcb38cd13421d5caabd9035e9efa47de9"
checksum = "30490e0852e58402b8fae0d39897b08a24f493023a4d6cf56b2e30f31ed57548"
dependencies = [
"proc-macro2",
"quote",
"regex",
"syntex",
"syntex_syntax",
"syn",
]
[[package]]
name = "pnet_macros_support"
version = "0.26.0"
version = "0.28.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "daf9c5c0c36766d0a4da9ab268c0700771b8ec367b9463fd678109fa28463c5b"
checksum = "d4714e10f30cab023005adce048f2d30dd4ac4f093662abf2220855655ef8f90"
dependencies = [
"pnet_base",
]
[[package]]
name = "poly1305"
version = "0.6.2"
version = "0.7.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4b7456bc1ad2d4cf82b3a016be4c2ac48daf11bf990c1603ebd447fe6f30fca8"
checksum = "048aeb476be11a4b6ca432ca569e375810de9294ae78f4774e78ea98a9246ede"
dependencies = [
"cpuid-bool",
"cpufeatures 0.2.1",
"opaque-debug",
"universal-hash",
]
@ -1598,7 +1568,7 @@ version = "1.0.28"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5c7ed8b8c7b886ea3ed7dde405212185f423ab44682667c8c6dd14aa1d9f6612"
dependencies = [
"unicode-xid 0.2.2",
"unicode-xid",
]
[[package]]
@ -1720,7 +1690,7 @@ version = "0.2.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8383f39639269cde97d255a32bdb68c047337295414940c68bdd30c2e13203ff"
dependencies = [
"bitflags 1.3.1",
"bitflags",
]
[[package]]
@ -1785,7 +1755,7 @@ version = "0.5.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7"
dependencies = [
"winapi 0.3.9",
"winapi",
]
[[package]]
@ -1828,7 +1798,7 @@ dependencies = [
"ipnet",
"js-sys",
"lazy_static",
"log 0.4.14",
"log",
"mime",
"mime_guess",
"native-tls",
@ -1871,15 +1841,9 @@ dependencies = [
"spin",
"untrusted",
"web-sys",
"winapi 0.3.9",
"winapi",
]
[[package]]
name = "rustc-serialize"
version = "0.3.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dcf128d1287d2ea9d80910b5f1120d0b8eede3fbf1abe91c40d39ea7d51e6fda"
[[package]]
name = "rustc_version"
version = "0.2.3"
@ -1896,7 +1860,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "35edb675feee39aec9c99fa5ff985081995a06d594114ae14cbe797ad7b7a6d7"
dependencies = [
"base64 0.13.0",
"log 0.4.14",
"log",
"ring",
"sct",
"webpki",
@ -1916,11 +1880,11 @@ checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e"
[[package]]
name = "salsa20"
version = "0.7.2"
version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "399f290ffc409596022fce5ea5d4138184be4784f2b28c62c59f0d8389059a15"
checksum = "ecbd2eb639fd7cab5804a0837fe373cc2172d15437e804c054a9fb885cb923b0"
dependencies = [
"cipher 0.2.5",
"cipher",
"zeroize",
]
@ -1931,7 +1895,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8f05ba609c234e60bee0d547fe94a4c7e9da733d1c962cf6e59efa4cd9c8bc75"
dependencies = [
"lazy_static",
"winapi 0.3.9",
"winapi",
]
[[package]]
@ -1962,7 +1926,7 @@ version = "2.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "23a2ac85147a3a11d77ecf1bc7166ec0b92febfa4461c37944e180f319ece467"
dependencies = [
"bitflags 1.3.1",
"bitflags",
"core-foundation",
"core-foundation-sys",
"libc",
@ -2057,7 +2021,7 @@ dependencies = [
"async-trait",
"async-tungstenite 0.11.0",
"base64 0.13.0",
"bitflags 1.3.1",
"bitflags",
"bytes 1.0.1",
"chrono",
"command_attr",
@ -2081,7 +2045,7 @@ version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "158aeb823791f79bbb92110212970797757fee7102784453dcb9b172a8af272b"
dependencies = [
"bitflags 1.3.1",
"bitflags",
"enum_primitive",
"serde",
"serde_json",
@ -2096,7 +2060,7 @@ checksum = "1a0c8611594e2ab4ebbf06ec7cbbf0a99450b8570e96cbf5188b5d5f6ef18d81"
dependencies = [
"block-buffer",
"cfg-if 1.0.0",
"cpufeatures",
"cpufeatures 0.1.5",
"digest",
"opaque-debug",
]
@ -2115,7 +2079,7 @@ checksum = "b362ae5752fd2137731f9fa25fd4d9058af34666ca1966fb969119cc35719f12"
dependencies = [
"block-buffer",
"cfg-if 1.0.0",
"cpufeatures",
"cpufeatures 0.1.5",
"digest",
"opaque-debug",
]
@ -2190,7 +2154,7 @@ version = "2.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "906a1a0bc43fed692df4b82a5e2fbfc3733db8dad8bb514ab27a4f23ad04f5c0"
dependencies = [
"log 0.4.14",
"log",
"regex",
"slog",
"slog-async",
@ -2225,7 +2189,7 @@ version = "4.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8228ab7302adbf4fcb37e66f3cda78003feb521e7fd9e3847ec117a7784d0f5a"
dependencies = [
"log 0.4.14",
"log",
"slog",
"slog-scope",
]
@ -2239,7 +2203,7 @@ dependencies = [
"atty",
"chrono",
"slog",
"term 0.7.0",
"term",
"thread_local",
]
@ -2257,7 +2221,7 @@ checksum = "122e570113d28d773067fab24266b66753f6ea915758651696b6e35e49f88d6e"
dependencies = [
"cfg-if 1.0.0",
"libc",
"winapi 0.3.9",
"winapi",
]
[[package]]
@ -2267,17 +2231,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "765f090f0e423d2b55843402a07915add955e7d60657db13707a159727326cad"
dependencies = [
"libc",
"winapi 0.3.9",
"winapi",
]
[[package]]
name = "songbird"
version = "0.1.8"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "047aa67ab0755d1d021fdf1e044e72fd724e3a5cc8d6287919c790e0e082b58b"
checksum = "62492c36b6d3ddb342172f57fee6761388062b2b55ab3895aad0b554e51094e7"
dependencies = [
"async-trait",
"async-tungstenite 0.13.1",
"async-tungstenite 0.14.0",
"audiopus",
"byteorder",
"dashmap",
@ -2285,14 +2249,15 @@ dependencies = [
"flume",
"futures",
"parking_lot",
"pin-project",
"rand 0.8.4",
"serde",
"serde_json",
"serenity",
"serenity-voice-model",
"spin_sleep",
"spinning_top",
"streamcatcher",
"symphonia-core",
"tokio",
"tracing",
"tracing-futures",
@ -2315,7 +2280,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2a98101bdc3833e192713c2af0b0dd2614f50d1cf1f7a97c5221b7aac052acc7"
dependencies = [
"once_cell",
"winapi 0.3.9",
"winapi",
]
[[package]]
@ -2423,6 +2388,19 @@ version = "2.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601"
[[package]]
name = "symphonia-core"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3e32b956473d98c601dac257fab8a7700d42e49fdd7a33432dd5dc7fdd2448dd"
dependencies = [
"arrayvec 0.4.12",
"bitflags",
"byteorder",
"lazy_static",
"log",
]
[[package]]
name = "syn"
version = "1.0.74"
@ -2431,56 +2409,7 @@ checksum = "1873d832550d4588c3dbc20f01361ab00bfe741048f71e3fecf145a7cc18b29c"
dependencies = [
"proc-macro2",
"quote",
"unicode-xid 0.2.2",
]
[[package]]
name = "syntex"
version = "0.42.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0a30b08a6b383a22e5f6edc127d169670d48f905bb00ca79a00ea3e442ebe317"
dependencies = [
"syntex_errors",
"syntex_syntax",
]
[[package]]
name = "syntex_errors"
version = "0.42.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "04c48f32867b6114449155b2a82114b86d4b09e1bddb21c47ff104ab9172b646"
dependencies = [
"libc",
"log 0.3.9",
"rustc-serialize",
"syntex_pos",
"term 0.4.6",
"unicode-xid 0.0.3",
]
[[package]]
name = "syntex_pos"
version = "0.42.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3fd49988e52451813c61fecbe9abb5cfd4e1b7bb6cdbb980a6fbcbab859171a6"
dependencies = [
"rustc-serialize",
]
[[package]]
name = "syntex_syntax"
version = "0.42.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7628a0506e8f9666fdabb5f265d0059b059edac9a3f810bda077abb5d826bd8d"
dependencies = [
"bitflags 0.5.0",
"libc",
"log 0.3.9",
"rustc-serialize",
"syntex_errors",
"syntex_pos",
"term 0.4.6",
"unicode-xid 0.0.3",
"unicode-xid",
]
[[package]]
@ -2518,17 +2447,7 @@ dependencies = [
"rand 0.8.4",
"redox_syscall",
"remove_dir_all",
"winapi 0.3.9",
]
[[package]]
name = "term"
version = "0.4.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fa63644f74ce96fbeb9b794f66aff2a52d601cbd5e80f4b97123e3899f4570f1"
dependencies = [
"kernel32-sys",
"winapi 0.2.8",
"winapi",
]
[[package]]
@ -2539,7 +2458,7 @@ checksum = "c59df8ac95d96ff9bede18eb7300b0fda5e5d8d90960e76f8e14ae765eedbf1f"
dependencies = [
"dirs-next",
"rustversion",
"winapi 0.3.9",
"winapi",
]
[[package]]
@ -2578,7 +2497,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ca8a50ef2360fbd1eeb0ecd46795a87a19024eb4b53c5dc916ca1fd95fe62438"
dependencies = [
"libc",
"winapi 0.3.9",
"winapi",
]
[[package]]
@ -2594,7 +2513,7 @@ dependencies = [
"stdweb",
"time-macros",
"version_check",
"winapi 0.3.9",
"winapi",
]
[[package]]
@ -2651,7 +2570,7 @@ dependencies = [
"pin-project-lite",
"signal-hook-registry",
"tokio-macros",
"winapi 0.3.9",
"winapi",
]
[[package]]
@ -2706,7 +2625,7 @@ dependencies = [
"bytes 1.0.1",
"futures-core",
"futures-sink",
"log 0.4.14",
"log",
"pin-project-lite",
"tokio",
]
@ -2733,7 +2652,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "09adeb8c97449311ccd28a427f96fb563e7fd31aabf994189879d9da2394b89d"
dependencies = [
"cfg-if 1.0.0",
"log 0.4.14",
"log",
"pin-project-lite",
"tracing-attributes",
"tracing-core",
@ -2776,7 +2695,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a6923477a48e41c1951f1999ef8bb5a3023eb723ceadafe78ffb65dc366761e3"
dependencies = [
"lazy_static",
"log 0.4.14",
"log",
"tracing-core",
]
@ -2828,7 +2747,7 @@ dependencies = [
"idna",
"ipnet",
"lazy_static",
"log 0.4.14",
"log",
"rand 0.8.4",
"smallvec",
"thiserror",
@ -2847,7 +2766,7 @@ dependencies = [
"futures-util",
"ipconfig",
"lazy_static",
"log 0.4.14",
"log",
"lru-cache",
"parking_lot",
"resolv-conf",
@ -2924,7 +2843,7 @@ checksum = "52dbb58f3be728e919ae634a7efb17f4fd110945a146eae34de5cbf3677671cd"
dependencies = [
"aes",
"base64 0.13.0",
"bitflags 1.3.1",
"bitflags",
"curve25519-dalek",
"eax",
"futures",
@ -2957,7 +2876,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "495451cd7a437898c6aac883dcd5a0cd5d3d3780e3d31ed4eaf349a5c9adcd98"
dependencies = [
"base64 0.13.0",
"bitflags 1.3.1",
"bitflags",
"num-derive",
"num-traits 0.2.14",
"omnom",
@ -2987,7 +2906,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cbd8278dac57d32abb16525038f407920a6261ce81c8ec2a9d63a7c136ed8313"
dependencies = [
"base64 0.13.0",
"bitflags 1.3.1",
"bitflags",
"curve25519-dalek",
"elliptic-curve",
"generic-array",
@ -3020,7 +2939,7 @@ dependencies = [
"http",
"httparse",
"input_buffer 0.3.1",
"log 0.4.14",
"log",
"native-tls",
"rand 0.7.3",
"sha-1",
@ -3040,7 +2959,7 @@ dependencies = [
"http",
"httparse",
"input_buffer 0.4.0",
"log 0.4.14",
"log",
"rand 0.8.4",
"rustls",
"sha-1",
@ -3093,12 +3012,6 @@ version = "1.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8895849a949e7845e06bd6dc1aa51731a103c42707010a5b591c0038fb73385b"
[[package]]
name = "unicode-xid"
version = "0.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "36dff09cafb4ec7c8cf0023eb0b686cb6ce65499116a12201c9e11840ca01beb"
[[package]]
name = "unicode-xid"
version = "0.2.2"
@ -3198,7 +3111,7 @@ version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0"
dependencies = [
"log 0.4.14",
"log",
"try-lock",
]
@ -3234,7 +3147,7 @@ checksum = "580aa3a91a63d23aac5b6b267e2d13cb4f363e31dce6c352fca4752ae12e479f"
dependencies = [
"bumpalo",
"lazy_static",
"log 0.4.14",
"log",
"proc-macro2",
"quote",
"syn",
@ -3326,12 +3239,6 @@ version = "0.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c168940144dd21fd8046987c16a46a33d5fc84eec29ef9dcddc2ac9e31526b7c"
[[package]]
name = "winapi"
version = "0.2.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a"
[[package]]
name = "winapi"
version = "0.3.9"
@ -3342,12 +3249,6 @@ dependencies = [
"winapi-x86_64-pc-windows-gnu",
]
[[package]]
name = "winapi-build"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc"
[[package]]
name = "winapi-i686-pc-windows-gnu"
version = "0.4.0"
@ -3366,7 +3267,7 @@ version = "0.6.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b2986deb581c4fe11b621998a5e53361efe6b48a151178d0cd9eeffa4dc6acc9"
dependencies = [
"winapi 0.3.9",
"winapi",
]
[[package]]
@ -3375,7 +3276,7 @@ version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0120db82e8a1e0b9fb3345a539c478767c0048d842860994d96113d5b667bd69"
dependencies = [
"winapi 0.3.9",
"winapi",
]
[[package]]
@ -3386,13 +3287,13 @@ checksum = "85e60b0d1b5f99db2556934e21937020776a5d31520bf169e851ac44e6420214"
[[package]]
name = "xsalsa20poly1305"
version = "0.6.0"
version = "0.7.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0304c336e98d753428f7b3d8899d60b8a87a961ef50bdfc44af0c1bea2651ce5"
checksum = "2e0f69b133860e3614a4d4fdd6f0d7fe3219e9d67a7e8cd537676a4ebc8313db"
dependencies = [
"aead 0.3.2",
"aead",
"poly1305",
"rand_core 0.5.1",
"rand_core 0.6.3",
"salsa20",
"subtle",
"zeroize",
@ -3400,6 +3301,6 @@ dependencies = [
[[package]]
name = "zeroize"
version = "1.4.1"
version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "377db0846015f7ae377174787dd452e1c5f5a9050bc6f954911d01f116daa0cd"
checksum = "4756f7db3f7b5574938c3eb1c117038b8e07f95ee6718c0efad4ac21508f1efd"

View file

@ -49,7 +49,7 @@ version = "0.2"
## discord specific
[dependencies.songbird]
version = "0.1"
version = "0.2"
features = ["driver","gateway"]
[dependencies.serenity]

View file

@ -369,7 +369,7 @@ impl VoiceEventHandler for Receiver {
// speaking,
// );
},
Ctx::SpeakingUpdate {ssrc, speaking} => {
Ctx::SpeakingUpdate(_) => {
// You can implement logic here which reacts to a user starting
// or stopping speaking.
//println!(
@ -378,12 +378,14 @@ impl VoiceEventHandler for Receiver {
// if *speaking {"started"} else {"stopped"},
// );
},
Ctx::VoicePacket {audio, packet, payload_offset, payload_end_pad} => {
Ctx::VoicePacket(data) => {
// {audio, packet, payload_offset, payload_end_pad}
// An event which fires for every received audio packet,
// get raw opus package, we don't decode here and leave that to the AudioHandler
let last_bytes = packet.payload.len() - payload_end_pad;
let data = &packet.payload[*payload_offset..last_bytes];
let packet = data.packet;
let last_bytes = packet.payload.len() - data.payload_end_pad;
let data = &packet.payload[data.payload_offset..last_bytes];
let start = if packet.extension != 0 {
match RtpExtensionPacket::new(data) {
Some(v) => v.packet_size(),
@ -410,7 +412,7 @@ impl VoiceEventHandler for Receiver {
}
},
Ctx::RtcpPacket {packet, payload_offset, payload_end_pad} => {
Ctx::RtcpPacket(_) => {
// An event which fires for every received rtcp packet,
// containing the call statistics and reporting information.
//println!("RTCP packet received: {:?}", packet);

View file

@ -1,6 +1,8 @@
use std::io::Seek;
use std::{io::Read, mem::size_of, sync::Arc, time::Duration};
use byte_slice_cast::AsByteSlice;
use serde::Deserialize;
use songbird::input::reader::MediaSource;
use tsclientlib::{ClientId, Connection, DisconnectOptions, Identity, StreamItem};
use tsproto_packets::packets::{AudioData, CodecType, OutAudio, OutPacket};
use audiopus::coder::Encoder;
@ -20,7 +22,8 @@ struct ConnectionId(u64);
// to the client builder below, making it easy to install this voice client.
// The voice client can be retrieved in any command using `songbird::get(ctx).await`.
use songbird::{SerenityInit, Songbird};
use songbird::driver::{Config as DriverConfig, DecodeMode};
use songbird::driver::{DecodeMode};
use songbird::Config as DriverConfig;
// Import the `Context` to handle commands.
use serenity::{prelude::{TypeMapKey}};
@ -63,6 +66,22 @@ struct TsToDiscordPipeline {
data: Arc<std::sync::Mutex<TsAudioHandler>>,
}
impl MediaSource for TsToDiscordPipeline {
fn is_seekable(&self) -> bool {
false
}
fn len(&self) -> Option<u64> {
None
}
}
impl Seek for TsToDiscordPipeline {
fn seek(&mut self, _: std::io::SeekFrom) -> std::io::Result<u64> {
Err(std::io::Error::new(std::io::ErrorKind::Other, "source does not support seeking"))
}
}
impl TsToDiscordPipeline {
pub fn new(logger: Logger) -> Self {
Self {