From 9f987353d50667041662dfdfb934b82ee2a3f2b5 Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Mon, 26 Jun 2017 15:41:54 +0000 Subject: [PATCH] Apply fixes from StyleCI --- src/danog/MadelineProto/VoIP/AuthKeyHandler.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/danog/MadelineProto/VoIP/AuthKeyHandler.php b/src/danog/MadelineProto/VoIP/AuthKeyHandler.php index 5deed003..8d3a9530 100644 --- a/src/danog/MadelineProto/VoIP/AuthKeyHandler.php +++ b/src/danog/MadelineProto/VoIP/AuthKeyHandler.php @@ -97,27 +97,27 @@ trait AuthKeyHandler $this->calls[$params['id']]['controller']->setRemoteEndpoints(array_merge([$res['connection']], $res['alternative_connections']), $this->settings['calls']['allow_p2p']); var_dump('start'); $this->calls[$params['id']]['controller']->start(); - + $samplerate = 48000; - $period = 1/$samplerate; - $writePeriod = $period*960; + $period = 1 / $samplerate; + $writePeriod = $period * 960; var_dump($writePeriod); var_dump('SENDING DAT'); $f = fopen('output.raw', 'r'); $time = microtime(true); while (!feof($f)) { usleep( - ($writePeriod - + ($writePeriod - ($time - microtime(true)) // Time it took me to write frames - )*1000000 + ) * 1000000 ); - var_dump(($writePeriod - + var_dump(($writePeriod - ($time - microtime(true)) // Time it took me to write frames - )*1000000); + ) * 1000000); $time = microtime(true); $this->calls[$params['id']]['controller']->writeFrames(stream_get_contents($f, 960)); } - + $this->handle_pending_updates(); }