Ejemplo n.º 1
0
// CpuLoad returns the CPU usage information for the specified stream,
// where 0.0 is 0% usage and 1.0 is 100% usage.
//
// The "CPU Load" is a fraction of total CPU time consumed by a
// callback stream's audio processing routines including,
// but not limited to the client supplied stream callback.
//
// This function does not work with blocking read/write streams.
//
// This function may be called from the stream callback function or the application.
func (s *Stream) CpuLoad() float64 {
	return float64(C.Pa_GetStreamCpuLoad(s.paStream))
}
Ejemplo n.º 2
0
// GetStreamCpuLoad function as declared in portaudio/portaudio.h:1071
func GetStreamCpuLoad(stream *Stream) float64 {
	cstream, _ := (unsafe.Pointer)(unsafe.Pointer(stream)), cgoAllocsUnknown
	__ret := C.Pa_GetStreamCpuLoad(cstream)
	__v := (float64)(__ret)
	return __v
}