Skip to content

Commit 2a6348f

Browse files
committed
Add basic log output when using BassWasapi initialisation
Previous impossible to know if it was used or not.
1 parent d3226a7 commit 2a6348f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

osu.Framework/Threading/AudioThread.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
using osu.Framework.Audio;
1313
using osu.Framework.Bindables;
1414
using osu.Framework.Development;
15+
using osu.Framework.Logging;
1516
using osu.Framework.Platform.Linux.Native;
1617

1718
namespace osu.Framework.Threading
@@ -186,6 +187,8 @@ private void attemptWasapiInitialisation()
186187
if (RuntimeInfo.OS != RuntimeInfo.Platform.Windows)
187188
return;
188189

190+
Logger.Log("Attempting local BassWasapi initialisation");
191+
189192
int wasapiDevice = -1;
190193

191194
// WASAPI device indices don't match normal BASS devices.
@@ -239,7 +242,9 @@ private void initWasapi(int wasapiDevice)
239242
}
240243
});
241244

245+
Logger.Log($"Initialising BassWasapi for device {wasapiDevice}...");
242246
bool initialised = BassWasapi.Init(wasapiDevice, Procedure: wasapiProcedure, Flags: WasapiInitFlags.EventDriven | WasapiInitFlags.AutoFormat, Buffer: 0f, Period: float.Epsilon);
247+
Logger.Log(initialised ? "..success" : "..failed");
243248

244249
if (!initialised)
245250
return;

0 commit comments

Comments
 (0)