403Webshell
Server IP : 118.27.122.248  /  Your IP : 216.73.216.15
Web Server : Apache
System : Linux web0264.sh.tyo1 4.18.0-553.79.1.lve.el7h.x86_64 #1 SMP Wed Oct 15 16:34:46 UTC 2025 x86_64
User : c9415830 ( 11735)
PHP Version : 8.4.17
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /opt/alt/python27/lib64/python2.7/test/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/alt/python27/lib64/python2.7/test/test_ossaudiodev.pyc
�
�q2_c@sddlmZejd�ddlmZejd�ZddlZddlZddl	Z	ddl
Z
ddlZddlZyddlm
Z
Wn5ek
r�ejdkr�ejZ
q�ejZ
nXd�Zd	ejfd
��YZd�Zedkre�ndS(
i����(ttest_supporttaudio(tfindfiletossaudiodevN(tAFMT_S16_NEtlittlecCs�t|d��P}tj|�}|j�}|j�}|j}|jd�|j�}WdQX|tjkrtd��nt	j
|d�}||d|fS(Ntrbis)Expect .au file with 8-bit mu-law samplesii(topentsunautgetframeratetgetnchannelst	_encodingtseektreadtAUDIO_FILE_ENCODING_MULAW_8tRuntimeErrortaudiooptulaw2lin(tpathtfptautratet	nchannelstencodingtdata((s:/opt/alt/python27/lib64/python2.7/test/test_ossaudiodev.pytread_sound_files	
tOSSAudioDevTestscBs5eZd�Zd�Zd�Zd�Zd�ZRS(c
Cs�ytjd�}WnStk
rh}|jdtjtjtjtjfkrbt	j
|��n�nX|j�|j�|j
�|j�|j�|j|j�|j|jd�|j|jdd|j�xGdD]?}yt||d�Wntk
rq�X|jd	|�q�Wtt|��|d
||}|jt||�|jt|d�dk|�tj�}	|j|�|j �tj�}
|
|	}t||�|d
}|j|dkd�dS(Ntwis/dev/dspsbad dsp.mode: %rtclosedtnametmodei*sdsp.%s not read-onlyig�G�z@g{�G�z�?idg$@s'elapsed time > 10% off of expected time(RRR(!RRtIOErrortargsterrnotEACCEStENOENTtENODEVtEBUSYtunittesttSkipTesttbufsizet	obufcounttobuffreetgetptrtfilenotassertFalseRtassertEqualRRtsetattrt	TypeErrortfailtfloattlent
setparametersRt
assertTruetabsttimetwritetclose(
tselfRRtssizeRtdsptmsgtattrt
expected_timett1tt2telapsed_timetpercent_diff((s:/opt/alt/python27/lib64/python2.7/test/test_ossaudiodev.pytplay_sound_file,s@






" 


c	Cstjddf}tddf}xr||gD]X}|\}}}|j|�|kr.|j|�|kr.|j|�|kr.Pq.q.Wtd��|j|||t�}|j	||||fd||f�|j|||t
�}|j	||||fd||f�dS(Nii@iiD�sRunable to set audio sampling parameters: you must have really weird audio hardwaressetparameters%r: returned %r(RtAFMT_U8RtsetfmttchannelstspeedRR4tFalseR.tTrue(	R:R<tconfig1tconfig2tconfigtfmtRGRtresult((s:/opt/alt/python27/lib64/python2.7/test/test_ossaudiodev.pytset_parametersZscCs�t}d}d}x�|d|f|d|f||dfgD]�}|\}}}|j|||t�}|j||d�y|j|||t�}Wntjk
r�}q=X|jd�q=WdS(NiD�ii,i����i���s(unexpectedly got requested configurationsexpected OSSAudioError(RR4RItassertNotEqualRJRt
OSSAudioErrorR1(R:R<RNRRGRMROterr((s:/opt/alt/python27/lib64/python2.7/test/test_ossaudiodev.pytset_bad_parametersxscCs#ttd��}|j|�dS(Nsaudiotest.au(RRRD(R:t
sound_info((s:/opt/alt/python27/lib64/python2.7/test/test_ossaudiodev.pyt
test_playback�scCsBtjd�}z|j|�Wd|j�|j|j�XdS(NR(RRRPR9R5R(R:R<((s:/opt/alt/python27/lib64/python2.7/test/test_ossaudiodev.pyttest_set_parameters�s

(t__name__t
__module__RDRPRTRVRW(((s:/opt/alt/python27/lib64/python2.7/test/test_ossaudiodev.pyR*s
	.			cCs�ytjd�}Wn\tjtfk
rq}|jdtjtjtjtj	fkrkt
j|��n�nX|j�t
jt�dS(NRi(RRterrorRR R!R"R#R$R%R&R'R9Rtrun_unittestRX(R<R=((s:/opt/alt/python27/lib64/python2.7/test/test_ossaudiodev.pyt	test_main�s
t__main__(ttestRtrequiresttest.test_supportRt
import_moduleRR!tsysRR7RR&RtImportErrort	byteordertAFMT_S16_LEtAFMT_S16_BERtTestCaseRR\RX(((s:/opt/alt/python27/lib64/python2.7/test/test_ossaudiodev.pyt<module>s(


	x	

Youez - 2016 - github.com/yon3zu
LinuXploit