Beispiel #1
0
func (s *Stream) Close() error {
	if !s.closed {
		s.closed = true
		return newError(C.Pa_CloseStream(s.paStream))
	}
	return nil
}
Beispiel #2
0
func (s *Stream) Close() error {
	defer C.free(unsafe.Pointer(s))
	if !s.closed {
		s.closed = true
		return newError(C.Pa_CloseStream(s.paStream))
	}
	return nil
}
Beispiel #3
0
// Close terminates the stream.
func (s *Stream) Close() error {
	if !s.closed {
		s.closed = true
		err := newError(C.Pa_CloseStream(s.paStream))
		delStream(s)
		return err
	}
	return nil
}
Beispiel #4
0
func (s *Stream) Close() error {
	mu.Lock()
	delete(idToStream, s.id)
	mu.Unlock()
	if !s.closed {
		s.closed = true
		return newError(C.Pa_CloseStream(s.paStream))
	}
	return nil
}
Beispiel #5
0
func (strm *Stream) Close() {
	C.Pa_StopStream(strm.cee)
	C.Pa_CloseStream(strm.cee)
	strm.cee = nil // we really don't want a wild pointer around
}
Beispiel #6
0
// CloseStream function as declared in portaudio/portaudio.h:894
func CloseStream(stream *Stream) Error {
	cstream, _ := (unsafe.Pointer)(unsafe.Pointer(stream)), cgoAllocsUnknown
	__ret := C.Pa_CloseStream(cstream)
	__v := (Error)(__ret)
	return __v
}