From 7235d9fca57aa4dacb6a7d8846c2d003bccb4c89 Mon Sep 17 00:00:00 2001 From: Mike Hughes Date: Sat, 18 Nov 2023 14:08:50 +1100 Subject: [PATCH] Modify `deviceConfig` to actually alter the `NoAutoConvertSRC` flag --- device_config.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/device_config.go b/device_config.go index 05399c4..80a8152 100644 --- a/device_config.go +++ b/device_config.go @@ -67,7 +67,7 @@ func DefaultDeviceConfig(deviceType DeviceType) DeviceConfig { deviceConfig.Capture.ChannelMap = unsafe.Pointer(config.capture.pChannelMap) deviceConfig.Capture.ShareMode = ShareMode(config.capture.shareMode) - deviceConfig.Wasapi.NoAutoConvertSRC = uint32(config.wasapi.noHardwareOffloading) + deviceConfig.Wasapi.NoAutoConvertSRC = uint32(config.wasapi.noAutoConvertSRC) deviceConfig.Wasapi.NoDefaultQualitySRC = uint32(config.wasapi.noDefaultQualitySRC) deviceConfig.Wasapi.NoAutoStreamRouting = uint32(config.wasapi.noAutoStreamRouting) deviceConfig.Wasapi.NoHardwareOffloading = uint32(config.wasapi.noHardwareOffloading) @@ -120,7 +120,7 @@ func (d *DeviceConfig) toC() (C.ma_device_config, func()) { deviceConfig.capture.pChannelMap = (*C.ma_channel)(d.Capture.ChannelMap) deviceConfig.capture.shareMode = C.ma_share_mode(d.Capture.ShareMode) - deviceConfig.wasapi.noAutoConvertSRC = C.uchar(d.Wasapi.NoHardwareOffloading) + deviceConfig.wasapi.noAutoConvertSRC = C.uchar(d.Wasapi.NoAutoConvertSRC) deviceConfig.wasapi.noDefaultQualitySRC = C.uchar(d.Wasapi.NoDefaultQualitySRC) deviceConfig.wasapi.noAutoStreamRouting = C.uchar(d.Wasapi.NoAutoStreamRouting) deviceConfig.wasapi.noHardwareOffloading = C.uchar(d.Wasapi.NoHardwareOffloading)