Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Thaodan:mozilla
MozillaFirefox
0032-Map-linearly-from-cubeb-volume-to-pa-volum...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0032-Map-linearly-from-cubeb-volume-to-pa-volume.patch of Package MozillaFirefox
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: andrew <andrew@arobeia.co.uk> Date: Thu, 23 Dec 2021 16:18:30 +0000 Subject: [PATCH] Map linearly from cubeb volume to pa volume Fixes incorrect volume mapping. Rebased to current SUSE sources and updated checksums Wed Sep 04 00:00:00 2024 --- third_party/rust/cubeb-pulse/.cargo-checksum.json | 2 +- third_party/rust/cubeb-pulse/src/backend/stream.rs | 4 ++-- third_party/rust/pulse-ffi/.cargo-checksum.json | 2 +- third_party/rust/pulse-ffi/src/ffi_types.rs | 5 +++++ 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/third_party/rust/cubeb-pulse/.cargo-checksum.json b/third_party/rust/cubeb-pulse/.cargo-checksum.json index 769b8c77afbcdd11423e9ebd4fbda687b52f1ccc..f436600a1e987fb638872e5b57d066f971ed9807 100644 --- a/third_party/rust/cubeb-pulse/.cargo-checksum.json +++ b/third_party/rust/cubeb-pulse/.cargo-checksum.json @@ -1 +1 @@ -{"files":{".editorconfig":"bf047bd1da10cabb99eea666d1e57c321eba4716dccb3e4ed0e2c5fe3ca53858",".github/workflows/build.yml":"477366d58c9dc059dbe4a158a6e910f23a3e9ecac7411f73616e06375583b764","AUTHORS":"0e0ac930a68ce2f6b876126b195add177f0d3886facb9260f4d9b69f1988f0cc","Cargo.toml":"8a0a450ae4990e1df322464867212e48587b474dfdc7f8c270fac06980be176a","LICENSE":"44c6b5ae5ec3fe2fbc608b00e6f4896f4d2d5c7e525fcbaa3eaa3cf2f3d5a983","README.md":"0079450bb4b013bac065ed1750851e461a3710ebad1f323817da1cb82db0bc4f","src/backend/context.rs":"c0db5f2447de1d6df5aa2812fa342a085e73156a072c221c7379b9a6a9b86786","src/backend/cork_state.rs":"4a0f1afc7d9f333dac89218cc56d7d32fbffb487cd48c1c9a4e03d79cb3b5e28","src/backend/intern.rs":"11ca424e4eb77f8eb9fd5a6717d1e791facf9743156a8534f0016fcf64d57b0f","src/backend/mod.rs":"dfb30ec497d6215e4535e936fea8fe3a407ef24dc1cec43b52c0ffa923d9229c","src/backend/stream.rs":"dfe5b747e100cae4aeae36cf2ebb9dc4715b411b4116721a40eec2944eb0ec23","src/capi.rs":"fa0fa020f0d0efe55aa0fc3596405e8407bbe2cbe6c7a558345304e6da87994e","src/lib.rs":"b41bbdc562cbfb130ed7c1e53fe69944774f515705341d8ce48a2f82c8c0c2c5"},"package":null} \ No newline at end of file +{"files":{".editorconfig":"bf047bd1da10cabb99eea666d1e57c321eba4716dccb3e4ed0e2c5fe3ca53858",".github/workflows/build.yml":"477366d58c9dc059dbe4a158a6e910f23a3e9ecac7411f73616e06375583b764","AUTHORS":"0e0ac930a68ce2f6b876126b195add177f0d3886facb9260f4d9b69f1988f0cc","Cargo.toml":"8a0a450ae4990e1df322464867212e48587b474dfdc7f8c270fac06980be176a","LICENSE":"44c6b5ae5ec3fe2fbc608b00e6f4896f4d2d5c7e525fcbaa3eaa3cf2f3d5a983","README.md":"0079450bb4b013bac065ed1750851e461a3710ebad1f323817da1cb82db0bc4f","src/backend/context.rs":"c0db5f2447de1d6df5aa2812fa342a085e73156a072c221c7379b9a6a9b86786","src/backend/cork_state.rs":"4a0f1afc7d9f333dac89218cc56d7d32fbffb487cd48c1c9a4e03d79cb3b5e28","src/backend/intern.rs":"11ca424e4eb77f8eb9fd5a6717d1e791facf9743156a8534f0016fcf64d57b0f","src/backend/mod.rs":"dfb30ec497d6215e4535e936fea8fe3a407ef24dc1cec43b52c0ffa923d9229c","src/backend/stream.rs":"2dfc61c4eac69624558756d87283496d01f56f44bf311119eff0f1d124cd88f3","src/capi.rs":"fa0fa020f0d0efe55aa0fc3596405e8407bbe2cbe6c7a558345304e6da87994e","src/lib.rs":"b41bbdc562cbfb130ed7c1e53fe69944774f515705341d8ce48a2f82c8c0c2c5"},"package":null} \ No newline at end of file diff --git a/third_party/rust/cubeb-pulse/src/backend/stream.rs b/third_party/rust/cubeb-pulse/src/backend/stream.rs index a1740eba63630749ee161830f9d0017b72e61c22..9042054017a0c261cb51da036bece49efa6ad539 100644 --- a/third_party/rust/cubeb-pulse/src/backend/stream.rs +++ b/third_party/rust/cubeb-pulse/src/backend/stream.rs @@ -765,8 +765,8 @@ impl<'ctx> StreamOps for PulseStream<'ctx> { self.volume = volume; } else { let channels = stm.get_sample_spec().channels; - let vol = pulse::sw_volume_from_linear(f64::from(volume)); - cvol.set(u32::from(channels), vol); + let vol = volume * (PA_VOLUME_NORM as f32); + cvol.set(u32::from(channels), vol as pa_volume_t); let index = stm.get_index(); diff --git a/third_party/rust/pulse-ffi/.cargo-checksum.json b/third_party/rust/pulse-ffi/.cargo-checksum.json index 983fc390ebf93c0b01d1c81f21bac54887dd43d1..2a2ba31ed9e973cc75ecce631ed90bd904d7728a 100644 --- a/third_party/rust/pulse-ffi/.cargo-checksum.json +++ b/third_party/rust/pulse-ffi/.cargo-checksum.json @@ -1 +1 @@ -{"files":{"Cargo.toml":"96983752046f2988087a836546a02aba746cdd1fc3ccd16f4170460465de5e63","src/ffi_funcs.rs":"a16646c5e7c49e94b907a7a404cfcadf3007688005c689cca936f0c2ee2e28e6","src/ffi_types.rs":"2ca56bc3638a40d331e53117a5dd175d0a6e102b1e0eccb9c2adc565c6861a33","src/lib.rs":"6aff308de11954a067d0f6ef95bf3126aabb6d928a5191e91d9a38ebadba91c2"},"package":null} \ No newline at end of file +{"files":{"Cargo.toml":"96983752046f2988087a836546a02aba746cdd1fc3ccd16f4170460465de5e63","src/ffi_funcs.rs":"a16646c5e7c49e94b907a7a404cfcadf3007688005c689cca936f0c2ee2e28e6","src/ffi_types.rs":"f39a27712b17256583331f7ce5722413d0c7b51d73d8def8f50e839e23dfb411","src/lib.rs":"6aff308de11954a067d0f6ef95bf3126aabb6d928a5191e91d9a38ebadba91c2"},"package":null} \ No newline at end of file diff --git a/third_party/rust/pulse-ffi/src/ffi_types.rs b/third_party/rust/pulse-ffi/src/ffi_types.rs index 9a6a23d75722cda987b70b0e24ca2a5b04a73d8b..747a46fe25307e817b6ba09e1aa270179dd16772 100644 --- a/third_party/rust/pulse-ffi/src/ffi_types.rs +++ b/third_party/rust/pulse-ffi/src/ffi_types.rs @@ -22,6 +22,11 @@ pub const PA_SAMPLE_MAX: c_int = 13; pub const PA_SAMPLE_INVALID: c_int = -1; pub type pa_sample_format_t = c_int; +pub const PA_VOLUME_MUTED: c_uint = 0; +pub const PA_VOLUME_NORM: c_uint = 0x10000; +pub const PA_VOLUME_MAX: c_uint = 0x7fffffff; + + #[repr(C)] #[derive(Copy, Clone, Debug)] pub struct Struct_pa_sample_spec {
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor