// Stream.Flush flushes the playback buffer, discarding any audio therein func (s *Stream) Flush() (int, error) { var err C.int flushed := C.pa_simple_flush(s.simple, &err) if err == C.PA_OK { return int(flushed), nil } return int(flushed), errorFromCode(err) }
// Flush discards all data in the server buffer. func (conn *Conn) Flush() error { C.pa_simple_flush( conn.simple, &conn.err.no, ) if conn.err.no != C.int(0) { return conn.err } return nil }