;ò
ñŒü?c           @   sA   d  Z  d Z d e f d „  ƒ  YZ d „  Z d „  Z d „  Z d S(   s   Interpret sun audio headers.s   .snds   errorc           B   s   t  Z RS(   N(   s   __name__s
   __module__(    (    (    s%   /mit/python/lib/python2.3/sunaudio.pys   error   s   c         C   sH   t  |  d ƒ d >t  |  d ƒ d >Bt  |  d ƒ d >Bt  |  d ƒ BSd S(	   s"   Convert a 4-char value to integer.i    i   i   i   i   i   i   N(   s   ords   s(   s   s(    (    s%   /mit/python/lib/python2.3/sunaudio.pys   get_long_be	   s     c         C   sí   |  i d ƒ t j o t d ‚ n t |  i d ƒ ƒ } t |  i d ƒ ƒ } t |  i d ƒ ƒ } t |  i d ƒ ƒ } t |  i d ƒ ƒ } | d } | d j  o t d ‚ n | d j o |  i | ƒ } n d } | | | | | f Sd S(   s&   Read a sound header from an open file.i   s   gethdr: bad magic wordi   i    s   gethdr: bad hdr_sizes    N(   s   fps   reads   MAGICs   errors   get_long_bes   hdr_sizes	   data_sizes   encodings   sample_rates   channelss   excesss   info(   s   fps   hdr_sizes   encodings   excesss   channelss   infos   sample_rates	   data_size(    (    s%   /mit/python/lib/python2.3/sunaudio.pys   gethdr   s     
c         C   sˆ   t  t |  d ƒ ƒ } | \ } } } } } x  | d d j o | d  } q- Wd G|  GHd G| GHd G| GHd G| GHd G| GHd	 G| GHd
 S(   s0   Read and print the sound header of a named file.s   riÿÿÿÿs    s   File name:  s   Data size:  s   Encoding:   s   Sample rate:s   Channels:   s   Info:       N(	   s   gethdrs   opens   files   hdrs	   data_sizes   encodings   sample_rates   channelss   info(   s   files   infos   hdrs   encodings   channelss   sample_rates	   data_size(    (    s%   /mit/python/lib/python2.3/sunaudio.pys   printhdr!   s      					N(   s   __doc__s   MAGICs	   Exceptions   errors   get_long_bes   gethdrs   printhdr(   s   get_long_bes   MAGICs   gethdrs   printhdrs   error(    (    s%   /mit/python/lib/python2.3/sunaudio.pys   ?   s
   		