/*
 * Interface wrapper code.
 *
 * Generated by SIP 6.6.2
 *
 * Copyright (c) 2022 Riverbank Computing Limited <info@riverbankcomputing.com>
 * 
 * This file is part of PyQt6.
 * 
 * This file may be used under the terms of the GNU General Public License
 * version 3.0 as published by the Free Software Foundation and appearing in
 * the file LICENSE included in the packaging of this file.  Please review the
 * following information to ensure the GNU General Public License version 3.0
 * requirements will be met: http://www.gnu.org/copyleft/gpl.html.
 * 
 * If you do not wish to use this file under the terms of the GPL version 3.0
 * then you may purchase a commercial license.  For more information contact
 * info@riverbankcomputing.com.
 * 
 * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
 * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 */

#include "sipAPIQtMultimedia.h"

#line 28 "/build/pyqt6/src/PyQt6-6.3.1/sip/QtMultimedia/qaudiosink.sip"
#include <qaudiosink.h>
#line 29 "/build/pyqt6/src/PyQt6-6.3.1/build/QtMultimedia/sipQtMultimediaQAudioSink.cpp"

#line 28 "/build/pyqt6/src/PyQt6-6.3.1/sip/QtMultimedia/qaudiodevice.sip"
#include <qaudiodevice.h>
#line 33 "/build/pyqt6/src/PyQt6-6.3.1/build/QtMultimedia/sipQtMultimediaQAudioSink.cpp"
#line 28 "/build/pyqt6/src/PyQt6-6.3.1/sip/QtMultimedia/qaudioformat.sip"
#include <qaudioformat.h>
#line 36 "/build/pyqt6/src/PyQt6-6.3.1/build/QtMultimedia/sipQtMultimediaQAudioSink.cpp"
#line 28 "/build/pyqt6/src/PyQt6-6.3.1/sip/QtCore/qobject.sip"
#include <qobject.h>
#line 39 "/build/pyqt6/src/PyQt6-6.3.1/build/QtMultimedia/sipQtMultimediaQAudioSink.cpp"
#line 28 "/build/pyqt6/src/PyQt6-6.3.1/sip/QtMultimedia/qaudio.sip"
#include <qaudio.h>
#line 42 "/build/pyqt6/src/PyQt6-6.3.1/build/QtMultimedia/sipQtMultimediaQAudioSink.cpp"
#line 26 "/build/pyqt6/src/PyQt6-6.3.1/sip/QtCore/qiodevice.sip"
#include <qiodevice.h>
#line 45 "/build/pyqt6/src/PyQt6-6.3.1/build/QtMultimedia/sipQtMultimediaQAudioSink.cpp"
#line 26 "/build/pyqt6/src/PyQt6-6.3.1/sip/QtCore/qobjectdefs.sip"
#include <qobjectdefs.h>
#line 151 "/build/pyqt6/src/PyQt6-6.3.1/sip/QtCore/qobjectdefs.sip"
#include <qobjectdefs.h>
#line 50 "/build/pyqt6/src/PyQt6-6.3.1/build/QtMultimedia/sipQtMultimediaQAudioSink.cpp"
#line 26 "/build/pyqt6/src/PyQt6-6.3.1/sip/QtCore/qmetaobject.sip"
#include <qmetaobject.h>
#line 53 "/build/pyqt6/src/PyQt6-6.3.1/build/QtMultimedia/sipQtMultimediaQAudioSink.cpp"
#line 26 "/build/pyqt6/src/PyQt6-6.3.1/sip/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 56 "/build/pyqt6/src/PyQt6-6.3.1/build/QtMultimedia/sipQtMultimediaQAudioSink.cpp"
#line 245 "/build/pyqt6/src/PyQt6-6.3.1/sip/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 59 "/build/pyqt6/src/PyQt6-6.3.1/build/QtMultimedia/sipQtMultimediaQAudioSink.cpp"
#line 232 "/build/pyqt6/src/PyQt6-6.3.1/sip/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 62 "/build/pyqt6/src/PyQt6-6.3.1/build/QtMultimedia/sipQtMultimediaQAudioSink.cpp"
#line 24 "/build/pyqt6/src/PyQt6-6.3.1/sip/QtCore/qstring.sip"
#include <qstring.h>
#line 65 "/build/pyqt6/src/PyQt6-6.3.1/build/QtMultimedia/sipQtMultimediaQAudioSink.cpp"
#line 26 "/build/pyqt6/src/PyQt6-6.3.1/sip/QtCore/qvariant.sip"
#include <qvariant.h>
#line 68 "/build/pyqt6/src/PyQt6-6.3.1/build/QtMultimedia/sipQtMultimediaQAudioSink.cpp"
#line 28 "/build/pyqt6/src/PyQt6-6.3.1/sip/QtCore/qpycore_qlist.sip"
#include <qlist.h>
#line 71 "/build/pyqt6/src/PyQt6-6.3.1/build/QtMultimedia/sipQtMultimediaQAudioSink.cpp"
#line 30 "/build/pyqt6/src/PyQt6-6.3.1/sip/QtCore/qbytearray.sip"
#include <qbytearray.h>
#line 74 "/build/pyqt6/src/PyQt6-6.3.1/build/QtMultimedia/sipQtMultimediaQAudioSink.cpp"
#line 135 "/build/pyqt6/src/PyQt6-6.3.1/sip/QtCore/qpycore_qlist.sip"
#include <qlist.h>
#line 77 "/build/pyqt6/src/PyQt6-6.3.1/build/QtMultimedia/sipQtMultimediaQAudioSink.cpp"
#line 26 "/build/pyqt6/src/PyQt6-6.3.1/sip/QtCore/qnamespace.sip"
#include <qnamespace.h>
#line 150 "/build/pyqt6/src/PyQt6-6.3.1/sip/QtCore/qtextstream.sip"
#include <qtextstream.h>
#line 82 "/build/pyqt6/src/PyQt6-6.3.1/build/QtMultimedia/sipQtMultimediaQAudioSink.cpp"
#line 26 "/build/pyqt6/src/PyQt6-6.3.1/sip/QtCore/qthread.sip"
#include <qthread.h>
#line 85 "/build/pyqt6/src/PyQt6-6.3.1/build/QtMultimedia/sipQtMultimediaQAudioSink.cpp"
#line 25 "/build/pyqt6/src/PyQt6-6.3.1/sip/QtCore/qflags.sip"
#include <qglobal.h>
#line 88 "/build/pyqt6/src/PyQt6-6.3.1/build/QtMultimedia/sipQtMultimediaQAudioSink.cpp"
#line 26 "/build/pyqt6/src/PyQt6-6.3.1/sip/QtCore/qregularexpression.sip"
#include <qregularexpression.h>
#line 91 "/build/pyqt6/src/PyQt6-6.3.1/build/QtMultimedia/sipQtMultimediaQAudioSink.cpp"
#line 26 "/build/pyqt6/src/PyQt6-6.3.1/sip/QtCore/qobjectdefs.sip"
#include <qobjectdefs.h>
#line 94 "/build/pyqt6/src/PyQt6-6.3.1/build/QtMultimedia/sipQtMultimediaQAudioSink.cpp"


class sipQAudioSink : public  ::QAudioSink
{
public:
    sipQAudioSink(const  ::QAudioDevice&,const  ::QAudioFormat&, ::QObject*);
    sipQAudioSink(const  ::QAudioFormat&, ::QObject*);
    virtual ~sipQAudioSink();

    int qt_metacall(QMetaObject::Call, int, void **) SIP_OVERRIDE;
    void *qt_metacast(const char *) SIP_OVERRIDE;
    const QMetaObject *metaObject() const SIP_OVERRIDE;

    /*
     * There is a protected method for every virtual method visible from
     * this class.
     */
protected:
    bool event( ::QEvent*) SIP_OVERRIDE;
    bool eventFilter( ::QObject*, ::QEvent*) SIP_OVERRIDE;
    void timerEvent( ::QTimerEvent*) SIP_OVERRIDE;
    void childEvent( ::QChildEvent*) SIP_OVERRIDE;
    void customEvent( ::QEvent*) SIP_OVERRIDE;
    void connectNotify(const  ::QMetaMethod&) SIP_OVERRIDE;
    void disconnectNotify(const  ::QMetaMethod&) SIP_OVERRIDE;

public:
    sipSimpleWrapper *sipPySelf;

private:
    sipQAudioSink(const sipQAudioSink &);
    sipQAudioSink &operator = (const sipQAudioSink &);

    char sipPyMethods[7];
};

sipQAudioSink::sipQAudioSink(const  ::QAudioDevice& a0,const  ::QAudioFormat& a1, ::QObject*a2):  ::QAudioSink(a0,a1,a2), sipPySelf(SIP_NULLPTR)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

sipQAudioSink::sipQAudioSink(const  ::QAudioFormat& a0, ::QObject*a1):  ::QAudioSink(a0,a1), sipPySelf(SIP_NULLPTR)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

sipQAudioSink::~sipQAudioSink()
{
    sipInstanceDestroyedEx(&sipPySelf);
}

const QMetaObject *sipQAudioSink::metaObject() const
{
    if (sipGetInterpreter())
        return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : sip_QtMultimedia_qt_metaobject(sipPySelf,sipType_QAudioSink);

    return  ::QAudioSink::metaObject();
}

int sipQAudioSink::qt_metacall(QMetaObject::Call _c,int _id,void **_a)
{
    _id =  ::QAudioSink::qt_metacall(_c,_id,_a);

    if (_id >= 0)
    {
        SIP_BLOCK_THREADS
        _id = sip_QtMultimedia_qt_metacall(sipPySelf,sipType_QAudioSink,_c,_id,_a);
        SIP_UNBLOCK_THREADS
    }

    return _id;
}

void *sipQAudioSink::qt_metacast(const char *_clname)
{
    void *sipCpp;

    return (sip_QtMultimedia_qt_metacast(sipPySelf, sipType_QAudioSink, _clname, &sipCpp) ? sipCpp :  ::QAudioSink::qt_metacast(_clname));
}

bool sipQAudioSink::event( ::QEvent*a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[0], &sipPySelf, SIP_NULLPTR, sipName_event);

    if (!sipMeth)
        return  ::QAudioSink::event(a0);

    extern bool sipVH_QtMultimedia_5(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::QEvent*);

    return sipVH_QtMultimedia_5(sipGILState, sipImportedVirtErrorHandlers_QtMultimedia_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

bool sipQAudioSink::eventFilter( ::QObject*a0, ::QEvent*a1)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[1], &sipPySelf, SIP_NULLPTR, sipName_eventFilter);

    if (!sipMeth)
        return  ::QAudioSink::eventFilter(a0,a1);

    extern bool sipVH_QtMultimedia_4(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::QObject*, ::QEvent*);

    return sipVH_QtMultimedia_4(sipGILState, sipImportedVirtErrorHandlers_QtMultimedia_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0, a1);
}

void sipQAudioSink::timerEvent( ::QTimerEvent*a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[2], &sipPySelf, SIP_NULLPTR, sipName_timerEvent);

    if (!sipMeth)
    {
         ::QAudioSink::timerEvent(a0);
        return;
    }

    extern void sipVH_QtMultimedia_3(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::QTimerEvent*);

    sipVH_QtMultimedia_3(sipGILState, sipImportedVirtErrorHandlers_QtMultimedia_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

void sipQAudioSink::childEvent( ::QChildEvent*a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[3], &sipPySelf, SIP_NULLPTR, sipName_childEvent);

    if (!sipMeth)
    {
         ::QAudioSink::childEvent(a0);
        return;
    }

    extern void sipVH_QtMultimedia_2(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::QChildEvent*);

    sipVH_QtMultimedia_2(sipGILState, sipImportedVirtErrorHandlers_QtMultimedia_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

void sipQAudioSink::customEvent( ::QEvent*a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[4], &sipPySelf, SIP_NULLPTR, sipName_customEvent);

    if (!sipMeth)
    {
         ::QAudioSink::customEvent(a0);
        return;
    }

    extern void sipVH_QtMultimedia_1(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::QEvent*);

    sipVH_QtMultimedia_1(sipGILState, sipImportedVirtErrorHandlers_QtMultimedia_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

void sipQAudioSink::connectNotify(const  ::QMetaMethod& a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[5], &sipPySelf, SIP_NULLPTR, sipName_connectNotify);

    if (!sipMeth)
    {
         ::QAudioSink::connectNotify(a0);
        return;
    }

    extern void sipVH_QtMultimedia_0(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const  ::QMetaMethod&);

    sipVH_QtMultimedia_0(sipGILState, sipImportedVirtErrorHandlers_QtMultimedia_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

void sipQAudioSink::disconnectNotify(const  ::QMetaMethod& a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[6], &sipPySelf, SIP_NULLPTR, sipName_disconnectNotify);

    if (!sipMeth)
    {
         ::QAudioSink::disconnectNotify(a0);
        return;
    }

    extern void sipVH_QtMultimedia_0(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const  ::QMetaMethod&);

    sipVH_QtMultimedia_0(sipGILState, sipImportedVirtErrorHandlers_QtMultimedia_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}


PyDoc_STRVAR(doc_QAudioSink_format, "format(self) -> QAudioFormat");

extern "C" {static PyObject *meth_QAudioSink_format(PyObject *, PyObject *);}
static PyObject *meth_QAudioSink_format(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QAudioSink *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QAudioSink, &sipCpp))
        {
             ::QAudioFormat*sipRes;

            sipRes = new  ::QAudioFormat(sipCpp->format());

            return sipConvertFromNewType(sipRes,sipType_QAudioFormat,SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QAudioSink, sipName_format, doc_QAudioSink_format);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QAudioSink_start, "start(self, QIODevice)\n"
"start(self) -> QIODevice");

extern "C" {static PyObject *meth_QAudioSink_start(PyObject *, PyObject *);}
static PyObject *meth_QAudioSink_start(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
         ::QIODevice* a0;
         ::QAudioSink *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ8", &sipSelf, sipType_QAudioSink, &sipCpp, sipType_QIODevice, &a0))
        {
            sipCpp->start(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    {
         ::QAudioSink *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QAudioSink, &sipCpp))
        {
             ::QIODevice*sipRes;

            sipRes = sipCpp->start();

            return sipConvertFromType(sipRes,sipType_QIODevice,SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QAudioSink, sipName_start, doc_QAudioSink_start);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QAudioSink_stop, "stop(self)");

extern "C" {static PyObject *meth_QAudioSink_stop(PyObject *, PyObject *);}
static PyObject *meth_QAudioSink_stop(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
         ::QAudioSink *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QAudioSink, &sipCpp))
        {
            sipCpp->stop();

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QAudioSink, sipName_stop, doc_QAudioSink_stop);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QAudioSink_reset, "reset(self)");

extern "C" {static PyObject *meth_QAudioSink_reset(PyObject *, PyObject *);}
static PyObject *meth_QAudioSink_reset(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
         ::QAudioSink *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QAudioSink, &sipCpp))
        {
            sipCpp->reset();

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QAudioSink, sipName_reset, doc_QAudioSink_reset);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QAudioSink_suspend, "suspend(self)");

extern "C" {static PyObject *meth_QAudioSink_suspend(PyObject *, PyObject *);}
static PyObject *meth_QAudioSink_suspend(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
         ::QAudioSink *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QAudioSink, &sipCpp))
        {
            sipCpp->suspend();

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QAudioSink, sipName_suspend, doc_QAudioSink_suspend);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QAudioSink_resume, "resume(self)");

extern "C" {static PyObject *meth_QAudioSink_resume(PyObject *, PyObject *);}
static PyObject *meth_QAudioSink_resume(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
         ::QAudioSink *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QAudioSink, &sipCpp))
        {
            sipCpp->resume();

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QAudioSink, sipName_resume, doc_QAudioSink_resume);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QAudioSink_setBufferSize, "setBufferSize(self, int)");

extern "C" {static PyObject *meth_QAudioSink_setBufferSize(PyObject *, PyObject *);}
static PyObject *meth_QAudioSink_setBufferSize(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
         ::qsizetype a0;
         ::QAudioSink *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bn", &sipSelf, sipType_QAudioSink, &sipCpp, &a0))
        {
            sipCpp->setBufferSize(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QAudioSink, sipName_setBufferSize, doc_QAudioSink_setBufferSize);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QAudioSink_bufferSize, "bufferSize(self) -> int");

extern "C" {static PyObject *meth_QAudioSink_bufferSize(PyObject *, PyObject *);}
static PyObject *meth_QAudioSink_bufferSize(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QAudioSink *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QAudioSink, &sipCpp))
        {
             ::qsizetype sipRes;

            sipRes = sipCpp->bufferSize();

            return PyLong_FromLongLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QAudioSink, sipName_bufferSize, doc_QAudioSink_bufferSize);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QAudioSink_bytesFree, "bytesFree(self) -> int");

extern "C" {static PyObject *meth_QAudioSink_bytesFree(PyObject *, PyObject *);}
static PyObject *meth_QAudioSink_bytesFree(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QAudioSink *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QAudioSink, &sipCpp))
        {
             ::qsizetype sipRes;

            sipRes = sipCpp->bytesFree();

            return PyLong_FromLongLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QAudioSink, sipName_bytesFree, doc_QAudioSink_bytesFree);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QAudioSink_processedUSecs, "processedUSecs(self) -> int");

extern "C" {static PyObject *meth_QAudioSink_processedUSecs(PyObject *, PyObject *);}
static PyObject *meth_QAudioSink_processedUSecs(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QAudioSink *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QAudioSink, &sipCpp))
        {
             ::qint64 sipRes;

            sipRes = sipCpp->processedUSecs();

            return PyLong_FromLongLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QAudioSink, sipName_processedUSecs, doc_QAudioSink_processedUSecs);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QAudioSink_elapsedUSecs, "elapsedUSecs(self) -> int");

extern "C" {static PyObject *meth_QAudioSink_elapsedUSecs(PyObject *, PyObject *);}
static PyObject *meth_QAudioSink_elapsedUSecs(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QAudioSink *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QAudioSink, &sipCpp))
        {
             ::qint64 sipRes;

            sipRes = sipCpp->elapsedUSecs();

            return PyLong_FromLongLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QAudioSink, sipName_elapsedUSecs, doc_QAudioSink_elapsedUSecs);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QAudioSink_error, "error(self) -> QAudio.Error");

extern "C" {static PyObject *meth_QAudioSink_error(PyObject *, PyObject *);}
static PyObject *meth_QAudioSink_error(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QAudioSink *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QAudioSink, &sipCpp))
        {
             ::QAudio::Error sipRes;

            sipRes = sipCpp->error();

            return sipConvertFromEnum(static_cast<int>(sipRes), sipType_QAudio_Error);
        }
    }

    sipNoMethod(sipParseErr, sipName_QAudioSink, sipName_error, doc_QAudioSink_error);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QAudioSink_state, "state(self) -> QAudio.State");

extern "C" {static PyObject *meth_QAudioSink_state(PyObject *, PyObject *);}
static PyObject *meth_QAudioSink_state(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QAudioSink *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QAudioSink, &sipCpp))
        {
             ::QAudio::State sipRes;

            sipRes = sipCpp->state();

            return sipConvertFromEnum(static_cast<int>(sipRes), sipType_QAudio_State);
        }
    }

    sipNoMethod(sipParseErr, sipName_QAudioSink, sipName_state, doc_QAudioSink_state);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QAudioSink_setVolume, "setVolume(self, float)");

extern "C" {static PyObject *meth_QAudioSink_setVolume(PyObject *, PyObject *);}
static PyObject *meth_QAudioSink_setVolume(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
         ::qreal a0;
         ::QAudioSink *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bd", &sipSelf, sipType_QAudioSink, &sipCpp, &a0))
        {
            sipCpp->setVolume(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QAudioSink, sipName_setVolume, doc_QAudioSink_setVolume);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QAudioSink_volume, "volume(self) -> float");

extern "C" {static PyObject *meth_QAudioSink_volume(PyObject *, PyObject *);}
static PyObject *meth_QAudioSink_volume(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QAudioSink *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QAudioSink, &sipCpp))
        {
             ::qreal sipRes;

            sipRes = sipCpp->volume();

            return PyFloat_FromDouble(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QAudioSink, sipName_volume, doc_QAudioSink_volume);

    return SIP_NULLPTR;
}


/* Cast a pointer to a type somewhere in its inheritance hierarchy. */
extern "C" {static void *cast_QAudioSink(void *, const sipTypeDef *);}
static void *cast_QAudioSink(void *sipCppV, const sipTypeDef *targetType)
{
     ::QAudioSink *sipCpp = reinterpret_cast< ::QAudioSink *>(sipCppV);

    if (targetType == sipType_QAudioSink)
        return sipCppV;

    if (targetType == sipType_QObject)
        return static_cast< ::QObject *>(sipCpp);

    return SIP_NULLPTR;
}


/* Call the instance's destructor. */
extern "C" {static void release_QAudioSink(void *, int);}
static void release_QAudioSink(void *sipCppV, int)
{
     ::QAudioSink *sipCpp = reinterpret_cast< ::QAudioSink *>(sipCppV);

    if (QThread::currentThread() == sipCpp->thread())
        delete sipCpp;
    else
        sipCpp->deleteLater();
}


extern "C" {static void *array_QAudioSink(Py_ssize_t);}
static void *array_QAudioSink(Py_ssize_t sipNrElem)
{
    return new  ::QAudioSink[sipNrElem];
}


extern "C" {static void array_delete_QAudioSink(void *);}
static void array_delete_QAudioSink(void *sipCpp)
{
    delete[] reinterpret_cast< ::QAudioSink *>(sipCpp);
}


extern "C" {static void dealloc_QAudioSink(sipSimpleWrapper *);}
static void dealloc_QAudioSink(sipSimpleWrapper *sipSelf)
{
    if (sipIsDerivedClass(sipSelf))
        reinterpret_cast<sipQAudioSink *>(sipGetAddress(sipSelf))->sipPySelf = SIP_NULLPTR;

    if (sipIsOwnedByPython(sipSelf))
    {
        release_QAudioSink(sipGetAddress(sipSelf), sipIsDerivedClass(sipSelf));
    }
}


extern "C" {static void *init_type_QAudioSink(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
static void *init_type_QAudioSink(sipSimpleWrapper *sipSelf, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **sipOwner, PyObject **sipParseErr)
{
    sipQAudioSink *sipCpp = SIP_NULLPTR;

    {
        const  ::QAudioDevice* a0;
        const  ::QAudioFormat& a1def = QAudioFormat();
        const  ::QAudioFormat* a1 = &a1def;
         ::QObject* a2 = 0;

        static const char *sipKwdList[] = {
            SIP_NULLPTR,
            sipName_format,
            sipName_parent,
        };

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, sipKwdList, sipUnused, "J9|J9JH", sipType_QAudioDevice, &a0, sipType_QAudioFormat, &a1, sipType_QObject, &a2, sipOwner))
        {
            sipCpp = new sipQAudioSink(*a0,*a1,a2);

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    {
        const  ::QAudioFormat& a0def = QAudioFormat();
        const  ::QAudioFormat* a0 = &a0def;
         ::QObject* a1 = 0;

        static const char *sipKwdList[] = {
            sipName_format,
            sipName_parent,
        };

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, sipKwdList, sipUnused, "|J9JH", sipType_QAudioFormat, &a0, sipType_QObject, &a1, sipOwner))
        {
            sipCpp = new sipQAudioSink(*a0,a1);

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


/* Define this type's super-types. */
static sipEncodedTypeDef supers_QAudioSink[] = {{6, 0, 1}};


static PyMethodDef methods_QAudioSink[] = {
    {sipName_bufferSize, meth_QAudioSink_bufferSize, METH_VARARGS, doc_QAudioSink_bufferSize},
    {sipName_bytesFree, meth_QAudioSink_bytesFree, METH_VARARGS, doc_QAudioSink_bytesFree},
    {sipName_elapsedUSecs, meth_QAudioSink_elapsedUSecs, METH_VARARGS, doc_QAudioSink_elapsedUSecs},
    {sipName_error, meth_QAudioSink_error, METH_VARARGS, doc_QAudioSink_error},
    {sipName_format, meth_QAudioSink_format, METH_VARARGS, doc_QAudioSink_format},
    {sipName_processedUSecs, meth_QAudioSink_processedUSecs, METH_VARARGS, doc_QAudioSink_processedUSecs},
    {sipName_reset, meth_QAudioSink_reset, METH_VARARGS, doc_QAudioSink_reset},
    {sipName_resume, meth_QAudioSink_resume, METH_VARARGS, doc_QAudioSink_resume},
    {sipName_setBufferSize, meth_QAudioSink_setBufferSize, METH_VARARGS, doc_QAudioSink_setBufferSize},
    {sipName_setVolume, meth_QAudioSink_setVolume, METH_VARARGS, doc_QAudioSink_setVolume},
    {sipName_start, meth_QAudioSink_start, METH_VARARGS, doc_QAudioSink_start},
    {sipName_state, meth_QAudioSink_state, METH_VARARGS, doc_QAudioSink_state},
    {sipName_stop, meth_QAudioSink_stop, METH_VARARGS, doc_QAudioSink_stop},
    {sipName_suspend, meth_QAudioSink_suspend, METH_VARARGS, doc_QAudioSink_suspend},
    {sipName_volume, meth_QAudioSink_volume, METH_VARARGS, doc_QAudioSink_volume}
};

PyDoc_STRVAR(doc_QAudioSink, "\1QAudioSink(QAudioDevice, format: QAudioFormat = QAudioFormat(), parent: QObject = None)\n"
"QAudioSink(format: QAudioFormat = QAudioFormat(), parent: QObject = None)");


/* Define this type's signals. */
static const pyqt6QtSignal signals_QAudioSink[] = {
    {"stateChanged(QAudio::State)", "\1stateChanged(self, QAudio.State)", SIP_NULLPTR, SIP_NULLPTR},
    {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR}
};


static pyqt6ClassPluginDef plugin_QAudioSink = {
    & ::QAudioSink::staticMetaObject,
    signals_QAudioSink,
    SIP_NULLPTR
};


sipClassTypeDef sipTypeDef_QtMultimedia_QAudioSink = {
    {
        SIP_NULLPTR,
        SIP_TYPE_SCC|SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QAudioSink,
        SIP_NULLPTR,
        &plugin_QAudioSink
    },
    {
        sipNameNr_QAudioSink,
        {0, 0, 1},
        15, methods_QAudioSink,
        0, SIP_NULLPTR,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_QAudioSink,
    -1,
    -1,
    supers_QAudioSink,
    SIP_NULLPTR,
    init_type_QAudioSink,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QAudioSink,
    SIP_NULLPTR,
    array_QAudioSink,
    SIP_NULLPTR,
    release_QAudioSink,
    cast_QAudioSink,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_QAudioSink,
    sizeof ( ::QAudioSink),
};
