3 // Copyright (C) 2004, Petr Hlavka
5 // SPDX-License-Identifier: GPL-2.0+
14 AChannel::AChannel(AItem
*item
, SNDCHID_T cID
) {
20 AChannel::~AChannel() {
24 long AChannel::getVolume() {
27 snd_mixer_selem_get_playback_volume(aItem
->aElem
, (SNDCHID_T
) id
, &vol
);
33 // it isn't necessery when using snd_mixer_selem_set_x_volume_all
34 void AChannel::setVolume(long value
) {
35 std::cerr
<< "AChannel::setVolume not implemented!" << std::endl
;
39 bool AChannel::isMuted() {
42 if (!snd_mixer_selem_has_playback_switch(aItem
->aElem
)) {
43 return (false); /* can't be muted? isn't muted. */
45 snd_mixer_selem_get_playback_switch(aItem
->aElem
, (SNDCHID_T
) id
, &val
);
47 return (! (bool) val
);