Exemplo n.º 1
0
Arquivo: sample.go Projeto: 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)))
}
Exemplo n.º 2
0
Arquivo: sample.go Projeto: 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)))
}