Example #1
0
File: sox.go Project: krig/go-sox
// FormatSupportsEncoding2 returns true if the format handler for
// the specified file type supports the specified encoding.
func FormatSupportsEncoding2(path, filetype string, encoding *EncodingInfo) bool {
	cpath := C.CString(path)
	defer C.free(unsafe.Pointer(cpath))
	ctype := C.CString(filetype)
	defer C.free(unsafe.Pointer(ctype))
	return int(C.sox_format_supports_encoding(cpath, ctype, encoding.cEncoding)) != 0
}
Example #2
0
File: sox.go Project: krig/go-sox
// FormatSupportsEncoding returns true if the format handler for
// the specified file type supports the specified encoding.
func FormatSupportsEncoding(path string, encoding *EncodingInfo) bool {
	cpath := C.CString(path)
	defer C.free(unsafe.Pointer(cpath))
	return int(C.sox_format_supports_encoding(cpath, nil, encoding.cEncoding)) != 0
}