File: wscript_helper.py

package info (click to toggle)
guitarix 0.36.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 139,468 kB
  • sloc: cpp: 317,557; python: 42,482; ansic: 18,301; fortran: 2,012; sh: 662; makefile: 422; xml: 208; perl: 183; pascal: 74; lisp: 32
file content (41 lines) | stat: -rw-r--r-- 1,539 bytes parent folder | download | duplicates (3)
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
32
33
34
35
36
37
38
39
40
41
def add_zita_convolver(bld, uselib, sources, incl, base=".."):
    if bld.env['ZITA_CONVOLVER']:
        uselib.append('ZITA_CONVOLVER')
    elif bld.env['CONVOLVER_FFMPEG']:
        sources.append(base+'/zita-convolver-ffmpeg/zita-convolver.cc')
        incl.append(base+'/zita-convolver-ffmpeg');
        uselib += ['LIBAVCODEC','LIBAVUTIL']
    else:
        sources.append(base+'/zita-convolver/zita-convolver.cc')
        incl.append(base+'/zita-convolver');

def add_zita_resampler(bld, uselib, sources, incl, base=".."):
    if bld.env['ZITA_RESAMPLER']:
        uselib.append('ZITA_RESAMPLER')
    else:
        sources.append(base+'/zita-resampler-1.1.0/resampler.cc')
        sources.append(base+'/zita-resampler-1.1.0/resampler-table.cc')
        incl.append(base+'/zita-resampler-1.1.0')

def get_faust_args(bld):
    float_arg = ["-s","40000","--float"]
    double_arg = ["--double"]
    if bld.env['FAUST_DOUBLE']:
        arg = ["--double"]
    else:
        arg = ["--float"]
    if bld.env['FAUST_VECTORIZE']:
        float_arg.append('--vectorize')
        arg.append('--vectorize')
        double_arg.append('--vectorize')
    elif bld.env['FAUST_VECTORIZE_FLOAT']:
        float_arg.append('--vectorize')
        if not bld.env['FAUST_DOUBLE']:
            arg.append('--vectorize')
    add_args = bld.env['FAUST_OPTIONS']
    if add_args:
        add_args = "--add=%s" % add_args
        float_arg.append(add_args)
        double_arg.append(add_args)
        arg.append(add_args)
    return arg, float_arg, double_arg