;ò
òŒü?c           @   sŽ  d  Z  d k Z d k Z d k Z d k Z d d g 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 <e i ƒ  Z e i	 d d ƒ e e d <e i ƒ  Z
 e
 i	 d d ƒ d e f d „  ƒ  YZ d „  Z 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   errors   toaiffs   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
   uncompressc           B   s   t  Z RS(   N(   s   __name__s
   __module__(    (    (    s#   /mit/python/lib/python2.3/toaiff.pys   error:   s   c      	   C   s…   g  } t } z t |  | ƒ } Wd  xW | D]N } | | j o; y t i | ƒ Wn t i j
 o n X| i	 | ƒ q* q* WX| Sd  S(   N(
   s   tempss   Nones   rets   _toaiffs   filenames   temps   oss   unlinks   errors   remove(   s   filenames   temps   rets   temps(    (    s#   /mit/python/lib/python2.3/toaiff.pys   toaiff=   s      c         C   s  |  d d j oZ t i ƒ  \ } } t i | ƒ | i | ƒ t	 i
 |  | ƒ } | o t |  d ‚ qq n |  } y( t i | ƒ } | o | d } n Wn¾ t j
 o² } t | ƒ t f  ƒ j oJ t | ƒ d j o7 t | d ƒ t d ƒ j o t | d ƒ t d ƒ j o | d } n t | ƒ t d ƒ j o | } n t |  d | ‚ n X| d	 j o | Sn | t j p | t j o t |  d
 | ‚ n t i ƒ  \ } } t i | ƒ | i | ƒ t | i
 | | ƒ } | o t |  d ‚ n | Sd  S(   Niþÿÿÿs   .Zs   : uncompress failedi    i   i   s    s   : s   aiffs   : unsupported audio file type s   : conversion to aiff failed(   s   filenames   tempfiles   mkstemps   fds   fnames   oss   closes   tempss   appends
   uncompresss   copys   stss   errors   sndhdrs   whathdrs   ftypes   IOErrors   msgs   types   lens   Nones   tables   temp(   s   filenames   tempss   temps   ftypes   fds   fnames   stss   msg(    (    s#   /mit/python/lib/python2.3/toaiff.pys   _toaiffL   s:    f(   s   __doc__s   oss   tempfiles   pipess   sndhdrs   __all__s   tables   Templates   ts   appends
   uncompresss	   Exceptions   errors   toaiffs   _toaiff(   s   __all__s
   uncompresss   tempfiles   pipess   toaiffs   ts   errors   tables   sndhdrs   oss   _toaiff(    (    s#   /mit/python/lib/python2.3/toaiff.pys   ?	   s@   				






	