aboutsummaryrefslogtreecommitdiffstats
path: root/wscript
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2014-01-05 22:57:08 +0000
committerDavid Robillard <d@drobilla.net>2014-01-05 22:57:08 +0000
commit723451ba486c3d2166f38927ff92413af0c31e24 (patch)
tree57c3f9d9b8f0791e51bb865fe30cae81c0648c43 /wscript
parent1f7cc652d6ed18e5509e6e6119abf3886b6a97c1 (diff)
downloadblop.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--wscript9
1 files changed, 8 insertions, 1 deletions
diff --git a/wscript b/wscript
index f48ddd8..79d06e3 100644
--- a/wscript
+++ b/wscript
@@ -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)