2024-11-04 23:15:32 +13:00
|
|
|
#include <QAudioBuffer>
|
|
|
|
#include <QAudioDecoderControl>
|
|
|
|
#include <QAudioFormat>
|
|
|
|
#include <QIODevice>
|
2024-11-19 19:29:06 +13:00
|
|
|
#include <QMediaControl>
|
2024-11-04 23:15:32 +13:00
|
|
|
#include <QMetaObject>
|
2024-11-19 19:29:06 +13:00
|
|
|
#include <QObject>
|
2024-11-04 23:15:32 +13:00
|
|
|
#include <QString>
|
|
|
|
#include <QByteArray>
|
|
|
|
#include <cstring>
|
|
|
|
#include <qaudiodecodercontrol.h>
|
|
|
|
#include "gen_qaudiodecodercontrol.h"
|
2024-12-11 19:55:47 +13:00
|
|
|
|
2025-01-07 11:30:33 +01:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2025-02-01 13:45:16 +13:00
|
|
|
void miqt_exec_callback_QAudioDecoderControl_stateChanged(intptr_t, int);
|
|
|
|
void miqt_exec_callback_QAudioDecoderControl_formatChanged(intptr_t, QAudioFormat*);
|
|
|
|
void miqt_exec_callback_QAudioDecoderControl_sourceChanged(intptr_t);
|
|
|
|
void miqt_exec_callback_QAudioDecoderControl_error(intptr_t, int, struct miqt_string);
|
|
|
|
void miqt_exec_callback_QAudioDecoderControl_bufferReady(intptr_t);
|
|
|
|
void miqt_exec_callback_QAudioDecoderControl_bufferAvailableChanged(intptr_t, bool);
|
|
|
|
void miqt_exec_callback_QAudioDecoderControl_finished(intptr_t);
|
|
|
|
void miqt_exec_callback_QAudioDecoderControl_positionChanged(intptr_t, long long);
|
|
|
|
void miqt_exec_callback_QAudioDecoderControl_durationChanged(intptr_t, long long);
|
2025-01-07 11:30:33 +01:00
|
|
|
#ifdef __cplusplus
|
|
|
|
} /* extern C */
|
2024-12-11 19:55:47 +13:00
|
|
|
#endif
|
2024-11-04 23:15:32 +13:00
|
|
|
|
2024-12-07 17:15:57 +13:00
|
|
|
void QAudioDecoderControl_virtbase(QAudioDecoderControl* src, QMediaControl** outptr_QMediaControl) {
|
|
|
|
*outptr_QMediaControl = static_cast<QMediaControl*>(src);
|
|
|
|
}
|
|
|
|
|
2025-02-01 13:45:16 +13:00
|
|
|
QMetaObject* QAudioDecoderControl_metaObject(const QAudioDecoderControl* self) {
|
2024-11-04 23:15:32 +13:00
|
|
|
return (QMetaObject*) self->metaObject();
|
|
|
|
}
|
|
|
|
|
2025-02-01 13:45:16 +13:00
|
|
|
void* QAudioDecoderControl_metacast(QAudioDecoderControl* self, const char* param1) {
|
2024-11-04 23:15:32 +13:00
|
|
|
return self->qt_metacast(param1);
|
|
|
|
}
|
|
|
|
|
2025-02-01 13:45:16 +13:00
|
|
|
struct miqt_string QAudioDecoderControl_tr(const char* s) {
|
2024-11-04 23:15:32 +13:00
|
|
|
QString _ret = QAudioDecoderControl::tr(s);
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
struct miqt_string _ms;
|
|
|
|
_ms.len = _b.length();
|
|
|
|
_ms.data = static_cast<char*>(malloc(_ms.len));
|
|
|
|
memcpy(_ms.data, _b.data(), _ms.len);
|
|
|
|
return _ms;
|
|
|
|
}
|
|
|
|
|
2025-02-01 13:45:16 +13:00
|
|
|
struct miqt_string QAudioDecoderControl_trUtf8(const char* s) {
|
2024-11-04 23:15:32 +13:00
|
|
|
QString _ret = QAudioDecoderControl::trUtf8(s);
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
struct miqt_string _ms;
|
|
|
|
_ms.len = _b.length();
|
|
|
|
_ms.data = static_cast<char*>(malloc(_ms.len));
|
|
|
|
memcpy(_ms.data, _b.data(), _ms.len);
|
|
|
|
return _ms;
|
|
|
|
}
|
|
|
|
|
2025-02-01 13:45:16 +13:00
|
|
|
int QAudioDecoderControl_state(const QAudioDecoderControl* self) {
|
2024-11-04 23:15:32 +13:00
|
|
|
QAudioDecoder::State _ret = self->state();
|
|
|
|
return static_cast<int>(_ret);
|
|
|
|
}
|
|
|
|
|
2025-02-01 13:45:16 +13:00
|
|
|
struct miqt_string QAudioDecoderControl_sourceFilename(const QAudioDecoderControl* self) {
|
2024-11-04 23:15:32 +13:00
|
|
|
QString _ret = self->sourceFilename();
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
struct miqt_string _ms;
|
|
|
|
_ms.len = _b.length();
|
|
|
|
_ms.data = static_cast<char*>(malloc(_ms.len));
|
|
|
|
memcpy(_ms.data, _b.data(), _ms.len);
|
|
|
|
return _ms;
|
|
|
|
}
|
|
|
|
|
2025-02-01 13:45:16 +13:00
|
|
|
void QAudioDecoderControl_setSourceFilename(QAudioDecoderControl* self, struct miqt_string fileName) {
|
2024-11-04 23:15:32 +13:00
|
|
|
QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len);
|
|
|
|
self->setSourceFilename(fileName_QString);
|
|
|
|
}
|
|
|
|
|
2025-02-01 13:45:16 +13:00
|
|
|
QIODevice* QAudioDecoderControl_sourceDevice(const QAudioDecoderControl* self) {
|
2024-11-04 23:15:32 +13:00
|
|
|
return self->sourceDevice();
|
|
|
|
}
|
|
|
|
|
2025-02-01 13:45:16 +13:00
|
|
|
void QAudioDecoderControl_setSourceDevice(QAudioDecoderControl* self, QIODevice* device) {
|
2024-11-04 23:15:32 +13:00
|
|
|
self->setSourceDevice(device);
|
|
|
|
}
|
|
|
|
|
2025-02-01 13:45:16 +13:00
|
|
|
void QAudioDecoderControl_start(QAudioDecoderControl* self) {
|
2024-11-04 23:15:32 +13:00
|
|
|
self->start();
|
|
|
|
}
|
|
|
|
|
2025-02-01 13:45:16 +13:00
|
|
|
void QAudioDecoderControl_stop(QAudioDecoderControl* self) {
|
2024-11-04 23:15:32 +13:00
|
|
|
self->stop();
|
|
|
|
}
|
|
|
|
|
2025-02-01 13:45:16 +13:00
|
|
|
QAudioFormat* QAudioDecoderControl_audioFormat(const QAudioDecoderControl* self) {
|
2024-11-04 23:15:32 +13:00
|
|
|
return new QAudioFormat(self->audioFormat());
|
|
|
|
}
|
|
|
|
|
2025-02-01 13:45:16 +13:00
|
|
|
void QAudioDecoderControl_setAudioFormat(QAudioDecoderControl* self, QAudioFormat* format) {
|
2024-11-04 23:15:32 +13:00
|
|
|
self->setAudioFormat(*format);
|
|
|
|
}
|
|
|
|
|
2025-02-01 13:45:16 +13:00
|
|
|
QAudioBuffer* QAudioDecoderControl_read(QAudioDecoderControl* self) {
|
2024-11-04 23:15:32 +13:00
|
|
|
return new QAudioBuffer(self->read());
|
|
|
|
}
|
|
|
|
|
2025-02-01 13:45:16 +13:00
|
|
|
bool QAudioDecoderControl_bufferAvailable(const QAudioDecoderControl* self) {
|
2024-11-04 23:15:32 +13:00
|
|
|
return self->bufferAvailable();
|
|
|
|
}
|
|
|
|
|
2025-02-01 13:45:16 +13:00
|
|
|
long long QAudioDecoderControl_position(const QAudioDecoderControl* self) {
|
2024-11-04 23:15:32 +13:00
|
|
|
qint64 _ret = self->position();
|
|
|
|
return static_cast<long long>(_ret);
|
|
|
|
}
|
|
|
|
|
2025-02-01 13:45:16 +13:00
|
|
|
long long QAudioDecoderControl_duration(const QAudioDecoderControl* self) {
|
2024-11-04 23:15:32 +13:00
|
|
|
qint64 _ret = self->duration();
|
|
|
|
return static_cast<long long>(_ret);
|
|
|
|
}
|
|
|
|
|
2025-02-01 13:45:16 +13:00
|
|
|
void QAudioDecoderControl_stateChanged(QAudioDecoderControl* self, int newState) {
|
2024-11-04 23:15:32 +13:00
|
|
|
self->stateChanged(static_cast<QAudioDecoder::State>(newState));
|
|
|
|
}
|
|
|
|
|
2025-02-01 13:45:16 +13:00
|
|
|
void QAudioDecoderControl_connect_stateChanged(QAudioDecoderControl* self, intptr_t slot) {
|
2024-11-04 23:15:32 +13:00
|
|
|
QAudioDecoderControl::connect(self, static_cast<void (QAudioDecoderControl::*)(QAudioDecoder::State)>(&QAudioDecoderControl::stateChanged), self, [=](QAudioDecoder::State newState) {
|
|
|
|
QAudioDecoder::State newState_ret = newState;
|
|
|
|
int sigval1 = static_cast<int>(newState_ret);
|
2025-02-01 13:45:16 +13:00
|
|
|
miqt_exec_callback_QAudioDecoderControl_stateChanged(slot, sigval1);
|
2024-11-04 23:15:32 +13:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2025-02-01 13:45:16 +13:00
|
|
|
void QAudioDecoderControl_formatChanged(QAudioDecoderControl* self, QAudioFormat* format) {
|
2024-11-04 23:15:32 +13:00
|
|
|
self->formatChanged(*format);
|
|
|
|
}
|
|
|
|
|
2025-02-01 13:45:16 +13:00
|
|
|
void QAudioDecoderControl_connect_formatChanged(QAudioDecoderControl* self, intptr_t slot) {
|
2024-11-04 23:15:32 +13:00
|
|
|
QAudioDecoderControl::connect(self, static_cast<void (QAudioDecoderControl::*)(const QAudioFormat&)>(&QAudioDecoderControl::formatChanged), self, [=](const QAudioFormat& format) {
|
|
|
|
const QAudioFormat& format_ret = format;
|
|
|
|
// Cast returned reference into pointer
|
|
|
|
QAudioFormat* sigval1 = const_cast<QAudioFormat*>(&format_ret);
|
2025-02-01 13:45:16 +13:00
|
|
|
miqt_exec_callback_QAudioDecoderControl_formatChanged(slot, sigval1);
|
2024-11-04 23:15:32 +13:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2025-02-01 13:45:16 +13:00
|
|
|
void QAudioDecoderControl_sourceChanged(QAudioDecoderControl* self) {
|
2024-11-04 23:15:32 +13:00
|
|
|
self->sourceChanged();
|
|
|
|
}
|
|
|
|
|
2025-02-01 13:45:16 +13:00
|
|
|
void QAudioDecoderControl_connect_sourceChanged(QAudioDecoderControl* self, intptr_t slot) {
|
2024-11-04 23:15:32 +13:00
|
|
|
QAudioDecoderControl::connect(self, static_cast<void (QAudioDecoderControl::*)()>(&QAudioDecoderControl::sourceChanged), self, [=]() {
|
2025-02-01 13:45:16 +13:00
|
|
|
miqt_exec_callback_QAudioDecoderControl_sourceChanged(slot);
|
2024-11-04 23:15:32 +13:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2025-02-01 13:45:16 +13:00
|
|
|
void QAudioDecoderControl_error(QAudioDecoderControl* self, int error, struct miqt_string errorString) {
|
2024-11-04 23:15:32 +13:00
|
|
|
QString errorString_QString = QString::fromUtf8(errorString.data, errorString.len);
|
|
|
|
self->error(static_cast<int>(error), errorString_QString);
|
|
|
|
}
|
|
|
|
|
2025-02-01 13:45:16 +13:00
|
|
|
void QAudioDecoderControl_connect_error(QAudioDecoderControl* self, intptr_t slot) {
|
2024-11-04 23:15:32 +13:00
|
|
|
QAudioDecoderControl::connect(self, static_cast<void (QAudioDecoderControl::*)(int, const QString&)>(&QAudioDecoderControl::error), self, [=](int error, const QString& errorString) {
|
|
|
|
int sigval1 = error;
|
|
|
|
const QString errorString_ret = errorString;
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray errorString_b = errorString_ret.toUtf8();
|
|
|
|
struct miqt_string errorString_ms;
|
|
|
|
errorString_ms.len = errorString_b.length();
|
|
|
|
errorString_ms.data = static_cast<char*>(malloc(errorString_ms.len));
|
|
|
|
memcpy(errorString_ms.data, errorString_b.data(), errorString_ms.len);
|
|
|
|
struct miqt_string sigval2 = errorString_ms;
|
2025-02-01 13:45:16 +13:00
|
|
|
miqt_exec_callback_QAudioDecoderControl_error(slot, sigval1, sigval2);
|
2024-11-04 23:15:32 +13:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2025-02-01 13:45:16 +13:00
|
|
|
void QAudioDecoderControl_bufferReady(QAudioDecoderControl* self) {
|
2024-11-04 23:15:32 +13:00
|
|
|
self->bufferReady();
|
|
|
|
}
|
|
|
|
|
2025-02-01 13:45:16 +13:00
|
|
|
void QAudioDecoderControl_connect_bufferReady(QAudioDecoderControl* self, intptr_t slot) {
|
2024-11-04 23:15:32 +13:00
|
|
|
QAudioDecoderControl::connect(self, static_cast<void (QAudioDecoderControl::*)()>(&QAudioDecoderControl::bufferReady), self, [=]() {
|
2025-02-01 13:45:16 +13:00
|
|
|
miqt_exec_callback_QAudioDecoderControl_bufferReady(slot);
|
2024-11-04 23:15:32 +13:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2025-02-01 13:45:16 +13:00
|
|
|
void QAudioDecoderControl_bufferAvailableChanged(QAudioDecoderControl* self, bool available) {
|
2024-11-04 23:15:32 +13:00
|
|
|
self->bufferAvailableChanged(available);
|
|
|
|
}
|
|
|
|
|
2025-02-01 13:45:16 +13:00
|
|
|
void QAudioDecoderControl_connect_bufferAvailableChanged(QAudioDecoderControl* self, intptr_t slot) {
|
2024-11-04 23:15:32 +13:00
|
|
|
QAudioDecoderControl::connect(self, static_cast<void (QAudioDecoderControl::*)(bool)>(&QAudioDecoderControl::bufferAvailableChanged), self, [=](bool available) {
|
|
|
|
bool sigval1 = available;
|
2025-02-01 13:45:16 +13:00
|
|
|
miqt_exec_callback_QAudioDecoderControl_bufferAvailableChanged(slot, sigval1);
|
2024-11-04 23:15:32 +13:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2025-02-01 13:45:16 +13:00
|
|
|
void QAudioDecoderControl_finished(QAudioDecoderControl* self) {
|
2024-11-04 23:15:32 +13:00
|
|
|
self->finished();
|
|
|
|
}
|
|
|
|
|
2025-02-01 13:45:16 +13:00
|
|
|
void QAudioDecoderControl_connect_finished(QAudioDecoderControl* self, intptr_t slot) {
|
2024-11-04 23:15:32 +13:00
|
|
|
QAudioDecoderControl::connect(self, static_cast<void (QAudioDecoderControl::*)()>(&QAudioDecoderControl::finished), self, [=]() {
|
2025-02-01 13:45:16 +13:00
|
|
|
miqt_exec_callback_QAudioDecoderControl_finished(slot);
|
2024-11-04 23:15:32 +13:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2025-02-01 13:45:16 +13:00
|
|
|
void QAudioDecoderControl_positionChanged(QAudioDecoderControl* self, long long position) {
|
2024-11-04 23:15:32 +13:00
|
|
|
self->positionChanged(static_cast<qint64>(position));
|
|
|
|
}
|
|
|
|
|
2025-02-01 13:45:16 +13:00
|
|
|
void QAudioDecoderControl_connect_positionChanged(QAudioDecoderControl* self, intptr_t slot) {
|
2024-11-04 23:15:32 +13:00
|
|
|
QAudioDecoderControl::connect(self, static_cast<void (QAudioDecoderControl::*)(qint64)>(&QAudioDecoderControl::positionChanged), self, [=](qint64 position) {
|
|
|
|
qint64 position_ret = position;
|
|
|
|
long long sigval1 = static_cast<long long>(position_ret);
|
2025-02-01 13:45:16 +13:00
|
|
|
miqt_exec_callback_QAudioDecoderControl_positionChanged(slot, sigval1);
|
2024-11-04 23:15:32 +13:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2025-02-01 13:45:16 +13:00
|
|
|
void QAudioDecoderControl_durationChanged(QAudioDecoderControl* self, long long duration) {
|
2024-11-04 23:15:32 +13:00
|
|
|
self->durationChanged(static_cast<qint64>(duration));
|
|
|
|
}
|
|
|
|
|
2025-02-01 13:45:16 +13:00
|
|
|
void QAudioDecoderControl_connect_durationChanged(QAudioDecoderControl* self, intptr_t slot) {
|
2024-11-04 23:15:32 +13:00
|
|
|
QAudioDecoderControl::connect(self, static_cast<void (QAudioDecoderControl::*)(qint64)>(&QAudioDecoderControl::durationChanged), self, [=](qint64 duration) {
|
|
|
|
qint64 duration_ret = duration;
|
|
|
|
long long sigval1 = static_cast<long long>(duration_ret);
|
2025-02-01 13:45:16 +13:00
|
|
|
miqt_exec_callback_QAudioDecoderControl_durationChanged(slot, sigval1);
|
2024-11-04 23:15:32 +13:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2025-02-01 13:45:16 +13:00
|
|
|
struct miqt_string QAudioDecoderControl_tr2(const char* s, const char* c) {
|
2024-11-04 23:15:32 +13:00
|
|
|
QString _ret = QAudioDecoderControl::tr(s, c);
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
struct miqt_string _ms;
|
|
|
|
_ms.len = _b.length();
|
|
|
|
_ms.data = static_cast<char*>(malloc(_ms.len));
|
|
|
|
memcpy(_ms.data, _b.data(), _ms.len);
|
|
|
|
return _ms;
|
|
|
|
}
|
|
|
|
|
2025-02-01 13:45:16 +13:00
|
|
|
struct miqt_string QAudioDecoderControl_tr3(const char* s, const char* c, int n) {
|
2024-11-04 23:15:32 +13:00
|
|
|
QString _ret = QAudioDecoderControl::tr(s, c, static_cast<int>(n));
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
struct miqt_string _ms;
|
|
|
|
_ms.len = _b.length();
|
|
|
|
_ms.data = static_cast<char*>(malloc(_ms.len));
|
|
|
|
memcpy(_ms.data, _b.data(), _ms.len);
|
|
|
|
return _ms;
|
|
|
|
}
|
|
|
|
|
2025-02-01 13:45:16 +13:00
|
|
|
struct miqt_string QAudioDecoderControl_trUtf82(const char* s, const char* c) {
|
2024-11-04 23:15:32 +13:00
|
|
|
QString _ret = QAudioDecoderControl::trUtf8(s, c);
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
struct miqt_string _ms;
|
|
|
|
_ms.len = _b.length();
|
|
|
|
_ms.data = static_cast<char*>(malloc(_ms.len));
|
|
|
|
memcpy(_ms.data, _b.data(), _ms.len);
|
|
|
|
return _ms;
|
|
|
|
}
|
|
|
|
|
2025-02-01 13:45:16 +13:00
|
|
|
struct miqt_string QAudioDecoderControl_trUtf83(const char* s, const char* c, int n) {
|
2024-11-04 23:15:32 +13:00
|
|
|
QString _ret = QAudioDecoderControl::trUtf8(s, c, static_cast<int>(n));
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
struct miqt_string _ms;
|
|
|
|
_ms.len = _b.length();
|
|
|
|
_ms.data = static_cast<char*>(malloc(_ms.len));
|
|
|
|
memcpy(_ms.data, _b.data(), _ms.len);
|
|
|
|
return _ms;
|
|
|
|
}
|
|
|
|
|
2025-02-01 13:45:16 +13:00
|
|
|
void QAudioDecoderControl_delete(QAudioDecoderControl* self) {
|
2025-01-18 17:42:41 +13:00
|
|
|
delete self;
|
2024-11-04 23:15:32 +13:00
|
|
|
}
|
|
|
|
|