]> Chaos Git - corbenik/ctrulib.git/commitdiff
Really fix NDSP wavebuf scheduling
authorfincs <fincs.alt1@gmail.com>
Fri, 23 Oct 2015 23:05:23 +0000 (01:05 +0200)
committerfincs <fincs.alt1@gmail.com>
Fri, 23 Oct 2015 23:05:23 +0000 (01:05 +0200)
libctru/source/ndsp/ndsp-channel.c

index 36880db2aa43570f5a49643ccdb3c0f9ee484536..fe5f2b802cc21592917391d7b6a48bc792ca9da2 100644 (file)
@@ -364,6 +364,7 @@ void ndspiReadChnState(void)
 
                        ndspWaveBuf* wb = chn->waveBuf;
                        chn->samplePos = ndspiRotateVal(st->samplePos);
+                       chn->waveBufSeqPos = seqId;
 
                        if ((st->flags & 0xFF00) && wb)
                        {
@@ -381,7 +382,6 @@ void ndspiReadChnState(void)
                                if (seqId == 0)
                                        chn->wavBufCount = 0;
                                chn->waveBuf = wb;
-                               chn->waveBufSeqPos = seqId;
                        }
 
                        LightLock_Unlock(&chn->lock);