예제 #1
0
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()),
	}
}
예제 #2
0
func duration(paTime C.PaTime) time.Duration {
	return time.Duration(paTime * C.PaTime(time.Second))
}