File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ public static class FrameworkEnvironment
2121 public static bool NoStructuredBuffers { get ; }
2222 public static string ? DeferredRendererEventsOutputPath { get ; }
2323 public static bool UseSDL3 { get ; }
24+ public static bool UseWasapi { get ; }
2425
2526 /// <summary>
2627 /// Whether non-SSL requests should be allowed. Debug only. Defaults to disabled.
@@ -55,6 +56,8 @@ static FrameworkEnvironment()
5556
5657 // Desktop has many issues, see https://github.com/ppy/osu-framework/issues/6540.
5758 UseSDL3 = RuntimeInfo . IsMobile || ( parseBool ( Environment . GetEnvironmentVariable ( "OSU_SDL3" ) ) ?? false ) ;
59+
60+ UseWasapi = parseBool ( Environment . GetEnvironmentVariable ( "OSU_AUDIO_WASAPI_EXPERIMENTAL" ) ) ?? false ;
5861 }
5962
6063 private static bool ? parseBool ( string ? value )
Original file line number Diff line number Diff line change @@ -138,9 +138,10 @@ internal bool InitDevice(int deviceId)
138138 if ( ! Bass . Init ( deviceId , Flags : ( DeviceInitFlags ) 128 ) ) // 128 == BASS_DEVICE_REINIT
139139 return false ;
140140
141- // Need to do more testing. Users reporting buffer underruns even with a large (20ms) buffer.
142- // Also playback latency improvements are not present across all users.
143- // attemptWasapiInitialisation();
141+ // That this has not been mass-tested since https://github.com/ppy/osu-framework/pull/6651 and probably needs to be.
142+ // Currently envvar gated for users to test at their own discretion.
143+ if ( FrameworkEnvironment . UseWasapi )
144+ attemptWasapiInitialisation ( ) ;
144145
145146 initialised_devices . Add ( deviceId ) ;
146147 return true ;
You can’t perform that action at this time.
0 commit comments