ioctl to set mixer volume

Alain De Vos devosalain at ymail.com
Fri Apr 16 23:52:07 UTC 2021


I tried :
```
import std.stdio;
import core.sys.posix.ioctl;
import core.stdc.config;
import core.stdc.stdio;

void main() {
	writeln("Set vol to min");
	char *mixerdev=cast(char *)"/dev/mixer";
	char *mode=cast(char *)"rw";
	int mixfd=cast(int)fopen(mixerdev,mode);
	writeln(mixfd);
	c_ulong x=3221507328;
	int left=0;
	ioctl(mixfd,x, &left);
}
```
But I think I did here a mysterious cast of a FILE* handle to int 
, which is probably rubbish ....


More information about the Digitalmars-d-learn mailing list