2024-11-04 23:15:32 +13:00
|
|
|
package multimedia
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
#include "gen_qaudiodecodercontrol.h"
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
*/
|
|
|
|
import "C"
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/mappu/miqt/qt"
|
|
|
|
"runtime"
|
|
|
|
"runtime/cgo"
|
|
|
|
"unsafe"
|
|
|
|
)
|
|
|
|
|
|
|
|
type QAudioDecoderControl struct {
|
2025-01-18 17:57:48 +13:00
|
|
|
h *C.QAudioDecoderControl
|
2024-11-04 23:15:32 +13:00
|
|
|
*QMediaControl
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAudioDecoderControl) cPointer() *C.QAudioDecoderControl {
|
|
|
|
if this == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return this.h
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAudioDecoderControl) UnsafePointer() unsafe.Pointer {
|
|
|
|
if this == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return unsafe.Pointer(this.h)
|
|
|
|
}
|
|
|
|
|
2024-11-19 19:29:06 +13:00
|
|
|
// newQAudioDecoderControl constructs the type using only CGO pointers.
|
2024-12-07 17:15:57 +13:00
|
|
|
func newQAudioDecoderControl(h *C.QAudioDecoderControl) *QAudioDecoderControl {
|
2024-11-04 23:15:32 +13:00
|
|
|
if h == nil {
|
|
|
|
return nil
|
|
|
|
}
|
2024-12-07 17:15:57 +13:00
|
|
|
var outptr_QMediaControl *C.QMediaControl = nil
|
|
|
|
C.QAudioDecoderControl_virtbase(h, &outptr_QMediaControl)
|
|
|
|
|
2024-11-19 19:29:06 +13:00
|
|
|
return &QAudioDecoderControl{h: h,
|
2024-12-07 17:15:57 +13:00
|
|
|
QMediaControl: newQMediaControl(outptr_QMediaControl)}
|
2024-11-04 23:15:32 +13:00
|
|
|
}
|
|
|
|
|
2024-11-19 19:29:06 +13:00
|
|
|
// UnsafeNewQAudioDecoderControl constructs the type using only unsafe pointers.
|
2024-12-07 17:15:57 +13:00
|
|
|
func UnsafeNewQAudioDecoderControl(h unsafe.Pointer) *QAudioDecoderControl {
|
|
|
|
return newQAudioDecoderControl((*C.QAudioDecoderControl)(h))
|
2024-11-04 23:15:32 +13:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAudioDecoderControl) MetaObject() *qt.QMetaObject {
|
2025-02-01 13:45:16 +13:00
|
|
|
return qt.UnsafeNewQMetaObject(unsafe.Pointer(C.QAudioDecoderControl_metaObject(this.h)))
|
2024-11-04 23:15:32 +13:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAudioDecoderControl) Metacast(param1 string) unsafe.Pointer {
|
|
|
|
param1_Cstring := C.CString(param1)
|
|
|
|
defer C.free(unsafe.Pointer(param1_Cstring))
|
2025-02-01 13:45:16 +13:00
|
|
|
return (unsafe.Pointer)(C.QAudioDecoderControl_metacast(this.h, param1_Cstring))
|
2024-11-04 23:15:32 +13:00
|
|
|
}
|
|
|
|
|
|
|
|
func QAudioDecoderControl_Tr(s string) string {
|
|
|
|
s_Cstring := C.CString(s)
|
|
|
|
defer C.free(unsafe.Pointer(s_Cstring))
|
2025-02-01 13:45:16 +13:00
|
|
|
var _ms C.struct_miqt_string = C.QAudioDecoderControl_tr(s_Cstring)
|
2024-11-04 23:15:32 +13:00
|
|
|
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms.data))
|
|
|
|
return _ret
|
|
|
|
}
|
|
|
|
|
|
|
|
func QAudioDecoderControl_TrUtf8(s string) string {
|
|
|
|
s_Cstring := C.CString(s)
|
|
|
|
defer C.free(unsafe.Pointer(s_Cstring))
|
2025-02-01 13:45:16 +13:00
|
|
|
var _ms C.struct_miqt_string = C.QAudioDecoderControl_trUtf8(s_Cstring)
|
2024-11-04 23:15:32 +13:00
|
|
|
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms.data))
|
|
|
|
return _ret
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAudioDecoderControl) State() QAudioDecoder__State {
|
2025-02-01 13:45:16 +13:00
|
|
|
return (QAudioDecoder__State)(C.QAudioDecoderControl_state(this.h))
|
2024-11-04 23:15:32 +13:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAudioDecoderControl) SourceFilename() string {
|
2025-02-01 13:45:16 +13:00
|
|
|
var _ms C.struct_miqt_string = C.QAudioDecoderControl_sourceFilename(this.h)
|
2024-11-04 23:15:32 +13:00
|
|
|
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms.data))
|
|
|
|
return _ret
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAudioDecoderControl) SetSourceFilename(fileName string) {
|
|
|
|
fileName_ms := C.struct_miqt_string{}
|
|
|
|
fileName_ms.data = C.CString(fileName)
|
|
|
|
fileName_ms.len = C.size_t(len(fileName))
|
|
|
|
defer C.free(unsafe.Pointer(fileName_ms.data))
|
2025-02-01 13:45:16 +13:00
|
|
|
C.QAudioDecoderControl_setSourceFilename(this.h, fileName_ms)
|
2024-11-04 23:15:32 +13:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAudioDecoderControl) SourceDevice() *qt.QIODevice {
|
2025-02-01 13:45:16 +13:00
|
|
|
return qt.UnsafeNewQIODevice(unsafe.Pointer(C.QAudioDecoderControl_sourceDevice(this.h)))
|
2024-11-04 23:15:32 +13:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAudioDecoderControl) SetSourceDevice(device *qt.QIODevice) {
|
2025-02-01 13:45:16 +13:00
|
|
|
C.QAudioDecoderControl_setSourceDevice(this.h, (*C.QIODevice)(device.UnsafePointer()))
|
2024-11-04 23:15:32 +13:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAudioDecoderControl) Start() {
|
2025-02-01 13:45:16 +13:00
|
|
|
C.QAudioDecoderControl_start(this.h)
|
2024-11-04 23:15:32 +13:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAudioDecoderControl) Stop() {
|
2025-02-01 13:45:16 +13:00
|
|
|
C.QAudioDecoderControl_stop(this.h)
|
2024-11-04 23:15:32 +13:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAudioDecoderControl) AudioFormat() *QAudioFormat {
|
2025-02-01 13:45:16 +13:00
|
|
|
_goptr := newQAudioFormat(C.QAudioDecoderControl_audioFormat(this.h))
|
2024-11-04 23:15:32 +13:00
|
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
return _goptr
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAudioDecoderControl) SetAudioFormat(format *QAudioFormat) {
|
2025-02-01 13:45:16 +13:00
|
|
|
C.QAudioDecoderControl_setAudioFormat(this.h, format.cPointer())
|
2024-11-04 23:15:32 +13:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAudioDecoderControl) Read() *QAudioBuffer {
|
2025-02-01 13:45:16 +13:00
|
|
|
_goptr := newQAudioBuffer(C.QAudioDecoderControl_read(this.h))
|
2024-11-04 23:15:32 +13:00
|
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
return _goptr
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAudioDecoderControl) BufferAvailable() bool {
|
2025-02-01 13:45:16 +13:00
|
|
|
return (bool)(C.QAudioDecoderControl_bufferAvailable(this.h))
|
2024-11-04 23:15:32 +13:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAudioDecoderControl) Position() int64 {
|
2025-02-01 13:45:16 +13:00
|
|
|
return (int64)(C.QAudioDecoderControl_position(this.h))
|
2024-11-04 23:15:32 +13:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAudioDecoderControl) Duration() int64 {
|
2025-02-01 13:45:16 +13:00
|
|
|
return (int64)(C.QAudioDecoderControl_duration(this.h))
|
2024-11-04 23:15:32 +13:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAudioDecoderControl) StateChanged(newState QAudioDecoder__State) {
|
2025-02-01 13:45:16 +13:00
|
|
|
C.QAudioDecoderControl_stateChanged(this.h, (C.int)(newState))
|
2024-11-04 23:15:32 +13:00
|
|
|
}
|
|
|
|
func (this *QAudioDecoderControl) OnStateChanged(slot func(newState QAudioDecoder__State)) {
|
2025-02-01 13:45:16 +13:00
|
|
|
C.QAudioDecoderControl_connect_stateChanged(this.h, C.intptr_t(cgo.NewHandle(slot)))
|
2024-11-04 23:15:32 +13:00
|
|
|
}
|
|
|
|
|
2025-02-01 13:45:16 +13:00
|
|
|
//export miqt_exec_callback_QAudioDecoderControl_stateChanged
|
|
|
|
func miqt_exec_callback_QAudioDecoderControl_stateChanged(cb C.intptr_t, newState C.int) {
|
2024-11-04 23:15:32 +13:00
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(newState QAudioDecoder__State))
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
|
|
|
}
|
|
|
|
|
|
|
|
// Convert all CABI parameters to Go parameters
|
|
|
|
slotval1 := (QAudioDecoder__State)(newState)
|
|
|
|
|
|
|
|
gofunc(slotval1)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAudioDecoderControl) FormatChanged(format *QAudioFormat) {
|
2025-02-01 13:45:16 +13:00
|
|
|
C.QAudioDecoderControl_formatChanged(this.h, format.cPointer())
|
2024-11-04 23:15:32 +13:00
|
|
|
}
|
|
|
|
func (this *QAudioDecoderControl) OnFormatChanged(slot func(format *QAudioFormat)) {
|
2025-02-01 13:45:16 +13:00
|
|
|
C.QAudioDecoderControl_connect_formatChanged(this.h, C.intptr_t(cgo.NewHandle(slot)))
|
2024-11-04 23:15:32 +13:00
|
|
|
}
|
|
|
|
|
2025-02-01 13:45:16 +13:00
|
|
|
//export miqt_exec_callback_QAudioDecoderControl_formatChanged
|
|
|
|
func miqt_exec_callback_QAudioDecoderControl_formatChanged(cb C.intptr_t, format *C.QAudioFormat) {
|
2024-11-04 23:15:32 +13:00
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(format *QAudioFormat))
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
|
|
|
}
|
|
|
|
|
|
|
|
// Convert all CABI parameters to Go parameters
|
2024-12-07 15:02:06 +13:00
|
|
|
slotval1 := newQAudioFormat(format)
|
2024-11-04 23:15:32 +13:00
|
|
|
|
|
|
|
gofunc(slotval1)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAudioDecoderControl) SourceChanged() {
|
2025-02-01 13:45:16 +13:00
|
|
|
C.QAudioDecoderControl_sourceChanged(this.h)
|
2024-11-04 23:15:32 +13:00
|
|
|
}
|
|
|
|
func (this *QAudioDecoderControl) OnSourceChanged(slot func()) {
|
2025-02-01 13:45:16 +13:00
|
|
|
C.QAudioDecoderControl_connect_sourceChanged(this.h, C.intptr_t(cgo.NewHandle(slot)))
|
2024-11-04 23:15:32 +13:00
|
|
|
}
|
|
|
|
|
2025-02-01 13:45:16 +13:00
|
|
|
//export miqt_exec_callback_QAudioDecoderControl_sourceChanged
|
|
|
|
func miqt_exec_callback_QAudioDecoderControl_sourceChanged(cb C.intptr_t) {
|
2024-11-04 23:15:32 +13:00
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func())
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
|
|
|
}
|
|
|
|
|
|
|
|
gofunc()
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAudioDecoderControl) Error(error int, errorString string) {
|
|
|
|
errorString_ms := C.struct_miqt_string{}
|
|
|
|
errorString_ms.data = C.CString(errorString)
|
|
|
|
errorString_ms.len = C.size_t(len(errorString))
|
|
|
|
defer C.free(unsafe.Pointer(errorString_ms.data))
|
2025-02-01 13:45:16 +13:00
|
|
|
C.QAudioDecoderControl_error(this.h, (C.int)(error), errorString_ms)
|
2024-11-04 23:15:32 +13:00
|
|
|
}
|
|
|
|
func (this *QAudioDecoderControl) OnError(slot func(error int, errorString string)) {
|
2025-02-01 13:45:16 +13:00
|
|
|
C.QAudioDecoderControl_connect_error(this.h, C.intptr_t(cgo.NewHandle(slot)))
|
2024-11-04 23:15:32 +13:00
|
|
|
}
|
|
|
|
|
2025-02-01 13:45:16 +13:00
|
|
|
//export miqt_exec_callback_QAudioDecoderControl_error
|
|
|
|
func miqt_exec_callback_QAudioDecoderControl_error(cb C.intptr_t, error C.int, errorString C.struct_miqt_string) {
|
2024-11-04 23:15:32 +13:00
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(error int, errorString string))
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
|
|
|
}
|
|
|
|
|
|
|
|
// Convert all CABI parameters to Go parameters
|
|
|
|
slotval1 := (int)(error)
|
|
|
|
|
|
|
|
var errorString_ms C.struct_miqt_string = errorString
|
|
|
|
errorString_ret := C.GoStringN(errorString_ms.data, C.int(int64(errorString_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(errorString_ms.data))
|
|
|
|
slotval2 := errorString_ret
|
|
|
|
|
|
|
|
gofunc(slotval1, slotval2)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAudioDecoderControl) BufferReady() {
|
2025-02-01 13:45:16 +13:00
|
|
|
C.QAudioDecoderControl_bufferReady(this.h)
|
2024-11-04 23:15:32 +13:00
|
|
|
}
|
|
|
|
func (this *QAudioDecoderControl) OnBufferReady(slot func()) {
|
2025-02-01 13:45:16 +13:00
|
|
|
C.QAudioDecoderControl_connect_bufferReady(this.h, C.intptr_t(cgo.NewHandle(slot)))
|
2024-11-04 23:15:32 +13:00
|
|
|
}
|
|
|
|
|
2025-02-01 13:45:16 +13:00
|
|
|
//export miqt_exec_callback_QAudioDecoderControl_bufferReady
|
|
|
|
func miqt_exec_callback_QAudioDecoderControl_bufferReady(cb C.intptr_t) {
|
2024-11-04 23:15:32 +13:00
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func())
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
|
|
|
}
|
|
|
|
|
|
|
|
gofunc()
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAudioDecoderControl) BufferAvailableChanged(available bool) {
|
2025-02-01 13:45:16 +13:00
|
|
|
C.QAudioDecoderControl_bufferAvailableChanged(this.h, (C.bool)(available))
|
2024-11-04 23:15:32 +13:00
|
|
|
}
|
|
|
|
func (this *QAudioDecoderControl) OnBufferAvailableChanged(slot func(available bool)) {
|
2025-02-01 13:45:16 +13:00
|
|
|
C.QAudioDecoderControl_connect_bufferAvailableChanged(this.h, C.intptr_t(cgo.NewHandle(slot)))
|
2024-11-04 23:15:32 +13:00
|
|
|
}
|
|
|
|
|
2025-02-01 13:45:16 +13:00
|
|
|
//export miqt_exec_callback_QAudioDecoderControl_bufferAvailableChanged
|
|
|
|
func miqt_exec_callback_QAudioDecoderControl_bufferAvailableChanged(cb C.intptr_t, available C.bool) {
|
2024-11-04 23:15:32 +13:00
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(available bool))
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
|
|
|
}
|
|
|
|
|
|
|
|
// Convert all CABI parameters to Go parameters
|
|
|
|
slotval1 := (bool)(available)
|
|
|
|
|
|
|
|
gofunc(slotval1)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAudioDecoderControl) Finished() {
|
2025-02-01 13:45:16 +13:00
|
|
|
C.QAudioDecoderControl_finished(this.h)
|
2024-11-04 23:15:32 +13:00
|
|
|
}
|
|
|
|
func (this *QAudioDecoderControl) OnFinished(slot func()) {
|
2025-02-01 13:45:16 +13:00
|
|
|
C.QAudioDecoderControl_connect_finished(this.h, C.intptr_t(cgo.NewHandle(slot)))
|
2024-11-04 23:15:32 +13:00
|
|
|
}
|
|
|
|
|
2025-02-01 13:45:16 +13:00
|
|
|
//export miqt_exec_callback_QAudioDecoderControl_finished
|
|
|
|
func miqt_exec_callback_QAudioDecoderControl_finished(cb C.intptr_t) {
|
2024-11-04 23:15:32 +13:00
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func())
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
|
|
|
}
|
|
|
|
|
|
|
|
gofunc()
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAudioDecoderControl) PositionChanged(position int64) {
|
2025-02-01 13:45:16 +13:00
|
|
|
C.QAudioDecoderControl_positionChanged(this.h, (C.longlong)(position))
|
2024-11-04 23:15:32 +13:00
|
|
|
}
|
|
|
|
func (this *QAudioDecoderControl) OnPositionChanged(slot func(position int64)) {
|
2025-02-01 13:45:16 +13:00
|
|
|
C.QAudioDecoderControl_connect_positionChanged(this.h, C.intptr_t(cgo.NewHandle(slot)))
|
2024-11-04 23:15:32 +13:00
|
|
|
}
|
|
|
|
|
2025-02-01 13:45:16 +13:00
|
|
|
//export miqt_exec_callback_QAudioDecoderControl_positionChanged
|
|
|
|
func miqt_exec_callback_QAudioDecoderControl_positionChanged(cb C.intptr_t, position C.longlong) {
|
2024-11-04 23:15:32 +13:00
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(position int64))
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
|
|
|
}
|
|
|
|
|
|
|
|
// Convert all CABI parameters to Go parameters
|
|
|
|
slotval1 := (int64)(position)
|
|
|
|
|
|
|
|
gofunc(slotval1)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAudioDecoderControl) DurationChanged(duration int64) {
|
2025-02-01 13:45:16 +13:00
|
|
|
C.QAudioDecoderControl_durationChanged(this.h, (C.longlong)(duration))
|
2024-11-04 23:15:32 +13:00
|
|
|
}
|
|
|
|
func (this *QAudioDecoderControl) OnDurationChanged(slot func(duration int64)) {
|
2025-02-01 13:45:16 +13:00
|
|
|
C.QAudioDecoderControl_connect_durationChanged(this.h, C.intptr_t(cgo.NewHandle(slot)))
|
2024-11-04 23:15:32 +13:00
|
|
|
}
|
|
|
|
|
2025-02-01 13:45:16 +13:00
|
|
|
//export miqt_exec_callback_QAudioDecoderControl_durationChanged
|
|
|
|
func miqt_exec_callback_QAudioDecoderControl_durationChanged(cb C.intptr_t, duration C.longlong) {
|
2024-11-04 23:15:32 +13:00
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(duration int64))
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
|
|
|
}
|
|
|
|
|
|
|
|
// Convert all CABI parameters to Go parameters
|
|
|
|
slotval1 := (int64)(duration)
|
|
|
|
|
|
|
|
gofunc(slotval1)
|
|
|
|
}
|
|
|
|
|
|
|
|
func QAudioDecoderControl_Tr2(s string, c string) string {
|
|
|
|
s_Cstring := C.CString(s)
|
|
|
|
defer C.free(unsafe.Pointer(s_Cstring))
|
|
|
|
c_Cstring := C.CString(c)
|
|
|
|
defer C.free(unsafe.Pointer(c_Cstring))
|
2025-02-01 13:45:16 +13:00
|
|
|
var _ms C.struct_miqt_string = C.QAudioDecoderControl_tr2(s_Cstring, c_Cstring)
|
2024-11-04 23:15:32 +13:00
|
|
|
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms.data))
|
|
|
|
return _ret
|
|
|
|
}
|
|
|
|
|
|
|
|
func QAudioDecoderControl_Tr3(s string, c string, n int) string {
|
|
|
|
s_Cstring := C.CString(s)
|
|
|
|
defer C.free(unsafe.Pointer(s_Cstring))
|
|
|
|
c_Cstring := C.CString(c)
|
|
|
|
defer C.free(unsafe.Pointer(c_Cstring))
|
2025-02-01 13:45:16 +13:00
|
|
|
var _ms C.struct_miqt_string = C.QAudioDecoderControl_tr3(s_Cstring, c_Cstring, (C.int)(n))
|
2024-11-04 23:15:32 +13:00
|
|
|
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms.data))
|
|
|
|
return _ret
|
|
|
|
}
|
|
|
|
|
|
|
|
func QAudioDecoderControl_TrUtf82(s string, c string) string {
|
|
|
|
s_Cstring := C.CString(s)
|
|
|
|
defer C.free(unsafe.Pointer(s_Cstring))
|
|
|
|
c_Cstring := C.CString(c)
|
|
|
|
defer C.free(unsafe.Pointer(c_Cstring))
|
2025-02-01 13:45:16 +13:00
|
|
|
var _ms C.struct_miqt_string = C.QAudioDecoderControl_trUtf82(s_Cstring, c_Cstring)
|
2024-11-04 23:15:32 +13:00
|
|
|
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms.data))
|
|
|
|
return _ret
|
|
|
|
}
|
|
|
|
|
|
|
|
func QAudioDecoderControl_TrUtf83(s string, c string, n int) string {
|
|
|
|
s_Cstring := C.CString(s)
|
|
|
|
defer C.free(unsafe.Pointer(s_Cstring))
|
|
|
|
c_Cstring := C.CString(c)
|
|
|
|
defer C.free(unsafe.Pointer(c_Cstring))
|
2025-02-01 13:45:16 +13:00
|
|
|
var _ms C.struct_miqt_string = C.QAudioDecoderControl_trUtf83(s_Cstring, c_Cstring, (C.int)(n))
|
2024-11-04 23:15:32 +13:00
|
|
|
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms.data))
|
|
|
|
return _ret
|
|
|
|
}
|
|
|
|
|
|
|
|
// Delete this object from C++ memory.
|
|
|
|
func (this *QAudioDecoderControl) Delete() {
|
2025-02-01 13:45:16 +13:00
|
|
|
C.QAudioDecoderControl_delete(this.h)
|
2024-11-04 23:15:32 +13:00
|
|
|
}
|
|
|
|
|
|
|
|
// GoGC adds a Go Finalizer to this pointer, so that it will be deleted
|
|
|
|
// from C++ memory once it is unreachable from Go memory.
|
|
|
|
func (this *QAudioDecoderControl) GoGC() {
|
|
|
|
runtime.SetFinalizer(this, func(this *QAudioDecoderControl) {
|
|
|
|
this.Delete()
|
|
|
|
runtime.KeepAlive(this.h)
|
|
|
|
})
|
|
|
|
}
|