From 9fcdaf500b6e3429bcd622b6d52e2406004aae43 Mon Sep 17 00:00:00 2001 From: Noah Metz Date: Mon, 8 Apr 2024 11:47:56 -0600 Subject: [PATCH] Better log message --- cmd/client/main.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cmd/client/main.go b/cmd/client/main.go index b31e89c..d9509c0 100644 --- a/cmd/client/main.go +++ b/cmd/client/main.go @@ -23,10 +23,10 @@ func main() { panic(err) } - playback_device := infos[0].ID + playback_device := infos[0] for _, info := range infos { if info.IsDefault != 0 { - playback_device = info.ID + playback_device = info break } } @@ -36,17 +36,17 @@ func main() { panic(err) } - capture_device := infos[0].ID + capture_device := infos[0] for _, info := range infos { if info.IsDefault != 0 { - capture_device = info.ID + capture_device = info } } inDeviceConfig := malgo.DefaultDeviceConfig(malgo.Capture) inDeviceConfig.Capture.Format = malgo.FormatF32 inDeviceConfig.Capture.Channels = 1 - inDeviceConfig.Capture.DeviceID = capture_device.Pointer() + inDeviceConfig.Capture.DeviceID = capture_device.ID.Pointer() inDeviceConfig.SampleRate = 44100 inDeviceConfig.PeriodSizeInFrames = 100 inDeviceConfig.Alsa.NoMMap = 1 @@ -55,7 +55,7 @@ func main() { outDeviceConfig := malgo.DefaultDeviceConfig(malgo.Playback) outDeviceConfig.Playback.Format = malgo.FormatF32 outDeviceConfig.Playback.Channels = 1 - outDeviceConfig.Playback.DeviceID = playback_device.Pointer() + outDeviceConfig.Playback.DeviceID = playback_device.ID.Pointer() outDeviceConfig.SampleRate = 44100 outDeviceConfig.PeriodSizeInFrames = 100 outDeviceConfig.Alsa.NoMMap = 1