Got it, thanks! Jan Mercl <0xj...@gmail.com> 于2019年8月7日周三 下午4:20写道:
> On Wed, Aug 7, 2019 at 3:17 AM hui zhang <fastfad...@gmail.com> 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 golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CAF7uC_vQZDFwdzyVEO%2BxxMt67Vk8BkH%3DkK%3DsRLFWLFaiVKBkFA%40mail.gmail.com.