protected function readWav($readData = true)
    {
        if (!is_resource($this->_fp)) {
            throw new WavFileException('No wav file open. Use openWav() first.');
        }

        try {
            $this->readWavHeader();
        } catch (WavFileException $ex) {
            $this->closeWav();
            throw $ex;
        }

        if ($readData) return $this->readWavData();

        return $this;
    }
protected function readWav($readData = true)
    {
        if (!is_resource($this->_fp)) {
            throw new WavFileException('No wav file open. Use openWav() first.');
        }

        try {
            $this->readWavHeader();
        } catch (WavFileException $ex) {
            $this->closeWav();
            throw $ex;
        }

        if ($readData) return $this->readWavData();

        return $this;
    }
protected function readWav ( $ readData = true ) { if ( ! is_resource ( $ this -> _fp ) ) { throw new WavFileException ( 'No wav file open. Use openWav() first.' ) ; } try { $ this -> readWavHeader ( ) ; } catch ( WavFileException $ ex ) { $ this -> closeWav ( ) ; throw $ ex ; } if ( $ readData ) return $ this -> readWavData ( ) ; return $ this ; }
Read wav file from a stream.

@param bool $readData  (Optional) If true, also read the data chunk.
@throws WavFormatException
@throws WavFileException
Read wav file from a stream .