File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
Expand file tree Collapse file tree 2 files changed +4
-2
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 @@ -140,8 +140,7 @@ internal bool InitDevice(int deviceId)
140140
141141 // That this has not been mass-tested since https://github.com/ppy/osu-framework/pull/6651 and probably needs to be.
142142 // Currently envvar gated for users to test at their own discretion.
143- bool useWasapiInit = Environment . GetEnvironmentVariable ( "OSU_AUDIO_WASAPI_EXPERIMENTAL" ) == "1" ;
144- if ( useWasapiInit )
143+ if ( FrameworkEnvironment . UseWasapi )
145144 attemptWasapiInitialisation ( ) ;
146145
147146 initialised_devices . Add ( deviceId ) ;
You can’t perform that action at this time.
0 commit comments