Received: from wout4-smtp.messagingengine.com (wout4-smtp.messagingengine.com [64.147.123.20]) by mail-b.sr.ht (Postfix) with ESMTPS id 75238FF211 for <~qaul/community@lists.sr.ht>; Mon, 1 Jun 2020 01:45:55 +0000 (UTC) Authentication-Results: mail-b.sr.ht; dkim=pass (2048-bit key) header.d=alyssa.is header.i=@alyssa.is header.b=r5mzMPco; dkim=fail reason="key not found in DNS" (0-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=zjdo/Xgi Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.west.internal (Postfix) with ESMTP id 2D833B55; Sun, 31 May 2020 21:45:54 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Sun, 31 May 2020 21:45:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alyssa.is; h= from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; s=fm3; bh=Qq0KAz70Zt36DQNLhKki9vaCyb RjPWcNwar/EFpnXEI=; b=r5mzMPco/om34wZavwcOecF0YHKZezbBiyJZ5fxgZR 851n/faNHIrW7EbK0hE037fXBg9ogvVULRhyBNZMqgjh7xnJUYqqYFUr/NUBdSHC fK7pnn516oZXgDgk/hanZ2vZFS71AZlzp9ts4ei9A8RFRbkmQ6lmba7OrR+exrhc gIbUV+sSJiKXyTIBV0RDBCzuUElaPejHXJbJgTN1JdD6JY6BbX/Q6rsa35o4BDLm zMzIEH+I4Mp5xRlIDiU1osATE9RDwZyaHcZUozivt+NwDNXoy5FSxUl8Ul1+4pFn OS7zqTmloi1qBN80+t189FVLtdrqraoqU6qP9a9zejXg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :message-id:mime-version:subject:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=Qq0KAz70Zt36DQNLh Kki9vaCybRjPWcNwar/EFpnXEI=; b=zjdo/XgiJklrRoZV9Q0iBkYOF4yXyPL9D hDATo26gcjk4X5e6QP1dTao8yCU9EfR/KxPsSjKkrpdV3cfJqW1kpUR5yk4d4VM1 8uof9MZsnkeMWvMCLgIto0raC9JXkGj+u/4HX7g0A+Ul3T2JajQ3m7pPFPi7kb2C liQNPLRwdEKHoozDsLvExyE5zybEnZGSxYO15VOyihSKyl87xHj6t+UgVhR0i0S0 Ol2pshYNTsdHZxvuf3yQIbA/jXtRcfD7uOjf8AxILZFuSJo7pBoFnm5M+zU6URgU hwDULAPj1yubmL4XhxLhILvO8wbGl9vsvlMK0HZ9zMOsPnXJClBLw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrudefgedggeeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgggfestdekredtre dttdenucfhrhhomheptehlhihsshgrucftohhsshcuoehhihesrghlhihsshgrrdhisheq necuggftrfgrthhtvghrnhepleejtdeiffegveejuedvkeevieetkefgleeuleehfedule ekueejffeikeeggfeinecuffhomhgrihhnpehgihhthhhusgdrtghomhenucfkphepjeel rddvfeehrdduudelrdduleegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomhepqhihlhhishhsseigvddvtddrqhihlhhishhsrdhnvght X-ME-Proxy: Received: from x220.qyliss.net (p4feb77c2.dip0.t-ipconnect.de [79.235.119.194]) by mail.messagingengine.com (Postfix) with ESMTPA id 74866328005D; Sun, 31 May 2020 21:45:53 -0400 (EDT) Received: by x220.qyliss.net (Postfix, from userid 1000) id 9ABA84B1; Mon, 1 Jun 2020 01:45:51 +0000 (UTC) From: Alyssa Ross To: ~qaul/community@lists.sr.ht Cc: Katharina Fey , Alyssa Ross Subject: [PATCH 1/2] service/voice: switch from opus to magnum-opus Date: Mon, 1 Jun 2020 01:45:40 +0000 Message-Id: <20200601014541.23531-1-hi@alyssa.is> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable The opus and opus-sys crates are both abandoned. They have recently been forked into crates called magnum-opus and opusic-sys respectively. By using these forks, there's at least a chance that fixes we have to make (e.g. for cross-compiling) will make it upstream. It's too early to say whether these forks will stick around, but it's better than crates that have been abandoned for years. --- Cargo.lock | 32 +++++++++++++---------------- libqaul/service/voice/Cargo.toml | 2 +- libqaul/service/voice/src/lib.rs | 2 +- libqaul/service/voice/src/types.rs | 2 +- libqaul/service/voice/src/worker.rs | 2 +- 5 files changed, 18 insertions(+), 22 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1a3ad963..d7a58617 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1377,6 +1377,16 @@ dependencies =3D [ "cfg-if", ] =20 +[[package]] +name =3D "magnum-opus" +version =3D "0.3.0" +source =3D "registry+https://github.com/rust-lang/crates.io-index" +checksum =3D "8182b5d0118e6c68c5e1ae63f45f053b20c0fccfda10749927de16f118= 96c865" +dependencies =3D [ + "libc", + "opusic-sys", +] + [[package]] name =3D "matchers" version =3D "0.0.1" @@ -1615,24 +1625,10 @@ source =3D "registry+https://github.com/rust-lang= /crates.io-index" checksum =3D "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf4= 32529c" =20 [[package]] -name =3D "opus" -version =3D "0.2.1" -source =3D "registry+https://github.com/rust-lang/crates.io-index" -checksum =3D "5e9059a7daf1e6665eb88c4a95ca9ff393a6d276fd66e9d85191280d7e= 5ec18b" -dependencies =3D [ - "libc", - "opus-sys", -] - -[[package]] -name =3D "opus-sys" -version =3D "0.2.1" +name =3D "opusic-sys" +version =3D "0.2.2" source =3D "registry+https://github.com/rust-lang/crates.io-index" -checksum =3D "fad8b294f482f7972fa466b1c64d5a564e4ee6975599d80483ee4fa83f= 25b6ec" -dependencies =3D [ - "libc", - "pkg-config", -] +checksum =3D "23eea772b9bf5c4ca3e136764299b775f3f21d00997e7543f92cca82bc= b49ff1" =20 [[package]] name =3D "parking_lot" @@ -1857,7 +1853,7 @@ dependencies =3D [ "failure", "futures 0.3.5", "libqaul", - "opus", + "magnum-opus", "ratman-harness", "rubato", "serde", diff --git a/libqaul/service/voice/Cargo.toml b/libqaul/service/voice/Car= go.toml index ee5fdbb0..dd9358ed 100644 --- a/libqaul/service/voice/Cargo.toml +++ b/libqaul/service/voice/Cargo.toml @@ -14,7 +14,7 @@ async-std =3D "1.5" bincode =3D "1.0" failure =3D "0.1" futures =3D "0.3" -opus =3D "0.2" +magnum-opus =3D "0.3" rubato =3D "0.2" serde =3D { version =3D "1.0", features =3D ["derive"] } tracing =3D "0.1" diff --git a/libqaul/service/voice/src/lib.rs b/libqaul/service/voice/src= /lib.rs index 7c5223d2..260e5cbf 100644 --- a/libqaul/service/voice/src/lib.rs +++ b/libqaul/service/voice/src/lib.rs @@ -28,7 +28,7 @@ use { future::{abortable, AbortHandle}, }, libqaul::{error::Error as QaulError, services::ServiceEvent, users::= UserAuth, Identity, Qaul}, - opus::{Application, Channels, Encoder}, + magnum_opus::{Application, Channels, Encoder}, rubato::{InterpolationParameters, InterpolationType, SincFixedOut, W= indowFunction}, std::{ collections::{BTreeMap, BTreeSet, VecDeque}, diff --git a/libqaul/service/voice/src/types.rs b/libqaul/service/voice/s= rc/types.rs index 4c376d38..2da671f5 100644 --- a/libqaul/service/voice/src/types.rs +++ b/libqaul/service/voice/src/types.rs @@ -7,7 +7,7 @@ use { users::UserAuth, Identity, Qaul, }, - opus::{Decoder, Encoder}, + magnum_opus::{Decoder, Encoder}, rubato::SincFixedOut, serde::{Deserialize, Serialize}, std::{ diff --git a/libqaul/service/voice/src/worker.rs b/libqaul/service/voice/= src/worker.rs index 6447a4bc..ad0fd218 100644 --- a/libqaul/service/voice/src/worker.rs +++ b/libqaul/service/voice/src/worker.rs @@ -5,7 +5,7 @@ use crate::{ use async_std::{stream::interval, sync::Mutex}; use futures::{sink::SinkExt, stream::StreamExt}; use libqaul::{helpers::TagSet, messages::ID_LEN, Identity}; -use opus::{Channels, Decoder}; +use magnum_opus::{Channels, Decoder}; use rubato::Resampler; use std::{ collections::BTreeMap, --=20 2.26.2