diff options
| author | Gary Scavone <gary@music.mcgill.ca> | 2007-08-07 14:52:05 +0000 |
|---|---|---|
| committer | Stephen Sinclair <sinclair@music.mcgill.ca> | 2013-10-11 01:19:40 +0200 |
| commit | b0080e69d64ce69e21c8ce1b22b1bb7f888f1e58 (patch) | |
| tree | b51ebcd31a5280b4f4e9e45484f07d9b35723743 /doc | |
| parent | 0fbcd74a04713a4725d2f346a493121b623d60ab (diff) | |
Check in of new version 4.0.0 distribution (GS).
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/doxygen/Doxyfile | 985 | ||||
| -rw-r--r-- | doc/doxygen/acknowledge.txt | 15 | ||||
| -rw-r--r-- | doc/doxygen/apinotes.txt | 37 | ||||
| -rw-r--r-- | doc/doxygen/compiling.txt | 76 | ||||
| -rw-r--r-- | doc/doxygen/duplex.txt | 74 | ||||
| -rw-r--r-- | doc/doxygen/error.txt | 5 | ||||
| -rw-r--r-- | doc/doxygen/footer.html | 3 | ||||
| -rw-r--r-- | doc/doxygen/header.html | 5 | ||||
| -rw-r--r-- | doc/doxygen/license.txt | 30 | ||||
| -rw-r--r-- | doc/doxygen/multi.txt | 7 | ||||
| -rw-r--r-- | doc/doxygen/playback.txt | 81 | ||||
| -rw-r--r-- | doc/doxygen/probe.txt | 70 | ||||
| -rw-r--r-- | doc/doxygen/recording.txt | 66 | ||||
| -rw-r--r-- | doc/doxygen/settings.txt | 48 | ||||
| -rw-r--r-- | doc/doxygen/tutorial.txt | 783 | ||||
| -rw-r--r-- | doc/release.txt | 25 |
16 files changed, 1526 insertions, 784 deletions
diff --git a/doc/doxygen/Doxyfile b/doc/doxygen/Doxyfile index a104bd4..e4b0cef 100644 --- a/doc/doxygen/Doxyfile +++ b/doc/doxygen/Doxyfile @@ -1,155 +1,1080 @@ -# Doxyfile 1.2.6 +# Doxyfile 1.3.4 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project +# +# All text after a hash (#) is considered a comment and will be ignored +# The format is: +# TAG = value [value, ...] +# For lists items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (" ") #--------------------------------------------------------------------------- -# General configuration options +# Project related configuration options #--------------------------------------------------------------------------- + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded +# by quotes) that should identify the project. + PROJECT_NAME = RtAudio -PROJECT_NUMBER = + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. +# This could be handy for archiving the generated documentation or +# if some version control system is used. + +PROJECT_NUMBER = 4.0 + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) +# base path where the generated documentation will be put. +# If a relative path is entered, it will be relative to the location +# where doxygen was started. If left blank the current directory will be used. + OUTPUT_DIRECTORY = . + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# The default language is English, other supported languages are: +# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, Dutch, +# Finnish, French, German, Greek, Hungarian, Italian, Japanese, Japanese-en +# (Japanese with English messages), Korean, Norwegian, Polish, Portuguese, +# Romanian, Russian, Serbian, Slovak, Slovene, Spanish, Swedish, and Ukrainian. + OUTPUT_LANGUAGE = English -EXTRACT_ALL = NO -EXTRACT_PRIVATE = NO -EXTRACT_STATIC = NO -HIDE_UNDOC_MEMBERS = YES -HIDE_UNDOC_CLASSES = NO + +# This tag can be used to specify the encoding used in the generated output. +# The encoding is not always determined by the language that is chosen, +# but also whether or not the output is meant for Windows or non-Windows users. +# In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES +# forces the Windows encoding (this is the default for the Windows binary), +# whereas setting the tag to NO uses a Unix-style encoding (the default for +# all platforms other than Windows). + +USE_WINDOWS_ENCODING = NO + +# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will +# include brief member descriptions after the members that are listed in +# the file and class documentation (similar to JavaDoc). +# Set to NO to disable this. + BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend +# the brief description of a member or function before the detailed description. +# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. + REPEAT_BRIEF = YES + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# Doxygen will generate a detailed section even if there is only a brief +# description. + ALWAYS_DETAILED_SEC = NO + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all inherited +# members of a class in the documentation of that class as if those members were +# ordinary class members. Constructors, destructors and assignment operators of +# the base classes will not be shown. + +INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full +# path before files name in the file list and in the header files. If set +# to NO the shortest path that makes the file name unique will be used. + FULL_PATH_NAMES = NO + +# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag +# can be used to strip a user-defined part of the path. Stripping is +# only done if one of the specified strings matches the left-hand part of +# the path. It is allowed to use relative paths in the argument list. + STRIP_FROM_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter +# (but less readable) file names. This can be useful is your file systems +# doesn't support long names like on DOS, Mac, or CD-ROM. + +SHORT_NAMES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen +# will interpret the first line (until the first dot) of a JavaDoc-style +# comment as the brief description. If set to NO, the JavaDoc +# comments will behave just like the Qt-style comments (thus requiring an +# explict @brief command for a brief description. + +JAVADOC_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen +# treat a multi-line C++ special comment block (i.e. a block of //! or /// +# comments) as a brief description. This used to be the default behaviour. +# The new default is to treat a multi-line C++ comment block as a detailed +# description. Set this tag to YES if you prefer the old behaviour instead. + +MULTILINE_CPP_IS_BRIEF = NO + +# If the DETAILS_AT_TOP tag is set to YES then Doxygen +# will output the detailed description near the top, like JavaDoc. +# If set to NO, the detailed description appears after the member +# documentation. + +DETAILS_AT_TOP = NO + +# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented +# member inherits the documentation from any documented member that it +# reimplements. + +INHERIT_DOCS = YES + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. + +DISTRIBUTE_GROUP_DOC = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. +# Doxygen uses this value to replace tabs by spaces in code fragments. + +TAB_SIZE = 8 + +# This tag can be used to specify a number of aliases that acts +# as commands in the documentation. An alias has the form "name=value". +# For example adding "sideeffect=\par Side Effects:\n" will allow you to +# put the command \sideeffect (or @sideeffect) in the documentation, which +# will result in a user-defined paragraph with heading "Side Effects:". +# You can put \n's in the value part of an alias to insert newlines. + +ALIASES = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources +# only. Doxygen will then generate output that is more tailored for C. +# For instance, some of the names that are used will be different. The list +# of all members will be omitted, etc. + +OPTIMIZE_OUTPUT_FOR_C = NO + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java sources +# only. Doxygen will then generate output that is more tailored for Java. +# For instance, namespaces will be presented as packages, qualified scopes +# will look different, etc. + +OPTIMIZE_OUTPUT_JAVA = NO + +# Set the SUBGROUPING tag to YES (the default) to allow class member groups of +# the same type (for instance a group of public functions) to be put as a +# subgroup of that type (e.g. under the Public Functions section). Set it to +# NO to prevent subgrouping. Alternatively, this can be done per class using +# the \nosubgrouping command. + +SUBGROUPING = YES + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. +# Private class members and static file members will be hidden unless +# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES + +EXTRACT_ALL = NO + +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class +# will be included in the documentation. + +EXTRACT_PRIVATE = NO + +# If the EXTRACT_STATIC tag is set to YES all static members of a file +# will be included in the documentation. + +EXTRACT_STATIC = NO + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) +# defined locally in source files will be included in the documentation. +# If set to NO only classes defined in header files are included. + +EXTRACT_LOCAL_CLASSES = YES + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all +# undocumented members of documented classes, files or namespaces. +# If set to NO (the default) these members will be included in the +# various overviews, but no documentation section is generated. +# This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_MEMBERS = YES + +# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. +# If set to NO (the default) these classes will be included in the various +# overviews. This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_CLASSES = YES + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all +# friend (class|struct|union) declarations. +# If set to NO (the default) these declarations will be included in the +# documentation. + +HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any +# documentation blocks found inside the body of a function. +# If set to NO (the default) these blocks will be appended to the +# function's detailed documentation block. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation +# that is typed after a \internal command is included. If the tag is set +# to NO (the default) then the documentation will be excluded. +# Set it to YES to include the internal documentation. + INTERNAL_DOCS = NO -CLASS_DIAGRAMS = YES -SOURCE_BROWSER = NO -INLINE_SOURCES = NO -STRIP_CODE_COMMENTS = YES + +# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate +# file names in lower-case letters. If set to YES upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# users are advised to set this option to NO. + CASE_SENSE_NAMES = YES + +# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen +# will show members with their full class and namespace scopes in the +# documentation. If set to YES the scope will be hidden. + HIDE_SCOPE_NAMES = NO -VERBATIM_HEADERS = YES + +# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen +# will put a list of the files that are included by a file in the documentation +# of that file. + SHOW_INCLUDE_FILES = YES -JAVADOC_AUTOBRIEF = NO -INHERIT_DOCS = YES + +# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] +# is inserted in the documentation for inline members. + INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen +# will sort the (detailed) documentation of file and class members +# alphabetically by member name. If set to NO the members will appear in +# declaration order. + SORT_MEMBER_DOCS = NO -DISTRIBUTE_GROUP_DOC = NO -TAB_SIZE = 8 -ENABLED_SECTIONS = + +# The GENERATE_TODOLIST tag can be used to enable (YES) or +# disable (NO) the todo list. This list is created by putting \todo +# commands in the documentation. + GENERATE_TODOLIST = YES + +# The GENERATE_TESTLIST tag can be used to enable (YES) or +# disable (NO) the test list. This list is created by putting \test +# commands in the documentation. + GENERATE_TESTLIST = YES + +# The GENERATE_BUGLIST tag can be used to enable (YES) or +# disable (NO) the bug list. This list is created by putting \bug +# commands in the documentation. + GENERATE_BUGLIST = YES -ALIASES = + +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or +# disable (NO) the deprecated list. This list is created by putting +# \deprecated commands in the documentation. + +GENERATE_DEPRECATEDLIST= YES + +# The ENABLED_SECTIONS tag can be used to enable conditional +# documentation sections, marked by \if sectionname ... \endif. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines +# the initial value of a variable or define consists of for it to appear in +# the documentation. If the initializer consists of more lines than specified +# here it will be hidden. Use a value of 0 to hide initializers completely. +# The appearance of the initializer of individual variables and defines in the +# documentation can be controlled using \showinitializer or \hideinitializer +# command in the documentation regardless of this setting. + MAX_INITIALIZER_LINES = 30 -OPTIMIZE_OUTPUT_FOR_C = NO + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated +# at the bottom of the documentation of classes and structs. If set to YES the +# list will mention the files that were used to generate the documentation. + SHOW_USED_FILES = YES + #--------------------------------------------------------------------------- # configuration options related to warning and progress messages #--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated +# by doxygen. Possible values are YES and NO. If left blank NO is used. + QUIET = NO + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated by doxygen. Possible values are YES and NO. If left blank +# NO is used. + WARNINGS = YES + +# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings +# for undocumented members. If EXTRACT_ALL is set to YES then this flag will +# automatically be disabled. + WARN_IF_UNDOCUMENTED = YES + +# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some +# parameters in a documented function, or documenting parameters that +# don't exist or using markup commands wrongly. + +WARN_IF_DOC_ERROR = YES + +# The WARN_FORMAT tag determines the format of the warning messages that +# doxygen can produce. The string should contain the $file, $line, and $text +# tags, which will be replaced by the file and line number from which the +# warning originated and the warning text. + WARN_FORMAT = "$file:$line: $text" + +# The WARN_LOGFILE tag can be used to specify a file to which warning +# and error messages should be written. If left blank the output is written +# to stderr. + WARN_LOGFILE = + #--------------------------------------------------------------------------- # configuration options related to the input files #--------------------------------------------------------------------------- -INPUT = tutorial.txt ../../RtAudio.h ../../RtError.h -FILE_PATTERNS = + +# The INPUT tag can be used to specify the files and/or directories that contain +# documented source files. You may enter file names like "myfile.cpp" or +# directories like "/usr/src/myproject". Separate the files or directories +# with spaces. + +INPUT = . \ + ../../RtAudio.h \ + ../../RtError.h + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank the following patterns are tested: +# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp +# *.h++ *.idl *.odl *.cs *.php *.php3 *.inc + +FILE_PATTERNS = *.txt + +# The RECURSIVE tag can be used to turn specify whether or not subdirectories +# should be searched for input files as well. Possible values are YES and NO. +# If left blank NO is used. + RECURSIVE = NO + +# The EXCLUDE tag can be used to specify files and/or directories that should +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. + EXCLUDE = + +# The EXCLUDE_SYMLINKS tag can be used select whether or not files or directories +# that are symbolic links (a Unix filesystem feature) are excluded from the input. + +EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. + EXCLUDE_PATTERNS = -EXAMPLE_PATH = + +# The EXAMPLE_PATH tag can be used to specify one or more files or +# directories that contain example code fragments that are included (see +# the \include command). + +EXAMPLE_PATH = ../../tests/ + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank all files are included. + EXAMPLE_PATTERNS = + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude +# commands irrespective of the value of the RECURSIVE tag. +# Possible values are YES and NO. If left blank NO is used. + +EXAMPLE_RECURSIVE = NO + +# The IMAGE_PATH tag can be used to specify one or more files or +# directories that contain image that are included in the documentation (see +# the \image command). + IMAGE_PATH = + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command <filter> <input-file>, where <filter> +# is the value of the INPUT_FILTER tag, and <input-file> is the name of an +# input file. Doxygen will then use the output that the filter program writes +# to standard output. + INPUT_FILTER = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will be used to filter the input files when producing source +# files to browse (i.e. when SOURCE_BROWSER is set to YES). + FILTER_SOURCE_FILES = NO + +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will +# be generated. Documented entities will be cross-referenced with these sources. + +SOURCE_BROWSER = NO + +# Setting the INLINE_SOURCES tag to YES will include the body +# of functions and classes directly in the documentation. + +INLINE_SOURCES = NO + +# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct +# doxygen to hide any special comment blocks from generated source code +# fragments. Normal C and C++ comments will always remain visible. + +STRIP_CODE_COMMENTS = YES + +# If the REFERENCED_BY_RELATION tag is set to YES (the default) +# then for each documented function all documented +# functions referencing it will be listed. + +REFERENCED_BY_RELATION = YES + +# If the REFERENCES_RELATION tag is set to YES (the default) +# then for each documented function all documented entities +# called/used by that function will be listed. + +REFERENCES_RELATION = YES + +# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen +# will generate a verbatim copy of the header file for each class for +# which an include is specified. Set to NO to disable this. + +VERBATIM_HEADERS = YES + #--------------------------------------------------------------------------- # configuration options related to the alphabetical class index #--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index +# of all compounds will be generated. Enable this if the project +# contains a lot of classes, structs, unions or interfaces. + ALPHABETICAL_INDEX = NO + +# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then +# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns +# in which this list will be split (can be a number in the range [1..20]) + COLS_IN_ALPHA_INDEX = 5 + +# In case all classes in a project start with a common prefix, all +# classes will be put under the same header in the alphabetical index. +# The IGNORE_PREFIX tag can be used to specify one or more prefixes that +# should be ignored while generating the index headers. + IGNORE_PREFIX = + #--------------------------------------------------------------------------- # configuration options related to the HTML output #--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES (the default) Doxygen will +# generate HTML output. + GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `html' will be used as the default path. + HTML_OUTPUT = ../html + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for +# each generated HTML page (for example: .htm,.php,.asp). If it is left blank +# doxygen will generate files with .html extension. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a personal HTML header for +# each generated HTML page. If it is left blank doxygen will generate a +# standard header. + HTML_HEADER = header.html + +# The HTML_FOOTER tag can be used to specify a personal HTML footer for +# each generated HTML page. If it is left blank doxygen will generate a +# standard footer. + HTML_FOOTER = footer.html + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading +# style sheet that is used by each HTML page. It can be used to +# fine-tune the look of the HTML output. If the tag is left blank doxygen +# will generate a default style sheet + HTML_STYLESHEET = + +# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, +# files or namespaces will be aligned in HTML using tables. If set to +# NO a bullet list will be used. + HTML_ALIGN_MEMBERS = YES + +# If the GENERATE_HTMLHELP tag is set to YES, additional index files +# will be generated that can be used as input for tools like the +# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) +# of the generated HTML documentation. + GENERATE_HTMLHELP = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can +# be used to specify the file name of the resulting .chm file. You +# can add a path in front of the file if the result should not be +# written to the html output dir. + +CHM_FILE = + +# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can +# be used to specify the location (absolute path including file name) of +# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run +# the HTML help compiler on the generated index.hhp. + +HHC_LOCATION = + +# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag +# controls if a separate .chi index file is generated (YES) or that +# it should be included in the master .chm file (NO). + GENERATE_CHI = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag +# controls whether a binary table of contents is generated (YES) or a +# normal table of contents (NO) in the .chm file. + BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members +# to the contents of the HTML help documentation and to the tree view. + TOC_EXPAND = NO + +# The DISABLE_INDEX tag can be used to turn on/off the condensed index at +# top of each HTML page. The value NO (the default) enables the index and +# the value YES disables it. + DISABLE_INDEX = YES + +# This tag can be used to set the number of enum values (range [1..20]) +# that doxygen will group on one line in the generated HTML documentation. + ENUM_VALUES_PER_LINE = 4 + +# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be +# generated containing a tree-like index structure (just like the one that +# is generated for HTML Help). For this to work a browser that supports +# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, +# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are +# probably better off using the HTML help feature. + GENERATE_TREEVIEW = NO + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be +# used to set the initial width (in pixels) of the frame in which the tree +# is shown. + TREEVIEW_WIDTH = 250 + #--------------------------------------------------------------------------- # configuration options related to the LaTeX output #--------------------------------------------------------------------------- + +# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will +# generate Latex output. + GENERATE_LATEX = NO + +# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `latex' will be used as the default path. + LATEX_OUTPUT = latex + +# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be +# invoked. If left blank `latex' will be used as the default command name. + +LATEX_CMD_NAME = latex + +# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to +# generate index for LaTeX. If left blank `makeindex' will be used as the +# default command name. + +MAKEINDEX_CMD_NAME = makeindex + +# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact +# LaTeX documents. This may be useful for small projects and may help to +# save some trees in general. + COMPACT_LATEX = NO + +# The PAPER_TYPE tag can be used to set the paper type that is used +# by the printer. Possible values are: a4, a4wide, letter, legal and +# executive. If left blank a4wide will be used. + PAPER_TYPE = letter + +# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX +# packages that should be included in the LaTeX output. + EXTRA_PACKAGES = + +# The LATEX_HEADER tag can be used to specify a personal LaTeX header for +# the generated latex document. The header should contain everything until +# the first chapter. If it is left blank doxygen will generate a +# standard header. Notice: only use this tag if you know what you are doing! + LATEX_HEADER = + +# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated +# is prepared for conversion to pdf (using ps2pdf). The pdf file will +# contain links (just like the HTML output) instead of page references +# This makes the output suitable for online browsing using a pdf viewer. + PDF_HYPERLINKS = NO + +# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of +# plain latex in the generated Makefile. Set this option to YES to get a +# higher quality PDF documentation. + USE_PDFLATEX = YES + +# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. +# command to the generated LaTeX files. This will instruct LaTeX to keep +# running if errors occur, instead of asking the user for help. +# This option is also used when generating formulas in HTML. + LATEX_BATCHMODE = NO + +# If LATEX_HIDE_INDICES is set to YES then doxygen will not +# include the index chapters (such as File Index, Compound Index, etc.) +# in the output. + +LATEX_HIDE_INDICES = NO + #--------------------------------------------------------------------------- # configuration options related to the RTF output #--------------------------------------------------------------------------- + +# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output +# The RTF output is optimised for Word 97 and may not look very pretty with +# other RTF readers or editors. + GENERATE_RTF = NO + +# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `rtf' will be used as the default path. + RTF_OUTPUT = rtf + +# If the COMPACT_RTF tag is set to YES Doxygen generates more compact +# RTF documents. This may be useful for small projects and may help to +# save some trees in general. + COMPACT_RTF = NO + +# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated +# will contain hyperlink fields. The RTF file will +# contain links (just like the HTML output) instead of page references. +# This makes the output suitable for online browsing using WORD or other +# programs which support those fields. +# Note: wordpad (write) and others do not support links. + RTF_HYPERLINKS = NO + +# Load stylesheet definitions from file. Syntax is similar to doxygen's +# config file, i.e. a series of assigments. You only have to provide +# replacements, missing definitions are set to their default value. + RTF_STYLESHEET_FILE = + +# Set optional variables used in the generation of an rtf document. +# Syntax is similar to doxygen's config file. + +RTF_EXTENSIONS_FILE = + #--------------------------------------------------------------------------- # configuration options related to the man page output #--------------------------------------------------------------------------- + +# If the GENERATE_MAN tag is set to YES (the default) Doxygen will +# generate man pages + GENERATE_MAN = NO + +# The MAN_OUTPUT tag is used to specify where the man pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `man' will be used as the default path. + MAN_OUTPUT = man + +# The MAN_EXTENSION tag determines the extension that is added to +# the generated man pages (default is the subroutine's section .3) + MAN_EXTENSION = .3 + +# If the MAN_LINKS tag is set to YES and Doxygen generates man output, +# then it will generate one additional man file for each entity +# documented in the real man page(s). These additional files +# only source the real man page, but without them the man command +# would be unable to find the correct page. The default is NO. + +MAN_LINKS = NO + +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- + +# If the GENERATE_XML tag is set to YES Doxygen will +# generate an XML file that captures the structure of +# the code including all documentation. Note that this +# feature is still experimental and incomplete at the +# moment. + +GENERATE_XML = NO + +# The XML_OUTPUT tag is used to specify where the XML pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `xml' will be used as the default path. + +XML_OUTPUT = xml + +# The XML_SCHEMA tag can be used to specify an XML schema, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_SCHEMA = + +# The XML_DTD tag can be used to specify an XML DTD, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_DTD = + +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- + +# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will +# generate an AutoGen Definitions (see autogen.sf.net) file +# that captures the structure of the code including all +# documentation. Note that this feature is still experimental +# and incomplete at the moment. + +GENERATE_AUTOGEN_DEF = NO + +#--------------------------------------------------------------------------- +# configuration options related to the Perl module output +#--------------------------------------------------------------------------- + +# If the GENERATE_PERLMOD tag is set to YES Doxygen will +# generate a Perl module file that captures the structure of +# the code including all documentation. Note that this +# feature is still experimental and incomplete at the +# moment. + +GENERATE_PERLMOD = NO + +# If the PERLMOD_LATEX tag is set to YES Doxygen will generate +# the necessary Makefile rules, Perl scripts and LaTeX code to be able +# to generate PDF and DVI output from the Perl module output. + +PERLMOD_LATEX = NO + +# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be +# nicely formatted so it can be parsed by a human reader. This is useful +# if you want to understand what is going on. On the other hand, if this +# tag is set to NO the size of the Perl module output will be much smaller +# and Perl will parse it just the same. + +PERLMOD_PRETTY = YES + +# The names of the make variables in the generated doxyrules.make file +# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. +# This is useful so different doxyrules.make files included by the same +# Makefile don't overwrite each other's variables. + +PERLMOD_MAKEVAR_PREFIX = + #--------------------------------------------------------------------------- # Configuration options related to the preprocessor #--------------------------------------------------------------------------- + +# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will +# evaluate all C-preprocessor directives found in the sources and include +# files. + ENABLE_PREPROCESSING = YES + +# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro +# names in the source code. If set to NO (the default) only conditional +# compilation will be performed. Macro expansion can be done in a controlled +# way by setting EXPAND_ONLY_PREDEF to YES. + MACRO_EXPANSION = NO + +# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES +# then the macro expansion is limited to the macros specified with the +# PREDEFINED and EXPAND_AS_PREDEFINED tags. + EXPAND_ONLY_PREDEF = NO + +# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files +# in the INCLUDE_PATH (see below) will be search if a #include is found. + SEARCH_INCLUDES = YES + +# The INCLUDE_PATH tag can be used to specify one or more directories that +# contain include files that are not input files but should be processed by +# the preprocessor. + INCLUDE_PATH = + +# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard +# patterns (like *.h and *.hpp) to filter out the header-files in the +# directories. If left blank, the patterns specified with FILE_PATTERNS will +# be used. + INCLUDE_FILE_PATTERNS = + +# The PREDEFINED tag can be used to specify one or more macro names that +# are defined before the preprocessor is started (similar to the -D option of +# gcc). The argument of the tag is a list of macros of the form: name +# or name=definition (no spaces). If the definition and the = are +# omitted =1 is assumed. + PREDEFINED = + +# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then +# this tag can be used to specify a list of macro names that should be expanded. +# The macro definition that is found in the sources will be used. +# Use the PREDEFINED tag if you want to use a different macro definition. + EXPAND_AS_DEFINED = + +# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then +# doxygen's preprocessor will remove all function-like macros that are alone +# on a line, have an all uppercase name, and do not end with a semicolon. Such +# function macros are typically used for boiler-plate code, and will confuse the +# parser if not removed. + +SKIP_FUNCTION_MACROS = YES + #--------------------------------------------------------------------------- # Configuration::addtions related to external references #--------------------------------------------------------------------------- + +# The TAGFILES option can be used to specify one or more tagfiles. +# Optionally an initial location of the external documentation +# can be added for each tagfile. The format of a tag file without +# this location is as follows: +# TAGFILES = file1 file2 ... +# Adding location for the tag files is done as follows: +# TAGFILES = file1=loc1 "file2 = loc2" ... +# where "loc1" and "loc2" can be relative or absolute paths or +# URLs. If a location is present for each tag, the installdox tool +# does not have to be run to correct the links. +# Note that each tag file must have a unique name +# (where the name does NOT include the path) +# If a tag file is not located in the directory in which doxygen +# is run, you must also specify the path to the tagfile here. + TAGFILES = + +# When a file name is specified after GENERATE_TAGFILE, doxygen will create +# a tag file that is based on the input files it reads. + GENERATE_TAGFILE = + +# If the ALLEXTERNALS tag is set to YES all external classes will be listed +# in the class index. If set to NO only the inherited external classes +# will be listed. + ALLEXTERNALS = NO + +# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed +# in the modules index. If set to NO, only the current project's groups will +# be listed. + +EXTERNAL_GROUPS = YES + +# The PERL_PATH should be the absolute path and name of the perl script +# interpreter (i.e. the result of `which perl'). + PERL_PATH = /usr/bin/perl + #--------------------------------------------------------------------------- # Configuration options related to the dot tool #--------------------------------------------------------------------------- + +# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will +# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base or +# super classes. Setting the tag to NO turns the diagrams off. Note that this +# option is superceded by the HAVE_DOT option below. This is only a fallback. It is +# recommended to install and use dot, since it yields more powerful graphs. + +CLASS_DIAGRAMS = YES + +# If set to YES, the inheritance and collaboration graphs will hide +# inheritance and usage relations if the target is undocumented +# or is not a class. + +HIDE_UNDOC_RELATIONS = YES + +# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is +# available from the path. This tool is part of Graphviz, a graph visualization +# toolkit from AT&T and Lucent Bell Labs. The other options in this section +# have no effect if this option is set to NO (the default) + HAVE_DOT = NO + +# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect inheritance relations. Setting this tag to YES will force the +# the CLASS_DIAGRAMS tag to NO. + CLASS_GRAPH = YES + +# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect implementation dependencies (inheritance, containment, and +# class references variables) of the class with other documented classes. + COLLABORATION_GRAPH = YES + +# If the UML_LOOK tag is set to YES doxygen will generate inheritance and +# collaboration diagrams in a style similiar to the OMG's Unified Modeling +# Language. + +UML_LOOK = NO + +# If set to YES, the inheritance and collaboration graphs will show the +# relations between templates and their instances. + +TEMPLATE_RELATIONS = NO + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT +# tags are set to YES then doxygen will generate a graph for each documented +# file showing the direct and indirect include dependencies of the file with +# other documented files. + INCLUDE_GRAPH = YES + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and +# HAVE_DOT tags are set to YES then doxygen will generate a graph for each +# documented header file showing the documented files that directly or +# indirectly include this file. + INCLUDED_BY_GRAPH = YES + +# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will +# generate a call dependency graph for every global function or class method. +# Note that enabling this option will significantly increase the time of a run. +# So in most cases it will be better to enable call graphs for selected +# functions only using the \callgraph command. + +CALL_GRAPH = NO + +# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen +# will graphical hierarchy of all classes instead of a textual one. + GRAPHICAL_HIERARCHY = YES + +# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images +# generated by dot. Possible values are png, jpg, or gif +# If left blank png will be used. + +DOT_IMAGE_FORMAT = png + +# The tag DOT_PATH can be used to specify the path where the dot tool can be +# found. If left blank, it is assumed the dot tool can be found on the path. + DOT_PATH = + +# The DOTFILE_DIRS tag can be used to specify one or more directories that +# contain dot files that are included in the documentation (see the +# \dotfile command). + +DOTFILE_DIRS = + +# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width +# (in pixels) of the graphs generated by dot. If a graph becomes larger than +# this value, doxygen will try to truncate the graph, so that it fits within +# the specified constraint. Beware that most browsers cannot cope with very +# large images. + MAX_DOT_GRAPH_WIDTH = 1024 + +# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height +# (in pixels) of the graphs generated by dot. If a graph becomes larger than +# this value, doxygen will try to truncate the graph, so that it fits within +# the specified constraint. Beware that most browsers cannot cope with very +# large images. + MAX_DOT_GRAPH_HEIGHT = 1024 + +# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the +# graphs generated by dot. A depth value of 3 means that only nodes reachable +# from the root by following a path via at most 3 edges will be shown. Nodes that +# lay further from the root node will be omitted. Note that setting this option to +# 1 or 2 may greatly reduce the computation time needed for large code bases. Also +# note that a graph may be further truncated if the graph's image dimensions are +# not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH and MAX_DOT_GRAPH_HEIGHT). +# If 0 is used for the depth value (the default), the graph is not depth-constrained. + +MAX_DOT_GRAPH_DEPTH = 0 + +# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will +# generate a legend page explaining the meaning of the various boxes and +# arrows in the dot generated graphs. + GENERATE_LEGEND = YES + +# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will +# remove the intermediate dot files that are used to generate +# the various graphs. + DOT_CLEANUP = YES + #--------------------------------------------------------------------------- # Configuration::addtions related to the search engine #--------------------------------------------------------------------------- -SEARCHENGINE = NO -CGI_NAME = search.cgi -CGI_URL = -DOC_URL = -DOC_ABSPATH = -BIN_ABSPATH = /usr/local/bin/ -EXT_DOC_PATHS = +# The SEARCHENGINE tag specifies whether or not a search engine should be +# used. If set to NO the values of all tags below this one will be ignored. + +SEARCHENGINE = NO diff --git a/doc/doxygen/acknowledge.txt b/doc/doxygen/acknowledge.txt new file mode 100644 index 0000000..1c42191 --- /dev/null +++ b/doc/doxygen/acknowledge.txt @@ -0,0 +1,15 @@ +/*! \page acknowledge Acknowledgements + +Many thanks to the following people for providing bug fixes and improvements: +<UL> +<LI>Robin Davies (Windows DS and ASIO)</LI> +<LI>Ryan Williams (Windows non-MS compiler ASIO support)</LI> +<LI>Ed Wildgoose (Linux ALSA and Jack)</LI> +<LI>Dominic Mazzoni</LI> +</UL> + +The RtAudio API incorporates many of the concepts developed in the <A href="http://www.portaudio.com/">PortAudio</A> project by Phil Burk and Ross Bencina. Early development also incorporated ideas from Bill Schottstaedt's <A href="http://www-ccrma.stanford.edu/software/snd/sndlib/">sndlib</A>. The CCRMA <A href="http://www-ccrma.stanford.edu/groups/soundwire/">SoundWire group</A> provided valuable feedback during the API proposal stages. + +The early 2.0 version of RtAudio was slowly developed over the course of many months while in residence at the <A href="http://www.iua.upf.es/">Institut Universitari de L'Audiovisual (IUA)</A> in Barcelona, Spain and the <A href="http://www.acoustics.hut.fi/">Laboratory of Acoustics and Audio Signal Processing</A> at the Helsinki University of Technology, Finland. Much subsequent development happened while working at the <A href="http://www-ccrma.stanford.edu/">Center for Computer Research in Music and Acoustics (CCRMA)</A> at <A href="http://www.stanford.edu/">Stanford University</A>. All recent versions of RtAudio have been completed while working as an assistant professor of <a href="http://www.music.mcgill.ca/musictech/">Music Technology</a> at <a href="http://www.mcgill.ca/">McGill University</a>. This work was supported in part by the United States Air Force Office of Scientific Research (grant \#F49620-99-1-0293). + +*/ diff --git a/doc/doxygen/apinotes.txt b/doc/doxygen/apinotes.txt new file mode 100644 index 0000000..73e473e --- /dev/null +++ b/doc/doxygen/apinotes.txt @@ -0,0 +1,37 @@ +/*! \page apinotes API Notes + +RtAudio is designed to provide a common API across the various supported operating systems and audio libraries. Despite that, some issues should be mentioned with regard to each. + +\section linux Linux: + +RtAudio for Linux was developed under Redhat distributions 7.0 - Fedora. Three different audio APIs are supported on Linux platforms: <A href="http://www.opensound.com/oss.html">OSS</A> (versions >= 4.0), <A href="http://www.alsa-project.org/">ALSA</A>, and <A href="http://jackit.sourceforge.net/">Jack</A>. Note that RtAudio now only supports the newer version 4.0 OSS API. The ALSA API is now part of the Linux kernel and offers significantly better functionality than the OSS API. RtAudio provides support for the 1.0 and higher versions of ALSA. Jack is a low-latency audio server written primarily for the GNU/Linux operating system. It can connect a number of different applications to an audio device, as well as allow them to share audio between themselves. Input/output latency on the order of 15 milliseconds can typically be achieved using any of the Linux APIs by fine-tuning the RtAudio buffer parameters (without kernel modifications). Latencies on the order of 5 milliseconds or less can be achieved using a low-latency kernel patch and increasing FIFO scheduling priority. The pthread library, which is used for callback functionality, is a standard component of all Linux distributions. + +The ALSA library includes OSS emulation support. That means that you can run programs compiled for the OSS API even when using the ALSA drivers and library. It should be noted however that OSS emulation under ALSA is not perfect. Specifically, channel number queries seem to consistently produce invalid results. While OSS emulation is successful for the majority of RtAudio tests, it is recommended that the native ALSA implementation of RtAudio be used on systems which have ALSA drivers installed. + +The ALSA implementation of RtAudio makes no use of the ALSA "plug" interface. All necessary data format conversions, channel compensation, de-interleaving, and byte-swapping is handled by internal RtAudio routines. + +At the moment, only one RtAudio instance can be connected to the Jack server. + +\section macosx Macintosh OS-X (CoreAudio and Jack): + +The Apple CoreAudio API is designed to use a separate callback procedure for each of its audio devices. A single RtAudio duplex stream using two different devices is supported, though it cannot be guaranteed to always behave correctly because we cannot synchronize these two callbacks. The <I>numberOfBuffers</I> parameter to the RtAudio::openStream() function has no affect in this implementation. + +It is not possible to have multiple instances of RtAudio accessing the same CoreAudio device. + +The RtAudio Jack support can be compiled on Macintosh OS-X systems, as well as in Linux. + +\section windowsds Windows (DirectSound): + +In order to compile RtAudio under Windows for the DirectSound API, you must have the header and source files for DirectSound version 5.0 or higher. As far as I know, there is no DirectSoundCapture support for Windows NT. Audio output latency with DirectSound can be reasonably good, especially since RtAudio version 3.0.2. Input audio latency still tends to be bad but better since version 3.0.2. RtAudio was originally developed with Visual C++ version 6.0 but has been tested with .NET. + +The DirectSound version of RtAudio can be compiled with or without the UNICODE preprocessor definition. + +\section windowsasio Windows (ASIO): + +The Steinberg ASIO audio API allows only a single device driver to be loaded and accessed at a time. ASIO device drivers must be supplied by audio hardware manufacturers, though ASIO emulation is possible on top of systems with DirectSound drivers. The <I>numberOfBuffers</I> parameter to the RtAudio::openStream() function has no affect in this implementation. + +A number of ASIO source and header files are required for use with RtAudio. Specifically, an RtAudio project must include the following files: <TT>asio.h,cpp; asiodrivers.h,cpp; asiolist.h,cpp; asiodrvr.h; asiosys.h; ginclude.h; iasiodrv.h; iasiothiscallresolver.h,cpp</TT>. The Visual C++ projects found in <TT>/tests/Windows/</TT> compile both ASIO and DirectSound support. + +The Steinberg provided <TT>asiolist</TT> class does not compile when the preprocessor definition UNICODE is defined. Note that this could be an issue when using RtAudio with Qt, though Qt programs appear to compile without the UNICODE definition (try <tt>DEFINES -= UNICODE</tt> in your .pro file). RtAudio with ASIO support has been tested using the MinGW compiler under Windows XP, as well as in the Visual Studio environment. + +*/ diff --git a/doc/doxygen/compiling.txt b/doc/doxygen/compiling.txt new file mode 100644 index 0000000..4cc769f --- /dev/null +++ b/doc/doxygen/compiling.txt @@ -0,0 +1,76 @@ +/*! \page compiling Debugging & Compiling + +\section debug Debugging + +If you are having problems getting RtAudio to run on your system, make sure to pass a value of \e true to the RtAudio::showWarnings() function (this is the default setting). A variety of warning messages will be displayed which may help in determining the problem. Also, try using the programs included in the <tt>tests</tt> directory. The program <tt>probe</tt> displays the queried capabilities of all hardware devices found for all APIs compiled. When using the ALSA API, further information can be displayed by defining the preprocessor definition __RTAUDIO_DEBUG__. + +\section compile Compiling + +In order to compile RtAudio for a specific OS and audio API, it is necessary to supply the appropriate preprocessor definition and library within the compiler statement: +<P> + +<TABLE BORDER=2 COLS=5 WIDTH="100%"> +<TR BGCOLOR="beige"> + <TD WIDTH="5%"><B>OS:</B></TD> + <TD WIDTH="5%"><B>Audio API:</B></TD> + <TD WIDTH="5%"><B>C++ Class:</B></TD> + <TD WIDTH="5%"><B>Preprocessor Definition:</B></TD> + <TD WIDTH="5%"><B>Library or Framework:</B></TD> + <TD><B>Example Compiler Statement:</B></TD> +</TR> +<TR> + <TD>Linux</TD> + <TD>ALSA</TD> + <TD>RtApiAlsa</TD> + <TD>__LINUX_ALSA__</TD> + <TD><TT>asound, pthread</TT></TD> + <TD><TT>g++ -Wall -D__LINUX_ALSA__ -o probe probe.cpp RtAudio.cpp -lasound -lpthread</TT></TD> +</TR> +<TR> + <TD>Linux</TD> + <TD>OSS</TD> + <TD>RtApiOss</TD> + <TD>__LINUX_OSS__</TD> + <TD><TT>pthread</TT></TD> + <TD><TT>g++ -Wall -D__LINUX_OSS__ -o probe probe.cpp RtAudio.cpp -lpthread</TT></TD> +</TR> +<TR> + <TD>Linux or Macintosh OS-X</TD> + <TD>Jack Audio Server</TD> + <TD>RtApiJack</TD> + <TD>__UNIX_JACK__</TD> + <TD><TT>jack, pthread</TT></TD> + <TD><TT>g++ -Wall -D__UNIX_JACK__ -o probe probe.cpp RtAudio.cpp `pkg-config --cflags --libs jack` -lpthread</TT></TD> +</TR> + +<TR> + <TD>Macintosh OS-X</TD> + <TD>CoreAudio</TD> + <TD>RtApiCore</TD> + <TD>__MACOSX_CORE__</TD> + <TD><TT>pthread, CoreAudio</TT></TD> + <TD><TT>g++ -Wall -D__MACOSX_CORE__ -o probe probe.cpp RtAudio.cpp -framework CoreAudio -lpthread</TT></TD> +</TR> +<TR> + <TD>Windows</TD> + <TD>Direct Sound</TD> + <TD>RtApiDs</TD> + <TD>__WINDOWS_DS__</TD> + <TD><TT>dsound.lib (ver. 5.0 or higher), multithreaded</TT></TD> + <TD><I>compiler specific</I></TD> +</TR> +<TR> + <TD>Windows</TD> + <TD>ASIO</TD> + <TD>RtApiAsio</TD> + <TD>__WINDOWS_ASIO__</TD> + <TD><I>various ASIO header and source files</I></TD> + <TD><I>compiler specific</I></TD> +</TR> +</TABLE> +<P> + +The example compiler statements above could be used to compile the <TT>probe.cpp</TT> example file, assuming that <TT>probe.cpp</TT>, <TT>RtAudio.h</TT>, <tt>RtError.h</tt>, and <TT>RtAudio.cpp</TT> all exist in the same directory. + + +*/ diff --git a/doc/doxygen/duplex.txt b/doc/doxygen/duplex.txt new file mode 100644 index 0000000..f060602 --- /dev/null +++ b/doc/doxygen/duplex.txt @@ -0,0 +1,74 @@ +/*! \page duplex Duplex Mode + +Finally, it is easy to use RtAudio for simultaneous audio input/output, or duplex operation. In this example, we simply pass the input data back to the output. + +\code +#include "RtAudio.h" +#include <iostream> + +// Pass-through function. +int inout( void *outputBuffer, void *inputBuffer, unsigned int nBufferFrames, + double streamTime, RtAudioStreamStatus status, void *data ) +{ + // Since the number of input and output channels is equal, we can do + // a simple buffer copy operation here. + if ( status ) std::cout << "Stream over/underflow detected." << std::endl; + + unsigned long *bytes = (unsigned long *) data; + memcpy( outputBuffer, inputBuffer, *bytes ); + return 0; +} + +int main() +{ + RtAudio adac; + if ( adac.getDeviceCount() < 1 ) { + std::cout << "\nNo audio devices found!\n"; + exit( 0 ); + } + + // Set the same number of channels for both input and output. + unsigned int bufferBytes, bufferFrames = 512; + RtAudio::StreamParameters iParams, oParams; + iParams.deviceId = 0; // first available device + iParams.nChannels = 2; + oParams.deviceId = 0; // first available device + oParams.nChannels = 2; + + try { + adac.openStream( &oParams, &iParams, RTAUDIO_SINT32, 44100, &bufferFrames, &inout, (void *)&bufferBytes ); + } + catch ( RtError& e ) { + e.printMessage(); + exit( 0 ); + } + + bufferBytes = bufferFrames * 2 * 4; + + try { + adac.startStream(); + + char input; + std::cout << "\nRunning ... press <enter> to quit.\n"; + std::cin.get(input); + + // Stop the stream. + adac.stopStream(); + } + catch ( RtError& e ) { + e.printMessage(); + goto cleanup; + } + + cleanup: + if ( adac.isStreamOpen() ) adac.closeStream(); + + return 0; +} +\endcode + +In this example, audio recorded by the stream input will be played out during the next round of audio processing. + +Note that a duplex stream can make use of two different devices (except when using the Linux Jack and Windows ASIO APIs). However, this may cause timing problems due to possible device clock variations, unless a common external "sync" is provided. + +*/ diff --git a/doc/doxygen/error.txt b/doc/doxygen/error.txt new file mode 100644 index 0000000..514c1c4 --- /dev/null +++ b/doc/doxygen/error.txt @@ -0,0 +1,5 @@ +/*! \page errors Error Handling + +RtAudio makes restrained use of C++ exceptions. That is, exceptions are thrown only when system errors occur that prevent further class operation or when the user makes invalid function calls. In other cases, a warning message may be displayed and an appropriate value is returned. For example, if a system error occurs when processing the RtAudio::getDeviceCount() function, the return value is zero. In such a case, the user cannot expect to make use of most other RtAudio functions because no devices are available (and thus a stream cannot be opened). A client can call the function RtAudio::showWarnings() with a boolean argument to enable or disable the printing of warning messages to <tt>stderr</tt>. By default, warning messages are displayed. There is a protected RtAudio method, error(), that can be modified to globally control how these messages are handled and reported. + +*/ diff --git a/doc/doxygen/footer.html b/doc/doxygen/footer.html index d05cf27..c10c2dd 100644 --- a/doc/doxygen/footer.html +++ b/doc/doxygen/footer.html @@ -1,8 +1,7 @@ <HR> <table><tr><td><img src="../images/mcgill.gif" width=165></td> - <td>©2001-2005 Gary P. Scavone, McGill University. All Rights Reserved.<br> - Maintained by Gary P. Scavone, <a href="mailto:gary@music.mcgill.ca">gary@music.mcgill.ca</a></td></tr> + <td>©2001-2007 Gary P. Scavone, McGill University. All Rights Reserved.<br>Maintained by <a href="http://www.music.mcgill.ca/~gary/">Gary P. Scavone</a>.</td></tr> </table> </BODY> diff --git a/doc/doxygen/header.html b/doc/doxygen/header.html index a368db2..031694a 100644 --- a/doc/doxygen/header.html +++ b/doc/doxygen/header.html @@ -1,9 +1,10 @@ <HTML> <HEAD> -<TITLE>The RtAudio Tutorial</TITLE> +<TITLE>The RtAudio Home Page</TITLE> <LINK HREF="doxygen.css" REL="stylesheet" TYPE="text/css"> +<LINK REL="SHORTCUT ICON" HREF="http://www.music.mcgill.ca/~gary/favicon.ico"> </HEAD> <BODY BGCOLOR="#FFFFFF"> <CENTER> -<a class="qindex" href="index.html">Tutorial</a> <a class="qindex" href="annotated.html">Class/Enum List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Compound Members</a> </CENTER> +<a class="qindex" href="index.html">Home</a> <a class="qindex" href="annotated.html">Class/Enum List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Compound Members</a> </CENTER> <HR> diff --git a/doc/doxygen/license.txt b/doc/doxygen/license.txt new file mode 100644 index 0000000..abcdc26 --- /dev/null +++ b/doc/doxygen/license.txt @@ -0,0 +1,30 @@ +/*! \page license License + + RtAudio: a set of realtime audio i/o C++ classes<BR> + Copyright (c) 2001-2007 Gary P. Scavone + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + Any person wishing to distribute modifications to the Software is + asked to send the modifications to the original developer so that + they can be incorporated into the canonical version. This is, + however, not a binding provision of this license. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR + ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF + CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +*/ diff --git a/doc/doxygen/multi.txt b/doc/doxygen/multi.txt new file mode 100644 index 0000000..85a3e48 --- /dev/null +++ b/doc/doxygen/multi.txt @@ -0,0 +1,7 @@ +/*! \page multi Using Simultaneous Multiple APIs + +Because support for each audio API is encapsulated in a specific RtApi subclass, it is possible to compile and instantiate multiple API-specific subclasses on a given operating system. For example, one can compile both the RtApiDs and RtApiAsio classes on Windows operating systems by providing the appropriate preprocessor definitions, include files, and libraries for each. In a run-time situation, one might first attempt to determine whether any ASIO device drivers exist. This can be done by specifying the api argument RtAudio::WINDOWS_ASIO when attempting to create an instance of RtAudio. If no available devices are found, then an instance of RtAudio with the api argument RtAudio::WINDOWS_DS can be created. Alternately, if no api argument is specified, RtAudio will first look for an ASIO instance and then a DirectSound instance (on Linux systems, the default API search order is Jack, Alsa, and finally OSS). In theory, it should also be possible to have separate instances of RtAudio open at the same time with different underlying audio API support, though this has not been tested. It is difficult to know how well different audio APIs can simultaneously coexist on a given operating system. In particular, it is unlikely that the same device could be simultaneously controlled with two different audio APIs. + +The static function RtAudio::getCompiledApi() is provided to determine the available compiled API support. The function RtAudio::getCurrentApi() indicates the API selected for a given RtAudio instance. + +*/ diff --git a/doc/doxygen/playback.txt b/doc/doxygen/playback.txt new file mode 100644 index 0000000..4d5a793 --- /dev/null +++ b/doc/doxygen/playback.txt @@ -0,0 +1,81 @@ +/*! \page playback Playback + +In this example, we provide a complete program that demonstrates the use of RtAudio for audio playback. Our program produces a two-channel sawtooth waveform for output. + +\code +#include "RtAudio.h" +#include <iostream> + +// Two-channel sawtooth wave generator. +int saw( void *outputBuffer, void *inputBuffer, unsigned int nBufferFrames, + double streamTime, RtAudioStreamStatus status, void *userData ) +{ + unsigned int i, j; + double *buffer = (double *) outputBuffer; + double *lastValues = (double *) userData; + + if ( status ) + std::cout << "Stream underflow detected!" << std::endl; + + // Write interleaved audio data. + for ( i=0; i<nBufferFrames; i++ ) { + for ( j=0; j<2; j++ ) { + *buffer++ = lastValues[j]; + + lastValues[j] += 0.005 * (j+1+(j*0.1)); + if ( lastValues[j] >= 1.0 ) lastValues[j] -= 2.0; + } + } + + return 0; +} + +int main() +{ + RtAudio dac; + if ( dac.getDeviceCount() < 1 ) { + std::cout << "\nNo audio devices found!\n"; + exit( 0 ); + } + + RtAudio::StreamParameters parameters; + parameters.deviceId = dac.getDefaultOutputDevice(); + parameters.nChannels = 2; + parameters.firstChannel = 0; + unsigned int sampleRate = 44100; + unsigned int bufferFrames = 256; // 256 sample frames + double data[2]; + + try { + dac.openStream( ¶meters, NULL, RTAUDIO_FLOAT64, + sampleRate, &bufferFrames, &saw, (void *)&data ); + dac.startStream(); + } + catch ( RtError& e ) { + e.printMessage(); + exit( 0 ); + } + + char input; + std::cout << "\nPlaying ... press <enter> to quit.\n"; + std::cin.get( input ); + + try { + // Stop the stream + dac.stopStream(); + } + catch (RtError& e) { + e.printMessage(); + } + + if ( dac.isStreamOpen() ) dac.closeStream(); + + return 0; +} +\endcode + +We open the stream in exactly the same way as the previous example (except with a data format change) and specify the address of our callback function \e "saw()". The callback function will automatically be invoked when the underlying audio system needs data for output. Note that the callback function is called only when the stream is "running" (between calls to the RtAudio::startStream() and RtAudio::stopStream() functions). We can also pass a pointer value to the RtAudio::openStream() function that is made available in the callback function. In this way, it is possible to gain access to arbitrary data created in our \e main() function from within the globally defined callback function. + +In this example, we stop the stream with an explicit call to RtAudio::stopStream(). It is also possible to stop a stream by returning a non-zero value from the callback function. A return value of 1 will cause the stream to finish draining its internal buffers and then halt (equivalent to calling the RtAudio::stopStream() function). A return value of 2 will cause the stream to stop immediately (equivalent to calling the RtAudio::abortStream() function). + +*/ diff --git a/doc/doxygen/probe.txt b/doc/doxygen/probe.txt new file mode 100644 index 0000000..761ae34 --- /dev/null +++ b/doc/doxygen/probe.txt @@ -0,0 +1,70 @@ +/*! \page probe Probing Device Capabilities + +A programmer may wish to query the available audio device capabilities before deciding which to use. The following example outlines how this can be done. + +\code + +// probe.cpp + +#include <iostream> +#include "RtAudio.h" + +int main() +{ + RtAudio audio; + + // Determine the number of devices available + unsigned int devices = audio.getDeviceCount(); + + // Scan through devices for various capabilities + RtAudio::DeviceInfo info; + for ( unsigned int i=1; i<=devices; i++ ) { + + info = audio.getDeviceInfo( i ); + + if ( info.probed == true ) { + // Print, for example, the maximum number of output channels for each device + std::cout << "device = " << i; + std::cout << ": maximum output channels = " << info.outputChannels << "\n"; + } + } + + return 0; +} +\endcode + +The RtAudio::DeviceInfo structure is defined in RtAudio.h and provides a variety of information useful in assessing the capabilities of a device: + +\code + typedef struct RtAudio::DeviceInfo { + bool probed; // true if the device capabilities were successfully probed. + std::string name; // Character string device identifier. + int outputChannels; // Maximum output channels supported by device. + int inputChannels; // Maximum input channels supported by device. + int duplexChannels; // Maximum simultaneous input/output channels supported by device. + bool isDefaultOutput; // true if this is the default output device. + bool isDefaultInput; // true if this is the default input device. + std::vector<int> sampleRates; // Supported sample rates. + RtAudioFormat nativeFormats; // Bit mask of supported data formats. + }; +\endcode + +The following data formats are defined and fully supported by RtAudio: + +\code + typedef unsigned long RtAudioFormat; + static const RtAudioFormat RTAUDIO_SINT8; // Signed 8-bit integer + static const RtAudioFormat RTAUDIO_SINT16; // Signed 16-bit integer + static const RtAudioFormat RTAUDIO_SINT24; // Signed 24-bit integer (lower 3 bytes of 32-bit signed integer.) + static const RtAudioFormat RTAUDIO_SINT32; // Signed 32-bit integer + static const RtAudioFormat RTAUDIO_FLOAT32; // 32-bit float normalized between +/- 1.0 + static const RtAudioFormat RTAUDIO_FLOAT64; // 64-bit double normalized between +/- 1.0 +\endcode + +The \c nativeFormats member of the RtAudio::DeviceInfo structure is a bit mask of the above formats which are natively supported by the device. However, RtAudio will automatically provide format conversion if a particular format is not natively supported. When the \c probed member of the RtAudio::DeviceInfo structure is false, the remaining structure members are undefined and the device is probably unusable. + +Some audio devices may require a minimum channel value greater than one. RtAudio will provide automatic channel number compensation when the number of channels set by the user is less than that required by the device. Channel compensation is <I>NOT</I> possible when the number of channels set by the user is greater than that supported by the device. + +It should be noted that the capabilities reported by a device driver or underlying audio API are not always accurate and/or may be dependent on a combination of device settings. For this reason, RtAudio does not rely on the queried values when attempting to open a stream. + +*/ diff --git a/doc/doxygen/recording.txt b/doc/doxygen/recording.txt new file mode 100644 index 0000000..6316a5c --- /dev/null +++ b/doc/doxygen/recording.txt @@ -0,0 +1,66 @@ +/*! \page recording Recording + + +Using RtAudio for audio input is almost identical to the way it is used for playback. Here's the blocking playback example rewritten for recording: + +\code +#include "RtAudio.h" +#include <iostream> + +int record( void *outputBuffer, void *inputBuffer, unsigned int nBufferFrames, + double streamTime, RtAudioStreamStatus status, void *userData ) +{ + if ( status ) + std::cout << "Stream overflow detected!" << std::endl; + + // Do something with the data in the "inputBuffer" buffer. + + return 0; +} + +int main() +{ + RtAudio adc; + if ( adc.getDeviceCount() < 1 ) { + std::cout << "\nNo audio devices found!\n"; + exit( 0 ); + } + + RtAudio::StreamParameters parameters; + parameters.deviceId = adc.getDefaultInputDevice(); + parameters.nChannels = 2; + parameters.firstChannel = 0; + unsigned int sampleRate = 44100; + unsigned int bufferFrames = 256; // 256 sample frames + + try { + adc.openStream( NULL, ¶meters, RTAUDIO_SINT16, + sampleRate, &bufferFrames, &record ); + adc.startStream(); + } + catch ( RtError& e ) { + e.printMessage(); + exit( 0 ); + } + + char input; + std::cout << "\nRecording ... press <enter> to quit.\n"; + std::cin.get( input ); + + try { + // Stop the stream + adc.stopStream(); + } + catch (RtError& e) { + e.printMessage(); + } + + if ( adc.isStreamOpen() ) adc.closeStream(); + + return 0; +} +\endcode + +In this example, we pass the address of the stream parameter structure as the second argument of the RtAudio::openStream() function and pass a NULL value for the output stream parameters. In this example, the \e record() callback function performs no specific operations. + +*/ diff --git a/doc/doxygen/settings.txt b/doc/doxygen/settings.txt new file mode 100644 index 0000000..d7cc1d2 --- /dev/null +++ b/doc/doxygen/settings.txt @@ -0,0 +1,48 @@ +/*! \page settings Device Settings + +The next step in using RtAudio is to open a stream with particular device and parameter settings. + +\code + +#include "RtAudio.h" + +int main() +{ + RtAudio dac; + if ( dac.getDeviceCount() == 0 ) exit( 0 ); + + RtAudio::StreamParameters parameters; + parameters.deviceId = dac.getDefaultOutputDevice(); + parameters.nChannels = 2; + unsigned int sampleRate = 44100; + unsigned int bufferFrames = 256; // 256 sample frames + + RtAudio::StreamOptions options; + options.flags = RTAUDIO_NONINTERLEAVED; + + try { + dac.openStream( ¶meters, NULL, RTAUDIO_FLOAT32, + sampleRate, &bufferFrames, &myCallback, NULL, &options ); + } + catch ( RtError& e ) { + std::cout << '\n' << e.getMessage() << '\n' << std::endl; + exit( 0 ); + } + + return 0; +} +\endcode + +The RtAudio::openStream() function attempts to open a stream with a specified set of parameter values. In the above example, we attempt to open a two channel playback stream using the default output device, 32-bit floating point data, a sample rate of 44100 Hz, and a frame rate of 256 sample frames per output buffer. If the user specifies an invalid parameter value (such as a device id greater than or equal to the number of enumerated devices), an RtError is thrown of type = INVALID_USE. If a system error occurs or the device does not support the specified parameter values, an RtError of type = SYSTEM_ERROR is thrown. In either case, a descriptive error message is bundled with the exception and can be queried with the RtError::getMessage() or RtError::what() functions. + +RtAudio provides four signed integer and two floating point data formats which can be specified using the RtAudioFormat parameter values mentioned earlier. If the opened device does not natively support the given format, RtAudio will automatically perform the necessary data format conversion. + +The \c bufferFrames parameter specifies the desired number of sample frames that will be written to and/or read from a device per write/read operation. This parameter can be used to control stream latency though there is no guarantee that the passed value will be that used by a device. In general, a lower \c bufferFrames value will produce less latency but perhaps less robust performance. A value of zero can be specified, in which case the smallest allowable value will be used. The \c bufferFrames parameter is passed as a pointer and the actual value used by the stream is set during the device setup procedure. \c bufferFrames values should be a power of two. Optimal and allowable buffer values tend to vary between systems and devices. Stream latency can also be controlled via the optional RtAudio::StreamOptions member \c numberOfBuffers (not used in the example above), though this tends to be more system dependent. In particular, the \c numberOfBuffers parameter is ignored when using the OS-X Core Audio, Jack, and the Windows ASIO APIs. + +As noted earlier, the device capabilities reported by a driver or underlying audio API are not always accurate and/or may be dependent on a combination of device settings. Because of this, RtAudio does not attempt to query a device's capabilities or use previously reported values when opening a device. Instead, RtAudio simply attempts to set the given parameters on a specified device and then checks whether the setup is successful or not. + +The RtAudioCallback parameter above is a pointer to a user-defined function that will be called whenever the audio system is ready for new output data or has new input data to be read. Further details on the use of a callback function are provided in the next section. + +Several stream options are available to fine-tune the behavior of an audio stream. In the example above, we specify that data will be written by the user in a \e non-interleaved format via the RtAudio::StreamOptions member \c flags. That is, all \c bufferFrames of the first channel should be written consecutively, followed by all \c bufferFrames of the second channel. By default (when no option is specified), RtAudio expects data to be written in an \e interleaved format. + +*/ diff --git a/doc/doxygen/tutorial.txt b/doc/doxygen/tutorial.txt index 802fe24..8e6b63d 100644 --- a/doc/doxygen/tutorial.txt +++ b/doc/doxygen/tutorial.txt @@ -1,761 +1,54 @@ -/*! \mainpage The RtAudio Tutorial +/*! \mainpage The RtAudio Home Page -<CENTER>\ref intro \ref changes \ref download \ref start \ref error \ref probing \ref settings \ref playbackb \ref playbackc \ref recording \ref duplex \ref multi \ref methods \ref compiling \ref debug \ref apinotes \ref wishlist \ref acknowledge \ref license</CENTER> - -\section intro Introduction - -RtAudio is a set of C++ classes which provide a common API (Application Programming Interface) for realtime audio input/output across Linux (native ALSA, JACK, and OSS), Macintosh OS X, SGI, and Windows (DirectSound and ASIO) operating systems. RtAudio significantly simplifies the process of interacting with computer audio hardware. It was designed with the following goals: +RtAudio is a set of C++ classes that provide a common API (Application Programming Interface) for realtime audio input/output across Linux, Macintosh OS-X and Windows (DirectSound and ASIO) operating systems. RtAudio significantly simplifies the process of interacting with computer audio hardware. It was designed with the following objectives: <UL> - <LI>object oriented C++ design</LI> + <LI>object-oriented C++ design</LI> <LI>simple, common API across all supported platforms</LI> - <LI>only two header files and one source file for easy inclusion in programming projects</LI> + <LI>only one source and two header files for easy inclusion in programming projects</LI> <LI>allow simultaneous multi-api support</LI> - <LI>blocking functionality</LI> - <LI>callback functionality</LI> - <LI>extensive audio device parameter control</LI> - <LI>audio device capability probing</LI> - <LI>automatic internal conversion for data format, channel number compensation, de-interleaving, and byte-swapping</LI> + <LI>support dynamic connection of devices</LI> + <LI>provide extensive audio device parameter control</LI> + <LI>allow audio device capability probing</LI> + <LI>automatic internal conversion for data format, channel number compensation, (de)interleaving, and byte-swapping</LI> </UL> RtAudio incorporates the concept of audio streams, which represent audio output (playback) and/or input (recording). Available audio devices and their capabilities can be enumerated and then specified when opening a stream. Where applicable, multiple API support can be compiled and a particular API specified when creating an RtAudio instance. See the \ref apinotes section for information specific to each of the supported audio APIs. -The RtAudio API provides both blocking (synchronous) and callback (asynchronous) functionality. Callbacks are typically used in conjunction with graphical user interfaces (GUI). Blocking functionality is often necessary for explicit control of multiple input/output stream synchronization or when audio must be synchronized with other system events. - -\section changes What's New (Version 3.0) - -RtAudio now allows simultaneous multi-api support. For example, you can compile RtAudio to provide both DirectSound and ASIO support on Windows platforms or ALSA, JACK, and OSS support on Linux platforms. This was accomplished by creating an abstract base class, RtApi, with subclasses for each supported API (RtApiAlsa, RtApiJack, RtApiOss, RtApiDs, RtApiAsio, RtApiCore, and RtApiAl). The class RtAudio is now a "controller" which creates an instance of an RtApi subclass based on the user's API choice via an optional RtAudio::RtAudioApi instantiation argument. If no API is specified, RtAudio attempts to make a "logical" API selection. - -Support for the JACK low-latency audio server has been added with this version of RtAudio. It is necessary to have the JACK server running before creating an instance of RtAudio. - -Several API changes have been made in version 3.0 of RtAudio in an effort to provide more consistent behavior across all supported audio APIs. The most significant of these changes is that multiple stream support from a single RtAudio instance has been discontinued. As a result, stream identifier input arguments are no longer required. Also, the RtAudio::streamWillBlock() function was poorly supported by most APIs and has been deprecated (though the function still exists in those subclasses of RtApi that do allow it to be implemented). +\section whatsnew What's New (Version 4.0) -The RtAudio::getDeviceInfo() function was modified to return a globally defined RtAudioDeviceInfo structure. This structure is a simplified version of the previous RTAUDIO_DEVICE structure. In addition, the RTAUDIO_FORMAT structure was renamed RtAudioFormat and defined globally within RtAudio.h. These changes were made for clarity and to better conform with standard C++ programming practices. +RtAudio V4 represents a significant rewrite of the code and includes a number of API and functionality changes form previous versions. A partial list of the changes includes: +- new support for non-interleaved user data +- additional input/output parameter specifications, including channel offset +- new support for dynamic connection of devices +- new support for stream time +- revised callback arguments, including separate input and output buffer arguments +- revised C++ exception handling +- updated support for OSS version 4.0 +- discontinued support of blocking functionality +- discontinued support of SGI -The RtError class declaration and definition have been extracted to a separate file (RtError.h). This was done in preparation for a new release of the RtMidi class (planned for Summer 2004). +Devices are now re-enumerated every time the RtAudio::getDeviceCount(), RtAudio::getDeviceInfo(), and RtAudio::openStream() functions are called. This allows for the proper identification of hot-pluggable (USB, Firewire, ...) devices while a given RtAudio instance exists. \section download Download -Latest Release (18 November 2005): <A href="http://music.mcgill.ca/~gary/rtaudio/release/rtaudio-3.0.3.tar.gz">Version 3.0.3</A> - -\section start Getting Started - -With version 3.0, it is now possible to compile multiple API support on a given platform and to specify an API choice during class instantiation. In the examples that follow, no API will be specified (in which case, RtAudio attempts to select the most "logical" available API). - -The first thing that must be done when using RtAudio is to create an instance of the class. The default constructor scans the underlying audio system to verify that at least one device is available. RtAudio often uses C++ exceptions to report errors, necessitating try/catch blocks around most member functions. The following code example demonstrates default object construction and destruction: - -\code - -#include "RtAudio.h" - -int main() -{ - RtAudio *audio = 0; - - // Default RtAudio constructor - try { - audio = new RtAudio(); - } - catch (RtError &error) { - // Handle the exception here - error.printMessage(); - } - - // Clean up - delete audio; -} -\endcode - -Obviously, this example doesn't demonstrate any of the real functionality of RtAudio. However, all uses of RtAudio must begin with a constructor (either default or overloaded varieties) and must end with class destruction. Further, it is necessary that all class methods that can throw a C++ exception be called within a try/catch block. - - -\section error Error Handling - -RtAudio uses a C++ exception handler called RtError, which is declared and defined in RtError.h. The RtError class is quite simple but it does allow errors to be "caught" by RtError::Type. Almost all RtAudio methods can "throw" an RtError, most typically if a driver error occurs or a stream function is called when no stream is open. There are a number of cases within RtAudio where warning messages may be displayed but an exception is not thrown. There is a protected RtAudio method, error(), that can be modified to globally control how these messages are handled and reported. By default, error messages are not automatically displayed in RtAudio unless the preprocessor definition __RTAUDIO_DEBUG__ is defined. Messages associated with caught exceptions can be displayed with, for example, the RtError::printMessage() function. - - -\section probing Probing Device Capabilities - -A programmer may wish to query the available audio device capabilities before deciding which to use. The following example outlines how this can be done. - -\code - -// probe.cpp - -#include <iostream> -#include "RtAudio.h" - -int main() -{ - RtAudio *audio = 0; - - // Default RtAudio constructor - try { - audio = new RtAudio(); - } - catch (RtError &error) { - error.printMessage(); - exit(EXIT_FAILURE); - } - - // Determine the number of devices available - int devices = audio->getDeviceCount(); - - // Scan through devices for various capabilities - RtAudioDeviceInfo info; - for (int i=1; i<=devices; i++) { - - try { - info = audio->getDeviceInfo(i); - } - catch (RtError &error) { - error.printMessage(); - break; - } - - // Print, for example, the maximum number of output channels for each device - std::cout << "device = " << i; - std::cout << ": maximum output channels = " << info.outputChannels << "\n"; - } - - // Clean up - delete audio; - - return 0; -} -\endcode - -The RtAudioDeviceInfo structure is defined in RtAudio.h and provides a variety of information useful in assessing the capabilities of a device: - -\code - typedef struct RtAudioDeviceInfo{ - std::string name; // Character string device identifier. - bool probed; // true if the device capabilities were successfully probed. - int outputChannels; // Maximum output channels supported by device. - int inputChannels; // Maximum input channels supported by device. - int duplexChannels; // Maximum simultaneous input/output channels supported by device. - bool isDefault; // true if this is the default output or input device. - std::vector<int> sampleRates; // Supported sample rates. - RtAudioFormat nativeFormats; // Bit mask of supported data formats. - }; -\endcode - -The following data formats are defined and fully supported by RtAudio: - -\code - typedef unsigned long RtAudioFormat; - static const RtAudioFormat RTAUDIO_SINT8; // Signed 8-bit integer - static const RtAudioFormat RTAUDIO_SINT16; // Signed 16-bit integer - static const RtAudioFormat RTAUDIO_SINT24; // Signed 24-bit integer (upper 3 bytes of 32-bit signed integer.) - static const RtAudioFormat RTAUDIO_SINT32; // Signed 32-bit integer - static const RtAudioFormat RTAUDIO_FLOAT32; // 32-bit float normalized between +/- 1.0 - static const RtAudioFormat RTAUDIO_FLOAT64; // 64-bit double normalized between +/- 1.0 -\endcode - -The <I>nativeFormats</I> member of the RtAudioDeviceInfo structure is a bit mask of the above formats that are natively supported by the device. However, RtAudio will automatically provide format conversion if a particular format is not natively supported. When the <I>probed</I> member of the RtAudioDeviceInfo structure is false, the remaining structure members are undefined and the device is probably unuseable. - -While some audio devices may require a minimum channel value greater than one, RtAudio will provide automatic channel number compensation when the number of channels set by the user is less than that required by the device. Channel compensation is <I>NOT</I> possible when the number of channels set by the user is greater than that supported by the device. - -It should be noted that the capabilities reported by a device driver or underlying audio API are not always accurate and/or may be dependent on a combination of device settings. For this reason, RtAudio does not typically rely on the queried values when attempting to open a stream. - - -\section settings Device Settings - -The next step in using RtAudio is to open a stream with particular device and parameter settings. - -\code - -#include "RtAudio.h" - -int main() -{ - int channels = 2; - int sampleRate = 44100; - int bufferSize = 256; // 256 sample frames - int nBuffers = 4; // number of internal buffers used by device - int device = 0; // 0 indicates the default or first available device - RtAudio *audio = 0; - - // Instantiate RtAudio and open a stream within a try/catch block - try { - audio = new RtAudio(); - } - catch (RtError &error) { - error.printMessage(); - exit(EXIT_FAILURE); - } - - try { - audio->openStream(device, channels, 0, 0, RTAUDIO_FLOAT32, - sampleRate, &bufferSize, nBuffers); - } - catch (RtError &error) { - error.printMessage(); - // Perhaps try other parameters? - } - - // Clean up - delete audio; - - return 0; -} -\endcode - -The RtAudio::openStream() method attempts to open a stream with a specified set of parameter values. In this case, we attempt to open a two channel playback stream with the default output device, 32-bit floating point data, a sample rate of 44100 Hz, a frame rate of 256 sample frames per read/write, and 4 internal device buffers. When device = 0, RtAudio first attempts to open the default audio device with the given parameters. If that attempt fails, RtAudio searches through the remaining available devices in an effort to find a device that will meet the given parameters. If all attempts are unsuccessful, an RtError is thrown. When a non-zero device value is specified, an attempt is made to open that device \e ONLY (device = 1 specifies the first identified device, as reported by RtAudio::getDeviceInfo()). - -RtAudio provides four signed integer and two floating point data formats that can be specified using the RtAudioFormat parameter values mentioned earlier. If the opened device does not natively support the given format, RtAudio will automatically perform the necessary data format conversion. - -The <I>bufferSize</I> parameter specifies the desired number of sample frames that will be written to and/or read from a device per write/read operation. The <I>nBuffers</I> parameter is used in setting the underlying device buffer parameters. Both the <I>bufferSize</I> and <I>nBuffers</I> parameters can be used to control stream latency though there is no guarantee that the passed values will be those used by a device (the <I>nBuffers</I> parameter is ignored when using the OS X CoreAudio, Linux Jack, and the Windows ASIO APIs). In general, lower values for both parameters will produce less latency but perhaps less robust performance. Both parameters can be specified with values of zero, in which case the smallest allowable values will be used. The <I>bufferSize</I> parameter is passed as a pointer and the actual value used by the stream is set during the device setup procedure. <I>bufferSize</I> values should be a power of two. Optimal and allowable buffer values tend to vary between systems and devices. Check the \ref apinotes section for general guidelines. - -As noted earlier, the device capabilities reported by a driver or underlying audio API are not always accurate and/or may be dependent on a combination of device settings. Because of this, RtAudio does not attempt to query a device's capabilities or use previously reported values when opening a device. Instead, RtAudio simply attempts to set the given parameters on a specified device and then checks whether the setup is successful or not. - - -\section playbackb Playback (blocking functionality) - -Once the device is open for playback, there are only a few final steps necessary for realtime audio output. We'll first provide an example (blocking functionality) and then discuss the details. - -\code -// playback.cpp - -#include "RtAudio.h" - -int main() -{ - int count; - int channels = 2; - int sampleRate = 44100; - int bufferSize = 256; // 256 sample frames - int nBuffers = 4; // number of internal buffers used by device - float *buffer; - int device = 0; // 0 indicates the default or first available device - RtAudio *audio = 0; - - // Open a stream during RtAudio instantiation - try { - audio = new RtAudio(device, channels, 0, 0, RTAUDIO_FLOAT32, - sampleRate, &bufferSize, nBuffers); - } - catch (RtError &error) { - error.printMessage(); - exit(EXIT_FAILURE); - } - - try { - // Get a pointer to the stream buffer - buffer = (float *) audio->getStreamBuffer(); - - // Start the stream - audio->startStream(); - } - catch (RtError &error) { - error.printMessage(); - goto cleanup; - } - - // An example loop that runs for 40000 sample frames - count = 0; - while (count < 40000) { - // Generate your samples and fill the buffer with bufferSize sample frames of data - ... - - // Trigger the output of the data buffer - try { - audio->tickStream(); - } - catch (RtError &error) { - error.printMessage(); - goto cleanup; - } - - count += bufferSize; - } - - try { - // Stop and close the stream - audio->stopStream(); - audio->closeStream(); - } - catch (RtError &error) { - error.printMessage(); - } - - cleanup: - delete audio; - - return 0; -} -\endcode - -The first thing to notice in this example is that we attempt to open a stream during class instantiation with an overloaded constructor. This constructor simply combines the functionality of the default constructor, used earlier, and the RtAudio::openStream() method. Again, we have specified a device value of 0, indicating that the default or first available device meeting the given parameters should be used. An attempt is made to open the stream with the specified <I>bufferSize</I> value. However, it is possible that the device will not accept this value, in which case the closest allowable size is used and returned via the pointer value. The constructor can fail if no available devices are found, or a memory allocation or device driver error occurs. Note that you should not call the RtAudio destructor if an exception is thrown during instantiation. - -Assuming the constructor is successful, it is necessary to get a pointer to the buffer, provided by RtAudio, for use in feeding data to/from the opened stream. Note that the user should <I>NOT</I> attempt to deallocate the stream buffer memory ... memory management for the stream buffer will be automatically controlled by RtAudio. After starting the stream with RtAudio::startStream(), one simply fills that buffer, which is of length equal to the returned <I>bufferSize</I> value, with interleaved audio data (in the specified format) for playback. Finally, a call to the RtAudio::tickStream() routine triggers a blocking write call for the stream. - -In general, one should call the RtAudio::stopStream() and RtAudio::closeStream() methods after finishing with a stream. However, both methods will implicitly be called during object destruction if necessary. - - -\section playbackc Playback (callback functionality) - -The primary difference in using RtAudio with callback functionality involves the creation of a user-defined callback function. Here is an example that produces a sawtooth waveform for playback. - -\code - -#include <iostream> -#include "RtAudio.h" - -// Two-channel sawtooth wave generator. -int sawtooth(char *buffer, int bufferSize, void *data) -{ - int i, j; - double *my_buffer = (double *) buffer; - double *my_data = (double *) data; - - // Write interleaved audio data. - for (i=0; i<bufferSize; i++) { - for (j=0; j<2; j++) { - *my_buffer++ = my_data[j]; - - my_data[j] += 0.005 * (j+1+(j*0.1)); - if (my_data[j] >= 1.0) my_data[j] -= 2.0; - } - } - - return 0; -} - -int main() -{ - int channels = 2; - int sampleRate = 44100; - int bufferSize = 256; // 256 sample frames - int nBuffers = 4; // number of internal buffers used by device - int device = 0; // 0 indicates the default or first available device - double data[2]; - char input; - RtAudio *audio = 0; - - // Open a stream during RtAudio instantiation - try { - audio = new RtAudio(device, channels, 0, 0, RTAUDIO_FLOAT64, - sampleRate, &bufferSize, nBuffers); - } - catch (RtError &error) { - error.printMessage(); - exit(EXIT_FAILURE); - } - - try { - // Set the stream callback function - audio->setStreamCallback(&sawtooth, (void *)data); - - // Start the stream - audio->startStream(); - } - catch (RtError &error) { - error.printMessage(); - goto cleanup; - } - - std::cout << "\nPlaying ... press <enter> to quit.\n"; - std::cin.get(input); - - try { - // Stop and close the stream - audio->stopStream(); - audio->closeStream(); - } - catch (RtError &error) { - error.printMessage(); - } - - cleanup: - delete audio; - - return 0; -} -\endcode - -After opening the device in exactly the same way as the previous example (except with a data format change), we must set our callback function for the stream using RtAudio::setStreamCallback(). When the underlying audio API uses blocking calls (OSS, ALSA, SGI, and Windows DirectSound), this method will spawn a new process (or thread) that automatically calls the callback function when more data is needed. Callback-based audio APIs (OS X CoreAudio Linux Jack, and ASIO) implement their own event notification schemes. Note that the callback function is called only when the stream is "running" (between calls to the RtAudio::startStream() and RtAudio::stopStream() methods). The last argument to RtAudio::setStreamCallback() is a pointer to arbitrary data that you wish to access from within your callback function. - -In this example, we stop the stream with an explicit call to RtAudio::stopStream(). When using callback functionality, it is also possible to stop a stream by returning a non-zero value from the callback function. - -Once set with RtAudio::setStreamCallback, the callback process exists for the life of the stream (until the stream is closed with RtAudio::closeStream() or the RtAudio instance is deleted). It is possible to disassociate a callback function and cancel its process for an open stream using the RtAudio::cancelStreamCallback() method. The stream can then be used with blocking functionality or a new callback can be associated with it. - - -\section recording Recording - -Using RtAudio for audio input is almost identical to the way it is used for playback. Here's the blocking playback example rewritten for recording: - -\code -// record.cpp - -#include "RtAudio.h" - -int main() -{ - int count; - int channels = 2; - int sampleRate = 44100; - int bufferSize = 256; // 256 sample frames - int nBuffers = 4; // number of internal buffers used by device - float *buffer; - int device = 0; // 0 indicates the default or first available device - RtAudio *audio = 0; - - // Instantiate RtAudio and open a stream. - try { - audio = new RtAudio(&stream, 0, 0, device, channels, - RTAUDIO_FLOAT32, sampleRate, &bufferSize, nBuffers); - } - catch (RtError &error) { - error.printMessage(); - exit(EXIT_FAILURE); - } - - try { - // Get a pointer to the stream buffer - buffer = (float *) audio->getStreamBuffer(); - - // Start the stream - audio->startStream(); - } - catch (RtError &error) { - error.printMessage(); - goto cleanup; - } - - // An example loop that runs for about 40000 sample frames - count = 0; - while (count < 40000) { - - // Read a buffer of data - try { - audio->tickStream(); - } - catch (RtError &error) { - error.printMessage(); - goto cleanup; - } - - // Process the input samples (bufferSize sample frames) that were read - ... - - count += bufferSize; - } - - try { - // Stop the stream - audio->stopStream(); - } - catch (RtError &error) { - error.printMessage(); - } - - cleanup: - delete audio; - - return 0; -} -\endcode - -In this example, the stream was opened for recording with a non-zero <I>inputChannels</I> value. The only other difference between this example and that for playback involves the order of data processing in the loop, where it is necessary to first read a buffer of input data before manipulating it. - - -\section duplex Duplex Mode - -Finally, it is easy to use RtAudio for simultaneous audio input/output, or duplex operation. In this example, we use a callback function and simply scale the input data before sending it back to the output. - -\code -// duplex.cpp - -#include <iostream> -#include "RtAudio.h" - -// Pass-through function. -int scale(char *buffer, int bufferSize, void *) -{ - // Note: do nothing here for pass through. - double *my_buffer = (double *) buffer; - - // Scale input data for output. - for (int i=0; i<bufferSize; i++) { - // Do for two channels. - *my_buffer++ *= 0.5; - *my_buffer++ *= 0.5; - } - - return 0; -} - -int main() -{ - int channels = 2; - int sampleRate = 44100; - int bufferSize = 256; // 256 sample frames - int nBuffers = 4; // number of internal buffers used by device - int device = 0; // 0 indicates the default or first available device - char input; - RtAudio *audio = 0; - - // Open a stream during RtAudio instantiation - try { - audio = new RtAudio(device, channels, device, channels, RTAUDIO_FLOAT64, - sampleRate, &bufferSize, nBuffers); - } - catch (RtError &error) { - error.printMessage(); - exit(EXIT_FAILURE); - } - - try { - // Set the stream callback function - audio->setStreamCallback(&scale, NULL); - - // Start the stream - audio->startStream(); - } - catch (RtError &error) { - error.printMessage(); - goto cleanup; - } - - std::cout << "\nRunning duplex ... press <enter> to quit.\n"; - std::cin.get(input); - - try { - // Stop and close the stream - audio->stopStream(); - audio->closeStream(); - } - catch (RtError &error) { - error.printMessage(); - } - - cleanup: - delete audio; - - return 0; -} -\endcode - -When an RtAudio stream is running in duplex mode (nonzero input <I>AND</I> output channels), the audio write (playback) operation always occurs before the audio read (record) operation. This sequence allows the use of a single buffer to store both output and input data. - -As we see with this example, the write-read sequence of operations does not preclude the use of RtAudio in situations where input data is first processed and then output through a duplex stream. When the stream buffer is first allocated, it is initialized with zeros, which produces no audible result when output to the device. In this example, anything recorded by the audio stream input will be scaled and played out during the next round of audio processing. - -Note that duplex operation can also be achieved by opening one output stream instance and one input stream instance using the same or different devices. However, there may be timing problems when attempting to use two different devices, due to possible device clock variations, unless a common external "sync" is provided. This becomes even more difficult to achieve using two separate callback streams because it is not possible to <I>explicitly</I> control the calling order of the callback functions. - - -\section multi Using Simultaneous Multiple APIs - -Because support for each audio API is encapsulated in a specific RtApi subclass, it is possible to compile and instantiate multiple API-specific subclasses on a given operating system. For example, one can compile both the RtApiDs and RtApiAsio classes on Windows operating systems by providing the appropriate preprocessor definitions, include files, and libraries for each. In a run-time situation, one might first attempt to determine whether any ASIO device drivers exist. This can be done by specifying the api argument RtAudio::WINDOWS_ASIO when attempting to create an instance of RtAudio. If an RtError is thrown (indicating no available drivers), then an instance of RtAudio with the api argument RtAudio::WINDOWS_DS can be created. Alternately, if no api argument is specified, RtAudio will first look for ASIO drivers and then DirectSound drivers (on Linux systems, the default API search order is Jack, Alsa, and finally OSS). In theory, it should also be possible to have separate instances of RtAudio open at the same time with different underlying audio API support, though this has not been tested. It is difficult to know how well different audio APIs can simultaneously coexist on a given operating system. In particular, it is most unlikely that the same device could be simultaneously controlled with two different audio APIs. - - -\section methods Summary of Methods - -The following is a short summary of public methods (not including constructors and the destructor) provided by RtAudio: - -<UL> -<LI>RtAudio::openStream(): opens a stream with the specified parameters.</LI> -<LI>RtAudio::setStreamCallback(): sets a user-defined callback function for the stream.</LI> -<LI>RtAudio::cancelStreamCallback(): cancels a callback process and function for the stream.</LI> -<LI>RtAudio::getDeviceCount(): returns the number of audio devices available.</LI> -<LI>RtAudio::getDeviceInfo(): returns an RtAudioDeviceInfo structure for a specified device.</LI> -<LI>RtAudio::getStreamBuffer(): returns a pointer to the stream buffer.</LI> -<LI>RtAudio::tickStream(): triggers processing of input/output data for the stream (blocking).</LI> -<LI>RtAudio::closeStream(): closes the stream (implicitly called during object destruction).</LI> -<LI>RtAudio::startStream(): (re)starts the stream, typically after it has been stopped with either stopStream() or abortStream() or after first opening the stream.</LI> -<LI>RtAudio::stopStream(): stops the stream, allowing any remaining samples in the queue to be played out and/or read in. This does not implicitly call RtAudio::closeStream().</LI> -<LI>RtAudio::abortStream(): stops the stream, discarding any remaining samples in the queue. This does not implicitly call closeStream().</LI> -</UL> - - -\section compiling Compiling - -In order to compile RtAudio for a specific OS and audio API, it is necessary to supply the appropriate preprocessor definition and library within the compiler statement: -<P> - -<TABLE BORDER=2 COLS=5 WIDTH="100%"> -<TR BGCOLOR="beige"> - <TD WIDTH="5%"><B>OS:</B></TD> - <TD WIDTH="5%"><B>Audio API:</B></TD> - <TD WIDTH="5%"><B>C++ Class:</B></TD> - <TD WIDTH="5%"><B>Preprocessor Definition:</B></TD> - <TD WIDTH="5%"><B>Library or Framework:</B></TD> - <TD><B>Example Compiler Statement:</B></TD> -</TR> -<TR> - <TD>Linux</TD> - <TD>ALSA</TD> - <TD>RtApiAlsa</TD> - <TD>__LINUX_ALSA__</TD> - <TD><TT>asound, pthread</TT></TD> - <TD><TT>g++ -Wall -D__LINUX_ALSA__ -o probe probe.cpp RtAudio.cpp -lasound -lpthread</TT></TD> -</TR> -<TR> - <TD>Linux</TD> - <TD>Jack Audio Server</TD> - <TD>RtApiJack</TD> - <TD>__LINUX_JACK__</TD> - <TD><TT>jack, pthread</TT></TD> - <TD><TT>g++ -Wall -D__LINUX_JACK__ -o probe probe.cpp RtAudio.cpp `pkg-config --cflags --libs jack` -lpthread</TT></TD> -</TR> -<TR> - <TD>Linux</TD> - <TD>OSS</TD> - <TD>RtApiOss</TD> - <TD>__LINUX_OSS__</TD> - <TD><TT>pthread</TT></TD> - <TD><TT>g++ -Wall -D__LINUX_OSS__ -o probe probe.cpp RtAudio.cpp -lpthread</TT></TD> -</TR> -<TR> - <TD>Macintosh OS X</TD> - <TD>CoreAudio</TD> - <TD>RtApiCore</TD> - <TD>__MACOSX_CORE__</TD> - <TD><TT>pthread, stdc++, CoreAudio</TT></TD> - <TD><TT>g++ -Wall -D__MACOSX_CORE__ -o probe probe.cpp RtAudio.cpp -framework CoreAudio -lpthread</TT></TD> -</TR> -<TR> - <TD>Irix</TD> - <TD>AL</TD> - <TD>RtApiAl</TD> - <TD>__IRIX_AL__</TD> - <TD><TT>audio, pthread</TT></TD> - <TD><TT>CC -Wall -D__IRIX_AL__ -o probe probe.cpp RtAudio.cpp -laudio -lpthread</TT></TD> -</TR> -<TR> - <TD>Windows</TD> - <TD>Direct Sound</TD> - <TD>RtApiDs</TD> - <TD>__WINDOWS_DS__</TD> - <TD><TT>dsound.lib (ver. 5.0 or higher), multithreaded</TT></TD> - <TD><I>compiler specific</I></TD> -</TR> -<TR> - <TD>Windows</TD> - <TD>ASIO</TD> - <TD>RtApiAsio</TD> - <TD>__WINDOWS_ASIO__</TD> - <TD><I>various ASIO header and source files</I></TD> - <TD><I>compiler specific</I></TD> -</TR> -</TABLE> -<P> - -The example compiler statements above could be used to compile the <TT>probe.cpp</TT> example file, assuming that <TT>probe.cpp</TT>, <TT>RtAudio.h</TT>, <tt>RtError.h</tt>, and <TT>RtAudio.cpp</TT> all exist in the same directory. - -\section debug Debugging - -If you are having problems getting RtAudio to run on your system, try passing the preprocessor definition <TT>__RTAUDIO_DEBUG__</TT> to the compiler (or uncomment the definition at the bottom of RtAudio.h). A variety of warning messages will be displayed that may help in determining the problem. Also try using the programs included in the <tt>test</tt> directory. The program <tt>info</tt> displays the queried capabilities of all hardware devices found. - -\section apinotes API Notes - -RtAudio is designed to provide a common API across the various supported operating systems and audio libraries. Despite that, some issues should be mentioned with regard to each. - -\subsection linux Linux: - -RtAudio for Linux was developed under Redhat distributions 7.0 - Fedora. Three different audio APIs are supported on Linux platforms: OSS, <A href="http://www.alsa-project.org/">ALSA</A>, and <A href="http://jackit.sourceforge.net/">Jack</A>. The OSS API has existed for at least 6 years and the Linux kernel is distributed with free versions of OSS audio drivers. Therefore, a generic Linux system is most likely to have OSS support (though the availability and quality of OSS drivers for new hardware is decreasing). The ALSA API, although relatively new, is now part of the Linux development kernel and offers significantly better functionality than the OSS API. RtAudio provides support for the 1.0 and higher versions of ALSA. Jack, which is still in development, is a low-latency audio server, written primarily for the GNU/Linux operating system. It can connect a number of different applications to an audio device, as well as allow them to share audio between themselves. Input/output latency on the order of 15 milliseconds can typically be achieved using any of the Linux APIs by fine-tuning the RtAudio buffer parameters (without kernel modifications). Latencies on the order of 5 milliseconds or less can be achieved using a low-latency kernel patch and increasing FIFO scheduling priority. The pthread library, which is used for callback functionality, is a standard component of all Linux distributions. - -The ALSA library includes OSS emulation support. That means that you can run programs compiled for the OSS API even when using the ALSA drivers and library. It should be noted however that OSS emulation under ALSA is not perfect. Specifically, channel number queries seem to consistently produce invalid results. While OSS emulation is successful for the majority of RtAudio tests, it is recommended that the native ALSA implementation of RtAudio be used on systems that have ALSA drivers installed. - -The ALSA implementation of RtAudio makes no use of the ALSA "plug" interface. All necessary data format conversions, channel compensation, de-interleaving, and byte-swapping is handled by internal RtAudio routines. - -The Jack API is based on a callback scheme. RtAudio provides blocking functionality, in addition to callback functionality, within the context of that behavior. It should be noted, however, that the best performance is achieved when using RtAudio's callback functionality with the Jack API. At the moment, only one RtAudio instance can be connected to the Jack server. Because RtAudio does not provide a mechanism for allowing the user to specify particular channels (or ports) of a device, it simply opens the first <I>N</I> enumerated Jack ports for input/output. - -\subsection macosx Macintosh OS X (CoreAudio): - -The Apple CoreAudio API is based on a callback scheme. RtAudio provides blocking functionality, in addition to callback functionality, within the context of that behavior. CoreAudio is designed to use a separate callback procedure for each of its audio devices. A single RtAudio duplex stream using two different devices is supported, though it cannot be guaranteed to always behave correctly because we cannot synchronize these two callbacks. This same functionality might be achieved with better synchrony by creating separate instances of RtAudio for each device and making use of RtAudio blocking calls (i.e. RtAudio::tickStream()). The <I>numberOfBuffers</I> parameter to the RtAudio::openStream() function has no affect in this implementation. - -It is not possible to have multiple instances of RtAudio accessing the same CoreAudio device. - -\subsection irix Irix (SGI): - -The Irix version of RtAudio was written and tested on an SGI Indy running Irix version 6.5.4 and the newer "al" audio library. RtAudio does not compile under Irix version 6.3, mainly because the C++ compiler is too old. Despite the relatively slow speed of the Indy, RtAudio was found to behave quite well and input/output latency was very good. No problems were found with respect to using the pthread library. - -\subsection windowsds Windows (DirectSound): - -In order to compile RtAudio under Windows for the DirectSound API, you must have the header and source files for DirectSound version 5.0 or higher. As far as I know, there is no DirectSoundCapture support for Windows NT. Audio output latency with DirectSound can be reasonably good, especially since RtAudio version 3.0.2. Input audio latency still tends to be bad but better since version 3.0.2. RtAudio was originally developed with Visual C++ version 6.0 but has been tested with .NET. - -The DirectSound version of RtAudio can be compiled with or without the UNICODE preprocessor definition. - -\subsection windowsasio Windows (ASIO): - -The Steinberg ASIO audio API is based on a callback scheme. In addition, the API allows only a single device driver to be loaded and accessed at a time. ASIO device drivers must be supplied by audio hardware manufacturers, though ASIO emulation is possible on top of systems with DirectSound drivers. The <I>numberOfBuffers</I> parameter to the RtAudio::openStream() function has no affect in this implementation. - -A number of ASIO source and header files are required for use with RtAudio. Specifically, an RtAudio project must include the following files: <TT>asio.h,cpp; asiodrivers.h,cpp; asiolist.h,cpp; asiodrvr.h; asiosys.h; ginclude.h; iasiodrv.h; iasiothiscallresolver.h,cpp</TT>. The Visual C++ projects found in <TT>/tests/Windows/</TT> compile both ASIO and DirectSound support. - -The Steinberg provided <TT>asiolist</TT> class does not compile when the preprocessor definition UNICODE is defined. Note that this could be an issue when using RtAudio with Qt, though Qt programs appear to compile without the UNICODE definition (try <tt>DEFINES -= UNICODE</tt> in your .pro file). RtAudio with ASIO support has been tested using the MinGW compiler under Windows XP, as well as in the Visual Studio environment. - -\section wishlist Possible Future Changes - -There are a few issues that still need to be addressed in future versions of RtAudio, including: - -<ul> -<li>Provide a mechanism so the user can "pre-fill" audio output buffers to allow precise measurement of an acoustic response;</li> -<li>Allow the user to read / write non-interleaved data to / from the audio buffer;</li> -<li>Further support in Windows OS for multi-channel (>2) input / output. This is currently only possible with ASIO interface (in large part due to limitations with the DirectSound API). But perhaps a port to the WinMM API should be investigated?</li> -<li>Investigate the possibility of allowing the user to select specific channels of a soundcard. For example, if an audio device supports 8 channels and the user wishes to send data out channels 7-8 only, it is currently necessary to open all 8 channels and write the two channels of output data to the correct positions in each audio frame of an interleaved data buffer.</li> -</ul> - -\section acknowledge Acknowledgements - -Many thanks to the following people for providing bug fixes and improvements: -<UL> -<LI>Robin Davies (Windows DS and ASIO)</LI> -<LI>Ryan Williams (Windows non-MS compiler ASIO support)</LI> -<LI>Ed Wildgoose (Linux ALSA and Jack)</LI> -</UL> - -The RtAudio API incorporates many of the concepts developed in the <A -href="http://www.portaudio.com/">PortAudio</A> project by Phil Burk -and Ross Bencina. Early development also incorporated ideas from Bill -Schottstaedt's <A -href="http://www-ccrma.stanford.edu/software/snd/sndlib/">sndlib</A>. -The CCRMA <A -href="http://www-ccrma.stanford.edu/groups/soundwire/">SoundWire -group</A> provided valuable feedback during the API proposal stages. - -The early 2.0 version of RtAudio was slowly developed over the course -of many months while in residence at the <A -href="http://www.iua.upf.es/">Institut Universitari de L'Audiovisual -(IUA)</A> in Barcelona, Spain and the <A -href="http://www.acoustics.hut.fi/">Laboratory of Acoustics and Audio -Signal Processing</A> at the Helsinki University of Technology, -Finland. Much subsequent development happened while working at the <A -href="http://www-ccrma.stanford.edu/">Center for Computer Research in -Music and Acoustics (CCRMA)</A> at <A -href="http://www.stanford.edu/">Stanford University</A>. The most -recent version of RtAudio was finished while working as an assistant -professor of <a href="http://www.music.mcgill.ca/musictech/">Music -Technology</a> at <a href="http://www.mcgill.ca/">McGill -University</a>. This work was supported in part by the United States -Air Force Office of Scientific Research (grant \#F49620-99-1-0293). - -\section license License - - RtAudio: a realtime audio i/o C++ classes<BR> - Copyright (c) 2001-2005 Gary P. Scavone - - Permission is hereby granted, free of charge, to any person - obtaining a copy of this software and associated documentation files - (the "Software"), to deal in the Software without restriction, - including without limitation the rights to use, copy, modify, merge, - publish, distribute, sublicense, and/or sell copies of the Software, - and to permit persons to whom the Software is furnished to do so, - subject to the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - Any person wishing to distribute modifications to the Software is - requested to send the modifications to the original developer so that - they can be incorporated into the canonical version. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR - ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF - CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +Latest Release (7 August 2007): <A href="http://music.mcgill.ca/~gary/rtaudio/release/rtaudio-4.0.0.tar.gz">Version 4.0.0</A> + +\section documentation Documentation Links + +-# \ref errors +-# \ref probe +-# \ref settings +-# \ref playback +-# \ref recording +-# \ref duplex +-# \ref multi +-# \ref compiling +-# \ref apinotes +-# \ref acknowledge +-# \ref license +-# <A href="bugs.html">Bug Tracker</A> +-# <A href="updates.html">Possible Updates</A> +-# <A href="http://sourceforge.net/projects/rtaudio">RtAudio at SourceForge</A> */ diff --git a/doc/release.txt b/doc/release.txt index 939501c..522d012 100644 --- a/doc/release.txt +++ b/doc/release.txt @@ -1,12 +1,27 @@ -RtAudio - a set of C++ classes which provide a common API for realtime audio input/output across Linux (native ALSA, JACK, and OSS), SGI, Macintosh OS X (CoreAudio), and Windows (DirectSound and ASIO) operating systems. +RtAudio - a set of C++ classes that provide a common API for realtime audio input/output across Linux (native ALSA, JACK, and OSS), Macintosh OS X (CoreAudio and JACK), and Windows (DirectSound and ASIO) operating systems. -By Gary P. Scavone, 2001-2005. +By Gary P. Scavone, 2001-2007. -v3.0.3: ( November 2005) +v4.0.0: (7 August 2007) +- new support for non-interleaved user data +- additional input/output parameter specifications, including channel offset +- new support for dynamic connection of devices +- new support for stream time +- revised callback arguments, including separate input and output buffer arguments +- revised C++ exception handling +- revised OSS support for version 4.0 +- discontinued support of blocking functionality +- discontinued support of SGI +- Windows DirectSound API bug fix +- NetBSD support (using OSS API) by Emmanuel Dreyfus +- changed default pthread scheduling priority to SCHED_RR when defined in the system +- new getCompiledApi() static function +- new getCurrentApi(), getStreamTime(), getStreamLatency(), and isStreamRunning() functions +- modified RtAudioDeviceInfo structure to distinguish default input and output devices + +v3.0.3: (18 November 2005) - UNICODE fix for Windows DirectSound API - MinGW compiler fix for ASIO API -- jack support to create virtual devices for each jack plugin -- support to prefill output buffer with zeroes in duplex mode v3.0.2: (14 October 2005) - modification of ALSA read/write order to fix duplex under/overruns |
