Beispiel #1
0
func (m *ChannelMap) toC() *C.pa_channel_map {
	if m == nil {
		return nil
	}
	cmap := &C.pa_channel_map{}
	cmap.channels = C.uint8_t(m.Channels)
	for i := 0; i < CHANNELS_MAX; i++ {
		cmap._map[i] = C.pa_channel_position_t(m.Map[i])
	}
	return cmap
}
Beispiel #2
0
// ChannelMap.HasPosition returns true iff the specified channel position
// is available at least once in the channel map.
func (m *ChannelMap) HasPosition(p ChannelPosition) bool {
	return C.pa_channel_map_has_position(m.toC(), C.pa_channel_position_t(p)) != 0
}
Beispiel #3
0
// ChannelPosition.PrettyString returns a human-readable text label
// for the channel position.
func (p ChannelPosition) PrettyString() string {
	cstr := C.pa_channel_position_to_pretty_string(C.pa_channel_position_t(p))
	return C.GoString(cstr)
}