Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325
3 \°ã@s2dZddgZddlmZeddƒZdej_dej_d ej_d ej_d ej _d d„Z d d„Z gZ dd„Z e je ƒdd„Ze jeƒdd„Ze jeƒdd„Ze jeƒdd„Ze jeƒdd„Ze jeƒdd„Ze jeƒdd„Ze jeƒdd„Zd d!„Zd"d#„Zd$d%„Zd&d'„Zd(d)„Zed*k�r.eƒd+S),a¶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, OSError 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. Ú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)zGuess the type of a sound file.)r)ÚfilenameÚres©rú/usr/lib64/python3.6/sndhdr.pyr4sc CsHt|dƒ�4}|jdƒ}x"tD]}|||ƒ}|rt|ŽSqWdSQRXdS)zRecognize sound headers.ÚrbiN)ÚopenÚreadÚtestsr)rÚfÚhZtfrrrr r:s     cCsžddl}|jdƒsdS|dd…dkr,d}n|dd…dkrBd}ndS|jdƒy|j|d ƒ}Wnt|jfk rzdSX||jƒ|jƒ|jƒd|j ƒfS) NrsFORMéé sAIFCÚaifcsAIFFZaiffÚr) rÚ startswithÚseekr ÚEOFErrorÚErrorÚ getframerateÚ getnchannelsÚ getnframesÚ getsampwidth)rrrZfmtÚarrr Ú test_aifcKs  rc CsÜ|jdƒrt}n|dd…dkr&t}ndSd}||dd…ƒ}||dd…ƒ}||dd…ƒ}||dd …ƒ}||d d …ƒ}d } |d kr�d } n$|d kržd} n|dkr°d} d } nd} | |} | rÊ|| } nd} |||| | fS)Ns.sndéóds.ódns.ZaurrééééÚUééú?)rr éÿÿÿÿ)rÚ get_long_beÚ get_long_le) rrÚfuncÚfiletypeZhdr_sizeZ data_sizeÚencodingÚrateÚ nchannelsZ sample_sizeZ sample_bitsZ frame_sizeZnframerrr Útest_au`s2  r1cCsT|dd…dks |dd…dkr$dSt|dd…ƒ}|rBd |}nd }d |d dd fS)NéAéEsFSSDé€é„sHCOMé�é”i"VrZhcomr$rr))r*)rrZdivisorr/rrr Ú test_hcom�s  r8cCst|jdƒsdSt|dd…ƒ}d}d|ko4dknrf||dkrfd||d}|rftd |ƒ}d |dd d fS) NsCreative Voice Filer"ériôr$érg€„.AZvocrr))rÚ get_short_leÚint)rrZsbseekr/Zratecoderrr Útest_vocŽs $ r=cCs�ddl}|jdƒ s4|dd…dks4|dd…dkr8dS|jdƒy|j|dƒ}Wnt|jfk rldSXd |jƒ|jƒ|jƒd|j ƒfS) NrsRIFFrrsWAVEr!sfmt rZwav) ÚwaverrZopenfprrrrrr)rrr>Úwrrr Útest_wavœs, r@cCs$|jdƒ s|dd…dkr dSdS) NsFORMrrs8SVXÚ8svxrr$)rArr$rr)r)rrrrr Ú test_8svx¬srBcCs<|jdƒr8t|dd…ƒ}t|dd…ƒ}d|d|dfSdS)NsSOUNDrrr"r9Zsndtr$)rr+r;)rrZnsamplesr/rrr Ú test_sndtµs rCcCsD|jdƒr@t|dd…ƒ}d|ko,dknr@d|dd dfSdS) Nsr&ri i¨aZsndrr$rr))rr;)rrr/rrr Ú test_sndr¾s rDcCs,|dd>|dd>B|dd>B|dBS)Nrr#r$r!r&rr'r)Úbrrr r*Ësr*cCs,|dd>|dd>B|dd>B|dBS)Nr'r#r&r!r$rrr)rErrr r+Îsr+cCs|dd>|dBS)Nrrr$r)rErrr Ú get_short_beÑsrFcCs|dd>|dBS)Nr$rrr)rErrr r;Ôsr;c Cs ddl}d}|jdd…r8|jddkr8|jdd…=d}y8|jdd…r`t|jdd…|dƒntdg|dƒWn*tk rš|jjdƒ|jdƒYnXdS)Nrr$z-rr&Ú.z [Interrupted] )ÚsysÚargvÚtestallÚKeyboardInterruptÚstderrÚwriteÚexit)rHÚ recursiverrr ÚtestÜs  rPc CsÊddl}ddl}x´|D]¬}|jj|ƒrzt|ddd�|s>|rptdƒddl}|j|jj|dƒƒ}t||dƒqÂtdƒqt|ddd�|jj ƒytt |ƒƒWqt k rÀtd ƒYqXqWdS) Nrz/:ú )Úendzrecursing down:Ú*z*** directory (use -r) ***ú:z*** not found ***) rHÚosÚpathÚisdirÚprintÚglobÚjoinrJÚstdoutÚflushrÚOSError)ÚlistrOZtoplevelrHrUrrYÚnamesrrr rJës"    rJÚ__main__N)Ú__doc__Ú__all__Ú collectionsrrr-Z framerater0ZnframesZ sampwidthrrr rÚappendr1r8r=r@rBrCrDr*r+rFr;rPrJÚ__name__rrrr ÚsH