Better log message
This commit is contained in:
parent
79189fd2b3
commit
9fcdaf500b
|
|
@ -23,10 +23,10 @@ func main() {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
playback_device := infos[0].ID
|
playback_device := infos[0]
|
||||||
for _, info := range infos {
|
for _, info := range infos {
|
||||||
if info.IsDefault != 0 {
|
if info.IsDefault != 0 {
|
||||||
playback_device = info.ID
|
playback_device = info
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -36,17 +36,17 @@ func main() {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
capture_device := infos[0].ID
|
capture_device := infos[0]
|
||||||
for _, info := range infos {
|
for _, info := range infos {
|
||||||
if info.IsDefault != 0 {
|
if info.IsDefault != 0 {
|
||||||
capture_device = info.ID
|
capture_device = info
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inDeviceConfig := malgo.DefaultDeviceConfig(malgo.Capture)
|
inDeviceConfig := malgo.DefaultDeviceConfig(malgo.Capture)
|
||||||
inDeviceConfig.Capture.Format = malgo.FormatF32
|
inDeviceConfig.Capture.Format = malgo.FormatF32
|
||||||
inDeviceConfig.Capture.Channels = 1
|
inDeviceConfig.Capture.Channels = 1
|
||||||
inDeviceConfig.Capture.DeviceID = capture_device.Pointer()
|
inDeviceConfig.Capture.DeviceID = capture_device.ID.Pointer()
|
||||||
inDeviceConfig.SampleRate = 44100
|
inDeviceConfig.SampleRate = 44100
|
||||||
inDeviceConfig.PeriodSizeInFrames = 100
|
inDeviceConfig.PeriodSizeInFrames = 100
|
||||||
inDeviceConfig.Alsa.NoMMap = 1
|
inDeviceConfig.Alsa.NoMMap = 1
|
||||||
|
|
@ -55,7 +55,7 @@ func main() {
|
||||||
outDeviceConfig := malgo.DefaultDeviceConfig(malgo.Playback)
|
outDeviceConfig := malgo.DefaultDeviceConfig(malgo.Playback)
|
||||||
outDeviceConfig.Playback.Format = malgo.FormatF32
|
outDeviceConfig.Playback.Format = malgo.FormatF32
|
||||||
outDeviceConfig.Playback.Channels = 1
|
outDeviceConfig.Playback.Channels = 1
|
||||||
outDeviceConfig.Playback.DeviceID = playback_device.Pointer()
|
outDeviceConfig.Playback.DeviceID = playback_device.ID.Pointer()
|
||||||
outDeviceConfig.SampleRate = 44100
|
outDeviceConfig.SampleRate = 44100
|
||||||
outDeviceConfig.PeriodSizeInFrames = 100
|
outDeviceConfig.PeriodSizeInFrames = 100
|
||||||
outDeviceConfig.Alsa.NoMMap = 1
|
outDeviceConfig.Alsa.NoMMap = 1
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue