#include #include #include "gen_qaudioformat.h" #include "_cgo_export.h" void QAudioFormat_new(QAudioFormat** outptr_QAudioFormat) { QAudioFormat* ret = new QAudioFormat(); *outptr_QAudioFormat = ret; } void QAudioFormat_new2(QAudioFormat* param1, QAudioFormat** outptr_QAudioFormat) { QAudioFormat* ret = new QAudioFormat(*param1); *outptr_QAudioFormat = ret; } bool QAudioFormat_IsValid(const QAudioFormat* self) { return self->isValid(); } void QAudioFormat_SetSampleRate(QAudioFormat* self, int sampleRate) { self->setSampleRate(static_cast(sampleRate)); } int QAudioFormat_SampleRate(const QAudioFormat* self) { return self->sampleRate(); } void QAudioFormat_SetChannelConfig(QAudioFormat* self, uint32_t config) { self->setChannelConfig(static_cast(config)); } uint32_t QAudioFormat_ChannelConfig(const QAudioFormat* self) { QAudioFormat::ChannelConfig _ret = self->channelConfig(); return static_cast(_ret); } void QAudioFormat_SetChannelCount(QAudioFormat* self, int channelCount) { self->setChannelCount(static_cast(channelCount)); } int QAudioFormat_ChannelCount(const QAudioFormat* self) { return self->channelCount(); } int QAudioFormat_ChannelOffset(const QAudioFormat* self, int channel) { return self->channelOffset(static_cast(channel)); } void QAudioFormat_SetSampleFormat(QAudioFormat* self, uint16_t f) { self->setSampleFormat(static_cast(f)); } uint16_t QAudioFormat_SampleFormat(const QAudioFormat* self) { QAudioFormat::SampleFormat _ret = self->sampleFormat(); return static_cast(_ret); } int QAudioFormat_BytesForDuration(const QAudioFormat* self, long long microseconds) { qint32 _ret = self->bytesForDuration(static_cast(microseconds)); return static_cast(_ret); } long long QAudioFormat_DurationForBytes(const QAudioFormat* self, int byteCount) { qint64 _ret = self->durationForBytes(static_cast(byteCount)); return static_cast(_ret); } int QAudioFormat_BytesForFrames(const QAudioFormat* self, int frameCount) { qint32 _ret = self->bytesForFrames(static_cast(frameCount)); return static_cast(_ret); } int QAudioFormat_FramesForBytes(const QAudioFormat* self, int byteCount) { qint32 _ret = self->framesForBytes(static_cast(byteCount)); return static_cast(_ret); } int QAudioFormat_FramesForDuration(const QAudioFormat* self, long long microseconds) { qint32 _ret = self->framesForDuration(static_cast(microseconds)); return static_cast(_ret); } long long QAudioFormat_DurationForFrames(const QAudioFormat* self, int frameCount) { qint64 _ret = self->durationForFrames(static_cast(frameCount)); return static_cast(_ret); } int QAudioFormat_BytesPerFrame(const QAudioFormat* self) { return self->bytesPerFrame(); } int QAudioFormat_BytesPerSample(const QAudioFormat* self) { return self->bytesPerSample(); } float QAudioFormat_NormalizedSampleValue(const QAudioFormat* self, const void* sample) { return self->normalizedSampleValue(sample); } uint32_t QAudioFormat_DefaultChannelConfigForChannelCount(int channelCount) { QAudioFormat::ChannelConfig _ret = QAudioFormat::defaultChannelConfigForChannelCount(static_cast(channelCount)); return static_cast(_ret); } void QAudioFormat_Delete(QAudioFormat* self, bool isSubclass) { if (isSubclass) { delete dynamic_cast( self ); } else { delete self; } }