dont understand audio :(
This commit is contained in:
14
lib/timer.c
14
lib/timer.c
@ -15,16 +15,16 @@ void timer_init() {
|
||||
ctx.div = 0XAC00;
|
||||
LARGE_INTEGER freq;
|
||||
QueryPerformanceFrequency(&freq);
|
||||
counts_per_cycle = freq.QuadPart / (1 << 19);
|
||||
counts_per_cycle = freq.QuadPart / (1 << 22);
|
||||
}
|
||||
|
||||
void timer_tick() {
|
||||
//while(now - last < counts_per_cycle){
|
||||
// LARGE_INTEGER current;
|
||||
// QueryPerformanceCounter(¤t);
|
||||
// now = current.QuadPart;
|
||||
// //printf("Last-now: %lld, counts: %lld\n", now - last, counts_per_cycle);
|
||||
//}
|
||||
while(now - last < counts_per_cycle){
|
||||
LARGE_INTEGER current;
|
||||
QueryPerformanceCounter(¤t);
|
||||
now = current.QuadPart;
|
||||
//printf("Last-now: %lld, counts: %lld\n", now - last, counts_per_cycle);
|
||||
}
|
||||
last = now;
|
||||
u16 prev_div = ctx.div;
|
||||
ctx.div++;
|
||||
|
Reference in New Issue
Block a user