#include "defines.h"
#include "log.h"
+typedef struct
+{
+ unsigned char frontleft;
+ unsigned char frontright;
+ unsigned char rearleft;
+ unsigned char rearright;
+ unsigned char center;
+ unsigned char lfe;
+} audio_volume;
+
class Audio
{
public:
UCHAR systemMute;
UCHAR muted;
int volume;
+
+ audio_volume Aoffset;
};
#endif
tvolume = 20 - tvolume;
- unsigned long vol = (tvolume << 24) | (tvolume << 16);
-
- Log::getInstance()->log("Audio", Log::DEBUG, "%lx", vol);
- Log::getInstance()->log("Audio", Log::DEBUG, "%i", tvolume);
-
- if (ioctl(fdAudio, AV_SET_AUD_VOLUME, &vol) != 0) return 0;
+ audio_volume Avolume;
+ Avolume.frontleft = tvolume + Aoffset.frontleft;
+ Avolume.frontright = tvolume + Aoffset.frontright;
+ Avolume.rearleft = tvolume + Aoffset.rearleft;
+ Avolume.rearright = tvolume + Aoffset.rearright;
+ Avolume.center = tvolume + Aoffset.center;
+ Avolume.lfe = tvolume + Aoffset.lfe;
+
+ if (ioctl(fdAudio, AV_SET_AUD_VOLUME, &Avolume) != 0) return 0;
+
+// unsigned long vol = (tvolume << 24) | (tvolume << 16);
+//
+// Log::getInstance()->log("Audio", Log::DEBUG, "%lx", vol);
+// Log::getInstance()->log("Audio", Log::DEBUG, "%i", tvolume);
+
+// if (ioctl(fdAudio, AV_SET_AUD_VOLUME, &vol) != 0) return 0;
return 1;
}