mirror of
https://git.outfoxxed.me/quickshell/quickshell.git
synced 2025-11-04 19:04:56 +11:00
services/pipewire: consider device volume step when sending updates
Previously a hardcoded 0.0001 offset was used to determine if a volume change was significant enough to send to a device, however some devices have a much more granular step size, which caused future volume updates to be blocked. This change replaces the hardcoded offset with the volumeStep device route property which should be large enough for the device to work with. Fixes #279
This commit is contained in:
parent
f5ca8453c0
commit
522d126d1b
3 changed files with 39 additions and 23 deletions
|
|
@ -158,6 +158,7 @@ struct PwVolumeProps {
|
|||
QVector<PwAudioChannel::Enum> channels;
|
||||
QVector<float> volumes;
|
||||
bool mute = false;
|
||||
float volumeStep = -1;
|
||||
|
||||
static PwVolumeProps parseSpaPod(const spa_pod* param);
|
||||
};
|
||||
|
|
@ -214,6 +215,7 @@ private:
|
|||
QVector<float> mServerVolumes;
|
||||
QVector<float> mDeviceVolumes;
|
||||
QVector<float> waitingVolumes;
|
||||
float volumeStep = -1;
|
||||
PwNode* node;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue