public function dcaDecode($channels = 2, $frameSize = null)
    {
        if (is_null($frameSize)) {
            $frameSize = round($this->frameSize * 48);
        }

        $flags = [
            '-ac', $channels, // Channels
            '-ab', round($this->bitrate / 1000), // Bitrate
            '-as', $frameSize, // Frame Size
            '-mode', 'decode', // Decode mode
        ];

        $flags = implode(' ', $flags);

        return new Process("{$this->dca} {$flags}");
    }
public function dcaDecode($channels = 2, $frameSize = null)
    {
        if (is_null($frameSize)) {
            $frameSize = round($this->frameSize * 48);
        }

        $flags = [
            '-ac', $channels, // Channels
            '-ab', round($this->bitrate / 1000), // Bitrate
            '-as', $frameSize, // Frame Size
            '-mode', 'decode', // Decode mode
        ];

        $flags = implode(' ', $flags);

        return new Process("{$this->dca} {$flags}");
    }
public function dcaDecode ( $ channels = 2 , $ frameSize = null ) { if ( is_null ( $ frameSize ) ) { $ frameSize = round ( $ this -> frameSize * 48 ) ; } $ flags = [ '-ac' , $ channels , // Channels '-ab' , round ( $ this -> bitrate / 1000 ) , // Bitrate '-as' , $ frameSize , // Frame Size '-mode' , 'decode' , // Decode mode ] ; $ flags = implode ( ' ' , $ flags ) ; return new Process ( "{$this->dca} {$flags}" ) ; }
Decodes a file from Opus with DCA.

@param int $channels  How many audio channels to decode with.
@param int $frameSize The Opus packet frame size.

@return Process A ReactPHP Child Process
Decodes a file from Opus with DCA .