Changeset 9fa0ed1


Ignore:
Timestamp:
Jul 24, 2017, 2:12:55 PM (7 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master
Children:
1070378
Parents:
482641d (diff), ddea34b (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 'master' into yinfast

Files:
7 edited

Legend:

Unmodified
Added
Removed
  • doc/web.cfg

    r482641d r9fa0ed1  
    1 # Doxyfile 1.8.8
     1# Doxyfile 1.8.13
    22
    33# This file describes the settings to be used by the documentation system
     
    4747PROJECT_BRIEF          =
    4848
    49 # With the PROJECT_LOGO tag one can specify an logo or icon that is included in
    50 # the documentation. The maximum height of the logo should not exceed 55 pixels
    51 # and the maximum width should not exceed 200 pixels. Doxygen will copy the logo
    52 # to the output directory.
     49# With the PROJECT_LOGO tag one can specify a logo or an icon that is included
     50# in the documentation. The maximum height of the logo should not exceed 55
     51# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy
     52# the logo to the output directory.
    5353
    5454PROJECT_LOGO           =
     
    6161OUTPUT_DIRECTORY       = web
    6262
    63 # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 4096 sub-
     63# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
    6464# directories (in 2 levels) under the output directory of each output format and
    6565# will distribute the generated files over these directories. Enabling this
     
    9494OUTPUT_LANGUAGE        = English
    9595
    96 # If the BRIEF_MEMBER_DESC tag is set to YES doxygen will include brief member
     96# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member
    9797# descriptions after the members that are listed in the file and class
    9898# documentation (similar to Javadoc). Set to NO to disable this.
     
    101101BRIEF_MEMBER_DESC      = YES
    102102
    103 # If the REPEAT_BRIEF tag is set to YES doxygen will prepend the brief
     103# If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief
    104104# description of a member or function before the detailed description
    105105#
     
    136136INLINE_INHERITED_MEMB  = NO
    137137
    138 # If the FULL_PATH_NAMES tag is set to YES doxygen will prepend the full path
     138# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path
    139139# before files name in the file list and in the header files. If set to NO the
    140140# shortest path that makes the file name unique will be used
     
    206206INHERIT_DOCS           = YES
    207207
    208 # If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce a
    209 # new page for each member. If set to NO, the documentation of a member will be
    210 # part of the file/class/namespace that contains it.
     208# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new
     209# page for each member. If set to NO, the documentation of a member will be part
     210# of the file/class/namespace that contains it.
    211211# The default value is: NO.
    212212
     
    277277# and .f files as C (default is Fortran), use: inc=Fortran f=C.
    278278#
    279 # Note For files without extension you can use no_extension as a placeholder.
     279# Note: For files without extension you can use no_extension as a placeholder.
    280280#
    281281# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
     
    294294MARKDOWN_SUPPORT       = YES
    295295
     296# When the TOC_INCLUDE_HEADINGS tag is set to a non-zero value, all headings up
     297# to that level are automatically included in the table of contents, even if
     298# they do not have an id attribute.
     299# Note: This feature currently applies only to Markdown headings.
     300# Minimum value: 0, maximum value: 99, default value: 0.
     301# This tag requires that the tag MARKDOWN_SUPPORT is set to YES.
     302
     303TOC_INCLUDE_HEADINGS   = 0
     304
    296305# When enabled doxygen tries to link words that correspond to documented
    297306# classes, or namespaces to their corresponding documentation. Such a link can
    298 # be prevented in individual cases by by putting a % sign in front of the word
    299 # or globally by setting AUTOLINK_SUPPORT to NO.
     307# be prevented in individual cases by putting a % sign in front of the word or
     308# globally by setting AUTOLINK_SUPPORT to NO.
    300309# The default value is: YES.
    301310
     
    337346
    338347# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
    339 # tag is set to YES, then doxygen will reuse the documentation of the first
     348# tag is set to YES then doxygen will reuse the documentation of the first
    340349# member in the group (if any) for the other members of the group. By default
    341350# all members of a group must be documented explicitly.
     
    343352
    344353DISTRIBUTE_GROUP_DOC   = NO
     354
     355# If one adds a struct or class to a group and this option is enabled, then also
     356# any nested class or struct is added to the same group. By default this option
     357# is disabled and one has to add nested compounds explicitly via \ingroup.
     358# The default value is: NO.
     359
     360GROUP_NESTED_COMPOUNDS = NO
    345361
    346362# Set the SUBGROUPING tag to YES to allow class member groups of the same type
     
    402418#---------------------------------------------------------------------------
    403419
    404 # If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
     420# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in
    405421# documentation are documented, even if no documentation was available. Private
    406422# class members and static file members will be hidden unless the
     
    412428EXTRACT_ALL            = NO
    413429
    414 # If the EXTRACT_PRIVATE tag is set to YES all private members of a class will
     430# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will
    415431# be included in the documentation.
    416432# The default value is: NO.
     
    418434EXTRACT_PRIVATE        = NO
    419435
    420 # If the EXTRACT_PACKAGE tag is set to YES all members with package or internal
     436# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal
    421437# scope will be included in the documentation.
    422438# The default value is: NO.
     
    424440EXTRACT_PACKAGE        = NO
    425441
    426 # If the EXTRACT_STATIC tag is set to YES all static members of a file will be
     442# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be
    427443# included in the documentation.
    428444# The default value is: NO.
     
    430446EXTRACT_STATIC         = NO
    431447
    432 # If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) defined
    433 # locally in source files will be included in the documentation. If set to NO
     448# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined
     449# locally in source files will be included in the documentation. If set to NO,
    434450# only classes defined in header files are included. Does not have any effect
    435451# for Java sources.
     
    438454EXTRACT_LOCAL_CLASSES  = YES
    439455
    440 # This flag is only useful for Objective-C code. When set to YES local methods,
     456# This flag is only useful for Objective-C code. If set to YES, local methods,
    441457# which are defined in the implementation section but not in the interface are
    442 # included in the documentation. If set to NO only methods in the interface are
     458# included in the documentation. If set to NO, only methods in the interface are
    443459# included.
    444460# The default value is: NO.
     
    465481# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all
    466482# undocumented classes that are normally visible in the class hierarchy. If set
    467 # to NO these classes will be included in the various overviews. This option has
    468 # no effect if EXTRACT_ALL is enabled.
     483# to NO, these classes will be included in the various overviews. This option
     484# has no effect if EXTRACT_ALL is enabled.
    469485# The default value is: NO.
    470486
     
    472488
    473489# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend
    474 # (class|struct|union) declarations. If set to NO these declarations will be
     490# (class|struct|union) declarations. If set to NO, these declarations will be
    475491# included in the documentation.
    476492# The default value is: NO.
     
    479495
    480496# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any
    481 # documentation blocks found inside the body of a function. If set to NO these
     497# documentation blocks found inside the body of a function. If set to NO, these
    482498# blocks will be appended to the function's detailed documentation block.
    483499# The default value is: NO.
     
    493509
    494510# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file
    495 # names in lower-case letters. If set to YES upper-case letters are also
     511# names in lower-case letters. If set to YES, upper-case letters are also
    496512# allowed. This is useful if you have classes or files whose names only differ
    497513# in case and if your file system supports case sensitive file names. Windows
     
    502518
    503519# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with
    504 # their full class and namespace scopes in the documentation. If set to YES the
     520# their full class and namespace scopes in the documentation. If set to YES, the
    505521# scope will be hidden.
    506522# The default value is: NO.
    507523
    508524HIDE_SCOPE_NAMES       = NO
     525
     526# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will
     527# append additional text to a page's title, such as Class Reference. If set to
     528# YES the compound reference will be hidden.
     529# The default value is: NO.
     530
     531HIDE_COMPOUND_REFERENCE= NO
    509532
    510533# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of
     
    535558# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the
    536559# (detailed) documentation of file and class members alphabetically by member
    537 # name. If set to NO the members will appear in declaration order.
     560# name. If set to NO, the members will appear in declaration order.
    538561# The default value is: YES.
    539562
     
    542565# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief
    543566# descriptions of file, namespace and class members alphabetically by member
    544 # name. If set to NO the members will appear in declaration order. Note that
     567# name. If set to NO, the members will appear in declaration order. Note that
    545568# this will also influence the order of the classes in the class list.
    546569# The default value is: NO.
     
    587610STRICT_PROTO_MATCHING  = NO
    588611
    589 # The GENERATE_TODOLIST tag can be used to enable ( YES) or disable ( NO) the
    590 # todo list. This list is created by putting \todo commands in the
    591 # documentation.
     612# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo
     613# list. This list is created by putting \todo commands in the documentation.
    592614# The default value is: YES.
    593615
    594616GENERATE_TODOLIST      = YES
    595617
    596 # The GENERATE_TESTLIST tag can be used to enable ( YES) or disable ( NO) the
    597 # test list. This list is created by putting \test commands in the
    598 # documentation.
     618# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test
     619# list. This list is created by putting \test commands in the documentation.
    599620# The default value is: YES.
    600621
    601622GENERATE_TESTLIST      = YES
    602623
    603 # The GENERATE_BUGLIST tag can be used to enable ( YES) or disable ( NO) the bug
     624# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug
    604625# list. This list is created by putting \bug commands in the documentation.
    605626# The default value is: YES.
     
    607628GENERATE_BUGLIST       = YES
    608629
    609 # The GENERATE_DEPRECATEDLIST tag can be used to enable ( YES) or disable ( NO)
     630# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO)
    610631# the deprecated list. This list is created by putting \deprecated commands in
    611632# the documentation.
     
    632653
    633654# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at
    634 # the bottom of the documentation of classes and structs. If set to YES the list
    635 # will mention the files that were used to generate the documentation.
     655# the bottom of the documentation of classes and structs. If set to YES, the
     656# list will mention the files that were used to generate the documentation.
    636657# The default value is: YES.
    637658
     
    697718
    698719# The WARNINGS tag can be used to turn on/off the warning messages that are
    699 # generated to standard error ( stderr) by doxygen. If WARNINGS is set to YES
     720# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES
    700721# this implies that the warnings are on.
    701722#
     
    705726WARNINGS               = YES
    706727
    707 # If the WARN_IF_UNDOCUMENTED tag is set to YES, then doxygen will generate
     728# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate
    708729# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag
    709730# will automatically be disabled.
     
    722743# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that
    723744# are documented, but have no documentation for their parameters or return
    724 # value. If set to NO doxygen will only warn about wrong or incomplete parameter
    725 # documentation, but not about the absence of documentation.
     745# value. If set to NO, doxygen will only warn about wrong or incomplete
     746# parameter documentation, but not about the absence of documentation.
    726747# The default value is: NO.
    727748
    728749WARN_NO_PARAMDOC       = NO
     750
     751# If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when
     752# a warning is encountered.
     753# The default value is: NO.
     754
     755WARN_AS_ERROR          = NO
    729756
    730757# The WARN_FORMAT tag determines the format of the warning messages that doxygen
     
    751778# documented source files. You may enter file names like myfile.cpp or
    752779# directories like /usr/src/myproject. Separate the files or directories with
    753 # spaces.
     780# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
    754781# Note: If this tag is empty the current directory is searched.
    755782
     
    767794# If the value of the INPUT tag contains directories, you can use the
    768795# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and
    769 # *.h) to filter out the source-files in the directories. If left blank the
    770 # following patterns are tested:*.c, *.cc, *.cxx, *.cpp, *.c++, *.java, *.ii,
    771 # *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp,
    772 # *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown,
    773 # *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf,
    774 # *.qsf, *.as and *.js.
     796# *.h) to filter out the source-files in the directories.
     797#
     798# Note that for custom extensions or not directly supported extensions you also
     799# need to set EXTENSION_MAPPING for the extension otherwise the files are not
     800# read by doxygen.
     801#
     802# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp,
     803# *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h,
     804# *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc,
     805# *.m, *.markdown, *.md, *.mm, *.dox, *.py, *.pyw, *.f90, *.f95, *.f03, *.f08,
     806# *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf and *.qsf.
    775807
    776808FILE_PATTERNS          = *.h
     
    881913# code is scanned, but not when the output code is generated. If lines are added
    882914# or removed, the anchors will not be placed correctly.
     915#
     916# Note that for custom extensions or not directly supported extensions you also
     917# need to set EXTENSION_MAPPING for the extension otherwise the files are not
     918# properly processed by doxygen.
    883919
    884920INPUT_FILTER           =
     
    890926# filters are used. If the FILTER_PATTERNS tag is empty or if none of the
    891927# patterns match the file name, INPUT_FILTER is applied.
     928#
     929# Note that for custom extensions or not directly supported extensions you also
     930# need to set EXTENSION_MAPPING for the extension otherwise the files are not
     931# properly processed by doxygen.
    892932
    893933FILTER_PATTERNS        =
    894934
    895935# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
    896 # INPUT_FILTER ) will also be used to filter the input files that are used for
     936# INPUT_FILTER) will also be used to filter the input files that are used for
    897937# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES).
    898938# The default value is: NO.
     
    954994
    955995# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set
    956 # to YES, then the hyperlinks from functions in REFERENCES_RELATION and
     996# to YES then the hyperlinks from functions in REFERENCES_RELATION and
    957997# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will
    958998# link to the documentation.
     
    10011041VERBATIM_HEADERS       = YES
    10021042
    1003 # If the CLANG_ASSISTED_PARSING tag is set to YES, then doxygen will use the
     1043# If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the
    10041044# clang parser (see: http://clang.llvm.org/) for more accurate parsing at the
    10051045# cost of reduced performance. This can be particularly helpful with template
     
    10071047# information.
    10081048# Note: The availability of this option depends on whether or not doxygen was
    1009 # compiled with the --with-libclang option.
     1049# generated with the -Duse-libclang=ON option for CMake.
    10101050# The default value is: NO.
    10111051
     
    10501090#---------------------------------------------------------------------------
    10511091
    1052 # If the GENERATE_HTML tag is set to YES doxygen will generate HTML output
     1092# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output
    10531093# The default value is: YES.
    10541094
     
    11161156# created by doxygen. Using this option one can overrule certain style aspects.
    11171157# This is preferred over using HTML_STYLESHEET since it does not replace the
    1118 # standard style sheet and is therefor more robust against future updates.
     1158# standard style sheet and is therefore more robust against future updates.
    11191159# Doxygen will copy the style sheet files to the output directory.
    1120 # Note: The order of the extra stylesheet files is of importance (e.g. the last
    1121 # stylesheet in the list overrules the setting of the previous ones in the
     1160# Note: The order of the extra style sheet files is of importance (e.g. the last
     1161# style sheet in the list overrules the setting of the previous ones in the
    11221162# list). For an example see the documentation.
    11231163# This tag requires that the tag GENERATE_HTML is set to YES.
     
    11361176
    11371177# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen
    1138 # will adjust the colors in the stylesheet and background images according to
     1178# will adjust the colors in the style sheet and background images according to
    11391179# this color. Hue is specified as an angle on a colorwheel, see
    11401180# http://en.wikipedia.org/wiki/Hue for more information. For instance the value
     
    11671207# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
    11681208# page will contain the date and time when the page was generated. Setting this
    1169 # to NO can help when comparing the output of multiple runs.
    1170 # The default value is: YES.
     1209# to YES can help to show when doxygen was last run and thus if the
     1210# documentation is up to date.
     1211# The default value is: NO.
    11711212# This tag requires that the tag GENERATE_HTML is set to YES.
    11721213
     
    12641305
    12651306# The HHC_LOCATION tag can be used to specify the location (absolute path
    1266 # including file name) of the HTML help compiler ( hhc.exe). If non-empty
     1307# including file name) of the HTML help compiler (hhc.exe). If non-empty,
    12671308# doxygen will try to run the HTML help compiler on the generated index.hhp.
    12681309# The file has to be specified with full path.
     
    12711312HHC_LOCATION           =
    12721313
    1273 # The GENERATE_CHI flag controls if a separate .chi index file is generated (
    1274 # YES) or that it should be included in the master .chm file ( NO).
     1314# The GENERATE_CHI flag controls if a separate .chi index file is generated
     1315# (YES) or that it should be included in the master .chm file (NO).
    12751316# The default value is: NO.
    12761317# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
     
    12781319GENERATE_CHI           = NO
    12791320
    1280 # The CHM_INDEX_ENCODING is used to encode HtmlHelp index ( hhk), content ( hhc)
     1321# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc)
    12811322# and project file content.
    12821323# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
     
    12841325CHM_INDEX_ENCODING     =
    12851326
    1286 # The BINARY_TOC flag controls whether a binary table of contents is generated (
    1287 # YES) or a normal table of contents ( NO) in the .chm file. Furthermore it
     1327# The BINARY_TOC flag controls whether a binary table of contents is generated
     1328# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it
    12881329# enables the Previous and Next buttons.
    12891330# The default value is: NO.
     
    13991440# to work a browser that supports JavaScript, DHTML, CSS and frames is required
    14001441# (i.e. any modern browser). Windows users are probably better off using the
    1401 # HTML help feature. Via custom stylesheets (see HTML_EXTRA_STYLESHEET) one can
     1442# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can
    14021443# further fine-tune the look of the index. As an example, the default style
    14031444# sheet generated by doxygen has an example that shows how to put an image at
     
    14271468TREEVIEW_WIDTH         = 250
    14281469
    1429 # When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open links to
     1470# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to
    14301471# external symbols imported via tag files in a separate window.
    14311472# The default value is: NO.
     
    14561497# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see
    14571498# http://www.mathjax.org) which uses client side Javascript for the rendering
    1458 # instead of using prerendered bitmaps. Use this if you do not have LaTeX
     1499# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX
    14591500# installed or if you want to formulas look prettier in the HTML output. When
    14601501# enabled you may also need to install MathJax separately and configure the path
     
    15421583# search results.
    15431584#
    1544 # Doxygen ships with an example indexer ( doxyindexer) and search engine
     1585# Doxygen ships with an example indexer (doxyindexer) and search engine
    15451586# (doxysearch.cgi) which are based on the open source search engine library
    15461587# Xapian (see: http://xapian.org/).
     
    15551596# which will return the search results when EXTERNAL_SEARCH is enabled.
    15561597#
    1557 # Doxygen ships with an example indexer ( doxyindexer) and search engine
     1598# Doxygen ships with an example indexer (doxyindexer) and search engine
    15581599# (doxysearch.cgi) which are based on the open source search engine library
    15591600# Xapian (see: http://xapian.org/). See the section "External Indexing and
     
    15931634#---------------------------------------------------------------------------
    15941635
    1595 # If the GENERATE_LATEX tag is set to YES doxygen will generate LaTeX output.
     1636# If the GENERATE_LATEX tag is set to YES, doxygen will generate LaTeX output.
    15961637# The default value is: YES.
    15971638
     
    16241665MAKEINDEX_CMD_NAME     = makeindex
    16251666
    1626 # If the COMPACT_LATEX tag is set to YES doxygen generates more compact LaTeX
     1667# If the COMPACT_LATEX tag is set to YES, doxygen generates more compact LaTeX
    16271668# documents. This may be useful for small projects and may help to save some
    16281669# trees in general.
     
    16421683
    16431684# The EXTRA_PACKAGES tag can be used to specify one or more LaTeX package names
    1644 # that should be included in the LaTeX output. To get the times font for
    1645 # instance you can specify
    1646 # EXTRA_PACKAGES=times
     1685# that should be included in the LaTeX output. The package can be specified just
     1686# by its name or with the correct syntax as to be used with the LaTeX
     1687# \usepackage command. To get the times font for instance you can specify :
     1688# EXTRA_PACKAGES=times or EXTRA_PACKAGES={times}
     1689# To use the option intlimits with the amsmath package you can specify:
     1690# EXTRA_PACKAGES=[intlimits]{amsmath}
    16471691# If left blank no extra packages will be included.
    16481692# This tag requires that the tag GENERATE_LATEX is set to YES.
     
    16591703# following commands have a special meaning inside the header: $title,
    16601704# $datetime, $date, $doxygenversion, $projectname, $projectnumber,
    1661 # $projectbrief, $projectlogo. Doxygen will replace $title with the empy string,
    1662 # for the replacement values of the other commands the user is refered to
    1663 # HTML_HEADER.
     1705# $projectbrief, $projectlogo. Doxygen will replace $title with the empty
     1706# string, for the replacement values of the other commands the user is referred
     1707# to HTML_HEADER.
    16641708# This tag requires that the tag GENERATE_LATEX is set to YES.
    16651709
     
    16771721LATEX_FOOTER           =
    16781722
     1723# The LATEX_EXTRA_STYLESHEET tag can be used to specify additional user-defined
     1724# LaTeX style sheets that are included after the standard style sheets created
     1725# by doxygen. Using this option one can overrule certain style aspects. Doxygen
     1726# will copy the style sheet files to the output directory.
     1727# Note: The order of the extra style sheet files is of importance (e.g. the last
     1728# style sheet in the list overrules the setting of the previous ones in the
     1729# list).
     1730# This tag requires that the tag GENERATE_LATEX is set to YES.
     1731
     1732LATEX_EXTRA_STYLESHEET =
     1733
    16791734# The LATEX_EXTRA_FILES tag can be used to specify one or more extra images or
    16801735# other source files which should be copied to the LATEX_OUTPUT output
     
    16951750
    16961751# If the USE_PDFLATEX tag is set to YES, doxygen will use pdflatex to generate
    1697 # the PDF file directly from the LaTeX files. Set this option to YES to get a
     1752# the PDF file directly from the LaTeX files. Set this option to YES, to get a
    16981753# higher quality PDF documentation.
    16991754# The default value is: YES.
     
    17361791LATEX_BIB_STYLE        = plain
    17371792
     1793# If the LATEX_TIMESTAMP tag is set to YES then the footer of each generated
     1794# page will contain the date and time when the page was generated. Setting this
     1795# to NO can help when comparing the output of multiple runs.
     1796# The default value is: NO.
     1797# This tag requires that the tag GENERATE_LATEX is set to YES.
     1798
     1799LATEX_TIMESTAMP        = NO
     1800
    17381801#---------------------------------------------------------------------------
    17391802# Configuration options related to the RTF output
    17401803#---------------------------------------------------------------------------
    17411804
    1742 # If the GENERATE_RTF tag is set to YES doxygen will generate RTF output. The
     1805# If the GENERATE_RTF tag is set to YES, doxygen will generate RTF output. The
    17431806# RTF output is optimized for Word 97 and may not look too pretty with other RTF
    17441807# readers/editors.
     
    17551818RTF_OUTPUT             = rtf
    17561819
    1757 # If the COMPACT_RTF tag is set to YES doxygen generates more compact RTF
     1820# If the COMPACT_RTF tag is set to YES, doxygen generates more compact RTF
    17581821# documents. This may be useful for small projects and may help to save some
    17591822# trees in general.
     
    17921855RTF_EXTENSIONS_FILE    =
    17931856
     1857# If the RTF_SOURCE_CODE tag is set to YES then doxygen will include source code
     1858# with syntax highlighting in the RTF output.
     1859#
     1860# Note that which sources are shown also depends on other settings such as
     1861# SOURCE_BROWSER.
     1862# The default value is: NO.
     1863# This tag requires that the tag GENERATE_RTF is set to YES.
     1864
     1865RTF_SOURCE_CODE        = NO
     1866
    17941867#---------------------------------------------------------------------------
    17951868# Configuration options related to the man page output
    17961869#---------------------------------------------------------------------------
    17971870
    1798 # If the GENERATE_MAN tag is set to YES doxygen will generate man pages for
     1871# If the GENERATE_MAN tag is set to YES, doxygen will generate man pages for
    17991872# classes and files.
    18001873# The default value is: NO.
     
    18401913#---------------------------------------------------------------------------
    18411914
    1842 # If the GENERATE_XML tag is set to YES doxygen will generate an XML file that
     1915# If the GENERATE_XML tag is set to YES, doxygen will generate an XML file that
    18431916# captures the structure of the code including all documentation.
    18441917# The default value is: NO.
     
    18541927XML_OUTPUT             = xml
    18551928
    1856 # If the XML_PROGRAMLISTING tag is set to YES doxygen will dump the program
     1929# If the XML_PROGRAMLISTING tag is set to YES, doxygen will dump the program
    18571930# listings (including syntax highlighting and cross-referencing information) to
    18581931# the XML output. Note that enabling this will significantly increase the size
     
    18671940#---------------------------------------------------------------------------
    18681941
    1869 # If the GENERATE_DOCBOOK tag is set to YES doxygen will generate Docbook files
     1942# If the GENERATE_DOCBOOK tag is set to YES, doxygen will generate Docbook files
    18701943# that can be used to generate PDF.
    18711944# The default value is: NO.
     
    18811954DOCBOOK_OUTPUT         = docbook
    18821955
    1883 # If the DOCBOOK_PROGRAMLISTING tag is set to YES doxygen will include the
     1956# If the DOCBOOK_PROGRAMLISTING tag is set to YES, doxygen will include the
    18841957# program listings (including syntax highlighting and cross-referencing
    18851958# information) to the DOCBOOK output. Note that enabling this will significantly
     
    18941967#---------------------------------------------------------------------------
    18951968
    1896 # If the GENERATE_AUTOGEN_DEF tag is set to YES doxygen will generate an AutoGen
    1897 # Definitions (see http://autogen.sf.net) file that captures the structure of
    1898 # the code including all documentation. Note that this feature is still
    1899 # experimental and incomplete at the moment.
     1969# If the GENERATE_AUTOGEN_DEF tag is set to YES, doxygen will generate an
     1970# AutoGen Definitions (see http://autogen.sf.net) file that captures the
     1971# structure of the code including all documentation. Note that this feature is
     1972# still experimental and incomplete at the moment.
    19001973# The default value is: NO.
    19011974
     
    19061979#---------------------------------------------------------------------------
    19071980
    1908 # If the GENERATE_PERLMOD tag is set to YES doxygen will generate a Perl module
     1981# If the GENERATE_PERLMOD tag is set to YES, doxygen will generate a Perl module
    19091982# file that captures the structure of the code including all documentation.
    19101983#
     
    19141987GENERATE_PERLMOD       = NO
    19151988
    1916 # If the PERLMOD_LATEX tag is set to YES doxygen will generate the necessary
     1989# If the PERLMOD_LATEX tag is set to YES, doxygen will generate the necessary
    19171990# Makefile rules, Perl scripts and LaTeX code to be able to generate PDF and DVI
    19181991# output from the Perl module output.
     
    19221995PERLMOD_LATEX          = NO
    19231996
    1924 # If the PERLMOD_PRETTY tag is set to YES the Perl module output will be nicely
     1997# If the PERLMOD_PRETTY tag is set to YES, the Perl module output will be nicely
    19251998# formatted so it can be parsed by a human reader. This is useful if you want to
    1926 # understand what is going on. On the other hand, if this tag is set to NO the
     1999# understand what is going on. On the other hand, if this tag is set to NO, the
    19272000# size of the Perl module output will be much smaller and Perl will parse it
    19282001# just the same.
     
    19442017#---------------------------------------------------------------------------
    19452018
    1946 # If the ENABLE_PREPROCESSING tag is set to YES doxygen will evaluate all
     2019# If the ENABLE_PREPROCESSING tag is set to YES, doxygen will evaluate all
    19472020# C-preprocessor directives found in the sources and include files.
    19482021# The default value is: YES.
     
    19502023ENABLE_PREPROCESSING   = YES
    19512024
    1952 # If the MACRO_EXPANSION tag is set to YES doxygen will expand all macro names
    1953 # in the source code. If set to NO only conditional compilation will be
     2025# If the MACRO_EXPANSION tag is set to YES, doxygen will expand all macro names
     2026# in the source code. If set to NO, only conditional compilation will be
    19542027# performed. Macro expansion can be done in a controlled way by setting
    19552028# EXPAND_ONLY_PREDEF to YES.
     
    19672040EXPAND_ONLY_PREDEF     = NO
    19682041
    1969 # If the SEARCH_INCLUDES tag is set to YES the includes files in the
     2042# If the SEARCH_INCLUDES tag is set to YES, the include files in the
    19702043# INCLUDE_PATH will be searched if a #include is found.
    19712044# The default value is: YES.
     
    20432116GENERATE_TAGFILE       =
    20442117
    2045 # If the ALLEXTERNALS tag is set to YES all external class will be listed in the
    2046 # class index. If set to NO only the inherited external classes will be listed.
     2118# If the ALLEXTERNALS tag is set to YES, all external class will be listed in
     2119# the class index. If set to NO, only the inherited external classes will be
     2120# listed.
    20472121# The default value is: NO.
    20482122
    20492123ALLEXTERNALS           = NO
    20502124
    2051 # If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed in
    2052 # the modules index. If set to NO, only the current project's groups will be
     2125# If the EXTERNAL_GROUPS tag is set to YES, all external groups will be listed
     2126# in the modules index. If set to NO, only the current project's groups will be
    20532127# listed.
    20542128# The default value is: YES.
     
    20562130EXTERNAL_GROUPS        = YES
    20572131
    2058 # If the EXTERNAL_PAGES tag is set to YES all external pages will be listed in
     2132# If the EXTERNAL_PAGES tag is set to YES, all external pages will be listed in
    20592133# the related pages index. If set to NO, only the current project's pages will
    20602134# be listed.
     
    20732147#---------------------------------------------------------------------------
    20742148
    2075 # If the CLASS_DIAGRAMS tag is set to YES doxygen will generate a class diagram
     2149# If the CLASS_DIAGRAMS tag is set to YES, doxygen will generate a class diagram
    20762150# (in HTML and LaTeX) for classes with base or super classes. Setting the tag to
    20772151# NO turns the diagrams off. Note that this option also works with HAVE_DOT
     
    20982172DIA_PATH               =
    20992173
    2100 # If set to YES, the inheritance and collaboration graphs will hide inheritance
     2174# If set to YES the inheritance and collaboration graphs will hide inheritance
    21012175# and usage relations if the target is undocumented or is not a class.
    21022176# The default value is: YES.
     
    21712245GROUP_GRAPHS           = YES
    21722246
    2173 # If the UML_LOOK tag is set to YES doxygen will generate inheritance and
     2247# If the UML_LOOK tag is set to YES, doxygen will generate inheritance and
    21742248# collaboration diagrams in a style similar to the OMG's Unified Modeling
    21752249# Language.
     
    22232297# Note that enabling this option will significantly increase the time of a run.
    22242298# So in most cases it will be better to enable call graphs for selected
    2225 # functions only using the \callgraph command.
     2299# functions only using the \callgraph command. Disabling a call graph can be
     2300# accomplished by means of the command \hidecallgraph.
    22262301# The default value is: NO.
    22272302# This tag requires that the tag HAVE_DOT is set to YES.
     
    22342309# Note that enabling this option will significantly increase the time of a run.
    22352310# So in most cases it will be better to enable caller graphs for selected
    2236 # functions only using the \callergraph command.
     2311# functions only using the \callergraph command. Disabling a caller graph can be
     2312# accomplished by means of the command \hidecallergraph.
    22372313# The default value is: NO.
    22382314# This tag requires that the tag HAVE_DOT is set to YES.
     
    22572333
    22582334# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
    2259 # generated by dot.
     2335# generated by dot. For an explanation of the image formats see the section
     2336# output formats in the documentation of the dot tool (Graphviz (see:
     2337# http://www.graphviz.org/)).
    22602338# Note: If you choose svg you need to set HTML_FILE_EXTENSION to xhtml in order
    22612339# to make the SVG files visible in IE 9+ (other browsers do not have this
     
    22632341# Possible values are: png, png:cairo, png:cairo:cairo, png:cairo:gd, png:gd,
    22642342# png:gd:gd, jpg, jpg:cairo, jpg:cairo:gd, jpg:gd, jpg:gd:gd, gif, gif:cairo,
    2265 # gif:cairo:gd, gif:gd, gif:gd:gd and svg.
     2343# gif:cairo:gd, gif:gd, gif:gd:gd, svg, png:gd, png:gd:gd, png:cairo,
     2344# png:cairo:gd, png:cairo:cairo, png:cairo:gdiplus, png:gdiplus and
     2345# png:gdiplus:gdiplus.
    22662346# The default value is: png.
    22672347# This tag requires that the tag HAVE_DOT is set to YES.
     
    23112391# generate a warning when it encounters a \startuml command in this case and
    23122392# will not generate output for the diagram.
    2313 # This tag requires that the tag HAVE_DOT is set to YES.
    23142393
    23152394PLANTUML_JAR_PATH      =
     2395
     2396# When using plantuml, the PLANTUML_CFG_FILE tag can be used to specify a
     2397# configuration file for plantuml.
     2398
     2399PLANTUML_CFG_FILE      =
     2400
     2401# When using plantuml, the specified paths are searched for files specified by
     2402# the !include statement in a plantuml block.
     2403
     2404PLANTUML_INCLUDE_PATH  =
    23162405
    23172406# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of nodes
     
    23512440DOT_TRANSPARENT        = NO
    23522441
    2353 # Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
     2442# Set the DOT_MULTI_TARGETS tag to YES to allow dot to generate multiple output
    23542443# files in one run (i.e. multiple -o and -T options on the command line). This
    23552444# makes dot run faster, but since only newer versions of dot (>1.8.10) support
     
    23682457GENERATE_LEGEND        = YES
    23692458
    2370 # If the DOT_CLEANUP tag is set to YES doxygen will remove the intermediate dot
     2459# If the DOT_CLEANUP tag is set to YES, doxygen will remove the intermediate dot
    23712460# files that are used to generate the various graphs.
    23722461# The default value is: YES.
  • python/lib/aubio/cmd.py

    r482641d r9fa0ed1  
    188188        return samples2samples
    189189    else:
    190         raise ValueError('invalid time format %s' % mode)
     190        raise ValueError("invalid time format '%s'" % mode)
    191191
    192192# definition of processing classes
  • python/lib/gen_external.py

    r482641d r9fa0ed1  
    11import distutils.ccompiler
    2 import sys, os, subprocess, glob
     2import sys
     3import os
     4import subprocess
     5import glob
    36
    47header = os.path.join('src', 'aubio.h')
     
    912"""
    1013
    11 skip_objects = [
    12   # already in ext/
    13   'fft',
    14   'pvoc',
    15   'filter',
    16   'filterbank',
    17   # AUBIO_UNSTABLE
    18   'hist',
    19   'parameter',
    20   'scale',
    21   'beattracking',
    22   'resampler',
    23   'peakpicker',
    24   'pitchfcomb',
    25   'pitchmcomb',
    26   'pitchschmitt',
    27   'pitchspecacf',
    28   'pitchyin',
    29   'pitchyinfft',
    30   'pitchyinfast',
    31   'sink',
    32   'sink_apple_audio',
    33   'sink_sndfile',
    34   'sink_wavwrite',
    35   #'mfcc',
    36   'source',
    37   'source_apple_audio',
    38   'source_sndfile',
    39   'source_avcodec',
    40   'source_wavread',
    41   #'sampler',
    42   'audio_unit',
    43   'spectral_whitening',
    44   ]
     14default_skip_objects = [
     15    # already in ext/
     16    'fft',
     17    'pvoc',
     18    'filter',
     19    'filterbank',
     20    # AUBIO_UNSTABLE
     21    'hist',
     22    'parameter',
     23    'scale',
     24    'beattracking',
     25    'resampler',
     26    'peakpicker',
     27    'pitchfcomb',
     28    'pitchmcomb',
     29    'pitchschmitt',
     30    'pitchspecacf',
     31    'pitchyin',
     32    'pitchyinfft',
     33    'pitchyinfast',
     34    'sink',
     35    'sink_apple_audio',
     36    'sink_sndfile',
     37    'sink_wavwrite',
     38    #'mfcc',
     39    'source',
     40    'source_apple_audio',
     41    'source_sndfile',
     42    'source_avcodec',
     43    'source_wavread',
     44    #'sampler',
     45    'audio_unit',
     46    'spectral_whitening',
     47]
     48
    4549
    4650def get_preprocessor():
     
    6165
    6266    cpp_cmd = None
    63     if hasattr(compiler, 'preprocessor'): # for unixccompiler
     67    if hasattr(compiler, 'preprocessor'):  # for unixccompiler
    6468        cpp_cmd = compiler.preprocessor
    65     elif hasattr(compiler, 'compiler'): # for ccompiler
     69    elif hasattr(compiler, 'compiler'):  # for ccompiler
    6670        cpp_cmd = compiler.compiler.split()
    6771        cpp_cmd += ['-E']
    68     elif hasattr(compiler, 'cc'): # for msvccompiler
     72    elif hasattr(compiler, 'cc'):  # for msvccompiler
    6973        cpp_cmd = compiler.cc.split()
    7074        cpp_cmd += ['-E']
     
    7478        cpp_cmd = os.environ.get('CC', 'cc').split()
    7579        cpp_cmd += ['-E']
    76 
     80    cpp_cmd += ['-x', 'c']  # force C language (emcc defaults to c++)
    7781    return cpp_cmd
    7882
    79 def get_cpp_objects(header=header, usedouble=False):
     83
     84def get_c_declarations(header=header, usedouble=False):
     85    ''' return a dense and preprocessed  string of all c declarations implied by aubio.h
     86    '''
    8087    cpp_cmd = get_preprocessor()
    8188
     
    93100    print("Running command: {:s}".format(" ".join(cpp_cmd)))
    94101    proc = subprocess.Popen(cpp_cmd,
    95             stderr=subprocess.PIPE,
    96             stdout=subprocess.PIPE)
     102                            stderr=subprocess.PIPE,
     103                            stdout=subprocess.PIPE)
    97104    assert proc, 'Proc was none'
    98105    cpp_output = proc.stdout.read()
     
    101108        raise Exception("preprocessor output is empty:\n%s" % err_output)
    102109    elif err_output:
    103         print ("Warning: preprocessor produced warnings:\n%s" % err_output)
     110        print("Warning: preprocessor produced warnings:\n%s" % err_output)
    104111    if not isinstance(cpp_output, list):
    105112        cpp_output = [l.strip() for l in cpp_output.decode('utf8').split('\n')]
     
    110117    i = 1
    111118    while 1:
    112         if i >= len(cpp_output): break
    113         if cpp_output[i-1].endswith(',') or cpp_output[i-1].endswith('{') or cpp_output[i].startswith('}'):
    114             cpp_output[i] = cpp_output[i-1] + ' ' + cpp_output[i]
    115             cpp_output.pop(i-1)
     119        if i >= len(cpp_output):
     120            break
     121        if ('{' in cpp_output[i - 1]) and (not '}' in cpp_output[i - 1]) or (not ';' in cpp_output[i - 1]):
     122            cpp_output[i] = cpp_output[i - 1] + ' ' + cpp_output[i]
     123            cpp_output.pop(i - 1)
     124        elif ('}' in cpp_output[i]):
     125            cpp_output[i] = cpp_output[i - 1] + ' ' + cpp_output[i]
     126            cpp_output.pop(i - 1)
    116127        else:
    117128            i += 1
    118129
    119     typedefs = filter(lambda y: y.startswith ('typedef struct _aubio'), cpp_output)
    120 
     130    # clean pointer notations
     131    tmp = []
     132    for l in cpp_output:
     133        tmp += [l.replace(' *', ' * ')]
     134    cpp_output = tmp
     135
     136    return cpp_output
     137
     138
     139def get_cpp_objects_from_c_declarations(c_declarations, skip_objects=None):
     140    if skip_objects == None:
     141        skip_objects = default_skip_objects
     142    typedefs = filter(lambda y: y.startswith('typedef struct _aubio'), c_declarations)
    121143    cpp_objects = [a.split()[3][:-1] for a in typedefs]
    122 
    123     return cpp_output, cpp_objects
    124 
    125 
    126 def analyze_cpp_output(cpp_objects, cpp_output):
     144    cpp_objects_filtered = filter(lambda y: not y[6:-2] in skip_objects, cpp_objects)
     145    return cpp_objects_filtered
     146
     147
     148def get_all_func_names_from_lib(lib, depth=0):
     149    ''' return flat string of all function used in lib
     150    '''
     151    res = []
     152    indent = " " * depth
     153    for k, v in lib.items():
     154        if isinstance(v, dict):
     155            res += get_all_func_names_from_lib(v, depth + 1)
     156        elif isinstance(v, list):
     157            for elem in v:
     158                e = elem.split('(')
     159                if len(e) < 2:
     160                    continue  # not a function
     161                fname_part = e[0].strip().split(' ')
     162                fname = fname_part[-1]
     163                if fname:
     164                    res += [fname]
     165                else:
     166                    raise NameError('gen_lib : weird function: ' + str(e))
     167
     168    return res
     169
     170
     171def generate_lib_from_c_declarations(cpp_objects, c_declarations):
     172    ''' returns a lib from given cpp_object names
     173
     174    a lib is a dict grouping functions by family (onset,pitch...)
     175        each eement is itself a dict of functions grouped by puposes as :
     176        struct, new, del, do, get, set and other
     177    '''
    127178    lib = {}
    128179
    129180    for o in cpp_objects:
    130         if o[:6] != 'aubio_':
    131             continue
    132         shortname = o[6:-2]
    133         if shortname in skip_objects:
    134             continue
     181        shortname = o
     182        if o[:6] == 'aubio_':
     183            shortname = o[6:-2]  # without aubio_ prefix and _t suffix
     184
    135185        lib[shortname] = {'struct': [], 'new': [], 'del': [], 'do': [], 'get': [], 'set': [], 'other': []}
    136186        lib[shortname]['longname'] = o
    137187        lib[shortname]['shortname'] = shortname
    138         for fn in cpp_output:
    139             if o[:-1] in fn:
    140                 #print "found", o[:-1], "in", fn
     188
     189        fullshortname = o[:-2]  # name without _t suffix
     190
     191        for fn in c_declarations:
     192            func_name = fn.split('(')[0].strip().split(' ')[-1]
     193            if func_name.startswith(fullshortname + '_') or func_name.endswith(fullshortname):
     194                # print "found", shortname, "in", fn
    141195                if 'typedef struct ' in fn:
    142196                    lib[shortname]['struct'].append(fn)
     
    152206                    lib[shortname]['set'].append(fn)
    153207                else:
    154                     #print "no idea what to do about", fn
     208                    # print "no idea what to do about", fn
    155209                    lib[shortname]['other'].append(fn)
    156210    return lib
    157211
    158 def print_cpp_output_results(lib, cpp_output):
    159     for fn in cpp_output:
     212
     213def print_c_declarations_results(lib, c_declarations):
     214    for fn in c_declarations:
    160215        found = 0
    161216        for o in lib:
     
    164219                    found = 1
    165220        if found == 0:
    166             print ("missing", fn)
     221            print("missing", fn)
    167222
    168223    for o in lib:
    169224        for family in lib[o]:
    170225            if type(lib[o][family]) == str:
    171                 print ( "{:15s} {:10s} {:s}".format(o, family, lib[o][family] ) )
     226                print("{:15s} {:10s} {:s}".format(o, family, lib[o][family]))
    172227            elif len(lib[o][family]) == 1:
    173                 print ( "{:15s} {:10s} {:s}".format(o, family, lib[o][family][0] ) )
     228                print("{:15s} {:10s} {:s}".format(o, family, lib[o][family][0]))
    174229            else:
    175                 print ( "{:15s} {:10s} {:s}".format(o, family, lib[o][family] ) )
     230                print("{:15s} {:10s} {:s}".format(o, family, lib[o][family]))
    176231
    177232
    178233def generate_external(header=header, output_path=output_path, usedouble=False, overwrite=True):
    179     if not os.path.isdir(output_path): os.mkdir(output_path)
    180     elif not overwrite: return sorted(glob.glob(os.path.join(output_path, '*.c')))
    181 
    182     cpp_output, cpp_objects = get_cpp_objects(header, usedouble=usedouble)
    183 
    184     lib = analyze_cpp_output(cpp_objects, cpp_output)
    185     # print_cpp_output_results(lib, cpp_output)
     234    if not os.path.isdir(output_path):
     235        os.mkdir(output_path)
     236    elif not overwrite:
     237        return sorted(glob.glob(os.path.join(output_path, '*.c')))
     238
     239    c_declarations = get_c_declarations(header, usedouble=usedouble)
     240    cpp_objects = get_cpp_objects_from_c_declarations(c_declarations)
     241
     242    lib = generate_lib_from_c_declarations(cpp_objects, c_declarations)
     243    # print_c_declarations_results(lib, c_declarations)
    186244
    187245    sources_list = []
     
    192250    for o in lib:
    193251        out = source_header
    194         mapped = MappedObject(lib[o], usedouble = usedouble)
     252        mapped = MappedObject(lib[o], usedouble=usedouble)
    195253        out += mapped.gen_code()
    196254        output_file = os.path.join(output_path, 'gen-%s.c' % o)
    197255        with open(output_file, 'w') as f:
    198256            f.write(out)
    199             print ("wrote %s" % output_file )
     257            print("wrote %s" % output_file)
    200258            sources_list.append(output_file)
    201259
     
    209267  return ({pycheck_types});
    210268}}
    211 """.format(pycheck_types = check_types)
     269""".format(pycheck_types=check_types)
    212270
    213271    add_types = "".join(["""
    214272  Py_INCREF (&Py_{name}Type);
    215   PyModule_AddObject(m, "{name}", (PyObject *) & Py_{name}Type);""".format(name = o) for o in lib])
     273  PyModule_AddObject(m, "{name}", (PyObject *) & Py_{name}Type);""".format(name=o) for o in lib])
    216274    out += """
    217275
     
    220278{add_types}
    221279}}
    222 """.format(add_types = add_types)
     280""".format(add_types=add_types)
    223281
    224282    output_file = os.path.join(output_path, 'aubio-generated.c')
    225283    with open(output_file, 'w') as f:
    226284        f.write(out)
    227         print ("wrote %s" % output_file )
     285        print("wrote %s" % output_file)
    228286        sources_list.append(output_file)
    229287
     
    243301int generated_objects ( void );
    244302void add_generated_objects( PyObject *m );
    245 """.format(objlist = objlist)
     303""".format(objlist=objlist)
    246304
    247305    output_file = os.path.join(output_path, 'aubio-generated.h')
    248306    with open(output_file, 'w') as f:
    249307        f.write(out)
    250         print ("wrote %s" % output_file )
     308        print("wrote %s" % output_file)
    251309        # no need to add header to list of sources
    252310
     
    254312
    255313if __name__ == '__main__':
    256     if len(sys.argv) > 1: header = sys.argv[1]
    257     if len(sys.argv) > 2: output_path = sys.argv[2]
     314    if len(sys.argv) > 1:
     315        header = sys.argv[1]
     316    if len(sys.argv) > 2:
     317        output_path = sys.argv[2]
    258318    generate_external(header, output_path)
  • scripts/get_waf.sh

    r482641d r9fa0ed1  
    44set -x
    55
    6 WAFURL=https://waf.io/waf-1.9.6
     6WAFURL=https://waf.io/waf-1.9.12
    77
    88( which wget > /dev/null && wget -qO waf $WAFURL ) || ( which curl > /dev/null && curl $WAFURL > waf )
  • scripts/setenv_local.sh

    r482641d r9fa0ed1  
    11#! /usr/bin/env bash
    22
    3 # This script sets the environment to execute aubio binaries and python code
    4 # directly from build/ python/build/ without installing libaubio on the system
    5 
    6 # Usage: $ source ./scripts/setenv_local.sh
    7 
    8 # WARNING: this script will *overwrite* existing (DY)LD_LIBRARY_PATH and
    9 # PYTHONPATH variables.
    10 
    11 PYTHON_PLATFORM=`python -c "import pkg_resources, sys; print ('%s-%s' % (pkg_resources.get_build_platform(), '.'.join(map(str, sys.version_info[0:2]))))"`
     3# This script sets the LD_LIBRARY_PATH environment variable to ./build/src to
     4# execute aubio binaries without installing libaubio.
     5#
     6# Usage: $ source scripts/setenv_local.sh
     7#
     8# Note: on macOs, the variable is DYLD_LIBRARY_PATH
    129
    1310AUBIODIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd )"
     11
    1412AUBIOLIB=$AUBIODIR/build/src
    15 AUBIOPYTHON=$AUBIODIR/build/lib.$PYTHON_PLATFORM
    16 
    17 if [ "$(dirname $PWD)" == "scripts" ]; then
    18   AUBIODIR=$(basename $PWD)
    19 else
    20   AUBIODIR=$(basename $PWD)
    21 fi
    2213
    2314if [ "$(uname)" == "Darwin" ]; then
     
    2819  echo export LD_LIBRARY_PATH=$LD_LIBRARY_PATH
    2920fi
    30 
    31 export PYTHONPATH=$AUBIOPYTHON
    32 echo export PYTHONPATH=$PYTHONPATH
  • src/wscript_build

    r482641d r9fa0ed1  
    2727    build_features = ['cstlib', 'cshlib']
    2828elif ctx.env['DEST_OS'] in ['emscripten']:
    29     build_features = ['cstlib']
     29    build_features = ['cstlib','cshlib']
    3030elif '--static' in ctx.env['LDFLAGS'] or '--static' in ctx.env['LINKFLAGS']:
    3131    # static in cflags, ...
  • wscript

    r482641d r9fa0ed1  
    108108    ctx.load('gnu_dirs')
    109109
     110    target_platform = sys.platform
     111    if ctx.options.target_platform:
     112        target_platform = ctx.options.target_platform
     113
     114
     115    if target_platform=='emscripten':
     116        # need to force spaces between flag -o and path
     117        # inspired from :
     118        # https://github.com/waf-project/waf/blob/master/waflib/extras/c_emscripten.py (#1885)
     119        # (OSX /emscripten 1.37.9)
     120        ctx.env.CC_TGT_F            = ['-c', '-o', '']
     121        ctx.env.CCLNK_TGT_F         = ['-o', '']
    110122    # check for common headers
    111123    ctx.check(header_name='stdlib.h')
     
    118130    ctx.check(header_name='unistd.h', mandatory = False)
    119131
    120     target_platform = sys.platform
    121     if ctx.options.target_platform:
    122         target_platform = ctx.options.target_platform
    123132    ctx.env['DEST_OS'] = target_platform
    124133
     
    133142            ctx.env.prepend_value('CFLAGS', ['-O0'])
    134143        else:
    135             # default to -O2 in release mode
    136             ctx.env.prepend_value('CFLAGS', ['-O2'])
     144            if target_platform == 'emscripten':
     145                # -Oz for small js file generation
     146                ctx.env.prepend_value('CFLAGS', ['-Oz'])
     147            else:
     148                # default to -O2 in release mode
     149                ctx.env.prepend_value('CFLAGS', ['-O2'])
    137150        # enable debug symbols and configure warnings
    138151        ctx.env.prepend_value('CFLAGS', ['-g', '-Wall', '-Wextra'])
     
    216229        import os.path
    217230        ctx.env.CFLAGS += [ '-I' + os.path.join(os.environ['EMSCRIPTEN'], 'system', 'include') ]
    218         ctx.env.CFLAGS += ['-Oz']
     231       
     232        if ctx.options.build_type == "debug":
     233            ctx.env.cshlib_PATTERN = '%s.js'
     234            ctx.env.LINKFLAGS += ['-s','ASSERTIONS=2']
     235            ctx.env.LINKFLAGS += ['-s','SAFE_HEAP=1']
     236            ctx.env.LINKFLAGS += ['-s','ALIASING_FUNCTION_POINTERS=0']
     237            ctx.env.LINKFLAGS += ['-O0']
     238        else:
     239            ctx.env.LINKFLAGS += ['-Oz']
     240            ctx.env.cshlib_PATTERN = '%s.min.js'
     241
     242        # doesnt ship file system support in lib
     243        ctx.env.LINKFLAGS_cshlib += ['-s', 'NO_FILESYSTEM=1']
     244        # put memory file inside generated js files for easier portability
     245        ctx.env.LINKFLAGS += ['--memory-init-file', '0']
    219246        ctx.env.cprogram_PATTERN = "%s.js"
    220         if (ctx.options.enable_atlas != True):
    221             ctx.options.enable_atlas = False
     247        ctx.env.cstlib_PATTERN = '%s.a'
     248
     249        # tell emscripten functions we want to expose
     250        from python.lib.gen_external import get_c_declarations, get_cpp_objects_from_c_declarations, get_all_func_names_from_lib, generate_lib_from_c_declarations
     251        c_decls = get_c_declarations(usedouble=False)  # emscripten can't use double
     252        objects = get_cpp_objects_from_c_declarations(c_decls)
     253        # ensure that aubio structs are exported
     254        objects += ['fvec_t', 'cvec_t', 'fmat_t']
     255        lib = generate_lib_from_c_declarations(objects, c_decls)
     256        exported_funcnames = get_all_func_names_from_lib(lib)
     257        c_mangled_names = ['_' + s for s in exported_funcnames]
     258        ctx.env.LINKFLAGS_cshlib += ['-s', 'EXPORTED_FUNCTIONS=%s' % c_mangled_names]
     259
     260    if (ctx.options.enable_atlas != True):
     261        ctx.options.enable_atlas = False
    222262
    223263    # check support for C99 __VA_ARGS__ macros
Note: See TracChangeset for help on using the changeset viewer.