[prev in list] [next in list] [prev in thread] [next in thread] 

List:       nas
Subject:    Patches for correct hardware volume control
From:       Stephen Hocking <sysseh () devetir ! qld ! gov ! au>
Date:       1994-07-13 3:13:31
[Download RAW message or body]

You may've noticed on the voxware server that sound volume changes done by the
auctl program do not take effect - this patch fixes that problem (at least on a 
Soundblaster 16) plus a problem with /dev/dsp16 on machines with 8 bit mono 
cards. Apply to auvoxware.c.


476a477,478
>     if (g < 0)
>         g = 0;
478,479c480
<     g /= 2;
<     gusvolume = g;
---
>     gusvolume = g | (g << 8);
481c482
< 	i = ioctl(mixerfd, MIXER_WRITE(SOUND_MIXER_SYNTH), &gusvolume);
---
> 	i = ioctl(mixerfd, MIXER_WRITE(SOUND_MIXER_PCM), &gusvolume);
820,824c821,824
<     if ((fd = open("/dev/dsp16", O_RDWR, 0)) == -1)
<       if ((fd = open("/dev/dsp", O_RDWR, 0)) == -1) {
< 	UNIDENTMSG;
< 	return AuFalse;
<       }
---
>     if ((fd = open("/dev/dsp", O_RDWR, 0)) == -1) {
>       UNIDENTMSG;
>       return AuFalse;
>     }


	Stephen

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic