2012-06-13 04:21:21 +00:00
|
|
|
// AItem.h, Petr Hlavka, 2004
|
|
|
|
|
|
|
|
#ifndef AITEM_H
|
|
|
|
#define AITEM_H
|
|
|
|
|
|
|
|
#include "AMixer.h"
|
|
|
|
#include "AChannel.h"
|
|
|
|
|
|
|
|
#include <alsa/asoundlib.h>
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
|
|
|
|
class AChannel;
|
|
|
|
class AMixer;
|
|
|
|
|
|
|
|
class AItem {
|
|
|
|
private:
|
|
|
|
AMixer *mixer; // parent mixer
|
2014-10-05 15:29:59 +00:00
|
|
|
std::vector<AChannel *> pbChannels; // item channels
|
2012-06-13 04:21:21 +00:00
|
|
|
|
|
|
|
long minPVolume, maxPVolume; // min/max playback volume
|
|
|
|
bool hPVolume; // has Playback volume
|
|
|
|
bool hPSwitch; // has Playback switch
|
|
|
|
|
|
|
|
public:
|
|
|
|
snd_mixer_elem_t *aElem; // mixer item element
|
|
|
|
const char *name; // item name
|
|
|
|
|
|
|
|
AItem(AMixer *m, snd_mixer_elem_t *e); // ctor
|
|
|
|
~AItem(); // dtor
|
|
|
|
|
|
|
|
void setVolumePerc(unsigned int percent);
|
|
|
|
unsigned int getVolumePerc();
|
|
|
|
bool isMuted();
|
|
|
|
void mute();
|
|
|
|
void unmute();
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|