func (p *Comment) AddTag(tag string, contents string) { cTag := C.CString(tag) cContents := C.CString(contents) C.vorbis_comment_add_tag((*C.vorbis_comment)(p), cTag, cContents) C.free(unsafe.Pointer(cTag)) C.free(unsafe.Pointer(cContents)) }
// CommentAddTag function as declared in https://xiph.org/vorbis/doc/libvorbis/vorbis_comment_add_tag.html func CommentAddTag(vc *Comment, tag string, contents string) { cvc, _ := vc.PassRef() ctag, _ := unpackPCharString(tag) ccontents, _ := unpackPCharString(contents) C.vorbis_comment_add_tag(cvc, ctag, ccontents) }