Skip to content

Commit 7cf25af

Browse files
Adjust headphone latency offset in detectLatency
Updated the additional latency added when wearing headphones from 25ms to 27ms in both ma_thing.cpp and ma_thing_hl.cpp to better reflect actual latency measurements.
1 parent 867c7c6 commit 7cf25af

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/miniaudio/ma_thing.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2120,7 +2120,7 @@ int detectLatency() {
21202120
#endif
21212121
if (g_audioSystem.exists) {
21222122
if(!wearingPlugNPlay()) osMs += 50;
2123-
if(wearingHeadphones()) osMs += 25;
2123+
if(wearingHeadphones()) osMs += 27;
21242124
osMs -= g_audioSystem.getLatencyMs();
21252125
}
21262126
return osMs;

src/miniaudio/ma_thing_hl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2133,7 +2133,7 @@ HL_PRIM int HL_NAME(detectLatency)(_NO_ARG) {
21332133
#endif
21342134
if (g_audioSystem.exists) {
21352135
if(!HL_NAME(wearingPlugNPlay)()) osMs += 50;
2136-
if(HL_NAME(wearingHeadphones)()) osMs += 25;
2136+
if(HL_NAME(wearingHeadphones)()) osMs += 27;
21372137
osMs -= g_audioSystem.getLatencyMs();
21382138
}
21392139
return osMs;

0 commit comments

Comments
 (0)