Bluetooth crackling when switching stations - BASS.dll version dependent

Started by Tapin,

Tapin

Hi,

I'm experiencing an issue with crackling/popping sounds on Bluetooth headphones when switching radio stations in TapinRadio on Windows 11.

My setup:

    Windows 11
    Bose QC Bluetooth headphones
    TapinRadio (multiple versions tested)
    Stream formats: MP3, AAC, HLS

Symptoms:
When switching radio stations, at the moment a new stream starts playing, there are 1-2 microsecond crackling/popping sounds. Quite unpleasant to the ear.

What I tested and observed:

    Tested many old and new versions of TapinRadio - the program version does NOT matter
    Tested multiple versions of bass.dll - this DOES matter:
        Versions 2.4.12.x - work correctly
        Versions 2.4.13.0, 2.4.13.1, 2.4.13.2, 2.4.13.3 - work correctly
        Version 2.4.13.8 and all newer up to current - crackling present
        Versions 2.4.13.4 to 2.4.13.7 - not tested yet

What I would like:
It would be great if the bug could be identified and fixed in newer versions. If that's not possible, I would appreciate access to the last working version (probably 2.4.13.7) in both 32-bit and 64-bit.

Thank you for your help!

Ian @ un4seen

If I understand correctly, you're hearing a click/pop sound when starting playback of a stream but not mid-playback? And it's only happening when using Bluetooth headphones, not a different output device? Is there nothing playing for a while before each stream starts? If so, does the problem still happen if you don't have a gap between each stream? If removing a time gap prevents the problem then that sounds like it's happening when the output device resumes (perhaps the Bluetooth headphones power-up), and enabling the BASS_CONFIG_DEV_NONSTOP option to keep the output going even when nothing is playing may help.

If the problem persists, please see if you can reproduce it with the pre-compiled NETRADIO.EXE example included in the BASS package (C\BIN folder), and also try the latest BASS build here:

    www.un4seen.com/stuff/bass.zip

Tapin

Yes, you understood correctly. The click occurs only at the start of a new stream, never during playback. It happens only on Bluetooth devices, wired audio is fine. There is always a gap between streams when switching stations.

I tested with the official NETRADIO.EXE from C\BIN folder with different bass.dll versions:

    bass.dll 2.4.12.1 - no crackling
    bass.dll 2.4.13.3 - no crackling
    bass.dll 2.4.13.8 and all newer including latest build - crackling  :(

Unfortunately I don't have any versions between 2.4.13.3 and 2.4.13.8, so I cannot pinpoint exactly which version introduced the problem. If you could provide these versions for testing I would be able to tell you precisely when the change occurred.

BASS_CONFIG_DEV_NONSTOP is not an option as I cannot modify the application source code.

Could you check what changed in audio device handling between 2.4.13.3 and 2.4.13.8?

Ian @ un4seen

2.4.13.8 was when BASS began by default stopping the output after 1 second of nothing playing, so it seems like enabling the BASS_CONFIG_DEV_NONSTOP option probably would fix your issue. Perhaps you can ask the app's developer to add that option?

Tapin

Thank you for the explanation! That makes perfect sense.

Could you please provide the last version before this change was introduced (2.4.13.7 or whichever is the last version you have available) in both 32-bit and 64-bit? It would really mean a lot to me!

Thank you!

Ian @ un4seen

The last release version before 2.4.13.8 was 2.4.13.2, so any builds between those would have been betas.

Tapin

Thank you for the information. Unfortunately versions 2.4.13.1 and 2.4.13.2 have compatibility issues with newer versions of basshls.dll, so they won't work for me. Could you please provide any beta version between 2.4.13.3 and 2.4.13.7 in both 32-bit and 64-bit? I don't mind using beta versions as they work best in my case.

Thank you!

Ian @ un4seen

I don't see any changes between 2.4.13.2 and 2.4.13.8 that would affect BASSHLS. What difference are you seeing?

Instead of using an old BASS version, I really think it would be best to ask the app's developer to add support for the BASS_CONFIG_DEV_NONSTOP option. Have you already tried that without luck?

Tapin

Regarding BASSHLS compatibility, I tested NETRADIO.EXE with the latest BASSHLS.DLL and different BASS versions:

    bass.dll 2.4.12.x + latest basshls.dll - works perfectly
    bass.dll 2.4.13.1 + latest basshls.dll - HLS streams (m3u8) fail to play and the program closes itself
    bass.dll 2.4.13.2 + latest basshls.dll - same issue
    bass.dll 2.4.13.3 + latest basshls.dll - works perfectly

The same behavior occurs in TapinRadio. I encourage you to test this yourself.

You mentioned that "2.4.13.8 was when BASS began by default stopping the output on Windows after 1 second of nothing playing". I have a question about this - switching between radio streams including buffering takes significantly longer than 1 second. Network issues can also cause stream interruptions longer than 1 second. Would it be possible to increase this default timeout in future versions? This would solve the Bluetooth crackling issue without requiring any changes in applications like TapinRadio.

For now I will stick with bass.dll 2.4.12.1 as it works correctly with the latest basshls.dll and has no Bluetooth crackling.

Ian @ un4seen

The 1 second timeout will be configurable in the next BASS release. That option is actually in the latest build posted above, but it currently defaults to 1 second for consistency. It may be possible to raise that default a bit in the release version.

If you can't get access to the NONSTOP option then a workaround is to have something else using the device at the same time, so that it doesn't stop when BASS does. For example, you could run the pre-compiled SYNTH.EXE example from the BASS package. Of course, that's not ideal, but it's a workaround.