### bug number: 1 ### area: Aaxp server (plus two minor fixes) ### severity: high ### comments: *** ./AF/config/osf.cf Fri Feb 19 15:04:21 1993 --- /crl/audio/kits/external-kit/AF/config/osf.cf Tue Feb 9 08:25:15 1993 *************** *** 10,15 **** --- 10,16 ---- #define HasPutenv YES #define HasBsearch YES #define ConnectionFlags -DTCPCONN -DUNIXCON /* -DDNETCONN */ + /* #define ExtraLibraries -ldnet */ #ifdef AlphaArchitecture #define InstallCmd installbsd *************** *** 20,27 **** #define AjvServer Ajv #define AaxpServer Aaxp /* #define AlsServer Als */ - - #define ExtraLibraries -ldnet_stub #endif #ifdef MipsArchitecture --- 21,26 ---- *** ./AF/lib/AF/Play.c Fri Feb 19 13:51:51 1993 --- /crl/audio/kits/external-kit/AF/lib/AF/Play.c Thu Feb 11 12:02:21 1993 *************** *** 117,123 **** ssize = 4 * ac->attributes.channels; break; default: ! fprintf(stderr,"AIO: unknown sample type in AFPlaySamples()\n"); _ADefaultIOError(ac->connection); } nsamples = nbytes / ssize; --- 117,123 ---- ssize = 4 * ac->attributes.channels; break; default: ! fprintf(stderr,"AIO: unknown sample type in AFRecordSamples()\n"); _ADefaultIOError(ac->connection); } nsamples = nbytes / ssize; *** ./AF/server/dda/axp/pscodec.c Fri Feb 19 15:15:22 1993 --- /crl/audio/kits/external-kit/AF/server/dda/axp/pscodec.c Tue Feb 16 15:38:02 1993 *************** *** 38,44 **** * SOFTWARE. */ #if !defined(lint) && !defined(SABER) ! static char pscodec_c_rcsid[] = "$Header: /crl/audio/AF/server/dda/axp/RCS/pscodec.c,v 1.8 1993/02/19 20:13:51 tml Exp $"; #endif /* !lint && !SABER */ /* Revision History --- 38,44 ---- * SOFTWARE. */ #if !defined(lint) && !defined(SABER) ! static char pscodec_c_rcsid[] = "$Header: /crl/audio/AF/server/dda/axp/RCS/pscodec.c,v 1.7 1993/02/16 20:36:53 payne Exp $"; #endif /* !lint && !SABER */ /* Revision History *************** *** 477,494 **** * 0 is speaker, 1 is handset */ #ifdef SUN ! ioctl(sunctl, AUDIO_GETINFO, &sun_gapo); ! *omaskp = sun_gapo.play.port; ! if(nmask == 1) { ! sun_gapo.play.port = AUDIO_SPEAKER; ! } else { ! sun_gapo.play.port = AUDIO_HEADPHONE; ! } ! ioctl(sunctl, AUDIO_SETINFO, &sun_gapo); ! *amaskp = sun_gapo.play.port; ! #else ! if(omaskp) *omaskp = 3; ! if(amaskp) *amaskp = 3; #endif SUN } } --- 477,491 ---- * 0 is speaker, 1 is handset */ #ifdef SUN ! ioctl(sunctl, AUDIO_GETINFO, &sun_gapo); ! *omaskp = sun_gapo.play.port; ! if(nmask == 1) { ! sun_gapo.play.port = AUDIO_SPEAKER; ! } else { ! sun_gapo.play.port = AUDIO_HEADPHONE; ! } ! ioctl(sunctl, AUDIO_SETINFO, &sun_gapo); ! *amaskp = sun_gapo.play.port; #endif SUN } } *************** *** 503,521 **** CodecPrivate *cPtr= (CodecPrivate *) aDev->privPtr; /* Only 1 input - sorry */ - if(omaskp) *omaskp = 1; - if(amaskp) *amaskp = 1; } - #ifdef SUN #define MAXOUTPUTGAIN 18 #define MINOUTPUTGAIN -10 - #else - /* Waiting for ioctl. */ - #define MAXOUTPUTGAIN 0 - #define MINOUTPUTGAIN 0 - #endif int codecQueryOutputGain(aDev, minp, maxp) --- 500,510 ---- *************** *** 532,538 **** sgain = ((sun_gapo.play.gain*31)/255)-10; aga = (float) sgain; #else ! aga = 0.0; #endif SUN if(minp!=NULL) *minp = MINOUTPUTGAIN; if(maxp!=NULL) *maxp = MAXOUTPUTGAIN; --- 521,527 ---- sgain = ((sun_gapo.play.gain*31)/255)-10; aga = (float) sgain; #else ! aga = 0; #endif SUN if(minp!=NULL) *minp = MINOUTPUTGAIN; if(maxp!=NULL) *maxp = MAXOUTPUTGAIN; *************** *** 561,573 **** } - #ifdef SUN #define MAXINPUTGAIN 24 #define MININPUTGAIN 0 - #else - #define MAXINPUTGAIN 0 - #define MININPUTGAIN 0 - #endif int codecQueryInputGain(aDev, minp, maxp) --- 550,557 ---- *************** *** 575,581 **** int *minp, *maxp; { float aga; ! int sgain; maxPhysDevice *pDev=(maxPhysDevice *)aDev->devPtr; CodecPrivate *cPtr= (CodecPrivate *) aDev->privPtr; --- 559,565 ---- int *minp, *maxp; { float aga; ! int sgain=128; maxPhysDevice *pDev=(maxPhysDevice *)aDev->devPtr; CodecPrivate *cPtr= (CodecPrivate *) aDev->privPtr; *************** *** 583,592 **** #ifdef SUN ioctl(sunctl, AUDIO_GETINFO, &sun_gapo); sgain = ((sun_gapo.record.gain*24)/255); - aga = (float) sgain; - #else - aga = 0.0; #endif SUN if(minp!=NULL) *minp = MININPUTGAIN; if(maxp!=NULL) *maxp = MAXINPUTGAIN; return (int)aga; --- 567,575 ---- #ifdef SUN ioctl(sunctl, AUDIO_GETINFO, &sun_gapo); sgain = ((sun_gapo.record.gain*24)/255); #endif SUN + aga = (float) sgain; + if(minp!=NULL) *minp = MININPUTGAIN; if(maxp!=NULL) *maxp = MAXINPUTGAIN; return (int)aga; *************** *** 607,615 **** sgain = ((gdB)*255)/24; sun_gapo.record.gain = (unsigned int) sgain; ioctl(sunctl, AUDIO_SETINFO, &sun_gapo); - aga = (float)sgain; - #else - aga = 0.0; #endif SUN return (int)aga; --- 590,595 ----