cutego/multimedia/qaudiobuffer.go

125 lines
2.6 KiB
Go
Raw Normal View History

2015-10-24 18:18:24 +03:00
package multimedia
//#include "multimedia.h"
2015-10-24 18:18:24 +03:00
import "C"
import (
"github.com/therecipe/qt"
2015-10-24 18:18:24 +03:00
"unsafe"
)
type QAudioBuffer struct {
ptr unsafe.Pointer
}
2015-11-09 20:23:42 +03:00
type QAudioBuffer_ITF interface {
QAudioBuffer_PTR() *QAudioBuffer
2015-10-24 18:18:24 +03:00
}
func (p *QAudioBuffer) Pointer() unsafe.Pointer {
return p.ptr
}
func (p *QAudioBuffer) SetPointer(ptr unsafe.Pointer) {
p.ptr = ptr
}
2015-11-09 20:23:42 +03:00
func PointerFromQAudioBuffer(ptr QAudioBuffer_ITF) unsafe.Pointer {
2015-10-24 18:18:24 +03:00
if ptr != nil {
2015-11-09 20:23:42 +03:00
return ptr.QAudioBuffer_PTR().Pointer()
2015-10-24 18:18:24 +03:00
}
return nil
}
2015-11-09 20:23:42 +03:00
func NewQAudioBufferFromPointer(ptr unsafe.Pointer) *QAudioBuffer {
2015-10-24 18:18:24 +03:00
var n = new(QAudioBuffer)
n.SetPointer(ptr)
return n
}
2015-11-09 20:23:42 +03:00
func (ptr *QAudioBuffer) QAudioBuffer_PTR() *QAudioBuffer {
2015-10-24 18:18:24 +03:00
return ptr
}
func NewQAudioBuffer() *QAudioBuffer {
defer qt.Recovering("QAudioBuffer::QAudioBuffer")
2015-11-09 20:23:42 +03:00
return NewQAudioBufferFromPointer(C.QAudioBuffer_NewQAudioBuffer())
2015-10-24 18:18:24 +03:00
}
2015-11-09 20:23:42 +03:00
func NewQAudioBuffer3(other QAudioBuffer_ITF) *QAudioBuffer {
defer qt.Recovering("QAudioBuffer::QAudioBuffer")
2015-11-09 20:23:42 +03:00
return NewQAudioBufferFromPointer(C.QAudioBuffer_NewQAudioBuffer3(PointerFromQAudioBuffer(other)))
2015-10-24 18:18:24 +03:00
}
func (ptr *QAudioBuffer) ByteCount() int {
defer qt.Recovering("QAudioBuffer::byteCount")
2015-10-24 18:18:24 +03:00
if ptr.Pointer() != nil {
2015-11-09 20:23:42 +03:00
return int(C.QAudioBuffer_ByteCount(ptr.Pointer()))
2015-10-24 18:18:24 +03:00
}
return 0
}
2015-11-09 20:23:42 +03:00
func (ptr *QAudioBuffer) ConstData() unsafe.Pointer {
defer qt.Recovering("QAudioBuffer::constData")
2015-10-24 18:18:24 +03:00
if ptr.Pointer() != nil {
2015-11-09 20:23:42 +03:00
return unsafe.Pointer(C.QAudioBuffer_ConstData(ptr.Pointer()))
2015-10-24 18:18:24 +03:00
}
2015-11-09 20:23:42 +03:00
return nil
2015-10-24 18:18:24 +03:00
}
2015-11-09 20:23:42 +03:00
func (ptr *QAudioBuffer) Data2() unsafe.Pointer {
defer qt.Recovering("QAudioBuffer::data")
2015-10-24 18:18:24 +03:00
if ptr.Pointer() != nil {
2015-11-09 20:23:42 +03:00
return unsafe.Pointer(C.QAudioBuffer_Data2(ptr.Pointer()))
2015-10-24 18:18:24 +03:00
}
2015-11-09 20:23:42 +03:00
return nil
2015-10-24 18:18:24 +03:00
}
2015-11-09 20:23:42 +03:00
func (ptr *QAudioBuffer) Data() unsafe.Pointer {
defer qt.Recovering("QAudioBuffer::data")
2015-10-24 18:18:24 +03:00
if ptr.Pointer() != nil {
2015-11-09 20:23:42 +03:00
return unsafe.Pointer(C.QAudioBuffer_Data(ptr.Pointer()))
2015-10-24 18:18:24 +03:00
}
2015-11-09 20:23:42 +03:00
return nil
2015-10-24 18:18:24 +03:00
}
func (ptr *QAudioBuffer) FrameCount() int {
defer qt.Recovering("QAudioBuffer::frameCount")
2015-10-24 18:18:24 +03:00
if ptr.Pointer() != nil {
2015-11-09 20:23:42 +03:00
return int(C.QAudioBuffer_FrameCount(ptr.Pointer()))
2015-10-24 18:18:24 +03:00
}
return 0
}
func (ptr *QAudioBuffer) IsValid() bool {
defer qt.Recovering("QAudioBuffer::isValid")
2015-10-24 18:18:24 +03:00
if ptr.Pointer() != nil {
2015-11-09 20:23:42 +03:00
return C.QAudioBuffer_IsValid(ptr.Pointer()) != 0
2015-10-24 18:18:24 +03:00
}
return false
}
func (ptr *QAudioBuffer) SampleCount() int {
defer qt.Recovering("QAudioBuffer::sampleCount")
2015-10-24 18:18:24 +03:00
if ptr.Pointer() != nil {
2015-11-09 20:23:42 +03:00
return int(C.QAudioBuffer_SampleCount(ptr.Pointer()))
2015-10-24 18:18:24 +03:00
}
return 0
}
func (ptr *QAudioBuffer) DestroyQAudioBuffer() {
defer qt.Recovering("QAudioBuffer::~QAudioBuffer")
2015-10-24 18:18:24 +03:00
if ptr.Pointer() != nil {
2015-11-09 20:23:42 +03:00
C.QAudioBuffer_DestroyQAudioBuffer(ptr.Pointer())
2015-10-24 18:18:24 +03:00
}
}