§
    åóÉjÎ ã            '       ó¼  — U d Z dZddlZddlZddlZddlm	Z	 ddl
mZ ddlmZmZmZ ddlmZmZmZmZmZ ddlZddlmZ dd	lmZ eez  ez  ej        e         z  Zee d
<   ej!        e"edf         ej#        ej$        ej%        z  ej&        z  ej'        z           f         Z(ee d<   ej!        e"eef         ej#        ej$        ej%        z  ej&        z  ej'        z           f         Z)ee d<   ed         Z*ee d<   ee d<   ee d<   dddddddddddœ
Z+ee,eef                  e d<   i dd“d d!“d"d#“d$d%“d&d'“d(d)“d*d+“d,d-“d.d/“d0d1“d2d3“d4d5“d6d7“d8d9“d:d;“d<d=“d>d?“d@dAdBdCdDdEdFdGdHdIœ	¥Z-ee,eef                  e dJ<   i dKd“dLd“dMd“dNd“dOd“dPd“dQd“dRd“dSdT“dUdV“dWdX“dYdZ“d[d\“d]d^“d_d`“dadb“dcdd“i dedf“dgdh“didj“dkdl“dmdn“dodp“dqdr“dsdt“dudv“dwdx“dydz“d{d|“d}d~“dd€“d�d‚“dƒd„“d…d†“¥Z.ee,eef                  e d‡<   ddˆd‰dŠd‹œZ/ee,eef                  e dŒ<   i ddL“d dL“d"dL“d&dL“d(dL“d*dL“d,dL“d.dL“d0dL“d2dQ“d4dQ“d6dL“d8ds“d:dL“d<dL“d>dL“d�dL“dLdLdLdSdudLdLd…dŽœ¥Z0ee,eef                  e d�<   d�d‘d’d“dœZ1ee,eef                  e d”<   dddd•œZ2ee,eef                  e d–<   	 ej3        d—k    rdd˜l3m4Z5 d™ e5¦   «         z   dšz   Z6nƒej3        d›k    r<ddl7Z8 e8j9        ¦   «         Z:e:dœk    rd�Z6n\e:džk    rdŸZ6nSe:d›k    rd Z6nJ e;d¡e:› �¦  «        ‚ej3        d¢k    r&dd˜l3m4Z5  e5¦   «         d£v rd¤Z6nd™ e5¦   «         z   d¥z   Z6n e;d¦¦  «        ‚ddl<Z<ej=         >                    e<j?        ¦  «        Z@ej=         A                    e@e6¦  «        ZB ejC        eB¦  «        ZDnå# e;eEeFf$ rÚ 	  ed§¦  «        ZGeG€ e;d¨¦  «        ‚ ejC        eG¦  «        ZDn­# e;$ r¥ ej3        d—k    rd©ZHnej3        d›k    rdªZHnej3        d¢k    rd«ZHn‚ dd˜l3m4Z5 ej3        d—k    rV e5¦   «         d¬k    rHej=         I                    d­¦  «        rd­nd®ZJ ejC        ej=         A                    eJeH¦  «        ¦  «        ZDn ejC        eH¦  «        ZDY nw xY wY nw xY w ejK        eD L                    ¦   «         ¦  «         M                    d¯d°¦  «        ZNeN O                    d±¦  «        reN ePd±¦  «        d…         ZN	 	 	 	 dèd¶ed·ed¸ed¹edz  dºe*d»eQd¼eRdz  d½e(e)z  dz  d¾edz  d¿edz  dÀedz  dÁedz  dÂedz  dÃeQdÄe"e(e)z  ef         fdÅ„ZS	 	 	 	 déd¶edÆe(d¾edÁedz  dÂedz  dÀedz  dÃeQdÇeRdz  dÈedz  dÄdfdÉ„ZT	 	 	 	 	 	 	 	 dêd¶edÊedz  dËed·ed¸ed¹edz  dºe*d»eQd¼eRdz  d½e(e)z  dz  d¾edz  d¿edz  dÀedz  dÁedz  dÂedz  dÃeQdÄe	e(ddf         e	e)ddf         z  f"dÌ„ZU G dÍ„ dÎ¦  «        ZVdëd¶edÏeQdÄeVfdÐ„ZWdÄe,eef         fdÑ„ZXdìdÀedz  dÄe,eef         fdÒ„ZY	 	 dídÀedÁedz  dÂedz  dÄeQfdÓ„ZZdÀedÄedz  fdÔ„Z[ G dÕ„ dÖ¦  «        Z\dîdØ„Z]dÙ„ Z^dÚ„ Z_dÛ„ Z`dÜ„ ZadÝ„ ZbeDjc        fdÞ„Zddß„ Zedà„ Zfdá„ Zg G dâ„ dãeh¦  «        Zi G dä„ dåeiej¦  «        Zk G dæ„ dçek¦  «        ZldS )ïak  python-soundfile is an audio library based on libsndfile, CFFI and NumPy.

Sound files can be read or written directly using the functions
`read()` and `write()`.
To read a sound file in a block-wise fashion, use `blocks()`.
Alternatively, sound files can be opened as `SoundFile` objects.

For further information, see https://python-soundfile.readthedocs.io/.

z0.14.0é    N)Ú	Generator)Úfind_library)ÚSEEK_CURÚSEEK_ENDÚSEEK_SET)ÚAnyÚBinaryIOÚFinalÚLiteralÚ	TypeAlias)ÚSelf)ÚffiÚFileDescriptorOrPath.Ú	AudioDataÚAudioData_2d)Úfloat64Úfloat32Úint32Úint16Ú	dtype_strÚ_sndÚ_ffié   é   é   é   é   é   é   é   é	   é   )
ÚtitleÚ	copyrightÚsoftwareÚartistÚcommentÚdateÚalbumÚlicenseÚtracknumberÚgenreÚ
_str_typesÚWAVi   ÚAIFFi   ÚAUi   ÚRAWi   ÚPAFi   ÚSVXi   ÚNISTi   ÚVOCi   ÚIRCAMi  
 ÚW64i   ÚMAT4i   ÚMAT5i   ÚPVFi   ÚXIi   ÚHTKi   ÚSDSi   ÚAVRi   i   i   i   i   i   i    i  ! i  " i  # )	ÚWAVEXÚSD2ÚFLACÚCAFÚWVEÚOGGÚMPC2KÚRF64ÚMP3Ú_formatsÚPCM_S8ÚPCM_16ÚPCM_24ÚPCM_32ÚPCM_U8ÚFLOATÚDOUBLEÚULAWÚALAWé   Ú	IMA_ADPCMé   ÚMS_ADPCMé   ÚGSM610é    Ú	VOX_ADPCMé!   ÚNMS_ADPCM_16é"   ÚNMS_ADPCM_24é#   ÚNMS_ADPCM_32é$   ÚG721_32é0   ÚG723_24é1   ÚG723_40é2   ÚDWVW_12é@   ÚDWVW_16éA   ÚDWVW_24éB   ÚDWVW_NéC   ÚDPCM_8éP   ÚDPCM_16éQ   ÚVORBISé`   ÚOPUSéd   ÚALAC_16ép   ÚALAC_20éq   ÚALAC_24ér   ÚALAC_32és   ÚMPEG_LAYER_Ié€   ÚMPEG_LAYER_IIé�   ÚMPEG_LAYER_IIIé‚   Ú	_subtypesi   i    i   0)ÚFILEÚLITTLEÚBIGÚCPUÚ_endiansr?   )r@   rA   rB   rC   rD   rE   rF   rG   Ú_default_subtypesÚdoubleÚfloatÚintÚshortÚ
_ffi_types)ÚCONSTANTÚAVERAGEÚVARIABLEÚ_bitrate_modesÚdarwin)ÚmachineÚlibsndfile_z.dylibÚwin32z	win-arm64zlibsndfile_arm64.dllz	win-amd64zlibsndfile_x64.dllzlibsndfile_x86.dllz no packaged library for Windows Úlinux)Úaarch64Ú
aarch64_beÚarmv8bÚarmv8lzlibsndfile_arm64.soz.soz%no packaged library for this platformÚsndfilez8sndfile library not found using ctypes.util.find_libraryzlibsndfile.dylibzlibsndfile.dllzlibsndfile.soÚarm64z/opt/homebrew/lib/z/usr/local/lib/úutf-8Úreplacezlibsndfile-éÿÿÿÿr   FTÚfileÚframesÚstartÚstopÚdtypeÚ	always_2dÚ
fill_valueÚoutÚ
samplerateÚchannelsÚformatÚsubtypeÚendianÚclosefdÚreturnc           
      óÐ   — t          | d||	|||
|¦  «        5 }|                     |||¦  «        }|                     |||||¦  «        }ddd¦  «         n# 1 swxY w Y   ||j        fS )a  Provide audio data from a sound file as NumPy array.

    By default, the whole file is read from the beginning, but the
    position to start reading can be specified with *start* and the
    number of frames to read can be specified with *frames*.
    Alternatively, a range can be specified with *start* and *stop*.

    If there is less data left in the file than requested, the rest of
    the frames are filled with *fill_value*.
    If no *fill_value* is specified, a smaller array is returned.

    Parameters
    ----------
    file : str or int or file-like object
        The file to read from.  See `SoundFile` for details.
    frames : int, optional
        The number of frames to read. If *frames* is negative, the whole
        rest of the file is read.  Not allowed if *stop* is given.
    start : int, optional
        Where to start reading.  A negative value counts from the end.
    stop : int, optional
        The index after the last frame to be read.  A negative value
        counts from the end.  Not allowed if *frames* is given.
    dtype : {'float64', 'float32', 'int32', 'int16'}, optional
        Data type of the returned array, by default ``'float64'``.
        Floating point audio data is typically in the range from
        ``-1.0`` to ``1.0``.  Integer data is in the range from
        ``-2**15`` to ``2**15-1`` for ``'int16'`` and from ``-2**31`` to
        ``2**31-1`` for ``'int32'``.

        .. note:: Reading int values from a float file will *not*
            scale the data to [-1.0, 1.0). If the file contains
            ``np.array([42.6], dtype='float32')``, you will read
            ``np.array([43], dtype='int32')`` for ``dtype='int32'``.

    Returns
    -------
    audiodata : `numpy.ndarray` or type(out)
        A two-dimensional (frames x channels) NumPy array is returned.
        If the sound file has only one channel, a one-dimensional array
        is returned.  Use ``always_2d=True`` to return a two-dimensional
        array anyway.

        If *out* was specified, it is returned.  If *out* has more
        frames than available in the file (or if *frames* is smaller
        than the length of *out*) and no *fill_value* is given, then
        only a part of *out* is overwritten and a view containing all
        valid frames is returned.
    samplerate : int
        The sample rate of the audio file.

    Other Parameters
    ----------------
    always_2d : bool, optional
        By default, reading a mono sound file will return a
        one-dimensional array.  With ``always_2d=True``, audio data is
        always returned as a two-dimensional array, even if the audio
        file has only one channel.
    fill_value : float, optional
        If more frames are requested than available in the file, the
        rest of the output is be filled with *fill_value*.  If
        *fill_value* is not specified, a smaller array is returned.
    out : `numpy.ndarray` or subclass, optional
        If *out* is specified, the data is written into the given array
        instead of creating a new array.  In this case, the arguments
        *dtype* and *always_2d* are silently ignored!  If *frames* is
        not given, it is obtained from the length of *out*.
    samplerate, channels, format, subtype, endian, closefd
        See `SoundFile`.

    Examples
    --------
    >>> import soundfile as sf
    >>> data, samplerate = sf.read('stereo_file.wav')
    >>> data
    array([[ 0.71329652,  0.06294799],
           [-0.26450912, -0.38874483],
           ...
           [ 0.67398441, -0.11516333]])
    >>> samplerate
    44100

    ÚrN)Ú	SoundFileÚ_prepare_readÚreadr«   )r£   r¤   r¥   r¦   r§   r¨   r©   rª   r«   r¬   r­   r®   r¯   r°   ÚfÚdatas                   úl/home/lighthouse/badge-speaker-benchmark/.benchmark-venv-community/lib/python3.11/site-packages/soundfile.pyr¶   r¶   á   sÆ   € õp 
�4˜˜j¨(Ø˜F F¨Gñ
5ô 
5ð AØ89Ø—’ ¨¨fÑ5Ô5ˆØ�vŠv�f˜e Y°
¸CÑ@Ô@ˆðAð Að Añ Aô Að Að Að Að Að Að Aøøøð Að Að Að Að �”ÐÐs   —1AÁAÁAr¸   Úcompression_levelÚbitrate_modec	                 óú   — ddl }	|	                     |¦  «        }|j        dk    rd}
n|j        d         }
t	          | d||
||||||¦
  «
        5 }|                     |¦  «         ddd¦  «         dS # 1 swxY w Y   dS )a  Write data to a sound file.

    .. note:: If *file* exists, it will be truncated and overwritten!

    Parameters
    ----------
    file : str or int or file-like object
        The file to write to.  See `SoundFile` for details.
    data : array_like
        The data to write.  Usually two-dimensional (frames x channels),
        but one-dimensional *data* can be used for mono files.
        Only the data types ``'float64'``, ``'float32'``, ``'int32'``
        and ``'int16'`` are supported.

        .. note:: The data type of *data* does **not** select the data
                  type of the written file. Audio data will be
                  converted to the given *subtype*. Writing int values
                  to a float file will *not* scale the values to
                  [-1.0, 1.0). If you write the value ``np.array([42],
                  dtype='int32')``, to a ``subtype='FLOAT'`` file, the
                  file will then contain ``np.array([42.],
                  dtype='float32')``.

    samplerate : int
        The sample rate of the audio data.
    subtype : str, optional
        See `default_subtype()` for the default value and
        `available_subtypes()` for all possible values.

    Other Parameters
    ----------------
    format, endian, closefd, compression_level, bitrate_mode
        See `SoundFile`.

    Examples
    --------
    Write 10 frames of random data to a new file:

    >>> import numpy as np
    >>> import soundfile as sf
    >>> sf.write('stereo_file.wav', np.random.randn(10, 2), 44100, 'PCM_24')

    r   Nr   Úw)ÚnumpyÚasarrayÚndimÚshaper´   Úwrite)r£   r¸   r«   r®   r¯   r­   r°   rº   r»   Únpr¬   r·   s               r¹   rÂ   rÂ   A  sÖ   € ð` ÐÐÐØ�:Š:�dÑÔ€DØ„y�A‚~€~Øˆˆà”:˜a”=ˆÝ	�4˜˜j¨(Ø˜F F¨GØ$ lñ
4ô 
4ð à78Ø	�Š�‰Œˆðð ð ñ ô ð ð ð ð ð ð ð øøøð ð ð ð ð ð s   ÁA0Á0A4Á7A4Ú	blocksizeÚoverlapc           
   #   óØ   K  — t          | d|
|||||¦  «        5 }|                     |||¦  «        }|                     |||||||	¦  «        E d{V —† ddd¦  «         dS # 1 swxY w Y   dS )a8  Return a generator for block-wise reading.

    By default, iteration starts at the beginning and stops at the end
    of the file.  Use *start* to start at a later position and *frames*
    or *stop* to stop earlier.

    If you stop iterating over the generator before it's exhausted,
    the sound file is not closed. This is normally not a problem
    because the file is opened in read-only mode. To close the file
    properly, the generator's ``close()`` method can be called.

    Parameters
    ----------
    file : str or int or file-like object
        The file to read from.  See `SoundFile` for details.
    blocksize : int
        The number of frames to read per block.
        Either this or *out* must be given.
    overlap : int, optional
        The number of frames to rewind between each block.

    Yields
    ------
    `numpy.ndarray` or type(out)
        Blocks of audio data.
        If *out* was given, and the requested frames are not an integer
        multiple of the length of *out*, and no *fill_value* was given,
        the last block will be a smaller view into *out*.

    Other Parameters
    ----------------
    frames, start, stop
        See `read()`.
    dtype : {'float64', 'float32', 'int32', 'int16'}, optional
        See `read()`.
    always_2d, fill_value, out
        See `read()`.
    samplerate, channels, format, subtype, endian, closefd
        See `SoundFile`.

    Examples
    --------
    >>> import soundfile as sf
    >>> for block in sf.blocks('stereo_file.wav', blocksize=1024):
    >>>     pass  # do something with 'block'

    r³   N)r´   rµ   Úblocks)r£   rÄ   rÅ   r¤   r¥   r¦   r§   r¨   r©   rª   r«   r¬   r­   r®   r¯   r°   r·   s                    r¹   rÇ   rÇ   |  så   è è € õn 
�4˜˜j¨(Ø˜F F¨Gñ
5ô 
5ð [Ø89Ø—’ ¨¨fÑ5Ô5ˆØ—8’8˜I w°¸¸yÈ*ÐVYÑZÔZÐZÐZÐZÐZÐZÐZÐZð[ð [ð [ñ [ô [ð [ð [ð [ð [ð [ð [ð [øøøð [ð [ð [ð [ð [ð [s   ™9AÁA#Á&A#c                   ó4   — e Zd ZdZd„ Zed„ ¦   «         Zd„ ZdS )Ú_SoundFileInfozInformation about a SoundFilec                 ó®  — || _         t          |¦  «        5 }|j        | _        |j        | _        |j        | _        |j        | _        t          | j        ¦  «        |j        z  | _        |j        | _        |j	        | _	        |j
        | _
        |j        | _        |j        | _        |j        | _        |j        | _        d d d ¦  «         d S # 1 swxY w Y   d S ©N)Úverboser´   Únamer«   r¬   r¤   r�   Údurationr­   r®   r¯   Úformat_infoÚsubtype_infoÚsectionsÚ
extra_info)Úselfr£   rÌ   r·   s       r¹   Ú__init__z_SoundFileInfo.__init__¼  só   € Ø$ˆŒÝ�t‰_Œ_ð 	0 Ø)*¬ˆDŒIØ#$¤<ˆDŒOØ!"¤ˆDŒMØ œxˆDŒKÝ#(¨¬Ñ#5Ô#5°a´lÑ#BˆDŒMØ œxˆDŒKØ !¤	ˆDŒLØ œxˆDŒKØ$%¤MˆDÔØ%&¤^ˆDÔØ!"¤ˆDŒMØ#$¤<ˆDŒOð	0ð 	0ð 	0ñ 	0ô 	0ð 	0ð 	0ð 	0ð 	0ð 	0ð 	0ð 	0øøøð 	0ð 	0ð 	0ð 	0ð 	0ð 	0s   —B&C
Ã
CÃCc                 óØ   — t          | j        d¦  «        \  }}t          |d¦  «        \  }}|dk    r|d›d|d›d|d›d�}n)|dk    r|d›d|d›d	�}n|dk    r| j        d
›d�}n|d›d�}|S )Ni  é<   r   z.0gú:z02.0gz05.3fz hz minÚdz samplesz.3fz s)ÚdivmodrÎ   r¤   )rÓ   ÚhoursÚrestÚminutesÚsecondsrÎ   s         r¹   Ú_duration_strz_SoundFileInfo._duration_strÌ  s¸   € å˜Tœ]¨DÑ1Ô1‰ˆˆtÝ! $¨Ñ+Ô+Ñˆ�Ø�AŠ:ˆ:ØÐGÐGÐG gÐGÐGÐG°gÐGÐGÐGÐGˆHˆHØ˜Š\ˆ\Ø!Ð=Ð=Ð=¨'Ð=Ð=Ð=Ð=ˆHˆHØ˜Š\ˆ\Øœ+Ð1Ð1Ð1Ð1ˆHˆHà!Ð)Ð)Ð)Ð)ˆHØˆó    c                 ó˜  — d                      | j        › d| j        › d�d| j        › �d| j        › �d| j        › d| j        › d�d	| j        › d| j        › d�g¦  «        }| j	        rfd
                      | j
                             d¦  «        ¦  «        }|d                      d| j        › �d| j        › �d| j        › �dd|› d�g¦  «        z  }|S )Nú
zsamplerate: z Hzz
channels: z
duration: zformat: z [ú]z	subtype: z
    z	
endian: z
sections: zframes: zextra_info: """z    z""")ÚjoinrÍ   r«   r¬   rÞ   rÏ   r­   rÐ   r®   rÌ   rÒ   Úsplitr¯   rÑ   r¤   )rÓ   ÚinfoÚindented_extra_infos      r¹   Ú__repr__z_SoundFileInfo.__repr__Ú  s  € Ø�yŠyØ”	ˆ^Ø0˜DœOÐ0Ð0Ð0Ø)˜$œ-Ð)Ð)Ø.˜$Ô,Ð.Ð.Ø:˜Ô(Ð:Ð:¨D¬KÐ:Ð:Ð:Ø=˜Ô*Ð=Ð=¨d¬lÐ=Ð=Ð=ð?ñ@ô @ˆð Œ<ð 	3Ø#-×"3Ò"3°D´O×4IÒ4IÈ$Ñ4OÔ4OÑ"PÔ"PÐØ�D—I’IØ+˜dœkÐ+Ð+Ø-˜dœmÐ-Ð-Ø)˜DœKÐ)Ð)Ø"Ø0Ð+Ð0Ð0Ð0ð	2ñ3ô 3ñ 3ˆDð ˆrß   N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__rÔ   ÚpropertyrÞ   rç   © rß   r¹   rÉ   rÉ   ¹  sS   € € € € € Ø'Ð'ð0ð 0ð 0ð  ðð ñ „Xððð ð ð ð rß   rÉ   rÌ   c                 ó"   — t          | |¦  «        S )zŸReturns an object with information about a `SoundFile`.

    Parameters
    ----------
    verbose : bool
        Whether to print additional information.
    )rÉ   )r£   rÌ   s     r¹   rå   rå   í  s   € õ ˜$ Ñ(Ô(Ð(rß   c                  ód   — t          t          t          j        t          j        ¦  «        ¦  «        S )a©  Return a dictionary of available major formats.

    Examples
    --------
    >>> import soundfile as sf
    >>> sf.available_formats()
    {'FLAC': 'FLAC (FLAC Lossless Audio Codec)',
     'OGG': 'OGG (OGG Container format)',
     'WAV': 'WAV (Microsoft)',
     'AIFF': 'AIFF (Apple/SGI)',
     ...
     'WAVEX': 'WAVEX (Microsoft)',
     'RAW': 'RAW (header-less)',
     'MAT5': 'MAT5 (GNU Octave 2.1 / Matlab 5.0)'}

    )ÚdictÚ_available_formats_helperr   ÚSFC_GET_FORMAT_MAJOR_COUNTÚSFC_GET_FORMAT_MAJORrí   rß   r¹   Úavailable_formatsrô   ø  s3   € õ" Õ)­$Ô*IÝ*.Ô*CñEô Eñ Fô Fð Frß   c                 óh   ‡ — t          t          j        t          j        ¦  «        }ˆ fd„|D ¦   «         S )ad  Return a dictionary of available subtypes.

    Parameters
    ----------
    format : str
        If given, only compatible subtypes are returned.

    Examples
    --------
    >>> import soundfile as sf
    >>> sf.available_subtypes('FLAC')
    {'PCM_24': 'Signed 24 bit PCM',
     'PCM_16': 'Signed 16 bit PCM',
     'PCM_S8': 'Signed 8 bit PCM'}

    c                 ó@   •— i | ]\  }}‰�t          ‰|¦  «        ¯||“ŒS rË   )Úcheck_format)Ú.0r®   rÍ   r­   s      €r¹   ú
<dictcomp>z&available_subtypes.<locals>.<dictcomp>   s<   ø€ ð Dð Dð D™m˜g tØ�>¥\°&¸'Ñ%BÔ%B�>ð �TØ!�>�>rß   )rñ   r   ÚSFC_GET_FORMAT_SUBTYPE_COUNTÚSFC_GET_FORMAT_SUBTYPE)r­   Úsubtypess   ` r¹   Úavailable_subtypesrý     sS   ø€ õ" )­Ô)JÝ)-Ô)DñFô F€HðDð Dð Dð D¨xð Dñ Dô Dð Drß   c                 óp   — 	 t          t          | ||¦  «        ¦  «        S # t          t          f$ r Y dS w xY w)záCheck if the combination of format/subtype/endian is valid.

    Examples
    --------
    >>> import soundfile as sf
    >>> sf.check_format('WAV', 'PCM_24')
    True
    >>> sf.check_format('FLAC', 'VORBIS')
    False

    F)ÚboolÚ_format_intÚ
ValueErrorÚ	TypeError)r­   r®   r¯   s      r¹   r÷   r÷   $  sH   € ðÝ•K ¨°Ñ8Ô8Ñ9Ô9Ð9øÝ�	Ð"ð ð ð Øˆuˆuðøøøs   ‚   5´5c                 óx   — t          | ¦  «         t                               |                      ¦   «         ¦  «        S )zÍReturn the default subtype for a given format.

    Examples
    --------
    >>> import soundfile as sf
    >>> sf.default_subtype('WAV')
    'PCM_16'
    >>> sf.default_subtype('MAT5')
    'DOUBLE'

    )Ú_check_formatr‹   ÚgetÚupper)r­   s    r¹   Údefault_subtyper  7  s.   € õ �&ÑÔÐÝ× Ò  §¢¡¤Ñ0Ô0Ð0rß   c                   ó–  — e Zd ZdZ	 	 	 	 	 	 dVdededz  dedz  dedz  d	edz  d
edz  dedz  dededz  dedz  ddfd„Z	 e
d„ ¦  «        Z	  e
d„ ¦  «        Z	  e
d„ ¦  «        Z	  e
d„ ¦  «        Z	  e
d„ ¦  «        Z	  e
d„ ¦  «        Z	  e
d„ ¦  «        Z	  e
d„ ¦  «        Z	  e
d„ ¦  «        Z	  e
d„ ¦  «        Z	  e
d„ ¦  «        Z	  e
d„ ¦  «        Z	  e
d„ ¦  «        Z	  e
d„ ¦  «        Z	  e
d„ ¦  «        Z	 e
d „ ¦   «         ZdZdefd!„ZdWd"„Zdefd#„Zd$e ddfd%„Z!d&ed'e ddfd(„Z"d&ede fd)„Z#defd*„Z$defd+„Z%defd,„Z&defd-„Z'e(fd.ed/edefd0„Z)defd1„Z*	 	 	 dXd.ed5e+d6ed7edz  d8e,e-z  dz  de,e-z  fd9„Z.dYd.ed5e+dz  de/fd:„Z0d;e1e/z  e z  d5e+defd<„Z2d=e,ddfd>„Z3d=e4d5e+ddfd?„Z5	 	 	 	 dZdAedz  dBed.ed5e+d6ed7edz  d8e,e-z  dz  de6e,ddf         e6e-ddf         z  fdC„Z7d[d.edz  ddfdD„Z8dWdE„Z9dWdF„Z: e;j<        ¦   «         Z=dG„ Z>dH„ Z?dI„ Z@dJ„ ZAdK„ ZBdL„ ZCdM„ ZDdN„ ZEdO„ ZFdP„ ZGdQ„ ZHdR„ ZIdeJeef         fdS„ZKdT„ ZLdU„ ZMdS )\r´   z­A sound file.

    For more documentation see the __init__() docstring (which is also
    used for the online documentation (https://python-soundfile.readthedocs.io/).

    r³   NTr£   Úmoder«   r¬   r®   r¯   r­   r°   rº   r»   r±   c           	      ó  — t          |t          j        ¦  «        rt          j        |¦  «        }|| _        |€"t          |dd¦  «        }|€t          d¦  «        ‚t          |¦  «        }|| _        |	| _	        |
| _
        t          |||||||¦  «        | _        |                      |||¦  «        | _        t          |¦  «                             d¦  «        r)|                      ¦   «         r|                      d¦  «         t&                               | j        t&          j        t,          j        t&          j        ¦  «         | j	        �=|                      | j	        ¦  «         | j
        �|                      | j
        ¦  «         dS dS dS )að  Open a sound file.

        If a file is opened with `mode` ``'r'`` (the default) or
        ``'r+'``, no sample rate, channels or file format need to be
        given because the information is obtained from the file. An
        exception is the ``'RAW'`` data format, which always requires
        these data points.

        File formats consist of three case-insensitive strings:

        * a *major format* which is by default obtained from the
          extension of the file name (if known) and which can be
          forced with the format argument (e.g. ``format='WAVEX'``).
        * a *subtype*, e.g. ``'PCM_24'``. Most major formats have a
          default subtype which is used if no subtype is specified.
        * an *endian-ness*, which doesn't have to be specified at all in
          most cases.

        A `SoundFile` object is a *context manager*, which means
        if used in a "with" statement, `close()` is automatically
        called when reaching the end of the code block inside the "with"
        statement.

        Parameters
        ----------
        file : str or int or file-like object
            The file to open.  This can be a file name, a file
            descriptor or a Python file object (or a similar object with
            the methods ``read()``/``readinto()``, ``write()``,
            ``seek()`` and ``tell()``).
        mode : {'r', 'r+', 'w', 'w+', 'x', 'x+'}, optional
            Open mode.  Has to begin with one of these three characters:
            ``'r'`` for reading, ``'w'`` for writing (truncates *file*)
            or ``'x'`` for writing (raises an error if *file* already
            exists).  Additionally, it may contain ``'+'`` to open
            *file* for both reading and writing.
            The character ``'b'`` for *binary mode* is implied because
            all sound files have to be opened in this mode.
            If *file* is a file descriptor or a file-like object,
            ``'w'`` doesn't truncate and ``'x'`` doesn't raise an error.
        samplerate : int
            The sample rate of the file.  If `mode` contains ``'r'``,
            this is obtained from the file (except for ``'RAW'`` files).
        channels : int
            The number of channels of the file.
            If `mode` contains ``'r'``, this is obtained from the file
            (except for ``'RAW'`` files).
        subtype : str, sometimes optional
            The subtype of the sound file.  If `mode` contains ``'r'``,
            this is obtained from the file (except for ``'RAW'``
            files), if not, the default value depends on the selected
            `format` (see `default_subtype()`).
            See `available_subtypes()` for all possible subtypes for
            a given `format`.
        endian : {'FILE', 'LITTLE', 'BIG', 'CPU'}, sometimes optional
            The endian-ness of the sound file.  If `mode` contains
            ``'r'``, this is obtained from the file (except for
            ``'RAW'`` files), if not, the default value is ``'FILE'``,
            which is correct in most cases.
        format : str, sometimes optional
            The major format of the sound file.  If `mode` contains
            ``'r'``, this is obtained from the file (except for
            ``'RAW'`` files), if not, the default value is determined
            from the file extension.  See `available_formats()` for
            all possible values.
        closefd : bool, optional
            Whether to close the file descriptor on `close()`. Only
            applicable if the *file* argument is a file descriptor.
        compression_level : float, optional
            The compression level on 'write()'. The compression level
            should be between 0.0 (minimum compression level) and 1.0
            (highest compression level).
            See `libsndfile document <https://github.com/libsndfile/libsndfile/blob/c81375f070f3c6764969a738eacded64f53a076e/docs/command.md>`__.
        bitrate_mode : {'CONSTANT', 'AVERAGE', 'VARIABLE'}, optional
            The bitrate mode on 'write()'.
            See `libsndfile document <https://github.com/libsndfile/libsndfile/blob/c81375f070f3c6764969a738eacded64f53a076e/docs/command.md>`__.

        Examples
        --------
        >>> from soundfile import SoundFile

        Open an existing file for reading:

        >>> myfile = SoundFile('existing_file.wav')
        >>> # do something with myfile
        >>> myfile.close()

        Create a new sound file for reading and writing using a with
        statement:

        >>> with SoundFile('new_file.wav', 'x+', 44100, 2) as myfile:
        >>>     # do something with myfile
        >>>     # ...
        >>>     assert not myfile.closed
        >>>     # myfile.close() is called automatically at the end
        >>> assert myfile.closed

        Nr	  z6Can not get `mode` from file. provided `mode` is None.zr+r   )Ú
isinstanceÚ_osÚPathLikeÚfspathÚ_nameÚgetattrr  Ú_check_modeÚ_modeÚ_compression_levelÚ_bitrate_modeÚ_create_info_structÚ_infoÚ_openÚ_fileÚsetÚ
issupersetÚseekableÚseekr   Ú
sf_commandÚSFC_SET_CLIPPINGr   ÚNULLÚSF_TRUEÚ_set_compression_levelÚ_set_bitrate_mode)rÓ   r£   r	  r«   r¬   r®   r¯   r­   r°   rº   r»   Úmode_ints               r¹   rÔ   zSoundFile.__init__O  sp  € õP �d�CœLÑ)Ô)ð 	$Ý”:˜dÑ#Ô#ˆDØˆŒ
Øˆ<Ý˜4 ¨Ñ.Ô.ˆDØˆ|ÝÐ XÑYÔYÐYÝ˜tÑ$Ô$ˆØˆŒ
Ø"3ˆÔØ)ˆÔÝ(¨¨t°ZÀØ)/°¸&ñBô BˆŒ
à—Z’Z  h°Ñ8Ô8ˆŒ
Ýˆt‰9Œ9×Ò Ñ%Ô%ð 	¨$¯-ª-©/¬/ð 	à�IŠI�a‰LŒLˆLÝ�Š˜œ
¥DÔ$9½4¼9Ýœñ	&ô 	&ð 	&ð Ô"Ð.à×'Ò'¨Ô(?Ñ@Ô@Ð@ØÔ!Ð-Ø×&Ò& tÔ'9Ñ:Ô:Ð:Ð:Ð:ð	 /Ð.ð .Ð-rß   c                 ó   — | j         S rË   )r  ©rÓ   s    r¹   ú<lambda>zSoundFile.<lambda>Ò  ó   €  ¤€ rß   c                 ó   — | j         S rË   )r  r%  s    r¹   r&  zSoundFile.<lambda>Ô  r'  rß   c                 ó   — | j         j        S rË   )r  r«   r%  s    r¹   r&  zSoundFile.<lambda>Ö  s   €  t¤zÔ'<€ rß   c                 ó   — | j         j        S rË   ©r  r¤   r%  s    r¹   r&  zSoundFile.<lambda>Ø  s   €  4¤:Ô#4€ rß   c                 ó   — | j         j        S rË   )r  r¬   r%  s    r¹   r&  zSoundFile.<lambda>Ú  ó   €  T¤ZÔ%8€ rß   c                 óN   — t          | j        j        t          j        z  ¦  «        S rË   )Ú_format_strr  r­   r   ÚSF_FORMAT_TYPEMASKr%  s    r¹   r&  zSoundFile.<lambda>Ý  s   € •[ ¤Ô!2µTÔ5LÑ!LÑMÔM€ rß   c                 óN   — t          | j        j        t          j        z  ¦  «        S rË   )r/  r  r­   r   ÚSF_FORMAT_SUBMASKr%  s    r¹   r&  zSoundFile.<lambda>à  ó   € •[ ¤Ô!2µTÔ5KÑ!KÑLÔL€ rß   c                 óN   — t          | j        j        t          j        z  ¦  «        S rË   )r/  r  r­   r   ÚSF_FORMAT_ENDMASKr%  s    r¹   r&  zSoundFile.<lambda>ã  r3  rß   c                 óZ   — t          | j        j        t          j        z  ¦  «        d         S ©Nr   )Ú_format_infor  r­   r   r0  r%  s    r¹   r&  zSoundFile.<lambda>æ  s*   € •\ $¤*Ô"3Ý"&Ô"9ñ#:ñ ;ô ;Ø;<ô>€ rß   c                 óZ   — t          | j        j        t          j        z  ¦  «        d         S r7  )r8  r  r­   r   r2  r%  s    r¹   r&  zSoundFile.<lambda>ê  s*   € •\ $¤*Ô"3Ý"&Ô"8ñ#9ñ :ô :Ø:;ô=€ rß   c                 ó   — | j         j        S rË   )r  rÑ   r%  s    r¹   r&  zSoundFile.<lambda>í  r-  rß   c                 ó   — | j         d u S rË   )r  r%  s    r¹   r&  zSoundFile.<lambda>ï  s   €  4¤:°Ð#5€ rß   c                 ó@   — t                                | j        ¦  «        S rË   )r   Úsf_errorr  r%  s    r¹   r&  zSoundFile.<lambda>ñ  s   € ¥t§}¢}°T´ZÑ'@Ô'@€ rß   c                 ó   — | j         S rË   )r  r%  s    r¹   r&  zSoundFile.<lambda>ó  s	   € ¨dÔ.E€ rß   c                 ó   — | j         S rË   )r  r%  s    r¹   r&  zSoundFile.<lambda>õ  s	   € ¨Ô);€ rß   c                 óø   — t          j        dd¦  «        }t                               | j        t          j        |t          j        |¦  «        ¦  «         t          j        |¦  «                             dd¦  «        S )z8Retrieve the log string generated when opening the file.zchar[]i @  r    r¡   )	r   Únewr   r  r  ÚSFC_GET_LOG_INFOÚsizeofÚstringÚdecode)rÓ   rå   s     r¹   rÒ   zSoundFile.extra_infoø  sc   € õ Œx˜ %Ñ(Ô(ˆÝ�Š˜œ
¥DÔ$9Ø�dœk¨$Ñ/Ô/ñ	1ô 	1ð 	1åŒ{˜4Ñ Ô ×'Ò'¨°Ñ;Ô;Ð;rß   c                 óÐ   — | j         �
d| j         › �nd}|| j        �d| j        › d�ndz  }d| j        ›d| j        ›d| j        › d| j        › d	| j        ›d
| j        ›d| j        ›|› d�S )Nz, compression_level=Ú z, bitrate_mode='ú'z
SoundFile(z, mode=z, samplerate=z, channels=z	, format=z
, subtype=z	, endian=ú))	rº   r»   rÍ   r	  r«   r¬   r­   r®   r¯   )rÓ   Úcompression_settings     r¹   rç   zSoundFile.__repr__  sê   € à"&Ô"8Ð"Dð  O°dÔ6LÐNÐNÐNØJLð 	àØ#'Ô#4Ð#@ð !H°4Ô3DÐ GÐ GÐ GÐ GØFHñ	JÐð@˜TœYð @ð @°´ð @ð @Ø"œoð@ð @Ø:>¼-ð@ð @àœ+ð@ð @à37´<ð@ð @ð œ+ð@ð *=ð@ð @ð @ð 	Arß   c                 ó.   — |                       ¦   «          d S rË   ©Úcloser%  s    r¹   Ú__del__zSoundFile.__del__  ó   € Ø�
Š
‰Œˆˆˆrß   c                 ó   — | S rË   rí   r%  s    r¹   Ú	__enter__zSoundFile.__enter__  s   € Øˆrß   Úargsc                 ó.   — |                       ¦   «          d S rË   rL  )rÓ   rR  s     r¹   Ú__exit__zSoundFile.__exit__  rO  rß   rÍ   Úvaluec                 ó  — |t           v rc|                      ¦   «          t                               | j        t           |         |                     ¦   «         ¦  «        }t          |¦  «         dS t                               | ||¦  «         dS )z:Write text meta-data in the sound file through properties.N)	r-   Ú_check_if_closedr   Úsf_set_stringr  ÚencodeÚ_error_checkÚobjectÚ__setattr__)rÓ   rÍ   rU  Úerrs       r¹   r\  zSoundFile.__setattr__  s|   € à•:ÐÐØ×!Ò!Ñ#Ô#Ð#Ý×$Ò$ T¤Zµ¸DÔ1AØ%*§\¢\¡^¤^ñ5ô 5ˆCå˜ÑÔÐÐÐå×Ò˜t T¨5Ñ1Ô1Ð1Ð1Ð1rß   c                 ó  — |t           v rk|                      ¦   «          t                               | j        t           |         ¦  «        }|r(t          j        |¦  «                             dd¦  «        ndS t          d|›�¦  «        ‚)z9Read text meta-data in the sound file through properties.r    r¡   rG  z$'SoundFile' object has no attribute )	r-   rW  r   Úsf_get_stringr  r   rD  rE  ÚAttributeError)rÓ   rÍ   r¸   s      r¹   Ú__getattr__zSoundFile.__getattr__   s…   € à•:ÐÐØ×!Ò!Ñ#Ô#Ð#Ý×%Ò% d¤jµ*¸TÔ2BÑCÔCˆDØCGÐO•4”;˜tÑ$Ô$×+Ò+¨G°YÑ?Ô?Ð?ÈRÐOå Ø?°tÐ?Ð?ñAô Að Arß   c                 ó   — | j         j        S rË   r+  r%  s    r¹   Ú__len__zSoundFile.__len__*  s   € ð ŒzÔ Ð rß   c                 ó   — dS )NTrí   r%  s    r¹   Ú__bool__zSoundFile.__bool__/  s	   € ð ˆtrß   c                 ó*   — |                       ¦   «         S rË   )re  r%  s    r¹   Ú__nonzero__zSoundFile.__nonzero__4  s   € ð �}Š}‰ŒÐrß   c                 ó6   — | j         j        t          j        k    S )z)Return True if the file supports seeking.)r  r  r   r   r%  s    r¹   r  zSoundFile.seekable9  s   € àŒzÔ"¥d¤lÒ2Ð2rß   r¤   Úwhencec                 ó˜   — |                       ¦   «          t                               | j        ||¦  «        }t	          | j        ¦  «         |S )aÜ  Set the read/write position.

        Parameters
        ----------
        frames : int
            The frame index or offset to seek.
        whence : {SEEK_SET, SEEK_CUR, SEEK_END}, optional
            By default (``whence=SEEK_SET``), *frames* are counted from
            the beginning of the file.
            ``whence=SEEK_CUR`` seeks from the current position
            (positive and negative values are allowed for *frames*).
            ``whence=SEEK_END`` seeks from the end (use negative value
            for *frames*).

        Returns
        -------
        int
            The new absolute read/write position in frames.

        Examples
        --------
        >>> from soundfile import SoundFile, SEEK_END
        >>> myfile = SoundFile('stereo_file.wav')

        Seek to the beginning of the file:

        >>> myfile.seek(0)
        0

        Seek to the end of the file:

        >>> myfile.seek(0, SEEK_END)
        44100  # this is the file length

        )rW  r   Úsf_seekr  rZ  Ú
_errorcode)rÓ   r¤   ri  Úpositions       r¹   r  zSoundFile.seek=  sC   € ðH 	×ÒÑÔÐÝ—<’< ¤
¨F°FÑ;Ô;ˆÝ�T”_Ñ%Ô%Ð%Øˆrß   c                 ó8   — |                       dt          ¦  «        S )z'Return the current read/write position.r   )r  r   r%  s    r¹   ÚtellzSoundFile.tellf  s   € à�yŠy˜�HÑ%Ô%Ð%rß   r¢   r   Fr§   r¨   r©   rª   c                 ó2  — |€.|                       ||¦  «        }|                      |||¦  «        }n(|dk     s|t          |¦  «        k    rt          |¦  «        }|                      d||¦  «        }t          |¦  «        |k    r|€|d|…         }n|||d…<   |S )a  Read from the file and return data as NumPy array.

        Reads the given number of frames in the given data format
        starting at the current read/write position.  This advances the
        read/write position by the same number of frames.
        By default, all frames from the current read/write position to
        the end of the file are returned.
        Use `seek()` to move the current read/write position.

        Parameters
        ----------
        frames : int, optional
            The number of frames to read. If ``frames < 0``, the whole
            rest of the file is read.
        dtype : {'float64', 'float32', 'int32', 'int16'}, optional
            Data type of the returned array, by default ``'float64'``.
            Floating point audio data is typically in the range from
            ``-1.0`` to ``1.0``. Integer data is in the range from
            ``-2**15`` to ``2**15-1`` for ``'int16'`` and from
            ``-2**31`` to ``2**31-1`` for ``'int32'``.

            .. note:: Reading int values from a float file will *not*
                scale the data to [-1.0, 1.0). If the file contains
                ``np.array([42.6], dtype='float32')``, you will read
                ``np.array([43], dtype='int32')`` for
                ``dtype='int32'``.

        Returns
        -------
        audiodata : `numpy.ndarray` or type(out)
            A two-dimensional NumPy (frames x channels) array is
            returned. If the sound file has only one channel, a
            one-dimensional array is returned. Use ``always_2d=True``
            to return a two-dimensional array anyway.

            If *out* was specified, it is returned. If *out* has more
            frames than available in the file (or if *frames* is
            smaller than the length of *out*) and no *fill_value* is
            given, then only a part of *out* is overwritten and a view
            containing all valid frames is returned.

        Other Parameters
        ----------------
        always_2d : bool, optional
            By default, reading a mono sound file will return a
            one-dimensional array. With ``always_2d=True``, audio data
            is always returned as a two-dimensional array, even if the
            audio file has only one channel.
        fill_value : float, optional
            If more frames are requested than available in the file,
            the rest of the output is be filled with *fill_value*. If
            *fill_value* is not specified, a smaller array is
            returned.
        out : `numpy.ndarray` or subclass, optional
            If *out* is specified, the data is written into the given
            array instead of creating a new array. In this case, the
            arguments *dtype* and *always_2d* are silently ignored! If
            *frames* is not given, it is obtained from the length of
            *out*.

        Examples
        --------
        >>> from soundfile import SoundFile
        >>> myfile = SoundFile('stereo_file.wav')

        Reading 3 frames from a stereo file:

        >>> myfile.read(3)
        array([[ 0.71329652,  0.06294799],
               [-0.26450912, -0.38874483],
               [ 0.67398441, -0.11516333]])
        >>> myfile.close()

        See Also
        --------
        buffer_read, .write

        Nr   r¶   )Ú_check_framesÚ_create_empty_arrayÚlenÚ	_array_io)rÓ   r¤   r§   r¨   r©   rª   s         r¹   r¶   zSoundFile.readk  s©   € ðb ˆ;Ø×'Ò'¨°
Ñ;Ô;ˆFØ×*Ò*¨6°9¸eÑDÔDˆCˆCà˜Šzˆz˜V¥c¨#¡h¤hÒ.Ð.Ý˜S™œ�Ø—’ ¨¨VÑ4Ô4ˆÝˆs‰8Œ8�fÒÐØÐ!Ø˜'˜6˜'”l��à)��F�G�G‘Øˆ
rß   c                 ó  — |                       |d¬¦  «        }|                      |¦  «        }t          j        |dz   || j        z  ¦  «        }|                      d|||¦  «        }||k    sJ ‚t          j        |¦  «        S )a‘  Read from the file and return data as buffer object.

        Reads the given number of *frames* in the given data format
        starting at the current read/write position.  This advances the
        read/write position by the same number of frames.
        By default, all frames from the current read/write position to
        the end of the file are returned.
        Use `seek()` to move the current read/write position.

        Parameters
        ----------
        frames : int, optional
            The number of frames to read. If ``frames < 0``, the whole
            rest of the file is read.
        dtype : {'float64', 'float32', 'int32', 'int16'}
            Audio data will be converted to the given data type.

        Returns
        -------
        buffer
            A buffer containing the read data.

        See Also
        --------
        buffer_read_into, .read, buffer_write

        N)r©   z[]r¶   )rq  Ú_check_dtyper   rA  r¬   Ú	_cdata_ioÚbuffer)rÓ   r¤   r§   ÚctypeÚcdataÚread_framess         r¹   Úbuffer_readzSoundFile.buffer_readË  sƒ   € ð8 ×#Ò# F°tÐ#Ñ<Ô<ˆØ×!Ò! %Ñ(Ô(ˆÝ”˜ ™ v°´Ñ'=Ñ>Ô>ˆØ—n’n V¨U°E¸6ÑBÔBˆØ˜fÒ$Ð$Ð$Ð$ÝŒ{˜5Ñ!Ô!Ð!rß   rx  c                 ó’   — |                       |¦  «        }|                      ||¦  «        \  }}|                      d|||¦  «        }|S )a�  Read from the file into a given buffer object.

        Fills the given *buffer* with frames in the given data format
        starting at the current read/write position (which can be
        changed with `seek()`) until the buffer is full or the end
        of the file is reached.  This advances the read/write position
        by the number of frames that were read.

        Parameters
        ----------
        buffer : writable buffer
            Audio frames from the file are written to this buffer.
        dtype : {'float64', 'float32', 'int32', 'int16'}
            The data type of *buffer*.

        Returns
        -------
        int
            The number of frames that were read from the file.
            This can be less than the size of *buffer*.
            The rest of the buffer is not filled with meaningful data.

        See Also
        --------
        buffer_read, .read

        r¶   )rv  Ú_check_bufferrw  )rÓ   rx  r§   ry  rz  r¤   s         r¹   Úbuffer_read_intozSoundFile.buffer_read_intoî  sL   € ð8 ×!Ò! %Ñ(Ô(ˆØ×*Ò*¨6°5Ñ9Ô9‰ˆˆvØ—’ ¨¨u°fÑ=Ô=ˆØˆrß   r¸   c                 óÔ   — ddl }|                     |¦  «        }|                      d|t          |¦  «        ¦  «        }|t          |¦  «        k    sJ ‚|                      |¦  «         dS )aø  Write audio data from a NumPy array to the file.

        Writes a number of frames at the read/write position to the
        file. This also advances the read/write position by the same
        number of frames and enlarges the file if necessary.

        Note that writing int values to a float file will *not* scale
        the values to [-1.0, 1.0). If you write the value
        ``np.array([42], dtype='int32')``, to a ``subtype='FLOAT'``
        file, the file will then contain ``np.array([42.],
        dtype='float32')``.

        Parameters
        ----------
        data : array_like
            The data to write. Usually two-dimensional (frames x
            channels), but one-dimensional *data* can be used for mono
            files. Only the data types ``'float64'``, ``'float32'``,
            ``'int32'`` and ``'int16'`` are supported.

            .. note:: The data type of *data* does **not** select the
                  data type of the written file. Audio data will be
                  converted to the given *subtype*. Writing int values
                  to a float file will *not* scale the values to
                  [-1.0, 1.0). If you write the value ``np.array([42],
                  dtype='int32')``, to a ``subtype='FLOAT'`` file, the
                  file will then contain ``np.array([42.],
                  dtype='float32')``.

        Examples
        --------
        >>> import numpy as np
        >>> from soundfile import SoundFile
        >>> myfile = SoundFile('stereo_file.wav')

        Write 10 frames of random data to a new file:

        >>> with SoundFile('stereo_file.wav', 'w', 44100, 2, 'PCM_24') as f:
        >>>     f.write(np.random.randn(10, 2))

        See Also
        --------
        buffer_write, .read

        r   NrÂ   )r¾   Úascontiguousarrayrt  rs  Ú_update_frames)rÓ   r¸   rÃ   Úwrittens       r¹   rÂ   zSoundFile.write  sr   € ð\ 	ÐÐÐð ×#Ò# DÑ)Ô)ˆØ—.’. ¨$µ°D±	´	Ñ:Ô:ˆØ�#˜d™)œ)Ò#Ð#Ð#Ð#Ø×Ò˜GÑ$Ô$Ð$Ð$Ð$rß   c                 óÌ   — |                       |¦  «        }|                      ||¦  «        \  }}|                      d|||¦  «        }||k    sJ ‚|                      |¦  «         dS )a€  Write audio data from a buffer/bytes object to the file.

        Writes the contents of *data* to the file at the current
        read/write position.
        This also advances the read/write position by the number of
        frames that were written and enlarges the file if necessary.

        Parameters
        ----------
        data : buffer or bytes
            A buffer or bytes object containing the audio data to be
            written.
        dtype : {'float64', 'float32', 'int32', 'int16'}
            The data type of the audio data stored in *data*.

        See Also
        --------
        .write, buffer_read

        rÂ   N)rv  r~  rw  r‚  )rÓ   r¸   r§   ry  rz  r¤   rƒ  s          r¹   Úbuffer_writezSoundFile.buffer_writeE  sr   € ð* ×!Ò! %Ñ(Ô(ˆØ×*Ò*¨4°Ñ7Ô7‰ˆˆvØ—.’. ¨%°¸Ñ?Ô?ˆØ˜&Ò Ð Ð Ð Ø×Ò˜GÑ$Ô$Ð$Ð$Ð$rß   r   rÄ   rÅ   c           	   #   óà  K  — ddl }d| j        vrd| j        vrt          d¦  «        ‚|                      ||¦  «        }|€?|€t	          d¦  «        ‚|�|nt          ||¦  «        }	|                      |	||¦  «        }d}
n"|�t	          d¦  «        ‚t          |¦  «        }d	}
d}|dk    rÅ|€d}nt          |¦  «        }||d|…<   t          ||z
  |¦  «        }|                      ||||||d…         ¦  «         |r1|€| 	                    || d…         ¦  «        }n|| d…         |dd…<   |||z   k    r|€|d||z   …         }n|}|
r| 	                    |¦  «        n|V — ||z  }|dk    °ÃdS dS )
aÆ  Return a generator for block-wise reading.

        By default, the generator yields blocks of the given
        *blocksize* (using a given *overlap*) until the end of the file
        is reached; *frames* can be used to stop earlier.

        Parameters
        ----------
        blocksize : int
            The number of frames to read per block. Either this or *out*
            must be given.
        overlap : int, optional
            The number of frames to rewind between each block.
        frames : int, optional
            The number of frames to read.
            If ``frames < 0``, the file is read until the end.
        dtype : {'float64', 'float32', 'int32', 'int16'}, optional
            See `read()`.

        Yields
        ------
        `numpy.ndarray` or type(out)
            Blocks of audio data.
            If *out* was given, and the requested frames are not an
            integer multiple of the length of *out*, and no
            *fill_value* was given, the last block will be a smaller
            view into *out*.


        Other Parameters
        ----------------
        always_2d, fill_value, out
            See `read()`.
        fill_value : float, optional
            See `read()`.
        out : `numpy.ndarray` or subclass, optional
            If *out* is specified, the data is written into the given
            array instead of creating a new array. In this case, the
            arguments *dtype* and *always_2d* are silently ignored!

        Examples
        --------
        >>> from soundfile import SoundFile
        >>> with SoundFile('stereo_file.wav') as f:
        >>>     for block in f.blocks(blocksize=1024):
        >>>         pass  # do something with 'block'

        r   Nr³   ú+z*blocks() is not allowed in write-only modez)One of {blocksize, out} must be specifiedTz-Only one of {blocksize, out} may be specifiedF)
r¾   r	  ÚSoundFileRuntimeErrorrq  r  Úminrr  rs  r¶   Úcopy)rÓ   rÄ   rÅ   r¤   r§   r¨   r©   rª   rÃ   Úout_sizeÚcopy_outÚoverlap_memoryÚoutput_offsetÚtoreadÚblocks                  r¹   rÇ   zSoundFile.blocks`  sí  è è € ðh 	ÐÐÐà�d”iÐÐ C¨t¬yÐ$8Ð$8Ý'Ð(TÑUÔUÐUà×#Ò# F¨JÑ7Ô7ˆØˆ;ØÐ ÝÐ KÑLÔLÐLØ$.Ð$:�y�yÅÀIÈvÑ@VÔ@VˆHØ×*Ò*¨8°YÀÑFÔFˆCØˆHˆHàÐ$ÝØCñEô Eð Eå˜C™œˆIØˆHàˆØ�qŠjˆjØÐ%Ø !��å # NÑ 3Ô 3�Ø&4��N�]�NÑ#å˜ ]Ñ2°FÑ;Ô;ˆFØ�IŠI�f˜e Y°
¸CÀÀÀÔ<OÑPÔPÐPàð 7Ø!Ð)Ø%'§W¢W¨S°'°°°¬^Ñ%<Ô%<�N�Nà(+¨W¨H¨I¨I¬�N 1 1 1Ñ%à˜6 GÑ+Ò+Ð+°
Ð0BØÐ-˜V gÑ-Ð-Ô.��à�Ø$,Ð7�"—'’'˜%‘.”.�.°%Ð7Ð7Ð7Ø�fÑˆFð+ �qŠjˆjˆjˆjˆjˆjrß   c                 óN  — |€|                       ¦   «         }t                               | j        t          j        t          j        d|¦  «        t          j        d¦  «        ¦  «        }|r/t                               | j        ¦  «        }t          |d¦  «        ‚|| j
        _        dS )an  Truncate the file to a given number of frames.

        After this command, the read/write position will be at the new
        end of the file.

        Parameters
        ----------
        frames : int, optional
            Only the data before *frames* is kept, the rest is deleted.
            If not specified, the current read/write position is used.

        Nzsf_count_t*Ú
sf_count_tzError truncating the file)ro  r   r  r  ÚSFC_FILE_TRUNCATEr   rA  rC  r=  ÚLibsndfileErrorr  r¤   )rÓ   r¤   r]  s      r¹   ÚtruncatezSoundFile.truncate¿  s�   € ð ˆ>Ø—Y’Y‘[”[ˆFÝ�oŠo˜dœj­$Ô*@Ý"œh }°fÑ=Ô=Ý"œk¨,Ñ7Ô7ñ9ô 9ˆð ð 	Då—-’- ¤
Ñ+Ô+ˆCÝ! #Ð'BÑCÔCÐCØ"ˆŒ
ÔÐÐrß   c                 ól   — |                       ¦   «          t                               | j        ¦  «         dS )aj  Write unwritten data to the file system.

        Data written with `write()` is not immediately written to
        the file system but buffered in memory to be written at a later
        time.  Calling `flush()` makes sure that all changes are
        actually written to the file system.

        This has no effect on files opened in read-only mode.

        N)rW  r   Úsf_write_syncr  r%  s    r¹   ÚflushzSoundFile.flush×  s2   € ð 	×ÒÑÔÐÝ×Ò˜4œ:Ñ&Ô&Ð&Ð&Ð&rß   c                 óª   — | j         sK|                      ¦   «          t                               | j        ¦  «        }d| _        t          |¦  «         dS dS )z.Close the file.  Can be called multiple times.N)Úclosedr˜  r   Úsf_closer  rZ  )rÓ   r]  s     r¹   rM  zSoundFile.closeå  sQ   € àŒ{ð 	à�JŠJ‰LŒLˆLÝ—-’- ¤
Ñ+Ô+ˆCØˆDŒJÝ˜ÑÔÐÐÐð	ð 	rß   c                 ó
  ‡ ‡— t          |t          t          f¦  «        �r	t          j                             |¦  «        r…d‰ j        v rt          d‰ j        ›�¦  «        ‚t          ‰ j        ¦  «         
                    d¦  «        r>t          j        t          j        |t          j        t          j        z  ¦  «        ¦  «         t          j        }t          |t          ¦  «        rCt"          j        dk    rt          j        }no|                     t#          j        ¦   «         ¦  «        }nHt          |t,          ¦  «        rˆfd„}n-t/          ||¦  «        rˆ fd„}nt1          d‰ j        ›�¦  «        ‚‰ j        5   |||‰ j        ¦  «        }|t6          j        k    r4t                               |¦  «        }t=          |d‰ j        ›d	�¬
¦  «        ‚	 ddd¦  «         n# 1 swxY w Y   |t          j        k    rd‰ j        _         |S )z9Call the appropriate sf_open*() function from libsndfile.ÚxzFile exists: zw+r˜   c                 ó>   •— t                                | ||‰¦  «        S rË   )r   Ú
sf_open_fd)r£   r#  rå   r°   s      €r¹   r&  z!SoundFile._open.<locals>.<lambda>  s   ø€ ½¿ºÈÈhÐX\Ð^eÑ8fÔ8f€ rß   c                 óx   •— t                                ‰                     | ¦  «        ||t          j        ¦  «        S rË   )r   Úsf_open_virtualÚ_init_virtual_ior   r  )r£   r#  rå   rÓ   s      €r¹   r&  z!SoundFile._open.<locals>.<lambda>  s3   ø€ ½×8LÒ8LÈT×MbÒMbÐcgÑMhÔMhØ,4°d½D¼Iñ9Gô 9G€ rß   zInvalid file: zError opening z: ©ÚprefixNr   )!r  ÚstrÚbytesr  ÚpathÚisfiler	  ÚOSErrorrÍ   r  r  rM  ÚopenÚO_WRONLYÚO_TRUNCr   Úsf_openÚ_sysÚplatformÚsf_wchar_openrY  ÚgetfilesystemencodingrŽ   Ú_has_virtual_io_attrsr  Ú_sf_error_lockr  r   r  r=  r”  Ú	SFM_WRITEr¤   )rÓ   r£   r#  r°   ÚopenfunctionÚfile_ptrr]  s   `  `   r¹   r  zSoundFile._openõ  s<  øø€ å�d�S¥%˜LÑ)Ô)ñ 	<ÝŒx�Š˜tÑ$Ô$ð JØ˜$œ)Ð#Ð#Ý!Ð"?°$´)Ð"?Ð"?Ñ@Ô@Ð@Ý˜œ‘^”^×.Ò.¨tÑ4Ô4ð Jå”I�cœh t­S¬\½C¼KÑ-GÑHÔHÑIÔIÐIÝœ<ˆLÝ˜$¥Ñ$Ô$ð EÝ”= GÒ+Ð+Ý#'Ô#5�L�LàŸ;š;¥tÔ'AÑ'CÔ'CÑDÔD�DøÝ˜�cÑ"Ô"ð 	<ØfÐfÐfÐfˆLˆLÝ" 4¨Ñ2Ô2ð 	<ðGð Gð Gð GˆLˆLõ Ð:¨T¬YÐ:Ð:Ñ;Ô;Ð;àÔ ð 	Tð 	TØ#�| D¨(°D´JÑ?Ô?ˆHØ�4œ9Ò$Ð$Ý—m’m HÑ-Ô-�Ý% cÐ2RÀ4Ä9Ð2RÐ2RÐ2RÐSÑSÔSÐSð %ð	Tð 	Tð 	Tñ 	Tô 	Tð 	Tð 	Tð 	Tð 	Tð 	Tð 	Tøøøð 	Tð 	Tð 	Tð 	Tð
 •t”~Ò%Ð%ð !"ˆDŒJÔð ˆs   Å8AGÇG Ç#G c                 óˆ  ‡— t          j        d¦  «        ˆfd„¦   «         }t          j        d¦  «        ˆfd„¦   «         }t          j        d¦  «        ˆfd„¦   «         }t          j        d¦  «        ˆfd„¦   «         }t          j        d	¦  «        ˆfd
„¦   «         }|||||dœ| _        t          j        d| j        ¦  «        S )z4Initialize callback functions for sf_open_virtual().Úsf_vio_get_filelenc                 óÄ   •— ‰                      ¦   «         }‰                     dt          ¦  «         ‰                      ¦   «         }‰                     |t          ¦  «         |S ©Nr   )ro  r  r   r   )Ú	user_dataÚcurrÚsizer£   s      €r¹   Úvio_get_filelenz3SoundFile._init_virtual_io.<locals>.vio_get_filelen  sJ   ø€ à—9’9‘;”;ˆDØ�IŠI�a�Ñ"Ô"Ð"Ø—9’9‘;”;ˆDØ�IŠI�d�HÑ%Ô%Ð%ØˆKrß   Úsf_vio_seekc                 óX   •— ‰                      | |¦  «         ‰                     ¦   «         S rË   )r  ro  )Úoffsetri  r»  r£   s      €r¹   Úvio_seekz,SoundFile._init_virtual_io.<locals>.vio_seek$  s%   ø€ à�IŠI�f˜fÑ%Ô%Ð%Ø—9’9‘;”;Ðrß   Úsf_vio_readc                 ó   •— 	 t          j        | |¦  «        }‰                     |¦  «        }nP# t          $ rC ‰                     |¦  «        }t          |¦  «        }t          j        | |¦  «        }||d|…<   Y nw xY w|S rº  )r   rx  Úreadintor`  r¶   rs  )ÚptrÚcountr»  ÚbufÚ	data_readr¸   r£   s         €r¹   Úvio_readz,SoundFile._init_virtual_io.<locals>.vio_read)  s�   ø€ ð(Ý”k # uÑ-Ô-�Ø ŸMšM¨#Ñ.Ô.�	�	øÝ!ð (ð (ð (Ø—y’y Ñ'Ô'�Ý ™IœI�	Ý”k # yÑ1Ô1�Ø#'��A�i�KÑ Ð Ð ð	(øøøð
 Ðs   ƒ*. ®A
A;Á:A;Úsf_vio_writec                 óx   •— t          j        | |¦  «        }|d d …         }‰                     |¦  «        }|€|}|S rË   )r   rx  rÂ   )rÆ  rÇ  r»  rÈ  r¸   rƒ  r£   s         €r¹   Ú	vio_writez-SoundFile._init_virtual_io.<locals>.vio_write6  sA   ø€ å”+˜c 5Ñ)Ô)ˆCØ�q�q�q”6ˆDØ—j’j Ñ&Ô&ˆGàˆØ�ØˆNrß   Úsf_vio_tellc                 ó,   •— ‰                      ¦   «         S rË   )ro  )r»  r£   s    €r¹   Úvio_tellz,SoundFile._init_virtual_io.<locals>.vio_tell@  s   ø€ à—9’9‘;”;Ðrß   )Úget_filelenr  r¶   rÂ   ro  zSF_VIRTUAL_IO*)r   ÚcallbackÚ_virtual_iorA  )rÓ   r£   r¾  rÂ  rÊ  rÍ  rÐ  s    `     r¹   r¢  zSoundFile._init_virtual_io  s*  ø€ å	ŒÐ+Ñ	,Ô	,ð	ð 	ð 	ð 	ñ 
-Ô	,ð	õ 
Œ�}Ñ	%Ô	%ð	ð 	ð 	ð 	ñ 
&Ô	%ð	õ 
Œ�}Ñ	%Ô	%ð
	ð 
	ð 
	ð 
	ñ 
&Ô	%ð
	õ 
Œ�~Ñ	&Ô	&ð	ð 	ð 	ð 	ñ 
'Ô	&ð	õ 
Œ�}Ñ	%Ô	%ð	ð 	ð 	ð 	ñ 
&Ô	%ð	ð ,;Ø$,Ø$,Ø%.Ø$,ð	.ð .ˆÔõ ŒxÐ(¨$Ô*:Ñ;Ô;Ð;rß   c                 ó   — t           S )z€Return all attributes used in __setattr__ and __getattr__.

        This is useful for auto-completion (e.g. IPython).

        )r-   r%  s    r¹   Ú_getAttributeNameszSoundFile._getAttributeNamesM  s
   € õ Ðrß   c                 ó2   — | j         rt          d¦  «        ‚dS )z…Check if the file is closed and raise an error if it is.

        This should be used in every method that uses self._file.

        zI/O operation on closed fileN)rš  rˆ  r%  s    r¹   rW  zSoundFile._check_if_closedU  s*   € ð Œ;ð 	HÝ'Ð(FÑGÔGÐGð	Hð 	Hrß   c                 ó²   — |                       ¦   «         r-| j        |                      ¦   «         z
  }|dk     s||k    r|€|}n|dk     rt          d¦  «        ‚|S )z8Reduce frames to no more than are available in the file.r   Nz/frames must be specified for non-seekable files)r  r¤   ro  r  )rÓ   r¤   r©   Úremaining_framess       r¹   rq  zSoundFile._check_frames^  se   € à�=Š=‰?Œ?ð 	PØ#œ{¨T¯YªY©[¬[Ñ8ÐØ˜Šzˆz˜fÐ'7Ò7Ð7Ø(Ð0Ø)�øØ�aŠZˆZÝÐNÑOÔOÐOØˆrß   c                 ó,  — |t                                ¦   «         v sJ ‚t          |t          ¦  «        st	          j        |¦  «        }t          t          |¦  «        | j        t	          j	        |¦  «        z  ¦  «        \  }}|rt          d¦  «        ‚||fS )z1Convert buffer to cdata and check for valid size.z*Data size must be a multiple of frame size)r�   Úvaluesr  r¦  r   Úfrom_bufferrÙ   rs  r¬   rC  r  )rÓ   r¸   ry  r¤   Ú	remainders        r¹   r~  zSoundFile._check_bufferi  s•   € à�
×)Ò)Ñ+Ô+Ð+Ð+Ð+Ð+Ý˜$¥Ñ&Ô&ð 	*ÝÔ# DÑ)Ô)ˆDÝ"¥3 t¡9¤9Ø#'¤=µ4´;¸uÑ3EÔ3EÑ#EñGô GÑˆ�	àð 	KÝÐIÑJÔJÐJØ�Vˆ|Ðrß   c                 ón   — ddl }|s| j        dk    r
|| j        f}n|f}|                     ||d¬¦  «        S )z-Create an empty array with appropriate shape.r   Nr   ÚC)Úorder)r¾   r¬   Úempty)rÓ   r¤   r¨   r§   rÃ   rÁ   s         r¹   rr  zSoundFile._create_empty_arrayt  sO   € àÐÐÐØð 	˜œ¨Ò)Ð)Ø˜DœMÐ)ˆEˆEà�GˆEØ�xŠx˜˜u¨CˆxÑ0Ô0Ð0rß   c                 ó¬   — 	 t           |         S # t          $ r: t          dt          t                                ¦   «         ¦  «        ›d|›�¦  «        ‚w xY w)z7Check if dtype string is valid and return ctype string.zdtype must be one of z	 and not )r�   ÚKeyErrorr  ÚsortedÚkeys)rÓ   r§   s     r¹   rv  zSoundFile._check_dtype}  sd   € ð	fÝ˜eÔ$Ð$øÝð 	fð 	fð 	fÝÐdµV½J¿OºOÑ<MÔ<MÑ5NÔ5NÐdÐdÐ[`ÐdÐdÑeÔeÐeð	føøøs
   ‚ �AAc           	      ó2  — |j         dvr(t          d|j        ›d|j         dk     rdnd› d�¦  «        ‚|j         dk    rdn|j        d         }|| j        k    r#t          d|j        ›d| j        › d	|› d�¦  «        ‚|j        j        st          d
¦  «        ‚|                      |j        j        ¦  «        }|j        j	        t          j        |¦  «        k    sJ ‚t          j        |dz   |j        d         d         ¦  «        }|                      ||||¦  «        S )z+Check array and call low-level IO function.)r   r   zInvalid shape: z (r   z0 dimensions not supportedztoo many dimensionsrI  z (Expected z channels, got zData must be C-contiguousÚ*r¸   r   )rÀ   r  rÁ   r¬   ÚflagsÚc_contiguousrv  r§   rÍ   Úitemsizer   rC  ÚcastÚ__array_interface__rw  )rÓ   ÚactionÚarrayr¤   Úarray_channelsry  rz  s          r¹   rt  zSoundFile._array_io„  sK  € àŒ:˜UÐ"Ð"Ýð  M¨u¬{ð  Mð  MÐ`eÔ`jÐmnÒ`nÐ`nÐ@\Ð@\ð  uJð  Mð  Mð  Mñ  Nô  Nð  NØ#œj¨Ašo˜o˜˜°5´;¸q´>ˆØ˜Tœ]Ò*Ð*ÝÐx¨u¬{ÐxÐxÈÌÐxÐxÐguÐxÐxÐxÑyÔyÐyØŒ{Ô'ð 	:ÝÐ8Ñ9Ô9Ð9Ø×!Ò! %¤+Ô"2Ñ3Ô3ˆØŒ{Ô#¥t¤{°5Ñ'9Ô'9Ò9Ð9Ð9Ð9Ý”	˜% #™+ uÔ'@ÀÔ'HÈÔ'KÑLÔLˆØ�~Š~˜f e¨U°FÑ;Ô;Ð;rß   c                 ó¨  — |t                                ¦   «         v sJ ‚|                      ¦   «          d}|                      ¦   «         r|                      ¦   «         }t          t          d|z   dz   |z   ¦  «        } || j        ||¦  «        }t          | j	        ¦  «         |                      ¦   «         r|  
                    ||z   t          ¦  «         |S )z.Call one of libsndfile's read/write functions.r   Úsf_Úf_)r�   rÚ  rW  r  ro  r  r   r  rZ  rl  r  r   )rÓ   rì  r¸   ry  r¤   r¼  Úfuncs          r¹   rw  zSoundFile._cdata_io’  sÂ   € à�
×)Ò)Ñ+Ô+Ð+Ð+Ð+Ð+Ø×ÒÑÔÐØˆØ�=Š=‰?Œ?ð 	Ø—9’9‘;”;ˆDÝ•t˜U V™^¨dÑ2°UÑ:Ñ;Ô;ˆØ��d”j $¨Ñ/Ô/ˆÝ�T”_Ñ%Ô%Ð%Ø�=Š=‰?Œ?ð 	/Ø�IŠI�d˜V‘m¥XÑ.Ô.Ð.Øˆrß   c                 ó  — |                       ¦   «         rV|                      ¦   «         }|                      dt          ¦  «        | j        _        |                      |t          ¦  «         dS | j        xj        |z  c_        dS )z!Update self.frames after writing.r   N)r  ro  r  r   r  r¤   r   )rÓ   rƒ  r¼  s      r¹   r‚  zSoundFile._update_frames   sm   € à�=Š=‰?Œ?ð 	)Ø—9’9‘;”;ˆDØ $§	¢	¨!­XÑ 6Ô 6ˆDŒJÔØ�IŠI�d�HÑ%Ô%Ð%Ð%Ð%àŒJÐÔ Ñ(ÐÔÐÐrß   c                 ób  — |dk    r#|                       ¦   «         st          d¦  «        ‚|dk    r|�t          d¦  «        ‚t          ||¦  «                             | j        ¦  «        \  }}}||k     r|}|dk     r||z
  }|                       ¦   «         r|                      |t          ¦  «         |S )z)Seek to start frame and calculate length.r   z(start is only allowed for seekable filesNz&Only one of {frames, stop} may be used)r  r  r  ÚsliceÚindicesr¤   r  r   )rÓ   r¥   r¦   r¤   Ú_s        r¹   rµ   zSoundFile._prepare_read©  s±   € à�AŠ:ˆ:˜dŸmšm™oœoˆ:ÝÐGÑHÔHÐHØ�QŠ;ˆ;˜4Ð+ÝÐDÑEÔEÐEå˜u dÑ+Ô+×3Ò3°D´KÑ@Ô@‰ˆˆt�QØ�%Š<ˆ<ØˆDØ�AŠ:ˆ:Ø˜E‘\ˆFØ�=Š=‰?Œ?ð 	'Ø�IŠI�e�XÑ&Ô&Ð&Øˆrß   c                 óâ   — i }t                                ¦   «         D ]R\  }}t                               | j        |¦  «        }|r+t          j        |¦  «                             dd¦  «        ||<   ŒS|S )a5  Get all metadata present in this SoundFile

        Returns
        -------

        metadata: dict[str, str]
            A dict with all metadata. Possible keys are: 'title', 'copyright',
            'software', 'artist', 'comment', 'date', 'album', 'license',
            'tracknumber' and 'genre'.
        r    r¡   )r-   Úitemsr   r_  r  r   rD  rE  )rÓ   ÚstrsÚstrtypeÚstridr¸   s        r¹   Úcopy_metadatazSoundFile.copy_metadata¹  ss   € ð ˆÝ(×.Ò.Ñ0Ô0ð 	Mð 	M‰NˆG�UÝ×%Ò% d¤j°%Ñ8Ô8ˆDØð MÝ $¤¨DÑ 1Ô 1× 8Ò 8¸À)Ñ LÔ L��W‘øØˆrß   c                 ód  — |t           v sJ ‚t          j        d¦  «        }t           |         |d<   t                               | j        t          j        |t          j        |¦  «        ¦  «        }|t          j        k    r2t           	                    | j        ¦  «        }t          |d|› �¦  «        ‚dS )z,Call libsndfile's set bitrate mode function.zint[1]r   zError set bitrate mode N)r”   r   rA  r   r  r  ÚSFC_SET_BITRATE_MODErC  r   r=  r”  )rÓ   r»   Úpointer_bitrate_moder]  s       r¹   r"  zSoundFile._set_bitrate_modeË  sž   € à�~Ð-Ð-Ð-Ð-å#œx¨Ñ1Ô1ÐÝ"0°Ô">Ð˜QÑÝ�oŠo˜dœj­$Ô*CÐEYÕ[_Ô[fÐg{Ñ[|Ô[|Ñ}Ô}ˆØ•$”,ÒÐÝ—-’- ¤
Ñ+Ô+ˆCÝ! #Ð'OÀÐ'OÐ'OÑPÔPÐPð Ðrß   c                 ót  — d|cxk    rdk    sn t          d¦  «        ‚t          j        d¦  «        }||d<   t                               | j        t          j        |t          j        |¦  «        ¦  «        }|t          j        k    r2t           	                    | j        ¦  «        }t          |d|› �¦  «        ‚dS )z1Call libsndfile's set compression level function.r   r   z)Compression level must be in range [0..1]z	double[1]zError set compression level N)r  r   rA  r   r  r  ÚSFC_SET_COMPRESSION_LEVELrC  r   r=  r”  )rÓ   rº   Úpointer_compression_levelr]  s       r¹   r!  z SoundFile._set_compression_level×  sÊ   € àÐ&Ð+Ð+Ò+Ð+¨!Ò+Ð+Ð+Ð+ÝÐHÑIÔIÐIå$(¤H¨[Ñ$9Ô$9Ð!Ø'8Ð! !Ñ$Ý�oŠo˜dœj­$Ô*HÐJcÕeiÔepð  rKñ  fLô  fLñ  Mô  MˆØ•$”,ÒÐÝ—-’- ¤
Ñ+Ô+ˆCÝ! #Ð'YÐFWÐ'YÐ'YÑZÔZÐZð Ðrß   )	r³   NNNNNTNN)r±   N)r¢   r   FNN)r¢   N)Nr   r¢   r   FNNrË   )Nrè   ré   rê   rë   r   r¥  rŽ   rÿ   r�   rÔ   rì   rÍ   r	  r«   r¤   r¬   r­   r®   r¯   rÏ   rÐ   rÑ   rš  rl  rº   r»   rÒ   r  rç   rN  r   rQ  r   rT  r\  ra  rc  re  rg  r  r   r  ro  r   r   r   r¶   Ú
memoryviewr|  Ú	bytearrayr  rÂ   r¦  r…  r   rÇ   r•  r˜  rM  Ú
_threadingÚLockr³  r  r¢  rÕ  rW  rq  r~  rr  rv  rt  rw  r‚  rµ   rð   rý  r"  r!  rí   rß   r¹   r´   r´   G  s?  € € € € € ðð ð GJØGKØBFØ<@Ø37Ø,0ðA;ð A;Ð1ð A;¸¸t¹ð A;Ø  4™ZðA;Ø:=À¹*ðA;à ™*ðA;à58¸4±ZðA;ð ˜t™ðA;ð 6:ðA;ð %*¨D¡Lð	A;ð
  # T™zðA;ð
 6:ðA;ð A;ð A;ð A;ðF ˆ8Ð+Ð+Ñ,Ô,€DØ*Øˆ8Ð+Ð+Ñ,Ô,€DØ7Ø�Ð<Ð<Ñ=Ô=€JØ,ØˆXÐ4Ð4Ñ5Ô5€FØ1ØˆxÐ8Ð8Ñ9Ô9€HØ3ØˆXØMÐMñOô O€Fà-ØˆhØLÐLñNô N€Gà4ØˆXØLÐLñNô N€Fà8Ø�(ð	>ð 	>ñ?ô ?€Kð ?Ø�8ð	=ð 	=ñ>ô >€Lð :ØˆxÐ8Ð8Ñ9Ô9€HØ3ØˆXÐ5Ð5Ñ6Ô6€FØ2Ø�Ð@Ð@ÑAÔA€JØ'Ø ˜Ð!EÐ!EÑFÔFÐØ,Ø�8Ð;Ð;Ñ<Ô<€LØ'àð<ð <ñ „Xð<ð €EðA˜#ð Að Að Að Aðð ð ð ð˜4ð ð ð ð ð˜cð  dð ð ð ð ð2 ð 2¨Cð 2°Dð 2ð 2ð 2ð 2ðA ð A¨ð Að Að Að Að!˜ð !ð !ð !ð !ð
˜$ð ð ð ð ð
˜Tð ð ð ð ð
3˜$ð 3ð 3ð 3ð 3ð /7ð 'ð '˜3ð '¨ð '¸3ð 'ð 'ð 'ð 'ðR&�cð &ð &ð &ð &ð
 9BØ@DØ37ð]ð ]˜3ð ]¨Ið ]Øð]Ø16¸±ð]à˜\Ñ)¨DÑ0ð]à<EÈÑ<Tð]ð ]ð ]ð ]ð@!"ð !" #ð !"°9¸tÑ3Cð !"Èzð !"ð !"ð !"ð !"ðF y°:Ñ'=ÀÑ'Cð ÈIð ÐZ]ð ð ð ð ðB4%˜)ð 4%¨ð 4%ð 4%ð 4%ð 4%ðl% ð %¨yð %¸Tð %ð %ð %ð %ð6 CDØ4=ØCGØ6:ð]ð ]  d¡
ð ]¸Cð ]Øð]Ø(1ð]àð]à49¸D±Lð]ð  Ñ,¨tÑ3ð]ð @IÈÐTXÐZ^ÐI^Ô?_ÐbkÐlxÐz~ð  AEð  mEô  cFñ  @Fð]ð ]ð ]ð ]ð~#ð #˜s T™zð #°Tð #ð #ð #ð #ð0'ð 'ð 'ð 'ðð ð ð ð %�Z”_Ñ&Ô&€Nð#ð #ð #ðJ1<ð 1<ð 1<ðfð ð ðHð Hð Hð	ð 	ð 	ð	ð 	ð 	ð1ð 1ð 1ðfð fð fð<ð <ð <ðð ð ð)ð )ð )ðð ð ð ˜t C¨ Hœ~ð ð ð ð ð$	Qð 	Qð 	Qð
[ð 
[ð 
[ð 
[ð 
[rß   r´   rG  c                 ó4   — | dk    rt          | |¬¦  «        ‚dS )z+Raise LibsndfileError if there is an error.r   r£  N)r”  )r]  r¤  s     r¹   rZ  rZ  ä  s%   € à
ˆa‚x€xÝ˜c¨&Ð1Ñ1Ô1Ð1ð €xrß   c                 óØ  — t          | ¦  «        }|€$t          | ¦  «        }|€t          d| ›�¦  «        ‚n't          |t          ¦  «        st          d|›�¦  «        ‚	 |t
          |                     ¦   «                  z  }n # t          $ r t          d|›�¦  «        ‚w xY w|€d}n't          |t          ¦  «        st          d|›�¦  «        ‚	 |t          |                     ¦   «                  z  }n # t          $ r t          d|›�¦  «        ‚w xY wt          j        d¦  «        }||_        d	|_        t                               |¦  «        t          j        k    rt          d
¦  «        ‚|S )z8Return numeric ID for given format|subtype|endian combo.Nz$No default subtype for major format zInvalid subtype: zUnknown subtype: r†   zInvalid endian-ness: zUnknown endian-ness: úSF_INFO*r   z1Invalid combination of format, subtype and endian)r  r  r  r  r¥  r…   r  râ  r  rŠ   r   rA  r­   r¬   r   Úsf_format_checkÚSF_FALSE)r­   r®   r¯   Úresultrå   s        r¹   r   r   ê  s¢  € å˜6Ñ"Ô"€FØ€Ý! &Ñ)Ô)ˆØˆ?ÝØA°vÐAÐAñCô Cð Cð õ ˜¥Ñ%Ô%ð 9ÝÐ7¨GÐ7Ð7Ñ8Ô8Ð8ð:Ø•)˜GŸMšM™OœOÔ,Ñ,ˆˆøÝð :ð :ð :ÝÐ8¨WÐ8Ð8Ñ9Ô9Ð9ð:øøøà€~ØˆˆÝ˜¥Ñ$Ô$ð <ÝÐ:°Ð:Ð:Ñ;Ô;Ð;ð=Ø•(˜6Ÿ<š<™>œ>Ô*Ñ*ˆˆøÝð =ð =ð =ÝÐ;°Ð;Ð;Ñ<Ô<Ð<ð=øøøõ Œ8�JÑÔ€DØ€D„KØ€D„MÝ×Ò˜DÑ!Ô!¥T¤]Ò2Ð2ÝØ?ñAô Að 	Aà€Ms   Á"B ÂBÃ"C1 Ã1Dc                 óÆ  — t          | t          ¦  «        st          d| ›�¦  «        ‚t          | ¦  «        }|                     d¦  «        s t          | ¦  «        t          |¦  «        k    rt          d| ›�¦  «        ‚t          |                     d¦  «        ¦  «        dk    rt          d¦  «        ‚d|v rt          j	        }nd|v rt          j
        }nt          j        }|S )z=Check if mode is valid and return its integer representation.zInvalid mode: zxrwb+Úxrwr   z&mode must contain exactly one of 'xrw'r‡  r³   )r  r¥  r  r  Ú
differencers  r  Úintersectionr   ÚSFM_RDWRÚSFM_READr´  )r	  Úmode_setr#  s      r¹   r  r  
  sÙ   € å�d�CÑ Ô ð 3ÝÐ1¨Ð1Ð1Ñ2Ô2Ð2Ý�4‰yŒy€HØ×Ò˜7Ñ#Ô#ð 4¥s¨4¡y¤yµ3°x±=´=Ò'@Ð'@ÝÐ2¨$Ð2Ð2Ñ3Ô3Ð3Ý
ˆ8× Ò  Ñ'Ô'Ñ(Ô(¨AÒ-Ð-ÝÐAÑBÔBÐBà
ˆh€€Ý”=ˆˆØ	�ˆˆÝ”=ˆˆå”>ˆØ€Orß   c                 óÄ  — |}|€(t          | |¦  «        }t          |t          ¦  «        sJ ‚nt          |¦  «         t	          j        d¦  «        }d|vs|                     ¦   «         dk    rG|€t          d¦  «        ‚||_        |€t          d¦  «        ‚||_	        t          |||¦  «        |_        n-t          d„ |||||fD ¦   «         ¦  «        rt          d¦  «        ‚|S )	z*Check arguments and create SF_INFO struct.Nr
  r³   r1   zsamplerate must be specifiedzchannels must be specifiedc              3   ó   K  — | ]}|d uV — Œ	d S rË   rí   )rø   Úargs     r¹   ú	<genexpr>z&_create_info_struct.<locals>.<genexpr>1  s>   è è € ð Ið I 3ˆs˜$ˆð Ið Ið Ið Ið Ið Irß   z\Not allowed for existing files (except 'RAW'): samplerate, channels, format, subtype, endian)Ú_get_format_from_filenamer  r¥  r  r   rA  r  r  r«   r¬   r   r­   Úany)	r£   r	  r«   r¬   r­   r®   r¯   Úoriginal_formatrå   s	            r¹   r  r    s  € ð €OØ€~Ý*¨4°Ñ6Ô6ˆÝ˜&¥#Ñ&Ô&Ð&Ð&Ð&Ð&å�fÑÔÐåŒ8�JÑÔ€DØ
�$€€˜&Ÿ,š,™.œ.¨EÒ1Ð1ØÐÝÐ:Ñ;Ô;Ð;Ø$ˆŒØÐÝÐ8Ñ9Ô9Ð9Ø ˆŒÝ! &¨'°6Ñ:Ô:ˆŒˆåð Ið IØ˜H o°wÀð+Hð Iñ Iô Iñ Iô Ið 	Måð Lñ Mô Mð Mà€Krß   c                 ó8  — d}t          | d| ¦  «        } 	 t          j                             | ¦  «        d         dd…         }|                     dd¦  «        }n# t
          $ r Y nw xY w|                     ¦   «         t          vrd|vrt          d	| ›�¦  «        ‚|S )
a  Return a format string obtained from file (or file.name).

    If file already exists (= read mode), an empty string is returned on
    error.  If not, an exception is raised.
    The return type will always be str or unicode (even if
    file/file.name is a bytes object).

    rG  rÍ   r¢   r   Nr    r¡   r³   zBNo format specified and unable to get format from file extension: )	r  r  r§  ÚsplitextrE  Ú	Exceptionr  rH   r  )r£   r	  r­   s      r¹   r  r  8  s»   € ð €FÝ�4˜ Ñ&Ô&€Dðå”×"Ò" 4Ñ(Ô(¨Ô,¨Q¨R¨RÔ0ˆà—’˜w¨	Ñ2Ô2ˆˆøÝð ð ð Øˆðøøøà‡|‚|�~„~�XÐ%Ð%¨#°T¨/¨/Ýð 4Ø+/ð4ð 4ñ 5ô 5ð 	5à€Ms   •AA Á
A&Á%A&c                 ó€   — t           t          t          fD ](}|                     ¦   «         D ]\  }}|| k    r|c c S ŒŒ)dS )z;Return the string representation of a given numeric format.zn/a)rH   r…   rŠ   rù  )Ú
format_intÚ
dictionaryÚkÚvs       r¹   r/  r/  P  s^   € å¥	­8Ð3ð ð ˆ
Ø×$Ò$Ñ&Ô&ð 	ð 	‰DˆAˆqØ�JŠˆØ�����ð ð	ð ˆurß   c                 ó8  — t          j        d¦  «        }| |_        t                               t           j        ||t          j        d¦  «        ¦  «         |j        }t          |j        ¦  «        |r(t          j	        |¦  «         
                    dd¦  «        ndfS )z6Return the ID and short description of a given format.zSF_FORMAT_INFO*ÚSF_FORMAT_INFOr    r¡   rG  )r   rA  r­   r   r  r  rC  rÍ   r/  rD  rE  )r   Úformat_flagrÏ   rÍ   s       r¹   r8  r8  Z  s�   € å”(Ð,Ñ-Ô-€KØ#€KÔÝ‡O‚O•D”I˜{¨KÝ”KÐ 0Ñ1Ô1ñ3ô 3ð 3àÔ€DÝ˜Ô*Ñ+Ô+Ø<@ÐH�DŒK˜ÑÔ×$Ò$ W¨iÑ8Ô8Ð8ÀbðJð Jrß   c              #   óø   K  — t          j        d¦  «        }t                               t           j        | |t          j        d¦  «        ¦  «         t          |d         ¦  «        D ]}t          ||¦  «        V — ŒdS )z8Helper for available_formats() and available_subtypes().zint*rŽ   r   N)r   rA  r   r  r  rC  Úranger8  )Ú
count_flagr&  rÇ  r   s       r¹   rñ   rñ   e  su   è è € åŒH�VÑÔ€EÝ‡O‚O•D”I˜z¨5µ$´+¸eÑ2DÔ2DÑEÔEÐEÝ˜E !œH‘o”oð 4ð 4ˆ
Ý˜: {Ñ3Ô3Ð3Ð3Ð3Ð3ð4ð 4rß   c                 óÖ   — t          | t          ¦  «        st          d| ›�¦  «        ‚	 t          |                      ¦   «                  }n # t
          $ r t          d| ›�¦  «        ‚w xY w|S )z4Check if `format_str` is valid and return format ID.zInvalid format: zUnknown format: )r  r¥  r  rH   r  râ  r  )Ú
format_strr   s     r¹   r  r  m  s€   € å�j¥#Ñ&Ô&ð ;ÝÐ9¨:Ð9Ð9Ñ:Ô:Ð:ð<Ý˜j×.Ò.Ñ0Ô0Ô1ˆ
ˆ
øÝð <ð <ð <ÝÐ:¨JÐ:Ð:Ñ;Ô;Ð;ð<øøøàÐs   ©A	 Á	A&c           	      ó   — |t           j        k    }|t           j        k    }t          t	          | d¦  «        t	          | d¦  «        t	          | d¦  «        p|t	          | d¦  «        pt	          | d¦  «        p|g¦  «        S )z>Check if file has all the necessary attributes for virtual IO.r  ro  rÂ   r¶   rÅ  )r   r  r´  ÚallÚhasattr)r£   r#  ÚreadonlyÚ	writeonlys       r¹   r²  r²  x  s~   € à�4œ=Ò(€HØ�DœNÒ*€IÝÝ��fÑÔÝ��fÑÔÝ��gÑÔÐ* (Ý��fÑÔÐG¥¨¨zÑ!:Ô!:ÐG¸ið	ñ ô ð rß   c                   ó   — e Zd ZdZdS )ÚSoundFileErrorz-Base class for all soundfile-specific errors.N©rè   ré   rê   rë   rí   rß   r¹   r2  r2  „  s   € € € € € Ø7Ð7Ø€Drß   r2  c                   ó   — e Zd ZdZdS )rˆ  zKsoundfile module runtime error.

    Errors that used to be `RuntimeError`.Nr3  rí   rß   r¹   rˆ  rˆ  ˆ  s   € € € € € ð.ð .ð 	€Drß   rˆ  c                   óP   — e Zd ZdZd
dededdfd„Zedefd„¦   «         Zdefd	„Z	dS )r”  zjlibsndfile errors.


    Attributes
    ----------
    code
        libsndfile internal error number.
    rG  Úcoder¤  r±   Nc                 óZ   — t                                | ||¦  «         || _        || _        d S rË   )rˆ  rÔ   r6  r¤  )rÓ   r6  r¤  s      r¹   rÔ   zLibsndfileError.__init__—  s,   € Ý×&Ò& t¨T°6Ñ:Ô:Ð:ØˆŒ	ØˆŒˆˆrß   c                 ó¢   — | j         rGt                               | j         ¦  «        }t          j        |¦  «                             dd¦  «        S dS )zRaw libsndfile error message.r    r¡   z'(Garbled error message from libsndfile))r6  r   Úsf_error_numberr   rD  rE  )rÓ   Úerr_strs     r¹   Úerror_stringzLibsndfileError.error_stringœ  sK   € ð Œ9ð 	=Ý×*Ò*¨4¬9Ñ5Ô5ˆGÝ”;˜wÑ'Ô'×.Ò.¨w¸	ÑBÔBÐBð
 =Ð<rß   c                 ó    — | j         | j        z   S rË   )r¤  r;  r%  s    r¹   Ú__str__zLibsndfileError.__str__¨  s   € ØŒ{˜TÔ.Ñ.Ð.rß   ©rG  )
rè   ré   rê   rë   rŽ   r¥  rÔ   rì   r;  r=  rí   rß   r¹   r”  r”  Ž  sŽ   € € € € € ðð ðð ˜Sð ¨#ð °tð ð ð ð ð
 ð	=˜cð 	=ð 	=ð 	=ñ „Xð	=ð/˜ð /ð /ð /ð /ð /ð /rß   r”  )r¢   r   Nr   FNNNNNNNT)NNNTNN)Nr   r¢   r   Nr   FNNNNNNNT)FrË   )NNr>  )mrë   Ú__version__Úosr  Úsysr®  Ú	threadingr  Úcollections.abcr   Úctypes.utilr   Ú_find_libraryr   r   r   Útypingr   r	   r
   r   r   r¾   Útyping_extensionsr   Ú
_soundfiler   r   r¥  rŽ   r  r   Ú__annotations__ÚndarrayÚtupler§   r   r   r   r   r   r   r   r-   rð   rH   r…   rŠ   r‹   r�   r”   r¯  r–   Ú_machineÚ_packaged_libnameÚ	sysconfigÚ
_sysconfigÚget_platformÚ_win_machiner©  Ú_soundfile_datar§  ÚdirnameÚ__file__Ú_pathrã   Ú
_full_pathÚdlopenr   ÚImportErrorr  Ú_libnameÚ_explicit_libnameÚisdirÚ_hbrew_pathrD  Úsf_version_stringrE  Ú__libsndfile_version__Ú
startswithrs  rÿ   r�   r¶   rÂ   rÇ   rÉ   rå   rô   rý   r÷   r  r´   rZ  r   r  r  r  r/  ÚSFC_GET_FORMAT_INFOr8  rñ   r  r²  r  r2  ÚRuntimeErrorrˆ  r”  rí   rß   r¹   ú<module>rb     s  ðð	ð 	ð 	ð €à Ð Ð Ð Ø Ð Ð Ð Ø Ð Ð Ð Ø %Ð %Ð %Ð %Ð %Ð %Ø 5Ð 5Ð 5Ð 5Ð 5Ð 5Ø +Ð +Ð +Ð +Ð +Ð +Ð +Ð +Ð +Ð +Ø ;Ð ;Ð ;Ð ;Ð ;Ð ;Ð ;Ð ;Ð ;Ð ;Ð ;Ð ;Ð ;Ð ;à €€€Ø "Ð "Ð "Ð "Ð "Ð "à "Ð "Ð "Ð "Ð "Ð "à"%¨¡)¨hÑ"6¸¼ÀcÔ9JÑ"JÐ �iÐ JÐ JÑ JØ”} U¨3°¨8¤_°e´kÀ%Ä-ÐRWÔR_ÑB_ÐbgÔbmÑBmÐpuÔp{ÑB{Ô6|Ð%|Ô}€	ˆ9Ð }Ð }Ñ }Øœ-¨¨c°3¨h¬¸¼ÀUÄ]ÐUZÔUbÑEbÐejÔepÑEpÐsxÔs~ÑE~Ô9Ð(ô  A€ˆið  Að  Añ  AØÐEÔF€	ˆ9Ð FÐ FÑ FØ	€	€	�	Ø	€	€	�	ð ØØØØØØØØØð%ð %€
ˆE�$�s˜C�x”.Ô!ð ð ñ ð#Ø	ˆXð#à
ˆXð#ð 	ˆXð#ð 
ˆXð	#ð
 
ˆXð#ð 
ˆXð#ð ˆXð#ð 
ˆXð#ð ˆXð#ð 
ˆXð#ð ˆXð#ð ˆXð#ð 
ˆXð#ð 	ˆXð#ð 
ˆXð#ð  
ˆXð!#ð" 
ˆXð##ð$ ØØØØØØØØð5#ð #ð #€ˆ%��S˜#�X”Ô
ð ð ñ ð:#$Ø�fð#$à�fð#$ð �fð#$ð �fð	#$ð
 �fð#$ð �fð#$ð �fð#$ð �fð#$ð �fð#$ð �fð#$ð �fð#$ð �fð#$ð �fð#$ð �fð#$ð �fð#$ð  �fð!#$ð" �fð##$ð #$ð$ �fð%#$ð& �fð'#$ð( �fð)#$ð* �fð+#$ð, �fð-#$ð. �fð/#$ð0 �fð1#$ð2 �fð3#$ð4 �fð5#$ð6 �fð7#$ð8 �fð9#$ð: �fð;#$ð< �fð=#$ð> �fð?#$ð@ �fðA#$ðB �fðC#$ðD �fðE#$ð #$€	ˆ5��c˜3�h”Ô ð #ð #ñ #ðL ØØØð	#ð #€ˆ%��S˜#�X”Ô
ð ð ñ ð,Ø	ˆXð,à
ˆXð,ð 	ˆXð,ð
 
ˆXð,ð 
ˆXð,ð ˆXð,ð 
ˆXð,ð ˆXð,ð 
ˆXð,ð ˆXð,ð ˆXð,ð 
ˆXð,ð 	ˆYð,ð 
ˆXð,ð  
ˆXð!,ð" 
ˆXð#,ð$ ˆXð%,ð& ØØØØØØØð5,ð ,ð ,Ð �5˜˜c 3˜hœÔ(ð ð ñ ð< ØØØð	%ð %€
ˆE�$�s˜C�x”.Ô!ð ð ñ ð ØØð)ð )€��d˜3 ˜8”nÔ%ð ð ñ ð82Ø„}˜Ò Ð Ø0Ð0Ð0Ð0Ð0Ð0Ø)¨H¨H©J¬JÑ6¸ÑAÐÐØ	Œ˜'Ò	!Ð	!Ø&Ð&Ð&Ð&à.�zÔ.Ñ0Ô0ˆØ˜;Ò&Ð&Ø 6ÐÐØ˜[Ò(Ð(Ø 4ÐÐØ˜WÒ$Ð$Ø 4ÐÐà�'ÐK¸\ÐKÐKÑLÔLÐLØ	Œ˜'Ò	!Ð	!Ø0Ð0Ð0Ð0Ð0Ð0Øˆ8‰:Œ:ÐFÐFÐFØ 5ÐÐà -°°±
´
Ñ :¸UÑ BÐÐàˆgÐ=Ñ>Ô>Ð>àÐÐÐØŒH×Ò˜_Ô5Ñ6Ô6€EØ”—’˜uÐ&7Ñ8Ô8€JØˆ4Œ;�zÑ"Ô"€D€Døà�˜iÐ(ð 2ð 2ð 2ð2Ø �= Ñ+Ô+ˆØÐØ�'ÐTÑUÔUÐUØˆtŒ{˜8Ñ$Ô$ˆˆøàð 2ð 2ð 2àŒ=˜HÒ$Ð$Ø 2ÐÐØŒ]˜gÒ%Ð%Ø 0ÐÐØŒ]˜gÒ%Ð%Ø /ÐÐàð 	1Ð0Ð0Ð0Ð0Ð0ØŒ=˜HÒ$Ð$¨¨©¬°wÒ)>Ð)>Ø25´(·.².ÐAUÑ2VÔ2Vð 'Ð.Ð.Ø&ð à�4”;˜sœxŸ}š}¨[Ð:KÑLÔLÑMÔMˆDˆDà�4”;Ð0Ñ1Ô1ˆDøøð'2øøøøøð2øøøð8 %˜œ T×%;Ò%;Ñ%=Ô%=Ñ>Ô>×EÒEÀgÈyÑYÔYÐ Ø×$Ò$ ]Ñ3Ô3ð IØ3°C°C¸Ñ4FÔ4FÐ4GÐ4GÔHÐð t}ØimØuyØ37ð\ð \Ð#ð \¨Sð \¸cð \ÈSÐSWÉZð \Ðgpð \Øð\Ø-2°T©\ð\ØGPÐS_ÑG_ÐbfÑGfð\à˜$‘Jð\à14°t±ð\àLOÐRVÉJð\àhkÐnrÑhrð\ð �d‘
ð\ð -1ð\ð =BÀ)ÈlÑBZÐ\_ÐB_Ô<`ð\ð \ð \ð \ðB <@Ø59Ø,0Ø%)ð	9ð 9Ð$ð 9¨Ið 9À3ð 9Ø˜‘:ð9Ø.1°D©jð9à˜‘*ð9à.2ð9ð # T™\ð9ð ˜d™
ð	9ð /3ð	9ð 9ð 9ð 9ðv @DØ<=Ø7@Ø?CØQUØ=AØ<@Øð:[ð :[Ð%ð :[°#¸±*ð :[Øð:[Ø%(ð:[Ø69ð:[à�t‘ð:[à+4ð:[ð ð:[ð 16¸±ð:[ð ˜LÑ(¨4Ñ/ð	:[ð EHÈ$ÁJð	:[ð
 ˜4‘Zð:[ð
 14°d±
ð:[ð ˜$‘Jð:[ð 03°T©zð:[ð ð:[ð %.¨i¸¸tÐ.CÔ$DÀyÐQ]Ð_cÐeiÐQiÔGjÑ$jð:[ð :[ð :[ð :[ðz1ð 1ð 1ð 1ð 1ñ 1ô 1ð 1ðh)ð )Ð#ð )¨dð )¸~ð )ð )ð )ð )ðF˜4  S œ>ð Fð Fð Fð Fð*Dð D˜s T™zð D°T¸#¸s¸(´^ð Dð Dð Dð Dð. 59Ø&*ðð ˜ð  s¨T¡zð Ø˜t™ðØ/3ðð ð ð ð&1˜Cð 1 C¨$¡Jð 1ð 1ð 1ð 1ð Z[ð Z[ð Z[ð Z[ð Z[ñ Z[ô Z[ð Z[ðz2ð 2ð 2ð 2ðð ð ð@ð ð ð&ð ð ð6ð ð ð0ð ð ð *.Ô)Að Jð Jð Jð Jð4ð 4ð 4ðð ð ð	ð 	ð 	ð	ð 	ð 	ð 	ð 	�Yñ 	ô 	ð 	ð	ð 	ð 	ð 	ð 	˜N¨Lñ 	ô 	ð 	ð/ð /ð /ð /ð /Ð+ñ /ô /ð /ð /ð /s8   ÊC3N ÎQ(Î(N8Î7Q(Î8B'Q"ÑQ(Ñ!Q"Ñ"Q(Ñ'Q(