diff --git a/cmd/client/main.go b/cmd/client/main.go index e800ded..aa1bcfe 100644 --- a/cmd/client/main.go +++ b/cmd/client/main.go @@ -12,7 +12,7 @@ import ( func main() { decoders := map[pnyx.PeerID]*opus.Decoder{} - encoder, err := opus.NewEncoder(44100, 1, opus.AppVoIP) + encoder, err := opus.NewEncoder(48000, 1, opus.AppVoIP) if err != nil { panic(err) } @@ -69,8 +69,8 @@ func main() { inDeviceConfig.Capture.Format = malgo.FormatS16 inDeviceConfig.Capture.Channels = 1 inDeviceConfig.Capture.DeviceID = capture_device.ID.Pointer() - inDeviceConfig.SampleRate = 44100 - inDeviceConfig.PeriodSizeInFrames = 882 + inDeviceConfig.SampleRate = 48000 + inDeviceConfig.PeriodSizeInFrames = 960 inDeviceConfig.Alsa.NoMMap = 1 inDeviceConfig.Capture.ShareMode = malgo.Shared @@ -78,8 +78,8 @@ func main() { outDeviceConfig.Playback.Format = malgo.FormatS16 outDeviceConfig.Playback.Channels = 1 outDeviceConfig.Playback.DeviceID = playback_device.ID.Pointer() - outDeviceConfig.SampleRate = 44100 - outDeviceConfig.PeriodSizeInFrames = 882 + outDeviceConfig.SampleRate = 48000 + outDeviceConfig.PeriodSizeInFrames = 960 outDeviceConfig.Alsa.NoMMap = 1 outDeviceConfig.Playback.ShareMode = malgo.Shared @@ -181,7 +181,7 @@ func main() { if packet.Channel == pnyx.ChannelID(1) { decoder, exists := decoders[peer] if exists == false { - decoder, err = opus.NewDecoder(44100, 1) + decoder, err = opus.NewDecoder(48000, 1) if err != nil { panic(err) }