Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Network
KDE Connect
Commits
ebd7e534
Commit
ebd7e534
authored
Nov 23, 2020
by
Art Pinch
Committed by
Simon Redman
Feb 19, 2021
Browse files
[SystemVolumePlugin][PulseAudio] Send data about default audio device
parent
69898ca5
Changes
1
Hide whitespace changes
Inline
Side-by-side
plugins/systemvolume/systemvolumeplugin-pulse.cpp
View file @
ebd7e534
...
@@ -80,12 +80,20 @@ void SystemvolumePlugin::sendSinkList() {
...
@@ -80,12 +80,20 @@ void SystemvolumePlugin::sendSinkList() {
sendPacket
(
np
);
sendPacket
(
np
);
});
});
connect
(
sink
,
&
PulseAudioQt
::
Sink
::
defaultChanged
,
this
,
[
this
,
sink
]
{
NetworkPacket
np
(
PACKET_TYPE_SYSTEMVOLUME
);
np
.
set
<
bool
>
(
QStringLiteral
(
"enabled"
),
sink
->
isDefault
());
np
.
set
<
QString
>
(
QStringLiteral
(
"name"
),
sink
->
name
());
sendPacket
(
np
);
});
QJsonObject
sinkObject
{
QJsonObject
sinkObject
{
{
QStringLiteral
(
"name"
),
sink
->
name
()},
{
QStringLiteral
(
"name"
),
sink
->
name
()},
{
QStringLiteral
(
"muted"
),
sink
->
isMuted
()},
{
QStringLiteral
(
"muted"
),
sink
->
isMuted
()},
{
QStringLiteral
(
"description"
),
sink
->
description
()},
{
QStringLiteral
(
"description"
),
sink
->
description
()},
{
QStringLiteral
(
"volume"
),
sink
->
volume
()},
{
QStringLiteral
(
"volume"
),
sink
->
volume
()},
{
QStringLiteral
(
"maxVolume"
),
PulseAudioQt
::
normalVolume
()}
{
QStringLiteral
(
"maxVolume"
),
PulseAudioQt
::
normalVolume
()},
{
QStringLiteral
(
"enabled"
),
sink
->
isDefault
()}
};
};
array
.
append
(
sinkObject
);
array
.
append
(
sinkObject
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment