ioctl to set mixer volume
Alain De Vos
devosalain at ymail.com
Sat Apr 17 00:59:26 UTC 2021
Correct, then i have :
```
import std.stdio: writeln;
import core.sys.posix.fcntl: open,O_RDWR;
import core.sys.posix.unistd : close;
import core.sys.posix.ioctl: ioctl;
import core.stdc.config: c_ulong;
void main() {
writeln("Set vol to max");
char *mixerdev=cast(char *)"/dev/mixer";
int mode=O_RDWR;
int mixfd=open(mixerdev,mode);
writeln(mixfd);
c_ulong fun=3221507328;
int vol=255*255+255;
ioctl(mixfd,fun, &vol);
close(mixfd);
}
```
More information about the Digitalmars-d-learn
mailing list