Subject: Re: AICA audio driver
To: None <marcus@mc.pp.se>
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
List: port-dreamcast
Date: 08/26/2003 02:25:17
In article <yf9n0dyommu.fsf@mc.pp.se>
marcus@mc.pp.se wrote:

> > * 8 bit unsigned mode sounds distorted, probably played as signed.
> Bug located and squashed.  So now only the timing problem with
> ulaw/A-law remains.

The attached patch seems to fix this problem,
but I'm not familiar with sound drivers..
---
Izumi Tsutsui
tsutsui@ceres.dti.ne.jp


Index: dev/g2/aica.c
===================================================================
RCS file: /cvsroot/src/sys/arch/dreamcast/dev/g2/aica.c,v
retrieving revision 1.3
diff -u -r1.3 aica.c
--- dev/g2/aica.c	2003/08/24 19:52:46	1.3
+++ dev/g2/aica.c	2003/08/25 17:23:47
@@ -511,11 +511,13 @@
 		break;
 
 	case AUDIO_ENCODING_ULAW:
+		play->factor = 2;
 		play->sw_code = mulaw_to_slinear16_le;
 		play->hw_precision = 16;
 		sc->sc_precision = play->hw_precision;
 		break;
 	case AUDIO_ENCODING_ALAW:
+		play->factor = 2;
 		play->sw_code = alaw_to_slinear16_le;
 		play->hw_precision = 16;
 		sc->sc_precision = play->hw_precision;