[hatari-devel] [Crossbar emulation] : new infos and a problem in DmaSnd.c (I think)

Thomas Huth huth at users.berlios.de
Mon Sep 28 22:13:16 CEST 2009


On Tue, 22 Sep 2009 00:11:45 +0200
Laurent Sallafranque <laurent.sallafranque at free.fr> wrote:

> Another problem (I think) :
> 
> Thomas, in dmaSnd.c, I think there's a problem in :
> 
> void DmaSnd_FrameCountHigh_ReadByte(void)
> void DmaSnd_FrameCountMed_ReadByte(void)
> void DmaSnd_FrameCountLow_ReadByte(void)
> 
> You call DmaSnd_GetFrameCount().
> 
>     if (nDmaSoundControl & DMASNDCTRL_PLAY)
>         nActCount = nFrameStartAddr + (int)FrameCounter;
> 
> The problem (I think is that you always return (nFrameStartAddr + 0),
> as FrameCounter is only computed in a loop in DmaSnd_GenerateSamples.

Looks like you're right. I guess there should be a call to
Sound_Update() at the start of DmaSnd_GetFrameCount() so that the
FrameCounter get's updated right, what do you think? That should call
Sound_GenerateSamples() which then calls DmaSound_GenerateSamples()
which then finally updates the FrameCounter variable.

 Thomas



More information about the hatari-devel mailing list