dockapps/AlsaMixer.app/AMixer/AChannel.cc
Wade Berrier f331064eae Add AlsaMixer.app to repository
http://dockapps.windowmaker.org/file.php/id/253 shows a version available from

http://www.stud.fit.vutbr.cz/~xhlavk00/AlsaMixer.app/

but it's a dead link.

Check in the version from

http://dockapps.windowmaker.org/download.php/id/517/AlsaMixer.app-0.1.tar.gz

Untarred and removed version from directory.  No other changes.

Signed-off-by: Wade Berrier <wberrier@gmail.com>
2012-10-02 23:26:31 +01:00

42 lines
691 B
C++

// AChannel.cc, Petr Hlavka, 2004
#include "AMixer.h"
#include "AItem.h"
#include "AChannel.h"
#include <iostream>
AChannel::AChannel(AItem *item, SNDCHID_T cID) {
aItem = item;
id = cID;
}
AChannel::~AChannel() {
}
long AChannel::getVolume() {
long vol = 0;
snd_mixer_selem_get_playback_volume(aItem->aElem, (SNDCHID_T) id, &vol);
return (vol);
}
// it isn't necessery when using snd_mixer_selem_set_x_volume_all
void AChannel::setVolume(long value) {
std::cerr << "AChannel::setVolume not implemented!" << std::endl;
}
bool AChannel::isMuted() {
int val;
snd_mixer_selem_get_playback_switch(aItem->aElem, (SNDCHID_T) id, &val);
return (! (bool) val);
}