File tree Expand file tree Collapse file tree 3 files changed +4
-8
lines changed
Expand file tree Collapse file tree 3 files changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -658,8 +658,6 @@ class AudioSystem {
658658 deviceConfig.sampleRate = SAMPLE_RATE;
659659 deviceConfig.dataCallback = data_callback;
660660 deviceConfig.pUserData = this ;
661- deviceConfig.periodSizeInFrames = 256 ;
662- deviceConfig.periods = 2 ;
663661
664662 if (!device.init (&deviceConfig)){
665663 streams.clear ();
@@ -694,7 +692,7 @@ class AudioSystem {
694692 bool foundSignal = false ;
695693
696694 // Scan up to 1 second of audio (or end of file)
697- ma_uint64 maxFramesToScan = SAMPLE_RATE * 1 ;
695+ ma_uint64 maxFramesToScan = SAMPLE_RATE * 0. 1 ;
698696 if (maxFramesToScan > s.decoderLength ) {
699697 maxFramesToScan = s.decoderLength ;
700698 }
@@ -2012,7 +2010,7 @@ int detectLatency() {
20122010 #endif
20132011 if (g_audioSystem.exists ) {
20142012 if (!wearingPlugNPlay ()) osMs += 50 ;
2015- if (wearingHeadphones ()) osMs += 60 ;
2013+ if (wearingHeadphones ()) osMs += 25 ;
20162014 osMs -= g_audioSystem.getLatencyMs ();
20172015 }
20182016 return osMs;
Original file line number Diff line number Diff line change @@ -662,8 +662,6 @@ class AudioSystem {
662662 deviceConfig.sampleRate = SAMPLE_RATE;
663663 deviceConfig.dataCallback = data_callback;
664664 deviceConfig.pUserData = this ;
665- deviceConfig.periodSizeInFrames = 256 ;
666- deviceConfig.periods = 2 ;
667665
668666 if (!device.init (&deviceConfig)){
669667 streams.clear ();
@@ -698,7 +696,7 @@ class AudioSystem {
698696 bool foundSignal = false ;
699697
700698 // Scan up to 1 second of audio (or end of file)
701- ma_uint64 maxFramesToScan = SAMPLE_RATE * 1 ;
699+ ma_uint64 maxFramesToScan = SAMPLE_RATE * 0. 1 ;
702700 if (maxFramesToScan > s.decoderLength ) {
703701 maxFramesToScan = s.decoderLength ;
704702 }
@@ -2023,7 +2021,7 @@ HL_PRIM int HL_NAME(detectLatency)(_NO_ARG) {
20232021 #endif
20242022 if (g_audioSystem.exists ) {
20252023 if (!HL_NAME (wearingPlugNPlay)()) osMs += 50 ;
2026- if (HL_NAME (wearingHeadphones)()) osMs += 60 ;
2024+ if (HL_NAME (wearingHeadphones)()) osMs += 25 ;
20272025 osMs -= g_audioSystem.getLatencyMs ();
20282026 }
20292027 return osMs;
You can’t perform that action at this time.
0 commit comments