Browse Source

Fix update-generated-code script

master
falkTX 4 years ago
parent
commit
3778ded0b8
1 changed files with 6 additions and 6 deletions
  1. +6
    -6
      scripts/update-generated-code.sh

+ 6
- 6
scripts/update-generated-code.sh View File

@@ -1,13 +1,13 @@
#!/bin/bash

# make audio ports constant, they must never change
sed -i "/^int gen_kernel_numins = /{s/^/const /}" plugins/*/gen_exported.cpp
sed -i "/^int gen_kernel_numouts = /{s/^/const /}" plugins/*/gen_exported.cpp
sed -i -e "/^int gen_kernel_numins = /{s/^/const /}" plugins/*/gen_exported.cpp
sed -i -e "/^int gen_kernel_numouts = /{s/^/const /}" plugins/*/gen_exported.cpp

# change prototype of param functions, no doubles!
sed -i "s/setparameter(CommonState *cself, long index, double value, void *ref)/setparameter(CommonState *cself, long index, t_param value, void *ref)/" plugins/*/gen_exported.cpp plugins/*/gen_exported.h
sed -i "s/getparameter(CommonState *cself, long index, double *value)/getparameter(CommonState *cself, long index, t_param *value)/" plugins/*/gen_exported.cpp plugins/*/gen_exported.h
sed -i "s/create(double sr, long vs)/create(t_param sr, long vs)/" plugins/*/gen_exported.cpp plugins/*/gen_exported.h
sed -i -e "s/long index, double value,/long index, t_param value,/" plugins/*/gen_exported.cpp plugins/*/gen_exported.h
sed -i -e "s/long index, double \*value/long index, t_param \*value/" plugins/*/gen_exported.cpp plugins/*/gen_exported.h
sed -i -e "s/create(double sr, long vs)/create(t_param sr, long vs)/" plugins/*/gen_exported.cpp plugins/*/gen_exported.h

# use t_sample instead of forcing doubles
sed -i "s/double /t_sample /" plugins/*/gen_exported.cpp
sed -i -e "s/double /t_sample /" plugins/*/gen_exported.cpp

Loading…
Cancel
Save