Commit 7021e895 authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇

Merge branch 'Plasma/5.15'

parents e04e034c 8f306079
......@@ -498,10 +498,11 @@ void Context::streamRestoreCallback(const pa_ext_stream_restore_info *info)
props.insert(QStringLiteral("application.icon_name"),
QStringLiteral("preferences-desktop-notification"));
obj = new StreamRestore(eventRoleIndex, props, this);
obj->update(info);
m_streamRestores.insert(obj);
} else {
obj->update(info);
}
obj->update(info);
}
void Context::serverCallback(const pa_server_info *info)
......
......@@ -100,8 +100,9 @@ qint64 StreamRestore::volume() const
void StreamRestore::setVolume(qint64 volume)
{
pa_cvolume vol = m_cache.valid ? m_cache.volume : m_volume;
vol.channels = 1;
vol.values[0] = volume;
for (int i = 0; i < vol.channels; ++i) {
vol.values[i] = volume;
}
if (m_cache.valid) {
writeChanges(vol, m_cache.muted, m_cache.device);
......@@ -184,8 +185,7 @@ void StreamRestore::writeChanges(const pa_cvolume &volume, bool muted, const QSt
pa_ext_stream_restore_info info;
info.name = nameData.constData();
info.channel_map.channels = 1;
info.channel_map.map[0] = PA_CHANNEL_POSITION_MONO;
info.channel_map = m_channelMap;
info.volume = volume;
info.device = deviceData.isEmpty() ? nullptr : deviceData.constData();
info.mute = muted;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment