Re: [hatari-devel] Falcon left-right sound swapper bug?

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


----- Laurent Sallafranque wrote:
> Hi David,
> 
> I don't think the bug is here :
> 
> The aim of this code is to separate the sound into a left and a right part.
> 

Hi Laurent,

Thank you for the explanation. I have been comparing dmaSnd.c with
crossbar.c and finding ways to improve crossbar.c

I noticed that zeros are being written back to a buffer after the data is
read so that a subsequent read would be zero... to avoid introducing
a zero order hold filtering effect. However; if this buffer is 'actual'
Falcon memory, there is a problem.

Please see the enclosed patch.

Sincerely,
David Savinkoff
--- hatari/src/falcon/crossbar.c	2014-04-08 13:53:23.000000000 -0700
+++ hatari/src/falcon/crossbar.c	2014-04-16 11:38:21.000000000 -0700
@@ -1844,8 +1844,8 @@
 				/* Crossbar->DAC sound only */
 				dac_LeftData = dac.buffer_left[dac.readPosition];
 				dac_RightData = dac.buffer_right[dac.readPosition];
-				dac.buffer_left[dac.readPosition] = 0;
-				dac.buffer_right[dac.readPosition] = 0;
+//				dac.buffer_left[dac.readPosition] = 0;
+//				dac.buffer_right[dac.readPosition] = 0;
 				break;
 			case 3:
 				/* Mixing Direct ADC sound with Crossbar->DMA sound */
@@ -1853,8 +1853,8 @@
 						dac.buffer_left[dac.readPosition];
 				dac_RightData = ((adc_rightData  * crossbar.gainSettingRight) >> 14) +
 						dac.buffer_right[dac.readPosition];
-				dac.buffer_left[dac.readPosition] = 0;
-				dac.buffer_right[dac.readPosition] = 0;
+//				dac.buffer_left[dac.readPosition] = 0;
+//				dac.buffer_right[dac.readPosition] = 0;
 				break;
 		}
 			


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/