Ignore:
Timestamp:
Dec 19, 2018, 7:31:45 PM (5 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/cnn, feature/crepe, feature/timestretch, fix/ffmpeg5, master
Children:
22d7902
Parents:
6e157df (diff), d0f19a7 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'feature/pitchshift' into feature/timestretch

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/lib/gen_code.py

    r6e157df rcb0d7d0  
    235235
    236236    def gen_doc(self):
    237         out = """
    238 // TODO: add documentation
    239 static char Py_{shortname}_doc[] = \"undefined\";
     237        sig = []
     238        for p in self.input_params:
     239            name = p['name']
     240            defval = aubiodefvalue[name].replace('"','\\\"')
     241            sig.append("{name}={defval}".format(defval=defval, name=name))
     242        out = """
     243#ifndef PYAUBIO_{shortname}_doc
     244#define PYAUBIO_{shortname}_doc "{shortname}({sig})"
     245#endif /* PYAUBIO_{shortname}_doc */
     246
     247static char Py_{shortname}_doc[] = ""
     248PYAUBIO_{shortname}_doc
     249"";
    240250"""
    241         return out.format(**self.__dict__)
     251        return out.format(sig=', '.join(sig), **self.__dict__)
    242252
    243253    def gen_new(self):
Note: See TracChangeset for help on using the changeset viewer.