Re: [hatari-devel] Falcon left-right sound swapper bug? |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
- To: hatari-devel@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [hatari-devel] Falcon left-right sound swapper bug?
- From: David Savinkoff <dsavnkff@xxxxxxxxx>
- Date: Wed, 16 Apr 2014 13:12:53 -0600 (MDT)
- Thread-index: XMzrd4wKYe3l29DIjvvzbU4acyarzw==
- Thread-topic: Falcon left-right sound swapper bug?
----- 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;
}