Author Topic: Bass shows 0 speakers when not using default device  (Read 167 times)

Vibrance

  • Posts: 6
Hi,
I am currently developing a media player in C# and I have a problem with device selection: As long as I use the default device (in this case the device with ID -1) everything works fine, but as soon as I use any other device (even if it is the same device as the default one) Bass shows me 0 speakers. Unfortunately some users of the application reported the same behaviour.
Here are two log entries of my application:

Default device ID -1:
Quote
[INFO] 15.11.2017, 15:24:53: Bass configuration:
   SelectedDevice=-1
   Speakers=2
   MinRate=100
   MaxRate=200000
   DX=9
   EAX=False

The same device, in this case ID 0:
Quote
[INFO] 15.11.2017, 15:23:28: Bass configuration:
   SelectedDevice=0
   Speakers=0
   MinRate=0
   MaxRate=0
   DX=0
   EAX=False

Also FYI, here is the method which initializes the device:
Code: [Select]
public void ChangeAudioOutput(int selectedDevice)
        {
            Bass.BASS_Free();
            Bass.BASS_Init(selectedDevice, 48000, BASSInit.BASS_DEVICE_SPEAKERS, _handle);
            BASS_DEVICEINFO[] devices = Bass.BASS_GetDeviceInfos();

            BASS_INFO info = new BASS_INFO();
            Bass.BASS_GetInfo(info);

            BASSInfo inf = info.flags;
            bassInfo = string.Format("Bass configuration:\r\tSelectedDevice={0}\r\t{1}", selectedDevice, info.ToString().Replace(", ", "\r\t"));
            var error = Bass.BASS_ErrorGetCode();
            player.Logger.WriteLog(bassInfo);
            BassFx.LoadMe();
        }

Is there anything wrong with the way I initialize the device?
Thanks in advance for every help!

Ian @ un4seen

  • Administrator
  • Posts: 20437
Re: Bass shows 0 speakers when not using default device
« Reply #1 on: 15 Nov '17 - 16:39 »
Please confirm what BASS version you are using, ie. what does BASS_GetVersion say? Also confirm what Windows version(s) you are seeing that on, and whether the app is being run in a compatibility mode. If you try a different soundcard on the same system, do you see the same with it too?

Vibrance

  • Posts: 6
Re: Bass shows 0 speakers when not using default device
« Reply #2 on: 15 Nov '17 - 21:24 »
I am currently using the following file versions:
  • bass.dll 2.4.12.1
  • Bass.Net.dll 2.4.12.6
  • bass_fx.dll 2.4.11.1
  • bassflac.dll 2.4.3.0
  • bassmix.dll 2.4.8.0

Also I am currently running Windows 10 Pro with version: 10.0.15063; the app is not run being in compatibility mode (the UI is built on WPF)

Ian @ un4seen

  • Administrator
  • Posts: 20437
Re: Bass shows 0 speakers when not using default device
« Reply #3 on: 16 Nov '17 - 16:02 »
Ah, I see what it is now. Device #0 is the "no sound" device, so that will be why its BASS_INFO structure is blank. Device #1 is the first real device.

Vibrance

  • Posts: 6
Re: Bass shows 0 speakers when not using default device
« Reply #4 on: 16 Nov '17 - 20:35 »
Oh my god thank you! I feel so stupid right now, but everything is working now like a charm :D