Make AddMouseRegion's index unsigned
[dockapps.git] / AlsaMixer.app / AMixer / AMixer.h
blob2376dd138841b73c196ae58e7f65a0d68b4f021a
1 // AMixer.h
2 //
3 // Copyright (C) 2004, Petr Hlavka
4 //
5 // SPDX-License-Identifier: GPL-2.0+
7 #ifndef AMIXER_H
8 #define AMIXER_H
10 #include "AItem.h"
12 #include <alsa/asoundlib.h>
14 #define MIXER_ITEMS 3
17 class AItem;
19 class AMixer {
20 private:
21 snd_mixer_t *mixerHandle;
22 AItem *mixerItems[MIXER_ITEMS];
23 char *cardName;
25 void error(const char *errorString, int errorCode);
27 public:
28 AMixer(const char *card); // ctor
29 ~AMixer(); // dtor
31 bool opened();
32 void handleEvents();
33 AItem *attachItem(unsigned int itemNumber, const char *itemName);
34 bool itemOK(unsigned int itemNumber);
35 int itemGetVolume(unsigned int itemNumber);
36 void itemSetVolume(unsigned int itemNumber, unsigned int volume);
37 int itemIsMuted(unsigned int itemNumber);
38 void itemToggleMute(unsigned int itemNumber);
39 void reInit();
41 static bool mixerElemsChanged();
42 static bool mixerChanged();
43 static char* convertIDToCard(const char* cardId);
46 #endif