Skip to content

Commit

Permalink
Bug 1876372 - Update audio_thread_priority to 0.31. r=cubeb-reviewers…
Browse files Browse the repository at this point in the history
…,supply-chain-reviewers,chunmin

Differential Revision: https://phabricator.services.mozilla.com/D199577
  • Loading branch information
glandium committed Jan 25, 2024
1 parent 77b2732 commit c0b8f83
Show file tree
Hide file tree
Showing 14 changed files with 56 additions and 23 deletions.
4 changes: 2 additions & 2 deletions .cargo/config.in
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ git = "https://github.com/mozilla/application-services"
rev = "9d1ab279d2aa31e4c6c80dd1ee0baf9345e26253"
replace-with = "vendored-sources"

[source."git+https://github.com/mozilla/audioipc?rev=8b391135f9421dc5ab0c45f646c21651a906ce7f"]
[source."git+https://github.com/mozilla/audioipc?rev=596bdb7fbb5745ea415726e16bd497e6c850a540"]
git = "https://github.com/mozilla/audioipc"
rev = "8b391135f9421dc5ab0c45f646c21651a906ce7f"
rev = "596bdb7fbb5745ea415726e16bd497e6c850a540"
replace-with = "vendored-sources"

[source."git+https://github.com/mozilla/cubeb-coreaudio-rs?rev=4ba39ca14bbb5bb0274843701cd958717a0fe293"]
Expand Down
14 changes: 7 additions & 7 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions supply-chain/imports.lock
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,13 @@ user-id = 1258
user-login = "padenot"
user-name = "Paul Adenot"

[[publisher.audio_thread_priority]]
version = "0.31.0"
when = "2024-01-17"
user-id = 1258
user-login = "padenot"
user-name = "Paul Adenot"

[[publisher.authenticator]]
version = "0.4.0-alpha.24"
when = "2023-11-29"
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"files":{"Cargo.toml":"b66cf5a2203f39d8425d2b2170f64a5c7220ef76efa7ea14ad20ba99d3435e84","LICENSE":"32ee9dbf6196874fc9d406c54a888a6c4cbb9aa4a7f35b46befeaff43a78fe85","Makefile":"0f9a771cfb30c7c4b9961d82fdca4e9e229a955bb2e636474a4101389e18e938","README.md":"c123692b3b50dd621b896a8269814d609cbf1e532b461bf4a77854ddd607eb7a","atp_test.cpp":"8075a040941a65fb9e3f7cbf0535853ca6661c3ac442ec35569b42b24bbec797","audio_thread_priority.h":"f0ecaf1b674f794cde0dc834028e074d4e4675d22ae96acf08b2ae1dceb3474e","generate_osx_bindings.sh":"06e4e03450f788ced18d31fff5660919e6f6ec1119ddace363ffeb82f0518a71","src/lib.rs":"fe417e81a6677c581d9f617ff7989f08780465401b6fa22b6e3abfedf9e3e221","src/mach_sys.rs":"352560fcb9b41d877cff92e5b3b04d6dc68b1f30508ce4b9aed78940120a883e","src/rt_linux.rs":"27004821a29e6af73f9e13f4d1f060e024152c4cc379d6a0df38d6f5b61039ad","src/rt_mach.rs":"29f8c0397f14cecbac1f76394c2abfe0e05903b54486cf735f9a94a10c168643","src/rt_win.rs":"f2ba097cebf65252c27d9d6dcfbe1fcc041c4b312724bd98e080e114a4de3bb6"},"package":"a7e6839a6e8e72338137b3126c7fe61af95b9acc3076d2b7109696f808d1234f"}
{"files":{"Cargo.toml":"6bceb8b41d1646bd255b39c13dcca5bbcc0984f0f2aca73decb7ee5627443387","LICENSE":"32ee9dbf6196874fc9d406c54a888a6c4cbb9aa4a7f35b46befeaff43a78fe85","Makefile":"0f9a771cfb30c7c4b9961d82fdca4e9e229a955bb2e636474a4101389e18e938","README.md":"c123692b3b50dd621b896a8269814d609cbf1e532b461bf4a77854ddd607eb7a","atp_test.cpp":"8075a040941a65fb9e3f7cbf0535853ca6661c3ac442ec35569b42b24bbec797","audio_thread_priority.h":"f0ecaf1b674f794cde0dc834028e074d4e4675d22ae96acf08b2ae1dceb3474e","generate_osx_bindings.sh":"06e4e03450f788ced18d31fff5660919e6f6ec1119ddace363ffeb82f0518a71","src/lib.rs":"1d5c629d1ee2dab80f7bf422a3add07eaca203f5c1557fdd379361d632e14224","src/mach_sys.rs":"352560fcb9b41d877cff92e5b3b04d6dc68b1f30508ce4b9aed78940120a883e","src/rt_linux.rs":"e77db6d66fb76772dde6c12850ef2c50730cfe00decc0c67211e63f3e8a59c9f","src/rt_mach.rs":"29f8c0397f14cecbac1f76394c2abfe0e05903b54486cf735f9a94a10c168643","src/rt_win.rs":"f2ba097cebf65252c27d9d6dcfbe1fcc041c4b312724bd98e080e114a4de3bb6"},"package":"17fd24082f432a11ad4fde564af75fc9a0beef2f4199e7691b090ff0e065c4d0"}
4 changes: 2 additions & 2 deletions third_party/rust/audio_thread_priority/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
[package]
edition = "2018"
name = "audio_thread_priority"
version = "0.30.0"
version = "0.31.0"
authors = ["Paul Adenot <[email protected]>"]
description = "Bump a thread to real-time priority, for audio work, on Linux, Windows and macOS"
readme = "README.md"
Expand Down Expand Up @@ -58,7 +58,7 @@ version = "0.2"
version = "0.3"

[target."cfg(target_os = \"windows\")".dependencies.windows-sys]
version = "0.48"
version = "0.52"
features = [
"Win32_Foundation",
"Win32_System_Threading",
Expand Down
26 changes: 26 additions & 0 deletions third_party/rust/audio_thread_priority/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -608,6 +608,32 @@ mod tests {
}
}
}
{
// Try larger values to test https://github.com/mozilla/audio_thread_priority/pull/23
match promote_current_thread_to_real_time(0, 192000) {
Ok(rt_prio_handle) => {
demote_current_thread_from_real_time(rt_prio_handle).unwrap();
assert!(true);
}
Err(e) => {
eprintln!("{}", e);
assert!(false);
}
}
}
{
// Try larger values to test https://github.com/mozilla/audio_thread_priority/pull/23
match promote_current_thread_to_real_time(8192, 48000) {
Ok(rt_prio_handle) => {
demote_current_thread_from_real_time(rt_prio_handle).unwrap();
assert!(true);
}
Err(e) => {
eprintln!("{}", e);
assert!(false);
}
}
}
{
match promote_current_thread_to_real_time(512, 44100) {
Ok(_) => {
Expand Down
2 changes: 1 addition & 1 deletion third_party/rust/audio_thread_priority/src/rt_linux.rs
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ pub fn set_real_time_hard_limit_internal(
// 50ms slice. This "ought to be enough for anybody".
audio_samplerate_hz / 20
};
let budget_us = (buffer_frames * 1_000_000 / audio_samplerate_hz) as u64;
let budget_us = buffer_frames as u64 * 1_000_000 / audio_samplerate_hz as u64;

// It's only necessary to set RLIMIT_RTTIME to something when in the child, skip it if it's a
// remoting call.
Expand Down
2 changes: 1 addition & 1 deletion third_party/rust/audioipc2-client/.cargo-checksum.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"files":{"Cargo.toml":"fc0b1fc4c29531e85b34632db363c04d519b326396f8bd52ca89d4000a7914da","cbindgen.toml":"fb6abe1671497f432a06e40b1db7ed7cd2cceecbd9a2382193ad7534e8855e34","src/context.rs":"a0559e92b554ef3156ab2bf2f1424555c8ef4a7977b9f43ac8500a9f399f8d99","src/lib.rs":"c87d9d57a16a9286cde730978db692df0fbc70cc69dd4f4677198d6843031fd8","src/send_recv.rs":"859abe75b521eb4297c84b30423814b5b87f3c7741ad16fe72189212e123e1ac","src/stream.rs":"90dc6a85552f3569ab1847de4247a46bcff2f5aef0c4d43fa2376589df015b25"},"package":null}
{"files":{"Cargo.toml":"f4852af58bcfd24732469ffbdddfc9404bc0d8c1d2cef279f6a6b6ddd3a080a8","cbindgen.toml":"fb6abe1671497f432a06e40b1db7ed7cd2cceecbd9a2382193ad7534e8855e34","src/context.rs":"a0559e92b554ef3156ab2bf2f1424555c8ef4a7977b9f43ac8500a9f399f8d99","src/lib.rs":"c87d9d57a16a9286cde730978db692df0fbc70cc69dd4f4677198d6843031fd8","src/send_recv.rs":"859abe75b521eb4297c84b30423814b5b87f3c7741ad16fe72189212e123e1ac","src/stream.rs":"90dc6a85552f3569ab1847de4247a46bcff2f5aef0c4d43fa2376589df015b25"},"package":null}
2 changes: 1 addition & 1 deletion third_party/rust/audioipc2-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ cubeb-backend = "0.12"
log = "0.4"

[dependencies.audio_thread_priority]
version = "0.30"
version = "0.31"
default-features = false

[dependencies.audioipc]
Expand Down
2 changes: 1 addition & 1 deletion third_party/rust/audioipc2-server/.cargo-checksum.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"files":{"Cargo.toml":"2e3be27edd7f547f229ba22ab0690bf341681f4e397e784de667118188037abf","cbindgen.toml":"fb6abe1671497f432a06e40b1db7ed7cd2cceecbd9a2382193ad7534e8855e34","src/lib.rs":"06aff4fd1326aeabb16b01f81a6f3c59c1717ebe96285a063724830cdf30303a","src/server.rs":"31e0c763527a16dfc281399e8a6c9eb8c1bac71ab9d7866288ec87297f4316e0"},"package":null}
{"files":{"Cargo.toml":"03e2fd801658feeb4bc399194a001acd1f4880967bc2993ef3f1ef20d5545bb9","cbindgen.toml":"fb6abe1671497f432a06e40b1db7ed7cd2cceecbd9a2382193ad7534e8855e34","src/lib.rs":"06aff4fd1326aeabb16b01f81a6f3c59c1717ebe96285a063724830cdf30303a","src/server.rs":"31e0c763527a16dfc281399e8a6c9eb8c1bac71ab9d7866288ec87297f4316e0"},"package":null}
2 changes: 1 addition & 1 deletion third_party/rust/audioipc2-server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ once_cell = "1.2.0"
slab = "0.4"

[dependencies.audio_thread_priority]
version = "0.30"
version = "0.31"
default-features = false

[dependencies.audioipc]
Expand Down
2 changes: 1 addition & 1 deletion third_party/rust/audioipc2/.cargo-checksum.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"files":{"Cargo.toml":"49dd46634797dc3bd8cbb9cd0892ae1cccbde573423d753a1dbbdefed239f92e","benches/serialization.rs":"d56855d868dab6aa22c8b03a61084535351b76c94b68d8b1d20764e352fe473f","build.rs":"65df9a97c6cdaa3faf72581f04ac289197b0b1797d69d22c1796e957ff1089e2","src/codec.rs":"38408b512d935cd7889a03b25dd14b36083ec4e6d2fcabd636182cf45e3d50bc","src/errors.rs":"67a4a994d0724397657581cde153bdfc05ce86e7efc467f23fafc8f64df80fa4","src/ipccore.rs":"db73e916468c54d3497d75ffcab3bf23067771ed7b2e1a23c714429f56f59ec3","src/lib.rs":"a6fcac8b44318435db60313d3ef32ff3fada390bea8978c8414c40744998b98b","src/messages.rs":"f1d5568c3095ee9f557412c2f4c217abfa5696a5035e4f7cb2dbc8cce700f1c4","src/rpccore.rs":"025b6614f1c42b96b0a8e74fd7881032d338c66e0d67ec0af70f910a9e30ebe1","src/shm.rs":"c00d16f4af510d12e704ae865f7348ad64ddef180e42b18e7dd95c4be35a9c80","src/sys/mod.rs":"e6fa1d260abf093e1f7b50185195e2d3aee0eb8c9774c6f253953b5896d838f3","src/sys/unix/cmsg.rs":"6f0236bf6cd66ccd237b268348a826ae1d266073c2adadcfaae703c556230065","src/sys/unix/cmsghdr.c":"d7344b3dc15cdce410c68669b848bb81f7fe36362cd3699668cb613fa05180f8","src/sys/unix/mod.rs":"59835f0d5509940078b1820a54f49fc5514adeb3e45e7d21e3ab917431da2e74","src/sys/unix/msg.rs":"0e297d73bae9414184f85c2209cca0a3fde6d999a3f1d3f42faa3f56b6d57233","src/sys/windows/mod.rs":"7eaabb76e62c6962b636320e2bbf79a78fce61659c799a798f7dd6d56b0be8a1"},"package":null}
{"files":{"Cargo.toml":"4cdefda1488b3ec6e65d11f02d228b1ccd5e190a802d792e524df99450de4832","benches/serialization.rs":"d56855d868dab6aa22c8b03a61084535351b76c94b68d8b1d20764e352fe473f","build.rs":"65df9a97c6cdaa3faf72581f04ac289197b0b1797d69d22c1796e957ff1089e2","src/codec.rs":"38408b512d935cd7889a03b25dd14b36083ec4e6d2fcabd636182cf45e3d50bc","src/errors.rs":"67a4a994d0724397657581cde153bdfc05ce86e7efc467f23fafc8f64df80fa4","src/ipccore.rs":"db73e916468c54d3497d75ffcab3bf23067771ed7b2e1a23c714429f56f59ec3","src/lib.rs":"a6fcac8b44318435db60313d3ef32ff3fada390bea8978c8414c40744998b98b","src/messages.rs":"f1d5568c3095ee9f557412c2f4c217abfa5696a5035e4f7cb2dbc8cce700f1c4","src/rpccore.rs":"025b6614f1c42b96b0a8e74fd7881032d338c66e0d67ec0af70f910a9e30ebe1","src/shm.rs":"c00d16f4af510d12e704ae865f7348ad64ddef180e42b18e7dd95c4be35a9c80","src/sys/mod.rs":"e6fa1d260abf093e1f7b50185195e2d3aee0eb8c9774c6f253953b5896d838f3","src/sys/unix/cmsg.rs":"6f0236bf6cd66ccd237b268348a826ae1d266073c2adadcfaae703c556230065","src/sys/unix/cmsghdr.c":"d7344b3dc15cdce410c68669b848bb81f7fe36362cd3699668cb613fa05180f8","src/sys/unix/mod.rs":"59835f0d5509940078b1820a54f49fc5514adeb3e45e7d21e3ab917431da2e74","src/sys/unix/msg.rs":"0e297d73bae9414184f85c2209cca0a3fde6d999a3f1d3f42faa3f56b6d57233","src/sys/windows/mod.rs":"7eaabb76e62c6962b636320e2bbf79a78fce61659c799a798f7dd6d56b0be8a1"},"package":null}
4 changes: 2 additions & 2 deletions third_party/rust/audioipc2/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,14 @@ cc = "1.0"
ashmem = "0.1.2"

[target."cfg(target_os = \"linux\")".dependencies.audio_thread_priority]
version = "0.30"
version = "0.31"
default-features = false

[target."cfg(unix)".dependencies]
arrayvec = "0.7"
iovec = "0.1"
libc = "0.2"
memmap2 = "0.5"
memmap2 = "0.9"

[target."cfg(windows)".dependencies.windows-sys]
version = "0.52"
Expand Down
6 changes: 3 additions & 3 deletions toolkit/library/rust/shared/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ webrender_bindings = { path = "../../../../gfx/webrender_bindings" }
cubeb-coreaudio = { git = "https://github.com/mozilla/cubeb-coreaudio-rs", rev = "4ba39ca14bbb5bb0274843701cd958717a0fe293", optional = true }
cubeb-pulse = { git = "https://github.com/mozilla/cubeb-pulse-rs", rev="8ff972c8e2ec1782ff262ac4071c0415e69b1367", optional = true, features=["pulse-dlopen"] }
cubeb-sys = { version = "0.12.0", optional = true, features=["gecko-in-tree"] }
audioipc2-client = { git = "https://github.com/mozilla/audioipc", rev = "8b391135f9421dc5ab0c45f646c21651a906ce7f", optional = true }
audioipc2-server = { git = "https://github.com/mozilla/audioipc", rev = "8b391135f9421dc5ab0c45f646c21651a906ce7f", optional = true }
audioipc2-client = { git = "https://github.com/mozilla/audioipc", rev = "596bdb7fbb5745ea415726e16bd497e6c850a540", optional = true }
audioipc2-server = { git = "https://github.com/mozilla/audioipc", rev = "596bdb7fbb5745ea415726e16bd497e6c850a540", optional = true }
encoding_glue = { path = "../../../../intl/encoding_glue" }
authrs_bridge = { path = "../../../../dom/webauthn/authrs_bridge" }
gkrust_utils = { path = "../../../../xpcom/rust/gkrust_utils" }
Expand All @@ -44,7 +44,7 @@ bitsdownload = { path = "../../../components/bitsdownload", optional = true }
storage = { path = "../../../../storage/rust" }
bookmark_sync = { path = "../../../components/places/bookmark_sync", optional = true }
chardetng_c = "0.1.1"
audio_thread_priority = { version = "0.30", default_features = false }
audio_thread_priority = { version = "0.31", default_features = false }
mdns_service = { path="../../../../dom/media/webrtc/transport/mdns_service", optional = true }
neqo_glue = { path = "../../../../netwerk/socket/neqo_glue" }
wgpu_bindings = { path = "../../../../gfx/wgpu_bindings" }
Expand Down

0 comments on commit c0b8f83

Please sign in to comment.