Author Topic: Confused about ASIO sample rates  (Read 346 times)


  • Posts: 354
Confused about ASIO sample rates
« on: 2 Dec '19 - 23:44 »
One of my users has advised that the ASIO sample rate of his device frequently gets changed on starting my program. From one of several logs he provided, I have extracted the following lines:

Code: [Select]
BASS_ASIO_Init(0, BASS_ASIO_THREAD) [ASIO DirectX Full Duplex Driver] returned 1
BASS_ASIO_GetRate() returned 44100
BASS_ASIO_Free() for ASIO device 0 returned 1

BASS_ASIO_GetDeviceInfo(1, @rAsioDeviceInfo) returned 1
BASS_ASIO_Init(1, BASS_ASIO_THREAD) [ASIO TC Near] returned 1
BASS_ASIO_GetRate() returned 44100
BASS_ASIO_Free() for ASIO device 1 returned 1

BASS_ASIO_GetDeviceInfo(2, @rAsioDeviceInfo) returned 1
BASS_ASIO_Init(2, BASS_ASIO_THREAD) [Generic Low Latency ASIO Driver] returned 1
BASS_ASIO_GetRate() returned 44100
BASS_ASIO_Free() for ASIO device 2 returned 1

BASS_ASIO_GetDeviceInfo(3, @rAsioDeviceInfo) returned 1
BASS_ASIO_Init(3, BASS_ASIO_THREAD) [Prism Sound USB Audio Class 2.0] returned 0
Error 3: Device already in use, or cannot find a free sound driver

BASS_ASIO_GetDeviceInfo(4, @rAsioDeviceInfo) returned 1
BASS_ASIO_Init(4, BASS_ASIO_THREAD) [Realtek ASIO] returned 1
BASS_ASIO_GetRate() returned 48000
BASS_ASIO_Free() for ASIO device 4 returned 1

BASS_ASIO_Init(1, BASS_ASIO_THREAD) returned 1
BASS_ASIO_GetRate() returned 192000
BASS_ASIO_SetRate(192000) returned 1

So ASIO device 1 initially reports the sample rate is 44100, but when the program comes to use that device the sample rate has increased to 192000. This is not consistent. The next run, using exactly the same devices, returned 48000 from GetRate in part 2. In the third run the user select ASIO device 0, and this run correctly reported 44100 in part 2. As far as I can see, only the third of these runs reported the correct sample rate in part 2.

Why is BASS_ASIO_GetRate reporting different sample rates for a single device in the same run?

Where did a sample rate of 192000 come from?

Is it actually necessary for my program to call BASS_ASIO_SetRate?

Ian @ un4seen

  • Administrator
  • Posts: 22959
Re: Confused about ASIO sample rates
« Reply #1 on: 3 Dec '19 - 16:31 »
That's strange. I wonder if the initial rate check failed, because BASSASIO does default to 44100 in that case. I'll send you a debug BASSASIO version to confirm what's happening.

If you're not changing the rate then there is no need to call BASS_ASIO_SetRate.


  • Posts: 1
Re: Confused about ASIO sample rates
« Reply #2 on: 5 Dec '19 - 18:39 »
As far as I remember, the following two drivers (both from Steinberg / Cubase):
- ASIO DirectX Full Duplex Driver
- Generic Low Latency ASIO Driver
are generic wrapper drivers, that allow ASIO access to audio devices, that don't have their own ASIO drivers.
They redirect/translate ASIO calls to another type of driver, e.g. DirectX in the first case.
The second driver seems to use a faster API/driver, but I don't remember which one ..
There should be some Control Panel / Audio Setup dialog, where you can select, which physical device the generic driver should access.

Try switching.mapping the wrapper ASIO driver to another physical device - does the behaviour change ?