The ticks per second for sound do not appear to be the same as the system clock. I experienced quite a bit of drift using the system value. I used 268111856LL instead and it stays synced for much longer. Unfortunately it is still not perfect.OK, I need a little help with the sound. I've managed to get the quality to where I want it (good), however I seem to be filling the buffer incorrectly. The attached build uses the following code to update the sound, have a listen ant tell me where I've gone wrong (please)...
Code:// CALC_FREQ = 50 // TPS = ticks per second = 268123480 // sample_length = 44100 = 1 second int divide = 50; thisTime = svcGetSystemTick(); if (oldTime < thisTime){ oldTime = thisTime + (TPS/CALC_FREQ); // 50 times per second if(showMenu != 1 && filesGot != 1){ calc_buffer(sound_calc_buf + offset, (sample_length/divide)*2); // 2 50ths of a second of sound offset += (sample_length/divide); // increment by 50th of sample length if(offset >= sample_length) offset -= sample_length; }else{ memset(sound_calc_buf, 0, sample_length); } }