Take a glance at [chrome's Pulseaudio code](https://source.chromium.org/chromium/chromium/src/+/main:media/audio/pulse/pulse_output.cc;l=181;drc=b89434c7e5c07b645ce00ff7fc7336c99342f2e6) and [our attempt](https://github.com/mozilla/cubeb-pulse-rs/pull/53/files), the only difference is that [chrome adjusts the volume](https://source.chromium.org/chromium/chromium/src/+/main:media/base/audio_bus.cc;l=321;drc=99d4c69c9ec60042750e31e02802f0ade763dcd0) if its value is in *[0, 1)* while we adjust the volume if it's *not 1*. Not sure if it matters, or we guarantee the volume value is in *[0, 1)*.
Bug 1422637 Comment 52 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
Compare [our attempt](https://github.com/mozilla/cubeb-pulse-rs/pull/53/files) with [what chrone does](https://source.chromium.org/chromium/chromium/src/+/main:media/audio/pulse/pulse_output.cc;l=181;drc=b89434c7e5c07b645ce00ff7fc7336c99342f2e6) , the only difference I noticed is that [chrome adjusts the volume](https://source.chromium.org/chromium/chromium/src/+/main:media/base/audio_bus.cc;l=321;drc=99d4c69c9ec60042750e31e02802f0ade763dcd0) if its value is in *[0, 1)* while we adjust the volume if it's *not 1*. Not sure if it matters, or we guarantee the volume value is in *[0, 1)*.