Really really fix NDSP wavebuf scheduling, this time for real
This commit is contained in:
parent
28f73801cc
commit
b3e6a64596
@ -360,13 +360,16 @@ void ndspiReadChnState(void)
|
||||
if (chn->syncCount == st->syncCount)
|
||||
{
|
||||
u16 seqId = st->curSeqId;
|
||||
LightLock_Lock(&chn->lock);
|
||||
|
||||
ndspWaveBuf* wb = chn->waveBuf;
|
||||
chn->samplePos = ndspiRotateVal(st->samplePos);
|
||||
chn->waveBufSeqPos = seqId;
|
||||
|
||||
if ((st->flags & 0xFF00) && wb)
|
||||
if (st->flags & 0xFF00)
|
||||
{
|
||||
LightLock_Lock(&chn->lock);
|
||||
ndspWaveBuf* wb = chn->waveBuf;
|
||||
if (wb)
|
||||
{
|
||||
if (chn->wavBufCount)
|
||||
{
|
||||
while (wb->sequence_id != seqId)
|
||||
{
|
||||
@ -379,13 +382,14 @@ void ndspiReadChnState(void)
|
||||
}
|
||||
if (wb && wb->status != NDSP_WBUF_DONE)
|
||||
wb->status = NDSP_WBUF_PLAYING;
|
||||
}
|
||||
if (seqId == 0)
|
||||
chn->wavBufCount = 0;
|
||||
chn->waveBuf = wb;
|
||||
}
|
||||
|
||||
LightLock_Unlock(&chn->lock);
|
||||
}
|
||||
}
|
||||
chn->playing = (st->flags & 0xFF) ? true : false;
|
||||
}
|
||||
}
|
||||
|
@ -461,7 +461,7 @@ Result ndspInit(void)
|
||||
ndspiInitChn();
|
||||
|
||||
rc = initCfgu();
|
||||
if (rc)
|
||||
if (rc==0)
|
||||
{
|
||||
u8 outMode;
|
||||
CFGU_GetConfigInfoBlk2(sizeof(outMode), 0x70001, &outMode);
|
||||
|
Loading…
Reference in New Issue
Block a user