Mercurial > almixer_isolated
comparison ALmixer.c @ 63:8063b19bd40e
Attempt to fix GetTicks compile error on Windows (can't do math on a struct).
Taking the QuadPart of the struct. SDL seems to do something similar. Thanks to Johnson Lin reporting this issue!
Johnson Lin < arch . jslin - at - gmail . com >
author | Eric Wing <ewing . public |-at-| gmail . com> |
---|---|
date | Tue, 19 Jun 2012 00:31:36 -0700 |
parents | e2687188aea5 |
children | be97ae4f30c0 |
comparison
equal
deleted
inserted
replaced
62:7a4a8459f0c1 | 63:8063b19bd40e |
---|---|
305 #elif defined(_WIN32) | 305 #elif defined(_WIN32) |
306 LARGE_INTEGER hi_res_ticks_per_second; | 306 LARGE_INTEGER hi_res_ticks_per_second; |
307 if(TRUE == QueryPerformanceFrequency(&hi_res_ticks_per_second)) | 307 if(TRUE == QueryPerformanceFrequency(&hi_res_ticks_per_second)) |
308 { | 308 { |
309 QueryPerformanceCounter(&s_ticksBaseTime); | 309 QueryPerformanceCounter(&s_ticksBaseTime); |
310 s_hiResSecondsPerTick = 1.0 / hi_res_ticks_per_second; | 310 s_hiResSecondsPerTick = 1.0 / hi_res_ticks_per_second.QuadPart; |
311 } | 311 } |
312 else | 312 else |
313 { | 313 { |
314 ALMixer_SetError("Windows error: High resolution clock failed."); | 314 ALMixer_SetError("Windows error: High resolution clock failed."); |
315 fprintf(stderr, "Windows error: High resolution clock failed. Audio will not work correctly.\n"); | 315 fprintf(stderr, "Windows error: High resolution clock failed. Audio will not work correctly.\n"); |