diff options
author | David Robillard <d@drobilla.net> | 2014-01-05 22:57:08 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2014-01-05 22:57:08 +0000 |
commit | 723451ba486c3d2166f38927ff92413af0c31e24 (patch) | |
tree | 57c3f9d9b8f0791e51bb865fe30cae81c0648c43 /wscript | |
parent | 1f7cc652d6ed18e5509e6e6119abf3886b6a97c1 (diff) | |
download | blop.lv2-723451ba486c3d2166f38927ff92413af0c31e24.tar.gz blop.lv2-723451ba486c3d2166f38927ff92413af0c31e24.tar.bz2 blop.lv2-723451ba486c3d2166f38927ff92413af0c31e24.zip |
Add configure option for wavetable sampling rate.
git-svn-id: http://svn.drobilla.net/lad/trunk/plugins/blop.lv2@5280 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'wscript')
-rw-r--r-- | wscript | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -2,6 +2,7 @@ import os import shutil import subprocess +import waflib.Options as Options import waflib.extras.autowaf as autowaf BLOP_VERSION = '0.0.0' @@ -15,6 +16,9 @@ out = 'build' # Build directory def options(opt): opt.load('compiler_c') autowaf.set_options(opt) + opt.add_option('--rate', type='int', default=48000, + dest='rate', + help='Ideal sample rate for oscillator wave tables [Default: 48000]') def configure(conf): conf.load('compiler_c') @@ -43,6 +47,8 @@ def configure(conf): autowaf.display_msg(conf, 'LV2 bundle directory', conf.env.LV2DIR) + autowaf.display_msg(conf, 'Ideal oscillator sampling rate', + Options.options.rate) print('') def build_plugin(bld, lang, bundle, name, source, defines=None): @@ -139,7 +145,8 @@ def build(bld): # Waveform data source for i in ['parabola', 'sawtooth', 'square']: - bld(rule = '${SRC} -r 48000 -f 12 -s 1 -m 128 -g 1.0 -w %s -p %s -o ${TGT}' % (i, i), + bld(rule = '${SRC} -r %d -f 12 -s 1 -m 128 -g 1.0 -w %s -p %s -o ${TGT}' % ( + Options.options.rate, i, i), source = wavegen.link_task.outputs[0], target = 'src/%s_data.c' % i, name = i) |