Author Topic: bass.dll native resampling behavior  (Read 228 times)

sveakul

  • Posts: 49
bass.dll native resampling behavior
« on: 26 Jan '18 - 04:35 »
I use 3 BASS-based players.  When using WASAPI and player set to not resample, all of them will pass the source's sample rate as-is if it matches one of the compatible rates of my audio device.  In sources with non-device-compatible rates, the audio is still passed through but at a 44.1kHz rate in all cases (22.05, 24, and 88.2kHz), as opposed to just generating a device error.

Can someone confirm that this is expected behavior of bass.dll?  Not complaining, this is welcome behavior vs. no sound, just want to verify that it's not some player-specific parameter as opposed to the core library.  Thanks for any reply!

Ian @ un4seen

  • Administrator
  • Posts: 21017
Re: bass.dll native resampling behavior
« Reply #1 on: 26 Jan '18 - 17:47 »
That sounds like those players are using exclusive mode WASAPI via the BASSWASAPI add-on? BASS itself only uses shared mode, which doesn't allow changing of the device's rate, ie. BASS will always use what's set in the Sound control panel. When an audio file's sample rate is different to that, BASS will resample it to the device's rate.

sveakul

  • Posts: 49
Re: bass.dll native resampling behavior
« Reply #2 on: 26 Jan '18 - 19:59 »
Thanks Ian for the reply!

Yes, the players use exclusive mode via basswasapi.dll

My audio device in Windows 7 is set to 96khz; as expected, audio is passed via bass/basswasapi at whatever the source stream rate is, except when the source rate does not match one of the available device-compatible rates (44.1 or 48 or 96 or 192).  In cases of such a source rate, such as 88.1k or 22.01k, the audio gets resampled by bass to 44.1k, the first compatible device rate, not the 96k rate the device is "set" to in Windows.  Either way I'm good with that and thanks for confirming that the behavior is part of bass/basswaspi.