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.138.37.116
User: edustar (269686) | Group: tty (888)
Safe Mode: OFF
Disable Function:
NONE

name : aifc.cpython-32.pyo
l
��bc@sxdZddlZddlZdddgZGd�de�ZdZd�Zd	�Zd
�Z	d�Z
d�Zd
Zd�Z
d�Zd�Zd�Zd�Zd�Zd�ZddlmZGd�d�ZGd�d�Zed�ZeZedkrtddlZejdd�r9ejjd�nejdZeed�Z e!de�e!d e j"��e!d!e j#��e!d"e j$��e!d#e j%��e!d$e j&��e!d%e j'��ejd&d�rqejd&Z(e!d'e(�ee(d(�Z)e)j*e j+��x*e j,d)�Z-e-r@Pne)j.e-�q&e)j/�e j/�e!d*�nndS(+uDStuff to parse AIFF-C and AIFF files.

Unless explicitly stated otherwise, the description below is true
both for AIFF-C files and AIFF files.

An AIFF-C file has the following structure.

  +-----------------+
  | FORM            |
  +-----------------+
  | <size>          |
  +----+------------+
  |    | AIFC       |
  |    +------------+
  |    | <chunks>   |
  |    |    .       |
  |    |    .       |
  |    |    .       |
  +----+------------+

An AIFF file has the string "AIFF" instead of "AIFC".

A chunk consists of an identifier (4 bytes) followed by a size (4 bytes,
big endian order), followed by the data.  The size field does not include
the size of the 8 byte header.

The following chunk types are recognized.

  FVER
      <version number of AIFF-C defining document> (AIFF-C only).
  MARK
      <# of markers> (2 bytes)
      list of markers:
          <marker ID> (2 bytes, must be > 0)
          <position> (4 bytes)
          <marker name> ("pstring")
  COMM
      <# of channels> (2 bytes)
      <# of sound frames> (4 bytes)
      <size of the samples> (2 bytes)
      <sampling frequency> (10 bytes, IEEE 80-bit extended
          floating point)
      in AIFF-C files only:
      <compression type> (4 bytes)
      <human-readable version of compression type> ("pstring")
  SSND
      <offset> (4 bytes, not used by this program)
      <blocksize> (4 bytes, not used by this program)
      <sound data>

A pstring consists of 1 byte length, a string of characters, and 0 or 1
byte pad to make the total length even.

Usage.

Reading AIFF files:
  f = aifc.open(file, 'r')
where file is either the name of a file or an open file pointer.
The open file pointer must have methods read(), seek(), and close().
In some types of audio files, if the setpos() method is not used,
the seek() method is not necessary.

This returns an instance of a class with the following public methods:
  getnchannels()  -- returns number of audio channels (1 for
             mono, 2 for stereo)
  getsampwidth()  -- returns sample width in bytes
  getframerate()  -- returns sampling frequency
  getnframes()    -- returns number of audio frames
  getcomptype()   -- returns compression type ('NONE' for AIFF files)
  getcompname()   -- returns human-readable version of
             compression type ('not compressed' for AIFF files)
  getparams() -- returns a tuple consisting of all of the
             above in the above order
  getmarkers()    -- get the list of marks in the audio file or None
             if there are no marks
  getmark(id) -- get mark with the specified id (raises an error
             if the mark does not exist)
  readframes(n)   -- returns at most n frames of audio
  rewind()    -- rewind to the beginning of the audio stream
  setpos(pos) -- seek to the specified position
  tell()      -- return the current position
  close()     -- close the instance (make it unusable)
The position returned by tell(), the position given to setpos() and
the position of marks are all compatible and have nothing to do with
the actual position in the file.
The close() method is called automatically when the class instance
is destroyed.

Writing AIFF files:
  f = aifc.open(file, 'w')
where file is either the name of a file or an open file pointer.
The open file pointer must have methods write(), tell(), seek(), and
close().

This returns an instance of a class with the following public methods:
  aiff()      -- create an AIFF file (AIFF-C default)
  aifc()      -- create an AIFF-C file
  setnchannels(n) -- set the number of channels
  setsampwidth(n) -- set the sample width
  setframerate(n) -- set the frame rate
  setnframes(n)   -- set the number of frames
  setcomptype(type, name)
          -- set the compression type and the
             human-readable compression type
  setparams(tuple)
          -- set all parameters at once
  setmark(id, pos, name)
          -- add specified mark to the list of marks
  tell()      -- return current position in output file (useful
             in combination with setmark())
  writeframesraw(data)
          -- write audio frames without pathing up the
             file header
  writeframes(data)
          -- write audio frames and patch up the file header
  close()     -- patch up the file header and close the
             output file
You should set the parameters before the first writeframesraw or
writeframes.  The total number of frames does not need to be set,
but when it is set to the correct value, the header does not have to
be patched up.
It is best to first set all parameters, perhaps possibly the
compression type, and then write audio frames using writeframesraw.
When all frames have been written, either call writeframes('') or
close() to patch up the sizes in the header.
Marks can be added anytime.  If there are any marks, ypu must call
close() after all frames have been written.
The close() method is called automatically when the class instance
is destroyed.

When a file is opened with the extension '.aiff', an AIFF file is
written, otherwise an AIFF-C file is written.  This default can be
changed by calling aiff() or aifc() before the first writeframes or
writeframesraw.
iNuErroruopenuopenfpcBs|EeZdS(N(u__name__u
__module__(u
__locals__((u+/usr/local/python-3.2/lib/python3.2/aifc.pyuError�s
I@Q��cCsCy!tjd|jd��dSWntjk
r>t�YnXdS(Nu>lii(ustructuunpackureaduerroruEOFError(ufile((u+/usr/local/python-3.2/lib/python3.2/aifc.pyu
_read_long�s!cCsCy!tjd|jd��dSWntjk
r>t�YnXdS(Nu>Lii(ustructuunpackureaduerroruEOFError(ufile((u+/usr/local/python-3.2/lib/python3.2/aifc.pyu_read_ulong�s!cCsCy!tjd|jd��dSWntjk
r>t�YnXdS(Nu>hii(ustructuunpackureaduerroruEOFError(ufile((u+/usr/local/python-3.2/lib/python3.2/aifc.pyu_read_short�s!cCsCy!tjd|jd��dSWntjk
r>t�YnXdS(Nu>Hii(ustructuunpackureaduerroruEOFError(ufile((u+/usr/local/python-3.2/lib/python3.2/aifc.pyu_read_ushort�s!cCs_t|jd��}|dkr*d}n|j|�}|d@dkr[|jd�}n|S(Niis(uorduread(ufileulengthudataudummy((u+/usr/local/python-3.2/lib/python3.2/aifc.pyu_read_string�s	g�����cCs�t|�}d}|dkr1d
}|d}nt|�}t|�}||kok|kokdknryd}n>|dkr�t}n)|d}|d|td|d	�}||S(Niii�gi�i�?Ig@i?i����(u_read_shortu_read_ulongu	_HUGE_VALupow(ufuexponusignuhimantulomant((u+/usr/local/python-3.2/lib/python3.2/aifc.pyu_read_float�s
'		
cCs|jtjd|��dS(Nu>h(uwriteustructupack(ufux((u+/usr/local/python-3.2/lib/python3.2/aifc.pyu_write_short�scCs|jtjd|��dS(Nu>H(uwriteustructupack(ufux((u+/usr/local/python-3.2/lib/python3.2/aifc.pyu
_write_ushort�scCs|jtjd|��dS(Nu>l(uwriteustructupack(ufux((u+/usr/local/python-3.2/lib/python3.2/aifc.pyu_write_long�scCs|jtjd|��dS(Nu>L(uwriteustructupack(ufux((u+/usr/local/python-3.2/lib/python3.2/aifc.pyu_write_ulong�scCswt|�dkr!td��n|jtjdt|���|j|�t|�d@dkrs|jd�ndS(Ni�u%string exceeds maximum pstring lengthuBiis(ulenu
ValueErroruwriteustructupack(ufus((u+/usr/local/python-3.2/lib/python3.2/aifc.pyu
_write_string�s
c	Cshddl}|dkr+d}|d}nd}|dkrRd}d}d}n�|j|�\}}|dks�|dks�||kr�|dB}d}d}n�|d}|dkr�|j||�}d}n||B}|j|d�}|j|�}t|�}|j||d�}|j|�}t|�}t||�t||�t||�dS(	Nii�ii@i�i�?i i����(umathufrexpuldexpuflooruintu
_write_ushortu_write_ulong(	ufuxumathusignuexponuhimantulomantufmantufsmant((u+/usr/local/python-3.2/lib/python3.2/aifc.pyu_write_float�s8
	$
	
	


(uChunkcBs�|EeZd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�ZdS(cCs�d|_d|_g|_d|_||_t|�}|j�dkrZtd��n|j	d�}|dkr�d|_
n$|dkr�d|_
ntd��d|_x�d|_yt|j�}Wnt
k
r�PYnX|j�}|d	kr|j|�d|_nj|d
krD||_|j	d�}d|_n:|dkrbt|�|_n|d
kr~|j|�n|j�q�|js�|jr�td��ndS(NisFORMu file does not start with FORM idisAIFFsAIFCiunot an AIFF or AIFF-C filesCOMMsSSNDisFVERsMARKu$COMM chunk and/or SSND chunk missing(u_versionuNoneu_convertu_markersu	_soundposu_fileuChunkugetnameuErrorureadu_aifcu_comm_chunk_readu_ssnd_seek_neededuEOFErroru_read_comm_chunku_ssnd_chunku_read_ulongu	_readmarkuskip(uselfufileuchunkuformdatau	chunknameudummy((u+/usr/local/python-3.2/lib/python3.2/aifc.pyuinitfp#sH							

	
cCs5t|t�r$tj|d�}n|j|�dS(Nurb(u
isinstanceustrubuiltinsuopenuinitfp(uselfuf((u+/usr/local/python-3.2/lib/python3.2/aifc.pyu__init__JscCs|jS(N(u_file(uself((u+/usr/local/python-3.2/lib/python3.2/aifc.pyugetfpSscCsd|_d|_dS(Nii(u_ssnd_seek_neededu	_soundpos(uself((u+/usr/local/python-3.2/lib/python3.2/aifc.pyurewindVs	cCs|jj�dS(N(u_fileuclose(uself((u+/usr/local/python-3.2/lib/python3.2/aifc.pyucloseZscCs|jS(N(u	_soundpos(uself((u+/usr/local/python-3.2/lib/python3.2/aifc.pyutell]scCs|jS(N(u
_nchannels(uself((u+/usr/local/python-3.2/lib/python3.2/aifc.pyugetnchannels`scCs|jS(N(u_nframes(uself((u+/usr/local/python-3.2/lib/python3.2/aifc.pyu
getnframescscCs|jS(N(u
_sampwidth(uself((u+/usr/local/python-3.2/lib/python3.2/aifc.pyugetsampwidthfscCs|jS(N(u
_framerate(uself((u+/usr/local/python-3.2/lib/python3.2/aifc.pyugetframerateiscCs|jS(N(u	_comptype(uself((u+/usr/local/python-3.2/lib/python3.2/aifc.pyugetcomptypelscCs|jS(N(u	_compname(uself((u+/usr/local/python-3.2/lib/python3.2/aifc.pyugetcompnameoscCs:|j�|j�|j�|j�|j�|j�fS(N(ugetnchannelsugetsampwidthugetframerateu
getnframesugetcomptypeugetcompname(uself((u+/usr/local/python-3.2/lib/python3.2/aifc.pyu	getparamsuscCs t|j�dkrdS|jS(Ni(ulenu_markersuNone(uself((u+/usr/local/python-3.2/lib/python3.2/aifc.pyu
getmarkerszscCsAx%|jD]}||dkr
|Sq
Wtdj|���dS(Niumarker {0!r} does not exist(u_markersuErroruformat(uselfuidumarker((u+/usr/local/python-3.2/lib/python3.2/aifc.pyugetmarkscCs@|dks||jkr*td��n||_d|_dS(Niuposition not in rangei(u_nframesuErroru	_soundposu_ssnd_seek_needed(uselfupos((u+/usr/local/python-3.2/lib/python3.2/aifc.pyusetpos�s	cCs�|jrd|jjd�|jjd�}|j|j}|rX|jj|d�nd|_n|dkrtdS|jj||j�}|jr�|r�|j|�}n|jt|�|j|j	|_|S(Niis(
u_ssnd_seek_neededu_ssnd_chunkuseekureadu	_soundposu
_framesizeu_convertulenu
_nchannelsu
_sampwidth(uselfunframesudummyuposudata((u+/usr/local/python-3.2/lib/python3.2/aifc.pyu
readframes�s	cCsddl}|j|d�S(Nii(uaudioopualaw2lin(uselfudatauaudioop((u+/usr/local/python-3.2/lib/python3.2/aifc.pyu	_alaw2lin�scCsddl}|j|d�S(Nii(uaudioopuulaw2lin(uselfudatauaudioop((u+/usr/local/python-3.2/lib/python3.2/aifc.pyu	_ulaw2lin�scCsLddl}t|d�s'd|_n|j|d|j�\}|_|S(Niu_adpcmstatei(uaudioopuhasattruNoneu_adpcmstateu	adpcm2lin(uselfudatauaudioop((u+/usr/local/python-3.2/lib/python3.2/aifc.pyu
_adpcm2lin�s
!cCs�t|�|_t|�|_t|�dd|_tt|��|_|j|j|_|j	r�d}|j
dkr�d}td�d|_
n|jd�|_
|r
t|jjd��}|d@dkr�|d}n|j
||_
|jjdd�nt|�|_|j
d	kr�|j
d
krV|j|_|jd|_q�|j
dkr�|j|_|jd
|_q�|j
dkr�|j|_|jd
|_q�td��q�nd	|_
d|_dS(NiiiiiuWarning: bad COMM chunk sizeiisNONEsG722sulawsULAWisalawsALAWuunsupported compression typesnot compressedi����(sulawsULAW(salawsALAW(u_read_shortu
_nchannelsu
_read_longu_nframesu
_sampwidthuintu_read_floatu
_framerateu
_framesizeu_aifcu	chunksizeuprintureadu	_comptypeuordufileuseeku_read_stringu	_compnameu
_adpcm2linu_convertu	_ulaw2linu	_alaw2linuError(uselfuchunkukludgeulength((u+/usr/local/python-3.2/lib/python3.2/aifc.pyu_read_comm_chunk�s@	

	cCs�t|�}ygx`t|�D]R}t|�}t|�}t|�}|sR|r|jj|||f�qqWWn�tk
r�tddd�tt|j�dd�t|j�dkr�tddd�ntddd�td|�YnXdS(Nu!Warning: MARK chunk contains onlyuendu iumarkerumarkersu
instead of(	u_read_shorturangeu
_read_longu_read_stringu_markersuappenduEOFErroruprintulen(uselfuchunkunmarkersuiuiduposuname((u+/usr/local/python-3.2/lib/python3.2/aifc.pyu	_readmark�s$
N(u__name__u
__module__uinitfpu__init__ugetfpurewinducloseutellugetnchannelsu
getnframesugetsampwidthugetframerateugetcomptypeugetcompnameu	getparamsu
getmarkersugetmarkusetposu
readframesu	_alaw2linu	_ulaw2linu
_adpcm2linu_read_comm_chunku	_readmark(u
__locals__((u+/usr/local/python-3.2/lib/python3.2/aifc.pyu	Aifc_read�s,
$	'																					(u	Aifc_readcBs@|EeZd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z d�Z!d �Z"d!�Z#d"S(#cCslt|t�r*|}tj|d�}nd}|j|�|dd�dkr_d|_n	d|_dS(Nuwbu???iu.aiffiii����(u
isinstanceustrubuiltinsuopenuinitfpu_aifc(uselfufufilename((u+/usr/local/python-3.2/lib/python3.2/aifc.pyu__init__s
cCs�||_t|_d|_d|_d|_d|_d|_d|_	d|_
d|_d|_d|_
g|_d|_d|_dS(NsNONEsnot compressedii(u_fileu
_AIFC_versionu_versionu	_comptypeu	_compnameuNoneu_convertu
_nchannelsu
_sampwidthu
_framerateu_nframesu_nframeswrittenu_datawrittenu_datalengthu_markersu_marklengthu_aifc(uselfufile((u+/usr/local/python-3.2/lib/python3.2/aifc.pyuinitfps														cCs|j�dS(N(uclose(uself((u+/usr/local/python-3.2/lib/python3.2/aifc.pyu__del__)scCs%|jrtd��nd|_dS(Nu0cannot change parameters after starting to writei(u_nframeswrittenuErroru_aifc(uself((u+/usr/local/python-3.2/lib/python3.2/aifc.pyuaiff/s	cCs%|jrtd��nd|_dS(Nu0cannot change parameters after starting to writei(u_nframeswrittenuErroru_aifc(uself((u+/usr/local/python-3.2/lib/python3.2/aifc.pyuaifc4s	cCs@|jrtd��n|dkr3td��n||_dS(Nu0cannot change parameters after starting to writeiubad # of channels(u_nframeswrittenuErroru
_nchannels(uselfu	nchannels((u+/usr/local/python-3.2/lib/python3.2/aifc.pyusetnchannels9s
	cCs|jstd��n|jS(Nunumber of channels not set(u
_nchannelsuError(uself((u+/usr/local/python-3.2/lib/python3.2/aifc.pyugetnchannels@s	cCsL|jrtd��n|dks0|dkr?td��n||_dS(Nu0cannot change parameters after starting to writeiiubad sample width(u_nframeswrittenuErroru
_sampwidth(uselfu	sampwidth((u+/usr/local/python-3.2/lib/python3.2/aifc.pyusetsampwidthEs
	cCs|jstd��n|jS(Nusample width not set(u
_sampwidthuError(uself((u+/usr/local/python-3.2/lib/python3.2/aifc.pyugetsampwidthLs	cCs@|jrtd��n|dkr3td��n||_dS(Nu0cannot change parameters after starting to writeiubad frame rate(u_nframeswrittenuErroru
_framerate(uselfu	framerate((u+/usr/local/python-3.2/lib/python3.2/aifc.pyusetframerateQs
	cCs|jstd��n|jS(Nuframe rate not set(u
_framerateuError(uself((u+/usr/local/python-3.2/lib/python3.2/aifc.pyugetframerateXs	cCs%|jrtd��n||_dS(Nu0cannot change parameters after starting to write(u_nframeswrittenuErroru_nframes(uselfunframes((u+/usr/local/python-3.2/lib/python3.2/aifc.pyu
setnframes]s	cCs|jS(N(u_nframeswritten(uself((u+/usr/local/python-3.2/lib/python3.2/aifc.pyu
getnframesbscCsI|jrtd��n|d	kr3td��n||_||_dS(
Nu0cannot change parameters after starting to writesNONEsulawsULAWsalawsALAWsG722uunsupported compression type(sNONEsulawsULAWsalawsALAWsG722(u_nframeswrittenuErroru	_comptypeu	_compname(uselfucomptypeucompname((u+/usr/local/python-3.2/lib/python3.2/aifc.pyusetcomptypees			cCs|jS(N(u	_comptype(uself((u+/usr/local/python-3.2/lib/python3.2/aifc.pyugetcomptypenscCs|jS(N(u	_compname(uself((u+/usr/local/python-3.2/lib/python3.2/aifc.pyugetcompnameqscCs�|\}}}}}}|jr0td��n|d	krKtd��n|j|�|j|�|j|�|j|�|j||�dS(
Nu0cannot change parameters after starting to writesNONEsulawsULAWsalawsALAWsG722uunsupported compression type(sNONEsulawsULAWsalawsALAWsG722(u_nframeswrittenuErrorusetnchannelsusetsampwidthusetframerateu
setnframesusetcomptype(uselfuparamsu	nchannelsu	sampwidthu	framerateunframesucomptypeucompname((u+/usr/local/python-3.2/lib/python3.2/aifc.pyu	setparamsys		



cCsU|js|js|jr-td��n|j|j|j|j|j|jfS(Nunot all parameters set(u
_nchannelsu
_sampwidthu
_framerateuErroru_nframesu	_comptypeu	_compname(uself((u+/usr/local/python-3.2/lib/python3.2/aifc.pyu	getparams�scCs�|dkrtd��n|dkr6td��nt|t�sTtd��nxNtt|j��D]7}||j|dkrj|||f|j|<dSqjW|jj|||f�dS(Niumarker ID must be > 0umarker position must be >= 0umarker name must be bytes(uErroru
isinstanceubytesurangeulenu_markersuappend(uselfuiduposunameui((u+/usr/local/python-3.2/lib/python3.2/aifc.pyusetmark�scCsAx%|jD]}||dkr
|Sq
Wtdj|���dS(Niumarker {0!r} does not exist(u_markersuErroruformat(uselfuidumarker((u+/usr/local/python-3.2/lib/python3.2/aifc.pyugetmark�scCs t|j�dkrdS|jS(Ni(ulenu_markersuNone(uself((u+/usr/local/python-3.2/lib/python3.2/aifc.pyu
getmarkers�scCs|jS(N(u_nframeswritten(uself((u+/usr/local/python-3.2/lib/python3.2/aifc.pyutell�scCs�|jt|��t|�|j|j}|jrH|j|�}n|jj|�|j||_|jt|�|_dS(N(	u_ensure_header_writtenulenu
_sampwidthu
_nchannelsu_convertu_fileuwriteu_nframeswrittenu_datawritten(uselfudataunframes((u+/usr/local/python-3.2/lib/python3.2/aifc.pyuwriteframesraw�s	cCsB|j|�|j|jks1|j|jkr>|j�ndS(N(uwriteframesrawu_nframeswrittenu_nframesu_datalengthu_datawrittenu_patchheader(uselfudata((u+/usr/local/python-3.2/lib/python3.2/aifc.pyuwriteframes�s
cCs�|jdkrdSz�|jd�|jd@rS|jjd�|jd|_n|j�|j|jks�|j|jks�|j	r�|j
�nWdd|_|j}d|_|j�XdS(Niis(
u_fileuNoneu_ensure_header_writtenu_datawrittenuwriteu
_writemarkersu_nframeswrittenu_nframesu_datalengthu_marklengthu_patchheaderu_convertuclose(uselfuf((u+/usr/local/python-3.2/lib/python3.2/aifc.pyuclose�s 


				cCsddl}|j|d�S(Nii(uaudioopulin2alaw(uselfudatauaudioop((u+/usr/local/python-3.2/lib/python3.2/aifc.pyu	_lin2alaw�scCsddl}|j|d�S(Nii(uaudioopulin2ulaw(uselfudatauaudioop((u+/usr/local/python-3.2/lib/python3.2/aifc.pyu	_lin2ulaw�scCsLddl}t|d�s'd|_n|j|d|j�\}|_|S(Niu_adpcmstatei(uaudioopuhasattruNoneu_adpcmstateu	lin2adpcm(uselfudatauaudioop((u+/usr/local/python-3.2/lib/python3.2/aifc.pyu
_lin2adpcm�s
!cCs�|js�|jdkrN|js-d|_n|jdkrNtd��qNn|jsftd��n|js~td	��n|js�td
��n|j|�ndS(NsULAWsulawsALAWsalawsG722iuRsample width must be 2 when compressing with ulaw/ULAW, alaw/ALAW or G7.22 (ADPCM)u# channels not specifiedusample width not specifiedusampling rate not specified(sULAWsulawsALAWsalawsG722(u_nframeswrittenu	_comptypeu
_sampwidthuErroru
_nchannelsu
_framerateu
_write_header(uselfudatasize((u+/usr/local/python-3.2/lib/python3.2/aifc.pyu_ensure_header_written�s					cCs^|jdkr|j|_n<|jdkr<|j|_n|jdkrZ|j|_ndS(NsG722sulawsULAWsalawsALAW(sulawsULAW(salawsALAW(u	_comptypeu
_lin2adpcmu_convertu	_lin2ulawu	_lin2alaw(uself((u+/usr/local/python-3.2/lib/python3.2/aifc.pyu_init_compression�scCs�|jr%|jdkr%|j�n|jjd�|jsX||j|j|_n|j|j|j|_|jd@r�|jd|_n|jr&|jdkr�|jd|_|jd@r#|jd|_q#q&|jd	kr&|jd
d|_|jd@r#|jd|_q#q&n|jj	�|_
|j|j�}|jr�|jjd�|jjd
�t|jd�t|j|j
�n|jjd�|jjd�t|j|�t|j|j�|jj	�|_t|j|j�t|j|jd�t|j|j�|jr]|jj|j�t|j|j�n|jjd�|jj	�|_t|j|jd�t|jd�t|jd�dS(NsNONEsFORMisulawsULAWsalawsALAWisG722iisAIFCsFVERsAIFFsCOMMisSSNDi(sulawsULAWsalawsALAW(u_aifcu	_comptypeu_init_compressionu_fileuwriteu_nframesu
_nchannelsu
_sampwidthu_datalengthutellu_form_length_posu_write_form_lengthu_write_ulongu_versionu_write_shortu_nframes_posu_write_floatu
_framerateu
_write_stringu	_compnameu_ssnd_length_pos(uselfu
initlengthu
commlength((u+/usr/local/python-3.2/lib/python3.2/aifc.pyu
_write_header�sP
	
	

		cCsw|jr<d	t|j�}|d@r3|d}nd}nd}d}t|jd||jd|d|�|S(
Niiiiiiiii(u_aifculenu	_compnameu_write_ulongu_fileu_marklength(uselfu
datalengthu
commlengthu
verslength((u+/usr/local/python-3.2/lib/python3.2/aifc.pyu_write_form_length!s	

		"cCs0|jj�}|jd@r<|jd}|jjd�n	|j}||jkr�|j|jkr�|jdkr�|jj|d�dS|jj|j	d�|j
|�}|jj|jd�t|j|j�|jj|j
d�t|j|d�|jj|d�|j|_||_dS(Nisii(u_fileutellu_datawrittenuwriteu_datalengthu_nframesu_nframeswrittenu_marklengthuseeku_form_length_posu_write_form_lengthu_nframes_posu_write_ulongu_ssnd_length_pos(uselfucurposu
datalengthudummy((u+/usr/local/python-3.2/lib/python3.2/aifc.pyu_patchheader.s&

	cCst|j�dkrdS|jjd�d}x[|jD]P}|\}}}|t|�dd}t|�d@dkr9|d}q9q9Wt|j|�|d|_t|jt|j��xP|jD]E}|\}}}t|j|�t|j|�t|j|�q�WdS(NisMARKiiii(ulenu_markersu_fileuwriteu_write_ulongu_marklengthu_write_shortu
_write_string(uselfulengthumarkeruiduposuname((u+/usr/local/python-3.2/lib/python3.2/aifc.pyu
_writemarkersDs"
N($u__name__u
__module__u__init__uinitfpu__del__uaiffuaifcusetnchannelsugetnchannelsusetsampwidthugetsampwidthusetframerateugetframerateu
setnframesu
getnframesusetcomptypeugetcomptypeugetcompnameu	setparamsu	getparamsusetmarkugetmarku
getmarkersutelluwriteframesrawuwriteframesucloseu	_lin2alawu	_lin2ulawu
_lin2adpcmu_ensure_header_writtenu_init_compressionu
_write_headeru_write_form_lengthu_patchheaderu
_writemarkers(u
__locals__((u+/usr/local/python-3.2/lib/python3.2/aifc.pyu
Aifc_write�sD
	
																	
		
													+	
	u
Aifc_writecCsl|dkr0t|d�r'|j}q0d}n|dkrFt|�S|dkr\t|�Std��dS(	Numodeurburuwuwbu$mode must be 'r', 'rb', 'w', or 'wb'(ururb(uwuwb(uNoneuhasattrumodeu	Aifc_readu
Aifc_writeuError(ufumode((u+/usr/local/python-3.2/lib/python3.2/aifc.pyuopenWs	

u__main__iu/usr/demos/data/audio/bach.aiffuruReadingunchannels =unframes   =usampwidth =uframerate =ucomptype  =ucompname  =iuWritinguwiuDone.(0u__doc__ustructubuiltinsu__all__u	ExceptionuErroru
_AIFC_versionu
_read_longu_read_ulongu_read_shortu_read_ushortu_read_stringu	_HUGE_VALu_read_floatu_write_shortu
_write_ushortu_write_longu_write_ulongu
_write_stringu_write_floatuchunkuChunku	Aifc_readu
Aifc_writeuNoneuopenuopenfpu__name__usysuargvuappendufnufuprintugetnchannelsu
getnframesugetsampwidthugetframerateugetcomptypeugetcompnameugnugu	setparamsu	getparamsu
readframesudatauwriteframesuclose(((u+/usr/local/python-3.2/lib/python3.2/aifc.pyu<module>�sd					
							!��k







© 2025 GrazzMean