[comp.sys.sgi] SGI Audio Device

vinay@cathedral.cerc.wvu.wvnet.edu (Vinay Kumar) (02/21/91)

             

                            NEED HELP/ SUGGESTIONS
                            ----------------------


I'm facing one problem related to audio-device on SGI workstation with Unix O.S
. Following is the way I'm initializing the audio device:

	Audio_fd = open("/dev/audio",O_RDWR);
	ioctl(Audio_fd,AUDIOCSETOUTGAIN,250);
	ioctl(Audio_fd,AUDIOCSETRATE,2);

I believe the above code shoould be able to initialize the device for further
read operations. Right now, it is successfully doing the read/write operations
but the second function doesn't seem to be working.

when I do the following:
			x = ioctl(Audio_fd,AUDIOCGETOUTGAIN);
			printf("%d",x);

the value of gain it returns is 16 instead of 250 that I set earlier. Infact,no
matter what gain value I set, it always returns 16 as gain.

Any suggestions/ advice to set the audio port gain would be appreciated.

Thanks

Vinay Kumar

e-mail:	vinay@cerc.wvu.wvnet.edu
phone:	(304)-293-7226