Bug 797517 - Switch order of cubeb WinMM latency kludges. r=doublec

This commit is contained in:
Matthew Gregan 2012-11-19 11:41:32 +13:00
parent 383e1a5494
commit 6d7b9bf264
2 changed files with 6 additions and 6 deletions

View File

@ -5,4 +5,4 @@ Makefile.in build files for the Mozilla build system.
The cubeb git repository is: git://github.com/kinetiknz/cubeb.git
The git commit ID used was 6e9ffc59202f95f09e5adb895d10eaedf36a6ea2.
The git commit ID used was 98769a7861b067125a76c97ddb51c5db8f528b75.

View File

@ -197,6 +197,11 @@ calculate_minimum_latency(void)
OSVERSIONINFOEX osvi;
DWORDLONG mask;
/* Running under Terminal Services results in underruns with low latency. */
if (GetSystemMetrics(SM_REMOTESESSION) == TRUE) {
return 500;
}
/* Vista's WinMM implementation underruns when less than 200ms of audio is buffered. */
memset(&osvi, 0, sizeof(OSVERSIONINFOEX));
osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
@ -211,11 +216,6 @@ calculate_minimum_latency(void)
return 200;
}
/* Running under Terminal Services results in underruns with low latency. */
if (GetSystemMetrics(SM_REMOTESESSION) == TRUE) {
return 500;
}
return 0;
}