iriver Dicple D88

如何調整音量


main.c

#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/ioctl.h>

int main(int argc, char **argv)
{
    int soundDev = open("/dev/mixer", O_RDWR);
    if (soundDev) {
        int vol = (double)100.0 / 2.5;
        ioctl(soundDev, 0xc0044d00, vol);
        close(soundDev);
    }
}


返回上一頁