Author Topic: Audio pauses / stalls when system is busy.  (Read 168 times)

Chris Oakley

  • Posts: 307
Audio pauses / stalls when system is busy.
« on: 13 Dec '24 - 22:59 »
This is a weird issue and I'm not sure why it's happening. I've got all the latest dlls for Bass and Mix.

I'm observing playback stalls when the system is busy and I'm not sure why it would be happening. I don't know if it's because I'm running my VB.NET app in Debug mode, but regardless I can't see why it would pause.

To be clear, the audio does continue. When I say it stalls, it doesn't just stop and that's it. It's like someone presses pause for a few seconds, and then unpauses.

The most recent example, and the reason for posting here, is my app was happily playing audio, and I then extracted a zip file (the Win32 Bass zip file from this site) and when it started to extract, there was a moment where Windows didn't quite know what it was doing. The standard Windows 11 extract progress dialog appears with it's graph, but the spinner appeared on it. At this point the audio stopped playing. It then started to extract after about 10 seconds and the audio continued.

Other times it just decides to pause when the system doesn't appear to be doing anything.

I have 32 GB RAM on my machine and a 2TB SSD drive with an i7 intel processor.

In the past I've have observed similar issues with audio stalling briefly and we found the issue to be the SSD which was a Samsung M4 if my memory serves me correctly.

Another odd thing with this is that we preload the audio into memory rather than rely on network connections or drive performance, so when it's playing, it's already in memory and we're playing the memory stream.

A lot to unpack there and just interested if anyone else has had the same issue.

Ian @ un4seen

  • Administrator
  • Posts: 26223
Re: Audio pauses / stalls when system is busy.
« Reply #1 on: 16 Dec '24 - 16:24 »
A few things to check, to perhaps narrow-down what the problem is: Does a BASS_SYNC_STALL sync (set on a playing stream) get triggered when it happens? Does it ever happen when not running under the debugger? If you have other apps using the same audio device at the same time, are they affected too?