示例#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
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
}