Author Topic: error BASS_RecordGetInput  (Read 122 times)

Salvo

  • Posts: 162
error BASS_RecordGetInput
« on: 19 Sep '24 - 22:11 »
With the latest version the "rectest" project does not work.
On the bass.dll library version 2.4.17.0 it does not work. >:(

While if I use 2.4.16.7 it works very well.

Chris

  • Posts: 2216
Re: error BASS_RecordGetInput
« Reply #1 on: 19 Sep '24 - 23:15 »
I can not confirm that.
Just tested it  with Delphi 12. and Bass (2.4.17.0)
Will working fine.

Salvo

  • Posts: 162
Re: error BASS_RecordGetInput
« Reply #2 on: 20 Sep '24 - 13:53 »
Sorry but it doesn't work delphi 12.1 and 12.2, compiled for x64-bit
BASS_RecordGetInput doesn't see the microphone.
It always comes back 4294967295
If you want I'll make a video for you
« Last Edit: 20 Sep '24 - 14:26 by Salvo »

Salvo

  • Posts: 162
Re: error BASS_RecordGetInput
« Reply #3 on: 20 Sep '24 - 14:21 »

Ian @ un4seen

  • Administrator
  • Posts: 26077
Re: error BASS_RecordGetInput
« Reply #4 on: 20 Sep '24 - 15:13 »
I think your issue is probably the new "Default" recording device, which follows the system's default device setting but only has "master" input settings. You can disable it via the BASS_CONFIG_REC_DEFAULT option:

Code: [Select]
SetConfig(BASS_CONFIG_REC_DEFAULT, 0);

If you can read C code, you could have a look at the C version of the RECTEST example, which was updated to work with the "Default" device. Please note that the Delphi examples are kindly provided by other users but aren't always up to date with the C examples, so it's a good idea to check the C versions if possible.

Salvo

  • Posts: 162
Re: error BASS_RecordGetInput
« Reply #5 on: 20 Sep '24 - 16:40 »
I put this :

BASS_SetConfig(BASS_CONFIG_REC_DEFAULT, 0);

  Temp := BASS_RecordGetInput(i,level);

  dName := BASS_RecordGetInputName(i);

but it doesn't work, the problem is on the library if I put the 2.4.16.7 it works very well.

Salvo

  • Posts: 162
Re: error BASS_RecordGetInput
« Reply #6 on: 20 Sep '24 - 16:45 »
I forgot to mention that I run everything on windows 11.

Salvo

  • Posts: 162
Re: error BASS_RecordGetInput
« Reply #7 on: 20 Sep '24 - 16:49 »
Sorry Ian but you're right.

I had to put
BASS_SetConfig(BASS_CONFIG_REC_DEFAULT, 0);

before the call
BASS_RecordInit(......

By doing so it now works perfectly.
Thank you  :)

Salvo

  • Posts: 162
Re: error BASS_RecordGetInput
« Reply #8 on: 20 Sep '24 - 21:25 »
However there is some problem with the new library.

If I put this it doesn't work:
BASS_Init(-1, 44100, 0, Handle, nil);
BASS_SetConfig(BASS_CONFIG_REC_DEFAULT, 0);
BASS_RecordFree(); // free current device (and recording channel) if there is one
BASS_RecordInit(-1);
dName := BASS_RecordGetInputName(i);

If I put this instead it works
BASS_SetConfig(BASS_CONFIG_REC_DEFAULT, 0);
BASS_RecordFree(); // free current device (and recording channel) if there is one
BASS_RecordInit(-1);
dName := BASS_RecordGetInputName(i);
BASS_Init(-1, 44100, 0, Handle, nil);

while with the 2.4.16.7 library it always works.

Ian @ un4seen

  • Administrator
  • Posts: 26077
Re: error BASS_RecordGetInput
« Reply #9 on: 23 Sep '24 - 13:20 »
Yes, if you want to disable BASS_CONFIG_REC_DEFAULT, that needs to be done before any device enumeration/initialization because that's when the "Default" device gets added. It can't be removed later because that would change the other device numbers.