[hatari-devel] change in crossbar.c
Laurent Sallafranque
laurent.sallafranque at free.fr
Thu Feb 18 23:56:39 CET 2010
Hello,
I'm doing some changes in the crossbar code actually.
I'm rewriting the sound delivering.
I've already rewritten some code you've changed Eero. Would you please
wait I've finished my changes before recoding in crossbar ?
I'm trying to add the last functions not yet coded and ameliorate the
sound rendering.
regards,
Laurent
npomarede at corp.free.fr a écrit :
> Hello eero, I see you modified crossbar.c :
>
> switch (crossbar.codecInputSource) {
> - case 0:
> - /* No sound */
> - dac_LeftData = 0;
> - dac_RightData = 0;
> - break;
> case 1:
> /* direct ADC->DAC sound only */
> dac_LeftData = adc_leftData;
> @@ -1715,6 +1710,11 @@
> dac_RightData = adc_rightData;
> }
> break;
> + default:
> + /* No sound */
> + dac_LeftData = 0;
> + dac_RightData = 0;
> + break;
>
>
> But in order to explicitly keep the original values 0,1,2 and 3 of
> laurent's code, I think it might be better to keep "case 0" and add for
> example ;
>
> Sint16 adc_leftData, adc_rightData, dac_LeftData=0, dac_RightData=0;
>
>
> Because if the compiler doesn't know valid values are only 0-3, if someone
> looks at the code, it's not clear what the default case is doing now
> (without looking at other parts of the code to see what values could be
> take by codecInputSource and that default now means "0")
>
> More generally, I'm not sure it's a good idea to correct someone else's
> code while he's working on it ; there're might be some compilers warning
> during that time, but we can discuss them later on the list and see how to
> remove them before we do an official release.
>
> Regards
>
> Nicolas
> _______________________________________________
> hatari-devel mailing list
> hatari-devel at lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/hatari-devel
>
>
>
More information about the hatari-devel
mailing list