§
    ªeîiè?  ã                  ó¢  — U d Z ddlmZ ddlmZmZmZmZmZm	Z	m
Z
mZmZmZ ddlZddlZddlZddlZddlZddlZddlZddlZddlmZ er# e
d¦  «        Zed         Zed	         Zed
         Z G d„ de¦  «        Z G d„ de¦  «        Z G d„ de¦  «        ZdZ  ej!        e"¦  «        Z#dZ$ ej%        ej&        ¦  «        Z' ej%        ej(        ¦  «        Z) ej%        ej*        ¦  «        Z+da,de-d<    G d„ dej.        ¦  «        Z/ G d„ dej.        ¦  «        Z0 ej%        e/¦  «        Z1 ej%        e0¦  «        Z2dZ3dZ4dZ5dZ6dZ7dZ8dZ9dZ:d Z;d!Z<d"Z=d#Z>d$d%d&dœZ?de-d'<   d(d)d*d+d,d	œZ@de-d-<   d.d/d0d
œZAde-d1<   dbd9„ZBdcd:„ZCd;g ejD        dfd<ej&        gejD        dfd=ej&        gej&        dfd>ej&        ej&        ej&        e'ge1eCfd?e1e)ej&        ejD        ejE        gejE        eBfd@e1e+ej&        ejD        ejE        gejE        eBfdAe1ej&        gejE        eBfdBe1gddfdCej&        gej&        dfdDej&        ej&        e'ge2eCfdEe2ejD        ejE        e)ej&        ej&        gej&        eBfdFe2ejD        ejE        e+ej&        ej&        gej&        eBfdGe2ej&        gejE        eBfdHe2gddfdIe2ejD        ejE        gej&        eBfdJejD        gej&        eBfdKejD        gej&        eBfdLejD        ej&        gej&        eBfdMejD        ej&        gej&        eBfgZFdNe-dO<   dddR„ZGdedT„ZHdfdV„ZIdedW„ZJ G dX„ dYe¦  «        ZK G dZ„ d[e¦  «        ZL G d\„ d]¦  «        ZM G d^„ d_eM¦  «        ZN G d`„ daeM¦  «        ZOdS )ga:  
The MIT License (MIT)

Copyright (c) 2015-present Rapptz

Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
é    )Úannotations)
ÚListÚTupleÚ	TypedDictÚAnyÚTYPE_CHECKINGÚCallableÚTypeVarÚLiteralÚOptionalÚoverloadNé   )ÚDiscordExceptionÚT)ÚaudioÚvoipÚlowdelay)ÚnarrowÚmediumÚwideÚ	superwideÚfull)ÚautoÚvoiceÚmusicc                  ó.   — e Zd ZU ded<   ded<   ded<   dS )ÚApplicationCtlÚintr   r   r   N©Ú__name__Ú
__module__Ú__qualname__Ú__annotations__© ó    úP/home/div/.hermes/hermes-agent/venv/lib/python3.11/site-packages/discord/opus.pyr   r   /   s+   € € € € € € Ø€J€J�JØ€I€I�IØ€M€M�M€M€Mr%   r   c                  óB   — e Zd ZU ded<   ded<   ded<   ded<   ded<   dS )ÚBandCtlr   r   r   r   r   r   Nr   r$   r%   r&   r(   r(   5   s=   € € € € € € Ø€K€K�KØ€K€K�KØ€I€I�IØ€N€N�NØ€I€I�I€I€Ir%   r(   c                  ó.   — e Zd ZU ded<   ded<   ded<   dS )Ú	SignalCtlr   r   r   r   Nr   r$   r%   r&   r*   r*   =   s+   € € € € € € Ø€I€I�IØ€J€J�JØ€J€J�J€J€Jr%   r*   )ÚEncoderÚ	OpusErrorÚOpusNotLoadeds   øÿþr   Ú_libc                  ó   — e Zd ZdS )ÚEncoderStructN©r    r!   r"   r$   r%   r&   r0   r0   T   ó   € € € € € Ø€Dr%   r0   c                  ó   — e Zd ZdS )ÚDecoderStructNr1   r$   r%   r&   r4   r4   X   r2   r%   r4   éÿÿÿÿr   r   r   i¢  i¨  i¬  i®  i¸  iÂ  iÇ  i  i   i  Úapplication_ctliM  iN  iO  iP  iQ  Úband_ctliüÿÿi¹  iº  Ú
signal_ctlÚresultr   Úfuncr	   Úargsr   Úreturnc                óz   — | t           k     r/t                               d|j        ¦  «         t	          | ¦  «        ‚| S )Núerror has happened in %s)ÚOKÚ_logÚdebugr    r,   )r9   r:   r;   s      r&   Ú_err_ltrB   ‹   s5   € Ø•‚{€{Ý�
Š
Ð-¨t¬}Ñ=Ô=Ð=Ý˜ÑÔÐØ€Mr%   c                ó¨   — |d         j         }|j        t          k    r4t                               d|j        ¦  «         t          |j        ¦  «        ‚| S )Nr5   r>   )Ú_objÚvaluer?   r@   rA   r    r,   )r9   r:   r;   Úrets       r&   Ú_err_nerG   ’   sD   € Ø
ˆrŒ(Œ-€CØ
„y•B‚€Ý�
Š
Ð-¨t¬}Ñ=Ô=Ð=Ý˜œ	Ñ"Ô"Ð"Ø€Mr%   Úopus_get_version_stringÚopus_strerrorÚopus_encoder_get_sizeÚopus_encoder_createÚopus_encodeÚopus_encode_floatÚopus_encoder_ctlÚopus_encoder_destroyÚopus_decoder_get_sizeÚopus_decoder_createÚopus_decodeÚopus_decode_floatÚopus_decoder_ctlÚopus_decoder_destroyÚopus_decoder_get_nb_samplesÚopus_packet_get_bandwidthÚopus_packet_get_nb_channelsÚopus_packet_get_nb_framesÚ!opus_packet_get_samples_per_framezList[Tuple[Any, ...]]Úexported_functionsÚnameÚstrc                ón  — t           j                             | ¦  «        }t          D ]�}t	          ||d         ¦  «        }	 |d         r|d         |_        |d         |_        n# t          $ r Y nw xY w	 |d         r|d         |_        Œc# t          $ r t           
                    d|¦  «         Y ŒŠw xY w|S )Nr   r   é   é   z$Error assigning check function to %s)ÚctypesÚcdllÚLoadLibraryr[   ÚgetattrÚargtypesÚrestypeÚKeyErrorÚerrcheckr@   Ú	exception)r\   ÚlibÚitemr:   s       r&   Úlibopus_loaderrl   É   så   € å
Œ+×
!Ò
! $Ñ
'Ô
'€Cõ #ð Ið IˆÝ�s˜D œGÑ$Ô$ˆð	Ø�AŒwð (Ø $ Q¤�”à œ7ˆDŒLˆLøÝð 	ð 	ð 	ØˆDð	øøøð	IØ�AŒwð (Ø $ Q¤�”øøÝð 	Ið 	Ið 	IÝ�NŠNÐAÀ4ÑHÔHÐHÐHÐHð	Iøøøð €Js$   Á "A#Á#
A0Á/A0Á4B
Â
%B2Â1B2Úboolc                 óâ  — 	 t           j        dk    r—t          j                             t          j                             t          ¦  «        ¦  «        } t          j        d¦  «        dz  }|dk    rdnd}t          j         	                    | dd|› d	�¦  «        }t          |¦  «        an,t          t          j                             d
¦  «        ¦  «        an# t          $ r d aY nw xY wt          d uS )NÚwin32ÚPé   é    Úx64Úx86Úbinz
libopus-0.z.dllÚopus)ÚsysÚplatformÚosÚpathÚdirnameÚabspathÚ__file__ÚstructÚcalcsizeÚjoinrl   r.   ra   ÚutilÚfind_libraryÚ	Exception)Ú_basedirÚ_bitnessÚ_targetÚ	_filenames       r&   Ú_load_defaultrˆ   â   sÝ   € ðÝŒ<˜7Ò"Ð"Ý”w—’¥r¤w§¢µxÑ'@Ô'@ÑAÔAˆHÝ” sÑ+Ô+¨aÑ/ˆHØ'¨"š}˜}�e�e°%ˆGÝœŸš X¨uÐ6PÀ7Ð6PÐ6PÐ6PÑQÔQˆIÝ! )Ñ,Ô,ˆDˆDõ "¥&¤+×":Ò":¸6Ñ"BÔ"BÑCÔCˆDøøÝð ð ð Øˆˆˆðøøøõ �tÐÐs   ‚CC ÃC%Ã$C%ÚNonec                ó$   — t          | ¦  «        adS )a¬  Loads the libopus shared library for use with voice.

    If this function is not called then the library uses the function
    :func:`ctypes.util.find_library` and then loads that one if available.

    Not loading a library and attempting to use PCM based AudioSources will
    lead to voice not working.

    This function propagates the exceptions thrown.

    .. warning::

        The bitness of the library must match the bitness of your python
        interpreter. If the library is 64-bit then your python interpreter
        must be 64-bit as well. Usually if there's a mismatch in bitness then
        the load will throw an exception.

    .. note::

        On Windows, this function should not need to be called as the binaries
        are automatically loaded.

    .. note::

        On Windows, the .dll extension is not necessary. However, on Linux
        the full extension is required to load the library, e.g. ``libopus.so.1``.
        On Linux however, :func:`ctypes.util.find_library` will usually find the library automatically
        without you having to call this.

    Parameters
    ----------
    name: :class:`str`
        The filename of the shared library.
    N)rl   r.   )r\   s    r&   Ú	load_opusr‹   ô   s   € õH ˜$ÑÔ€D€D€Dr%   c                 ó   — t           duS )a  Function to check if opus lib is successfully loaded either
    via the :func:`ctypes.util.find_library` call of :func:`load_opus`.

    This must return ``True`` for voice to work.

    Returns
    -------
    :class:`bool`
        Indicates if the opus library has been loaded.
    N)r.   r$   r%   r&   Ú	is_loadedr�     s   € õ �tÐÐr%   c                  ó$   ‡ — e Zd ZdZdˆ fd„Zˆ xZS )r,   z“An exception that is thrown for libopus related errors.

    Attributes
    ----------
    code: :class:`int`
        The error code returned.
    Úcoder   c                óò   •— || _         t                               | j         ¦  «                             d¦  «        }t                               d|¦  «         t          ¦   «                              |¦  «         d S )Núutf-8z"%s" has happened)r�   r.   rI   Údecoder@   rA   ÚsuperÚ__init__)Úselfr�   ÚmsgÚ	__class__s      €r&   r”   zOpusError.__init__3  s`   ø€ ØˆŒ	Ý× Ò  ¤Ñ+Ô+×2Ò2°7Ñ;Ô;ˆÝ�
Š
Ð&¨Ñ,Ô,Ð,Ý‰Œ×Ò˜ÑÔÐÐÐr%   )r�   r   )r    r!   r"   Ú__doc__r”   Ú__classcell__)r—   s   @r&   r,   r,   *  sG   ø€ € € € € ðð ðð ð ð ð ð ð ð ð ð r%   r,   c                  ó   — e Zd ZdZdS )r-   z;An exception that is thrown for when libopus is not loaded.N)r    r!   r"   r˜   r$   r%   r&   r-   r-   :  s   € € € € € ØEÐEà€Dr%   r-   c                  ó„   — e Zd ZdZdZdZ ej        d¦  «        ez  Z e	edz  ez  ¦  «        Z
e
ez  Zed
d„¦   «         Zd	S )Ú_OpusStructi€»  r_   é   Úhiè  r<   r]   c                 ó®   — t          ¦   «         st          ¦   «         st          ¦   «         ‚t                               ¦   «                              d¦  «        S )Nr‘   )r�   rˆ   r-   r.   rH   r’   r$   r%   r&   Úget_opus_versionz_OpusStruct.get_opus_versionI  sC   € å‰{Œ{ð 	"¥=¡?¤?ð 	"Ý‘/”/Ð!å×+Ò+Ñ-Ô-×4Ò4°WÑ=Ô=Ð=r%   N)r<   r]   )r    r!   r"   ÚSAMPLING_RATEÚCHANNELSÚFRAME_LENGTHr~   r   ÚSAMPLE_SIZEr   ÚSAMPLES_PER_FRAMEÚ
FRAME_SIZEÚstaticmethodr    r$   r%   r&   rœ   rœ   @  s{   € € € € € Ø€MØ€HØ€LØ!�&”/ #Ñ&Ô&¨Ñ1€KØ˜˜M¨DÑ0°<Ñ?Ñ@Ô@Ðà" [Ñ0€Jàð>ð >ð >ñ „\ð>ð >ð >r%   rœ   c                  óh   — e Zd Zdddddddœd(d„Zd)d„Zd*d„Zd+d„Zd,d„Zd-d„Zd.d/d „Z	d0d"„Z
d1d&„Zd'S )2r+   r   é€   Tg333333Ã?r   r   )ÚapplicationÚbitrateÚfecÚexpected_packet_lossÚ	bandwidthÚsignal_typerª   ÚAPPLICATION_CTLr«   r   r¬   rm   r­   Úfloatr®   ÚBAND_CTLr¯   Ú
SIGNAL_CTLc               óR  — |t           vr,t          |› dd                     t           ¦  «        › �¦  «        ‚d|cxk    rdk    sn t          d|› �¦  «        ‚d|cxk     rdk    sn t          d|› �¦  «        ‚t                               ¦   «          t           |         | _        |                      ¦   «         | _        |                      |¦  «         |  	                    |¦  «         |r|  
                    |¦  «         |                      |¦  «         |                      |¦  «         d S )	Nz1 is not a valid application setting. Try one of: Ú é   é   z(bitrate must be between 16 and 512, not r   g      ð?zLexpected_packet_loss must be a positive number less than or equal to 1, not )r6   Ú
ValueErrorr€   rœ   r    rª   Ú_create_stateÚ_stateÚset_bitrateÚset_fecÚ set_expected_packet_loss_percentÚset_bandwidthÚset_signal_type)r•   rª   r«   r¬   r­   r®   r¯   s          r&   r”   zEncoder.__init__R  sU  € ð �oÐ-Ð-Ý ÐxÐxÐ^`×^eÒ^eÕfuÑ^vÔ^vÐxÐxÑyÔyÐyà�WÐ#Ð#Ò#Ð# Ò#Ð#Ð#Ð#ÝÐQÈÐQÐQÑRÔRÐRàÐ'Ð.Ð.Ò.Ð.¨3Ò.Ð.Ð.Ð.ÝØuÐ_sÐuÐuñô ð õ 	×$Ò$Ñ&Ô&Ð&å /°Ô <ˆÔØ%)×%7Ò%7Ñ%9Ô%9ˆŒà×Ò˜Ñ!Ô!Ð!Ø�Š�SÑÔÐØð 	HØ×1Ò1Ð2FÑGÔGÐGØ×Ò˜9Ñ%Ô%Ð%Ø×Ò˜[Ñ)Ô)Ð)Ð)Ð)r%   r<   r‰   c                óv   — t          | d¦  «        r(t                               | j        ¦  «         d | _        d S d S ©Nrº   )Úhasattrr.   rO   rº   ©r•   s    r&   Ú__del__zEncoder.__del__s  ó?   € Ý�4˜Ñ"Ô"ð 	Ý×%Ò% d¤kÑ2Ô2Ð2àˆDŒKˆKˆKð	ð 	r%   r0   c                ó¤   — t          j        ¦   «         }t                               | j        | j        | j        t          j        |¦  «        ¦  «        S ©N)ra   Úc_intr.   rK   r¡   r¢   rª   Úbyref©r•   rF   s     r&   r¹   zEncoder._create_statey  s<   € ÝŒl‰nŒnˆÝ×'Ò'¨Ô(:¸D¼MÈ4ÔK[Õ]cÔ]iÐjmÑ]nÔ]nÑoÔoÐor%   Úkbpsc           	     ó®   — t          dt          dt          |¦  «        ¦  «        ¦  «        }t                               | j        t          |dz  ¦  «         |S )Nr·   r¶   i   )ÚminÚmaxr   r.   rN   rº   ÚCTL_SET_BITRATE)r•   rË   s     r&   r»   zEncoder.set_bitrate}  sD   € Ý�3�˜B¥ D¡	¤	Ñ*Ô*Ñ+Ô+ˆå×Ò˜dœk­?¸DÀ4¹KÑHÔHÐHØˆr%   Úreqc                óÖ   — |t           vr,t          |›dd                     t           ¦  «        › �¦  «        ‚t           |         }t                               | j        t          |¦  «         d S )Nz/ is not a valid bandwidth setting. Try one of: Ú,)r7   rg   r€   r.   rN   rº   ÚCTL_SET_BANDWIDTH©r•   rÐ   Úks      r&   r¾   zEncoder.set_bandwidthƒ  sc   € Ø•hÐÐÝ˜cÐhÐhÐTW×T\ÒT\Õ]eÑTfÔTfÐhÐhÑiÔiÐiå�SŒMˆÝ×Ò˜dœkÕ+<¸aÑ@Ô@Ð@Ð@Ð@r%   c                óÖ   — |t           vr,t          |›dd                     t           ¦  «        › �¦  «        ‚t           |         }t                               | j        t          |¦  «         d S )Nz1 is not a valid signal type setting. Try one of: rÒ   )r8   rg   r€   r.   rN   rº   ÚCTL_SET_SIGNALrÔ   s      r&   r¿   zEncoder.set_signal_typeŠ  sb   € Ø•jÐ Ð Ý˜cÐlÐlÐVY×V^ÒV^Õ_iÑVjÔVjÐlÐlÑmÔmÐmå�sŒOˆÝ×Ò˜dœk­>¸1Ñ=Ô=Ð=Ð=Ð=r%   Úenabledc                óZ   — t                                | j        t          |rdnd¦  «         d S )Nr   r   )r.   rN   rº   ÚCTL_SET_FEC)r•   rØ   s     r&   r¼   zEncoder.set_fec‘  s+   € Ý×Ò˜dœk­;¸WÐ8K¸¸È!ÑLÔLÐLÐLÐLr%   Ú
percentagec                óª   — t                                | j        t          t	          dt          dt          |dz  ¦  «        ¦  «        ¦  «        ¦  «         d S )Néd   r   )r.   rN   rº   ÚCTL_SET_PLPrÍ   rÎ   r   )r•   rÛ   s     r&   r½   z(Encoder.set_expected_packet_loss_percent”  sD   € Ý×Ò˜dœk­;½¸CÅÀQÍÈJÐY\ÑL\ÑH]ÔH]ÑA^ÔA^Ñ8_Ô8_Ñ`Ô`Ð`Ð`Ð`r%   ÚpcmÚbytesÚ
frame_sizec                ó$  — t          |¦  «        }t          j        |t          ¦  «        }t          j        |z  ¦   «         }t
                               | j        ||||¦  «        }t          j        d|d |…         ¦  «         	                    ¦   «         S )NÚb)
Úlenra   ÚcastÚc_int16_ptrÚc_charr.   rL   rº   ÚarrayÚtobytes)r•   rß   rá   Úmax_data_bytesÚpcm_ptrÚdatarF   s          r&   ÚencodezEncoder.encode—  ss   € Ý˜S™œˆå”+˜c¥;Ñ/Ô/ˆÝ” Ñ.Ñ1Ô1ˆå×Ò˜tœ{¨G°ZÀÀ~ÑVÔVˆåŒ{˜3  T c T¤
Ñ+Ô+×3Ò3Ñ5Ô5Ð5r%   N)rª   r°   r«   r   r¬   rm   r­   r±   r®   r²   r¯   r³   ©r<   r‰   )r<   r0   )rË   r   r<   r   )rÐ   r²   r<   r‰   )rÐ   r³   r<   r‰   )T)rØ   rm   r<   r‰   )rÛ   r±   r<   r‰   )rß   rà   rá   r   r<   rà   )r    r!   r"   r”   rÄ   r¹   r»   r¾   r¿   r¼   r½   rí   r$   r%   r&   r+   r+   Q  sý   € € € € € ð (/ØØØ&*Ø$Ø"(ð*ð *ð *ð *ð *ð *ðBð ð ð ðpð pð pð pðð ð ð ðAð Að Að Að>ð >ð >ð >ðMð Mð Mð Mð Mðað að að að6ð 6ð 6ð 6ð 6ð 6r%   r+   c                  óÊ   — e Zd Zd„ Zd d„Zd!d„Zed"d
„¦   «         Zed"d„¦   «         Ze	d"d„¦   «         Z
d#d„Zd$d„Zd%d„Zd&d„Zed'd„¦   «         Zed(d„¦   «         Zddœd)d„ZdS )*ÚDecoderc                ój   — t                                ¦   «          |                      ¦   «         | _        d S rÇ   )rœ   r    r¹   rº   rÃ   s    r&   r”   zDecoder.__init__£  s+   € Ý×$Ò$Ñ&Ô&Ð&à%)×%7Ò%7Ñ%9Ô%9ˆŒˆˆr%   r<   r‰   c                óv   — t          | d¦  «        r(t                               | j        ¦  «         d | _        d S d S rÁ   )rÂ   r.   rU   rº   rÃ   s    r&   rÄ   zDecoder.__del__¨  rÅ   r%   r4   c                ó˜   — t          j        ¦   «         }t                               | j        | j        t          j        |¦  «        ¦  «        S rÇ   )ra   rÈ   r.   rQ   r¡   r¢   rÉ   rÊ   s     r&   r¹   zDecoder._create_state®  s5   € ÝŒl‰nŒnˆÝ×'Ò'¨Ô(:¸D¼MÍ6Ì<ÐX[ÑK\ÔK\Ñ]Ô]Ð]r%   rì   rà   r   c                óR   — t                                | t          | ¦  «        ¦  «        S )z+Gets the number of frames in an Opus packet)r.   rY   rä   ©rì   s    r&   Úpacket_get_nb_frameszDecoder.packet_get_nb_frames²  s    € õ ×-Ò-¨dµC¸±I´IÑ>Ô>Ð>r%   c                ó6   — t                                | ¦  «        S )z-Gets the number of channels in an Opus packet)r.   rX   rõ   s    r&   Úpacket_get_nb_channelszDecoder.packet_get_nb_channels·  s   € õ ×/Ò/°Ñ5Ô5Ð5r%   c                óB   — t                                || j        ¦  «        S )z8Gets the number of samples per frame from an Opus packet)r.   rZ   r¡   )Úclsrì   s     r&   Úpacket_get_samples_per_framez$Decoder.packet_get_samples_per_frame¼  s   € õ ×5Ò5°d¸CÔ<MÑNÔNÐNr%   Ú
adjustmentc                óN   — t                                | j        t          |¦  «        S )a“  Configures decoder gain adjustment.

        Scales the decoded output by a factor specified in Q8 dB units.
        This has a maximum range of -32768 to 32767 inclusive, and returns
        OPUS_BAD_ARG (-1) otherwise. The default is zero indicating no adjustment.
        This setting survives decoder reset (irrelevant for now).
        gain = 10**x/(20.0*256)
        (from opus_defines.h)
        )r.   rT   rº   ÚCTL_SET_GAIN)r•   rü   s     r&   Ú	_set_gainzDecoder._set_gainÁ  s   € õ ×$Ò$ T¤[µ,À
ÑKÔKÐKr%   ÚdBr±   c           
     óˆ   — t          dt          dt          |dz  ¦  «        ¦  «        ¦  «        }|                      |¦  «        S )z.Sets the decoder gain in dB, from -128 to 128.i €ÿÿiÿ  é   )rÎ   rÍ   Úroundrÿ   )r•   r   ÚdB_Q8s      r&   Úset_gainzDecoder.set_gainÍ  s9   € õ �F�C ¥u¨R°#©X¡¤Ñ7Ô7Ñ8Ô8ˆØ�~Š~˜eÑ$Ô$Ð$r%   Úmultc                óV   — |                       dt          j        |¦  «        z  ¦  «        S )zPSets the output volume as a float percent, i.e. 0.5 for 50%, 1.75 for 175%, etc.r�   )r  ÚmathÚlog10)r•   r  s     r&   Ú
set_volumezDecoder.set_volumeÓ  s#   € à�}Š}˜R¥$¤*¨TÑ"2Ô"2Ñ2Ñ3Ô3Ð3r%   c                ó¦   — t          j        ¦   «         }t                               | j        t
          t          j        |¦  «        ¦  «         |j        S )zTGets the duration (in samples) of the last packet successfully decoded or concealed.)ra   Úc_int32r.   rT   rº   ÚCTL_LAST_PACKET_DURATIONrÉ   rE   rÊ   s     r&   Ú_get_last_packet_durationz!Decoder._get_last_packet_duration×  s?   € õ ŒnÑÔˆÝ×Ò˜dœkÕ+CÅVÄ\ÐRUÑEVÔEVÑWÔWÐWØŒyÐr%   r¬   rm   c               ó   — d S rÇ   r$   ©r•   rì   r¬   s      r&   r’   zDecoder.decodeÞ  s   € Ø:=¸#r%   úLiteral[None]úLiteral[False]c               ó   — d S rÇ   r$   r  s      r&   r’   zDecoder.decodeá  s   € ØLOÈCr%   F)r¬   úOptional[bytes]c               ó  — |€|rt          d¦  «        ‚|€#|                      ¦   «         p| j        }| j        }n6|                      |¦  «        }| j        }|                      |¦  «        }||z  }t          j        ||z  z  ¦   «         }t          j        |t          ¦  «        }t                               | j        ||rt          |¦  «        nd|||¦  «        }	t          j        d|d |	|z  …         ¦  «                             ¦   «         S )Nz4Invalid arguments: FEC cannot be used with null datar   rž   )Ú	TypeErrorr  r¥   r¢   rö   rû   ra   Úc_int16rå   ræ   r.   rR   rº   rä   rè   ré   )
r•   rì   r¬   rá   Úchannel_countÚframesÚsamples_per_framerß   rë   rF   s
             r&   r’   zDecoder.decodeä  s  € Øˆ<˜Cˆ<ÝÐRÑSÔSÐSàˆ<Ø×7Ò7Ñ9Ô9ÐS¸TÔ=SˆJØ œMˆMˆMà×.Ò.¨tÑ4Ô4ˆFð !œMˆMØ $× AÒ AÀ$Ñ GÔ GÐØÐ"3Ñ3ˆJåŒ~ ¨mÑ!;Ñ<Ñ?Ô?ˆÝ”+˜c¥;Ñ/Ô/ˆå×Ò˜tœ{¨D¸tÐ2Jµ#°d±)´)°)ÈÈGÐU_ÐadÑeÔeˆåŒ{˜3 Ð$9 c¨MÑ&9Ð$9Ô :Ñ;Ô;×CÒCÑEÔEÐEr%   Nrî   )r<   r4   )rì   rà   r<   r   )rü   r   r<   r   )r   r±   r<   r   )r  r±   r<   r   )r<   r   )rì   rà   r¬   rm   r<   rà   )rì   r  r¬   r  r<   rà   )rì   r  r¬   rm   r<   rà   )r    r!   r"   r”   rÄ   r¹   r§   rö   rø   Úclassmethodrû   rÿ   r  r
  r  r   r’   r$   r%   r&   rð   rð   ¢  s^  € € € € € ð:ð :ð :ð
ð ð ð ð^ð ^ð ^ð ^ð ð?ð ?ð ?ñ „\ð?ð ð6ð 6ð 6ñ „\ð6ð ðOð Oð Oñ „[ðOð
Lð 
Lð 
Lð 
Lð%ð %ð %ð %ð4ð 4ð 4ð 4ðð ð ð ð Ø=Ð=Ð=ñ „XØ=àØOÐOÐOñ „XØOà;@ð Fð Fð Fð Fð Fð Fð Fð Fr%   rð   )r9   r   r:   r	   r;   r   r<   r   )r9   r   r:   r	   r;   r   r<   r   )r\   r]   r<   r   )r<   rm   )r\   r]   r<   r‰   )Pr˜   Ú
__future__r   Útypingr   r   r   r   r   r	   r
   r   r   r   rè   ra   Úctypes.utilÚloggingr  Úos.pathry   r~   rw   Úerrorsr   r   r°   r²   r³   r   r(   r*   Ú__all__Ú	getLoggerr    r@   ÚOPUS_SILENCEÚPOINTERrÈ   Ú	c_int_ptrr  ræ   Úc_floatÚc_float_ptrr.   r#   Ú	Structurer0   r4   ÚEncoderStructPtrÚDecoderStructPtrr?   ÚBAD_ARGÚAPPLICATION_AUDIOÚAPPLICATION_VOIPÚAPPLICATION_LOWDELAYrÏ   rÓ   rÚ   rÞ   r×   rþ   r  r6   r7   r8   rB   rG   Úc_char_pr  r[   rl   rˆ   r‹   r�   r,   r-   rœ   r+   rð   r$   r%   r&   ú<module>r1     s©  ððð ð ð0 #Ð "Ð "Ð "Ð "Ð "à mÐ mÐ mÐ mÐ mÐ mÐ mÐ mÐ mÐ mÐ mÐ mÐ mÐ mÐ mÐ mÐ mÐ mÐ mÐ mÐ mÐ mÐ mÐ mà €€€Ø €€€Ø Ð Ð Ð Ø €€€Ø €€€Ø €€€Ø €€€Ø 
€
€
€
à $Ð $Ð $Ð $Ð $Ð $àð 3Øˆ�‰Œ€AØÐ9Ô:€OØÐFÔG€HØÐ1Ô2€Jðð ð ð ð �Yñ ô ð ðð ð ð ð ˆiñ ô ð ðð ð ð ð �	ñ ô ð ð€ð €wÔ˜Ñ"Ô"€à€àˆFŒN˜6œ<Ñ(Ô(€	ØˆfŒn˜Vœ^Ñ,Ô,€ØˆfŒn˜Vœ^Ñ,Ô,€à€Ð Ð Ð Ñ ð	ð 	ð 	ð 	ð 	�FÔ$ñ 	ô 	ð 	ð	ð 	ð 	ð 	ð 	�FÔ$ñ 	ô 	ð 	ð "�6”> -Ñ0Ô0Ð Ø!�6”> -Ñ0Ô0Ð ð
 €Ø
€ð Ð ØÐ Ø!Ð ð €ØÐ Ø€Ø€Ø€ð  €ØÐ ð ØØð#ð #€ð ð ð ñ ð ØØØØðð €ð ð ð ñ ð ØØðð €
ð ð ð ñ ðð ð ð ðð ð ð ð   F¤O°TÐ:Ø�v”|�n f¤o°tÐ<à˜vœ|˜n¨f¬l¸DÐAØ˜Vœ\¨6¬<¸¼ÀyÐQÐScÐelÐmØÐ% {°F´LÀ&Ä/ÐSYÔSaÐbÐdjÔdrÐt{Ð|àØ	˜;¨¬°f´oÀvÄ~ÐVØŒØð	ð Ð*¨F¬LÐ9¸6¼>È7ÐSØÐ.Ð/°°tÐ<à˜vœ|˜n¨f¬l¸DÐAØ˜Vœ\¨6¬<¸ÐCÐEUÐW^Ð_àØ	˜6œ?¨F¬N¸KÈÌÐW]ÔWcÐdØŒØð	ð 	Ø	˜6œ?¨F¬N¸KÈÌÐW]ÔWcÐdØŒØð	ð Ð*¨F¬LÐ9¸6¼>È7ÐSØÐ.Ð/°°tÐ<Ø"Ð%5°v´ÈÌÐ$WÐY_ÔYeÐgnÐoà  6¤?Ð"3°V´\À7ÐKØ" V¤_Ð$5°v´|ÀWÐMØ  6¤?°F´LÐ"AÀ6Ä<ÐQXÐYØ(¨6¬?¸F¼LÐ*IÈ6Ì<ÐY`ÐaðM'-Ð ð 'ð 'ð 'ñ 'ðTð ð ð ð2ð ð ð ð$$ ð $ ð $ ð $ ðNð ð ð ðð ð ð ð Ð ñ ô ð ð 	ð 	ð 	ð 	ð 	Ð$ñ 	ô 	ð 	ð>ð >ð >ð >ð >ñ >ô >ð >ð"N6ð N6ð N6ð N6ð N6ˆkñ N6ô N6ð N6ðbVFð VFð VFð VFð VFˆkñ VFô VFð VFð VFð VFr%   