示例#1
0
文件: sample.go 项目: shazow/mog
// SampleFormat.IsRe returns 1 when the format is reverse endian.
//
// Returns -1 when endianness does not apply to this format.
func (f SampleFormat) IsRe() int {
	// note: C.pa_sample_format_is_re() doesn't seem to work
	if SAMPLE_S16NE == SAMPLE_S16LE {
		return int(C.pa_sample_format_is_be(C.pa_sample_format_t(f)))
	}
	return int(C.pa_sample_format_is_le(C.pa_sample_format_t(f)))
}
示例#2
0
文件: sample.go 项目: shazow/mog
// SampleFormat.IsBe returns 1 when the format is big endian.
//
// Returns -1 when endianness does not apply to this format.
func (f SampleFormat) IsBe() int {
	return int(C.pa_sample_format_is_be(C.pa_sample_format_t(f)))
}