aboutsummaryrefslogtreecommitdiffstats
path: root/wscript
diff options
context:
space:
mode:
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)