config root man

Current Path : /usr/local/lib/python2.5/

FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64
Upload File :
Current File : //usr/local/lib/python2.5/sndhdr.pyc

łň
h”Rc@s,dZddgZd„Zd„ZgZd„Zeieƒd„Zeieƒd„Zeieƒd„Z	eie	ƒd	„Z
eie
ƒd
„Zeieƒd„Zeieƒd„Z
eie
ƒd
„Zd„Zd„Zd„Zd„Zd„ZedjoeƒndS(sśRoutines to help recognizing sound files.

Function whathdr() recognizes various types of sound file headers.
It understands almost all headers that SOX can decode.

The return tuple contains the following items, in this order:
- file type (as SOX understands it)
- sampling rate (0 if unknown or hard to decode)
- number of channels (0 if unknown or hard to decode)
- number of frames in the file (-1 if unknown or hard to decode)
- number of bits/sample, or 'U' for U-LAW, or 'A' for A-LAW

If the file doesn't have a recognizable type, it returns None.
If the file can't be opened, IOError is raised.

To compute the total time, divide the number of frames by the
sampling rate (a frame contains a sample for each channel).

Function what() calls whathdr().  (It used to also use some
heuristics for raw data, but this doesn't work very well.)

Finally, the function test() is a simple main program that calls
what() for all files mentioned on the argument list.  For directory
arguments it calls what() for all files in that directory.  Default
argument is "." (testing all files in the current directory).  The
option -r tells it to recurse down directories found inside
explicitly given directories.
twhattwhathdrcCst|ƒ}|S(sGuess the type of a sound file(R(tfilenametres((s"/usr/local/lib/python2.5/sndhdr.pyR#scCsQt|dƒ}|idƒ}x,tD]$}|||ƒ}|o|Sq%q%WdS(sRecognize sound headerstrbiN(topentreadtteststNone(RtfthttfR((s"/usr/local/lib/python2.5/sndhdr.pyR)sc
CsÚddk}|d djodSn|dd!djo
d}n#|dd!djo
d	}ndS|id
ƒy|i|dƒ}Wn t|ifj
odSnX||iƒ|iƒ|iƒd|i	ƒfS(Ni˙˙˙˙itFORMiitAIFCtaifctAIFFtaiffitr(
RRtseektopenfptEOFErrortErrortgetframeratetgetnchannelst
getnframestgetsampwidth(R
R	Rtfmtta((s"/usr/local/lib/python2.5/sndhdr.pyt	test_aifc:s


	cCs|d djo
t}n |d djo
t}ndSd}||dd!ƒ}||dd!ƒ}||dd!ƒ}||dd	!ƒ}||d	d
!ƒ}d}|djo
d}	n;|d
jo
d}	n$|djod}	d
}nd}	||}
|||||
|	fS(Nis.sndtds.sdns.tauiiiiiitUiit?(Rsdns.(tget_long_betget_long_leR(R
R	ttypethdr_sizet	data_sizetencodingtratet	nchannelstsample_sizetsample_bitst
frame_size((s"/usr/local/lib/python2.5/sndhdr.pyttest_auOs,








cCsZ|dd!djp|dd!djodSnt|dd!ƒ}d	d
|ddd
fS(NiAiEtFSSDi€i„tHCOMiithcomi"Vii˙˙˙˙iii”(RR!(R
R	tdivisor((s"/usr/local/lib/python2.5/sndhdr.pyt	test_hcomls(cCs |d djodSnt|dd!ƒ}d}d|jo
djno=||djo,t||dƒ}tdd	|ƒ}nd
|ddd
fS(NisCreative Voice Fileiiiôsig€„.Aitvocii˙˙˙˙i(Rtget_short_letordtint(R
R	tsbseekR'tratecode((s"/usr/local/lib/python2.5/sndhdr.pyttest_vocus/cCs |d djp(|dd!djp|dd!djodSnt|dd	!ƒ}t|d	d
!ƒ}t|d
d!ƒ}t|dd
!ƒ}d||d|fS(NitRIFFiitWAVEisfmt iiiii"i$twavi˙˙˙˙(RR3R"(R
R	tstyleR(R'R*((s"/usr/local/lib/python2.5/sndhdr.pyttest_wav‚s9cCs1|d djp|dd!djodSnd	S(
NiRiit8SVXt8svxii(R?iiii(R(R
R	((s"/usr/local/lib/python2.5/sndhdr.pyt	test_8svxs%cCsR|d djo=t|dd!ƒ}t|dd!ƒ}d|d|dfSndS(	NitSOUNDiiiitsndti(R"R3(R
R	tnsamplesR'((s"/usr/local/lib/python2.5/sndhdr.pyt	test_sndt˜scCsa|d djoLt|dd!ƒ}d|jo
djnod|ddd	fSq]ndS(
Nitii i¨atsndrii˙˙˙˙i(R3(R
R	R'((s"/usr/local/lib/python2.5/sndhdr.pyt	test_sndrĄscCsDt|dƒd>t|dƒd>Bt|dƒd>Bt|dƒBS(Niiiiiii(R4(ts((s"/usr/local/lib/python2.5/sndhdr.pyR!ŽscCsDt|dƒd>t|dƒd>Bt|dƒd>Bt|dƒBS(Niiiiiii(R4(RH((s"/usr/local/lib/python2.5/sndhdr.pyR"ąscCs t|dƒd>t|dƒBS(Niii(R4(RH((s"/usr/local/lib/python2.5/sndhdr.pytget_short_be´scCs t|dƒd>t|dƒBS(Niii(R4(RH((s"/usr/local/lib/python2.5/sndhdr.pyR3ˇscCsÂddk}d}|ido+|iddjo|idd5d}ny@|idot|id|dƒntdg|dƒWn0tj
o$|iidƒ|idƒnXdS(Ni˙˙˙˙iis-rit.s
[Interrupted]
(tsystargvttestalltKeyboardInterrupttstderrtwritetexit(RKt	recursive((s"/usr/local/lib/python2.5/sndhdr.pyttestżs"

cCsáddk}ddk}xÂ|D]ş}|ii|ƒob|dG|p|oCdGHddk}|i|ii|dƒƒ}t||dƒqŮdGHq|dG|iiƒyt	|ƒGHWqt
j
odGHqXqWdS(	Ni˙˙˙˙s/:srecursing down:t*is*** directory (use -r) ***t:s*** not found ***(RKtostpathtisdirtglobtjoinRMtstdouttflushRtIOError(tlistRRttoplevelRKRVRRYtnames((s"/usr/local/lib/python2.5/sndhdr.pyRMÎs$	
t__main__N(t__doc__t__all__RRRRtappendR,R1R8R=R@RDRGR!R"RIR3RSRMt__name__(((s"/usr/local/lib/python2.5/sndhdr.pys<module>s8			
	
	
	

	

	
	
	
						


Man Man