music+++
This commit is contained in:
parent
8cb6100bac
commit
58d84020f1
BIN
output.raw
Normal file
BIN
output.raw
Normal file
Binary file not shown.
@ -527,7 +527,7 @@ class MTProto extends \Volatile
|
||||
'allow_p2p' => false, // Should I accept p2p calls?
|
||||
'incoming_callback' => 'default_incoming_call_callback',
|
||||
'network_type' => 7,
|
||||
'log_file_path' => '/dev/stdout',
|
||||
'log_file_path' => '/tmp/logs,txt',
|
||||
'stats_dump_file_path' => '/dev/stdout',
|
||||
],
|
||||
'threading' => [
|
||||
|
@ -97,14 +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();
|
||||
readline();
|
||||
|
||||
$samplerate = 48000;
|
||||
$period = 1/$samplerate;
|
||||
$writePeriod = $period*960;
|
||||
var_dump($writePeriod);
|
||||
var_dump('SENDING DAT');
|
||||
$f = fopen('output.raw', 'r');
|
||||
$time = microtime(true);
|
||||
while (!feof($f)) {
|
||||
var_dump('SENDING 960 frames');
|
||||
$this->calls[$params['id']]['controller']->writeFrames(stream_get_contents($f, 960 * 2));
|
||||
usleep(
|
||||
($writePeriod -
|
||||
($time - microtime(true)) // Time it took me to write frames
|
||||
)*1000000
|
||||
);
|
||||
var_dump(($writePeriod -
|
||||
($time - microtime(true)) // Time it took me to write frames
|
||||
)*1000000);
|
||||
$time = microtime(true);
|
||||
$this->calls[$params['id']]['controller']->writeFrames(stream_get_contents($f, 960));
|
||||
}
|
||||
|
||||
|
||||
$this->handle_pending_updates();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user