1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
<?php
class SKIPResampler extends RESAMPLER {
function Resample($res, $flags = 0) {
$filtered = 0;
$out = array(
'info' => $res['info'],
'data' => array()
);
foreach ($res['data'] as $t => &$v) {
$cond = (sizeof($v) == $this->GetNumberOfChannels($res));
if ($cond) {
foreach ($v as $vi) {
if (!is_numeric($vi)) {
$cond = false;
break;
}
}
}
if ($cond) $out['data'][$t] = $res['data'][$t];
else $filtered++;
}
$out['info']['incomplete'] = $filtered;
return $out;
}
}
?>
|