Setting the hardware clock

Started by Chris Oakley, 9 Mar '25 - 11:50

Chris Oakley

Is it possible to tell BASS which hardware clock to use. I've just had an issue with audio playing back slower than it should, like properly choppy, but consistently. It was like it was tempod down to -50%. Pitch was normal.

I noticed in Windows my default device was System on my GoXLR. I never set it to that, but you know what Windows is like. I should state at this stage the audio wasn't being played through that particular device, but it was coming through another device on the GoXLR.

Now, as the audio was playing slow and choppy, I swtiched Windows to my default device to my onboard soundcard, and immediately the audio went back to normal.

I switched the default device back to the System GoXLR device, and it was all slow again.

Switch back to the onboard device, back to normal.

I would say this points to BASS determining which hardware clock to use, but sadly I can't see anything in the documentation about how to handle any of this.

Happy to be schooled, but right now I have no other ideas, since I haven't changed anything in my code.

Ian @ un4seen

The output device is basically the clock. BASS uses event-driven WASAPI output, but perhaps the issue in your case is that the event is never signalled for some reason, eg. buggy driver? BASS has a 20ms timeout just in case, so that data can still be generated without a signal, but perhaps it'll sound choppy like you describe. Does increasing the buffer size via the BASS_CONFIG_DEV_BUFFER option, or using using DirectSound instead of WASAPI via the BASS_DEVICE_DSOUND flag, make any difference? If you can, please also try the affected device on another system to see if it may be a system-specific issue.

Chris Oakley

I restarted my machine and now setting the default device to the System GoXLR device doesn't display the problem. So clearly a system based issue which would probably require a specific set of circumstances to debug.

I would say it's a clocking issue at the source of the GoXLR driver. Would that be a fair assumption?

Ian @ un4seen

Good to hear it's working now. I'm not sure what the problem would have been, but I guess the device/driver got into a dodgy state. Perhaps just reconnecting the device's power or USB cable would also have rectified it - did you happen to try either before rebooting the PC? Did you also check whether increasing the buffer size (BASS_CONFIG_DEV_BUFFER) or using using DirectSound (BASS_DEVICE_DSOUND) made any difference?

Chris Oakley

Sadly I didn't. The PC restarted itself after a Windows Update as I was working on some other things.