Changeset View
Changeset View
Standalone View
Standalone View
src/sink.cpp
Show First 20 Lines • Show All 63 Lines • ▼ Show 20 Line(s) | |||||
64 | 64 | | |||
65 | bool Sink::isDefault() const | 65 | bool Sink::isDefault() const | ||
66 | { | 66 | { | ||
67 | return context()->server()->defaultSink() == this; | 67 | return context()->server()->defaultSink() == this; | ||
68 | } | 68 | } | ||
69 | 69 | | |||
70 | void Sink::setDefault(bool enable) | 70 | void Sink::setDefault(bool enable) | ||
71 | { | 71 | { | ||
72 | if (enable) { | 72 | if (!isDefault() && enable) { | ||
73 | context()->server()->setDefaultSink(this); | 73 | context()->server()->setDefaultSink(this); | ||
74 | } | 74 | } | ||
75 | } | 75 | } | ||
76 | 76 | | |||
77 | } // QPulseAudio | 77 | } // QPulseAudio |