func paStreamParameters(p StreamDeviceParameters, fmt C.PaSampleFormat) *C.PaStreamParameters { return &C.PaStreamParameters{ device: p.Device.index, channelCount: C.int(p.Channels), sampleFormat: fmt, suggestedLatency: C.PaTime(p.Latency.Seconds()), } }
func duration(paTime C.PaTime) time.Duration { return time.Duration(paTime * C.PaTime(time.Second)) }