Browse Source

Lower non-ASIO/WASAPI BASS audio latency

kiwec 2 months ago
parent
commit
42544aa514
3 changed files with 5 additions and 0 deletions
  1. 0 0
      libraries/bassfx/2.4.12.1
  2. 1 0
      src/App/Osu/Changelog.cpp
  3. 4 0
      src/Engine/SoundEngine.cpp

+ 0 - 0
libraries/bassfx/2.4.12.1


+ 1 - 0
src/App/Osu/Changelog.cpp

@@ -32,6 +32,7 @@ Changelog::Changelog() : ScreenBackable() {
     latest.changes.push_back("- Added setting to prevent servers from replacing the main menu logo");
     latest.changes.push_back("- Chat: added support for user links");
     latest.changes.push_back("- Chat: improved map link support");
+    latest.changes.push_back("- Lowered audio latency for default (not ASIO/WASAPI) output");
     changelogs.push_back(latest);
 
     CHANGELOG v35_06;

+ 4 - 0
src/Engine/SoundEngine.cpp

@@ -492,6 +492,10 @@ bool SoundEngine::init_bass_mixer(OUTPUT_DEVICE device) {
         return false;
     }
 
+    // Disable buffering to lower latency on regular BASS output
+    // This has no effect on ASIO/WASAPI since for those the mixer is a decode stream
+    BASS_ChannelSetAttribute(g_bassOutputMixer, BASS_ATTRIB_BUFFER, 0.f);
+
     // Switch to "No sound" device for all future sound processing
     // Only g_bassOutputMixer will be output to the actual device!
     BASS_SetDevice(0);