#119476 - Nelzon - Fri Feb 23, 2007 12:17 pm
On the page of the drunkencoders guys there is the following piece of code which should play a sound from the beginning to the end and then keep looping between the loopOffset and the end of the sample. I think it doesn't work in the described way but plays SampleLength - loopOffset bytes from the beginning and then starts looping between loopOffset and the end of the sample.
SCHANNEL_LENGTH(c) = SampleLength - loopOffset;
SCHANNEL_REPEAT_POINT(c) = loopOffset;
SCHANNEL_CR(c) = SOUND_ENABLE | SOUND_VOL(0x3F) | SOUND_REPEAT;
Does anybody know how to get it done like it's meant to be? I'm afraid there is some sort of notification IRQ necessary, fired when the sample's been played completely but I haven't found anything about it.
Thanks!
SCHANNEL_LENGTH(c) = SampleLength - loopOffset;
SCHANNEL_REPEAT_POINT(c) = loopOffset;
SCHANNEL_CR(c) = SOUND_ENABLE | SOUND_VOL(0x3F) | SOUND_REPEAT;
Does anybody know how to get it done like it's meant to be? I'm afraid there is some sort of notification IRQ necessary, fired when the sample's been played completely but I haven't found anything about it.
Thanks!