Subject: Sound Blaster patch
To: None <current-users@NetBSD.ORG, port-i386@NetBSD.ORG>
From: David Gluss <david@pure.com>
List: port-i386
Date: 03/10/1995 13:32:00
The following patch fixes the behavior of "cat foo.au > /dev/audio" for
my 8 bit soundblaster card.  I don't know that it's the right way
to fix it, but it does remove lines of code so maybe it's in the 
right direction.

The faulty behavior is playing too fast (because the setting of
output rate to 8K in audio.c is never really done).

*** /nfs/u13/home/david/386bsd/supped/src/sys/arch/i386/isa/sbdsp.c	Thu Mar  9 03:35:47 1995
--- sbdsp.c	Fri Mar 10 11:51:17 1995
***************
*** 556,569 ****
  
  	register struct sbdsp_softc *sc = (struct sbdsp_softc *)addr;
  
! 	if (ISSBPROCLASS(sc)) {
! #ifdef not_anymore
! 		sbdsp_set_in_gain_real(addr, sc->in_gain, sc->in_balance);
! 		sbdsp_set_out_gain_real(addr, sc->out_gain, sc->out_balance);
! #endif
! 		sbdsp_set_out_sr_real(addr, sc->sc_orate);
! 		sbdsp_set_in_sr_real(addr, sc->sc_irate);
! 	}
  	sc->sc_last_hsw_size = sc->sc_last_hsr_size = 0;
  	return(0);
  }
--- 556,564 ----
  
  	register struct sbdsp_softc *sc = (struct sbdsp_softc *)addr;
  
! 	sbdsp_set_out_sr_real(addr, sc->sc_orate);
! 	sbdsp_set_in_sr_real(addr, sc->sc_irate);
! 
  	sc->sc_last_hsw_size = sc->sc_last_hsr_size = 0;
  	return(0);
  }