ok

Mini Shell

Direktori : /opt/alt/python311/lib64/python3.11/__pycache__/
Upload File :
Current File : //opt/alt/python311/lib64/python3.11/__pycache__/sndhdr.cpython-311.opt-2.pyc

�

�f���	ddlZejed���ddgZddlmZedd��Zd	ej_d
ej	_dej
_dej_d
ej_d�Z
d�ZgZd�Ze�e��d�Ze�e��d�Ze�e��d�Ze�e��d�Ze�e��d�Ze�e��d�Ze�e��d�Ze�e��d�Zd�Zd�Zd�Zd�Zd�Zedkre��dSdS)�N)��
)�remove�what�whathdr)�
namedtuple�
SndHeadersz.filetype framerate nchannels nframes sampwidthz�The value for type indicates the data type
and will be one of the strings 'aifc', 'aiff', 'au','hcom',
'sndr', 'sndt', 'voc', 'wav', '8svx', 'sb', 'ub', or 'ul'.zYThe sampling_rate will be either the actual
value or 0 if unknown or difficult to decode.z^The number of channels or 0 if it cannot be
determined or if the value is difficult to decode.z?The value for frames will be either the number
of frames or -1.zAEither the sample size in bits or
'A' for A-LAW or 'U' for u-LAW.c�&�	t|��}|S)N)r)�filename�ress  �-/opt/alt/python311/lib64/python3.11/sndhdr.pyrr8s��)�
�(�
�
�C��J�c���	t|d��5}|�d��}tD]'}|||��}|rt|�ccddd��S�(	ddd��dS#1swxYwYdS)N�rbi)�open�read�testsr	)r�f�h�tfrs     r
rr>s���"�	
�h��	�	���
�F�F�3�K�K���	(�	(�B��"�Q��(�(�C��
(�!�3�'�'�'���������
(��
��������������������s�7A%�A%�%A)�,A)c�<�	tj��5tjdt���ddl}ddd��n#1swxYwY|�d��sdS|dd�dkrd}n|dd�d	krd
}ndS|�d��	|�|d��}n#t|j	f$rYdSwxYw||�
��|���|���d|�
��zfS)N�ignore)�categoryr�FORM��sAIFC�aifcsAIFF�aiff�r)�warnings�catch_warnings�simplefilter�DeprecationWarningr�
startswith�seekr�EOFError�Error�getframerate�getnchannels�
getnframes�getsampwidth)rrr�fmt�as     r
�	test_aifcr.Osp���	�	 �	"�	"�����h�1C�D�D�D�D�����������������������
�<�<�� � ���t���2��w�'������	
�1�R�4��G�	�	�����t��F�F�1�I�I�I���I�I�a��������d�j�!�����t�t���������!�!�1�>�>�#3�#3�
�L�L�N�N�A���� 0� 0�0�2�2s#� A�A�A�B4�4C	�C	c��	|�d��rt}n|dd�dvrt}ndSd}||dd���}||dd���}||dd���}||dd���}||dd	���}d
}	|d
krd}
n|dkrd}
n
|d
krd}
d}	nd}
|	|z}|r||z}nd}|||||
fS)Ns.snd�)sds.sdns.�aurr�����U�r�?���)r$�get_long_be�get_long_le)
rr�func�filetype�hdr_size�	data_size�encoding�rate�	nchannels�sample_size�sample_bits�
frame_size�nframes
             r
�test_aurGgs!����|�|�G�������	
�2�A�2��%�	%�	%�����t��H��t�A�a��c�F�|�|�H���Q�q��t�W�
�
�I��t�A�b��e�H�~�~�H��4��"�R�%��>�>�D���Q�r�"�u�X���I��K��1�}�}����	�Q������	�Q�����������y�(�J����Z�'������T�9�f�k�9�9rc��	|dd�dks|dd�dkrdSt|dd���}|rd	|z}nd
}d|dd
dfS)N�A�EsFSSD��sHCOM��i"Vr�hcomr5r9r)r:)rr�divisorrAs    r
�	test_hcomrQ�sm�����B��x�7���a��C��j�G�3�3��t��!�C��G�*�%�%�G����w�������4��B��!�!rc���	|�d��sdSt|dd���}d}d|cxkrdkr1nn.||dkr"d||dzz
}|rtd	|z��}d
|dddfS)
NsCreative Voice Filer3�ri�r5�r0g��.A�vocr9r)r$�get_short_le�int)rr�sbseekrA�ratecodes     r
�test_vocrZ�s�����<�<�2�3�3���t�
�!�B�r�E�(�
#�
#�F��D��F�����S������Q�v�Y�!�^�^���6�!�8��$���	-��y�8�+�,�,�D��$��2�q� � rc��	ddl}|�d��r|dd�dks|dd�dkrdS|�d��	|�|d��}n#t|jf$rYdSwxYwd	|���|���|���d|�	��zfS)
NrsRIFFrrsWAVEr2sfmt r�wav)
�waver$r%rr&r'r(r)r*r+)rrr]�ws    r
�test_wavr_�s�����K�K�K��<�<�� � ��A�a��d�G�w�$6�$6�!�B�r�E�(�g�:M�:M��t��F�F�1�I�I�I���I�I�a��������d�j�!�����t�t������1�>�>�#�#�Q�^�^�%5�%5��<�<�>�>�1�Q�^�^�%5�%5�#5�7�7s�A&�&A;�:A;c�R�	|�d��r|dd�dkrdSdS)Nrrrs8SVX)�8svxrr5rr)r$)rrs  r
�	test_8svxrb�s6����<�<�� � ��A�a��d�G�w�$6�$6��t��rc��	|�d��r5t|dd���}t|dd���}d|d|dfSdS)NsSOUNDrrr3rS�sndtr5)r$r;rV)rr�nsamplesrAs    r
�	test_sndtrf�s^����|�|�H���,��q��2��w�'�'���A�b��e�H�%�%���t�Q��!�+�+�,�,rc��	|�d��r/t|dd���}d|cxkrdkr
ndSd|ddd	fSdSdS)
Nsr7r0i�i�a�sndrr5r9r)r$rV)rrrAs   r
�	test_sndrri�st����|�|�G���*��A�a��c�F�#�#���4� � � � �5� � � � � � ��4��B��)�)�*�*� � rc�Z�|ddz|ddzz|ddzz|dzS)Nrr4r5r2r7rr���bs r
r:r:��3��
�a�D�B�J�1�Q�4�2�:�&�!�A�$�!�)�4�q��t�;�;rc�Z�|ddz|ddzz|ddzz|dzS)Nrr4r7r2r5rrrkrls r
r;r;�rnrc�*�|ddz|dzS)Nrrr5rkrls r
�get_short_berq����
�a�D�A�I��1���rc�*�|ddz|dzS)Nr5rrrkrls r
rVrV�rrrc�n�ddl}d}|jdd�r|jddkr|jdd�=d}	|jdd�r t|jdd�|d��dStdg|d��dS#t$r3|j�d��|�d��YdSwxYw)Nrr5z-rr7�.z
[Interrupted]
)�sys�argv�testall�KeyboardInterrupt�stderr�write�exit)rv�	recursives  r
�testr~�s����J�J�J��I�
�x����|������t�+�+��H�Q�q�S�M��	���8�A�B�B�<�	)��C�H�Q�R�R�L�)�Q�/�/�/�/�/��S�E�9�a�(�(�(�(�(�������
���,�-�-�-��������������s�-A7�#A7�79B4�3B4c�F�ddl}ddl}|D�]}|j�|��r�t	|dzd���|s|rft	d��ddl}|�|j�|�|��d����}t||d����t	d����t	|dzd���|j	�
��	t	t|������#t$rt	d	��Y��wxYwdS)
Nrz/:� )�endzrecursing down:�*z*** directory (use -r) ***�:z*** not found ***)
rv�os�path�isdir�print�glob�join�escaperx�stdout�flushr�OSError)�listr}�toplevelrvr�rr��namess        r
rxrx�sL���J�J�J�
�I�I�I��+�+��
�7�=�=��"�"�	+��(�T�/�s�+�+�+�+��
4�H�
4��'�(�(�(������	�	�"�'�,�,�t�{�{�8�/D�/D�c�"J�"J�K�K����y�!�,�,�,�,��2�3�3�3�3��(�S�.�c�*�*�*�*��J������
+��d�8�n�n�%�%�%�%���
+�
+�
+��)�*�*�*�*�*�
+����+�+s�$D�D�D�__main__)r �_deprecated�__name__�__all__�collectionsrr	r=�__doc__�	frameraterB�nframes�	sampwidthrrrr.�appendrGrQrZr_rbrfrir:r;rqrVr~rxrkrr
�<module>r�s_���:�������X�g�.�.�.�.�
�9�
��"�"�"�"�"�"�
�Z��H�J�J�
� >�
���!1�
���!6�
����
���!#�
���������	��2�2�2�*���Y����:�:�:�>���W����	"�	"�	"����Y����
!�
!�
!����X����7�7�7����X����������Y����,�,�,����Y����*�*�*����Y����<�<�<�<�<�<�������
�
�
�+�+�+�*�z����D�F�F�F�F�F��r

Zerion Mini Shell 1.0