Send SEEK as two integers representing a float

pull/3076/head
Isaac Connor 2020-10-06 16:34:06 -04:00
parent de6a51ec15
commit 0e89d28c26
1 changed files with 4 additions and 2 deletions

View File

@ -47,8 +47,10 @@ if ( sem_acquire($semaphore,1) !== false ) {
$msg = pack('lcn', MSG_CMD, $_REQUEST['command'], $_REQUEST['scale']); $msg = pack('lcn', MSG_CMD, $_REQUEST['command'], $_REQUEST['scale']);
break; break;
case CMD_SEEK : case CMD_SEEK :
ZM\Logger::Debug('Seeking to '.$_REQUEST['offset']); # Pack int two 32 bit integers instead of trying to deal with floats
$msg = pack('lcN', MSG_CMD, $_REQUEST['command'], $_REQUEST['offset']); $msg = pack('lcNN', MSG_CMD, $_REQUEST['command'],
intval($_REQUEST['offset']),
1000000*( $_REQUEST['offset']-intval($_REQUEST['offset'])));
break; break;
default : default :
ZM\Logger::Debug('Sending command ' . $_REQUEST['command']); ZM\Logger::Debug('Sending command ' . $_REQUEST['command']);