관리-도구
편집 파일: wave.cpython-36.opt-2.pyc
3 \-E � @ s� d dl Z dddddgZG dd� de�ZdZdZd dlZd dlZd dlZd dl m Z d d lmZ edd�Z G dd� d�ZG dd� d�Zddd�ZeZdS )� N�open�openfp�Error� Wave_read� Wave_writec @ s e Zd ZdS )r N)�__name__� __module__�__qualname__� r r �/usr/lib64/python3.6/wave.pyr N s � �b�h�i)�Chunk)� namedtuple�_wave_paramsz7nchannels sampwidth framerate nframes comptype compnamec @ s� e Zd Zdd� Zdd� Zdd� Zdd� Zd d � Zdd� Zd d� Z dd� Z dd� Zdd� Zdd� Z dd� Zdd� Zdd� Zdd� Zdd � Zd!d"� Zd#d$� Zd%d&� Zd'd(� Zd)d*� Zd+S ),r c C s d | _ d| _t|dd�| _| jj� dkr0td��| jjd�dkrHtd��d| _d | _x�d| _ yt| jdd�}W n t k r� P Y nX |j� }|d kr�| j|� d| _n2|d kr�| js�td��|| _|j| j | _d| _ P |j� qVW | j s�| j �r td��d S ) Nr )Z bigendians RIFFz file does not start with RIFF id� s WAVEznot a WAVE filer s fmt s datazdata chunk before fmt chunkz#fmt chunk and/or data chunk missing)�_convert� _soundposr �_fileZgetnamer �readZ_fmt_chunk_read�_data_chunk�_data_seek_needed�EOFError�_read_fmt_chunkZ chunksize� _framesize�_nframes�skip)�self�file�chunkZ chunknamer r r �initfp} s: zWave_read.initfpc C sR d | _ t|t�r"tj|d�}|| _ y| j|� W n | j rF|j� � Y nX d S )N�rb)�_i_opened_the_file� isinstance�str�builtinsr r"