ioctl to set mixer volume
Alain De Vos
devosalain at ymail.com
Fri Apr 16 17:50:13 UTC 2021
The following very simple low level C-function simply sets the
mixer volume. How to convert this simple function to dlang ?
```
void mixer_setlevel_stereo(int mixfd,int dev,int left,int right)
{
left+=256*right;
#int_ioctl(int fd, unsigned long request, ...);
ioctl(mixfd,
((unsigned long) (((0x80000000UL|0x40000000UL)) | (((sizeof(int))
& ((1 << 13) - 1)) << 16) | ((('M')) << 8) | ((dev)))),
&left);
}
```
More information about the Digitalmars-d-learn
mailing list