1
0
mirror of https://github.com/danog/MadelineProto.git synced 2024-11-27 11:34:41 +01:00

Apply fixes from StyleCI

This commit is contained in:
Daniil Gentili 2017-06-26 15:41:54 +00:00 committed by StyleCI Bot
parent 58d84020f1
commit 9f987353d5

View File

@ -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();
}