Hacked By AnonymousFox

Current Path : /opt/alt/python37/lib64/python3.7/__pycache__/
Upload File :
Current File : //opt/alt/python37/lib64/python3.7/__pycache__/sndhdr.cpython-37.opt-2.pyc

B

YI~d��@s.ddgZddlmZedd�Zdej_dej_dej_d	ej_d
ej	_dd�Z
dd�ZgZd
d�Z
e�e
�dd�Ze�e�dd�Ze�e�dd�Ze�e�dd�Ze�e�dd�Ze�e�dd�Ze�e�dd�Ze�e�dd�Zdd �Zd!d"�Zd#d$�Zd%d&�Zd'd(�Zed)k�r*e�d*S)+�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.cCst|�}|S)N)r)�filename�res�r�+/opt/alt/python37/lib64/python3.7/sndhdr.pyr4sc	CsHt|d��4}|�d�}x"tD]}|||�}|rt|�SqWdSQRXdS)N�rbi)�open�read�testsr)r�f�hZtfrrrr	r:s


c	Cs�ddl}|�d�sdS|dd�dkr,d}n|dd�dkrBd}ndS|�d�y|�|d	�}Wnt|jfk
rzdSX||��|��|��d|�	�fS)
NrsFORM��sAIFC�aifcsAIFFZaiff�r)
r�
startswith�seekr�EOFError�Error�getframerate�getnchannels�
getnframes�getsampwidth)rrrZfmt�arrr	�	test_aifcKs

rc
Cs�|�d�rt}n|dd�dkr&t}ndSd}||dd��}||dd��}||dd��}||dd��}||dd	��}d
}	|d
kr�d}
n$|dkr�d}
n|d
kr�d}
d}	nd}
|	|}|r�||}nd}|||||
fS)Ns.snd�)sds.sdns.Zaurr�����U���?���)r�get_long_be�get_long_le)
rr�func�filetypeZhdr_sizeZ	data_size�encoding�rate�	nchannelsZsample_sizeZsample_bitsZ
frame_sizeZnframerrr	�test_au`s2

r/cCsT|dd�dks |dd�dkr$dSt|dd��}|rBd	|}nd
}d|dd
dfS)N�A�EsFSSD��sHCOM��i"VrZhcomr"r'r)r()rrZdivisorr-rrr	�	test_hcom�s 
r6cCst|�d�sdSt|dd��}d}d|kr6dkrfnn,||dkrfd||d}|rftd	|�}d
|dddfS)
NsCreative Voice Filer �ri�r"�rg��.AZvocr'r)r�get_short_le�int)rrZsbseekr-Zratecoderrr	�test_voc�s
$r;c	Cs�ddl}|�d�r2|dd�dks2|dd�dkr6dS|�d�y|�|d�}Wnt|jfk
rjdSXd	|��|��|��d|�	�fS)
NrsRIFFrrsWAVErsfmt rZwav)
�waverrrrrrrrr)rrr<�wrrr	�test_wav�s*
r>cCs"|�d�r|dd�dkrdSdS)NsFORMrrs8SVX)Z8svxrr"rr)r)rrrrr	�	test_8svx�sr?cCs<|�d�r8t|dd��}t|dd��}d|d|dfSdS)NsSOUNDrrr r7Zsndtr")rr)r9)rrZnsamplesr-rrr	�	test_sndt�s
r@cCsD|�d�r@t|dd��}d|kr.dkr@nnd|ddd	fSdS)
Nsr$ri�i�aZsndrr"r'r)rr9)rrr-rrr	�	test_sndr�s
rAcCs,|dd>|dd>B|dd>B|dBS)Nrr!r"rr$rr%r)�brrr	r(�sr(cCs,|dd>|dd>B|dd>B|dBS)Nr%r!r$rr"rrr)rBrrr	r)�sr)cCs|dd>|dBS)Nrrr"r)rBrrr	�get_short_be�srCcCs|dd>|dBS)Nr"rrr)rBrrr	r9�sr9cCs�ddl}d}|jdd�r8|jddkr8|jdd�=d}y8|jdd�r`t|jdd�|d�ntdg|d�Wn*tk
r�|j�d�|�d�YnXdS)Nrr"z-rr$�.z
[Interrupted]
)�sys�argv�testall�KeyboardInterrupt�stderr�write�exit)rE�	recursiverrr	�test�srMc	Cs�ddl}ddl}x�|D]�}|j�|�rzt|ddd�|s>|rptd�ddl}|�|j�|d��}t||d�q�td�qt|ddd�|j�	�ytt
|��Wqtk
r�td	�YqXqWdS)
Nrz/:� )�endzrecursing down:�*z*** directory (use -r) ***�:z*** not found ***)rE�os�path�isdir�print�glob�joinrG�stdout�flushr�OSError)�listrLZtoplevelrErRrrV�namesrrr	rG�s"


rG�__main__N)�__all__�collectionsrrr+�__doc__Z	framerater.ZnframesZ	sampwidthrrr
r�appendr/r6r;r>r?r@rAr(r)rCr9rMrG�__name__rrrr	�<module>!sF











Hacked By AnonymousFox1.0, Coded By AnonymousFox