On Wed, Aug 7, 2019 at 3:17 AM hui zhang <[email protected]> wrote:
> //export Send
> func Send(confid string, len int, pcm *C.short) {
> //put c.short array to int16 slice/array efficiently , how ?
> // memcopy ?
> }
s := (*[^uint(0) >> 1]int16)(unsafe.Pointer(pcm))[:len] // s is
[]int16, len(s) = len
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/golang-nuts/CAA40n-X-Ojb1tSxnBdSB771gE6F%2Bm4KQUX_FhVbZisMFG3EG2g%40mail.gmail.com.