예제 #1
0
파일: portaudio.go 프로젝트: shazow/mog
func (s *Stream) Close() error {
	if !s.closed {
		s.closed = true
		return newError(C.Pa_CloseStream(s.paStream))
	}
	return nil
}
예제 #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
}
예제 #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
}
예제 #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
}
예제 #5
0
파일: Stream.go 프로젝트: quantum1423/tavla
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
}
예제 #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
}