Skip to content

Commit

Permalink
Merge pull request #6093 from peppy/disable-wasapi-mode
Browse files Browse the repository at this point in the history
Disable WASAPI initialisation mode for now
  • Loading branch information
bdach committed Dec 27, 2023
2 parents 396c9f8 + d87142d commit deae25b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion osu.Framework/Audio/AudioManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ protected virtual bool InitBass(int device)
return true;

// this likely doesn't help us but also doesn't seem to cause any issues or any cpu increase.
Bass.UpdatePeriod = 1;
Bass.UpdatePeriod = 5;

// reduce latency to a known sane minimum.
Bass.DeviceBufferLength = 10;
Expand Down
6 changes: 4 additions & 2 deletions osu.Framework/Threading/AudioThread.cs
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,9 @@ internal bool InitDevice(int deviceId)
if (!Bass.Init(deviceId, Flags: (DeviceInitFlags)128)) // 128 == BASS_DEVICE_REINIT
return false;

attemptWasapiInitialisation();
// Need to do more testing. Users reporting buffer underruns even with a large (20ms) buffer.
// Also playback latency improvements are not present across all users.
// attemptWasapiInitialisation();

initialised_devices.Add(deviceId);
return true;
Expand Down Expand Up @@ -236,7 +238,7 @@ private void initWasapi(int wasapiDevice)
}
});

bool initialised = BassWasapi.Init(wasapiDevice, Procedure: wasapiProcedure, Buffer: 0.001f, Period: 0.001f);
bool initialised = BassWasapi.Init(wasapiDevice, Procedure: wasapiProcedure, Buffer: 0.02f, Period: 0.01f);

if (!initialised)
return;
Expand Down

0 comments on commit deae25b

Please sign in to comment.