Author Topic: Playback devices appearing in Record device query  (Read 109 times)

Chris Ward

  • Guest
Hello,

running VB.net 2019 on Windows 10 64 bits, and the following code to get the Record devices on a pc (as seen in mmsys.cpl) i get the record devices AND playback devices listed ! This is using Bass.net.dll 2.4.14.1 and bass.dll 2.4.15.0 So i downloaded bass.dll 2.4.16.7 and still got the record devices listed and then the playback devices too - not helpful when the results go into a combobox for record soundcard selection.  However when i used the code with the bass.dll 2.4.13.2 (which i had lying around) and the same Bass.net.dll as before, the code works as expected and only displays my input devices (and this is likely the dll version i used when i first wrote the code). So, has something changed to do with getting only record devices ? or has a bug got introduced that hasn't been spotted ?

admittedly i haven't changed the bass.net.dll file, as this is more of a pain to update as .net needs a specific version and id have to update this across all my applications, which is dull, but i do only  from time to time.

thank you

Chris.

    Function GetRecSoundcards() As Integer
        Dim n As Integer = 0
        Dim info As New BASS_DEVICEINFO()
        Dim DefaultRecDevice As New Bass
        GetRecSoundcards = -1
        While (Bass.BASS_RecordGetDeviceInfo(n, info))
            RecSoundcard(n).ID = n
            RecSoundcard(n).Name = info.ToString
            If info.IsDefault = True Then GetRecSoundcards = n
            n = n + 1
        End While
        CFG.RecSoundcardCount = n - 1
    End Function

fmcoder

  • Posts: 467
Re: Playback devices appearing in Record device query
« Reply #1 on: 10 May '22 - 14:30 »
May be it also lists loopback devices for playback devices? I suggest you to check the device flags to get more info on the returned devices.

Ian @ un4seen

  • Administrator
  • Posts: 24424
Re: Playback devices appearing in Record device query
« Reply #2 on: 10 May '22 - 17:37 »
Indeed, those entries will be "loopback" devices, which capture the sound being played on the corresponding output device. They can be identified by having the BASS_DEVICE_LOOPBACK flag set.