Uname: Linux web3.us.cloudlogin.co 5.10.226-xeon-hst #2 SMP Fri Sep 13 12:28:44 UTC 2024 x86_64
Software: Apache
PHP version: 8.1.31 [ PHP INFO ] PHP os: Linux
Server Ip: 162.210.96.117
Your Ip: 3.17.77.240
User: edustar (269686) | Group: tty (888)
Safe Mode: OFF
Disable Function:
NONE

name : sndhdr.cpython-310.opt-2.pyc
o

^b��@s2	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)kr�e�d*Sd*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�//usr/local/python-3.10/lib/python3.10/sndhdr.pyr4scCsp	t|d��(}|�d�}tD]}|||�}|r$t|�Wd�Sq	Wd�dS1s1wYdS)N�rbi)�open�read�testsr)r�f�hZtfrrrr	r:s


�$�c	Cs�ddl}|�d�sdS|dd�dkrd}n
|dd�dkr!d}ndS|�d�z|�|d	�}Wn
t|jfy=YdSw||��|��|��d|�	�fS)
Nr�FORM��sAIFC�aifcsAIFFZaiff�r)
r�
startswith�seekr�EOFError�Error�getframerate�getnchannels�
getnframes�getsampwidth)rrr�fmt�arrr	�	test_aifcKs"

��rc
Cs�|�d�rt}n
|dd�dvrt}ndSd}||dd��}||dd��}||dd��}||dd��}||dd	��}d
}	|d
krHd}
n|dkrOd}
n|d
krXd}
d}	nd}
|	|}|re||}nd}|||||
fS)Ns.snd�)sds.sdns.Zaurr�����U���?���)r�get_long_be�get_long_le)
rr�func�filetypeZhdr_size�	data_size�encoding�rate�	nchannelsZsample_sizeZsample_bits�
frame_sizeZnframerrr	�test_au`s2

r3cCsT|dd�dks|dd�dkrdSt|dd��}|r!d	|}nd
}d|dd
dfS)N�A�EsFSSD��sHCOM��i"VrZhcomr$r)r)r*)rrZdivisorr0rrr	�	test_hcom�s 
r:cCst|�d�sdSt|dd��}d}d|krdkr3nn||dkr3d||d}|r3td	|�}d
|dddfS)
NsCreative Voice Filer"�ri�r$�r g��.AZvocr)r)r�get_short_le�int)rrZsbseekr0Zratecoderrr	�test_voc�s
$r?c	Cs�ddl}|�d�r|dd�dks|dd�dkrdS|�d�z|�|d�}Wn
t|jfy5YdSwd	|��|��|��d|�	�fS)
NrsRIFFrrsWAVEr!sfmt rZwav)
�waverrrrrrrrr)rrr@�wrrr	�test_wav�s*
��rBcCs"|�d�r
|dd�dkrdSdS)Nrrrs8SVX)Z8svxrr$rr)r)rrrrr	�	test_8svx�srCcCs<|�d�rt|dd��}t|dd��}d|d|dfSdS)NsSOUNDrrr"r;Zsndtr$)rr+r=)rrZnsamplesr0rrr	�	test_sndt�s

�rDcCsJ|�d�r!t|dd��}d|krdkr#ndSd|ddd	fSdSdS)
Nsr&r i�i�aZsndrr$r)r)rr=)rrr0rrr	�	test_sndr�s
�rEcC�,|dd>|dd>B|dd>B|dBS)Nrr#r$r!r&rr'r��brrr	r*��,r*cCrF)Nr'r#r&r!r$rrrrGrrr	r+�rIr+cC�|dd>|dBS)Nrrr$rrGrrr	�get_short_be��rKcCrJ)Nr$rrrrGrrr	r=�rLr=cCs�ddl}d}|jdd�r|jddkr|jdd�=d}z|jdd�r2t|jdd�|d�WdStdg|d�WdStyP|j�d�|�d�YdSw)Nrr$z-rr&�.z
[Interrupted]
)�sys�argv�testall�KeyboardInterrupt�stderr�write�exit)rN�	recursiverrr	�test�s�rVc	Cs�ddl}ddl}|D]W}|j�|�r?t|ddd�|s|r:td�ddl}|�|j�|�|�d��}t||d�q
td�q
t|ddd�|j	�
�ztt|��Wq
tyatd	�Yq
wdS)
Nrz/:� )�endzrecursing down:�*z*** directory (use -r) ***�:z*** not found ***)
rN�os�path�isdir�print�glob�join�escaperP�stdout�flushr�OSError)�listrUZtoplevelrNr[rr_�namesrrr	rP�s&

��rP�__main__N)�__all__�collectionsrrr-�__doc__Z	framerater1ZnframesZ	sampwidthrrr
r�appendr3r:r?rBrCrDrEr*r+rKr=rVrP�__name__rrrr	�<module>sN �










�
© 2025 GrazzMean