diff options
author | Dave Reisner <dreisner@archlinux.org> | 2014-01-16 13:18:58 -0500 |
---|---|---|
committer | Dave Reisner <dreisner@archlinux.org> | 2014-05-06 13:27:16 -0400 |
commit | ec1ce20be1dc30748c31fc18afc1b4ca1532852e (patch) | |
tree | 4a14abdab58ac12f31d6200d4d55da50ecb571fd /pulse.cc | |
parent | 031743a96cf602ec20efaf6cbc292c5fd8d023bb (diff) | |
download | mirror-ponymix-ec1ce20be1dc30748c31fc18afc1b4ca1532852e.tar.gz mirror-ponymix-ec1ce20be1dc30748c31fc18afc1b4ca1532852e.tar.bz2 mirror-ponymix-ec1ce20be1dc30748c31fc18afc1b4ca1532852e.zip |
add is-available verb
Diffstat (limited to 'pulse.cc')
-rw-r--r-- | pulse.cc | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -596,6 +596,20 @@ Device::Device(const pa_sink_info* info) : ops_.Kill = nullptr; ops_.Move = nullptr; ops_.SetDefault = pa_context_set_default_sink; + + if (info->active_port) { + switch (info->active_port->available) { + case PA_PORT_AVAILABLE_YES: + available_ = Device::AVAILABLE_YES; + break; + case PA_PORT_AVAILABLE_NO: + available_ = Device::AVAILABLE_NO; + break; + case PA_PORT_AVAILABLE_UNKNOWN: + available_ = Device::AVAILABLE_UNKNOWN; + break; + } + } } Device::Device(const pa_source_info* info) : |