/adei/trunk

To get this branch, use:
bzr branch http://darksoft.org/webbzr/adei/trunk

« back to all changes in this revision

Viewing changes to classes/resamplers/skipresampler.php

  • Committer: Suren A. Chilingaryan
  • Date: 2020-02-06 07:03:28 UTC
  • Revision ID: csa@suren.me-20200206070328-ochly0am0oej0ell
Fix SKIPResampler

Show diffs side-by-side

added added

removed removed

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