public function pipePCM(WritableStreamInterface $dest, array $options = [])
    {
        if ($this->isClosed) {
            return;
        }

        $this->on('pcm', function ($data) use ($dest) {
            $feedmore = $dest->write($data);

            if (false === $feedmore) {
                $this->pause();
            }
        });

        $dest->on('drain', function () {
            $this->unpause();
        });

        $end = isset($options['end']) ? $options['end'] : true;
        if ($end && $this !== $dest) {
            $this->on('end', function () use ($dest) {
                $dest->end();
            });
        }
    }
public function pipePCM(WritableStreamInterface $dest, array $options = [])
    {
        if ($this->isClosed) {
            return;
        }

        $this->on('pcm', function ($data) use ($dest) {
            $feedmore = $dest->write($data);

            if (false === $feedmore) {
                $this->pause();
            }
        });

        $dest->on('drain', function () {
            $this->unpause();
        });

        $end = isset($options['end']) ? $options['end'] : true;
        if ($end && $this !== $dest) {
            $this->on('end', function () use ($dest) {
                $dest->end();
            });
        }
    }
public function pipePCM ( WritableStreamInterface $ dest , array $ options = [ ] ) { if ( $ this -> isClosed ) { return ; } $ this -> on ( 'pcm' , function ( $ data ) use ( $ dest ) { $ feedmore = $ dest -> write ( $ data ) ; if ( false === $ feedmore ) { $ this -> pause ( ) ; } } ) ; $ dest -> on ( 'drain' , function ( ) { $ this -> unpause ( ) ; } ) ; $ end = isset ( $ options [ 'end' ] ) ? $ options [ 'end' ] : true ; if ( $ end && $ this !== $ dest ) { $ this -> on ( 'end' , function ( ) use ( $ dest ) { $ dest -> end ( ) ; } ) ; } }
Pipes PCM to a destination stream.

@param WritableStreamInterface $dest    The stream to pipe to.
@param array                   $options An array of options.

@return void
Pipes PCM to a destination stream .