dockapps/AlsaMixer.app/AMixer/AMixer.h
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

43 lines
924 B
C++

// AMixer.h, Petr Hlavka, 2004
#ifndef AMIXER_H
#define AMIXER_H
#include "AItem.h"
#include <alsa/asoundlib.h>
#define MIXER_ITEMS 3
class AItem;
class AMixer {
private:
snd_mixer_t *mixerHandle;
AItem *mixerItems[MIXER_ITEMS];
char *cardName;
void error(const char *errorString, int errorCode);
public:
AMixer(const char *card); // ctor
~AMixer(); // dtor
bool opened();
void handleEvents();
AItem *attachItem(unsigned int itemNumber, const char *itemName);
bool itemOK(unsigned int itemNumber);
int itemGetVolume(unsigned int itemNumber);
void itemSetVolume(unsigned int itemNumber, unsigned int volume);
int itemIsMuted(unsigned int itemNumber);
void itemToggleMute(unsigned int itemNumber);
void reInit();
static bool mixerElemsChanged();
static bool mixerChanged();
static char* convertIDToCard(const char* cardId);
};
#endif