Author Topic: No sound for first device (BassNet)  (Read 109 times)

tumanovalex

  • Posts: 17
No sound for first device (BassNet)
« on: 14 May '21 - 19:20 »
In a simple program:
Code: [Select]
BASS_DEVICEINFO[] basinf = Bass.BASS_GetDeviceInfos();
for (int i = 0; i < basinf.Length; i++)
{
  BASS_DEVICEINFO inf = basinf[i];
  Console.WriteLine($"Name device = {inf.name}");
}
I get
Code: [Select]
Name device = No sound
Name device = Speakers (USB PnP Sound Device)
Name device = Speakers (2- Realtek(R) Audio)
Why the first device, probably AMD High Definition Audio Device, is defined as "No sound"? What do I need to do to get the correct device name? I attach shortcut Device manager.

Chris

  • Posts: 1945
Re: No sound for first device (BassNet)
« Reply #1 on: 14 May '21 - 19:36 »
Hi
 
Quote
for (int i = 0; i < basinf.Length; i++)
should to be
Code: [Select]
for (int i = 1; i < basinf.Length; i++)The Devicelist start in Bass with 1
 

tumanovalex

  • Posts: 17
Re: No sound for first device (BassNet)
« Reply #2 on: 14 May '21 - 20:25 »
Thank you very much for the answer. Where is it written about this? I ask in order to no longer ask questions that are answered in the documentation.

saga

  • Posts: 2506
Re: No sound for first device (BassNet)
« Reply #3 on: 14 May '21 - 20:53 »
See https://www.un4seen.com/doc/#bass/BASS_Init.html
"device:   The device to use... -1 = default device, 0 = no sound, 1 = first real output device"

The No Sound device is useful for scenarios where no audio device is present, but you still want to e.g. mix some channels to write them to a WAV file.

tumanovalex

  • Posts: 17
Re: No sound for first device (BassNet)
« Reply #4 on: 15 May '21 - 17:57 »
Thank you very much for the answer. Do I understand correctly that if something is unclear in the BassNet documentation, then I need to look in bass.chm?

saga

  • Posts: 2506
Re: No sound for first device (BassNet)
« Reply #5 on: 15 May '21 - 20:37 »
Indeed, as BASS.net is just a wrapper, you will find the most up-to-date and precise documentation with BASS itself.

tumanovalex

  • Posts: 17
Re: No sound for first device (BassNet)
« Reply #6 on: 16 May '21 - 08:12 »
Thank you very much for the answer.