‡Æ
Nö9c       så    d  Z  	  d k Z  d k Z  d k Z  d k Z  h  Z  e i ƒ  Z  e i d d ƒ  e e d < e i ƒ  Z  e i d d ƒ  e e d <  e i ƒ  Z ! e i d d ƒ " e e d <$ e i ƒ  Z % e i d	 d ƒ & e e d
 <( e i ƒ  Z ) e i d d ƒ * e e d <, e i ƒ  Z - e i d d ƒ . e e d <0 e i ƒ  Z 1 e i d d ƒ 2 e e d <4 e i ƒ  Z	 5 e	 i d d ƒ 8 d e
 f d „  ƒ  YZ ; d „  Z J d „  Z d S(   sª  Convert "arbitrary" sound files to AIFF (Apple and SGI's audio format).

Input may be compressed.
Uncompressed file type may be AIFF, WAV, VOC, 8SVX, NeXT/Sun, and others.
An exception is raised if the file is not of a recognized type.
Returned filename is either the input filename or a temporary filename;
in the latter case the caller must ensure that it is removed.
Other temporary files used are removed by the function.
Ns   sox -t au - -t aiff -r 8000 -s   --s   aus    sox -t hcom - -t aiff -r 22050 -s   hcoms   sox -t voc - -t aiff -r 11025 -s   vocs   sox -t wav - -t aiff -s   wavs    sox -t 8svx - -t aiff -r 16000 -s   8svxs    sox -t sndt - -t aiff -r 16000 -s   sndts    sox -t sndr - -t aiff -r 16000 -s   sndrs
   uncompresss   errorc      s   8 9 RS(   N(    (    s#   /mit/python/lib/python2.0/toaiff.pys   error8 s   c  
  s´   ; < g  } = t } > z ? t |  | ƒ } Wd  @ A xn | d A r` } B | | j oJ C y D t i | ƒ Wn E t i j
 o
 F n XG | i	 | ƒ n qA WXH | Sd  S(   Ni    (
   s   tempss   Nones   rets   _toaiffs   filenames   temps   oss   unlinks   errors   remove(   s   filenames   tempss   rets   temps#   /mit/python/lib/python2.0/toaiff.pys   toaiff; s   		 	c    s2  J K |  d d j oV L t i ƒ  } M | i | ƒ N t i |  | ƒ } O | o P t	 |  d ‚ n n
 R |  } S y1 T t
 i | ƒ } U | o V | d } n WnÎ W t j
 o¿ X t | ƒ t f  ƒ j oJ t | ƒ d j o7 t | d ƒ t d ƒ j o t | d ƒ t d ƒ j o Z | d } n [ t | ƒ t d ƒ j o \ | } n ] t	 |  d | ‚ n X^ | d j o _ | Sn ` | t j p t i | ƒ o a t	 |  d	 | ‚ n c t i ƒ  } d | i | ƒ e t | i | | ƒ } f | o g t	 |  d
 ‚ n h | Sd  S(   Ni   s   .Zs   : uncompress failedi    i   s    s   : s   aiffs   : unsupported audio file type s   : conversion to aiff failed(   s   filenames   tempfiles   mktemps   fnames   tempss   appends
   uncompresss   copys   stss   errors   sndhdrs   whathdrs   ftypes   IOErrors   types   msgs   lens   Nones   tables   has_keys   temp(   s   filenames   tempss   fnames   stss   ftypes   msgs   temps#   /mit/python/lib/python2.0/toaiff.pys   _toaiffJ s6   
	
i!
(   s   __doc__s   oss   tempfiles   pipess   sndhdrs   tables   Templates   ts   appends
   uncompresss	   Exceptions   errors   toaiffs   _toaiff(    s#   /mit/python/lib/python2.0/toaiff.pys   ?	 s>   	