Exemple #1
0
// CommentQuery function as declared in https://xiph.org/vorbis/doc/libvorbis/vorbis_comment_query.html
func CommentQuery(vc *Comment, tag string, count int32) *byte {
	cvc, _ := vc.PassRef()
	ctag, _ := unpackPCharString(tag)
	ccount, _ := (C.int)(count), cgoAllocsUnknown
	__ret := C.vorbis_comment_query(cvc, ctag, ccount)
	__v := *(**byte)(unsafe.Pointer(&__ret))
	return __v
}
Exemple #2
0
func (p *Comment) Query(tag string, count int) string {
	cTag := C.CString(tag)
	ret := C.vorbis_comment_query((*C.vorbis_comment)(p), cTag, C.int(count))
	C.free(unsafe.Pointer(cTag))
	return C.GoString(ret)
}