Wrong samplerates at wasapi and URmkII

Started by udo,

udo

This ist my check for maximum WASAPI-Samplerate:
int[] samplerates = new int[] { 44100, 88200, 96000, 176400, 352800 };
foreach (var sr in samplerates)
{
    BASSWASAPIFormat res = BassWasapi.BASS_WASAPI_CheckFormat(wasapiDevice, sr, 2, BASSWASAPIFormat.BASS_WASAPI_FORMAT_FLOAT);
    if (res != BASSWASAPIFormat.BASS_WASAPI_FORMAT_UNKNOWN)
    {
        MaxSamplingRate = sr;
        maxFormat = res;
        Debug.WriteLine($"SR {sr} fmt {res}");
    }
}

This works well with DAC Topping D10s.  Debug-Output:
SR 44100 fmt BASS_WASAPI_FORMAT_32BIT
SR 88200 fmt BASS_WASAPI_FORMAT_32BIT
SR 96000 fmt BASS_WASAPI_FORMAT_32BIT
SR 176400 fmt BASS_WASAPI_FORMAT_32BIT
SR 352800 fmt BASS_WASAPI_FORMAT_32BIT

With Steinberg UR22mkII its only 44100:
SR 44100 fmt BASS_WASAPI_FORMAT_24BIT
But this is wrong, Steinbergs maximum is 192 kHz!

Is this a problem of Wasapi.dll?

Ian @ un4seen

What happens if you add the BASS_WASAPI_EXCLUSIVE flag to the BASS_WASAPI_CheckFormat call? If you still don't see the other rates then, please confirm that you do see them in the Sound control panel?

udo

#2
Like this?
BassWasapi.BASS_WASAPI_CheckFormat(wasapiDevice, sr, 2, BASSWASAPIInit.BASS_WASAPI_EXCLUSIVE)
// wrong flag combination: BassWasapi.BASS_WASAPI_CheckFormat(wasapiDevice, sr, 2, BASSWASAPIFormat.BASS_WASAPI_FORMAT_FLOAT | BASSWASAPIInit.BASS_WASAPI_EXCLUSIVE)

This brings the same results.


What do you mean by sound control panel? I only know that from Asio, and there rates go up to 192 kHz.

Ian @ un4seen

I meant Windows' Sound control panel - open the control panel, select "Sound", right-click on the device and select "Properties". BASSWASAPI should see the same format options as are available there. It won't see any ASIO-specific options.

udo

It is actually the case that only 24 bit, 44100 Hz is displayed for Steinberg and the combobox is disabled. However, the specification only states 192 kHz.

Ian @ un4seen

If the soundcard's ASIO control panel has other rates available then you could try changing it there and see if the Sound control panel's (and BASSWASAPI's) rate changes too.

udo

You're right, but that's a bit strange. What does Asio have to do with Wasapi?

Ian @ un4seen

A soundcard only has one active sample rate, so changing it via ASIO will affect WASAPI too. It sounds like your soundcard's standard Windows driver is less featured than its ASIO one, with only the latter having the ability to change the sample rate.