miqt/qt6/multimedia/gen_qaudiobuffer.cpp

91 lines
2.4 KiB
C++
Raw Permalink Normal View History

2024-11-04 10:15:32 +00:00
#include <QAudioBuffer>
#include <QAudioFormat>
#include <QByteArray>
#include <qaudiobuffer.h>
#include "gen_qaudiobuffer.h"
#ifndef _Bool
#define _Bool bool
#endif
2024-11-04 10:15:32 +00:00
#include "_cgo_export.h"
2024-12-07 04:15:57 +00:00
QAudioBuffer* QAudioBuffer_new() {
return new QAudioBuffer();
2024-11-04 10:15:32 +00:00
}
2024-12-07 04:15:57 +00:00
QAudioBuffer* QAudioBuffer_new2(QAudioBuffer* other) {
return new QAudioBuffer(*other);
2024-11-04 10:15:32 +00:00
}
2024-12-07 04:15:57 +00:00
QAudioBuffer* QAudioBuffer_new3(struct miqt_string data, QAudioFormat* format) {
2024-11-04 10:15:32 +00:00
QByteArray data_QByteArray(data.data, data.len);
2024-12-07 04:15:57 +00:00
return new QAudioBuffer(data_QByteArray, *format);
2024-11-04 10:15:32 +00:00
}
2024-12-07 04:15:57 +00:00
QAudioBuffer* QAudioBuffer_new4(int numFrames, QAudioFormat* format) {
return new QAudioBuffer(static_cast<int>(numFrames), *format);
2024-11-04 10:15:32 +00:00
}
2024-12-07 04:15:57 +00:00
QAudioBuffer* QAudioBuffer_new5(struct miqt_string data, QAudioFormat* format, long long startTime) {
2024-11-04 10:15:32 +00:00
QByteArray data_QByteArray(data.data, data.len);
2024-12-07 04:15:57 +00:00
return new QAudioBuffer(data_QByteArray, *format, static_cast<qint64>(startTime));
2024-11-04 10:15:32 +00:00
}
2024-12-07 04:15:57 +00:00
QAudioBuffer* QAudioBuffer_new6(int numFrames, QAudioFormat* format, long long startTime) {
return new QAudioBuffer(static_cast<int>(numFrames), *format, static_cast<qint64>(startTime));
2024-11-04 10:15:32 +00:00
}
void QAudioBuffer_OperatorAssign(QAudioBuffer* self, QAudioBuffer* other) {
self->operator=(*other);
}
void QAudioBuffer_Swap(QAudioBuffer* self, QAudioBuffer* other) {
self->swap(*other);
}
bool QAudioBuffer_IsValid(const QAudioBuffer* self) {
return self->isValid();
}
void QAudioBuffer_Detach(QAudioBuffer* self) {
self->detach();
}
QAudioFormat* QAudioBuffer_Format(const QAudioBuffer* self) {
return new QAudioFormat(self->format());
}
ptrdiff_t QAudioBuffer_FrameCount(const QAudioBuffer* self) {
qsizetype _ret = self->frameCount();
return static_cast<ptrdiff_t>(_ret);
}
ptrdiff_t QAudioBuffer_SampleCount(const QAudioBuffer* self) {
qsizetype _ret = self->sampleCount();
return static_cast<ptrdiff_t>(_ret);
}
ptrdiff_t QAudioBuffer_ByteCount(const QAudioBuffer* self) {
qsizetype _ret = self->byteCount();
return static_cast<ptrdiff_t>(_ret);
}
long long QAudioBuffer_Duration(const QAudioBuffer* self) {
qint64 _ret = self->duration();
return static_cast<long long>(_ret);
}
long long QAudioBuffer_StartTime(const QAudioBuffer* self) {
qint64 _ret = self->startTime();
return static_cast<long long>(_ret);
}
2024-11-19 06:29:06 +00:00
void QAudioBuffer_Delete(QAudioBuffer* self, bool isSubclass) {
if (isSubclass) {
delete dynamic_cast<QAudioBuffer*>( self );
} else {
delete self;
}
2024-11-04 10:15:32 +00:00
}