Skip to content

Commit

Permalink
fix: Show all audio input devices
Browse files Browse the repository at this point in the history
  • Loading branch information
emcifuntik committed Nov 15, 2023
1 parent 3aae1d7 commit 0f55d83
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/CSoundInput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,7 @@ int CSoundInput::GetNumDevices() const
for (uint32_t i = 0; BASS_RecordGetDeviceInfo(i, &deviceInfo); i++)
{
if (deviceInfo.flags & BASS_DEVICE_ENABLED &&
!(deviceInfo.flags & BASS_DEVICE_LOOPBACK) &&
(deviceInfo.flags & BASS_DEVICE_TYPE_MASK) == BASS_DEVICE_TYPE_MICROPHONE)
!(deviceInfo.flags & BASS_DEVICE_LOOPBACK))
{
numDevices++;
}
Expand All @@ -93,8 +92,7 @@ uint32_t CSoundInput::GetDeviceIdFromIndex(int index) const
for (uint32_t i = 0; BASS_RecordGetDeviceInfo(i, &deviceInfo); i++)
{
if (deviceInfo.flags & BASS_DEVICE_ENABLED &&
!(deviceInfo.flags & BASS_DEVICE_LOOPBACK) &&
(deviceInfo.flags & BASS_DEVICE_TYPE_MASK) == BASS_DEVICE_TYPE_MICROPHONE)
!(deviceInfo.flags & BASS_DEVICE_LOOPBACK))
{
if (indexCounter == index)
return i;
Expand Down

0 comments on commit 0f55d83

Please sign in to comment.