AlkantarClanX12
Current Path : /opt/alt/python38/lib64/python3.8/__pycache__/ |
Current File : //opt/alt/python38/lib64/python3.8/__pycache__/wave.cpython-38.opt-2.pyc |
U i�f6G � @ s� d dl Z dddddgZG dd� de�ZdZd Zd dlZd dlZd dlZd d l m Z d dlmZ d dl Z edd �ZG dd� d�ZG dd� d�Zddd�Zddd�ZdS )� N�open�openfp�Error� Wave_read� Wave_writec @ s e Zd ZdS )r N)�__name__� __module__�__qualname__� r r �)/opt/alt/python38/lib64/python3.8/wave.pyr N s � )N�b�hN�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�| _| j�� dkr0td��| j�d�dkrHtd��d| _d | _d| _ zt| jdd�}W n t k r� Y q�Y nX |�� }|d kr�| �|� d| _n2|d kr�| js�td��|| _|j| j | _d| _ q�|�� qT| jr�| js�td��d S ) Nr )Z bigendian� RIFFz file does not start with RIFF id� � WAVEznot a WAVE filer � fmt � 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~ s8 zWave_read.initfpc C sR d | _ t|t�r"t�|d�}|| _ z| �|� W n | j rF|�� � Y nX d S )N�rb��_i_opened_the_file� isinstance�str�builtinsr r&