adding volume control
[enigma2.git] / lib / dvb / volume.h
diff --git a/lib/dvb/volume.h b/lib/dvb/volume.h
new file mode 100644 (file)
index 0000000..cee3140
--- /dev/null
@@ -0,0 +1,36 @@
+#ifndef __volume_h
+#define __volume_h
+
+#include <lib/base/ebase.h>
+
+class eDVBVolumecontrol
+{
+private:
+       static eDVBVolumecontrol *instance;
+       eDVBVolumecontrol();
+       
+       int openMixer();
+       void closeMixer(int fd);
+       
+       bool muted;
+       int leftVol, rightVol;
+       
+       int checkVolume(int vol);
+       
+public:
+       static eDVBVolumecontrol* getInstance();
+
+       void volumeUp(int left = 5, int right = 5);
+       void volumeDown(int left = 5, int right = 5);
+
+       void setVolume(int left, int right);
+
+       void volumeMute();
+       void volumeUnMute();    
+       void volumeToggleMute();
+                       
+       int getVolume();
+       bool isMuted();
+};
+
+#endif //__volume_h