mirror of
https://gitlab.freedesktop.org/pulseaudio/pavucontrol.git
synced 2025-12-20 04:10:03 +01:00
Don't inhibit suspend on monitor sources
This allows us to not keep sinks open if nothing else is connected.
This commit is contained in:
parent
b4af9ef7fa
commit
1f58c43347
1 changed files with 3 additions and 2 deletions
|
|
@ -721,6 +721,7 @@ void MainWindow::updateSource(const pa_source_info &info) {
|
|||
const char *icon;
|
||||
std::map<uint32_t, CardWidget*>::iterator cw;
|
||||
std::set<pa_source_port_info,source_port_prio_compare> port_priorities;
|
||||
SourceType type = info.monitor_of_sink != PA_INVALID_INDEX ? SOURCE_MONITOR : (info.flags & PA_SOURCE_HARDWARE ? SOURCE_HARDWARE : SOURCE_VIRTUAL);
|
||||
|
||||
if (sourceWidgets.count(info.index))
|
||||
w = sourceWidgets[info.index];
|
||||
|
|
@ -736,7 +737,7 @@ void MainWindow::updateSource(const pa_source_info &info) {
|
|||
w->setVolumeMeterVisible(showVolumeMetersCheckButton->get_active());
|
||||
|
||||
if (pa_context_get_server_protocol_version(get_context()) >= 13)
|
||||
w->peak = createMonitorStreamForSource(info.index, -1, !!(info.flags & PA_SOURCE_NETWORK));
|
||||
w->peak = createMonitorStreamForSource(info.index, -1, !!(info.flags & PA_SOURCE_NETWORK) || type == SOURCE_MONITOR);
|
||||
}
|
||||
|
||||
w->updating = true;
|
||||
|
|
@ -744,7 +745,7 @@ void MainWindow::updateSource(const pa_source_info &info) {
|
|||
w->card_index = info.card;
|
||||
w->name = info.name;
|
||||
w->description = info.description;
|
||||
w->type = info.monitor_of_sink != PA_INVALID_INDEX ? SOURCE_MONITOR : (info.flags & PA_SOURCE_HARDWARE ? SOURCE_HARDWARE : SOURCE_VIRTUAL);
|
||||
w->type = type;
|
||||
|
||||
w->boldNameLabel->set_text("");
|
||||
gchar *txt;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue