Author Topic: BASS_Init failed with BASS_ERROR_BUSY  (Read 390 times)

Xire

  • Posts: 279
BASS_Init failed with BASS_ERROR_BUSY
« on: 30 Jun '18 - 07:15 »
Hi,

I cannot find anything in the documentation on why BASS_Init could fail with BASS_ERROR_BUSY (46).
One of the users reported this error. I'm using the latest version (2.4.13.8) available from download.

Xire

KaleidonKep99

  • Posts: 189
Re: BASS_Init failed with BASS_ERROR_BUSY
« Reply #1 on: 30 Jun '18 - 10:05 »
Error 46 (BASS_ERROR_BUSY) means that the device is already being used in exclusive mode by another application.
This might happen when another program (Such as ASIO4ALL) takes exclusive control over the output.

Ian @ un4seen

  • Administrator
  • Posts: 21325
Re: BASS_Init failed with BASS_ERROR_BUSY
« Reply #2 on: 2 Jul '18 - 13:17 »
BASS_ERROR_BUSY does indeed mean that something else has exclusive use of the device. I see that isn't mentioned in the BASS_Init documentation currently. I'll add a note for the next release.

Xire

  • Posts: 279
Re: BASS_Init failed with BASS_ERROR_BUSY
« Reply #3 on: 2 Jul '18 - 17:10 »
Is this something new added in the latest bass lately as I started to receive those reports when I added the latest version to my app? If so, is there some new flag to use?

Ian @ un4seen

  • Administrator
  • Posts: 21325
Re: BASS_Init failed with BASS_ERROR_BUSY
« Reply #4 on: 2 Jul '18 - 18:02 »
Yes, the BASS_ERROR_BUSY error code applies when using WASAPI. When using DirectSound in the same situation, the BASS_Init call may succeed but then BASS_ChannelPlay will fail with BASS_ERROR_BUFLOST. There isn't really anything that you can do about the device being unavailable except retry later when the other software has stopped using it in exclusive mode.

Xire

  • Posts: 279
Re: BASS_Init failed with BASS_ERROR_BUSY
« Reply #5 on: 2 Jul '18 - 18:53 »
Hmm, I'm calling it like BASS_Init(-1, 44100, 0, Handle, nil) (Handle = 0) with no intention to use WASAPI (just the basic playback is required in the app). Is this where BASS_DEVICE_DSOUND could help?

Ian @ un4seen

  • Administrator
  • Posts: 21325
Re: BASS_Init failed with BASS_ERROR_BUSY
« Reply #6 on: 3 Jul '18 - 15:03 »
Yes, you can use the BASS_DEVICE_DSOUND flag in the BASS_Init call for DirectSound output instead of WASAPI.