Exemple #1
0
// Vflt16_byte converts an array of signed 16-bit integers to single-precision floating-point values.
func Vflt16_byte(input []byte, inputStride int, output []float32, outputStride int) {
	C.vDSP_vflt16((*C.short)(unsafe.Pointer(&input[0])), C.vDSP_Stride(inputStride), (*C.float)(&output[0]), C.vDSP_Stride(outputStride), minLen(len(input)/(2*inputStride), len(output)/outputStride))
}
Exemple #2
0
// Vflt16 converts an array of signed 16-bit integers to single-precision floating-point values.
func Vflt16(input []int16, inputStride int, output []float32, outputStride int) {
	C.vDSP_vflt16((*C.short)(&input[0]), C.vDSP_Stride(inputStride), (*C.float)(&output[0]), C.vDSP_Stride(outputStride), minLen(len(input)/inputStride, len(output)/outputStride))
}