-# Doxyfile 1.4.6\r
-\r
-#---------------------------------------------------------------------------\r
-# Project related configuration options\r
-#---------------------------------------------------------------------------\r
-PROJECT_NAME = PortAudio\r
-PROJECT_NUMBER = 2.0\r
-OUTPUT_DIRECTORY = ./doc/\r
-CREATE_SUBDIRS = NO\r
-OUTPUT_LANGUAGE = English\r
-USE_WINDOWS_ENCODING = NO\r
-BRIEF_MEMBER_DESC = YES\r
-REPEAT_BRIEF = YES\r
-ABBREVIATE_BRIEF = "The $name class" \\r
- "The $name widget" \\r
- "The $name file" \\r
- is \\r
- provides \\r
- specifies \\r
- contains \\r
- represents \\r
- a \\r
- an \\r
- the\r
-ALWAYS_DETAILED_SEC = NO\r
-INLINE_INHERITED_MEMB = NO\r
-FULL_PATH_NAMES = NO\r
-STRIP_FROM_PATH = \r
-STRIP_FROM_INC_PATH = \r
-SHORT_NAMES = NO\r
-JAVADOC_AUTOBRIEF = NO\r
-MULTILINE_CPP_IS_BRIEF = NO\r
-DETAILS_AT_TOP = NO\r
-INHERIT_DOCS = YES\r
-SEPARATE_MEMBER_PAGES = NO\r
-TAB_SIZE = 8\r
-ALIASES = \r
-OPTIMIZE_OUTPUT_FOR_C = YES\r
-OPTIMIZE_OUTPUT_JAVA = NO\r
-BUILTIN_STL_SUPPORT = NO\r
-DISTRIBUTE_GROUP_DOC = NO\r
-SUBGROUPING = YES\r
-#---------------------------------------------------------------------------\r
-# Build related configuration options\r
-#---------------------------------------------------------------------------\r
-EXTRACT_ALL = YES\r
-EXTRACT_PRIVATE = NO\r
-EXTRACT_STATIC = NO\r
-EXTRACT_LOCAL_CLASSES = YES\r
-EXTRACT_LOCAL_METHODS = NO\r
-HIDE_UNDOC_MEMBERS = NO\r
-HIDE_UNDOC_CLASSES = NO\r
-HIDE_FRIEND_COMPOUNDS = NO\r
-HIDE_IN_BODY_DOCS = NO\r
-INTERNAL_DOCS = YES\r
-CASE_SENSE_NAMES = YES\r
-HIDE_SCOPE_NAMES = NO\r
-SHOW_INCLUDE_FILES = YES\r
-INLINE_INFO = YES\r
-SORT_MEMBER_DOCS = YES\r
-SORT_BRIEF_DOCS = NO\r
-SORT_BY_SCOPE_NAME = NO\r
-GENERATE_TODOLIST = YES\r
-GENERATE_TESTLIST = YES\r
-GENERATE_BUGLIST = YES\r
-GENERATE_DEPRECATEDLIST= YES\r
-ENABLED_SECTIONS = INTERNAL\r
-MAX_INITIALIZER_LINES = 30\r
-SHOW_USED_FILES = YES\r
-SHOW_DIRECTORIES = YES\r
-FILE_VERSION_FILTER = \r
-#---------------------------------------------------------------------------\r
-# configuration options related to warning and progress messages\r
-#---------------------------------------------------------------------------\r
-QUIET = NO\r
-WARNINGS = YES\r
-WARN_IF_UNDOCUMENTED = YES\r
-WARN_IF_DOC_ERROR = YES\r
-WARN_NO_PARAMDOC = NO\r
-WARN_FORMAT = "$file:$line: $text"\r
-WARN_LOGFILE = \r
-#---------------------------------------------------------------------------\r
-# configuration options related to the input files\r
-#---------------------------------------------------------------------------\r
-INPUT = doc/src \\r
- include \\r
- examples \ \r
- src \\r
- test \\r
- qa\r
-FILE_PATTERNS = *.h \\r
- *.c \\r
- *.cpp \\r
- *.java \\r
- *.dox\r
-RECURSIVE = YES\r
-EXCLUDE = src/hostapi/wasapi/mingw-include\r
-EXCLUDE_SYMLINKS = NO\r
-EXCLUDE_PATTERNS = \r
-EXAMPLE_PATH = \r
-EXAMPLE_PATTERNS = \r
-EXAMPLE_RECURSIVE = NO\r
-IMAGE_PATH = doc/src/images\r
-INPUT_FILTER = \r
-FILTER_PATTERNS = \r
-FILTER_SOURCE_FILES = NO\r
-#---------------------------------------------------------------------------\r
-# configuration options related to source browsing\r
-#---------------------------------------------------------------------------\r
-SOURCE_BROWSER = NO\r
-INLINE_SOURCES = NO\r
-STRIP_CODE_COMMENTS = YES\r
-REFERENCED_BY_RELATION = YES\r
-REFERENCES_RELATION = YES\r
-USE_HTAGS = NO\r
-VERBATIM_HEADERS = YES\r
-#---------------------------------------------------------------------------\r
-# configuration options related to the alphabetical class index\r
-#---------------------------------------------------------------------------\r
-ALPHABETICAL_INDEX = NO\r
-COLS_IN_ALPHA_INDEX = 5\r
-IGNORE_PREFIX = \r
-#---------------------------------------------------------------------------\r
-# configuration options related to the HTML output\r
-#---------------------------------------------------------------------------\r
-GENERATE_HTML = YES\r
-HTML_OUTPUT = html\r
-HTML_FILE_EXTENSION = .html\r
-HTML_HEADER = \r
-HTML_FOOTER = \r
-HTML_STYLESHEET = \r
-HTML_ALIGN_MEMBERS = YES\r
-GENERATE_HTMLHELP = NO\r
-CHM_FILE = \r
-HHC_LOCATION = \r
-GENERATE_CHI = NO\r
-BINARY_TOC = NO\r
-TOC_EXPAND = NO\r
-DISABLE_INDEX = NO\r
-ENUM_VALUES_PER_LINE = 4\r
-GENERATE_TREEVIEW = NO\r
-TREEVIEW_WIDTH = 250\r
-#---------------------------------------------------------------------------\r
-# configuration options related to the LaTeX output\r
-#---------------------------------------------------------------------------\r
-GENERATE_LATEX = NO\r
-LATEX_OUTPUT = latex\r
-LATEX_CMD_NAME = latex\r
-MAKEINDEX_CMD_NAME = makeindex\r
-COMPACT_LATEX = NO\r
-PAPER_TYPE = a4wide\r
-EXTRA_PACKAGES = \r
-LATEX_HEADER = \r
-PDF_HYPERLINKS = NO\r
-USE_PDFLATEX = NO\r
-LATEX_BATCHMODE = NO\r
-LATEX_HIDE_INDICES = NO\r
-#---------------------------------------------------------------------------\r
-# configuration options related to the RTF output\r
-#---------------------------------------------------------------------------\r
-GENERATE_RTF = NO\r
-RTF_OUTPUT = rtf\r
-COMPACT_RTF = NO\r
-RTF_HYPERLINKS = NO\r
-RTF_STYLESHEET_FILE = \r
-RTF_EXTENSIONS_FILE = \r
-#---------------------------------------------------------------------------\r
-# configuration options related to the man page output\r
-#---------------------------------------------------------------------------\r
-GENERATE_MAN = NO\r
-MAN_OUTPUT = man\r
-MAN_EXTENSION = .3\r
-MAN_LINKS = NO\r
-#---------------------------------------------------------------------------\r
-# configuration options related to the XML output\r
-#---------------------------------------------------------------------------\r
-GENERATE_XML = NO\r
-XML_OUTPUT = xml\r
-XML_SCHEMA = \r
-XML_DTD = \r
-XML_PROGRAMLISTING = YES\r
-#---------------------------------------------------------------------------\r
-# configuration options for the AutoGen Definitions output\r
-#---------------------------------------------------------------------------\r
-GENERATE_AUTOGEN_DEF = NO\r
-#---------------------------------------------------------------------------\r
-# configuration options related to the Perl module output\r
-#---------------------------------------------------------------------------\r
-GENERATE_PERLMOD = NO\r
-PERLMOD_LATEX = NO\r
-PERLMOD_PRETTY = YES\r
-PERLMOD_MAKEVAR_PREFIX = \r
-#---------------------------------------------------------------------------\r
-# Configuration options related to the preprocessor \r
-#---------------------------------------------------------------------------\r
-ENABLE_PREPROCESSING = YES\r
-MACRO_EXPANSION = NO\r
-EXPAND_ONLY_PREDEF = NO\r
-SEARCH_INCLUDES = YES\r
-INCLUDE_PATH = \r
-INCLUDE_FILE_PATTERNS = \r
-PREDEFINED = \r
-EXPAND_AS_DEFINED = \r
-SKIP_FUNCTION_MACROS = YES\r
-#---------------------------------------------------------------------------\r
-# Configuration::additions related to external references \r
-#---------------------------------------------------------------------------\r
-TAGFILES = \r
-GENERATE_TAGFILE = \r
-ALLEXTERNALS = NO\r
-EXTERNAL_GROUPS = YES\r
-PERL_PATH = /usr/bin/perl\r
-#---------------------------------------------------------------------------\r
-# Configuration options related to the dot tool \r
-#---------------------------------------------------------------------------\r
-CLASS_DIAGRAMS = NO\r
-HIDE_UNDOC_RELATIONS = NO\r
-HAVE_DOT = NO\r
-CLASS_GRAPH = YES\r
-COLLABORATION_GRAPH = YES\r
-GROUP_GRAPHS = YES\r
-UML_LOOK = NO\r
-TEMPLATE_RELATIONS = YES\r
-INCLUDE_GRAPH = YES\r
-INCLUDED_BY_GRAPH = YES\r
-CALL_GRAPH = NO\r
-GRAPHICAL_HIERARCHY = YES\r
-DIRECTORY_GRAPH = YES\r
-DOT_IMAGE_FORMAT = png\r
-DOT_PATH = \r
-DOTFILE_DIRS = \r
-MAX_DOT_GRAPH_WIDTH = 1024\r
-MAX_DOT_GRAPH_HEIGHT = 1024\r
-MAX_DOT_GRAPH_DEPTH = 1000\r
-DOT_TRANSPARENT = NO\r
-DOT_MULTI_TARGETS = NO\r
-GENERATE_LEGEND = YES\r
-DOT_CLEANUP = YES\r
-#---------------------------------------------------------------------------\r
-# Configuration::additions related to the search engine \r
-#---------------------------------------------------------------------------\r
-SEARCHENGINE = NO\r
+# Doxyfile 1.4.6
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = PortAudio
+PROJECT_NUMBER = 2.0
+OUTPUT_DIRECTORY = ./doc/
+CREATE_SUBDIRS = NO
+OUTPUT_LANGUAGE = English
+USE_WINDOWS_ENCODING = NO
+BRIEF_MEMBER_DESC = YES
+REPEAT_BRIEF = YES
+ABBREVIATE_BRIEF = "The $name class" \
+ "The $name widget" \
+ "The $name file" \
+ is \
+ provides \
+ specifies \
+ contains \
+ represents \
+ a \
+ an \
+ the
+ALWAYS_DETAILED_SEC = NO
+INLINE_INHERITED_MEMB = NO
+FULL_PATH_NAMES = NO
+STRIP_FROM_PATH =
+STRIP_FROM_INC_PATH =
+SHORT_NAMES = NO
+JAVADOC_AUTOBRIEF = NO
+MULTILINE_CPP_IS_BRIEF = NO
+DETAILS_AT_TOP = NO
+INHERIT_DOCS = YES
+SEPARATE_MEMBER_PAGES = NO
+TAB_SIZE = 8
+ALIASES =
+OPTIMIZE_OUTPUT_FOR_C = YES
+OPTIMIZE_OUTPUT_JAVA = NO
+BUILTIN_STL_SUPPORT = NO
+DISTRIBUTE_GROUP_DOC = NO
+SUBGROUPING = YES
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+EXTRACT_ALL = YES
+EXTRACT_PRIVATE = NO
+EXTRACT_STATIC = NO
+EXTRACT_LOCAL_CLASSES = YES
+EXTRACT_LOCAL_METHODS = NO
+HIDE_UNDOC_MEMBERS = NO
+HIDE_UNDOC_CLASSES = NO
+HIDE_FRIEND_COMPOUNDS = NO
+HIDE_IN_BODY_DOCS = NO
+INTERNAL_DOCS = YES
+CASE_SENSE_NAMES = YES
+HIDE_SCOPE_NAMES = NO
+SHOW_INCLUDE_FILES = YES
+INLINE_INFO = YES
+SORT_MEMBER_DOCS = YES
+SORT_BRIEF_DOCS = NO
+SORT_BY_SCOPE_NAME = NO
+GENERATE_TODOLIST = YES
+GENERATE_TESTLIST = YES
+GENERATE_BUGLIST = YES
+GENERATE_DEPRECATEDLIST= YES
+ENABLED_SECTIONS = INTERNAL
+MAX_INITIALIZER_LINES = 30
+SHOW_USED_FILES = YES
+SHOW_DIRECTORIES = YES
+FILE_VERSION_FILTER =
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+QUIET = NO
+WARNINGS = YES
+WARN_IF_UNDOCUMENTED = YES
+WARN_IF_DOC_ERROR = YES
+WARN_NO_PARAMDOC = NO
+WARN_FORMAT = "$file:$line: $text"
+WARN_LOGFILE =
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = doc/src \
+ include \
+ examples \
+ src \
+ test \
+ qa
+FILE_PATTERNS = *.h \
+ *.c \
+ *.cpp \
+ *.java \
+ *.dox
+RECURSIVE = YES
+EXCLUDE = src/hostapi/wasapi/mingw-include
+EXCLUDE_SYMLINKS = NO
+EXCLUDE_PATTERNS =
+EXAMPLE_PATH =
+EXAMPLE_PATTERNS =
+EXAMPLE_RECURSIVE = NO
+IMAGE_PATH = doc/src/images
+INPUT_FILTER =
+FILTER_PATTERNS =
+FILTER_SOURCE_FILES = NO
+#---------------------------------------------------------------------------
+# configuration options related to source browsing
+#---------------------------------------------------------------------------
+SOURCE_BROWSER = NO
+INLINE_SOURCES = NO
+STRIP_CODE_COMMENTS = YES
+REFERENCED_BY_RELATION = YES
+REFERENCES_RELATION = YES
+USE_HTAGS = NO
+VERBATIM_HEADERS = YES
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+ALPHABETICAL_INDEX = NO
+COLS_IN_ALPHA_INDEX = 5
+IGNORE_PREFIX =
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+GENERATE_HTML = YES
+HTML_OUTPUT = html
+HTML_FILE_EXTENSION = .html
+HTML_HEADER =
+HTML_FOOTER =
+HTML_STYLESHEET =
+HTML_ALIGN_MEMBERS = YES
+GENERATE_HTMLHELP = NO
+CHM_FILE =
+HHC_LOCATION =
+GENERATE_CHI = NO
+BINARY_TOC = NO
+TOC_EXPAND = NO
+DISABLE_INDEX = NO
+ENUM_VALUES_PER_LINE = 4
+GENERATE_TREEVIEW = NO
+TREEVIEW_WIDTH = 250
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+GENERATE_LATEX = NO
+LATEX_OUTPUT = latex
+LATEX_CMD_NAME = latex
+MAKEINDEX_CMD_NAME = makeindex
+COMPACT_LATEX = NO
+PAPER_TYPE = a4wide
+EXTRA_PACKAGES =
+LATEX_HEADER =
+PDF_HYPERLINKS = NO
+USE_PDFLATEX = NO
+LATEX_BATCHMODE = NO
+LATEX_HIDE_INDICES = NO
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+GENERATE_RTF = NO
+RTF_OUTPUT = rtf
+COMPACT_RTF = NO
+RTF_HYPERLINKS = NO
+RTF_STYLESHEET_FILE =
+RTF_EXTENSIONS_FILE =
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+GENERATE_MAN = NO
+MAN_OUTPUT = man
+MAN_EXTENSION = .3
+MAN_LINKS = NO
+#---------------------------------------------------------------------------
+# configuration options related to the XML output
+#---------------------------------------------------------------------------
+GENERATE_XML = NO
+XML_OUTPUT = xml
+XML_SCHEMA =
+XML_DTD =
+XML_PROGRAMLISTING = YES
+#---------------------------------------------------------------------------
+# configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+GENERATE_AUTOGEN_DEF = NO
+#---------------------------------------------------------------------------
+# configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+GENERATE_PERLMOD = NO
+PERLMOD_LATEX = NO
+PERLMOD_PRETTY = YES
+PERLMOD_MAKEVAR_PREFIX =
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor
+#---------------------------------------------------------------------------
+ENABLE_PREPROCESSING = YES
+MACRO_EXPANSION = NO
+EXPAND_ONLY_PREDEF = NO
+SEARCH_INCLUDES = YES
+INCLUDE_PATH =
+INCLUDE_FILE_PATTERNS =
+PREDEFINED =
+EXPAND_AS_DEFINED =
+SKIP_FUNCTION_MACROS = YES
+#---------------------------------------------------------------------------
+# Configuration::additions related to external references
+#---------------------------------------------------------------------------
+TAGFILES =
+GENERATE_TAGFILE =
+ALLEXTERNALS = NO
+EXTERNAL_GROUPS = YES
+PERL_PATH = /usr/bin/perl
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool
+#---------------------------------------------------------------------------
+CLASS_DIAGRAMS = NO
+HIDE_UNDOC_RELATIONS = NO
+HAVE_DOT = NO
+CLASS_GRAPH = YES
+COLLABORATION_GRAPH = YES
+GROUP_GRAPHS = YES
+UML_LOOK = NO
+TEMPLATE_RELATIONS = YES
+INCLUDE_GRAPH = YES
+INCLUDED_BY_GRAPH = YES
+CALL_GRAPH = NO
+GRAPHICAL_HIERARCHY = YES
+DIRECTORY_GRAPH = YES
+DOT_IMAGE_FORMAT = png
+DOT_PATH =
+DOTFILE_DIRS =
+MAX_DOT_GRAPH_WIDTH = 1024
+MAX_DOT_GRAPH_HEIGHT = 1024
+MAX_DOT_GRAPH_DEPTH = 1000
+DOT_TRANSPARENT = NO
+DOT_MULTI_TARGETS = NO
+GENERATE_LEGEND = YES
+DOT_CLEANUP = YES
+#---------------------------------------------------------------------------
+# Configuration::additions related to the search engine
+#---------------------------------------------------------------------------
+SEARCHENGINE = NO
-Note: Because PortAudioCpp is now in the main PortAudio SVN repository, having these per-release changelogs probably doesn't make much sense anymore. Perhaps it's better to just note mayor changes by date from now on.\r
-\r
-PortAudioCpp v19 revision 16 06/05/22:\r
-\r
- mblaauw:\r
- - Added up-to-date MSVC 6.0 projects created by David Moore. Besides MSVC 6.0 users, MSVC 7.0 users may use these projects and automatically convert them to MSVC 7.0 projects.\r
- - Changed the code and projects (MSVC 7.1 only) to be up-to-date with PortAudio's new directory structure.\r
- - Added equivalents of the PaAsio_GetInputChannelName() and PaAsio_GetOutputChannelName() functions to the AsioDeviceAdapter wrapper-class (missing functions pointed out by David Moore).\r
- - Added code to PortAudio's main SVN repository.\r
-\r
-PortAudioCpp v19 revision 15 (unknown release date):\r
-\r
- mblaauw:\r
- - Changed some exception handling code in HostApi's constructor.\r
- - Added accessors to PortAudio PaStream from PortAudioCpp Stream (their absense being pointed out\r
- by Tom Jordan).\r
- - Fixed a bug/typo in MemFunToCallbackInterfaceAdapter::init() thanks to Fredrik Viklund.\r
- - Fixed issue with concrete Stream classes possibly throwing an exception and fixed documentation w.r.t. this.\r
- - Moved files to portaudio/binding/cpp/. Made new msvc 7.1 projects to reflect the change and removed msvc 6.0 \r
- and 7.0 projects (because I can no longer maintain them myself). Gnu projects will probably need updating.\r
-\r
-PortAudioCpp v19 revision 14 03/10/24:\r
-\r
- mblaauw:\r
- - Fixed some error handling bugs in Stream and System (pointed out by Tom Jordan).\r
- - Updated documentation a little (main page).\r
- - Fixed order of members so initializer list was in the right order in \r
- StreamParameters (pointed out by Ludwig Schwardt).\r
- - Added new lines at EOF's (as indicated by Ludwig Schwardt).\r
-\r
-PortAudioCpp v19 revision 13 03/10/19:\r
-\r
- lschwardt:\r
- - Added build files for GNU/Linux.\r
- - Fixed bug in Exception where the inherited what() member function (and destructor) had looser \r
- exception specification (namely no exception specification, i.e. could throw anything) than \r
- the std::exception base class's what() member function (which had throw(), i.e. no-throw guarantee).\r
- - Changed the iterators so that they have a set of public typedefs instead of deriving the C++ standard \r
- library std::iterator<> struct. G++ 2.95 doesn't support std::exception<> and composition-by-aggregation \r
- is prefered over composition-by-inheritance in this case.\r
- - Changed some minor things to avoid G++ warning messages.\r
-\r
- mblaauw:\r
- - Renamed this file (/WHATSNEW.txt) to /CHANGELOG.\r
- - Renamed /PA_ISSUES.txt to /PA_ISSUES.\r
- - Added /INSTALL file with some build info for GNU/Linux and VC6.\r
- - Added MSVC 6.0 projects for building PortAudioCpp as a staticly or dynamically linkable library.\r
- - Moved build files to /build/(gnu/ or vc6/).\r
- - Moved Doxygen configuration files to /doc/ and output to /doc/api_reference/.\r
- - Added a /doc/README with some info how to generate Doxygen documentation.\r
-\r
-PortAudioCpp v19 revision 12 03/09/02:\r
-\r
- mblaauw:\r
- - Updated code to reflect changes on V19-devel CVS branch.\r
- - Fixed some typos in the documentation.\r
-\r
-PortAudioCpp v19 revision 11 03/07/31:\r
-\r
- mblaauw:\r
- - Renamed SingleDirecionStreamParameters to DirectionSpecificStreamParameters.\r
- - Implemented BlockingStream.\r
- - Updated code to reflect recent changes to PortAudio V19-devel.\r
- - Fixed a potential memory leak when an exception was thrown in the HostApi \r
- constructor.\r
- - Renamed ``Latency'' to ``BufferSize'' in AsioDeviceAdapter.\r
- - Updated class documentation.\r
-\r
-PortAudioCpp v19 revision 10 03/07/18:\r
-\r
- mblaauw:\r
- - SingleDirectionStreamParameters now has a (static) null() method.\r
- - StreamParameters uses references for the direction-specific stream parameters \r
- instead of pointers (use null() method (above) instead of NULL).\r
- - StreamParameters and SingleDirectionStreamParameters must now be fully specified \r
- and now default values are used (because this was not very useful in general and \r
- only made things more complex).\r
- - Updated documentation.\r
-\r
-PortAudioCpp v19 revision 09 03/06/25:\r
-\r
- mblaauw:\r
- - Changed some things in SingleDirectionStreamParameters to ease it's usage.\r
- - Placed all SingleDirectionStreamParameters stuff into a separate file.\r
- + Totally redid the callback stuff, now it's less ackward and supports C++ functions.\r
-\r
-PortAudioCpp v19 revision 08 03/06/20:\r
-\r
- mblaauw:\r
- - Made deconstructors for Device and HostApi private.\r
- + Added a AsioDeviceWrapper host api specific device extension class.\r
- - Refactored Exception into a Exception base class and PaException and PaCppException \r
- derived classes.\r
- - Added ASIO specific device info to the devs.cxx example.\r
- - Fixed a bug in System::hostApiCount() and System::defaultHostApi().\r
- + Moved Device::null to System::nullDevice.\r
- - Fixed some bugs in Device and System.\r
-\r
-PortAudioCpp v19 revision 07 03/06/08:\r
-\r
- mblaauw:\r
- - Updated some doxy comments.\r
- + Renamed CbXyz to CallbackXyz.\r
- + Renamed all ``configurations'' to ``parameters''.\r
- + Renamed HalfDuplexStreamConfiguration to SingleDirectionStreamConfiguration.\r
- - Renamed SingleDirectionStreamParameters::streamParameters() to \r
- SingleDirectionStreamParameters::paSteamParameters.\r
- - Added a non-constant version of SingleDirectionStreamParameters::paStreamParameters().\r
- - A few improvements to SingleDirectionStreamParameters.\r
- - Allowed AutoSystem to be created without initializing the System singleton \r
- (using a ctor flag).\r
- - Added a BlockingStream class (not implemented for now).\r
- - Fixed many bugs in the implementation of the iterators.\r
- - Fixed a bug in Device::operator==().\r
- + Added a C++ version of the patest_sine.c test/example.\r
- - Added a ctor for StreamParameters for a default half-duplex stream.\r
- - Added SingleDirectionStreamParameters::setDevice() and setNumChannels().\r
- - Renamed System::numHostApis() to System::hostApiCount().\r
- + Rewrote the iterators and related classes. They are now fully STL compliant. The System now \r
- has a static array of all HostApis and all Devices. Only the System can create HostApis and \r
- Devices and they are non-copyable now. All HostApis and Devices are now passed by-reference.\r
- - Renamed (System::) getVersion() to version() and getVersionText() to versionText().\r
- - Renamed (Device::) numXyzChannels() to maxXyzChannels().\r
- - Changed some stuff in StreamParameters.\r
- + Added a C++ version of the patest_devs.c test/example.\r
-\r
-PortAudioCpp v19 revision 06 03/06/04:\r
-\r
- mblaauw:\r
- + Added this file to the project (roughly, a `+' denotes a major change, a `-' a minor change).\r
- - Added System::deviceByIndex(), useful when a Device's index is stored for instance.\r
- - Renamed System::hostApiFromTypeId() to System::hostApiByTypeId().\r
- - Updated and added some Doxygen documentation.\r
- - Made Stream::usedIntputLatency(), Stream::usedOutputLatency() and \r
- Stream::usedSampleRate() throw an paInternalError equivalent exception instead of paBadStreamPtr.\r
- - Changed exception handling in Stream::open() functions. They now follow the PA error handling \r
- mechanism better and a couple of bugs regarding ownership of objects were fixed.\r
- - Renamed Device::isDefaultXyzDevice() to Device::isSystemDefaultXyzDevice().\r
- - Added Device::isHostApiDefaultXyzDevice().\r
- - Added StreamConfiguration::unsetFlag().\r
- - Removed CUSTOM from SampleDataFormat.\r
- - System::hostApiByTypeId() now throws an paInternalError if the type id was out-of-range; this \r
- is a temporary work-around (see comments).\r
- - Changed CbInterface to use paCallbackFun() instead of operator()().\r
- - Renamed ``object'' to ``instance'' in CbMemFunAdapter.hxx.\r
- - Added StreamConfiguration::setXyzHostApiSpecificSampleFormat().\r
- - Added StreamConfiguration::isXyzSampleFormatHostApiSpecific().\r
- - Changed error handling in System::terminate(), it can now throw an Exception.\r
- - Added error handling in System::defaultHostApi().\r
- - Added error handling in System::hostApisEnd().\r
- - Changed some (but probably not all) C casts to C++ casts to avoid confusion with a \r
- certain Python person.\r
- - Renamed RaiiSystem to AutoSystem (class and file) as this is a come common convention.\r
- - Renamed System::numDevices() to System::deviceCount() to be more compatible with PortAudio \r
- (although PortAudio uses Pa_CountDevices() instead, see comment).\r
- - Renamed HostApi::numDevices() to HostApi::deviceCount().\r
- - Changed INC_ to INCLUDED_ in the header multiple include guards.\r
- - Changed the order of functions in the StreamConfiguration class' header.\r
- - Written some more info in PortAudioCpp.hxx (Doxygen).\r
- - Added CallbackStream.hxx and CallbackStream.cxx files.\r
- + Refactored StreamConfiguration to remove the duplication which was there. There is now a \r
- HalfDuplexStreamConfiguration class. Also made some improvements to these classes while \r
- doing the refactoring.\r
- + Moved all code files to source/portaudiocpp/ and changed includes.\r
- + Moved all header files to include/portaudiocpp/ to easy a binary build if needed. The project \r
- must be set to have .../include/ as a path to look for includes.\r
- + Refactored the Stream class into a Stream base class and a CallbackStream derived class.\r
- - Renamed Stream::usingXyz() to Stream::xyz().\r
- - Updated some doxy comments.\r
- - Changed ``using namespace portaudio'' in .cxx files to ``namespace portaudio { ... }''.\r
-\r
-PortAudioCpp v19 revision 05 03/04/09:\r
-\r
- mblaauw:\r
- - Initial release on the PortAudio mailinglist.\r
-\r
-\r
-\r
+Note: Because PortAudioCpp is now in the main PortAudio SVN repository, having these per-release changelogs probably doesn't make much sense anymore. Perhaps it's better to just note mayor changes by date from now on.
+
+PortAudioCpp v19 revision 16 06/05/22:
+
+ mblaauw:
+ - Added up-to-date MSVC 6.0 projects created by David Moore. Besides MSVC 6.0 users, MSVC 7.0 users may use these projects and automatically convert them to MSVC 7.0 projects.
+ - Changed the code and projects (MSVC 7.1 only) to be up-to-date with PortAudio's new directory structure.
+ - Added equivalents of the PaAsio_GetInputChannelName() and PaAsio_GetOutputChannelName() functions to the AsioDeviceAdapter wrapper-class (missing functions pointed out by David Moore).
+ - Added code to PortAudio's main SVN repository.
+
+PortAudioCpp v19 revision 15 (unknown release date):
+
+ mblaauw:
+ - Changed some exception handling code in HostApi's constructor.
+ - Added accessors to PortAudio PaStream from PortAudioCpp Stream (their absense being pointed out
+ by Tom Jordan).
+ - Fixed a bug/typo in MemFunToCallbackInterfaceAdapter::init() thanks to Fredrik Viklund.
+ - Fixed issue with concrete Stream classes possibly throwing an exception and fixed documentation w.r.t. this.
+ - Moved files to portaudio/binding/cpp/. Made new msvc 7.1 projects to reflect the change and removed msvc 6.0
+ and 7.0 projects (because I can no longer maintain them myself). Gnu projects will probably need updating.
+
+PortAudioCpp v19 revision 14 03/10/24:
+
+ mblaauw:
+ - Fixed some error handling bugs in Stream and System (pointed out by Tom Jordan).
+ - Updated documentation a little (main page).
+ - Fixed order of members so initializer list was in the right order in
+ StreamParameters (pointed out by Ludwig Schwardt).
+ - Added new lines at EOF's (as indicated by Ludwig Schwardt).
+
+PortAudioCpp v19 revision 13 03/10/19:
+
+ lschwardt:
+ - Added build files for GNU/Linux.
+ - Fixed bug in Exception where the inherited what() member function (and destructor) had looser
+ exception specification (namely no exception specification, i.e. could throw anything) than
+ the std::exception base class's what() member function (which had throw(), i.e. no-throw guarantee).
+ - Changed the iterators so that they have a set of public typedefs instead of deriving the C++ standard
+ library std::iterator<> struct. G++ 2.95 doesn't support std::exception<> and composition-by-aggregation
+ is prefered over composition-by-inheritance in this case.
+ - Changed some minor things to avoid G++ warning messages.
+
+ mblaauw:
+ - Renamed this file (/WHATSNEW.txt) to /CHANGELOG.
+ - Renamed /PA_ISSUES.txt to /PA_ISSUES.
+ - Added /INSTALL file with some build info for GNU/Linux and VC6.
+ - Added MSVC 6.0 projects for building PortAudioCpp as a staticly or dynamically linkable library.
+ - Moved build files to /build/(gnu/ or vc6/).
+ - Moved Doxygen configuration files to /doc/ and output to /doc/api_reference/.
+ - Added a /doc/README with some info how to generate Doxygen documentation.
+
+PortAudioCpp v19 revision 12 03/09/02:
+
+ mblaauw:
+ - Updated code to reflect changes on V19-devel CVS branch.
+ - Fixed some typos in the documentation.
+
+PortAudioCpp v19 revision 11 03/07/31:
+
+ mblaauw:
+ - Renamed SingleDirecionStreamParameters to DirectionSpecificStreamParameters.
+ - Implemented BlockingStream.
+ - Updated code to reflect recent changes to PortAudio V19-devel.
+ - Fixed a potential memory leak when an exception was thrown in the HostApi
+ constructor.
+ - Renamed ``Latency'' to ``BufferSize'' in AsioDeviceAdapter.
+ - Updated class documentation.
+
+PortAudioCpp v19 revision 10 03/07/18:
+
+ mblaauw:
+ - SingleDirectionStreamParameters now has a (static) null() method.
+ - StreamParameters uses references for the direction-specific stream parameters
+ instead of pointers (use null() method (above) instead of NULL).
+ - StreamParameters and SingleDirectionStreamParameters must now be fully specified
+ and now default values are used (because this was not very useful in general and
+ only made things more complex).
+ - Updated documentation.
+
+PortAudioCpp v19 revision 09 03/06/25:
+
+ mblaauw:
+ - Changed some things in SingleDirectionStreamParameters to ease it's usage.
+ - Placed all SingleDirectionStreamParameters stuff into a separate file.
+ + Totally redid the callback stuff, now it's less ackward and supports C++ functions.
+
+PortAudioCpp v19 revision 08 03/06/20:
+
+ mblaauw:
+ - Made deconstructors for Device and HostApi private.
+ + Added a AsioDeviceWrapper host api specific device extension class.
+ - Refactored Exception into a Exception base class and PaException and PaCppException
+ derived classes.
+ - Added ASIO specific device info to the devs.cxx example.
+ - Fixed a bug in System::hostApiCount() and System::defaultHostApi().
+ + Moved Device::null to System::nullDevice.
+ - Fixed some bugs in Device and System.
+
+PortAudioCpp v19 revision 07 03/06/08:
+
+ mblaauw:
+ - Updated some doxy comments.
+ + Renamed CbXyz to CallbackXyz.
+ + Renamed all ``configurations'' to ``parameters''.
+ + Renamed HalfDuplexStreamConfiguration to SingleDirectionStreamConfiguration.
+ - Renamed SingleDirectionStreamParameters::streamParameters() to
+ SingleDirectionStreamParameters::paSteamParameters.
+ - Added a non-constant version of SingleDirectionStreamParameters::paStreamParameters().
+ - A few improvements to SingleDirectionStreamParameters.
+ - Allowed AutoSystem to be created without initializing the System singleton
+ (using a ctor flag).
+ - Added a BlockingStream class (not implemented for now).
+ - Fixed many bugs in the implementation of the iterators.
+ - Fixed a bug in Device::operator==().
+ + Added a C++ version of the patest_sine.c test/example.
+ - Added a ctor for StreamParameters for a default half-duplex stream.
+ - Added SingleDirectionStreamParameters::setDevice() and setNumChannels().
+ - Renamed System::numHostApis() to System::hostApiCount().
+ + Rewrote the iterators and related classes. They are now fully STL compliant. The System now
+ has a static array of all HostApis and all Devices. Only the System can create HostApis and
+ Devices and they are non-copyable now. All HostApis and Devices are now passed by-reference.
+ - Renamed (System::) getVersion() to version() and getVersionText() to versionText().
+ - Renamed (Device::) numXyzChannels() to maxXyzChannels().
+ - Changed some stuff in StreamParameters.
+ + Added a C++ version of the patest_devs.c test/example.
+
+PortAudioCpp v19 revision 06 03/06/04:
+
+ mblaauw:
+ + Added this file to the project (roughly, a `+' denotes a major change, a `-' a minor change).
+ - Added System::deviceByIndex(), useful when a Device's index is stored for instance.
+ - Renamed System::hostApiFromTypeId() to System::hostApiByTypeId().
+ - Updated and added some Doxygen documentation.
+ - Made Stream::usedIntputLatency(), Stream::usedOutputLatency() and
+ Stream::usedSampleRate() throw an paInternalError equivalent exception instead of paBadStreamPtr.
+ - Changed exception handling in Stream::open() functions. They now follow the PA error handling
+ mechanism better and a couple of bugs regarding ownership of objects were fixed.
+ - Renamed Device::isDefaultXyzDevice() to Device::isSystemDefaultXyzDevice().
+ - Added Device::isHostApiDefaultXyzDevice().
+ - Added StreamConfiguration::unsetFlag().
+ - Removed CUSTOM from SampleDataFormat.
+ - System::hostApiByTypeId() now throws an paInternalError if the type id was out-of-range; this
+ is a temporary work-around (see comments).
+ - Changed CbInterface to use paCallbackFun() instead of operator()().
+ - Renamed ``object'' to ``instance'' in CbMemFunAdapter.hxx.
+ - Added StreamConfiguration::setXyzHostApiSpecificSampleFormat().
+ - Added StreamConfiguration::isXyzSampleFormatHostApiSpecific().
+ - Changed error handling in System::terminate(), it can now throw an Exception.
+ - Added error handling in System::defaultHostApi().
+ - Added error handling in System::hostApisEnd().
+ - Changed some (but probably not all) C casts to C++ casts to avoid confusion with a
+ certain Python person.
+ - Renamed RaiiSystem to AutoSystem (class and file) as this is a come common convention.
+ - Renamed System::numDevices() to System::deviceCount() to be more compatible with PortAudio
+ (although PortAudio uses Pa_CountDevices() instead, see comment).
+ - Renamed HostApi::numDevices() to HostApi::deviceCount().
+ - Changed INC_ to INCLUDED_ in the header multiple include guards.
+ - Changed the order of functions in the StreamConfiguration class' header.
+ - Written some more info in PortAudioCpp.hxx (Doxygen).
+ - Added CallbackStream.hxx and CallbackStream.cxx files.
+ + Refactored StreamConfiguration to remove the duplication which was there. There is now a
+ HalfDuplexStreamConfiguration class. Also made some improvements to these classes while
+ doing the refactoring.
+ + Moved all code files to source/portaudiocpp/ and changed includes.
+ + Moved all header files to include/portaudiocpp/ to easy a binary build if needed. The project
+ must be set to have .../include/ as a path to look for includes.
+ + Refactored the Stream class into a Stream base class and a CallbackStream derived class.
+ - Renamed Stream::usingXyz() to Stream::xyz().
+ - Updated some doxy comments.
+ - Changed ``using namespace portaudio'' in .cxx files to ``namespace portaudio { ... }''.
+
+PortAudioCpp v19 revision 05 03/04/09:
+
+ mblaauw:
+ - Initial release on the PortAudio mailinglist.
+
+
+
-# Microsoft Developer Studio Project File - Name="devs_example" - Package Owner=<4>\r
-# Microsoft Developer Studio Generated Build File, Format Version 6.00\r
-# ** DO NOT EDIT **\r
-\r
-# TARGTYPE "Win32 (x86) Console Application" 0x0103\r
-\r
-CFG=devs_example - Win32 Debug\r
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,\r
-!MESSAGE use the Export Makefile command and run\r
-!MESSAGE \r
-!MESSAGE NMAKE /f "devs_example.mak".\r
-!MESSAGE \r
-!MESSAGE You can specify a configuration when running NMAKE\r
-!MESSAGE by defining the macro CFG on the command line. For example:\r
-!MESSAGE \r
-!MESSAGE NMAKE /f "devs_example.mak" CFG="devs_example - Win32 Debug"\r
-!MESSAGE \r
-!MESSAGE Possible choices for configuration are:\r
-!MESSAGE \r
-!MESSAGE "devs_example - Win32 Release" (based on "Win32 (x86) Console Application")\r
-!MESSAGE "devs_example - Win32 Debug" (based on "Win32 (x86) Console Application")\r
-!MESSAGE \r
-\r
-# Begin Project\r
-# PROP AllowPerConfigDependencies 0\r
-# PROP Scc_ProjName ""\r
-# PROP Scc_LocalPath ""\r
-CPP=cl.exe\r
-RSC=rc.exe\r
-\r
-!IF "$(CFG)" == "devs_example - Win32 Release"\r
-\r
-# PROP BASE Use_MFC 0\r
-# PROP BASE Use_Debug_Libraries 0\r
-# PROP BASE Output_Dir "Release"\r
-# PROP BASE Intermediate_Dir "Release"\r
-# PROP BASE Target_Dir ""\r
-# PROP Use_MFC 0\r
-# PROP Use_Debug_Libraries 0\r
-# PROP Output_Dir "Release"\r
-# PROP Intermediate_Dir "Release"\r
-# PROP Ignore_Export_Lib 0\r
-# PROP Target_Dir ""\r
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c\r
-# ADD CPP /nologo /MTd /W3 /GX /O2 /I "../../include/" /I "../../../../include/" /I "../../../../src/common/" /I "../../../../../asiosdk2/common/" /I "../../../../../asiosdk2/host/" /I "../../../../../asiosdk2/host/pc/" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c\r
-# SUBTRACT CPP /YX\r
-# ADD BASE RSC /l 0x809 /d "NDEBUG"\r
-# ADD RSC /l 0x809 /d "NDEBUG"\r
-BSC32=bscmake.exe\r
-# ADD BASE BSC32 /nologo\r
-# ADD BSC32 /nologo\r
-LINK32=link.exe\r
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386\r
-# ADD LINK32 portaudiocpp-vc6-r.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /out:"../../bin/devs_example.exe" /libpath:"../../lib"\r
-\r
-!ELSEIF "$(CFG)" == "devs_example - Win32 Debug"\r
-\r
-# PROP BASE Use_MFC 0\r
-# PROP BASE Use_Debug_Libraries 1\r
-# PROP BASE Output_Dir "Debug"\r
-# PROP BASE Intermediate_Dir "Debug"\r
-# PROP BASE Target_Dir ""\r
-# PROP Use_MFC 0\r
-# PROP Use_Debug_Libraries 1\r
-# PROP Output_Dir "Debug"\r
-# PROP Intermediate_Dir "Debug"\r
-# PROP Ignore_Export_Lib 0\r
-# PROP Target_Dir ""\r
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c\r
-# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include/" /I "../../../../include/" /I "../../../../src/common/" /I "../../../../../asiosdk2/common/" /I "../../../../../asiosdk2/host/" /I "../../../../../asiosdk2/host/pc/" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c\r
-# SUBTRACT CPP /YX\r
-# ADD BASE RSC /l 0x809 /d "_DEBUG"\r
-# ADD RSC /l 0x809 /d "_DEBUG"\r
-BSC32=bscmake.exe\r
-# ADD BASE BSC32 /nologo\r
-# ADD BSC32 /nologo\r
-LINK32=link.exe\r
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept\r
-# ADD LINK32 portaudiocpp-vc6-d.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /out:"../../bin/devs_example.exe" /pdbtype:sept /libpath:"../../lib"\r
-\r
-!ENDIF \r
-\r
-# Begin Target\r
-\r
-# Name "devs_example - Win32 Release"\r
-# Name "devs_example - Win32 Debug"\r
-# Begin Group "Source Files"\r
-\r
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"\r
-# Begin Source File\r
-\r
-SOURCE=..\..\..\..\pa_asio\iasiothiscallresolver.cpp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\..\..\src\common\pa_allocation.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\..\..\pa_asio\pa_asio.cpp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\..\..\src\common\pa_converters.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\..\..\src\common\pa_cpuload.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\..\..\src\common\pa_dither.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\..\..\src\common\pa_front.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\..\..\src\common\pa_process.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\..\..\src\hostapi\skeleton\pa_hostapi_skeleton.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\..\..\src\common\pa_stream.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\..\..\src\common\pa_trace.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\..\..\src\hostapi\dsound\pa_win_ds.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\..\..\src\hostapi\dsound\pa_win_ds_dynlink.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\..\..\src\os\win\pa_win_hostapis.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\..\..\src\os\win\pa_win_util.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\..\..\src\hostapi\wmme\pa_win_wmme.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\..\..\src\os\win\pa_x86_plain_converters.c\r
-# End Source File\r
-# End Group\r
-# Begin Group "Header Files"\r
-\r
-# PROP Default_Filter "h;hpp;hxx;hm;inl"\r
-# Begin Source File\r
-\r
-SOURCE=..\..\..\..\pa_asio\iasiothiscallresolver.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\..\..\src\common\pa_allocation.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\..\..\src\common\pa_converters.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\..\..\src\common\pa_cpuload.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\..\..\src\common\pa_dither.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\..\..\src\common\pa_endianness.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\..\..\src\common\pa_hostapi.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\..\..\src\common\pa_process.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\..\..\src\common\pa_stream.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\..\..\src\common\pa_trace.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\..\..\src\common\pa_types.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\..\..\src\common\pa_util.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\..\..\src\hostapi\dsound\pa_win_ds_dynlink.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\..\..\src\os\win\pa_x86_plain_converters.h\r
-# End Source File\r
-# End Group\r
-# Begin Group "Resource Files"\r
-\r
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"\r
-# End Group\r
-# Begin Group "Example Files"\r
-\r
-# PROP Default_Filter ""\r
-# Begin Source File\r
-\r
-SOURCE=..\..\example\devs.cxx\r
-# End Source File\r
-# End Group\r
-# Begin Group "ASIO 2 SDK"\r
-\r
-# PROP Default_Filter ""\r
-# Begin Source File\r
-\r
-SOURCE=..\..\..\..\..\asiosdk2\common\asio.cpp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\..\..\..\asiosdk2\host\asiodrivers.cpp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\..\..\..\asiosdk2\host\pc\asiolist.cpp\r
-# End Source File\r
-# End Group\r
-# End Target\r
-# End Project\r
+# Microsoft Developer Studio Project File - Name="devs_example" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=devs_example - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "devs_example.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "devs_example.mak" CFG="devs_example - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "devs_example - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "devs_example - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "devs_example - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MTd /W3 /GX /O2 /I "../../include/" /I "../../../../include/" /I "../../../../src/common/" /I "../../../../../asiosdk2/common/" /I "../../../../../asiosdk2/host/" /I "../../../../../asiosdk2/host/pc/" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x809 /d "NDEBUG"
+# ADD RSC /l 0x809 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 portaudiocpp-vc6-r.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /out:"../../bin/devs_example.exe" /libpath:"../../lib"
+
+!ELSEIF "$(CFG)" == "devs_example - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include/" /I "../../../../include/" /I "../../../../src/common/" /I "../../../../../asiosdk2/common/" /I "../../../../../asiosdk2/host/" /I "../../../../../asiosdk2/host/pc/" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x809 /d "_DEBUG"
+# ADD RSC /l 0x809 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 portaudiocpp-vc6-d.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /out:"../../bin/devs_example.exe" /pdbtype:sept /libpath:"../../lib"
+
+!ENDIF
+
+# Begin Target
+
+# Name "devs_example - Win32 Release"
+# Name "devs_example - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=..\..\..\..\pa_asio\iasiothiscallresolver.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\common\pa_allocation.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\pa_asio\pa_asio.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\common\pa_converters.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\common\pa_cpuload.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\common\pa_dither.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\common\pa_front.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\common\pa_process.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\hostapi\skeleton\pa_hostapi_skeleton.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\common\pa_stream.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\common\pa_trace.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\hostapi\dsound\pa_win_ds.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\hostapi\dsound\pa_win_ds_dynlink.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\os\win\pa_win_hostapis.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\os\win\pa_win_util.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\hostapi\wmme\pa_win_wmme.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\os\win\pa_x86_plain_converters.c
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=..\..\..\..\pa_asio\iasiothiscallresolver.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\common\pa_allocation.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\common\pa_converters.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\common\pa_cpuload.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\common\pa_dither.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\common\pa_endianness.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\common\pa_hostapi.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\common\pa_process.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\common\pa_stream.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\common\pa_trace.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\common\pa_types.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\common\pa_util.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\hostapi\dsound\pa_win_ds_dynlink.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\os\win\pa_x86_plain_converters.h
+# End Source File
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# End Group
+# Begin Group "Example Files"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\example\devs.cxx
+# End Source File
+# End Group
+# Begin Group "ASIO 2 SDK"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\..\..\..\asiosdk2\common\asio.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\..\asiosdk2\host\asiodrivers.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\..\asiosdk2\host\pc\asiolist.cpp
+# End Source File
+# End Group
+# End Target
+# End Project
-Microsoft Developer Studio Workspace File, Format Version 6.00\r
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!\r
-\r
-###############################################################################\r
-\r
-Project: "devs_example"=".\devs_example.dsp" - Package Owner=<4>\r
-\r
-Package=<5>\r
-{{{\r
-}}}\r
-\r
-Package=<4>\r
-{{{\r
- Begin Project Dependency\r
- Project_Dep_Name static_library\r
- End Project Dependency\r
-}}}\r
-\r
-###############################################################################\r
-\r
-Project: "static_library"=".\static_library.dsp" - Package Owner=<4>\r
-\r
-Package=<5>\r
-{{{\r
-}}}\r
-\r
-Package=<4>\r
-{{{\r
-}}}\r
-\r
-###############################################################################\r
-\r
-Global:\r
-\r
-Package=<5>\r
-{{{\r
-}}}\r
-\r
-Package=<3>\r
-{{{\r
-}}}\r
-\r
-###############################################################################\r
-\r
+Microsoft Developer Studio Workspace File, Format Version 6.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+
+Project: "devs_example"=".\devs_example.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name static_library
+ End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "static_library"=".\static_library.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+
-# Microsoft Developer Studio Project File - Name="sine_example" - Package Owner=<4>\r
-# Microsoft Developer Studio Generated Build File, Format Version 6.00\r
-# ** DO NOT EDIT **\r
-\r
-# TARGTYPE "Win32 (x86) Console Application" 0x0103\r
-\r
-CFG=sine_example - Win32 Debug\r
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,\r
-!MESSAGE use the Export Makefile command and run\r
-!MESSAGE \r
-!MESSAGE NMAKE /f "sine_example.mak".\r
-!MESSAGE \r
-!MESSAGE You can specify a configuration when running NMAKE\r
-!MESSAGE by defining the macro CFG on the command line. For example:\r
-!MESSAGE \r
-!MESSAGE NMAKE /f "sine_example.mak" CFG="sine_example - Win32 Debug"\r
-!MESSAGE \r
-!MESSAGE Possible choices for configuration are:\r
-!MESSAGE \r
-!MESSAGE "sine_example - Win32 Release" (based on "Win32 (x86) Console Application")\r
-!MESSAGE "sine_example - Win32 Debug" (based on "Win32 (x86) Console Application")\r
-!MESSAGE \r
-\r
-# Begin Project\r
-# PROP AllowPerConfigDependencies 0\r
-# PROP Scc_ProjName ""\r
-# PROP Scc_LocalPath ""\r
-CPP=cl.exe\r
-RSC=rc.exe\r
-\r
-!IF "$(CFG)" == "sine_example - Win32 Release"\r
-\r
-# PROP BASE Use_MFC 0\r
-# PROP BASE Use_Debug_Libraries 0\r
-# PROP BASE Output_Dir "Release"\r
-# PROP BASE Intermediate_Dir "Release"\r
-# PROP BASE Target_Dir ""\r
-# PROP Use_MFC 0\r
-# PROP Use_Debug_Libraries 0\r
-# PROP Output_Dir "Release"\r
-# PROP Intermediate_Dir "Release"\r
-# PROP Ignore_Export_Lib 0\r
-# PROP Target_Dir ""\r
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c\r
-# ADD CPP /nologo /MTd /W3 /GX /O2 /I "../../include/" /I "../../../../include/" /I "../../../../src/common/" /I "../../../../../asiosdk2/common/" /I "../../../../../asiosdk2/host/" /I "../../../../../asiosdk2/host/pc/" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c\r
-# SUBTRACT CPP /YX\r
-# ADD BASE RSC /l 0x809 /d "NDEBUG"\r
-# ADD RSC /l 0x809 /d "NDEBUG"\r
-BSC32=bscmake.exe\r
-# ADD BASE BSC32 /nologo\r
-# ADD BSC32 /nologo\r
-LINK32=link.exe\r
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386\r
-# ADD LINK32 portaudiocpp-vc6-r.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /out:"../../bin/sine_example.exe" /libpath:"../../lib"\r
-\r
-!ELSEIF "$(CFG)" == "sine_example - Win32 Debug"\r
-\r
-# PROP BASE Use_MFC 0\r
-# PROP BASE Use_Debug_Libraries 1\r
-# PROP BASE Output_Dir "Debug"\r
-# PROP BASE Intermediate_Dir "Debug"\r
-# PROP BASE Target_Dir ""\r
-# PROP Use_MFC 0\r
-# PROP Use_Debug_Libraries 1\r
-# PROP Output_Dir "Debug"\r
-# PROP Intermediate_Dir "Debug"\r
-# PROP Ignore_Export_Lib 0\r
-# PROP Target_Dir ""\r
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c\r
-# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include/" /I "../../../../include/" /I "../../../../src/common/" /I "../../../../../asiosdk2/common/" /I "../../../../../asiosdk2/host/" /I "../../../../../asiosdk2/host/pc/" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c\r
-# SUBTRACT CPP /YX\r
-# ADD BASE RSC /l 0x809 /d "_DEBUG"\r
-# ADD RSC /l 0x809 /d "_DEBUG"\r
-BSC32=bscmake.exe\r
-# ADD BASE BSC32 /nologo\r
-# ADD BSC32 /nologo\r
-LINK32=link.exe\r
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept\r
-# ADD LINK32 portaudiocpp-vc6-d.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /out:"../../bin/sine_example.exe" /pdbtype:sept /libpath:"../../lib"\r
-\r
-!ENDIF \r
-\r
-# Begin Target\r
-\r
-# Name "sine_example - Win32 Release"\r
-# Name "sine_example - Win32 Debug"\r
-# Begin Group "Header Files"\r
-\r
-# PROP Default_Filter "h;hpp;hxx;hm;inl"\r
-# Begin Source File\r
-\r
-SOURCE=..\..\..\..\pa_asio\iasiothiscallresolver.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\..\..\src\common\pa_allocation.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\..\..\src\common\pa_converters.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\..\..\src\common\pa_cpuload.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\..\..\src\common\pa_dither.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\..\..\src\common\pa_endianness.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\..\..\src\common\pa_hostapi.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\..\..\src\common\pa_process.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\..\..\src\common\pa_stream.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\..\..\src\common\pa_trace.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\..\..\src\common\pa_types.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\..\..\src\common\pa_util.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\..\..\src\hostapi\dsound\pa_win_ds_dynlink.h\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\..\..\src\os\win\pa_x86_plain_converters.h\r
-# End Source File\r
-# End Group\r
-# Begin Group "Resource Files"\r
-\r
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"\r
-# End Group\r
-# Begin Group "Example Files"\r
-\r
-# PROP Default_Filter ""\r
-# Begin Source File\r
-\r
-SOURCE=..\..\example\sine.cxx\r
-# End Source File\r
-# End Group\r
-# Begin Group "Source Files"\r
-\r
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"\r
-# Begin Source File\r
-\r
-SOURCE=..\..\..\..\pa_asio\iasiothiscallresolver.cpp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\..\..\src\common\pa_allocation.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\..\..\pa_asio\pa_asio.cpp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\..\..\src\common\pa_converters.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\..\..\src\common\pa_cpuload.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\..\..\src\common\pa_dither.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\..\..\src\common\pa_front.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\..\..\src\common\pa_process.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\..\..\src\hostapi\skeleton\pa_hostapi_skeleton.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\..\..\src\common\pa_stream.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\..\..\src\common\pa_trace.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\..\..\src\hostapi\dsound\pa_win_ds.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\..\..\src\hostapi\dsound\pa_win_ds_dynlink.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\..\..\src\os\win\pa_win_hostapis.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\..\..\src\os\win\pa_win_util.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\..\..\src\hostapi\wasapi\pa_win_wasapi.cpp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\..\..\src\hostapi\wmme\pa_win_wmme.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\..\..\src\os\win\pa_x86_plain_converters.c\r
-# End Source File\r
-# End Group\r
-# Begin Group "ASIO 2 SDK"\r
-\r
-# PROP Default_Filter ""\r
-# Begin Source File\r
-\r
-SOURCE=..\..\..\..\..\asiosdk2\common\asio.cpp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\..\..\..\asiosdk2\host\asiodrivers.cpp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\..\..\..\asiosdk2\host\pc\asiolist.cpp\r
-# End Source File\r
-# End Group\r
-# End Target\r
-# End Project\r
+# Microsoft Developer Studio Project File - Name="sine_example" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=sine_example - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "sine_example.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "sine_example.mak" CFG="sine_example - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "sine_example - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "sine_example - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "sine_example - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MTd /W3 /GX /O2 /I "../../include/" /I "../../../../include/" /I "../../../../src/common/" /I "../../../../../asiosdk2/common/" /I "../../../../../asiosdk2/host/" /I "../../../../../asiosdk2/host/pc/" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x809 /d "NDEBUG"
+# ADD RSC /l 0x809 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 portaudiocpp-vc6-r.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /out:"../../bin/sine_example.exe" /libpath:"../../lib"
+
+!ELSEIF "$(CFG)" == "sine_example - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include/" /I "../../../../include/" /I "../../../../src/common/" /I "../../../../../asiosdk2/common/" /I "../../../../../asiosdk2/host/" /I "../../../../../asiosdk2/host/pc/" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x809 /d "_DEBUG"
+# ADD RSC /l 0x809 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 portaudiocpp-vc6-d.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /out:"../../bin/sine_example.exe" /pdbtype:sept /libpath:"../../lib"
+
+!ENDIF
+
+# Begin Target
+
+# Name "sine_example - Win32 Release"
+# Name "sine_example - Win32 Debug"
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=..\..\..\..\pa_asio\iasiothiscallresolver.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\common\pa_allocation.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\common\pa_converters.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\common\pa_cpuload.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\common\pa_dither.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\common\pa_endianness.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\common\pa_hostapi.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\common\pa_process.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\common\pa_stream.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\common\pa_trace.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\common\pa_types.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\common\pa_util.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\hostapi\dsound\pa_win_ds_dynlink.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\os\win\pa_x86_plain_converters.h
+# End Source File
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# End Group
+# Begin Group "Example Files"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\example\sine.cxx
+# End Source File
+# End Group
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=..\..\..\..\pa_asio\iasiothiscallresolver.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\common\pa_allocation.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\pa_asio\pa_asio.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\common\pa_converters.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\common\pa_cpuload.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\common\pa_dither.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\common\pa_front.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\common\pa_process.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\hostapi\skeleton\pa_hostapi_skeleton.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\common\pa_stream.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\common\pa_trace.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\hostapi\dsound\pa_win_ds.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\hostapi\dsound\pa_win_ds_dynlink.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\os\win\pa_win_hostapis.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\os\win\pa_win_util.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\hostapi\wasapi\pa_win_wasapi.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\hostapi\wmme\pa_win_wmme.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\os\win\pa_x86_plain_converters.c
+# End Source File
+# End Group
+# Begin Group "ASIO 2 SDK"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\..\..\..\asiosdk2\common\asio.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\..\asiosdk2\host\asiodrivers.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\..\asiosdk2\host\pc\asiolist.cpp
+# End Source File
+# End Group
+# End Target
+# End Project
-Microsoft Developer Studio Workspace File, Format Version 6.00\r
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!\r
-\r
-###############################################################################\r
-\r
-Project: "sine_example"=".\sine_example.dsp" - Package Owner=<4>\r
-\r
-Package=<5>\r
-{{{\r
-}}}\r
-\r
-Package=<4>\r
-{{{\r
- Begin Project Dependency\r
- Project_Dep_Name static_library\r
- End Project Dependency\r
-}}}\r
-\r
-###############################################################################\r
-\r
-Project: "static_library"=".\static_library.dsp" - Package Owner=<4>\r
-\r
-Package=<5>\r
-{{{\r
-}}}\r
-\r
-Package=<4>\r
-{{{\r
-}}}\r
-\r
-###############################################################################\r
-\r
-Global:\r
-\r
-Package=<5>\r
-{{{\r
-}}}\r
-\r
-Package=<3>\r
-{{{\r
-}}}\r
-\r
-###############################################################################\r
-\r
+Microsoft Developer Studio Workspace File, Format Version 6.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+
+Project: "sine_example"=".\sine_example.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name static_library
+ End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "static_library"=".\static_library.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+
-# Microsoft Developer Studio Project File - Name="static_library" - Package Owner=<4>\r
-# Microsoft Developer Studio Generated Build File, Format Version 6.00\r
-# ** DO NOT EDIT **\r
-\r
-# TARGTYPE "Win32 (x86) Static Library" 0x0104\r
-\r
-CFG=static_library - Win32 Debug\r
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,\r
-!MESSAGE use the Export Makefile command and run\r
-!MESSAGE \r
-!MESSAGE NMAKE /f "static_library.mak".\r
-!MESSAGE \r
-!MESSAGE You can specify a configuration when running NMAKE\r
-!MESSAGE by defining the macro CFG on the command line. For example:\r
-!MESSAGE \r
-!MESSAGE NMAKE /f "static_library.mak" CFG="static_library - Win32 Debug"\r
-!MESSAGE \r
-!MESSAGE Possible choices for configuration are:\r
-!MESSAGE \r
-!MESSAGE "static_library - Win32 Release" (based on "Win32 (x86) Static Library")\r
-!MESSAGE "static_library - Win32 Debug" (based on "Win32 (x86) Static Library")\r
-!MESSAGE \r
-\r
-# Begin Project\r
-# PROP AllowPerConfigDependencies 0\r
-# PROP Scc_ProjName ""\r
-# PROP Scc_LocalPath ""\r
-CPP=cl.exe\r
-RSC=rc.exe\r
-\r
-!IF "$(CFG)" == "static_library - Win32 Release"\r
-\r
-# PROP BASE Use_MFC 0\r
-# PROP BASE Use_Debug_Libraries 0\r
-# PROP BASE Output_Dir "Release"\r
-# PROP BASE Intermediate_Dir "Release"\r
-# PROP BASE Target_Dir ""\r
-# PROP Use_MFC 0\r
-# PROP Use_Debug_Libraries 0\r
-# PROP Output_Dir "Release"\r
-# PROP Intermediate_Dir "Release"\r
-# PROP Target_Dir ""\r
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c\r
-# ADD CPP /nologo /MTd /W3 /GX /O2 /I "../../include/" /I "../../../../include/" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /FD /c\r
-# SUBTRACT CPP /YX\r
-# ADD BASE RSC /l 0x809 /d "NDEBUG"\r
-# ADD RSC /l 0x809 /d "NDEBUG"\r
-BSC32=bscmake.exe\r
-# ADD BASE BSC32 /nologo\r
-# ADD BSC32 /nologo\r
-LIB32=link.exe -lib\r
-# ADD BASE LIB32 /nologo\r
-# ADD LIB32 /nologo /out:"../../lib/portaudiocpp-vc6-r.lib"\r
-\r
-!ELSEIF "$(CFG)" == "static_library - Win32 Debug"\r
-\r
-# PROP BASE Use_MFC 0\r
-# PROP BASE Use_Debug_Libraries 1\r
-# PROP BASE Output_Dir "Debug"\r
-# PROP BASE Intermediate_Dir "Debug"\r
-# PROP BASE Target_Dir ""\r
-# PROP Use_MFC 0\r
-# PROP Use_Debug_Libraries 1\r
-# PROP Output_Dir "Debug"\r
-# PROP Intermediate_Dir "Debug"\r
-# PROP Target_Dir ""\r
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c\r
-# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include/" /I "../../../../include/" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /FD /GZ /c\r
-# SUBTRACT CPP /YX\r
-# ADD BASE RSC /l 0x809 /d "_DEBUG"\r
-# ADD RSC /l 0x809 /d "_DEBUG"\r
-BSC32=bscmake.exe\r
-# ADD BASE BSC32 /nologo\r
-# ADD BSC32 /nologo\r
-LIB32=link.exe -lib\r
-# ADD BASE LIB32 /nologo\r
-# ADD LIB32 /nologo /out:"../../lib/portaudiocpp-vc6-d.lib"\r
-\r
-!ENDIF \r
-\r
-# Begin Target\r
-\r
-# Name "static_library - Win32 Release"\r
-# Name "static_library - Win32 Debug"\r
-# Begin Group "Source Files"\r
-\r
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"\r
-# Begin Source File\r
-\r
-SOURCE=..\..\source\portaudiocpp\AsioDeviceAdapter.cxx\r
-\r
-!IF "$(CFG)" == "static_library - Win32 Release"\r
-\r
-!ELSEIF "$(CFG)" == "static_library - Win32 Debug"\r
-\r
-# SUBTRACT CPP /YX\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\source\portaudiocpp\BlockingStream.cxx\r
-\r
-!IF "$(CFG)" == "static_library - Win32 Release"\r
-\r
-!ELSEIF "$(CFG)" == "static_library - Win32 Debug"\r
-\r
-# SUBTRACT CPP /YX\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\source\portaudiocpp\CallbackInterface.cxx\r
-\r
-!IF "$(CFG)" == "static_library - Win32 Release"\r
-\r
-!ELSEIF "$(CFG)" == "static_library - Win32 Debug"\r
-\r
-# SUBTRACT CPP /YX\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\source\portaudiocpp\CallbackStream.cxx\r
-\r
-!IF "$(CFG)" == "static_library - Win32 Release"\r
-\r
-!ELSEIF "$(CFG)" == "static_library - Win32 Debug"\r
-\r
-# SUBTRACT CPP /YX\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\source\portaudiocpp\CFunCallbackStream.cxx\r
-\r
-!IF "$(CFG)" == "static_library - Win32 Release"\r
-\r
-!ELSEIF "$(CFG)" == "static_library - Win32 Debug"\r
-\r
-# SUBTRACT CPP /YX\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\source\portaudiocpp\CppFunCallbackStream.cxx\r
-\r
-!IF "$(CFG)" == "static_library - Win32 Release"\r
-\r
-!ELSEIF "$(CFG)" == "static_library - Win32 Debug"\r
-\r
-# SUBTRACT CPP /YX\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\source\portaudiocpp\Device.cxx\r
-\r
-!IF "$(CFG)" == "static_library - Win32 Release"\r
-\r
-!ELSEIF "$(CFG)" == "static_library - Win32 Debug"\r
-\r
-# SUBTRACT CPP /YX\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\source\portaudiocpp\DirectionSpecificStreamParameters.cxx\r
-\r
-!IF "$(CFG)" == "static_library - Win32 Release"\r
-\r
-!ELSEIF "$(CFG)" == "static_library - Win32 Debug"\r
-\r
-# SUBTRACT CPP /YX\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\source\portaudiocpp\Exception.cxx\r
-\r
-!IF "$(CFG)" == "static_library - Win32 Release"\r
-\r
-!ELSEIF "$(CFG)" == "static_library - Win32 Debug"\r
-\r
-# SUBTRACT CPP /YX\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\source\portaudiocpp\HostApi.cxx\r
-\r
-!IF "$(CFG)" == "static_library - Win32 Release"\r
-\r
-!ELSEIF "$(CFG)" == "static_library - Win32 Debug"\r
-\r
-# SUBTRACT CPP /YX\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\source\portaudiocpp\InterfaceCallbackStream.cxx\r
-\r
-!IF "$(CFG)" == "static_library - Win32 Release"\r
-\r
-!ELSEIF "$(CFG)" == "static_library - Win32 Debug"\r
-\r
-# SUBTRACT CPP /YX\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\source\portaudiocpp\MemFunCallbackStream.cxx\r
-\r
-!IF "$(CFG)" == "static_library - Win32 Release"\r
-\r
-!ELSEIF "$(CFG)" == "static_library - Win32 Debug"\r
-\r
-# SUBTRACT CPP /YX\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\source\portaudiocpp\Stream.cxx\r
-\r
-!IF "$(CFG)" == "static_library - Win32 Release"\r
-\r
-!ELSEIF "$(CFG)" == "static_library - Win32 Debug"\r
-\r
-# SUBTRACT CPP /YX\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\source\portaudiocpp\StreamParameters.cxx\r
-\r
-!IF "$(CFG)" == "static_library - Win32 Release"\r
-\r
-!ELSEIF "$(CFG)" == "static_library - Win32 Debug"\r
-\r
-# SUBTRACT CPP /YX\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\source\portaudiocpp\System.cxx\r
-\r
-!IF "$(CFG)" == "static_library - Win32 Release"\r
-\r
-!ELSEIF "$(CFG)" == "static_library - Win32 Debug"\r
-\r
-# SUBTRACT CPP /YX\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\source\portaudiocpp\SystemDeviceIterator.cxx\r
-\r
-!IF "$(CFG)" == "static_library - Win32 Release"\r
-\r
-!ELSEIF "$(CFG)" == "static_library - Win32 Debug"\r
-\r
-# SUBTRACT CPP /YX\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\source\portaudiocpp\SystemHostApiIterator.cxx\r
-\r
-!IF "$(CFG)" == "static_library - Win32 Release"\r
-\r
-!ELSEIF "$(CFG)" == "static_library - Win32 Debug"\r
-\r
-# SUBTRACT CPP /YX\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# End Group\r
-# Begin Group "Header Files"\r
-\r
-# PROP Default_Filter "h;hpp;hxx;hm;inl"\r
-# Begin Source File\r
-\r
-SOURCE=..\..\include\portaudiocpp\AsioDeviceAdapter.hxx\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\include\portaudiocpp\AutoSystem.hxx\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\include\portaudiocpp\BlockingStream.hxx\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\include\portaudiocpp\CallbackInterface.hxx\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\include\portaudiocpp\CallbackStream.hxx\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\include\portaudiocpp\CFunCallbackStream.hxx\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\include\portaudiocpp\CppFunCallbackStream.hxx\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\include\portaudiocpp\Device.hxx\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\include\portaudiocpp\DirectionSpecificStreamParameters.hxx\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\include\portaudiocpp\Exception.hxx\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\include\portaudiocpp\HostApi.hxx\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\include\portaudiocpp\InterfaceCallbackStream.hxx\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\include\portaudiocpp\MemFunCallbackStream.hxx\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\include\portaudiocpp\PortAudioCpp.hxx\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\include\portaudiocpp\SampleDataFormat.hxx\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\include\portaudiocpp\Stream.hxx\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\include\portaudiocpp\StreamParameters.hxx\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\include\portaudiocpp\System.hxx\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\include\portaudiocpp\SystemDeviceIterator.hxx\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\include\portaudiocpp\SystemHostApiIterator.hxx\r
-# End Source File\r
-# End Group\r
-# End Target\r
-# End Project\r
+# Microsoft Developer Studio Project File - Name="static_library" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Static Library" 0x0104
+
+CFG=static_library - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "static_library.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "static_library.mak" CFG="static_library - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "static_library - Win32 Release" (based on "Win32 (x86) Static Library")
+!MESSAGE "static_library - Win32 Debug" (based on "Win32 (x86) Static Library")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "static_library - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
+# ADD CPP /nologo /MTd /W3 /GX /O2 /I "../../include/" /I "../../../../include/" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x809 /d "NDEBUG"
+# ADD RSC /l 0x809 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo /out:"../../lib/portaudiocpp-vc6-r.lib"
+
+!ELSEIF "$(CFG)" == "static_library - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include/" /I "../../../../include/" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /FD /GZ /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x809 /d "_DEBUG"
+# ADD RSC /l 0x809 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo /out:"../../lib/portaudiocpp-vc6-d.lib"
+
+!ENDIF
+
+# Begin Target
+
+# Name "static_library - Win32 Release"
+# Name "static_library - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=..\..\source\portaudiocpp\AsioDeviceAdapter.cxx
+
+!IF "$(CFG)" == "static_library - Win32 Release"
+
+!ELSEIF "$(CFG)" == "static_library - Win32 Debug"
+
+# SUBTRACT CPP /YX
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\source\portaudiocpp\BlockingStream.cxx
+
+!IF "$(CFG)" == "static_library - Win32 Release"
+
+!ELSEIF "$(CFG)" == "static_library - Win32 Debug"
+
+# SUBTRACT CPP /YX
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\source\portaudiocpp\CallbackInterface.cxx
+
+!IF "$(CFG)" == "static_library - Win32 Release"
+
+!ELSEIF "$(CFG)" == "static_library - Win32 Debug"
+
+# SUBTRACT CPP /YX
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\source\portaudiocpp\CallbackStream.cxx
+
+!IF "$(CFG)" == "static_library - Win32 Release"
+
+!ELSEIF "$(CFG)" == "static_library - Win32 Debug"
+
+# SUBTRACT CPP /YX
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\source\portaudiocpp\CFunCallbackStream.cxx
+
+!IF "$(CFG)" == "static_library - Win32 Release"
+
+!ELSEIF "$(CFG)" == "static_library - Win32 Debug"
+
+# SUBTRACT CPP /YX
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\source\portaudiocpp\CppFunCallbackStream.cxx
+
+!IF "$(CFG)" == "static_library - Win32 Release"
+
+!ELSEIF "$(CFG)" == "static_library - Win32 Debug"
+
+# SUBTRACT CPP /YX
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\source\portaudiocpp\Device.cxx
+
+!IF "$(CFG)" == "static_library - Win32 Release"
+
+!ELSEIF "$(CFG)" == "static_library - Win32 Debug"
+
+# SUBTRACT CPP /YX
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\source\portaudiocpp\DirectionSpecificStreamParameters.cxx
+
+!IF "$(CFG)" == "static_library - Win32 Release"
+
+!ELSEIF "$(CFG)" == "static_library - Win32 Debug"
+
+# SUBTRACT CPP /YX
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\source\portaudiocpp\Exception.cxx
+
+!IF "$(CFG)" == "static_library - Win32 Release"
+
+!ELSEIF "$(CFG)" == "static_library - Win32 Debug"
+
+# SUBTRACT CPP /YX
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\source\portaudiocpp\HostApi.cxx
+
+!IF "$(CFG)" == "static_library - Win32 Release"
+
+!ELSEIF "$(CFG)" == "static_library - Win32 Debug"
+
+# SUBTRACT CPP /YX
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\source\portaudiocpp\InterfaceCallbackStream.cxx
+
+!IF "$(CFG)" == "static_library - Win32 Release"
+
+!ELSEIF "$(CFG)" == "static_library - Win32 Debug"
+
+# SUBTRACT CPP /YX
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\source\portaudiocpp\MemFunCallbackStream.cxx
+
+!IF "$(CFG)" == "static_library - Win32 Release"
+
+!ELSEIF "$(CFG)" == "static_library - Win32 Debug"
+
+# SUBTRACT CPP /YX
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\source\portaudiocpp\Stream.cxx
+
+!IF "$(CFG)" == "static_library - Win32 Release"
+
+!ELSEIF "$(CFG)" == "static_library - Win32 Debug"
+
+# SUBTRACT CPP /YX
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\source\portaudiocpp\StreamParameters.cxx
+
+!IF "$(CFG)" == "static_library - Win32 Release"
+
+!ELSEIF "$(CFG)" == "static_library - Win32 Debug"
+
+# SUBTRACT CPP /YX
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\source\portaudiocpp\System.cxx
+
+!IF "$(CFG)" == "static_library - Win32 Release"
+
+!ELSEIF "$(CFG)" == "static_library - Win32 Debug"
+
+# SUBTRACT CPP /YX
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\source\portaudiocpp\SystemDeviceIterator.cxx
+
+!IF "$(CFG)" == "static_library - Win32 Release"
+
+!ELSEIF "$(CFG)" == "static_library - Win32 Debug"
+
+# SUBTRACT CPP /YX
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\source\portaudiocpp\SystemHostApiIterator.cxx
+
+!IF "$(CFG)" == "static_library - Win32 Release"
+
+!ELSEIF "$(CFG)" == "static_library - Win32 Debug"
+
+# SUBTRACT CPP /YX
+
+!ENDIF
+
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=..\..\include\portaudiocpp\AsioDeviceAdapter.hxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\portaudiocpp\AutoSystem.hxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\portaudiocpp\BlockingStream.hxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\portaudiocpp\CallbackInterface.hxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\portaudiocpp\CallbackStream.hxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\portaudiocpp\CFunCallbackStream.hxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\portaudiocpp\CppFunCallbackStream.hxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\portaudiocpp\Device.hxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\portaudiocpp\DirectionSpecificStreamParameters.hxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\portaudiocpp\Exception.hxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\portaudiocpp\HostApi.hxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\portaudiocpp\InterfaceCallbackStream.hxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\portaudiocpp\MemFunCallbackStream.hxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\portaudiocpp\PortAudioCpp.hxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\portaudiocpp\SampleDataFormat.hxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\portaudiocpp\Stream.hxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\portaudiocpp\StreamParameters.hxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\portaudiocpp\System.hxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\portaudiocpp\SystemDeviceIterator.hxx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\portaudiocpp\SystemHostApiIterator.hxx
+# End Source File
+# End Group
+# End Target
+# End Project
-Microsoft Developer Studio Workspace File, Format Version 6.00\r
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!\r
-\r
-###############################################################################\r
-\r
-Project: "static_library"=".\static_library.dsp" - Package Owner=<4>\r
-\r
-Package=<5>\r
-{{{\r
-}}}\r
-\r
-Package=<4>\r
-{{{\r
-}}}\r
-\r
-###############################################################################\r
-\r
-Global:\r
-\r
-Package=<5>\r
-{{{\r
-}}}\r
-\r
-Package=<3>\r
-{{{\r
-}}}\r
-\r
-###############################################################################\r
-\r
+Microsoft Developer Studio Workspace File, Format Version 6.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+
+Project: "static_library"=".\static_library.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+
-Microsoft Visual Studio Solution File, Format Version 8.00\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "devs_example", "devs_example.vcproj", "{1B9A038D-80A3-4DBD-9F0D-AF10B49B863A}"\r
- ProjectSection(ProjectDependencies) = postProject\r
- {D18EA0C9-8C65-441D-884C-55EB43A84F2A} = {D18EA0C9-8C65-441D-884C-55EB43A84F2A}\r
- EndProjectSection\r
-EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "static_library", "static_library.vcproj", "{D18EA0C9-8C65-441D-884C-55EB43A84F2A}"\r
- ProjectSection(ProjectDependencies) = postProject\r
- EndProjectSection\r
-EndProject\r
-Global\r
- GlobalSection(SolutionConfiguration) = preSolution\r
- Debug = Debug\r
- Release = Release\r
- EndGlobalSection\r
- GlobalSection(ProjectConfiguration) = postSolution\r
- {1B9A038D-80A3-4DBD-9F0D-AF10B49B863A}.Debug.ActiveCfg = Debug|Win32\r
- {1B9A038D-80A3-4DBD-9F0D-AF10B49B863A}.Debug.Build.0 = Debug|Win32\r
- {1B9A038D-80A3-4DBD-9F0D-AF10B49B863A}.Release.ActiveCfg = Release|Win32\r
- {1B9A038D-80A3-4DBD-9F0D-AF10B49B863A}.Release.Build.0 = Release|Win32\r
- {D18EA0C9-8C65-441D-884C-55EB43A84F2A}.Debug.ActiveCfg = Debug|Win32\r
- {D18EA0C9-8C65-441D-884C-55EB43A84F2A}.Debug.Build.0 = Debug|Win32\r
- {D18EA0C9-8C65-441D-884C-55EB43A84F2A}.Release.ActiveCfg = Release|Win32\r
- {D18EA0C9-8C65-441D-884C-55EB43A84F2A}.Release.Build.0 = Release|Win32\r
- EndGlobalSection\r
- GlobalSection(ExtensibilityGlobals) = postSolution\r
- EndGlobalSection\r
- GlobalSection(ExtensibilityAddIns) = postSolution\r
- EndGlobalSection\r
-EndGlobal\r
+Microsoft Visual Studio Solution File, Format Version 8.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "devs_example", "devs_example.vcproj", "{1B9A038D-80A3-4DBD-9F0D-AF10B49B863A}"
+ ProjectSection(ProjectDependencies) = postProject
+ {D18EA0C9-8C65-441D-884C-55EB43A84F2A} = {D18EA0C9-8C65-441D-884C-55EB43A84F2A}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "static_library", "static_library.vcproj", "{D18EA0C9-8C65-441D-884C-55EB43A84F2A}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Global
+ GlobalSection(SolutionConfiguration) = preSolution
+ Debug = Debug
+ Release = Release
+ EndGlobalSection
+ GlobalSection(ProjectConfiguration) = postSolution
+ {1B9A038D-80A3-4DBD-9F0D-AF10B49B863A}.Debug.ActiveCfg = Debug|Win32
+ {1B9A038D-80A3-4DBD-9F0D-AF10B49B863A}.Debug.Build.0 = Debug|Win32
+ {1B9A038D-80A3-4DBD-9F0D-AF10B49B863A}.Release.ActiveCfg = Release|Win32
+ {1B9A038D-80A3-4DBD-9F0D-AF10B49B863A}.Release.Build.0 = Release|Win32
+ {D18EA0C9-8C65-441D-884C-55EB43A84F2A}.Debug.ActiveCfg = Debug|Win32
+ {D18EA0C9-8C65-441D-884C-55EB43A84F2A}.Debug.Build.0 = Debug|Win32
+ {D18EA0C9-8C65-441D-884C-55EB43A84F2A}.Release.ActiveCfg = Release|Win32
+ {D18EA0C9-8C65-441D-884C-55EB43A84F2A}.Release.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ EndGlobalSection
+ GlobalSection(ExtensibilityAddIns) = postSolution
+ EndGlobalSection
+EndGlobal
-<?xml version="1.0" encoding="Windows-1252"?>\r
-<VisualStudioProject\r
- ProjectType="Visual C++"\r
- Version="7.10"\r
- Name="devs_example"\r
- ProjectGUID="{1B9A038D-80A3-4DBD-9F0D-AF10B49B863A}"\r
- Keyword="Win32Proj">\r
- <Platforms>\r
- <Platform\r
- Name="Win32"/>\r
- </Platforms>\r
- <Configurations>\r
- <Configuration\r
- Name="Debug|Win32"\r
- OutputDirectory="Debug"\r
- IntermediateDirectory="Debug"\r
- ConfigurationType="1"\r
- CharacterSet="2">\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- Optimization="0"\r
- AdditionalIncludeDirectories="../../include/;../../../../include/;../../../../src/common/;../../../../../asiosdk2/common/,../../../../../asiosdk2/host/,../../../../../asiosdk2/host/pc/"\r
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"\r
- MinimalRebuild="TRUE"\r
- BasicRuntimeChecks="3"\r
- RuntimeLibrary="3"\r
- UsePrecompiledHeader="0"\r
- ProgramDataBaseFileName="$(IntDir)/vc71.pdb"\r
- WarningLevel="3"\r
- Detect64BitPortabilityProblems="TRUE"\r
- DebugInformationFormat="3"/>\r
- <Tool\r
- Name="VCCustomBuildTool"/>\r
- <Tool\r
- Name="VCLinkerTool"\r
- AdditionalDependencies="../../lib/portaudiocpp-vc7_1-d.lib"\r
- OutputFile="../../bin/devs_example.exe"\r
- LinkIncremental="2"\r
- GenerateDebugInformation="TRUE"\r
- ProgramDatabaseFile="$(OutDir)/devs_example.pdb"\r
- SubSystem="1"\r
- TargetMachine="1"/>\r
- <Tool\r
- Name="VCMIDLTool"/>\r
- <Tool\r
- Name="VCPostBuildEventTool"/>\r
- <Tool\r
- Name="VCPreBuildEventTool"/>\r
- <Tool\r
- Name="VCPreLinkEventTool"/>\r
- <Tool\r
- Name="VCResourceCompilerTool"/>\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"/>\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"/>\r
- <Tool\r
- Name="VCWebDeploymentTool"/>\r
- <Tool\r
- Name="VCManagedWrapperGeneratorTool"/>\r
- <Tool\r
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>\r
- </Configuration>\r
- <Configuration\r
- Name="Release|Win32"\r
- OutputDirectory="Release"\r
- IntermediateDirectory="Release"\r
- ConfigurationType="1"\r
- CharacterSet="2">\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories="../../include/;../../../../include/;../../../../src/common/;../../../../../asiosdk2/common/,../../../../../asiosdk2/host/,../../../../../asiosdk2/host/pc/"\r
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"\r
- RuntimeLibrary="2"\r
- UsePrecompiledHeader="0"\r
- ProgramDataBaseFileName="$(IntDir)/vc71.pdb"\r
- WarningLevel="3"\r
- Detect64BitPortabilityProblems="TRUE"\r
- DebugInformationFormat="3"/>\r
- <Tool\r
- Name="VCCustomBuildTool"/>\r
- <Tool\r
- Name="VCLinkerTool"\r
- AdditionalDependencies="../../lib/portaudiocpp-vc7_1-r.lib"\r
- OutputFile="../../bin/devs_example.exe"\r
- LinkIncremental="1"\r
- GenerateDebugInformation="TRUE"\r
- SubSystem="1"\r
- OptimizeReferences="2"\r
- EnableCOMDATFolding="2"\r
- TargetMachine="1"/>\r
- <Tool\r
- Name="VCMIDLTool"/>\r
- <Tool\r
- Name="VCPostBuildEventTool"/>\r
- <Tool\r
- Name="VCPreBuildEventTool"/>\r
- <Tool\r
- Name="VCPreLinkEventTool"/>\r
- <Tool\r
- Name="VCResourceCompilerTool"/>\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"/>\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"/>\r
- <Tool\r
- Name="VCWebDeploymentTool"/>\r
- <Tool\r
- Name="VCManagedWrapperGeneratorTool"/>\r
- <Tool\r
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>\r
- </Configuration>\r
- </Configurations>\r
- <References>\r
- </References>\r
- <Files>\r
- <Filter\r
- Name="Files"\r
- Filter="">\r
- <File\r
- RelativePath="..\..\example\devs.cxx">\r
- </File>\r
- </Filter>\r
- <Filter\r
- Name="PortAudio v19 Files"\r
- Filter="">\r
- <File\r
- RelativePath="..\..\..\..\src\common\pa_allocation.c">\r
- </File>\r
- <File\r
- RelativePath="..\..\..\..\src\hostapi\asio\pa_asio.cpp">\r
- </File>\r
- <File\r
- RelativePath="..\..\..\..\src\common\pa_converters.c">\r
- </File>\r
- <File\r
- RelativePath="..\..\..\..\src\common\pa_cpuload.c">\r
- </File>\r
- <File\r
- RelativePath="..\..\..\..\src\common\pa_dither.c">\r
- </File>\r
- <File\r
- RelativePath="..\..\..\..\src\common\pa_front.c">\r
- </File>\r
- <File\r
- RelativePath="..\..\..\..\src\common\pa_process.c">\r
- </File>\r
- <File\r
- RelativePath="..\..\..\..\src\hostapi\skeleton\pa_hostapi_skeleton.c">\r
- </File>\r
- <File\r
- RelativePath="..\..\..\..\src\common\pa_stream.c">\r
- </File>\r
- <File\r
- RelativePath="..\..\..\..\src\common\pa_trace.c">\r
- </File>\r
- <File\r
- RelativePath="..\..\..\..\src\hostapi\dsound\pa_win_ds.c">\r
- </File>\r
- <File\r
- RelativePath="..\..\..\..\src\hostapi\dsound\pa_win_ds_dynlink.c">\r
- </File>\r
- <File\r
- RelativePath="..\..\..\..\src\os\win\pa_win_hostapis.c">\r
- </File>\r
- <File\r
- RelativePath="..\..\..\..\src\os\win\pa_win_util.c">\r
- </File>\r
- <File\r
- RelativePath="..\..\..\..\src\hostapi\wasapi\pa_win_wasapi.cpp">\r
- </File>\r
- <File\r
- RelativePath="..\..\..\..\src\hostapi\wmme\pa_win_wmme.c">\r
- </File>\r
- <File\r
- RelativePath="..\..\..\..\src\os\win\pa_x86_plain_converters.c">\r
- </File>\r
- </Filter>\r
- <Filter\r
- Name="ASIO 2 SDK Files"\r
- Filter="">\r
- <File\r
- RelativePath="..\..\..\..\..\asiosdk2\common\asio.cpp">\r
- </File>\r
- <File\r
- RelativePath="..\..\..\..\..\asiosdk2\host\asiodrivers.cpp">\r
- </File>\r
- <File\r
- RelativePath="..\..\..\..\..\asiosdk2\host\pc\asiolist.cpp">\r
- </File>\r
- </Filter>\r
- </Files>\r
- <Globals>\r
- </Globals>\r
-</VisualStudioProject>\r
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.10"
+ Name="devs_example"
+ ProjectGUID="{1B9A038D-80A3-4DBD-9F0D-AF10B49B863A}"
+ Keyword="Win32Proj">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="Debug"
+ IntermediateDirectory="Debug"
+ ConfigurationType="1"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../include/;../../../../include/;../../../../src/common/;../../../../../asiosdk2/common/,../../../../../asiosdk2/host/,../../../../../asiosdk2/host/pc/"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ MinimalRebuild="TRUE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ ProgramDataBaseFileName="$(IntDir)/vc71.pdb"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="3"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="../../lib/portaudiocpp-vc7_1-d.lib"
+ OutputFile="../../bin/devs_example.exe"
+ LinkIncremental="2"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(OutDir)/devs_example.pdb"
+ SubSystem="1"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="Release"
+ IntermediateDirectory="Release"
+ ConfigurationType="1"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="../../include/;../../../../include/;../../../../src/common/;../../../../../asiosdk2/common/,../../../../../asiosdk2/host/,../../../../../asiosdk2/host/pc/"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ ProgramDataBaseFileName="$(IntDir)/vc71.pdb"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="3"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="../../lib/portaudiocpp-vc7_1-r.lib"
+ OutputFile="../../bin/devs_example.exe"
+ LinkIncremental="1"
+ GenerateDebugInformation="TRUE"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Files"
+ Filter="">
+ <File
+ RelativePath="..\..\example\devs.cxx">
+ </File>
+ </Filter>
+ <Filter
+ Name="PortAudio v19 Files"
+ Filter="">
+ <File
+ RelativePath="..\..\..\..\src\common\pa_allocation.c">
+ </File>
+ <File
+ RelativePath="..\..\..\..\src\hostapi\asio\pa_asio.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\..\src\common\pa_converters.c">
+ </File>
+ <File
+ RelativePath="..\..\..\..\src\common\pa_cpuload.c">
+ </File>
+ <File
+ RelativePath="..\..\..\..\src\common\pa_dither.c">
+ </File>
+ <File
+ RelativePath="..\..\..\..\src\common\pa_front.c">
+ </File>
+ <File
+ RelativePath="..\..\..\..\src\common\pa_process.c">
+ </File>
+ <File
+ RelativePath="..\..\..\..\src\hostapi\skeleton\pa_hostapi_skeleton.c">
+ </File>
+ <File
+ RelativePath="..\..\..\..\src\common\pa_stream.c">
+ </File>
+ <File
+ RelativePath="..\..\..\..\src\common\pa_trace.c">
+ </File>
+ <File
+ RelativePath="..\..\..\..\src\hostapi\dsound\pa_win_ds.c">
+ </File>
+ <File
+ RelativePath="..\..\..\..\src\hostapi\dsound\pa_win_ds_dynlink.c">
+ </File>
+ <File
+ RelativePath="..\..\..\..\src\os\win\pa_win_hostapis.c">
+ </File>
+ <File
+ RelativePath="..\..\..\..\src\os\win\pa_win_util.c">
+ </File>
+ <File
+ RelativePath="..\..\..\..\src\hostapi\wasapi\pa_win_wasapi.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\..\src\hostapi\wmme\pa_win_wmme.c">
+ </File>
+ <File
+ RelativePath="..\..\..\..\src\os\win\pa_x86_plain_converters.c">
+ </File>
+ </Filter>
+ <Filter
+ Name="ASIO 2 SDK Files"
+ Filter="">
+ <File
+ RelativePath="..\..\..\..\..\asiosdk2\common\asio.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\..\..\asiosdk2\host\asiodrivers.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\..\..\asiosdk2\host\pc\asiolist.cpp">
+ </File>
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
-Microsoft Visual Studio Solution File, Format Version 8.00\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sine_example", "sine_example.vcproj", "{1B9A038D-80A3-4DBD-9F0D-AF10B49B863A}"\r
- ProjectSection(ProjectDependencies) = postProject\r
- {D18EA0C9-8C65-441D-884C-55EB43A84F2A} = {D18EA0C9-8C65-441D-884C-55EB43A84F2A}\r
- EndProjectSection\r
-EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "static_library", "static_library.vcproj", "{D18EA0C9-8C65-441D-884C-55EB43A84F2A}"\r
- ProjectSection(ProjectDependencies) = postProject\r
- EndProjectSection\r
-EndProject\r
-Global\r
- GlobalSection(SolutionConfiguration) = preSolution\r
- Debug = Debug\r
- Release = Release\r
- EndGlobalSection\r
- GlobalSection(ProjectConfiguration) = postSolution\r
- {1B9A038D-80A3-4DBD-9F0D-AF10B49B863A}.Debug.ActiveCfg = Debug|Win32\r
- {1B9A038D-80A3-4DBD-9F0D-AF10B49B863A}.Debug.Build.0 = Debug|Win32\r
- {1B9A038D-80A3-4DBD-9F0D-AF10B49B863A}.Release.ActiveCfg = Release|Win32\r
- {1B9A038D-80A3-4DBD-9F0D-AF10B49B863A}.Release.Build.0 = Release|Win32\r
- {D18EA0C9-8C65-441D-884C-55EB43A84F2A}.Debug.ActiveCfg = Debug|Win32\r
- {D18EA0C9-8C65-441D-884C-55EB43A84F2A}.Debug.Build.0 = Debug|Win32\r
- {D18EA0C9-8C65-441D-884C-55EB43A84F2A}.Release.ActiveCfg = Release|Win32\r
- {D18EA0C9-8C65-441D-884C-55EB43A84F2A}.Release.Build.0 = Release|Win32\r
- EndGlobalSection\r
- GlobalSection(ExtensibilityGlobals) = postSolution\r
- EndGlobalSection\r
- GlobalSection(ExtensibilityAddIns) = postSolution\r
- EndGlobalSection\r
-EndGlobal\r
+Microsoft Visual Studio Solution File, Format Version 8.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sine_example", "sine_example.vcproj", "{1B9A038D-80A3-4DBD-9F0D-AF10B49B863A}"
+ ProjectSection(ProjectDependencies) = postProject
+ {D18EA0C9-8C65-441D-884C-55EB43A84F2A} = {D18EA0C9-8C65-441D-884C-55EB43A84F2A}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "static_library", "static_library.vcproj", "{D18EA0C9-8C65-441D-884C-55EB43A84F2A}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Global
+ GlobalSection(SolutionConfiguration) = preSolution
+ Debug = Debug
+ Release = Release
+ EndGlobalSection
+ GlobalSection(ProjectConfiguration) = postSolution
+ {1B9A038D-80A3-4DBD-9F0D-AF10B49B863A}.Debug.ActiveCfg = Debug|Win32
+ {1B9A038D-80A3-4DBD-9F0D-AF10B49B863A}.Debug.Build.0 = Debug|Win32
+ {1B9A038D-80A3-4DBD-9F0D-AF10B49B863A}.Release.ActiveCfg = Release|Win32
+ {1B9A038D-80A3-4DBD-9F0D-AF10B49B863A}.Release.Build.0 = Release|Win32
+ {D18EA0C9-8C65-441D-884C-55EB43A84F2A}.Debug.ActiveCfg = Debug|Win32
+ {D18EA0C9-8C65-441D-884C-55EB43A84F2A}.Debug.Build.0 = Debug|Win32
+ {D18EA0C9-8C65-441D-884C-55EB43A84F2A}.Release.ActiveCfg = Release|Win32
+ {D18EA0C9-8C65-441D-884C-55EB43A84F2A}.Release.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ EndGlobalSection
+ GlobalSection(ExtensibilityAddIns) = postSolution
+ EndGlobalSection
+EndGlobal
-<?xml version="1.0" encoding="Windows-1252"?>\r
-<VisualStudioProject\r
- ProjectType="Visual C++"\r
- Version="7.10"\r
- Name="sine_example"\r
- ProjectGUID="{1B9A038D-80A3-4DBD-9F0D-AF10B49B863A}"\r
- Keyword="Win32Proj">\r
- <Platforms>\r
- <Platform\r
- Name="Win32"/>\r
- </Platforms>\r
- <Configurations>\r
- <Configuration\r
- Name="Debug|Win32"\r
- OutputDirectory="Debug"\r
- IntermediateDirectory="Debug"\r
- ConfigurationType="1"\r
- CharacterSet="2">\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- Optimization="0"\r
- AdditionalIncludeDirectories="../../include/;../../../../include/;../../../../src/common/;../../../../../asiosdk2/common/,../../../../../asiosdk2/host/,../../../../../asiosdk2/host/pc/"\r
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"\r
- MinimalRebuild="TRUE"\r
- BasicRuntimeChecks="3"\r
- RuntimeLibrary="3"\r
- UsePrecompiledHeader="0"\r
- ProgramDataBaseFileName="$(IntDir)/vc71.pdb"\r
- WarningLevel="3"\r
- Detect64BitPortabilityProblems="TRUE"\r
- DebugInformationFormat="3"/>\r
- <Tool\r
- Name="VCCustomBuildTool"/>\r
- <Tool\r
- Name="VCLinkerTool"\r
- AdditionalDependencies="../../lib/portaudiocpp-vc7_1-d.lib"\r
- OutputFile="../../bin/sine_example.exe"\r
- LinkIncremental="2"\r
- GenerateDebugInformation="TRUE"\r
- ProgramDatabaseFile="$(OutDir)/sine_example.pdb"\r
- SubSystem="1"\r
- TargetMachine="1"/>\r
- <Tool\r
- Name="VCMIDLTool"/>\r
- <Tool\r
- Name="VCPostBuildEventTool"/>\r
- <Tool\r
- Name="VCPreBuildEventTool"/>\r
- <Tool\r
- Name="VCPreLinkEventTool"/>\r
- <Tool\r
- Name="VCResourceCompilerTool"/>\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"/>\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"/>\r
- <Tool\r
- Name="VCWebDeploymentTool"/>\r
- <Tool\r
- Name="VCManagedWrapperGeneratorTool"/>\r
- <Tool\r
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>\r
- </Configuration>\r
- <Configuration\r
- Name="Release|Win32"\r
- OutputDirectory="Release"\r
- IntermediateDirectory="Release"\r
- ConfigurationType="1"\r
- CharacterSet="2">\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories="../../include/;../../../../include/;../../../../src/common/;../../../../../asiosdk2/common/,../../../../../asiosdk2/host/,../../../../../asiosdk2/host/pc/"\r
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"\r
- RuntimeLibrary="2"\r
- UsePrecompiledHeader="0"\r
- ProgramDataBaseFileName="$(IntDir)/vc71.pdb"\r
- WarningLevel="3"\r
- Detect64BitPortabilityProblems="TRUE"\r
- DebugInformationFormat="3"/>\r
- <Tool\r
- Name="VCCustomBuildTool"/>\r
- <Tool\r
- Name="VCLinkerTool"\r
- AdditionalDependencies="../../lib/portaudiocpp-vc7_1-r.lib"\r
- OutputFile="../../bin/sine_example.exe"\r
- LinkIncremental="1"\r
- GenerateDebugInformation="TRUE"\r
- SubSystem="1"\r
- OptimizeReferences="2"\r
- EnableCOMDATFolding="2"\r
- TargetMachine="1"/>\r
- <Tool\r
- Name="VCMIDLTool"/>\r
- <Tool\r
- Name="VCPostBuildEventTool"/>\r
- <Tool\r
- Name="VCPreBuildEventTool"/>\r
- <Tool\r
- Name="VCPreLinkEventTool"/>\r
- <Tool\r
- Name="VCResourceCompilerTool"/>\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"/>\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"/>\r
- <Tool\r
- Name="VCWebDeploymentTool"/>\r
- <Tool\r
- Name="VCManagedWrapperGeneratorTool"/>\r
- <Tool\r
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>\r
- </Configuration>\r
- </Configurations>\r
- <References>\r
- </References>\r
- <Files>\r
- <Filter\r
- Name="Files"\r
- Filter="">\r
- <File\r
- RelativePath="..\..\example\sine.cxx">\r
- </File>\r
- </Filter>\r
- <Filter\r
- Name="PortAudio v19 Files"\r
- Filter="">\r
- <File\r
- RelativePath="..\..\..\..\src\common\pa_allocation.c">\r
- <FileConfiguration\r
- Name="Debug|Win32">\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- ObjectFile="$(IntDir)/$(InputName)1.obj"/>\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Release|Win32">\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- ObjectFile="$(IntDir)/$(InputName)1.obj"/>\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath="..\..\..\..\src\hostapi\asio\pa_asio.cpp">\r
- </File>\r
- <File\r
- RelativePath="..\..\..\..\src\common\pa_converters.c">\r
- <FileConfiguration\r
- Name="Debug|Win32">\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- ObjectFile="$(IntDir)/$(InputName)1.obj"/>\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Release|Win32">\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- ObjectFile="$(IntDir)/$(InputName)1.obj"/>\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath="..\..\..\..\src\common\pa_cpuload.c">\r
- <FileConfiguration\r
- Name="Debug|Win32">\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- ObjectFile="$(IntDir)/$(InputName)1.obj"/>\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Release|Win32">\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- ObjectFile="$(IntDir)/$(InputName)1.obj"/>\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath="..\..\..\..\src\common\pa_dither.c">\r
- <FileConfiguration\r
- Name="Debug|Win32">\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- ObjectFile="$(IntDir)/$(InputName)1.obj"/>\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Release|Win32">\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- ObjectFile="$(IntDir)/$(InputName)1.obj"/>\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath="..\..\..\..\src\common\pa_front.c">\r
- <FileConfiguration\r
- Name="Debug|Win32">\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- ObjectFile="$(IntDir)/$(InputName)1.obj"/>\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Release|Win32">\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- ObjectFile="$(IntDir)/$(InputName)1.obj"/>\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath="..\..\..\..\src\common\pa_process.c">\r
- <FileConfiguration\r
- Name="Debug|Win32">\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- ObjectFile="$(IntDir)/$(InputName)1.obj"/>\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Release|Win32">\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- ObjectFile="$(IntDir)/$(InputName)1.obj"/>\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath="..\..\..\..\src\hostapi\skeleton\pa_hostapi_skeleton.c">\r
- <FileConfiguration\r
- Name="Debug|Win32">\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- ObjectFile="$(IntDir)/$(InputName)1.obj"/>\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Release|Win32">\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- ObjectFile="$(IntDir)/$(InputName)1.obj"/>\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath="..\..\..\..\src\common\pa_stream.c">\r
- <FileConfiguration\r
- Name="Debug|Win32">\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- ObjectFile="$(IntDir)/$(InputName)1.obj"/>\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Release|Win32">\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- ObjectFile="$(IntDir)/$(InputName)1.obj"/>\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath="..\..\..\..\src\common\pa_trace.c">\r
- <FileConfiguration\r
- Name="Debug|Win32">\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- ObjectFile="$(IntDir)/$(InputName)1.obj"/>\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Release|Win32">\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- ObjectFile="$(IntDir)/$(InputName)1.obj"/>\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath="..\..\..\..\src\hostapi\dsound\pa_win_ds.c">\r
- <FileConfiguration\r
- Name="Debug|Win32">\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- ObjectFile="$(IntDir)/$(InputName)1.obj"/>\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Release|Win32">\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- ObjectFile="$(IntDir)/$(InputName)1.obj"/>\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath="..\..\..\..\src\hostapi\dsound\pa_win_ds_dynlink.c">\r
- </File>\r
- <File\r
- RelativePath="..\..\..\..\src\os\win\pa_win_hostapis.c">\r
- </File>\r
- <File\r
- RelativePath="..\..\..\..\src\os\win\pa_win_util.c">\r
- </File>\r
- <File\r
- RelativePath="..\..\..\..\src\hostapi\wasapi\pa_win_wasapi.cpp">\r
- </File>\r
- <File\r
- RelativePath="..\..\..\..\src\hostapi\wmme\pa_win_wmme.c">\r
- <FileConfiguration\r
- Name="Debug|Win32">\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- ObjectFile="$(IntDir)/$(InputName)1.obj"/>\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Release|Win32">\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- ObjectFile="$(IntDir)/$(InputName)1.obj"/>\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath="..\..\..\..\src\os\win\pa_x86_plain_converters.c">\r
- </File>\r
- </Filter>\r
- <Filter\r
- Name="ASIO 2 SDK Files"\r
- Filter="">\r
- <File\r
- RelativePath="..\..\..\..\..\asiosdk2\common\asio.cpp">\r
- </File>\r
- <File\r
- RelativePath="..\..\..\..\..\asiosdk2\host\asiodrivers.cpp">\r
- </File>\r
- <File\r
- RelativePath="..\..\..\..\..\asiosdk2\host\pc\asiolist.cpp">\r
- </File>\r
- </Filter>\r
- </Files>\r
- <Globals>\r
- </Globals>\r
-</VisualStudioProject>\r
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.10"
+ Name="sine_example"
+ ProjectGUID="{1B9A038D-80A3-4DBD-9F0D-AF10B49B863A}"
+ Keyword="Win32Proj">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="Debug"
+ IntermediateDirectory="Debug"
+ ConfigurationType="1"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../include/;../../../../include/;../../../../src/common/;../../../../../asiosdk2/common/,../../../../../asiosdk2/host/,../../../../../asiosdk2/host/pc/"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ MinimalRebuild="TRUE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ ProgramDataBaseFileName="$(IntDir)/vc71.pdb"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="3"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="../../lib/portaudiocpp-vc7_1-d.lib"
+ OutputFile="../../bin/sine_example.exe"
+ LinkIncremental="2"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(OutDir)/sine_example.pdb"
+ SubSystem="1"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="Release"
+ IntermediateDirectory="Release"
+ ConfigurationType="1"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="../../include/;../../../../include/;../../../../src/common/;../../../../../asiosdk2/common/,../../../../../asiosdk2/host/,../../../../../asiosdk2/host/pc/"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ ProgramDataBaseFileName="$(IntDir)/vc71.pdb"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="3"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="../../lib/portaudiocpp-vc7_1-r.lib"
+ OutputFile="../../bin/sine_example.exe"
+ LinkIncremental="1"
+ GenerateDebugInformation="TRUE"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Files"
+ Filter="">
+ <File
+ RelativePath="..\..\example\sine.cxx">
+ </File>
+ </Filter>
+ <Filter
+ Name="PortAudio v19 Files"
+ Filter="">
+ <File
+ RelativePath="..\..\..\..\src\common\pa_allocation.c">
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ ObjectFile="$(IntDir)/$(InputName)1.obj"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ ObjectFile="$(IntDir)/$(InputName)1.obj"/>
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\..\src\hostapi\asio\pa_asio.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\..\src\common\pa_converters.c">
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ ObjectFile="$(IntDir)/$(InputName)1.obj"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ ObjectFile="$(IntDir)/$(InputName)1.obj"/>
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\..\src\common\pa_cpuload.c">
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ ObjectFile="$(IntDir)/$(InputName)1.obj"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ ObjectFile="$(IntDir)/$(InputName)1.obj"/>
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\..\src\common\pa_dither.c">
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ ObjectFile="$(IntDir)/$(InputName)1.obj"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ ObjectFile="$(IntDir)/$(InputName)1.obj"/>
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\..\src\common\pa_front.c">
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ ObjectFile="$(IntDir)/$(InputName)1.obj"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ ObjectFile="$(IntDir)/$(InputName)1.obj"/>
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\..\src\common\pa_process.c">
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ ObjectFile="$(IntDir)/$(InputName)1.obj"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ ObjectFile="$(IntDir)/$(InputName)1.obj"/>
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\..\src\hostapi\skeleton\pa_hostapi_skeleton.c">
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ ObjectFile="$(IntDir)/$(InputName)1.obj"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ ObjectFile="$(IntDir)/$(InputName)1.obj"/>
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\..\src\common\pa_stream.c">
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ ObjectFile="$(IntDir)/$(InputName)1.obj"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ ObjectFile="$(IntDir)/$(InputName)1.obj"/>
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\..\src\common\pa_trace.c">
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ ObjectFile="$(IntDir)/$(InputName)1.obj"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ ObjectFile="$(IntDir)/$(InputName)1.obj"/>
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\..\src\hostapi\dsound\pa_win_ds.c">
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ ObjectFile="$(IntDir)/$(InputName)1.obj"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ ObjectFile="$(IntDir)/$(InputName)1.obj"/>
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\..\src\hostapi\dsound\pa_win_ds_dynlink.c">
+ </File>
+ <File
+ RelativePath="..\..\..\..\src\os\win\pa_win_hostapis.c">
+ </File>
+ <File
+ RelativePath="..\..\..\..\src\os\win\pa_win_util.c">
+ </File>
+ <File
+ RelativePath="..\..\..\..\src\hostapi\wasapi\pa_win_wasapi.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\..\src\hostapi\wmme\pa_win_wmme.c">
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ ObjectFile="$(IntDir)/$(InputName)1.obj"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ ObjectFile="$(IntDir)/$(InputName)1.obj"/>
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\..\src\os\win\pa_x86_plain_converters.c">
+ </File>
+ </Filter>
+ <Filter
+ Name="ASIO 2 SDK Files"
+ Filter="">
+ <File
+ RelativePath="..\..\..\..\..\asiosdk2\common\asio.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\..\..\asiosdk2\host\asiodrivers.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\..\..\asiosdk2\host\pc\asiolist.cpp">
+ </File>
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
-Microsoft Visual Studio Solution File, Format Version 8.00\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "static_library", "static_library.vcproj", "{D18EA0C9-8C65-441D-884C-55EB43A84F2A}"\r
- ProjectSection(ProjectDependencies) = postProject\r
- EndProjectSection\r
-EndProject\r
-Global\r
- GlobalSection(SolutionConfiguration) = preSolution\r
- Debug = Debug\r
- Release = Release\r
- EndGlobalSection\r
- GlobalSection(ProjectConfiguration) = postSolution\r
- {D18EA0C9-8C65-441D-884C-55EB43A84F2A}.Debug.ActiveCfg = Debug|Win32\r
- {D18EA0C9-8C65-441D-884C-55EB43A84F2A}.Debug.Build.0 = Debug|Win32\r
- {D18EA0C9-8C65-441D-884C-55EB43A84F2A}.Release.ActiveCfg = Release|Win32\r
- {D18EA0C9-8C65-441D-884C-55EB43A84F2A}.Release.Build.0 = Release|Win32\r
- EndGlobalSection\r
- GlobalSection(ExtensibilityGlobals) = postSolution\r
- EndGlobalSection\r
- GlobalSection(ExtensibilityAddIns) = postSolution\r
- EndGlobalSection\r
-EndGlobal\r
+Microsoft Visual Studio Solution File, Format Version 8.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "static_library", "static_library.vcproj", "{D18EA0C9-8C65-441D-884C-55EB43A84F2A}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Global
+ GlobalSection(SolutionConfiguration) = preSolution
+ Debug = Debug
+ Release = Release
+ EndGlobalSection
+ GlobalSection(ProjectConfiguration) = postSolution
+ {D18EA0C9-8C65-441D-884C-55EB43A84F2A}.Debug.ActiveCfg = Debug|Win32
+ {D18EA0C9-8C65-441D-884C-55EB43A84F2A}.Debug.Build.0 = Debug|Win32
+ {D18EA0C9-8C65-441D-884C-55EB43A84F2A}.Release.ActiveCfg = Release|Win32
+ {D18EA0C9-8C65-441D-884C-55EB43A84F2A}.Release.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ EndGlobalSection
+ GlobalSection(ExtensibilityAddIns) = postSolution
+ EndGlobalSection
+EndGlobal
-<?xml version="1.0" encoding="Windows-1252"?>\r
-<VisualStudioProject\r
- ProjectType="Visual C++"\r
- Version="7.10"\r
- Name="static_library"\r
- ProjectGUID="{D18EA0C9-8C65-441D-884C-55EB43A84F2A}"\r
- Keyword="Win32Proj">\r
- <Platforms>\r
- <Platform\r
- Name="Win32"/>\r
- </Platforms>\r
- <Configurations>\r
- <Configuration\r
- Name="Debug|Win32"\r
- OutputDirectory="../../lib/"\r
- IntermediateDirectory="Debug"\r
- ConfigurationType="4"\r
- CharacterSet="2">\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- Optimization="0"\r
- AdditionalIncludeDirectories="../../include/;../../../../include/"\r
- PreprocessorDefinitions="WIN32;_DEBUG;_LIB"\r
- MinimalRebuild="TRUE"\r
- BasicRuntimeChecks="3"\r
- RuntimeLibrary="3"\r
- UsePrecompiledHeader="0"\r
- ProgramDataBaseFileName="$(IntDir)/vc71.pdb"\r
- WarningLevel="3"\r
- Detect64BitPortabilityProblems="TRUE"\r
- DebugInformationFormat="3"/>\r
- <Tool\r
- Name="VCCustomBuildTool"/>\r
- <Tool\r
- Name="VCLibrarianTool"\r
- OutputFile="$(OutDir)/portaudiocpp-vc7_1-d.lib"/>\r
- <Tool\r
- Name="VCMIDLTool"/>\r
- <Tool\r
- Name="VCPostBuildEventTool"/>\r
- <Tool\r
- Name="VCPreBuildEventTool"/>\r
- <Tool\r
- Name="VCPreLinkEventTool"/>\r
- <Tool\r
- Name="VCResourceCompilerTool"/>\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"/>\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"/>\r
- <Tool\r
- Name="VCManagedWrapperGeneratorTool"/>\r
- <Tool\r
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>\r
- </Configuration>\r
- <Configuration\r
- Name="Release|Win32"\r
- OutputDirectory="../../lib/"\r
- IntermediateDirectory="Release"\r
- ConfigurationType="4"\r
- CharacterSet="2">\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories="../../include/;../../../../include/"\r
- PreprocessorDefinitions="WIN32;NDEBUG;_LIB"\r
- RuntimeLibrary="2"\r
- UsePrecompiledHeader="0"\r
- ProgramDataBaseFileName="$(IntDir)/vc71.pdb"\r
- WarningLevel="3"\r
- Detect64BitPortabilityProblems="TRUE"\r
- DebugInformationFormat="3"/>\r
- <Tool\r
- Name="VCCustomBuildTool"/>\r
- <Tool\r
- Name="VCLibrarianTool"\r
- OutputFile="$(OutDir)/portaudiocpp-vc7_1-r.lib"/>\r
- <Tool\r
- Name="VCMIDLTool"/>\r
- <Tool\r
- Name="VCPostBuildEventTool"/>\r
- <Tool\r
- Name="VCPreBuildEventTool"/>\r
- <Tool\r
- Name="VCPreLinkEventTool"/>\r
- <Tool\r
- Name="VCResourceCompilerTool"/>\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"/>\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"/>\r
- <Tool\r
- Name="VCManagedWrapperGeneratorTool"/>\r
- <Tool\r
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>\r
- </Configuration>\r
- </Configurations>\r
- <References>\r
- </References>\r
- <Files>\r
- <Filter\r
- Name="Files"\r
- Filter="">\r
- <File\r
- RelativePath="..\..\source\portaudiocpp\AsioDeviceAdapter.cxx">\r
- </File>\r
- <File\r
- RelativePath="..\..\include\portaudiocpp\AsioDeviceAdapter.hxx">\r
- </File>\r
- <File\r
- RelativePath="..\..\include\portaudiocpp\AutoSystem.hxx">\r
- </File>\r
- <File\r
- RelativePath="..\..\source\portaudiocpp\BlockingStream.cxx">\r
- </File>\r
- <File\r
- RelativePath="..\..\include\portaudiocpp\BlockingStream.hxx">\r
- </File>\r
- <File\r
- RelativePath="..\..\source\portaudiocpp\CallbackInterface.cxx">\r
- </File>\r
- <File\r
- RelativePath="..\..\include\portaudiocpp\CallbackInterface.hxx">\r
- </File>\r
- <File\r
- RelativePath="..\..\source\portaudiocpp\CallbackStream.cxx">\r
- </File>\r
- <File\r
- RelativePath="..\..\include\portaudiocpp\CallbackStream.hxx">\r
- </File>\r
- <File\r
- RelativePath="..\..\source\portaudiocpp\CFunCallbackStream.cxx">\r
- </File>\r
- <File\r
- RelativePath="..\..\include\portaudiocpp\CFunCallbackStream.hxx">\r
- </File>\r
- <File\r
- RelativePath="..\..\source\portaudiocpp\CppFunCallbackStream.cxx">\r
- </File>\r
- <File\r
- RelativePath="..\..\include\portaudiocpp\CppFunCallbackStream.hxx">\r
- </File>\r
- <File\r
- RelativePath="..\..\source\portaudiocpp\Device.cxx">\r
- </File>\r
- <File\r
- RelativePath="..\..\include\portaudiocpp\Device.hxx">\r
- </File>\r
- <File\r
- RelativePath="..\..\source\portaudiocpp\DirectionSpecificStreamParameters.cxx">\r
- </File>\r
- <File\r
- RelativePath="..\..\include\portaudiocpp\DirectionSpecificStreamParameters.hxx">\r
- </File>\r
- <File\r
- RelativePath="..\..\source\portaudiocpp\Exception.cxx">\r
- </File>\r
- <File\r
- RelativePath="..\..\include\portaudiocpp\Exception.hxx">\r
- </File>\r
- <File\r
- RelativePath="..\..\source\portaudiocpp\HostApi.cxx">\r
- </File>\r
- <File\r
- RelativePath="..\..\include\portaudiocpp\HostApi.hxx">\r
- </File>\r
- <File\r
- RelativePath="..\..\source\portaudiocpp\InterfaceCallbackStream.cxx">\r
- </File>\r
- <File\r
- RelativePath="..\..\include\portaudiocpp\InterfaceCallbackStream.hxx">\r
- </File>\r
- <File\r
- RelativePath="..\..\source\portaudiocpp\MemFunCallbackStream.cxx">\r
- </File>\r
- <File\r
- RelativePath="..\..\include\portaudiocpp\MemFunCallbackStream.hxx">\r
- </File>\r
- <File\r
- RelativePath="..\..\include\portaudiocpp\PortAudioCpp.hxx">\r
- </File>\r
- <File\r
- RelativePath="..\..\include\portaudiocpp\SampleDataFormat.hxx">\r
- </File>\r
- <File\r
- RelativePath="..\..\source\portaudiocpp\Stream.cxx">\r
- </File>\r
- <File\r
- RelativePath="..\..\include\portaudiocpp\Stream.hxx">\r
- </File>\r
- <File\r
- RelativePath="..\..\source\portaudiocpp\StreamParameters.cxx">\r
- </File>\r
- <File\r
- RelativePath="..\..\include\portaudiocpp\StreamParameters.hxx">\r
- </File>\r
- <File\r
- RelativePath="..\..\source\portaudiocpp\System.cxx">\r
- </File>\r
- <File\r
- RelativePath="..\..\include\portaudiocpp\System.hxx">\r
- </File>\r
- <File\r
- RelativePath="..\..\source\portaudiocpp\SystemDeviceIterator.cxx">\r
- </File>\r
- <File\r
- RelativePath="..\..\include\portaudiocpp\SystemDeviceIterator.hxx">\r
- </File>\r
- <File\r
- RelativePath="..\..\source\portaudiocpp\SystemHostApiIterator.cxx">\r
- </File>\r
- <File\r
- RelativePath="..\..\include\portaudiocpp\SystemHostApiIterator.hxx">\r
- </File>\r
- </Filter>\r
- </Files>\r
- <Globals>\r
- </Globals>\r
-</VisualStudioProject>\r
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.10"
+ Name="static_library"
+ ProjectGUID="{D18EA0C9-8C65-441D-884C-55EB43A84F2A}"
+ Keyword="Win32Proj">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="../../lib/"
+ IntermediateDirectory="Debug"
+ ConfigurationType="4"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../include/;../../../../include/"
+ PreprocessorDefinitions="WIN32;_DEBUG;_LIB"
+ MinimalRebuild="TRUE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ ProgramDataBaseFileName="$(IntDir)/vc71.pdb"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="3"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile="$(OutDir)/portaudiocpp-vc7_1-d.lib"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="../../lib/"
+ IntermediateDirectory="Release"
+ ConfigurationType="4"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="../../include/;../../../../include/"
+ PreprocessorDefinitions="WIN32;NDEBUG;_LIB"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ ProgramDataBaseFileName="$(IntDir)/vc71.pdb"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="3"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile="$(OutDir)/portaudiocpp-vc7_1-r.lib"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Files"
+ Filter="">
+ <File
+ RelativePath="..\..\source\portaudiocpp\AsioDeviceAdapter.cxx">
+ </File>
+ <File
+ RelativePath="..\..\include\portaudiocpp\AsioDeviceAdapter.hxx">
+ </File>
+ <File
+ RelativePath="..\..\include\portaudiocpp\AutoSystem.hxx">
+ </File>
+ <File
+ RelativePath="..\..\source\portaudiocpp\BlockingStream.cxx">
+ </File>
+ <File
+ RelativePath="..\..\include\portaudiocpp\BlockingStream.hxx">
+ </File>
+ <File
+ RelativePath="..\..\source\portaudiocpp\CallbackInterface.cxx">
+ </File>
+ <File
+ RelativePath="..\..\include\portaudiocpp\CallbackInterface.hxx">
+ </File>
+ <File
+ RelativePath="..\..\source\portaudiocpp\CallbackStream.cxx">
+ </File>
+ <File
+ RelativePath="..\..\include\portaudiocpp\CallbackStream.hxx">
+ </File>
+ <File
+ RelativePath="..\..\source\portaudiocpp\CFunCallbackStream.cxx">
+ </File>
+ <File
+ RelativePath="..\..\include\portaudiocpp\CFunCallbackStream.hxx">
+ </File>
+ <File
+ RelativePath="..\..\source\portaudiocpp\CppFunCallbackStream.cxx">
+ </File>
+ <File
+ RelativePath="..\..\include\portaudiocpp\CppFunCallbackStream.hxx">
+ </File>
+ <File
+ RelativePath="..\..\source\portaudiocpp\Device.cxx">
+ </File>
+ <File
+ RelativePath="..\..\include\portaudiocpp\Device.hxx">
+ </File>
+ <File
+ RelativePath="..\..\source\portaudiocpp\DirectionSpecificStreamParameters.cxx">
+ </File>
+ <File
+ RelativePath="..\..\include\portaudiocpp\DirectionSpecificStreamParameters.hxx">
+ </File>
+ <File
+ RelativePath="..\..\source\portaudiocpp\Exception.cxx">
+ </File>
+ <File
+ RelativePath="..\..\include\portaudiocpp\Exception.hxx">
+ </File>
+ <File
+ RelativePath="..\..\source\portaudiocpp\HostApi.cxx">
+ </File>
+ <File
+ RelativePath="..\..\include\portaudiocpp\HostApi.hxx">
+ </File>
+ <File
+ RelativePath="..\..\source\portaudiocpp\InterfaceCallbackStream.cxx">
+ </File>
+ <File
+ RelativePath="..\..\include\portaudiocpp\InterfaceCallbackStream.hxx">
+ </File>
+ <File
+ RelativePath="..\..\source\portaudiocpp\MemFunCallbackStream.cxx">
+ </File>
+ <File
+ RelativePath="..\..\include\portaudiocpp\MemFunCallbackStream.hxx">
+ </File>
+ <File
+ RelativePath="..\..\include\portaudiocpp\PortAudioCpp.hxx">
+ </File>
+ <File
+ RelativePath="..\..\include\portaudiocpp\SampleDataFormat.hxx">
+ </File>
+ <File
+ RelativePath="..\..\source\portaudiocpp\Stream.cxx">
+ </File>
+ <File
+ RelativePath="..\..\include\portaudiocpp\Stream.hxx">
+ </File>
+ <File
+ RelativePath="..\..\source\portaudiocpp\StreamParameters.cxx">
+ </File>
+ <File
+ RelativePath="..\..\include\portaudiocpp\StreamParameters.hxx">
+ </File>
+ <File
+ RelativePath="..\..\source\portaudiocpp\System.cxx">
+ </File>
+ <File
+ RelativePath="..\..\include\portaudiocpp\System.hxx">
+ </File>
+ <File
+ RelativePath="..\..\source\portaudiocpp\SystemDeviceIterator.cxx">
+ </File>
+ <File
+ RelativePath="..\..\include\portaudiocpp\SystemDeviceIterator.hxx">
+ </File>
+ <File
+ RelativePath="..\..\source\portaudiocpp\SystemHostApiIterator.cxx">
+ </File>
+ <File
+ RelativePath="..\..\include\portaudiocpp\SystemHostApiIterator.hxx">
+ </File>
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
-GNU/Linux:\r
-----------\r
-\r
-1) Download and install a recent version of Doxygen (preferably version 1.3.3 or \r
-later). See http://www.doxygen.org/.\r
-2) Download and install a recent version of GraphViz. See \r
-http://www.research.att.com/sw/tools/graphviz/.\r
-3) Run ``doxygen config.doxy.linux'' in this directory or load and generate the file \r
-config.doxy.linux from the Doxywizard application. Or alternatively ``make docs'' can \r
-be run from the build/gnu folder.\r
-\r
-The generated html documentation will be placed in /doc/api_reference/. To open \r
-the main page of the documentation, open the file /doc/api_reference/index.html in \r
-an html browser.\r
-\r
-\r
-Windows:\r
---------\r
-\r
-1) Download and install a recent Doxygen (preferably version 1.3.4 or later). See \r
-http://www.doxygen.org/.\r
-2) Download and install a recent version of GraphViz. See \r
-http://www.research.att.com/sw/tools/graphviz/.\r
-3) If needed, edit the config.doxy file in an ascii text editor so that \r
-``DOT_PATH'' variable points to the folder where GraphViz is installed.\r
-4) Run ``doxygen config.doxy'' in this directory or load and generate the file \r
-config.doxy from the Doxywizard application.\r
-\r
-The generated html documentation will be placed in /doc/api_reference/. To open \r
-the main page of the documentation, open the file /doc/api_reference/index.html in \r
-an html browser.\r
-\r
-\r
-\r
+GNU/Linux:
+----------
+
+1) Download and install a recent version of Doxygen (preferably version 1.3.3 or
+later). See http://www.doxygen.org/.
+2) Download and install a recent version of GraphViz. See
+http://www.research.att.com/sw/tools/graphviz/.
+3) Run ``doxygen config.doxy.linux'' in this directory or load and generate the file
+config.doxy.linux from the Doxywizard application. Or alternatively ``make docs'' can
+be run from the build/gnu folder.
+
+The generated html documentation will be placed in /doc/api_reference/. To open
+the main page of the documentation, open the file /doc/api_reference/index.html in
+an html browser.
+
+
+Windows:
+--------
+
+1) Download and install a recent Doxygen (preferably version 1.3.4 or later). See
+http://www.doxygen.org/.
+2) Download and install a recent version of GraphViz. See
+http://www.research.att.com/sw/tools/graphviz/.
+3) If needed, edit the config.doxy file in an ascii text editor so that
+``DOT_PATH'' variable points to the folder where GraphViz is installed.
+4) Run ``doxygen config.doxy'' in this directory or load and generate the file
+config.doxy from the Doxywizard application.
+
+The generated html documentation will be placed in /doc/api_reference/. To open
+the main page of the documentation, open the file /doc/api_reference/index.html in
+an html browser.
+
+
+
-# Doxyfile 1.3.3\r
-\r
-#---------------------------------------------------------------------------\r
-# General configuration options\r
-#---------------------------------------------------------------------------\r
-PROJECT_NAME = PortAudioCpp\r
-PROJECT_NUMBER = 2.0\r
-OUTPUT_DIRECTORY = ./\r
-OUTPUT_LANGUAGE = English\r
-USE_WINDOWS_ENCODING = YES\r
-EXTRACT_ALL = YES\r
-EXTRACT_PRIVATE = YES\r
-EXTRACT_STATIC = YES\r
-EXTRACT_LOCAL_CLASSES = YES\r
-HIDE_UNDOC_MEMBERS = NO\r
-HIDE_UNDOC_CLASSES = NO\r
-HIDE_FRIEND_COMPOUNDS = NO\r
-HIDE_IN_BODY_DOCS = NO\r
-BRIEF_MEMBER_DESC = YES\r
-REPEAT_BRIEF = YES\r
-ALWAYS_DETAILED_SEC = YES\r
-INLINE_INHERITED_MEMB = NO\r
-FULL_PATH_NAMES = NO\r
-STRIP_FROM_PATH = \r
-INTERNAL_DOCS = NO\r
-CASE_SENSE_NAMES = YES\r
-SHORT_NAMES = YES\r
-HIDE_SCOPE_NAMES = NO\r
-SHOW_INCLUDE_FILES = YES\r
-JAVADOC_AUTOBRIEF = NO\r
-MULTILINE_CPP_IS_BRIEF = NO\r
-DETAILS_AT_TOP = YES\r
-INHERIT_DOCS = YES\r
-INLINE_INFO = YES\r
-SORT_MEMBER_DOCS = NO\r
-DISTRIBUTE_GROUP_DOC = NO\r
-TAB_SIZE = 4\r
-GENERATE_TODOLIST = YES\r
-GENERATE_TESTLIST = YES\r
-GENERATE_BUGLIST = YES\r
-GENERATE_DEPRECATEDLIST= YES\r
-ALIASES = \r
-ENABLED_SECTIONS = \r
-MAX_INITIALIZER_LINES = 30\r
-OPTIMIZE_OUTPUT_FOR_C = NO\r
-OPTIMIZE_OUTPUT_JAVA = NO\r
-SHOW_USED_FILES = YES\r
-SUBGROUPING = YES\r
-#---------------------------------------------------------------------------\r
-# configuration options related to warning and progress messages\r
-#---------------------------------------------------------------------------\r
-QUIET = NO\r
-WARNINGS = YES\r
-WARN_IF_UNDOCUMENTED = YES\r
-WARN_IF_DOC_ERROR = YES\r
-WARN_FORMAT = "$file:$line: $text"\r
-WARN_LOGFILE = \r
-#---------------------------------------------------------------------------\r
-# configuration options related to the input files\r
-#---------------------------------------------------------------------------\r
-INPUT = ../source \\r
- ../include\r
-FILE_PATTERNS = *.hxx \\r
- *.cxx\r
-RECURSIVE = YES\r
-EXCLUDE = \r
-EXCLUDE_SYMLINKS = NO\r
-EXCLUDE_PATTERNS = \r
-EXAMPLE_PATH = \r
-EXAMPLE_PATTERNS = \r
-EXAMPLE_RECURSIVE = NO\r
-IMAGE_PATH = \r
-INPUT_FILTER = \r
-FILTER_SOURCE_FILES = NO\r
-#---------------------------------------------------------------------------\r
-# configuration options related to source browsing\r
-#---------------------------------------------------------------------------\r
-SOURCE_BROWSER = NO\r
-INLINE_SOURCES = NO\r
-STRIP_CODE_COMMENTS = YES\r
-REFERENCED_BY_RELATION = YES\r
-REFERENCES_RELATION = YES\r
-VERBATIM_HEADERS = YES\r
-#---------------------------------------------------------------------------\r
-# configuration options related to the alphabetical class index\r
-#---------------------------------------------------------------------------\r
-ALPHABETICAL_INDEX = YES\r
-COLS_IN_ALPHA_INDEX = 2\r
-IGNORE_PREFIX = \r
-#---------------------------------------------------------------------------\r
-# configuration options related to the HTML output\r
-#---------------------------------------------------------------------------\r
-GENERATE_HTML = YES\r
-HTML_OUTPUT = api_reference\r
-HTML_FILE_EXTENSION = .html\r
-HTML_HEADER = \r
-HTML_FOOTER = \r
-HTML_STYLESHEET = \r
-HTML_ALIGN_MEMBERS = YES\r
-GENERATE_HTMLHELP = NO\r
-CHM_FILE = \r
-HHC_LOCATION = \r
-GENERATE_CHI = NO\r
-BINARY_TOC = NO\r
-TOC_EXPAND = NO\r
-DISABLE_INDEX = NO\r
-ENUM_VALUES_PER_LINE = 4\r
-GENERATE_TREEVIEW = NO\r
-TREEVIEW_WIDTH = 250\r
-#---------------------------------------------------------------------------\r
-# configuration options related to the LaTeX output\r
-#---------------------------------------------------------------------------\r
-GENERATE_LATEX = NO\r
-LATEX_OUTPUT = latex\r
-LATEX_CMD_NAME = latex\r
-MAKEINDEX_CMD_NAME = makeindex\r
-COMPACT_LATEX = NO\r
-PAPER_TYPE = a4wide\r
-EXTRA_PACKAGES = \r
-LATEX_HEADER = \r
-PDF_HYPERLINKS = NO\r
-USE_PDFLATEX = NO\r
-LATEX_BATCHMODE = NO\r
-LATEX_HIDE_INDICES = NO\r
-#---------------------------------------------------------------------------\r
-# configuration options related to the RTF output\r
-#---------------------------------------------------------------------------\r
-GENERATE_RTF = NO\r
-RTF_OUTPUT = rtf\r
-COMPACT_RTF = NO\r
-RTF_HYPERLINKS = NO\r
-RTF_STYLESHEET_FILE = \r
-RTF_EXTENSIONS_FILE = \r
-#---------------------------------------------------------------------------\r
-# configuration options related to the man page output\r
-#---------------------------------------------------------------------------\r
-GENERATE_MAN = NO\r
-MAN_OUTPUT = man\r
-MAN_EXTENSION = .3\r
-MAN_LINKS = NO\r
-#---------------------------------------------------------------------------\r
-# configuration options related to the XML output\r
-#---------------------------------------------------------------------------\r
-GENERATE_XML = NO\r
-XML_OUTPUT = xml\r
-XML_SCHEMA = \r
-XML_DTD = \r
-#---------------------------------------------------------------------------\r
-# configuration options for the AutoGen Definitions output\r
-#---------------------------------------------------------------------------\r
-GENERATE_AUTOGEN_DEF = NO\r
-#---------------------------------------------------------------------------\r
-# configuration options related to the Perl module output\r
-#---------------------------------------------------------------------------\r
-GENERATE_PERLMOD = NO\r
-PERLMOD_LATEX = NO\r
-PERLMOD_PRETTY = YES\r
-PERLMOD_MAKEVAR_PREFIX = \r
-#---------------------------------------------------------------------------\r
-# Configuration options related to the preprocessor \r
-#---------------------------------------------------------------------------\r
-ENABLE_PREPROCESSING = YES\r
-MACRO_EXPANSION = NO\r
-EXPAND_ONLY_PREDEF = NO\r
-SEARCH_INCLUDES = YES\r
-INCLUDE_PATH = \r
-INCLUDE_FILE_PATTERNS = \r
-PREDEFINED = \r
-EXPAND_AS_DEFINED = \r
-SKIP_FUNCTION_MACROS = YES\r
-#---------------------------------------------------------------------------\r
-# Configuration::addtions related to external references \r
-#---------------------------------------------------------------------------\r
-TAGFILES = \r
-GENERATE_TAGFILE = \r
-ALLEXTERNALS = NO\r
-EXTERNAL_GROUPS = YES\r
-PERL_PATH = /usr/bin/perl\r
-#---------------------------------------------------------------------------\r
-# Configuration options related to the dot tool \r
-#---------------------------------------------------------------------------\r
-CLASS_DIAGRAMS = YES\r
-HIDE_UNDOC_RELATIONS = YES\r
-HAVE_DOT = YES\r
-CLASS_GRAPH = YES\r
-COLLABORATION_GRAPH = YES\r
-UML_LOOK = YES\r
-TEMPLATE_RELATIONS = YES\r
-INCLUDE_GRAPH = YES\r
-INCLUDED_BY_GRAPH = YES\r
-CALL_GRAPH = NO\r
-GRAPHICAL_HIERARCHY = YES\r
-DOT_IMAGE_FORMAT = png\r
-DOT_PATH = "/usr/bin/dot"\r
-DOTFILE_DIRS = \r
-MAX_DOT_GRAPH_WIDTH = 1024\r
-MAX_DOT_GRAPH_HEIGHT = 1024\r
-MAX_DOT_GRAPH_DEPTH = 0\r
-GENERATE_LEGEND = YES\r
-DOT_CLEANUP = YES\r
-#---------------------------------------------------------------------------\r
-# Configuration::addtions related to the search engine \r
-#---------------------------------------------------------------------------\r
-SEARCHENGINE = NO\r
-CGI_NAME = search.cgi\r
-CGI_URL = \r
-DOC_URL = \r
-DOC_ABSPATH = \r
-BIN_ABSPATH = /usr/local/bin/\r
-EXT_DOC_PATHS = \r
+# Doxyfile 1.3.3
+
+#---------------------------------------------------------------------------
+# General configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = PortAudioCpp
+PROJECT_NUMBER = 2.0
+OUTPUT_DIRECTORY = ./
+OUTPUT_LANGUAGE = English
+USE_WINDOWS_ENCODING = YES
+EXTRACT_ALL = YES
+EXTRACT_PRIVATE = YES
+EXTRACT_STATIC = YES
+EXTRACT_LOCAL_CLASSES = YES
+HIDE_UNDOC_MEMBERS = NO
+HIDE_UNDOC_CLASSES = NO
+HIDE_FRIEND_COMPOUNDS = NO
+HIDE_IN_BODY_DOCS = NO
+BRIEF_MEMBER_DESC = YES
+REPEAT_BRIEF = YES
+ALWAYS_DETAILED_SEC = YES
+INLINE_INHERITED_MEMB = NO
+FULL_PATH_NAMES = NO
+STRIP_FROM_PATH =
+INTERNAL_DOCS = NO
+CASE_SENSE_NAMES = YES
+SHORT_NAMES = YES
+HIDE_SCOPE_NAMES = NO
+SHOW_INCLUDE_FILES = YES
+JAVADOC_AUTOBRIEF = NO
+MULTILINE_CPP_IS_BRIEF = NO
+DETAILS_AT_TOP = YES
+INHERIT_DOCS = YES
+INLINE_INFO = YES
+SORT_MEMBER_DOCS = NO
+DISTRIBUTE_GROUP_DOC = NO
+TAB_SIZE = 4
+GENERATE_TODOLIST = YES
+GENERATE_TESTLIST = YES
+GENERATE_BUGLIST = YES
+GENERATE_DEPRECATEDLIST= YES
+ALIASES =
+ENABLED_SECTIONS =
+MAX_INITIALIZER_LINES = 30
+OPTIMIZE_OUTPUT_FOR_C = NO
+OPTIMIZE_OUTPUT_JAVA = NO
+SHOW_USED_FILES = YES
+SUBGROUPING = YES
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+QUIET = NO
+WARNINGS = YES
+WARN_IF_UNDOCUMENTED = YES
+WARN_IF_DOC_ERROR = YES
+WARN_FORMAT = "$file:$line: $text"
+WARN_LOGFILE =
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = ../source \
+ ../include
+FILE_PATTERNS = *.hxx \
+ *.cxx
+RECURSIVE = YES
+EXCLUDE =
+EXCLUDE_SYMLINKS = NO
+EXCLUDE_PATTERNS =
+EXAMPLE_PATH =
+EXAMPLE_PATTERNS =
+EXAMPLE_RECURSIVE = NO
+IMAGE_PATH =
+INPUT_FILTER =
+FILTER_SOURCE_FILES = NO
+#---------------------------------------------------------------------------
+# configuration options related to source browsing
+#---------------------------------------------------------------------------
+SOURCE_BROWSER = NO
+INLINE_SOURCES = NO
+STRIP_CODE_COMMENTS = YES
+REFERENCED_BY_RELATION = YES
+REFERENCES_RELATION = YES
+VERBATIM_HEADERS = YES
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+ALPHABETICAL_INDEX = YES
+COLS_IN_ALPHA_INDEX = 2
+IGNORE_PREFIX =
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+GENERATE_HTML = YES
+HTML_OUTPUT = api_reference
+HTML_FILE_EXTENSION = .html
+HTML_HEADER =
+HTML_FOOTER =
+HTML_STYLESHEET =
+HTML_ALIGN_MEMBERS = YES
+GENERATE_HTMLHELP = NO
+CHM_FILE =
+HHC_LOCATION =
+GENERATE_CHI = NO
+BINARY_TOC = NO
+TOC_EXPAND = NO
+DISABLE_INDEX = NO
+ENUM_VALUES_PER_LINE = 4
+GENERATE_TREEVIEW = NO
+TREEVIEW_WIDTH = 250
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+GENERATE_LATEX = NO
+LATEX_OUTPUT = latex
+LATEX_CMD_NAME = latex
+MAKEINDEX_CMD_NAME = makeindex
+COMPACT_LATEX = NO
+PAPER_TYPE = a4wide
+EXTRA_PACKAGES =
+LATEX_HEADER =
+PDF_HYPERLINKS = NO
+USE_PDFLATEX = NO
+LATEX_BATCHMODE = NO
+LATEX_HIDE_INDICES = NO
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+GENERATE_RTF = NO
+RTF_OUTPUT = rtf
+COMPACT_RTF = NO
+RTF_HYPERLINKS = NO
+RTF_STYLESHEET_FILE =
+RTF_EXTENSIONS_FILE =
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+GENERATE_MAN = NO
+MAN_OUTPUT = man
+MAN_EXTENSION = .3
+MAN_LINKS = NO
+#---------------------------------------------------------------------------
+# configuration options related to the XML output
+#---------------------------------------------------------------------------
+GENERATE_XML = NO
+XML_OUTPUT = xml
+XML_SCHEMA =
+XML_DTD =
+#---------------------------------------------------------------------------
+# configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+GENERATE_AUTOGEN_DEF = NO
+#---------------------------------------------------------------------------
+# configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+GENERATE_PERLMOD = NO
+PERLMOD_LATEX = NO
+PERLMOD_PRETTY = YES
+PERLMOD_MAKEVAR_PREFIX =
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor
+#---------------------------------------------------------------------------
+ENABLE_PREPROCESSING = YES
+MACRO_EXPANSION = NO
+EXPAND_ONLY_PREDEF = NO
+SEARCH_INCLUDES = YES
+INCLUDE_PATH =
+INCLUDE_FILE_PATTERNS =
+PREDEFINED =
+EXPAND_AS_DEFINED =
+SKIP_FUNCTION_MACROS = YES
+#---------------------------------------------------------------------------
+# Configuration::addtions related to external references
+#---------------------------------------------------------------------------
+TAGFILES =
+GENERATE_TAGFILE =
+ALLEXTERNALS = NO
+EXTERNAL_GROUPS = YES
+PERL_PATH = /usr/bin/perl
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool
+#---------------------------------------------------------------------------
+CLASS_DIAGRAMS = YES
+HIDE_UNDOC_RELATIONS = YES
+HAVE_DOT = YES
+CLASS_GRAPH = YES
+COLLABORATION_GRAPH = YES
+UML_LOOK = YES
+TEMPLATE_RELATIONS = YES
+INCLUDE_GRAPH = YES
+INCLUDED_BY_GRAPH = YES
+CALL_GRAPH = NO
+GRAPHICAL_HIERARCHY = YES
+DOT_IMAGE_FORMAT = png
+DOT_PATH = "/usr/bin/dot"
+DOTFILE_DIRS =
+MAX_DOT_GRAPH_WIDTH = 1024
+MAX_DOT_GRAPH_HEIGHT = 1024
+MAX_DOT_GRAPH_DEPTH = 0
+GENERATE_LEGEND = YES
+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 =
-// ---------------------------------------------------------------------------------------\r
-\r
-#include <iostream>\r
-#include <cmath>\r
-#include <cassert>\r
-#include <cstddef>\r
-#include "portaudiocpp/PortAudioCpp.hxx"\r
-\r
-// ---------------------------------------------------------------------------------------\r
-\r
-// Some constants:\r
-const int NUM_SECONDS = 5;\r
-const double SAMPLE_RATE = 44100.0;\r
-const int FRAMES_PER_BUFFER = 64;\r
-const int TABLE_SIZE = 200;\r
-\r
-// ---------------------------------------------------------------------------------------\r
-\r
-// SineGenerator class:\r
-class SineGenerator\r
-{\r
-public:\r
- SineGenerator(int tableSize) : tableSize_(tableSize), leftPhase_(0), rightPhase_(0)\r
- {\r
- const double PI = 3.14159265;\r
- table_ = new float[tableSize];\r
- for (int i = 0; i < tableSize; ++i)\r
- {\r
- table_[i] = 0.125f * (float)sin(((double)i/(double)tableSize)*PI*2.);\r
- }\r
- }\r
-\r
- ~SineGenerator()\r
- {\r
- delete[] table_;\r
- }\r
-\r
- int generate(const void *inputBuffer, void *outputBuffer, unsigned long framesPerBuffer, \r
- const PaStreamCallbackTimeInfo *timeInfo, PaStreamCallbackFlags statusFlags)\r
- {\r
- assert(outputBuffer != NULL);\r
-\r
- float **out = static_cast<float **>(outputBuffer);\r
-\r
- for (unsigned int i = 0; i < framesPerBuffer; ++i)\r
- {\r
- out[0][i] = table_[leftPhase_];\r
- out[1][i] = table_[rightPhase_];\r
-\r
- leftPhase_ += 1;\r
- if (leftPhase_ >= tableSize_)\r
- leftPhase_ -= tableSize_;\r
-\r
- rightPhase_ += 3;\r
- if (rightPhase_ >= tableSize_)\r
- rightPhase_ -= tableSize_;\r
- }\r
-\r
- return paContinue;\r
- }\r
-\r
-private:\r
- float *table_;\r
- int tableSize_;\r
- int leftPhase_;\r
- int rightPhase_;\r
-};\r
-\r
-// ---------------------------------------------------------------------------------------\r
-\r
-// main:\r
-int main(int, char *[]);\r
-int main(int, char *[])\r
-{\r
- try\r
- {\r
- // Create a SineGenerator object:\r
- SineGenerator sineGenerator(TABLE_SIZE);\r
-\r
- std::cout << "Setting up PortAudio..." << std::endl;\r
-\r
- // Set up the System:\r
- portaudio::AutoSystem autoSys;\r
- portaudio::System &sys = portaudio::System::instance();\r
-\r
- // Set up the parameters required to open a (Callback)Stream:\r
- portaudio::DirectionSpecificStreamParameters outParams(sys.defaultOutputDevice(), 2, portaudio::FLOAT32, false, sys.defaultOutputDevice().defaultLowOutputLatency(), NULL);\r
- portaudio::StreamParameters params(portaudio::DirectionSpecificStreamParameters::null(), outParams, SAMPLE_RATE, FRAMES_PER_BUFFER, paClipOff);\r
-\r
- std::cout << "Opening stereo output stream..." << std::endl;\r
-\r
- // Create (and open) a new Stream, using the SineGenerator::generate function as a callback:\r
- portaudio::MemFunCallbackStream<SineGenerator> stream(params, sineGenerator, &SineGenerator::generate);\r
-\r
- std::cout << "Starting playback for " << NUM_SECONDS << " seconds." << std::endl;\r
-\r
- // Start the Stream (audio playback starts):\r
- stream.start();\r
-\r
- // Wait for 5 seconds:\r
- sys.sleep(NUM_SECONDS * 1000);\r
-\r
- std::cout << "Closing stream..." <<std::endl;\r
-\r
- // Stop the Stream (not strictly needed as termintating the System will also stop all open Streams):\r
- stream.stop();\r
-\r
- // Close the Stream (not strictly needed as terminating the System will also close all open Streams):\r
- stream.close();\r
-\r
- // Terminate the System (not strictly needed as the AutoSystem will also take care of this when it \r
- // goes out of scope):\r
- sys.terminate();\r
-\r
- std::cout << "Test finished." << std::endl;\r
- }\r
- catch (const portaudio::PaException &e)\r
- {\r
- std::cout << "A PortAudio error occured: " << e.paErrorText() << std::endl;\r
- }\r
- catch (const portaudio::PaCppException &e)\r
- {\r
- std::cout << "A PortAudioCpp error occured: " << e.what() << std::endl;\r
- }\r
- catch (const std::exception &e)\r
- {\r
- std::cout << "A generic exception occured: " << e.what() << std::endl;\r
- }\r
- catch (...)\r
- {\r
- std::cout << "An unknown exception occured." << std::endl;\r
- }\r
-\r
- return 0;\r
-}\r
-\r
-\r
+// ---------------------------------------------------------------------------------------
+
+#include <iostream>
+#include <cmath>
+#include <cassert>
+#include <cstddef>
+#include "portaudiocpp/PortAudioCpp.hxx"
+
+// ---------------------------------------------------------------------------------------
+
+// Some constants:
+const int NUM_SECONDS = 5;
+const double SAMPLE_RATE = 44100.0;
+const int FRAMES_PER_BUFFER = 64;
+const int TABLE_SIZE = 200;
+
+// ---------------------------------------------------------------------------------------
+
+// SineGenerator class:
+class SineGenerator
+{
+public:
+ SineGenerator(int tableSize) : tableSize_(tableSize), leftPhase_(0), rightPhase_(0)
+ {
+ const double PI = 3.14159265;
+ table_ = new float[tableSize];
+ for (int i = 0; i < tableSize; ++i)
+ {
+ table_[i] = 0.125f * (float)sin(((double)i/(double)tableSize)*PI*2.);
+ }
+ }
+
+ ~SineGenerator()
+ {
+ delete[] table_;
+ }
+
+ int generate(const void *inputBuffer, void *outputBuffer, unsigned long framesPerBuffer,
+ const PaStreamCallbackTimeInfo *timeInfo, PaStreamCallbackFlags statusFlags)
+ {
+ assert(outputBuffer != NULL);
+
+ float **out = static_cast<float **>(outputBuffer);
+
+ for (unsigned int i = 0; i < framesPerBuffer; ++i)
+ {
+ out[0][i] = table_[leftPhase_];
+ out[1][i] = table_[rightPhase_];
+
+ leftPhase_ += 1;
+ if (leftPhase_ >= tableSize_)
+ leftPhase_ -= tableSize_;
+
+ rightPhase_ += 3;
+ if (rightPhase_ >= tableSize_)
+ rightPhase_ -= tableSize_;
+ }
+
+ return paContinue;
+ }
+
+private:
+ float *table_;
+ int tableSize_;
+ int leftPhase_;
+ int rightPhase_;
+};
+
+// ---------------------------------------------------------------------------------------
+
+// main:
+int main(int, char *[]);
+int main(int, char *[])
+{
+ try
+ {
+ // Create a SineGenerator object:
+ SineGenerator sineGenerator(TABLE_SIZE);
+
+ std::cout << "Setting up PortAudio..." << std::endl;
+
+ // Set up the System:
+ portaudio::AutoSystem autoSys;
+ portaudio::System &sys = portaudio::System::instance();
+
+ // Set up the parameters required to open a (Callback)Stream:
+ portaudio::DirectionSpecificStreamParameters outParams(sys.defaultOutputDevice(), 2, portaudio::FLOAT32, false, sys.defaultOutputDevice().defaultLowOutputLatency(), NULL);
+ portaudio::StreamParameters params(portaudio::DirectionSpecificStreamParameters::null(), outParams, SAMPLE_RATE, FRAMES_PER_BUFFER, paClipOff);
+
+ std::cout << "Opening stereo output stream..." << std::endl;
+
+ // Create (and open) a new Stream, using the SineGenerator::generate function as a callback:
+ portaudio::MemFunCallbackStream<SineGenerator> stream(params, sineGenerator, &SineGenerator::generate);
+
+ std::cout << "Starting playback for " << NUM_SECONDS << " seconds." << std::endl;
+
+ // Start the Stream (audio playback starts):
+ stream.start();
+
+ // Wait for 5 seconds:
+ sys.sleep(NUM_SECONDS * 1000);
+
+ std::cout << "Closing stream..." <<std::endl;
+
+ // Stop the Stream (not strictly needed as termintating the System will also stop all open Streams):
+ stream.stop();
+
+ // Close the Stream (not strictly needed as terminating the System will also close all open Streams):
+ stream.close();
+
+ // Terminate the System (not strictly needed as the AutoSystem will also take care of this when it
+ // goes out of scope):
+ sys.terminate();
+
+ std::cout << "Test finished." << std::endl;
+ }
+ catch (const portaudio::PaException &e)
+ {
+ std::cout << "A PortAudio error occured: " << e.paErrorText() << std::endl;
+ }
+ catch (const portaudio::PaCppException &e)
+ {
+ std::cout << "A PortAudioCpp error occured: " << e.what() << std::endl;
+ }
+ catch (const std::exception &e)
+ {
+ std::cout << "A generic exception occured: " << e.what() << std::endl;
+ }
+ catch (...)
+ {
+ std::cout << "An unknown exception occured." << std::endl;
+ }
+
+ return 0;
+}
+
+
void showControlPanel(void *systemSpecific);
- const char *inputChannelName(int channelIndex) const;\r
+ const char *inputChannelName(int channelIndex) const;
const char *outputChannelName(int channelIndex) const;
private:
-#ifndef INCLUDED_PORTAUDIO_AUTOSYSTEM_HXX\r
-#define INCLUDED_PORTAUDIO_AUTOSYSTEM_HXX\r
-\r
-// ---------------------------------------------------------------------------------------\r
-\r
-#include "portaudiocpp/System.hxx"\r
-\r
-// ---------------------------------------------------------------------------------------\r
-\r
-namespace portaudio\r
-{\r
-\r
-\r
- //////\r
- /// @brief A RAII idiom class to ensure automatic clean-up when an exception is \r
- /// raised.\r
- ///\r
- /// A simple helper class which uses the 'Resource Acquisition is Initialization' \r
- /// idiom (RAII). Use this class to initialize/terminate the System rather than \r
- /// using System directly. AutoSystem must be created on stack and must be valid \r
- /// throughout the time you wish to use PortAudioCpp. Your 'main' function might be \r
- /// a good place for it.\r
- ///\r
- /// To avoid having to type portaudio::System::instance().xyz() all the time, it's usually \r
- /// a good idea to make a reference to the System which can be accessed directly.\r
- /// @verbatim\r
- /// portaudio::AutoSys autoSys;\r
- /// portaudio::System &sys = portaudio::System::instance();\r
- /// @endverbatim\r
- //////\r
- class AutoSystem\r
- {\r
- public:\r
- AutoSystem(bool initialize = true)\r
- {\r
- if (initialize)\r
- System::initialize();\r
- }\r
-\r
- ~AutoSystem()\r
- {\r
- if (System::exists())\r
- System::terminate();\r
- }\r
-\r
- void initialize()\r
- {\r
- System::initialize();\r
- }\r
-\r
- void terminate()\r
- {\r
- System::terminate();\r
- }\r
- };\r
-\r
-\r
-} // namespace portaudio\r
-\r
-// ---------------------------------------------------------------------------------------\r
-\r
-#endif // INCLUDED_PORTAUDIO_AUTOSYSTEM_HXX\r
+#ifndef INCLUDED_PORTAUDIO_AUTOSYSTEM_HXX
+#define INCLUDED_PORTAUDIO_AUTOSYSTEM_HXX
+
+// ---------------------------------------------------------------------------------------
+
+#include "portaudiocpp/System.hxx"
+
+// ---------------------------------------------------------------------------------------
+
+namespace portaudio
+{
+
+
+ //////
+ /// @brief A RAII idiom class to ensure automatic clean-up when an exception is
+ /// raised.
+ ///
+ /// A simple helper class which uses the 'Resource Acquisition is Initialization'
+ /// idiom (RAII). Use this class to initialize/terminate the System rather than
+ /// using System directly. AutoSystem must be created on stack and must be valid
+ /// throughout the time you wish to use PortAudioCpp. Your 'main' function might be
+ /// a good place for it.
+ ///
+ /// To avoid having to type portaudio::System::instance().xyz() all the time, it's usually
+ /// a good idea to make a reference to the System which can be accessed directly.
+ /// @verbatim
+ /// portaudio::AutoSys autoSys;
+ /// portaudio::System &sys = portaudio::System::instance();
+ /// @endverbatim
+ //////
+ class AutoSystem
+ {
+ public:
+ AutoSystem(bool initialize = true)
+ {
+ if (initialize)
+ System::initialize();
+ }
+
+ ~AutoSystem()
+ {
+ if (System::exists())
+ System::terminate();
+ }
+
+ void initialize()
+ {
+ System::initialize();
+ }
+
+ void terminate()
+ {
+ System::terminate();
+ }
+ };
+
+
+} // namespace portaudio
+
+// ---------------------------------------------------------------------------------------
+
+#endif // INCLUDED_PORTAUDIO_AUTOSYSTEM_HXX
-#ifndef INCLUDED_PORTAUDIO_BLOCKINGSTREAM_HXX\r
-#define INCLUDED_PORTAUDIO_BLOCKINGSTREAM_HXX\r
-\r
-// ---------------------------------------------------------------------------------------\r
-\r
-#include "portaudiocpp/Stream.hxx"\r
-\r
-// ---------------------------------------------------------------------------------------\r
-\r
-namespace portaudio\r
-{\r
-\r
-\r
-\r
- //////\r
- /// @brief Stream class for blocking read/write-style input and output.\r
- //////\r
- class BlockingStream : public Stream\r
- {\r
- public:\r
- BlockingStream();\r
- BlockingStream(const StreamParameters ¶meters);\r
- ~BlockingStream();\r
-\r
- void open(const StreamParameters ¶meters);\r
-\r
- void read(void *buffer, unsigned long numFrames);\r
- void write(const void *buffer, unsigned long numFrames);\r
-\r
- signed long availableReadSize() const;\r
- signed long availableWriteSize() const;\r
-\r
- private:\r
- BlockingStream(const BlockingStream &); // non-copyable\r
- BlockingStream &operator=(const BlockingStream &); // non-copyable\r
- };\r
-\r
-\r
-\r
-} // portaudio\r
-\r
-// ---------------------------------------------------------------------------------------\r
-\r
-#endif // INCLUDED_PORTAUDIO_BLOCKINGSTREAM_HXX\r
-\r
+#ifndef INCLUDED_PORTAUDIO_BLOCKINGSTREAM_HXX
+#define INCLUDED_PORTAUDIO_BLOCKINGSTREAM_HXX
+
+// ---------------------------------------------------------------------------------------
+
+#include "portaudiocpp/Stream.hxx"
+
+// ---------------------------------------------------------------------------------------
+
+namespace portaudio
+{
+
+
+
+ //////
+ /// @brief Stream class for blocking read/write-style input and output.
+ //////
+ class BlockingStream : public Stream
+ {
+ public:
+ BlockingStream();
+ BlockingStream(const StreamParameters ¶meters);
+ ~BlockingStream();
+
+ void open(const StreamParameters ¶meters);
+
+ void read(void *buffer, unsigned long numFrames);
+ void write(const void *buffer, unsigned long numFrames);
+
+ signed long availableReadSize() const;
+ signed long availableWriteSize() const;
+
+ private:
+ BlockingStream(const BlockingStream &); // non-copyable
+ BlockingStream &operator=(const BlockingStream &); // non-copyable
+ };
+
+
+
+} // portaudio
+
+// ---------------------------------------------------------------------------------------
+
+#endif // INCLUDED_PORTAUDIO_BLOCKINGSTREAM_HXX
+
-#ifndef INCLUDED_PORTAUDIO_CFUNCALLBACKSTREAM_HXX\r
-#define INCLUDED_PORTAUDIO_CFUNCALLBACKSTREAM_HXX\r
-\r
-// ---------------------------------------------------------------------------------------\r
-\r
-#include "portaudio.h"\r
-\r
-#include "portaudiocpp/CallbackStream.hxx"\r
-\r
-// ---------------------------------------------------------------------------------------\r
-\r
-// Forward declaration(s)\r
-namespace portaudio\r
-{\r
- class StreamParameters;\r
-}\r
-\r
-// ---------------------------------------------------------------------------------------\r
-\r
-// Declaration(s):\r
-namespace portaudio\r
-{\r
- // -----------------------------------------------------------------------------------\r
-\r
- //////\r
- /// @brief Callback stream using a free function with C linkage. It's important that the function \r
- /// the passed function pointer points to is declared ``extern "C"''.\r
- //////\r
- class CFunCallbackStream : public CallbackStream\r
- {\r
- public:\r
- CFunCallbackStream();\r
- CFunCallbackStream(const StreamParameters ¶meters, PaStreamCallback *funPtr, void *userData);\r
- ~CFunCallbackStream();\r
- \r
- void open(const StreamParameters ¶meters, PaStreamCallback *funPtr, void *userData);\r
-\r
- private:\r
- CFunCallbackStream(const CFunCallbackStream &); // non-copyable\r
- CFunCallbackStream &operator=(const CFunCallbackStream &); // non-copyable\r
- };\r
-\r
- // -----------------------------------------------------------------------------------\r
-} // portaudio\r
-\r
-// ---------------------------------------------------------------------------------------\r
-\r
-#endif // INCLUDED_PORTAUDIO_MEMFUNCALLBACKSTREAM_HXX\r
-\r
+#ifndef INCLUDED_PORTAUDIO_CFUNCALLBACKSTREAM_HXX
+#define INCLUDED_PORTAUDIO_CFUNCALLBACKSTREAM_HXX
+
+// ---------------------------------------------------------------------------------------
+
+#include "portaudio.h"
+
+#include "portaudiocpp/CallbackStream.hxx"
+
+// ---------------------------------------------------------------------------------------
+
+// Forward declaration(s)
+namespace portaudio
+{
+ class StreamParameters;
+}
+
+// ---------------------------------------------------------------------------------------
+
+// Declaration(s):
+namespace portaudio
+{
+ // -----------------------------------------------------------------------------------
+
+ //////
+ /// @brief Callback stream using a free function with C linkage. It's important that the function
+ /// the passed function pointer points to is declared ``extern "C"''.
+ //////
+ class CFunCallbackStream : public CallbackStream
+ {
+ public:
+ CFunCallbackStream();
+ CFunCallbackStream(const StreamParameters ¶meters, PaStreamCallback *funPtr, void *userData);
+ ~CFunCallbackStream();
+
+ void open(const StreamParameters ¶meters, PaStreamCallback *funPtr, void *userData);
+
+ private:
+ CFunCallbackStream(const CFunCallbackStream &); // non-copyable
+ CFunCallbackStream &operator=(const CFunCallbackStream &); // non-copyable
+ };
+
+ // -----------------------------------------------------------------------------------
+} // portaudio
+
+// ---------------------------------------------------------------------------------------
+
+#endif // INCLUDED_PORTAUDIO_MEMFUNCALLBACKSTREAM_HXX
+
-#ifndef INCLUDED_PORTAUDIO_CALLBACKINTERFACE_HXX\r
-#define INCLUDED_PORTAUDIO_CALLBACKINTERFACE_HXX\r
-\r
-// ---------------------------------------------------------------------------------------\r
-\r
-#include "portaudio.h"\r
-\r
-// ---------------------------------------------------------------------------------------\r
-\r
-namespace portaudio\r
-{\r
- // -----------------------------------------------------------------------------------\r
-\r
- //////\r
- /// @brief Interface for an object that's callable as a PortAudioCpp callback object (ie that implements the \r
- /// paCallbackFun method).\r
- //////\r
- class CallbackInterface\r
- {\r
- public:\r
- virtual ~CallbackInterface() {}\r
-\r
- virtual int paCallbackFun(const void *inputBuffer, void *outputBuffer, unsigned long numFrames, \r
- const PaStreamCallbackTimeInfo *timeInfo, PaStreamCallbackFlags statusFlags) = 0;\r
- };\r
-\r
- // -----------------------------------------------------------------------------------\r
-\r
- namespace impl\r
- {\r
- extern "C"\r
- {\r
- int callbackInterfaceToPaCallbackAdapter(const void *inputBuffer, void *outputBuffer, unsigned long numFrames, \r
- const PaStreamCallbackTimeInfo *timeInfo, PaStreamCallbackFlags statusFlags, \r
- void *userData);\r
- } // extern "C"\r
- }\r
-\r
- // -----------------------------------------------------------------------------------\r
-\r
-} // namespace portaudio\r
-\r
-// ---------------------------------------------------------------------------------------\r
-\r
-#endif // INCLUDED_PORTAUDIO_CALLBACKINTERFACE_HXX\r
+#ifndef INCLUDED_PORTAUDIO_CALLBACKINTERFACE_HXX
+#define INCLUDED_PORTAUDIO_CALLBACKINTERFACE_HXX
+
+// ---------------------------------------------------------------------------------------
+
+#include "portaudio.h"
+
+// ---------------------------------------------------------------------------------------
+
+namespace portaudio
+{
+ // -----------------------------------------------------------------------------------
+
+ //////
+ /// @brief Interface for an object that's callable as a PortAudioCpp callback object (ie that implements the
+ /// paCallbackFun method).
+ //////
+ class CallbackInterface
+ {
+ public:
+ virtual ~CallbackInterface() {}
+
+ virtual int paCallbackFun(const void *inputBuffer, void *outputBuffer, unsigned long numFrames,
+ const PaStreamCallbackTimeInfo *timeInfo, PaStreamCallbackFlags statusFlags) = 0;
+ };
+
+ // -----------------------------------------------------------------------------------
+
+ namespace impl
+ {
+ extern "C"
+ {
+ int callbackInterfaceToPaCallbackAdapter(const void *inputBuffer, void *outputBuffer, unsigned long numFrames,
+ const PaStreamCallbackTimeInfo *timeInfo, PaStreamCallbackFlags statusFlags,
+ void *userData);
+ } // extern "C"
+ }
+
+ // -----------------------------------------------------------------------------------
+
+} // namespace portaudio
+
+// ---------------------------------------------------------------------------------------
+
+#endif // INCLUDED_PORTAUDIO_CALLBACKINTERFACE_HXX
-#ifndef INCLUDED_PORTAUDIO_CALLBACKSTREAM_HXX\r
-#define INCLUDED_PORTAUDIO_CALLBACKSTREAM_HXX\r
-\r
-// ---------------------------------------------------------------------------------------\r
-\r
-#include "portaudio.h"\r
-\r
-#include "portaudiocpp/Stream.hxx"\r
-\r
-// ---------------------------------------------------------------------------------------\r
-\r
-// Declaration(s):\r
-namespace portaudio\r
-{\r
-\r
-\r
- //////\r
- /// @brief Base class for all Streams which use a callback-based mechanism.\r
- //////\r
- class CallbackStream : public Stream\r
- {\r
- protected:\r
- CallbackStream();\r
- virtual ~CallbackStream();\r
-\r
- public:\r
- // stream info (time-varying)\r
- double cpuLoad() const;\r
-\r
- private:\r
- CallbackStream(const CallbackStream &); // non-copyable\r
- CallbackStream &operator=(const CallbackStream &); // non-copyable\r
- };\r
-\r
-\r
-} // namespace portaudio\r
-\r
-// ---------------------------------------------------------------------------------------\r
-\r
-#endif // INCLUDED_PORTAUDIO_CALLBACKSTREAM_HXX\r
+#ifndef INCLUDED_PORTAUDIO_CALLBACKSTREAM_HXX
+#define INCLUDED_PORTAUDIO_CALLBACKSTREAM_HXX
+
+// ---------------------------------------------------------------------------------------
+
+#include "portaudio.h"
+
+#include "portaudiocpp/Stream.hxx"
+
+// ---------------------------------------------------------------------------------------
+
+// Declaration(s):
+namespace portaudio
+{
+
+
+ //////
+ /// @brief Base class for all Streams which use a callback-based mechanism.
+ //////
+ class CallbackStream : public Stream
+ {
+ protected:
+ CallbackStream();
+ virtual ~CallbackStream();
+
+ public:
+ // stream info (time-varying)
+ double cpuLoad() const;
+
+ private:
+ CallbackStream(const CallbackStream &); // non-copyable
+ CallbackStream &operator=(const CallbackStream &); // non-copyable
+ };
+
+
+} // namespace portaudio
+
+// ---------------------------------------------------------------------------------------
+
+#endif // INCLUDED_PORTAUDIO_CALLBACKSTREAM_HXX
-#ifndef INCLUDED_PORTAUDIO_CPPFUNCALLBACKSTREAM_HXX\r
-#define INCLUDED_PORTAUDIO_CPPFUNCALLBACKSTREAM_HXX\r
-\r
-// ---------------------------------------------------------------------------------------\r
-\r
-#include "portaudio.h"\r
-\r
-#include "portaudiocpp/CallbackStream.hxx"\r
-\r
-// ---------------------------------------------------------------------------------------\r
-\r
-// Forward declaration(s):\r
-namespace portaudio\r
-{\r
- class StreamParameters;\r
-}\r
-\r
-// ---------------------------------------------------------------------------------------\r
-\r
-// Declaration(s):\r
-namespace portaudio\r
-{\r
-\r
-\r
- namespace impl\r
- {\r
- extern "C"\r
- {\r
- int cppCallbackToPaCallbackAdapter(const void *inputBuffer, void *outputBuffer, unsigned long numFrames, \r
- const PaStreamCallbackTimeInfo *timeInfo, PaStreamCallbackFlags statusFlags, \r
- void *userData);\r
- } // extern "C"\r
- }\r
-\r
- // -----------------------------------------------------------------------------------\r
-\r
- //////\r
- /// @brief Callback stream using a C++ function (either a free function or a static function) \r
- /// callback.\r
- //////\r
- class FunCallbackStream : public CallbackStream\r
- {\r
- public:\r
- typedef int (*CallbackFunPtr)(const void *inputBuffer, void *outputBuffer, unsigned long numFrames, \r
- const PaStreamCallbackTimeInfo *timeInfo, PaStreamCallbackFlags statusFlags, \r
- void *userData);\r
-\r
- // -------------------------------------------------------------------------------\r
-\r
- //////\r
- /// @brief Simple structure containing a function pointer to the C++ callback function and a \r
- /// (void) pointer to the user supplied data.\r
- //////\r
- struct CppToCCallbackData\r
- {\r
- CppToCCallbackData();\r
- CppToCCallbackData(CallbackFunPtr funPtr, void *userData);\r
- void init(CallbackFunPtr funPtr, void *userData);\r
-\r
- CallbackFunPtr funPtr;\r
- void *userData;\r
- };\r
-\r
- // -------------------------------------------------------------------------------\r
-\r
- FunCallbackStream();\r
- FunCallbackStream(const StreamParameters ¶meters, CallbackFunPtr funPtr, void *userData);\r
- ~FunCallbackStream();\r
-\r
- void open(const StreamParameters ¶meters, CallbackFunPtr funPtr, void *userData);\r
-\r
- private:\r
- FunCallbackStream(const FunCallbackStream &); // non-copyable\r
- FunCallbackStream &operator=(const FunCallbackStream &); // non-copyable\r
-\r
- CppToCCallbackData adapterData_;\r
-\r
- void open(const StreamParameters ¶meters);\r
- };\r
-\r
-\r
-} // portaudio\r
-\r
-// ---------------------------------------------------------------------------------------\r
-\r
-#endif // INCLUDED_PORTAUDIO_CPPFUNCALLBACKSTREAM_HXX\r
+#ifndef INCLUDED_PORTAUDIO_CPPFUNCALLBACKSTREAM_HXX
+#define INCLUDED_PORTAUDIO_CPPFUNCALLBACKSTREAM_HXX
+
+// ---------------------------------------------------------------------------------------
+
+#include "portaudio.h"
+
+#include "portaudiocpp/CallbackStream.hxx"
+
+// ---------------------------------------------------------------------------------------
+
+// Forward declaration(s):
+namespace portaudio
+{
+ class StreamParameters;
+}
+
+// ---------------------------------------------------------------------------------------
+
+// Declaration(s):
+namespace portaudio
+{
+
+
+ namespace impl
+ {
+ extern "C"
+ {
+ int cppCallbackToPaCallbackAdapter(const void *inputBuffer, void *outputBuffer, unsigned long numFrames,
+ const PaStreamCallbackTimeInfo *timeInfo, PaStreamCallbackFlags statusFlags,
+ void *userData);
+ } // extern "C"
+ }
+
+ // -----------------------------------------------------------------------------------
+
+ //////
+ /// @brief Callback stream using a C++ function (either a free function or a static function)
+ /// callback.
+ //////
+ class FunCallbackStream : public CallbackStream
+ {
+ public:
+ typedef int (*CallbackFunPtr)(const void *inputBuffer, void *outputBuffer, unsigned long numFrames,
+ const PaStreamCallbackTimeInfo *timeInfo, PaStreamCallbackFlags statusFlags,
+ void *userData);
+
+ // -------------------------------------------------------------------------------
+
+ //////
+ /// @brief Simple structure containing a function pointer to the C++ callback function and a
+ /// (void) pointer to the user supplied data.
+ //////
+ struct CppToCCallbackData
+ {
+ CppToCCallbackData();
+ CppToCCallbackData(CallbackFunPtr funPtr, void *userData);
+ void init(CallbackFunPtr funPtr, void *userData);
+
+ CallbackFunPtr funPtr;
+ void *userData;
+ };
+
+ // -------------------------------------------------------------------------------
+
+ FunCallbackStream();
+ FunCallbackStream(const StreamParameters ¶meters, CallbackFunPtr funPtr, void *userData);
+ ~FunCallbackStream();
+
+ void open(const StreamParameters ¶meters, CallbackFunPtr funPtr, void *userData);
+
+ private:
+ FunCallbackStream(const FunCallbackStream &); // non-copyable
+ FunCallbackStream &operator=(const FunCallbackStream &); // non-copyable
+
+ CppToCCallbackData adapterData_;
+
+ void open(const StreamParameters ¶meters);
+ };
+
+
+} // portaudio
+
+// ---------------------------------------------------------------------------------------
+
+#endif // INCLUDED_PORTAUDIO_CPPFUNCALLBACKSTREAM_HXX
-#ifndef INCLUDED_PORTAUDIO_DEVICE_HXX\r
-#define INCLUDED_PORTAUDIO_DEVICE_HXX\r
-\r
-// ---------------------------------------------------------------------------------------\r
-\r
-#include <iterator>\r
-\r
-#include "portaudio.h"\r
-\r
-#include "portaudiocpp/SampleDataFormat.hxx"\r
-\r
-// ---------------------------------------------------------------------------------------\r
-\r
-// Forward declaration(s):\r
-namespace portaudio\r
-{\r
- class System;\r
- class HostApi;\r
-}\r
-\r
-// ---------------------------------------------------------------------------------------\r
-\r
-// Declaration(s):\r
-namespace portaudio\r
-{\r
-\r
- //////\r
- /// @brief Class which represents a PortAudio device in the System.\r
- ///\r
- /// A single physical device in the system may have multiple PortAudio \r
- /// Device representations using different HostApi 's though. A Device \r
- /// can be half-duplex or full-duplex. A half-duplex Device can be used \r
- /// to create a half-duplex Stream. A full-duplex Device can be used to \r
- /// create a full-duplex Stream. If supported by the HostApi, two \r
- /// half-duplex Devices can even be used to create a full-duplex Stream.\r
- ///\r
- /// Note that Device objects are very light-weight and can be passed around \r
- /// by-value.\r
- //////\r
- class Device\r
- {\r
- public:\r
- // query info: name, max in channels, max out channels, \r
- // default low/hight input/output latency, default sample rate\r
- PaDeviceIndex index() const;\r
- const char *name() const;\r
- int maxInputChannels() const;\r
- int maxOutputChannels() const;\r
- PaTime defaultLowInputLatency() const;\r
- PaTime defaultHighInputLatency() const;\r
- PaTime defaultLowOutputLatency() const;\r
- PaTime defaultHighOutputLatency() const;\r
- double defaultSampleRate() const;\r
-\r
- bool isInputOnlyDevice() const; // extended\r
- bool isOutputOnlyDevice() const; // extended\r
- bool isFullDuplexDevice() const; // extended\r
- bool isSystemDefaultInputDevice() const; // extended\r
- bool isSystemDefaultOutputDevice() const; // extended\r
- bool isHostApiDefaultInputDevice() const; // extended\r
- bool isHostApiDefaultOutputDevice() const; // extended\r
-\r
- bool operator==(const Device &rhs) const;\r
- bool operator!=(const Device &rhs) const;\r
-\r
- // host api reference\r
- HostApi &hostApi();\r
- const HostApi &hostApi() const;\r
-\r
- private:\r
- PaDeviceIndex index_;\r
- const PaDeviceInfo *info_;\r
-\r
- private:\r
- friend class System;\r
- \r
- explicit Device(PaDeviceIndex index);\r
- ~Device();\r
-\r
- Device(const Device &); // non-copyable\r
- Device &operator=(const Device &); // non-copyable\r
- };\r
-\r
- // -----------------------------------------------------------------------------------\r
-\r
-} // namespace portaudio\r
-\r
-// ---------------------------------------------------------------------------------------\r
-\r
-#endif // INCLUDED_PORTAUDIO_DEVICE_HXX\r
-\r
+#ifndef INCLUDED_PORTAUDIO_DEVICE_HXX
+#define INCLUDED_PORTAUDIO_DEVICE_HXX
+
+// ---------------------------------------------------------------------------------------
+
+#include <iterator>
+
+#include "portaudio.h"
+
+#include "portaudiocpp/SampleDataFormat.hxx"
+
+// ---------------------------------------------------------------------------------------
+
+// Forward declaration(s):
+namespace portaudio
+{
+ class System;
+ class HostApi;
+}
+
+// ---------------------------------------------------------------------------------------
+
+// Declaration(s):
+namespace portaudio
+{
+
+ //////
+ /// @brief Class which represents a PortAudio device in the System.
+ ///
+ /// A single physical device in the system may have multiple PortAudio
+ /// Device representations using different HostApi 's though. A Device
+ /// can be half-duplex or full-duplex. A half-duplex Device can be used
+ /// to create a half-duplex Stream. A full-duplex Device can be used to
+ /// create a full-duplex Stream. If supported by the HostApi, two
+ /// half-duplex Devices can even be used to create a full-duplex Stream.
+ ///
+ /// Note that Device objects are very light-weight and can be passed around
+ /// by-value.
+ //////
+ class Device
+ {
+ public:
+ // query info: name, max in channels, max out channels,
+ // default low/hight input/output latency, default sample rate
+ PaDeviceIndex index() const;
+ const char *name() const;
+ int maxInputChannels() const;
+ int maxOutputChannels() const;
+ PaTime defaultLowInputLatency() const;
+ PaTime defaultHighInputLatency() const;
+ PaTime defaultLowOutputLatency() const;
+ PaTime defaultHighOutputLatency() const;
+ double defaultSampleRate() const;
+
+ bool isInputOnlyDevice() const; // extended
+ bool isOutputOnlyDevice() const; // extended
+ bool isFullDuplexDevice() const; // extended
+ bool isSystemDefaultInputDevice() const; // extended
+ bool isSystemDefaultOutputDevice() const; // extended
+ bool isHostApiDefaultInputDevice() const; // extended
+ bool isHostApiDefaultOutputDevice() const; // extended
+
+ bool operator==(const Device &rhs) const;
+ bool operator!=(const Device &rhs) const;
+
+ // host api reference
+ HostApi &hostApi();
+ const HostApi &hostApi() const;
+
+ private:
+ PaDeviceIndex index_;
+ const PaDeviceInfo *info_;
+
+ private:
+ friend class System;
+
+ explicit Device(PaDeviceIndex index);
+ ~Device();
+
+ Device(const Device &); // non-copyable
+ Device &operator=(const Device &); // non-copyable
+ };
+
+ // -----------------------------------------------------------------------------------
+
+} // namespace portaudio
+
+// ---------------------------------------------------------------------------------------
+
+#endif // INCLUDED_PORTAUDIO_DEVICE_HXX
+
-#ifndef INCLUDED_PORTAUDIO_SINGLEDIRECTIONSTREAMPARAMETERS_HXX\r
-#define INCLUDED_PORTAUDIO_SINGLEDIRECTIONSTREAMPARAMETERS_HXX\r
-\r
-// ---------------------------------------------------------------------------------------\r
-\r
-#include <cstddef>\r
-\r
-#include "portaudio.h"\r
-\r
-#include "portaudiocpp/System.hxx"\r
-#include "portaudiocpp/SampleDataFormat.hxx"\r
-\r
-// ---------------------------------------------------------------------------------------\r
-\r
-// Forward declaration(s):\r
-namespace portaudio\r
-{\r
- class Device;\r
-}\r
-\r
-// ---------------------------------------------------------------------------------------\r
-\r
-// Declaration(s):\r
-namespace portaudio\r
-{\r
-\r
- //////\r
- /// @brief All parameters for one direction (either in or out) of a Stream. Together with \r
- /// parameters common to both directions, two DirectionSpecificStreamParameters can make up \r
- /// a StreamParameters object which contains all parameters for a Stream.\r
- //////\r
- class DirectionSpecificStreamParameters\r
- {\r
- public:\r
- static DirectionSpecificStreamParameters null();\r
-\r
- DirectionSpecificStreamParameters();\r
- DirectionSpecificStreamParameters(const Device &device, int numChannels, SampleDataFormat format, \r
- bool interleaved, PaTime suggestedLatency, void *hostApiSpecificStreamInfo);\r
-\r
- // Set up methods:\r
- void setDevice(const Device &device);\r
- void setNumChannels(int numChannels);\r
-\r
- void setSampleFormat(SampleDataFormat format, bool interleaved = true);\r
- void setHostApiSpecificSampleFormat(PaSampleFormat format, bool interleaved = true);\r
-\r
- void setSuggestedLatency(PaTime latency);\r
-\r
- void setHostApiSpecificStreamInfo(void *streamInfo);\r
-\r
- // Accessor methods:\r
- PaStreamParameters *paStreamParameters();\r
- const PaStreamParameters *paStreamParameters() const;\r
-\r
- Device &device() const;\r
- int numChannels() const;\r
-\r
- SampleDataFormat sampleFormat() const;\r
- bool isSampleFormatInterleaved() const;\r
- bool isSampleFormatHostApiSpecific() const;\r
- PaSampleFormat hostApiSpecificSampleFormat() const;\r
-\r
- PaTime suggestedLatency() const;\r
-\r
- void *hostApiSpecificStreamInfo() const;\r
- \r
- private:\r
- PaStreamParameters paStreamParameters_;\r
- };\r
-\r
-\r
-} // namespace portaudio\r
-\r
-// ---------------------------------------------------------------------------------------\r
-\r
-#endif // INCLUDED_PORTAUDIO_SINGLEDIRECTIONSTREAMPARAMETERS_HXX\r
+#ifndef INCLUDED_PORTAUDIO_SINGLEDIRECTIONSTREAMPARAMETERS_HXX
+#define INCLUDED_PORTAUDIO_SINGLEDIRECTIONSTREAMPARAMETERS_HXX
+
+// ---------------------------------------------------------------------------------------
+
+#include <cstddef>
+
+#include "portaudio.h"
+
+#include "portaudiocpp/System.hxx"
+#include "portaudiocpp/SampleDataFormat.hxx"
+
+// ---------------------------------------------------------------------------------------
+
+// Forward declaration(s):
+namespace portaudio
+{
+ class Device;
+}
+
+// ---------------------------------------------------------------------------------------
+
+// Declaration(s):
+namespace portaudio
+{
+
+ //////
+ /// @brief All parameters for one direction (either in or out) of a Stream. Together with
+ /// parameters common to both directions, two DirectionSpecificStreamParameters can make up
+ /// a StreamParameters object which contains all parameters for a Stream.
+ //////
+ class DirectionSpecificStreamParameters
+ {
+ public:
+ static DirectionSpecificStreamParameters null();
+
+ DirectionSpecificStreamParameters();
+ DirectionSpecificStreamParameters(const Device &device, int numChannels, SampleDataFormat format,
+ bool interleaved, PaTime suggestedLatency, void *hostApiSpecificStreamInfo);
+
+ // Set up methods:
+ void setDevice(const Device &device);
+ void setNumChannels(int numChannels);
+
+ void setSampleFormat(SampleDataFormat format, bool interleaved = true);
+ void setHostApiSpecificSampleFormat(PaSampleFormat format, bool interleaved = true);
+
+ void setSuggestedLatency(PaTime latency);
+
+ void setHostApiSpecificStreamInfo(void *streamInfo);
+
+ // Accessor methods:
+ PaStreamParameters *paStreamParameters();
+ const PaStreamParameters *paStreamParameters() const;
+
+ Device &device() const;
+ int numChannels() const;
+
+ SampleDataFormat sampleFormat() const;
+ bool isSampleFormatInterleaved() const;
+ bool isSampleFormatHostApiSpecific() const;
+ PaSampleFormat hostApiSpecificSampleFormat() const;
+
+ PaTime suggestedLatency() const;
+
+ void *hostApiSpecificStreamInfo() const;
+
+ private:
+ PaStreamParameters paStreamParameters_;
+ };
+
+
+} // namespace portaudio
+
+// ---------------------------------------------------------------------------------------
+
+#endif // INCLUDED_PORTAUDIO_SINGLEDIRECTIONSTREAMPARAMETERS_HXX
-#ifndef INCLUDED_PORTAUDIO_EXCEPTION_HXX\r
-#define INCLUDED_PORTAUDIO_EXCEPTION_HXX\r
-\r
-// ---------------------------------------------------------------------------------------\r
-\r
-#include <exception>\r
-\r
-#include "portaudio.h"\r
-\r
-// ---------------------------------------------------------------------------------------\r
-\r
-namespace portaudio\r
-{\r
-\r
- //////\r
- /// @brief Base class for all exceptions PortAudioCpp can throw.\r
- ///\r
- /// Class is derived from std::exception.\r
- //////\r
- class Exception : public std::exception\r
- {\r
- public:\r
- virtual ~Exception() throw() {}\r
-\r
- virtual const char *what() const throw() = 0;\r
- };\r
- \r
- // -----------------------------------------------------------------------------------\r
-\r
- //////\r
- /// @brief Wrapper for PortAudio error codes to C++ exceptions.\r
- ///\r
- /// It wraps up PortAudio's error handling mechanism using \r
- /// C++ exceptions and is derived from std::exception for \r
- /// easy exception handling and to ease integration with \r
- /// other code.\r
- ///\r
- /// To know what exceptions each function may throw, look up \r
- /// the errors that can occure in the PortAudio documentation \r
- /// for the equivalent functions.\r
- ///\r
- /// Some functions are likely to throw an exception (such as \r
- /// Stream::open(), etc) and these should always be called in \r
- /// try{} catch{} blocks and the thrown exceptions should be \r
- /// handled properly (ie. the application shouldn't just abort, \r
- /// but merely display a warning dialog to the user or something).\r
- /// However nearly all functions in PortAudioCpp are capable \r
- /// of throwing exceptions. When a function like Stream::isStopped() \r
- /// throws an exception, it's such an exceptional state that it's \r
- /// not likely that it can be recovered. PaExceptions such as these \r
- /// can ``safely'' be left to be handled by some outer catch-all-like \r
- /// mechanism for unrecoverable errors.\r
- //////\r
- class PaException : public Exception\r
- {\r
- public:\r
- explicit PaException(PaError error);\r
-\r
- const char *what() const throw();\r
-\r
- PaError paError() const;\r
- const char *paErrorText() const;\r
-\r
- bool isHostApiError() const; // extended\r
- long lastHostApiError() const;\r
- const char *lastHostApiErrorText() const;\r
-\r
- bool operator==(const PaException &rhs) const;\r
- bool operator!=(const PaException &rhs) const;\r
-\r
- private:\r
- PaError error_;\r
- };\r
-\r
- // -----------------------------------------------------------------------------------\r
-\r
- //////\r
- /// @brief Exceptions specific to PortAudioCpp (ie. exceptions which do not have an \r
- /// equivalent PortAudio error code).\r
- //////\r
- class PaCppException : public Exception\r
- {\r
- public:\r
- enum ExceptionSpecifier\r
- {\r
- UNABLE_TO_ADAPT_DEVICE\r
- };\r
-\r
- PaCppException(ExceptionSpecifier specifier);\r
-\r
- const char *what() const throw();\r
-\r
- ExceptionSpecifier specifier() const;\r
-\r
- bool operator==(const PaCppException &rhs) const;\r
- bool operator!=(const PaCppException &rhs) const;\r
-\r
- private:\r
- ExceptionSpecifier specifier_;\r
- };\r
-\r
-\r
-} // namespace portaudio\r
-\r
-// ---------------------------------------------------------------------------------------\r
-\r
-#endif // INCLUDED_PORTAUDIO_EXCEPTION_HXX\r
-\r
+#ifndef INCLUDED_PORTAUDIO_EXCEPTION_HXX
+#define INCLUDED_PORTAUDIO_EXCEPTION_HXX
+
+// ---------------------------------------------------------------------------------------
+
+#include <exception>
+
+#include "portaudio.h"
+
+// ---------------------------------------------------------------------------------------
+
+namespace portaudio
+{
+
+ //////
+ /// @brief Base class for all exceptions PortAudioCpp can throw.
+ ///
+ /// Class is derived from std::exception.
+ //////
+ class Exception : public std::exception
+ {
+ public:
+ virtual ~Exception() throw() {}
+
+ virtual const char *what() const throw() = 0;
+ };
+
+ // -----------------------------------------------------------------------------------
+
+ //////
+ /// @brief Wrapper for PortAudio error codes to C++ exceptions.
+ ///
+ /// It wraps up PortAudio's error handling mechanism using
+ /// C++ exceptions and is derived from std::exception for
+ /// easy exception handling and to ease integration with
+ /// other code.
+ ///
+ /// To know what exceptions each function may throw, look up
+ /// the errors that can occure in the PortAudio documentation
+ /// for the equivalent functions.
+ ///
+ /// Some functions are likely to throw an exception (such as
+ /// Stream::open(), etc) and these should always be called in
+ /// try{} catch{} blocks and the thrown exceptions should be
+ /// handled properly (ie. the application shouldn't just abort,
+ /// but merely display a warning dialog to the user or something).
+ /// However nearly all functions in PortAudioCpp are capable
+ /// of throwing exceptions. When a function like Stream::isStopped()
+ /// throws an exception, it's such an exceptional state that it's
+ /// not likely that it can be recovered. PaExceptions such as these
+ /// can ``safely'' be left to be handled by some outer catch-all-like
+ /// mechanism for unrecoverable errors.
+ //////
+ class PaException : public Exception
+ {
+ public:
+ explicit PaException(PaError error);
+
+ const char *what() const throw();
+
+ PaError paError() const;
+ const char *paErrorText() const;
+
+ bool isHostApiError() const; // extended
+ long lastHostApiError() const;
+ const char *lastHostApiErrorText() const;
+
+ bool operator==(const PaException &rhs) const;
+ bool operator!=(const PaException &rhs) const;
+
+ private:
+ PaError error_;
+ };
+
+ // -----------------------------------------------------------------------------------
+
+ //////
+ /// @brief Exceptions specific to PortAudioCpp (ie. exceptions which do not have an
+ /// equivalent PortAudio error code).
+ //////
+ class PaCppException : public Exception
+ {
+ public:
+ enum ExceptionSpecifier
+ {
+ UNABLE_TO_ADAPT_DEVICE
+ };
+
+ PaCppException(ExceptionSpecifier specifier);
+
+ const char *what() const throw();
+
+ ExceptionSpecifier specifier() const;
+
+ bool operator==(const PaCppException &rhs) const;
+ bool operator!=(const PaCppException &rhs) const;
+
+ private:
+ ExceptionSpecifier specifier_;
+ };
+
+
+} // namespace portaudio
+
+// ---------------------------------------------------------------------------------------
+
+#endif // INCLUDED_PORTAUDIO_EXCEPTION_HXX
+
-#ifndef INCLUDED_PORTAUDIO_HOSTAPI_HXX\r
-#define INCLUDED_PORTAUDIO_HOSTAPI_HXX\r
-\r
-// ---------------------------------------------------------------------------------------\r
-\r
-#include "portaudio.h"\r
-\r
-#include "portaudiocpp/System.hxx"\r
-\r
-// ---------------------------------------------------------------------------------------\r
-\r
-// Forward declaration(s):\r
-namespace portaudio\r
-{\r
- class Device;\r
-}\r
-\r
-// ---------------------------------------------------------------------------------------\r
-\r
-// Declaration(s):\r
-namespace portaudio\r
-{\r
-\r
-\r
- //////\r
- /// @brief HostApi represents a host API (usually type of driver) in the System.\r
- ///\r
- /// A single System can support multiple HostApi's each one typically having \r
- /// a set of Devices using that HostApi (usually driver type). All Devices in \r
- /// the HostApi can be enumerated and the default input/output Device for this \r
- /// HostApi can be retreived.\r
- //////\r
- class HostApi\r
- {\r
- public:\r
- typedef System::DeviceIterator DeviceIterator;\r
-\r
- // query info: id, name, numDevices\r
- PaHostApiTypeId typeId() const;\r
- PaHostApiIndex index() const;\r
- const char *name() const;\r
- int deviceCount() const;\r
-\r
- // iterate devices\r
- DeviceIterator devicesBegin();\r
- DeviceIterator devicesEnd();\r
-\r
- // default devices\r
- Device &defaultInputDevice() const;\r
- Device &defaultOutputDevice() const;\r
-\r
- // comparison operators\r
- bool operator==(const HostApi &rhs) const;\r
- bool operator!=(const HostApi &rhs) const;\r
-\r
- private:\r
- const PaHostApiInfo *info_;\r
- Device **devices_;\r
-\r
- private:\r
- friend class System;\r
-\r
- explicit HostApi(PaHostApiIndex index);\r
- ~HostApi();\r
-\r
- HostApi(const HostApi &); // non-copyable\r
- HostApi &operator=(const HostApi &); // non-copyable\r
- };\r
-\r
-\r
-}\r
-\r
-// ---------------------------------------------------------------------------------------\r
-\r
-#endif // INCLUDED_PORTAUDIO_HOSTAPI_HXX\r
-\r
+#ifndef INCLUDED_PORTAUDIO_HOSTAPI_HXX
+#define INCLUDED_PORTAUDIO_HOSTAPI_HXX
+
+// ---------------------------------------------------------------------------------------
+
+#include "portaudio.h"
+
+#include "portaudiocpp/System.hxx"
+
+// ---------------------------------------------------------------------------------------
+
+// Forward declaration(s):
+namespace portaudio
+{
+ class Device;
+}
+
+// ---------------------------------------------------------------------------------------
+
+// Declaration(s):
+namespace portaudio
+{
+
+
+ //////
+ /// @brief HostApi represents a host API (usually type of driver) in the System.
+ ///
+ /// A single System can support multiple HostApi's each one typically having
+ /// a set of Devices using that HostApi (usually driver type). All Devices in
+ /// the HostApi can be enumerated and the default input/output Device for this
+ /// HostApi can be retreived.
+ //////
+ class HostApi
+ {
+ public:
+ typedef System::DeviceIterator DeviceIterator;
+
+ // query info: id, name, numDevices
+ PaHostApiTypeId typeId() const;
+ PaHostApiIndex index() const;
+ const char *name() const;
+ int deviceCount() const;
+
+ // iterate devices
+ DeviceIterator devicesBegin();
+ DeviceIterator devicesEnd();
+
+ // default devices
+ Device &defaultInputDevice() const;
+ Device &defaultOutputDevice() const;
+
+ // comparison operators
+ bool operator==(const HostApi &rhs) const;
+ bool operator!=(const HostApi &rhs) const;
+
+ private:
+ const PaHostApiInfo *info_;
+ Device **devices_;
+
+ private:
+ friend class System;
+
+ explicit HostApi(PaHostApiIndex index);
+ ~HostApi();
+
+ HostApi(const HostApi &); // non-copyable
+ HostApi &operator=(const HostApi &); // non-copyable
+ };
+
+
+}
+
+// ---------------------------------------------------------------------------------------
+
+#endif // INCLUDED_PORTAUDIO_HOSTAPI_HXX
+
-#ifndef INCLUDED_PORTAUDIO_INTERFACECALLBACKSTREAM_HXX\r
-#define INCLUDED_PORTAUDIO_INTERFACECALLBACKSTREAM_HXX\r
-\r
-// ---------------------------------------------------------------------------------------\r
-\r
-#include "portaudio.h"\r
-\r
-#include "portaudiocpp/CallbackStream.hxx"\r
-\r
-// ---------------------------------------------------------------------------------------\r
-\r
-// Forward declaration(s)\r
-namespace portaudio\r
-{\r
- class StreamParameters;\r
- class CallbackInterface;\r
-}\r
-\r
-// ---------------------------------------------------------------------------------------\r
-\r
-// Declaration(s):\r
-namespace portaudio\r
-{\r
-\r
-\r
- //////\r
- /// @brief Callback stream using an instance of an object that's derived from the CallbackInterface \r
- /// interface.\r
- //////\r
- class InterfaceCallbackStream : public CallbackStream\r
- {\r
- public:\r
- InterfaceCallbackStream();\r
- InterfaceCallbackStream(const StreamParameters ¶meters, CallbackInterface &instance);\r
- ~InterfaceCallbackStream();\r
- \r
- void open(const StreamParameters ¶meters, CallbackInterface &instance);\r
-\r
- private:\r
- InterfaceCallbackStream(const InterfaceCallbackStream &); // non-copyable\r
- InterfaceCallbackStream &operator=(const InterfaceCallbackStream &); // non-copyable\r
- };\r
-\r
-\r
-} // portaudio\r
-\r
-// ---------------------------------------------------------------------------------------\r
-\r
-#endif // INCLUDED_PORTAUDIO_INTERFACECALLBACKSTREAM_HXX\r
+#ifndef INCLUDED_PORTAUDIO_INTERFACECALLBACKSTREAM_HXX
+#define INCLUDED_PORTAUDIO_INTERFACECALLBACKSTREAM_HXX
+
+// ---------------------------------------------------------------------------------------
+
+#include "portaudio.h"
+
+#include "portaudiocpp/CallbackStream.hxx"
+
+// ---------------------------------------------------------------------------------------
+
+// Forward declaration(s)
+namespace portaudio
+{
+ class StreamParameters;
+ class CallbackInterface;
+}
+
+// ---------------------------------------------------------------------------------------
+
+// Declaration(s):
+namespace portaudio
+{
+
+
+ //////
+ /// @brief Callback stream using an instance of an object that's derived from the CallbackInterface
+ /// interface.
+ //////
+ class InterfaceCallbackStream : public CallbackStream
+ {
+ public:
+ InterfaceCallbackStream();
+ InterfaceCallbackStream(const StreamParameters ¶meters, CallbackInterface &instance);
+ ~InterfaceCallbackStream();
+
+ void open(const StreamParameters ¶meters, CallbackInterface &instance);
+
+ private:
+ InterfaceCallbackStream(const InterfaceCallbackStream &); // non-copyable
+ InterfaceCallbackStream &operator=(const InterfaceCallbackStream &); // non-copyable
+ };
+
+
+} // portaudio
+
+// ---------------------------------------------------------------------------------------
+
+#endif // INCLUDED_PORTAUDIO_INTERFACECALLBACKSTREAM_HXX
-#ifndef INCLUDED_PORTAUDIO_MEMFUNCALLBACKSTREAM_HXX\r
-#define INCLUDED_PORTAUDIO_MEMFUNCALLBACKSTREAM_HXX\r
-\r
-// ---------------------------------------------------------------------------------------\r
-\r
-#include "portaudio.h"\r
-\r
-#include "portaudiocpp/CallbackStream.hxx"\r
-#include "portaudiocpp/CallbackInterface.hxx"\r
-#include "portaudiocpp/StreamParameters.hxx"\r
-#include "portaudiocpp/Exception.hxx"\r
-#include "portaudiocpp/InterfaceCallbackStream.hxx"\r
-\r
-// ---------------------------------------------------------------------------------------\r
-\r
-namespace portaudio\r
-{\r
-\r
-\r
- //////\r
- /// @brief Callback stream using a class's member function as a callback. Template argument T is the type of the \r
- /// class of which a member function is going to be used.\r
- ///\r
- /// Example usage:\r
- /// @verbatim MemFunCallback<MyClass> stream = MemFunCallbackStream(parameters, *this, &MyClass::myCallbackFunction); @endverbatim\r
- //////\r
- template<typename T>\r
- class MemFunCallbackStream : public CallbackStream\r
- {\r
- public:\r
- typedef int (T::*CallbackFunPtr)(const void *, void *, unsigned long, const PaStreamCallbackTimeInfo *, \r
- PaStreamCallbackFlags);\r
-\r
- // -------------------------------------------------------------------------------\r
-\r
- MemFunCallbackStream()\r
- {\r
- }\r
-\r
- MemFunCallbackStream(const StreamParameters ¶meters, T &instance, CallbackFunPtr memFun) : adapter_(instance, memFun)\r
- {\r
- open(parameters);\r
- }\r
-\r
- ~MemFunCallbackStream()\r
- {\r
- close();\r
- }\r
-\r
- void open(const StreamParameters ¶meters, T &instance, CallbackFunPtr memFun)\r
- {\r
- // XXX: need to check if already open?\r
-\r
- adapter_.init(instance, memFun);\r
- open(parameters);\r
- }\r
-\r
- private:\r
- MemFunCallbackStream(const MemFunCallbackStream &); // non-copyable\r
- MemFunCallbackStream &operator=(const MemFunCallbackStream &); // non-copyable\r
-\r
- //////\r
- /// @brief Inner class which adapts a member function callback to a CallbackInterface compliant \r
- /// class (so it can be adapted using the paCallbackAdapter function).\r
- //////\r
- class MemFunToCallbackInterfaceAdapter : public CallbackInterface\r
- {\r
- public:\r
- MemFunToCallbackInterfaceAdapter() {}\r
- MemFunToCallbackInterfaceAdapter(T &instance, CallbackFunPtr memFun) : instance_(&instance), memFun_(memFun) {}\r
-\r
- void init(T &instance, CallbackFunPtr memFun)\r
- {\r
- instance_ = &instance;\r
- memFun_ = memFun;\r
- }\r
-\r
- int paCallbackFun(const void *inputBuffer, void *outputBuffer, unsigned long numFrames, \r
- const PaStreamCallbackTimeInfo *timeInfo, PaStreamCallbackFlags statusFlags)\r
- {\r
- return (instance_->*memFun_)(inputBuffer, outputBuffer, numFrames, timeInfo, statusFlags);\r
- }\r
-\r
- private:\r
- T *instance_;\r
- CallbackFunPtr memFun_;\r
- };\r
-\r
- MemFunToCallbackInterfaceAdapter adapter_;\r
-\r
- void open(const StreamParameters ¶meters)\r
- {\r
- PaError err = Pa_OpenStream(&stream_, parameters.inputParameters().paStreamParameters(), parameters.outputParameters().paStreamParameters(), \r
- parameters.sampleRate(), parameters.framesPerBuffer(), parameters.flags(), &impl::callbackInterfaceToPaCallbackAdapter, \r
- static_cast<void *>(&adapter_));\r
-\r
- if (err != paNoError)\r
- throw PaException(err);\r
- }\r
- };\r
-\r
-\r
-} // portaudio\r
-\r
-// ---------------------------------------------------------------------------------------\r
-\r
-#endif // INCLUDED_PORTAUDIO_MEMFUNCALLBACKSTREAM_HXX\r
+#ifndef INCLUDED_PORTAUDIO_MEMFUNCALLBACKSTREAM_HXX
+#define INCLUDED_PORTAUDIO_MEMFUNCALLBACKSTREAM_HXX
+
+// ---------------------------------------------------------------------------------------
+
+#include "portaudio.h"
+
+#include "portaudiocpp/CallbackStream.hxx"
+#include "portaudiocpp/CallbackInterface.hxx"
+#include "portaudiocpp/StreamParameters.hxx"
+#include "portaudiocpp/Exception.hxx"
+#include "portaudiocpp/InterfaceCallbackStream.hxx"
+
+// ---------------------------------------------------------------------------------------
+
+namespace portaudio
+{
+
+
+ //////
+ /// @brief Callback stream using a class's member function as a callback. Template argument T is the type of the
+ /// class of which a member function is going to be used.
+ ///
+ /// Example usage:
+ /// @verbatim MemFunCallback<MyClass> stream = MemFunCallbackStream(parameters, *this, &MyClass::myCallbackFunction); @endverbatim
+ //////
+ template<typename T>
+ class MemFunCallbackStream : public CallbackStream
+ {
+ public:
+ typedef int (T::*CallbackFunPtr)(const void *, void *, unsigned long, const PaStreamCallbackTimeInfo *,
+ PaStreamCallbackFlags);
+
+ // -------------------------------------------------------------------------------
+
+ MemFunCallbackStream()
+ {
+ }
+
+ MemFunCallbackStream(const StreamParameters ¶meters, T &instance, CallbackFunPtr memFun) : adapter_(instance, memFun)
+ {
+ open(parameters);
+ }
+
+ ~MemFunCallbackStream()
+ {
+ close();
+ }
+
+ void open(const StreamParameters ¶meters, T &instance, CallbackFunPtr memFun)
+ {
+ // XXX: need to check if already open?
+
+ adapter_.init(instance, memFun);
+ open(parameters);
+ }
+
+ private:
+ MemFunCallbackStream(const MemFunCallbackStream &); // non-copyable
+ MemFunCallbackStream &operator=(const MemFunCallbackStream &); // non-copyable
+
+ //////
+ /// @brief Inner class which adapts a member function callback to a CallbackInterface compliant
+ /// class (so it can be adapted using the paCallbackAdapter function).
+ //////
+ class MemFunToCallbackInterfaceAdapter : public CallbackInterface
+ {
+ public:
+ MemFunToCallbackInterfaceAdapter() {}
+ MemFunToCallbackInterfaceAdapter(T &instance, CallbackFunPtr memFun) : instance_(&instance), memFun_(memFun) {}
+
+ void init(T &instance, CallbackFunPtr memFun)
+ {
+ instance_ = &instance;
+ memFun_ = memFun;
+ }
+
+ int paCallbackFun(const void *inputBuffer, void *outputBuffer, unsigned long numFrames,
+ const PaStreamCallbackTimeInfo *timeInfo, PaStreamCallbackFlags statusFlags)
+ {
+ return (instance_->*memFun_)(inputBuffer, outputBuffer, numFrames, timeInfo, statusFlags);
+ }
+
+ private:
+ T *instance_;
+ CallbackFunPtr memFun_;
+ };
+
+ MemFunToCallbackInterfaceAdapter adapter_;
+
+ void open(const StreamParameters ¶meters)
+ {
+ PaError err = Pa_OpenStream(&stream_, parameters.inputParameters().paStreamParameters(), parameters.outputParameters().paStreamParameters(),
+ parameters.sampleRate(), parameters.framesPerBuffer(), parameters.flags(), &impl::callbackInterfaceToPaCallbackAdapter,
+ static_cast<void *>(&adapter_));
+
+ if (err != paNoError)
+ throw PaException(err);
+ }
+ };
+
+
+} // portaudio
+
+// ---------------------------------------------------------------------------------------
+
+#endif // INCLUDED_PORTAUDIO_MEMFUNCALLBACKSTREAM_HXX
-#ifndef INCLUDED_PORTAUDIO_PORTAUDIOCPP_HXX\r
-#define INCLUDED_PORTAUDIO_PORTAUDIOCPP_HXX\r
-\r
-// ---------------------------------------------------------------------------------------\r
-\r
-//////\r
-/// @mainpage PortAudioCpp\r
-///\r
-/// <h1>PortAudioCpp - A Native C++ Binding of PortAudio V19</h1>\r
-/// <h2>PortAudio</h2>\r
-/// <p>\r
-/// PortAudio is a portable and mature C API for accessing audio hardware. It offers both callback-based and blocking \r
-/// style input and output, deals with sample data format conversions, dithering and much more. There are a large number \r
-/// of implementations available for various platforms including Windows MME, Windows DirectX, Windows and MacOS (Classic) \r
-/// ASIO, MacOS Classic SoundManager, MacOS X CoreAudio, OSS (Linux), Linux ALSA, JACK (MacOS X and Linux) and SGI Irix \r
-/// AL. Note that, currently not all of these implementations are equally complete or up-to-date (as PortAudio V19 is \r
-/// still in development). Because PortAudio has a C API, it can easily be called from a variety of other programming \r
-/// languages.\r
-/// </p>\r
-/// <h2>PortAudioCpp</h2>\r
-/// <p>\r
-/// Although, it is possible to use PortAudio's C API from within a C++ program, this is usually a little awkward \r
-/// as procedural and object-oriented paradigms need to be mixed. PortAudioCpp aims to resolve this by encapsulating \r
-/// PortAudio's C API to form an equivalent object-oriented C++ API. It provides a more natural integration of PortAudio \r
-/// into C++ programs as well as a more structured interface. PortAudio's concepts were preserved as much as possible and \r
-/// no additional features were added except for some `convenience methods'.\r
-/// </p>\r
-/// <p>\r
-/// PortAudioCpp's main features are:\r
-/// <ul>\r
-/// <li>Structured object model.</li>\r
-/// <li>C++ exception handling instead of C-style error return codes.</li>\r
-/// <li>Handling of callbacks using free functions (C and C++), static functions, member functions or instances of classes \r
-/// derived from a given interface.</li>\r
-/// <li>STL compliant iterators to host APIs and devices.</li>\r
-/// <li>Some additional convenience functions to more easily set up and use PortAudio.</li>\r
-/// </ul>\r
-/// </p>\r
-/// <p>\r
-/// PortAudioCpp requires a recent version of the PortAudio V19 source code. This can be obtained from CVS or as a snapshot \r
-/// from the website. The examples also require the ASIO 2 SDK which can be obtained from the Steinberg website. Alternatively, the \r
-/// examples can easily be modified to compile without needing ASIO.\r
-/// </p>\r
-/// <p>\r
-/// Supported platforms:\r
-/// <ul>\r
-/// <li>Microsoft Visual C++ 6.0, 7.0 (.NET 2002) and 7.1 (.NET 2003).</li>\r
-/// <li>GNU G++ 2.95 and G++ 3.3.</li>\r
-/// </ul>\r
-/// Other platforms should be easily supported as PortAudioCpp is platform-independent and (reasonably) C++ standard compliant.\r
-/// </p>\r
-/// <p>\r
-/// This documentation mainly provides information specific to PortAudioCpp. For a more complete explaination of all of the \r
-/// concepts used, please consult the PortAudio documentation.\r
-/// </p>\r
-/// <p>\r
-/// PortAudioCpp was developed by Merlijn Blaauw with many great suggestions and help from Ross Bencina. Ludwig Schwardt provided \r
-/// GNU/Linux build files and checked G++ compatibility. PortAudioCpp may be used under the same licensing, conditions and \r
-/// warranty as PortAudio. See <a href="http://www.portaudio.com/license.html">the PortAudio license</a> for more details.\r
-/// </p>\r
-/// <h2>Links</h2>\r
-/// <p>\r
-/// <a href="http://www.portaudio.com/">Official PortAudio site.</a><br>\r
-/// </p>\r
-//////\r
-\r
-// ---------------------------------------------------------------------------------------\r
-\r
-//////\r
-/// @namespace portaudio\r
-///\r
-/// To avoid name collision, everything in PortAudioCpp is in the portaudio \r
-/// namespace. If this name is too long it's usually pretty safe to use an \r
-/// alias like ``namespace pa = portaudio;''.\r
-//////\r
-\r
-// ---------------------------------------------------------------------------------------\r
-\r
-//////\r
-/// @file PortAudioCpp.hxx\r
-/// An include-all header file (for lazy programmers and using pre-compiled headers).\r
-//////\r
-\r
-// ---------------------------------------------------------------------------------------\r
-\r
-#include "portaudio.h"\r
-\r
-#include "portaudiocpp/AutoSystem.hxx"\r
-#include "portaudiocpp/BlockingStream.hxx"\r
-#include "portaudiocpp/CallbackInterface.hxx"\r
-#include "portaudiocpp/CallbackStream.hxx"\r
-#include "portaudiocpp/CFunCallbackStream.hxx"\r
-#include "portaudiocpp/CppFunCallbackStream.hxx"\r
-#include "portaudiocpp/Device.hxx"\r
-#include "portaudiocpp/Exception.hxx"\r
-#include "portaudiocpp/HostApi.hxx"\r
-#include "portaudiocpp/InterfaceCallbackStream.hxx"\r
-#include "portaudiocpp/MemFunCallbackStream.hxx"\r
-#include "portaudiocpp/SampleDataFormat.hxx"\r
-#include "portaudiocpp/DirectionSpecificStreamParameters.hxx"\r
-#include "portaudiocpp/Stream.hxx"\r
-#include "portaudiocpp/StreamParameters.hxx"\r
-#include "portaudiocpp/System.hxx"\r
-#include "portaudiocpp/SystemDeviceIterator.hxx"\r
-#include "portaudiocpp/SystemHostApiIterator.hxx"\r
-\r
-// ---------------------------------------------------------------------------------------\r
-\r
-#endif // INCLUDED_PORTAUDIO_PORTAUDIOCPP_HXX\r
+#ifndef INCLUDED_PORTAUDIO_PORTAUDIOCPP_HXX
+#define INCLUDED_PORTAUDIO_PORTAUDIOCPP_HXX
+
+// ---------------------------------------------------------------------------------------
+
+//////
+/// @mainpage PortAudioCpp
+///
+/// <h1>PortAudioCpp - A Native C++ Binding of PortAudio V19</h1>
+/// <h2>PortAudio</h2>
+/// <p>
+/// PortAudio is a portable and mature C API for accessing audio hardware. It offers both callback-based and blocking
+/// style input and output, deals with sample data format conversions, dithering and much more. There are a large number
+/// of implementations available for various platforms including Windows MME, Windows DirectX, Windows and MacOS (Classic)
+/// ASIO, MacOS Classic SoundManager, MacOS X CoreAudio, OSS (Linux), Linux ALSA, JACK (MacOS X and Linux) and SGI Irix
+/// AL. Note that, currently not all of these implementations are equally complete or up-to-date (as PortAudio V19 is
+/// still in development). Because PortAudio has a C API, it can easily be called from a variety of other programming
+/// languages.
+/// </p>
+/// <h2>PortAudioCpp</h2>
+/// <p>
+/// Although, it is possible to use PortAudio's C API from within a C++ program, this is usually a little awkward
+/// as procedural and object-oriented paradigms need to be mixed. PortAudioCpp aims to resolve this by encapsulating
+/// PortAudio's C API to form an equivalent object-oriented C++ API. It provides a more natural integration of PortAudio
+/// into C++ programs as well as a more structured interface. PortAudio's concepts were preserved as much as possible and
+/// no additional features were added except for some `convenience methods'.
+/// </p>
+/// <p>
+/// PortAudioCpp's main features are:
+/// <ul>
+/// <li>Structured object model.</li>
+/// <li>C++ exception handling instead of C-style error return codes.</li>
+/// <li>Handling of callbacks using free functions (C and C++), static functions, member functions or instances of classes
+/// derived from a given interface.</li>
+/// <li>STL compliant iterators to host APIs and devices.</li>
+/// <li>Some additional convenience functions to more easily set up and use PortAudio.</li>
+/// </ul>
+/// </p>
+/// <p>
+/// PortAudioCpp requires a recent version of the PortAudio V19 source code. This can be obtained from CVS or as a snapshot
+/// from the website. The examples also require the ASIO 2 SDK which can be obtained from the Steinberg website. Alternatively, the
+/// examples can easily be modified to compile without needing ASIO.
+/// </p>
+/// <p>
+/// Supported platforms:
+/// <ul>
+/// <li>Microsoft Visual C++ 6.0, 7.0 (.NET 2002) and 7.1 (.NET 2003).</li>
+/// <li>GNU G++ 2.95 and G++ 3.3.</li>
+/// </ul>
+/// Other platforms should be easily supported as PortAudioCpp is platform-independent and (reasonably) C++ standard compliant.
+/// </p>
+/// <p>
+/// This documentation mainly provides information specific to PortAudioCpp. For a more complete explaination of all of the
+/// concepts used, please consult the PortAudio documentation.
+/// </p>
+/// <p>
+/// PortAudioCpp was developed by Merlijn Blaauw with many great suggestions and help from Ross Bencina. Ludwig Schwardt provided
+/// GNU/Linux build files and checked G++ compatibility. PortAudioCpp may be used under the same licensing, conditions and
+/// warranty as PortAudio. See <a href="http://www.portaudio.com/license.html">the PortAudio license</a> for more details.
+/// </p>
+/// <h2>Links</h2>
+/// <p>
+/// <a href="http://www.portaudio.com/">Official PortAudio site.</a><br>
+/// </p>
+//////
+
+// ---------------------------------------------------------------------------------------
+
+//////
+/// @namespace portaudio
+///
+/// To avoid name collision, everything in PortAudioCpp is in the portaudio
+/// namespace. If this name is too long it's usually pretty safe to use an
+/// alias like ``namespace pa = portaudio;''.
+//////
+
+// ---------------------------------------------------------------------------------------
+
+//////
+/// @file PortAudioCpp.hxx
+/// An include-all header file (for lazy programmers and using pre-compiled headers).
+//////
+
+// ---------------------------------------------------------------------------------------
+
+#include "portaudio.h"
+
+#include "portaudiocpp/AutoSystem.hxx"
+#include "portaudiocpp/BlockingStream.hxx"
+#include "portaudiocpp/CallbackInterface.hxx"
+#include "portaudiocpp/CallbackStream.hxx"
+#include "portaudiocpp/CFunCallbackStream.hxx"
+#include "portaudiocpp/CppFunCallbackStream.hxx"
+#include "portaudiocpp/Device.hxx"
+#include "portaudiocpp/Exception.hxx"
+#include "portaudiocpp/HostApi.hxx"
+#include "portaudiocpp/InterfaceCallbackStream.hxx"
+#include "portaudiocpp/MemFunCallbackStream.hxx"
+#include "portaudiocpp/SampleDataFormat.hxx"
+#include "portaudiocpp/DirectionSpecificStreamParameters.hxx"
+#include "portaudiocpp/Stream.hxx"
+#include "portaudiocpp/StreamParameters.hxx"
+#include "portaudiocpp/System.hxx"
+#include "portaudiocpp/SystemDeviceIterator.hxx"
+#include "portaudiocpp/SystemHostApiIterator.hxx"
+
+// ---------------------------------------------------------------------------------------
+
+#endif // INCLUDED_PORTAUDIO_PORTAUDIOCPP_HXX
-#ifndef INCLUDED_PORTAUDIO_SAMPLEDATAFORMAT_HXX\r
-#define INCLUDED_PORTAUDIO_SAMPLEDATAFORMAT_HXX\r
-\r
-// ---------------------------------------------------------------------------------------\r
-\r
-#include "portaudio.h"\r
-\r
-// ---------------------------------------------------------------------------------------\r
-\r
-namespace portaudio\r
-{\r
-\r
-\r
- //////\r
- /// @brief PortAudio sample data formats.\r
- ///\r
- /// Small helper enum to wrap the PortAudio defines.\r
- //////\r
- enum SampleDataFormat\r
- {\r
- INVALID_FORMAT = 0,\r
- FLOAT32 = paFloat32,\r
- INT32 = paInt32,\r
- INT24 = paInt24,\r
- INT16 = paInt16,\r
- INT8 = paInt8,\r
- UINT8 = paUInt8\r
- };\r
-\r
-\r
-} // namespace portaudio\r
-\r
-// ---------------------------------------------------------------------------------------\r
-\r
-#endif // INCLUDED_PORTAUDIO_SAMPLEDATAFORMAT_HXX\r
+#ifndef INCLUDED_PORTAUDIO_SAMPLEDATAFORMAT_HXX
+#define INCLUDED_PORTAUDIO_SAMPLEDATAFORMAT_HXX
+
+// ---------------------------------------------------------------------------------------
+
+#include "portaudio.h"
+
+// ---------------------------------------------------------------------------------------
+
+namespace portaudio
+{
+
+
+ //////
+ /// @brief PortAudio sample data formats.
+ ///
+ /// Small helper enum to wrap the PortAudio defines.
+ //////
+ enum SampleDataFormat
+ {
+ INVALID_FORMAT = 0,
+ FLOAT32 = paFloat32,
+ INT32 = paInt32,
+ INT24 = paInt24,
+ INT16 = paInt16,
+ INT8 = paInt8,
+ UINT8 = paUInt8
+ };
+
+
+} // namespace portaudio
+
+// ---------------------------------------------------------------------------------------
+
+#endif // INCLUDED_PORTAUDIO_SAMPLEDATAFORMAT_HXX
-#ifndef INCLUDED_PORTAUDIO_STREAM_HXX\r
-#define INCLUDED_PORTAUDIO_STREAM_HXX\r
-\r
-#include "portaudio.h"\r
-\r
-// ---------------------------------------------------------------------------------------\r
-\r
-// Forward declaration(s):\r
-namespace portaudio\r
-{\r
- class StreamParameters;\r
-}\r
-\r
-// ---------------------------------------------------------------------------------------\r
-\r
-// Declaration(s):\r
-namespace portaudio\r
-{\r
-\r
-\r
- //////\r
- /// @brief A Stream represents an active or inactive input and/or output data \r
- /// stream in the System.\r
- /// \r
- /// Concrete Stream classes should ensure themselves being in a closed state at \r
- /// destruction (i.e. by calling their own close() method in their deconstructor). \r
- /// Following good C++ programming practices, care must be taken to ensure no \r
- /// exceptions are thrown by the deconstructor of these classes. As a consequence, \r
- /// clients need to explicitly call close() to ensure the stream closed successfully.\r
- ///\r
- /// The Stream object can be used to manipulate the Stream's state. Also, time-constant \r
- /// and time-varying information about the Stream can be retreived.\r
- //////\r
- class Stream\r
- {\r
- public:\r
- // Opening/closing:\r
- virtual ~Stream();\r
-\r
- virtual void close();\r
- bool isOpen() const;\r
-\r
- // Additional set up:\r
- void setStreamFinishedCallback(PaStreamFinishedCallback *callback);\r
-\r
- // State management:\r
- void start();\r
- void stop();\r
- void abort();\r
-\r
- bool isStopped() const;\r
- bool isActive() const;\r
-\r
- // Stream info (time-constant, but might become time-variant soon):\r
- PaTime inputLatency() const;\r
- PaTime outputLatency() const;\r
- double sampleRate() const;\r
-\r
- // Stream info (time-varying):\r
- PaTime time() const;\r
-\r
- // Accessors for PortAudio PaStream, useful for interfacing \r
- // with PortAudio add-ons (such as PortMixer) for instance:\r
- const PaStream *paStream() const;\r
- PaStream *paStream();\r
-\r
- protected:\r
- Stream(); // abstract class\r
-\r
- PaStream *stream_;\r
-\r
- private:\r
- Stream(const Stream &); // non-copyable\r
- Stream &operator=(const Stream &); // non-copyable\r
- };\r
-\r
-\r
-} // namespace portaudio\r
-\r
-\r
-#endif // INCLUDED_PORTAUDIO_STREAM_HXX\r
-\r
+#ifndef INCLUDED_PORTAUDIO_STREAM_HXX
+#define INCLUDED_PORTAUDIO_STREAM_HXX
+
+#include "portaudio.h"
+
+// ---------------------------------------------------------------------------------------
+
+// Forward declaration(s):
+namespace portaudio
+{
+ class StreamParameters;
+}
+
+// ---------------------------------------------------------------------------------------
+
+// Declaration(s):
+namespace portaudio
+{
+
+
+ //////
+ /// @brief A Stream represents an active or inactive input and/or output data
+ /// stream in the System.
+ ///
+ /// Concrete Stream classes should ensure themselves being in a closed state at
+ /// destruction (i.e. by calling their own close() method in their deconstructor).
+ /// Following good C++ programming practices, care must be taken to ensure no
+ /// exceptions are thrown by the deconstructor of these classes. As a consequence,
+ /// clients need to explicitly call close() to ensure the stream closed successfully.
+ ///
+ /// The Stream object can be used to manipulate the Stream's state. Also, time-constant
+ /// and time-varying information about the Stream can be retreived.
+ //////
+ class Stream
+ {
+ public:
+ // Opening/closing:
+ virtual ~Stream();
+
+ virtual void close();
+ bool isOpen() const;
+
+ // Additional set up:
+ void setStreamFinishedCallback(PaStreamFinishedCallback *callback);
+
+ // State management:
+ void start();
+ void stop();
+ void abort();
+
+ bool isStopped() const;
+ bool isActive() const;
+
+ // Stream info (time-constant, but might become time-variant soon):
+ PaTime inputLatency() const;
+ PaTime outputLatency() const;
+ double sampleRate() const;
+
+ // Stream info (time-varying):
+ PaTime time() const;
+
+ // Accessors for PortAudio PaStream, useful for interfacing
+ // with PortAudio add-ons (such as PortMixer) for instance:
+ const PaStream *paStream() const;
+ PaStream *paStream();
+
+ protected:
+ Stream(); // abstract class
+
+ PaStream *stream_;
+
+ private:
+ Stream(const Stream &); // non-copyable
+ Stream &operator=(const Stream &); // non-copyable
+ };
+
+
+} // namespace portaudio
+
+
+#endif // INCLUDED_PORTAUDIO_STREAM_HXX
+
-#ifndef INCLUDED_PORTAUDIO_STREAMPARAMETERS_HXX\r
-#define INCLUDED_PORTAUDIO_STREAMPARAMETERS_HXX\r
-\r
-// ---------------------------------------------------------------------------------------\r
-\r
-#include "portaudio.h"\r
-\r
-#include "portaudiocpp/DirectionSpecificStreamParameters.hxx"\r
-\r
-// ---------------------------------------------------------------------------------------\r
-\r
-// Declaration(s):\r
-namespace portaudio\r
-{\r
-\r
- //////\r
- /// @brief The entire set of parameters needed to configure and open \r
- /// a Stream.\r
- ///\r
- /// It contains parameters of input, output and shared parameters. \r
- /// Using the isSupported() method, the StreamParameters can be \r
- /// checked if opening a Stream using this StreamParameters would \r
- /// succeed or not. Accessors are provided to higher-level parameters \r
- /// aswell as the lower-level parameters which are mainly intended for \r
- /// internal use.\r
- //////\r
- class StreamParameters\r
- {\r
- public:\r
- StreamParameters();\r
- StreamParameters(const DirectionSpecificStreamParameters &inputParameters, \r
- const DirectionSpecificStreamParameters &outputParameters, double sampleRate, \r
- unsigned long framesPerBuffer, PaStreamFlags flags);\r
-\r
- // Set up for direction-specific:\r
- void setInputParameters(const DirectionSpecificStreamParameters ¶meters);\r
- void setOutputParameters(const DirectionSpecificStreamParameters ¶meters);\r
-\r
- // Set up for common parameters:\r
- void setSampleRate(double sampleRate);\r
- void setFramesPerBuffer(unsigned long framesPerBuffer);\r
- void setFlag(PaStreamFlags flag);\r
- void unsetFlag(PaStreamFlags flag);\r
- void clearFlags();\r
-\r
- // Validation:\r
- bool isSupported() const;\r
-\r
- // Accessors (direction-specific):\r
- DirectionSpecificStreamParameters &inputParameters();\r
- const DirectionSpecificStreamParameters &inputParameters() const;\r
- DirectionSpecificStreamParameters &outputParameters();\r
- const DirectionSpecificStreamParameters &outputParameters() const;\r
-\r
- // Accessors (common):\r
- double sampleRate() const;\r
- unsigned long framesPerBuffer() const;\r
- PaStreamFlags flags() const;\r
- bool isFlagSet(PaStreamFlags flag) const;\r
-\r
- private:\r
- // Half-duplex specific parameters:\r
- DirectionSpecificStreamParameters inputParameters_;\r
- DirectionSpecificStreamParameters outputParameters_;\r
-\r
- // Common parameters:\r
- double sampleRate_;\r
- unsigned long framesPerBuffer_;\r
- PaStreamFlags flags_;\r
- };\r
-\r
-\r
-} // namespace portaudio\r
-\r
-// ---------------------------------------------------------------------------------------\r
-\r
-#endif // INCLUDED_PORTAUDIO_STREAMPARAMETERS_HXX\r
+#ifndef INCLUDED_PORTAUDIO_STREAMPARAMETERS_HXX
+#define INCLUDED_PORTAUDIO_STREAMPARAMETERS_HXX
+
+// ---------------------------------------------------------------------------------------
+
+#include "portaudio.h"
+
+#include "portaudiocpp/DirectionSpecificStreamParameters.hxx"
+
+// ---------------------------------------------------------------------------------------
+
+// Declaration(s):
+namespace portaudio
+{
+
+ //////
+ /// @brief The entire set of parameters needed to configure and open
+ /// a Stream.
+ ///
+ /// It contains parameters of input, output and shared parameters.
+ /// Using the isSupported() method, the StreamParameters can be
+ /// checked if opening a Stream using this StreamParameters would
+ /// succeed or not. Accessors are provided to higher-level parameters
+ /// aswell as the lower-level parameters which are mainly intended for
+ /// internal use.
+ //////
+ class StreamParameters
+ {
+ public:
+ StreamParameters();
+ StreamParameters(const DirectionSpecificStreamParameters &inputParameters,
+ const DirectionSpecificStreamParameters &outputParameters, double sampleRate,
+ unsigned long framesPerBuffer, PaStreamFlags flags);
+
+ // Set up for direction-specific:
+ void setInputParameters(const DirectionSpecificStreamParameters ¶meters);
+ void setOutputParameters(const DirectionSpecificStreamParameters ¶meters);
+
+ // Set up for common parameters:
+ void setSampleRate(double sampleRate);
+ void setFramesPerBuffer(unsigned long framesPerBuffer);
+ void setFlag(PaStreamFlags flag);
+ void unsetFlag(PaStreamFlags flag);
+ void clearFlags();
+
+ // Validation:
+ bool isSupported() const;
+
+ // Accessors (direction-specific):
+ DirectionSpecificStreamParameters &inputParameters();
+ const DirectionSpecificStreamParameters &inputParameters() const;
+ DirectionSpecificStreamParameters &outputParameters();
+ const DirectionSpecificStreamParameters &outputParameters() const;
+
+ // Accessors (common):
+ double sampleRate() const;
+ unsigned long framesPerBuffer() const;
+ PaStreamFlags flags() const;
+ bool isFlagSet(PaStreamFlags flag) const;
+
+ private:
+ // Half-duplex specific parameters:
+ DirectionSpecificStreamParameters inputParameters_;
+ DirectionSpecificStreamParameters outputParameters_;
+
+ // Common parameters:
+ double sampleRate_;
+ unsigned long framesPerBuffer_;
+ PaStreamFlags flags_;
+ };
+
+
+} // namespace portaudio
+
+// ---------------------------------------------------------------------------------------
+
+#endif // INCLUDED_PORTAUDIO_STREAMPARAMETERS_HXX
-#ifndef INCLUDED_PORTAUDIO_SYSTEM_HXX\r
-#define INCLUDED_PORTAUDIO_SYSTEM_HXX\r
-\r
-// ---------------------------------------------------------------------------------------\r
-\r
-#include "portaudio.h"\r
-\r
-// ---------------------------------------------------------------------------------------\r
-\r
-// Forward declaration(s):\r
-namespace portaudio\r
-{\r
- class Device;\r
- class Stream;\r
- class HostApi;\r
-}\r
-\r
-// ---------------------------------------------------------------------------------------\r
-\r
-// Declaration(s):\r
-namespace portaudio\r
-{\r
-\r
-\r
- //////\r
- /// @brief System singleton which represents the PortAudio system.\r
- ///\r
- /// The System is used to initialize/terminate PortAudio and provide \r
- /// a single acccess point to the PortAudio System (instance()).\r
- /// It can be used to iterate through all HostApi 's in the System as \r
- /// well as all devices in the System. It also provides some utility \r
- /// functionality of PortAudio.\r
- ///\r
- /// Terminating the System will also abort and close the open streams. \r
- /// The Stream objects will need to be deallocated by the client though \r
- /// (it's usually a good idea to have them cleaned up automatically).\r
- //////\r
- class System\r
- {\r
- public:\r
- class HostApiIterator; // forward declaration\r
- class DeviceIterator; // forward declaration\r
-\r
- // -------------------------------------------------------------------------------\r
-\r
- static int version();\r
- static const char *versionText();\r
-\r
- static void initialize();\r
- static void terminate();\r
-\r
- static System &instance();\r
- static bool exists();\r
-\r
- // -------------------------------------------------------------------------------\r
-\r
- // host apis:\r
- HostApiIterator hostApisBegin();\r
- HostApiIterator hostApisEnd();\r
-\r
- HostApi &defaultHostApi();\r
-\r
- HostApi &hostApiByTypeId(PaHostApiTypeId type);\r
- HostApi &hostApiByIndex(PaHostApiIndex index);\r
-\r
- int hostApiCount();\r
-\r
- // -------------------------------------------------------------------------------\r
-\r
- // devices:\r
- DeviceIterator devicesBegin();\r
- DeviceIterator devicesEnd();\r
-\r
- Device &defaultInputDevice();\r
- Device &defaultOutputDevice();\r
-\r
- Device &deviceByIndex(PaDeviceIndex index);\r
-\r
- int deviceCount();\r
-\r
- static Device &nullDevice();\r
-\r
- // -------------------------------------------------------------------------------\r
-\r
- // misc:\r
- void sleep(long msec);\r
- int sizeOfSample(PaSampleFormat format);\r
-\r
- private:\r
- System();\r
- ~System();\r
-\r
- static System *instance_;\r
- static int initCount_;\r
-\r
- static HostApi **hostApis_;\r
- static Device **devices_;\r
-\r
- static Device *nullDevice_;\r
- };\r
-\r
-\r
-} // namespace portaudio\r
-\r
-\r
-#endif // INCLUDED_PORTAUDIO_SYSTEM_HXX\r
-\r
+#ifndef INCLUDED_PORTAUDIO_SYSTEM_HXX
+#define INCLUDED_PORTAUDIO_SYSTEM_HXX
+
+// ---------------------------------------------------------------------------------------
+
+#include "portaudio.h"
+
+// ---------------------------------------------------------------------------------------
+
+// Forward declaration(s):
+namespace portaudio
+{
+ class Device;
+ class Stream;
+ class HostApi;
+}
+
+// ---------------------------------------------------------------------------------------
+
+// Declaration(s):
+namespace portaudio
+{
+
+
+ //////
+ /// @brief System singleton which represents the PortAudio system.
+ ///
+ /// The System is used to initialize/terminate PortAudio and provide
+ /// a single acccess point to the PortAudio System (instance()).
+ /// It can be used to iterate through all HostApi 's in the System as
+ /// well as all devices in the System. It also provides some utility
+ /// functionality of PortAudio.
+ ///
+ /// Terminating the System will also abort and close the open streams.
+ /// The Stream objects will need to be deallocated by the client though
+ /// (it's usually a good idea to have them cleaned up automatically).
+ //////
+ class System
+ {
+ public:
+ class HostApiIterator; // forward declaration
+ class DeviceIterator; // forward declaration
+
+ // -------------------------------------------------------------------------------
+
+ static int version();
+ static const char *versionText();
+
+ static void initialize();
+ static void terminate();
+
+ static System &instance();
+ static bool exists();
+
+ // -------------------------------------------------------------------------------
+
+ // host apis:
+ HostApiIterator hostApisBegin();
+ HostApiIterator hostApisEnd();
+
+ HostApi &defaultHostApi();
+
+ HostApi &hostApiByTypeId(PaHostApiTypeId type);
+ HostApi &hostApiByIndex(PaHostApiIndex index);
+
+ int hostApiCount();
+
+ // -------------------------------------------------------------------------------
+
+ // devices:
+ DeviceIterator devicesBegin();
+ DeviceIterator devicesEnd();
+
+ Device &defaultInputDevice();
+ Device &defaultOutputDevice();
+
+ Device &deviceByIndex(PaDeviceIndex index);
+
+ int deviceCount();
+
+ static Device &nullDevice();
+
+ // -------------------------------------------------------------------------------
+
+ // misc:
+ void sleep(long msec);
+ int sizeOfSample(PaSampleFormat format);
+
+ private:
+ System();
+ ~System();
+
+ static System *instance_;
+ static int initCount_;
+
+ static HostApi **hostApis_;
+ static Device **devices_;
+
+ static Device *nullDevice_;
+ };
+
+
+} // namespace portaudio
+
+
+#endif // INCLUDED_PORTAUDIO_SYSTEM_HXX
+
-#ifndef INCLUDED_PORTAUDIO_SYSTEMDEVICEITERATOR_HXX\r
-#define INCLUDED_PORTAUDIO_SYSTEMDEVICEITERATOR_HXX\r
-\r
-// ---------------------------------------------------------------------------------------\r
-\r
-#include <iterator>\r
-#include <cstddef>\r
-\r
-#include "portaudiocpp/System.hxx"\r
-\r
-// ---------------------------------------------------------------------------------------\r
-\r
-// Forward declaration(s):\r
-namespace portaudio\r
-{\r
- class Device;\r
- class HostApi;\r
-}\r
-\r
-// ---------------------------------------------------------------------------------------\r
-\r
-// Declaration(s):\r
-namespace portaudio\r
-{\r
-\r
- \r
- //////\r
- /// @brief Iterator class for iterating through all Devices in a System.\r
- ///\r
- /// Devices will be iterated by iterating all Devices in each \r
- /// HostApi in the System. Compliant with the STL bidirectional \r
- /// iterator concept.\r
- //////\r
- class System::DeviceIterator\r
- {\r
- public:\r
- typedef std::bidirectional_iterator_tag iterator_category;\r
- typedef Device value_type;\r
- typedef ptrdiff_t difference_type;\r
- typedef Device * pointer;\r
- typedef Device & reference;\r
-\r
- Device &operator*() const;\r
- Device *operator->() const;\r
-\r
- DeviceIterator &operator++();\r
- DeviceIterator operator++(int);\r
- DeviceIterator &operator--();\r
- DeviceIterator operator--(int);\r
-\r
- bool operator==(const DeviceIterator &rhs) const;\r
- bool operator!=(const DeviceIterator &rhs) const;\r
-\r
- private:\r
- friend class System;\r
- friend class HostApi;\r
- Device **ptr_;\r
- };\r
-\r
-\r
-} // namespace portaudio\r
-\r
-// ---------------------------------------------------------------------------------------\r
-\r
-#endif // INCLUDED_PORTAUDIO_SYSTEMDEVICEITERATOR_HXX\r
-\r
+#ifndef INCLUDED_PORTAUDIO_SYSTEMDEVICEITERATOR_HXX
+#define INCLUDED_PORTAUDIO_SYSTEMDEVICEITERATOR_HXX
+
+// ---------------------------------------------------------------------------------------
+
+#include <iterator>
+#include <cstddef>
+
+#include "portaudiocpp/System.hxx"
+
+// ---------------------------------------------------------------------------------------
+
+// Forward declaration(s):
+namespace portaudio
+{
+ class Device;
+ class HostApi;
+}
+
+// ---------------------------------------------------------------------------------------
+
+// Declaration(s):
+namespace portaudio
+{
+
+
+ //////
+ /// @brief Iterator class for iterating through all Devices in a System.
+ ///
+ /// Devices will be iterated by iterating all Devices in each
+ /// HostApi in the System. Compliant with the STL bidirectional
+ /// iterator concept.
+ //////
+ class System::DeviceIterator
+ {
+ public:
+ typedef std::bidirectional_iterator_tag iterator_category;
+ typedef Device value_type;
+ typedef ptrdiff_t difference_type;
+ typedef Device * pointer;
+ typedef Device & reference;
+
+ Device &operator*() const;
+ Device *operator->() const;
+
+ DeviceIterator &operator++();
+ DeviceIterator operator++(int);
+ DeviceIterator &operator--();
+ DeviceIterator operator--(int);
+
+ bool operator==(const DeviceIterator &rhs) const;
+ bool operator!=(const DeviceIterator &rhs) const;
+
+ private:
+ friend class System;
+ friend class HostApi;
+ Device **ptr_;
+ };
+
+
+} // namespace portaudio
+
+// ---------------------------------------------------------------------------------------
+
+#endif // INCLUDED_PORTAUDIO_SYSTEMDEVICEITERATOR_HXX
+
-#ifndef INCLUDED_PORTAUDIO_SYSTEMHOSTAPIITERATOR_HXX\r
-#define INCLUDED_PORTAUDIO_SYSTEMHOSTAPIITERATOR_HXX\r
-\r
-// ---------------------------------------------------------------------------------------\r
-\r
-#include <iterator>\r
-#include <cstddef>\r
-\r
-#include "portaudiocpp/System.hxx"\r
-\r
-// ---------------------------------------------------------------------------------------\r
-\r
-// Forward declaration(s):\r
-namespace portaudio\r
-{\r
- class HostApi;\r
-}\r
-\r
-// ---------------------------------------------------------------------------------------\r
-\r
-// Declaration(s):\r
-namespace portaudio\r
-{\r
-\r
-\r
- //////\r
- /// @brief Iterator class for iterating through all HostApis in a System.\r
- ///\r
- /// Compliant with the STL bidirectional iterator concept.\r
- //////\r
- class System::HostApiIterator\r
- {\r
- public:\r
- typedef std::bidirectional_iterator_tag iterator_category;\r
- typedef Device value_type;\r
- typedef ptrdiff_t difference_type;\r
- typedef HostApi * pointer;\r
- typedef HostApi & reference;\r
-\r
- HostApi &operator*() const;\r
- HostApi *operator->() const;\r
-\r
- HostApiIterator &operator++();\r
- HostApiIterator operator++(int);\r
- HostApiIterator &operator--();\r
- HostApiIterator operator--(int);\r
-\r
- bool operator==(const HostApiIterator &rhs) const;\r
- bool operator!=(const HostApiIterator &rhs) const;\r
-\r
- private:\r
- friend class System;\r
- HostApi **ptr_;\r
- };\r
-\r
-\r
-} // namespace portaudio\r
-\r
-// ---------------------------------------------------------------------------------------\r
-\r
-#endif // INCLUDED_PORTAUDIO_SYSTEMHOSTAPIITERATOR_HXX\r
+#ifndef INCLUDED_PORTAUDIO_SYSTEMHOSTAPIITERATOR_HXX
+#define INCLUDED_PORTAUDIO_SYSTEMHOSTAPIITERATOR_HXX
+
+// ---------------------------------------------------------------------------------------
+
+#include <iterator>
+#include <cstddef>
+
+#include "portaudiocpp/System.hxx"
+
+// ---------------------------------------------------------------------------------------
+
+// Forward declaration(s):
+namespace portaudio
+{
+ class HostApi;
+}
+
+// ---------------------------------------------------------------------------------------
+
+// Declaration(s):
+namespace portaudio
+{
+
+
+ //////
+ /// @brief Iterator class for iterating through all HostApis in a System.
+ ///
+ /// Compliant with the STL bidirectional iterator concept.
+ //////
+ class System::HostApiIterator
+ {
+ public:
+ typedef std::bidirectional_iterator_tag iterator_category;
+ typedef Device value_type;
+ typedef ptrdiff_t difference_type;
+ typedef HostApi * pointer;
+ typedef HostApi & reference;
+
+ HostApi &operator*() const;
+ HostApi *operator->() const;
+
+ HostApiIterator &operator++();
+ HostApiIterator operator++(int);
+ HostApiIterator &operator--();
+ HostApiIterator operator--(int);
+
+ bool operator==(const HostApiIterator &rhs) const;
+ bool operator!=(const HostApiIterator &rhs) const;
+
+ private:
+ friend class System;
+ HostApi **ptr_;
+ };
+
+
+} // namespace portaudio
+
+// ---------------------------------------------------------------------------------------
+
+#endif // INCLUDED_PORTAUDIO_SYSTEMHOSTAPIITERATOR_HXX
-#include "portaudiocpp/AsioDeviceAdapter.hxx"\r
-\r
-#include "portaudio.h"\r
-#include "pa_asio.h"\r
-\r
-#include "portaudiocpp/Device.hxx"\r
-#include "portaudiocpp/HostApi.hxx"\r
-#include "portaudiocpp/Exception.hxx"\r
-\r
-namespace portaudio\r
-{\r
- AsioDeviceAdapter::AsioDeviceAdapter(Device &device)\r
- {\r
- if (device.hostApi().typeId() != paASIO)\r
- throw PaCppException(PaCppException::UNABLE_TO_ADAPT_DEVICE);\r
-\r
- device_ = &device;\r
-\r
- PaError err = PaAsio_GetAvailableLatencyValues(device_->index(), &minBufferSize_, &maxBufferSize_, \r
- &preferredBufferSize_, &granularity_);\r
-\r
- if (err != paNoError)\r
- throw PaException(err);\r
-\r
- }\r
-\r
- Device &AsioDeviceAdapter::device()\r
- {\r
- return *device_;\r
- }\r
-\r
- long AsioDeviceAdapter::minBufferSize() const\r
- {\r
- return minBufferSize_;\r
- }\r
-\r
- long AsioDeviceAdapter::maxBufferSize() const\r
- {\r
- return maxBufferSize_;\r
- }\r
-\r
- long AsioDeviceAdapter::preferredBufferSize() const\r
- {\r
- return preferredBufferSize_;\r
- }\r
-\r
- long AsioDeviceAdapter::granularity() const\r
- {\r
- return granularity_;\r
- }\r
-\r
- void AsioDeviceAdapter::showControlPanel(void *systemSpecific)\r
- {\r
- PaError err = PaAsio_ShowControlPanel(device_->index(), systemSpecific);\r
-\r
- if (err != paNoError)\r
- throw PaException(err);\r
- }\r
-\r
- const char *AsioDeviceAdapter::inputChannelName(int channelIndex) const\r
- {\r
- const char *channelName;\r
+#include "portaudiocpp/AsioDeviceAdapter.hxx"
+
+#include "portaudio.h"
+#include "pa_asio.h"
+
+#include "portaudiocpp/Device.hxx"
+#include "portaudiocpp/HostApi.hxx"
+#include "portaudiocpp/Exception.hxx"
+
+namespace portaudio
+{
+ AsioDeviceAdapter::AsioDeviceAdapter(Device &device)
+ {
+ if (device.hostApi().typeId() != paASIO)
+ throw PaCppException(PaCppException::UNABLE_TO_ADAPT_DEVICE);
+
+ device_ = &device;
+
+ PaError err = PaAsio_GetAvailableLatencyValues(device_->index(), &minBufferSize_, &maxBufferSize_,
+ &preferredBufferSize_, &granularity_);
+
+ if (err != paNoError)
+ throw PaException(err);
+
+ }
+
+ Device &AsioDeviceAdapter::device()
+ {
+ return *device_;
+ }
+
+ long AsioDeviceAdapter::minBufferSize() const
+ {
+ return minBufferSize_;
+ }
+
+ long AsioDeviceAdapter::maxBufferSize() const
+ {
+ return maxBufferSize_;
+ }
+
+ long AsioDeviceAdapter::preferredBufferSize() const
+ {
+ return preferredBufferSize_;
+ }
+
+ long AsioDeviceAdapter::granularity() const
+ {
+ return granularity_;
+ }
+
+ void AsioDeviceAdapter::showControlPanel(void *systemSpecific)
+ {
+ PaError err = PaAsio_ShowControlPanel(device_->index(), systemSpecific);
+
+ if (err != paNoError)
+ throw PaException(err);
+ }
+
+ const char *AsioDeviceAdapter::inputChannelName(int channelIndex) const
+ {
+ const char *channelName;
PaError err = PaAsio_GetInputChannelName(device_->index(), channelIndex, &channelName);
if (err != paNoError)
throw PaException(err);
return channelName;
- }\r
-\r
- const char *AsioDeviceAdapter::outputChannelName(int channelIndex) const\r
- {\r
- const char *channelName;\r
+ }
+
+ const char *AsioDeviceAdapter::outputChannelName(int channelIndex) const
+ {
+ const char *channelName;
PaError err = PaAsio_GetOutputChannelName(device_->index(), channelIndex, &channelName);
if (err != paNoError)
throw PaException(err);
return channelName;
- }\r
-}\r
-\r
-\r
+ }
+}
+
+
-#include "portaudiocpp/BlockingStream.hxx"\r
-\r
-#include "portaudio.h"\r
-\r
-#include "portaudiocpp/StreamParameters.hxx"\r
-#include "portaudiocpp/Exception.hxx"\r
-\r
-namespace portaudio\r
-{\r
-\r
- // --------------------------------------------------------------------------------------\r
-\r
- BlockingStream::BlockingStream()\r
- {\r
- }\r
-\r
- BlockingStream::BlockingStream(const StreamParameters ¶meters)\r
- {\r
- open(parameters);\r
- }\r
-\r
- BlockingStream::~BlockingStream()\r
- {\r
- try\r
- {\r
- close();\r
- }\r
- catch (...)\r
- {\r
- // ignore all errors\r
- }\r
- }\r
-\r
- // --------------------------------------------------------------------------------------\r
-\r
- void BlockingStream::open(const StreamParameters ¶meters)\r
- {\r
- PaError err = Pa_OpenStream(&stream_, parameters.inputParameters().paStreamParameters(), parameters.outputParameters().paStreamParameters(), \r
- parameters.sampleRate(), parameters.framesPerBuffer(), parameters.flags(), NULL, NULL);\r
-\r
- if (err != paNoError)\r
- {\r
- throw PaException(err);\r
- }\r
- }\r
-\r
- // --------------------------------------------------------------------------------------\r
-\r
- void BlockingStream::read(void *buffer, unsigned long numFrames)\r
- {\r
- PaError err = Pa_ReadStream(stream_, buffer, numFrames);\r
-\r
- if (err != paNoError)\r
- {\r
- throw PaException(err);\r
- }\r
- }\r
-\r
- void BlockingStream::write(const void *buffer, unsigned long numFrames)\r
- {\r
- PaError err = Pa_WriteStream(stream_, buffer, numFrames);\r
-\r
- if (err != paNoError)\r
- {\r
- throw PaException(err);\r
- }\r
- }\r
-\r
- // --------------------------------------------------------------------------------------\r
-\r
- signed long BlockingStream::availableReadSize() const\r
- {\r
- signed long avail = Pa_GetStreamReadAvailable(stream_);\r
-\r
- if (avail < 0)\r
- {\r
- throw PaException(avail);\r
- }\r
-\r
- return avail;\r
- }\r
-\r
- signed long BlockingStream::availableWriteSize() const\r
- {\r
- signed long avail = Pa_GetStreamWriteAvailable(stream_);\r
-\r
- if (avail < 0)\r
- {\r
- throw PaException(avail);\r
- }\r
-\r
- return avail;\r
- }\r
-\r
- // --------------------------------------------------------------------------------------\r
-\r
-} // portaudio\r
-\r
-\r
-\r
+#include "portaudiocpp/BlockingStream.hxx"
+
+#include "portaudio.h"
+
+#include "portaudiocpp/StreamParameters.hxx"
+#include "portaudiocpp/Exception.hxx"
+
+namespace portaudio
+{
+
+ // --------------------------------------------------------------------------------------
+
+ BlockingStream::BlockingStream()
+ {
+ }
+
+ BlockingStream::BlockingStream(const StreamParameters ¶meters)
+ {
+ open(parameters);
+ }
+
+ BlockingStream::~BlockingStream()
+ {
+ try
+ {
+ close();
+ }
+ catch (...)
+ {
+ // ignore all errors
+ }
+ }
+
+ // --------------------------------------------------------------------------------------
+
+ void BlockingStream::open(const StreamParameters ¶meters)
+ {
+ PaError err = Pa_OpenStream(&stream_, parameters.inputParameters().paStreamParameters(), parameters.outputParameters().paStreamParameters(),
+ parameters.sampleRate(), parameters.framesPerBuffer(), parameters.flags(), NULL, NULL);
+
+ if (err != paNoError)
+ {
+ throw PaException(err);
+ }
+ }
+
+ // --------------------------------------------------------------------------------------
+
+ void BlockingStream::read(void *buffer, unsigned long numFrames)
+ {
+ PaError err = Pa_ReadStream(stream_, buffer, numFrames);
+
+ if (err != paNoError)
+ {
+ throw PaException(err);
+ }
+ }
+
+ void BlockingStream::write(const void *buffer, unsigned long numFrames)
+ {
+ PaError err = Pa_WriteStream(stream_, buffer, numFrames);
+
+ if (err != paNoError)
+ {
+ throw PaException(err);
+ }
+ }
+
+ // --------------------------------------------------------------------------------------
+
+ signed long BlockingStream::availableReadSize() const
+ {
+ signed long avail = Pa_GetStreamReadAvailable(stream_);
+
+ if (avail < 0)
+ {
+ throw PaException(avail);
+ }
+
+ return avail;
+ }
+
+ signed long BlockingStream::availableWriteSize() const
+ {
+ signed long avail = Pa_GetStreamWriteAvailable(stream_);
+
+ if (avail < 0)
+ {
+ throw PaException(avail);
+ }
+
+ return avail;
+ }
+
+ // --------------------------------------------------------------------------------------
+
+} // portaudio
+
+
+
-#include "portaudiocpp/CFunCallbackStream.hxx"\r
-\r
-#include "portaudiocpp/StreamParameters.hxx"\r
-#include "portaudiocpp/Exception.hxx"\r
-\r
-namespace portaudio\r
-{\r
- CFunCallbackStream::CFunCallbackStream()\r
- {\r
- }\r
-\r
- CFunCallbackStream::CFunCallbackStream(const StreamParameters ¶meters, PaStreamCallback *funPtr, void *userData)\r
- {\r
- open(parameters, funPtr, userData);\r
- }\r
-\r
- CFunCallbackStream::~CFunCallbackStream()\r
- {\r
- try\r
- {\r
- close();\r
- }\r
- catch (...)\r
- {\r
- // ignore all errors\r
- }\r
- }\r
-\r
- // ---------------------------------------------------------------------------------==\r
-\r
- void CFunCallbackStream::open(const StreamParameters ¶meters, PaStreamCallback *funPtr, void *userData)\r
- {\r
- PaError err = Pa_OpenStream(&stream_, parameters.inputParameters().paStreamParameters(), parameters.outputParameters().paStreamParameters(), \r
- parameters.sampleRate(), parameters.framesPerBuffer(), parameters.flags(), funPtr, userData);\r
-\r
- if (err != paNoError)\r
- {\r
- throw PaException(err);\r
- }\r
- }\r
-}\r
+#include "portaudiocpp/CFunCallbackStream.hxx"
+
+#include "portaudiocpp/StreamParameters.hxx"
+#include "portaudiocpp/Exception.hxx"
+
+namespace portaudio
+{
+ CFunCallbackStream::CFunCallbackStream()
+ {
+ }
+
+ CFunCallbackStream::CFunCallbackStream(const StreamParameters ¶meters, PaStreamCallback *funPtr, void *userData)
+ {
+ open(parameters, funPtr, userData);
+ }
+
+ CFunCallbackStream::~CFunCallbackStream()
+ {
+ try
+ {
+ close();
+ }
+ catch (...)
+ {
+ // ignore all errors
+ }
+ }
+
+ // ---------------------------------------------------------------------------------==
+
+ void CFunCallbackStream::open(const StreamParameters ¶meters, PaStreamCallback *funPtr, void *userData)
+ {
+ PaError err = Pa_OpenStream(&stream_, parameters.inputParameters().paStreamParameters(), parameters.outputParameters().paStreamParameters(),
+ parameters.sampleRate(), parameters.framesPerBuffer(), parameters.flags(), funPtr, userData);
+
+ if (err != paNoError)
+ {
+ throw PaException(err);
+ }
+ }
+}
-#include "portaudiocpp/CallbackInterface.hxx"\r
-\r
-namespace portaudio\r
-{\r
-\r
- namespace impl\r
- {\r
-\r
- //////\r
- /// Adapts any CallbackInterface object to a C-callable function (ie this function). A \r
- /// pointer to the object should be passed as ``userData'' when setting up the callback.\r
- //////\r
- int callbackInterfaceToPaCallbackAdapter(const void *inputBuffer, void *outputBuffer, unsigned long numFrames, \r
- const PaStreamCallbackTimeInfo *timeInfo, PaStreamCallbackFlags statusFlags, void *userData)\r
- {\r
- CallbackInterface *cb = static_cast<CallbackInterface *>(userData);\r
- return cb->paCallbackFun(inputBuffer, outputBuffer, numFrames, timeInfo, statusFlags);\r
- }\r
-\r
-\r
- } // namespace impl\r
-\r
-} // namespace portaudio\r
-\r
-\r
+#include "portaudiocpp/CallbackInterface.hxx"
+
+namespace portaudio
+{
+
+ namespace impl
+ {
+
+ //////
+ /// Adapts any CallbackInterface object to a C-callable function (ie this function). A
+ /// pointer to the object should be passed as ``userData'' when setting up the callback.
+ //////
+ int callbackInterfaceToPaCallbackAdapter(const void *inputBuffer, void *outputBuffer, unsigned long numFrames,
+ const PaStreamCallbackTimeInfo *timeInfo, PaStreamCallbackFlags statusFlags, void *userData)
+ {
+ CallbackInterface *cb = static_cast<CallbackInterface *>(userData);
+ return cb->paCallbackFun(inputBuffer, outputBuffer, numFrames, timeInfo, statusFlags);
+ }
+
+
+ } // namespace impl
+
+} // namespace portaudio
+
+
-#include "portaudiocpp/CallbackStream.hxx"\r
-\r
-namespace portaudio\r
-{\r
- CallbackStream::CallbackStream()\r
- {\r
- }\r
-\r
- CallbackStream::~CallbackStream()\r
- {\r
- }\r
-\r
- // -----------------------------------------------------------------------------------\r
- \r
- double CallbackStream::cpuLoad() const\r
- {\r
- return Pa_GetStreamCpuLoad(stream_);\r
- }\r
-\r
-} // namespace portaudio\r
+#include "portaudiocpp/CallbackStream.hxx"
+
+namespace portaudio
+{
+ CallbackStream::CallbackStream()
+ {
+ }
+
+ CallbackStream::~CallbackStream()
+ {
+ }
+
+ // -----------------------------------------------------------------------------------
+
+ double CallbackStream::cpuLoad() const
+ {
+ return Pa_GetStreamCpuLoad(stream_);
+ }
+
+} // namespace portaudio
-#include "portaudiocpp/CppFunCallbackStream.hxx"\r
-\r
-#include "portaudiocpp/StreamParameters.hxx"\r
-#include "portaudiocpp/Exception.hxx"\r
-\r
-namespace portaudio\r
-{\r
- namespace impl\r
- {\r
- //////\r
- /// Adapts any a C++ callback to a C-callable function (ie this function). A \r
- /// pointer to a struct with the C++ function pointer and the actual user data should be \r
- /// passed as the ``userData'' parameter when setting up the callback.\r
- //////\r
- int cppCallbackToPaCallbackAdapter(const void *inputBuffer, void *outputBuffer, unsigned long numFrames, \r
- const PaStreamCallbackTimeInfo *timeInfo, PaStreamCallbackFlags statusFlags, void *userData)\r
- {\r
- FunCallbackStream::CppToCCallbackData *data = static_cast<FunCallbackStream::CppToCCallbackData *>(userData);\r
- return data->funPtr(inputBuffer, outputBuffer, numFrames, timeInfo, statusFlags, data->userData);\r
- }\r
- }\r
-\r
- // -----------------------------------------------------------------------------------\r
-\r
- FunCallbackStream::CppToCCallbackData::CppToCCallbackData()\r
- {\r
- }\r
-\r
- FunCallbackStream::CppToCCallbackData::CppToCCallbackData(CallbackFunPtr funPtr, void *userData) : funPtr(funPtr), userData(userData)\r
- {\r
- }\r
-\r
- void FunCallbackStream::CppToCCallbackData::init(CallbackFunPtr funPtr, void *userData)\r
- {\r
- this->funPtr = funPtr;\r
- this->userData = userData;\r
- }\r
-\r
- // -----------------------------------------------------------------------------------\r
-\r
- FunCallbackStream::FunCallbackStream()\r
- {\r
- }\r
-\r
- FunCallbackStream::FunCallbackStream(const StreamParameters ¶meters, CallbackFunPtr funPtr, void *userData) : adapterData_(funPtr, userData)\r
- {\r
- open(parameters);\r
- }\r
-\r
- FunCallbackStream::~FunCallbackStream()\r
- {\r
- try\r
- {\r
- close();\r
- }\r
- catch (...)\r
- {\r
- // ignore all errors\r
- }\r
- }\r
-\r
- void FunCallbackStream::open(const StreamParameters ¶meters, CallbackFunPtr funPtr, void *userData)\r
- {\r
- adapterData_.init(funPtr, userData);\r
- open(parameters);\r
- }\r
-\r
- void FunCallbackStream::open(const StreamParameters ¶meters)\r
- {\r
- PaError err = Pa_OpenStream(&stream_, parameters.inputParameters().paStreamParameters(), parameters.outputParameters().paStreamParameters(), \r
- parameters.sampleRate(), parameters.framesPerBuffer(), parameters.flags(), &impl::cppCallbackToPaCallbackAdapter, \r
- static_cast<void *>(&adapterData_));\r
-\r
- if (err != paNoError)\r
- {\r
- throw PaException(err);\r
- }\r
- }\r
-\r
- // -----------------------------------------------------------------------------------\r
-}\r
+#include "portaudiocpp/CppFunCallbackStream.hxx"
+
+#include "portaudiocpp/StreamParameters.hxx"
+#include "portaudiocpp/Exception.hxx"
+
+namespace portaudio
+{
+ namespace impl
+ {
+ //////
+ /// Adapts any a C++ callback to a C-callable function (ie this function). A
+ /// pointer to a struct with the C++ function pointer and the actual user data should be
+ /// passed as the ``userData'' parameter when setting up the callback.
+ //////
+ int cppCallbackToPaCallbackAdapter(const void *inputBuffer, void *outputBuffer, unsigned long numFrames,
+ const PaStreamCallbackTimeInfo *timeInfo, PaStreamCallbackFlags statusFlags, void *userData)
+ {
+ FunCallbackStream::CppToCCallbackData *data = static_cast<FunCallbackStream::CppToCCallbackData *>(userData);
+ return data->funPtr(inputBuffer, outputBuffer, numFrames, timeInfo, statusFlags, data->userData);
+ }
+ }
+
+ // -----------------------------------------------------------------------------------
+
+ FunCallbackStream::CppToCCallbackData::CppToCCallbackData()
+ {
+ }
+
+ FunCallbackStream::CppToCCallbackData::CppToCCallbackData(CallbackFunPtr funPtr, void *userData) : funPtr(funPtr), userData(userData)
+ {
+ }
+
+ void FunCallbackStream::CppToCCallbackData::init(CallbackFunPtr funPtr, void *userData)
+ {
+ this->funPtr = funPtr;
+ this->userData = userData;
+ }
+
+ // -----------------------------------------------------------------------------------
+
+ FunCallbackStream::FunCallbackStream()
+ {
+ }
+
+ FunCallbackStream::FunCallbackStream(const StreamParameters ¶meters, CallbackFunPtr funPtr, void *userData) : adapterData_(funPtr, userData)
+ {
+ open(parameters);
+ }
+
+ FunCallbackStream::~FunCallbackStream()
+ {
+ try
+ {
+ close();
+ }
+ catch (...)
+ {
+ // ignore all errors
+ }
+ }
+
+ void FunCallbackStream::open(const StreamParameters ¶meters, CallbackFunPtr funPtr, void *userData)
+ {
+ adapterData_.init(funPtr, userData);
+ open(parameters);
+ }
+
+ void FunCallbackStream::open(const StreamParameters ¶meters)
+ {
+ PaError err = Pa_OpenStream(&stream_, parameters.inputParameters().paStreamParameters(), parameters.outputParameters().paStreamParameters(),
+ parameters.sampleRate(), parameters.framesPerBuffer(), parameters.flags(), &impl::cppCallbackToPaCallbackAdapter,
+ static_cast<void *>(&adapterData_));
+
+ if (err != paNoError)
+ {
+ throw PaException(err);
+ }
+ }
+
+ // -----------------------------------------------------------------------------------
+}
-#include "portaudiocpp/Device.hxx"\r
-\r
-#include <cstddef>\r
-\r
-#include "portaudiocpp/HostApi.hxx"\r
-#include "portaudiocpp/System.hxx"\r
-#include "portaudiocpp/Exception.hxx"\r
-\r
-namespace portaudio\r
-{\r
-\r
- // -------------------------------------------------------------------------------\r
-\r
- Device::Device(PaDeviceIndex index) : index_(index)\r
- {\r
- if (index == paNoDevice)\r
- info_ = NULL;\r
- else\r
- info_ = Pa_GetDeviceInfo(index);\r
- }\r
-\r
- Device::~Device()\r
- {\r
- }\r
-\r
- PaDeviceIndex Device::index() const\r
- {\r
- return index_;\r
- }\r
-\r
- const char *Device::name() const\r
- {\r
- if (info_ == NULL)\r
- return "";\r
-\r
- return info_->name;\r
- }\r
-\r
- int Device::maxInputChannels() const\r
- {\r
- if (info_ == NULL)\r
- return 0;\r
-\r
- return info_->maxInputChannels;\r
- }\r
-\r
- int Device::maxOutputChannels() const\r
- {\r
- if (info_ == NULL)\r
- return 0;\r
-\r
- return info_->maxOutputChannels;\r
- }\r
-\r
- PaTime Device::defaultLowInputLatency() const\r
- {\r
- if (info_ == NULL)\r
- return static_cast<PaTime>(0.0);\r
-\r
- return info_->defaultLowInputLatency;\r
- }\r
-\r
- PaTime Device::defaultHighInputLatency() const\r
- {\r
- if (info_ == NULL)\r
- return static_cast<PaTime>(0.0);\r
-\r
- return info_->defaultHighInputLatency;\r
- }\r
-\r
- PaTime Device::defaultLowOutputLatency() const\r
- {\r
- if (info_ == NULL)\r
- return static_cast<PaTime>(0.0);\r
-\r
- return info_->defaultLowOutputLatency;\r
- }\r
-\r
- PaTime Device::defaultHighOutputLatency() const\r
- {\r
- if (info_ == NULL)\r
- return static_cast<PaTime>(0.0);\r
-\r
- return info_->defaultHighOutputLatency;\r
- }\r
-\r
- double Device::defaultSampleRate() const\r
- {\r
- if (info_ == NULL)\r
- return 0.0;\r
-\r
- return info_->defaultSampleRate;\r
- }\r
-\r
- // -------------------------------------------------------------------------------\r
-\r
- bool Device::isInputOnlyDevice() const\r
- {\r
- return (maxOutputChannels() == 0);\r
- }\r
-\r
- bool Device::isOutputOnlyDevice() const\r
- {\r
- return (maxInputChannels() == 0);\r
- }\r
-\r
- bool Device::isFullDuplexDevice() const\r
- {\r
- return (maxInputChannels() > 0 && maxOutputChannels() > 0);\r
- }\r
-\r
- bool Device::isSystemDefaultInputDevice() const\r
- {\r
- return (System::instance().defaultInputDevice() == *this);\r
- }\r
-\r
- bool Device::isSystemDefaultOutputDevice() const\r
- {\r
- return (System::instance().defaultOutputDevice() == *this);\r
- }\r
-\r
- bool Device::isHostApiDefaultInputDevice() const\r
- {\r
- return (hostApi().defaultInputDevice() == *this);\r
- }\r
-\r
- bool Device::isHostApiDefaultOutputDevice() const\r
- {\r
- return (hostApi().defaultOutputDevice() == *this);\r
- }\r
-\r
- // -------------------------------------------------------------------------------\r
-\r
- bool Device::operator==(const Device &rhs) const\r
- {\r
- return (index_ == rhs.index_);\r
- }\r
-\r
- bool Device::operator!=(const Device &rhs) const\r
- {\r
- return !(*this == rhs);\r
- }\r
-\r
- // -------------------------------------------------------------------------------\r
-\r
- HostApi &Device::hostApi()\r
- {\r
- // NOTE: will cause an exception when called for the null device\r
- if (info_ == NULL)\r
- throw PaException(paInternalError);\r
-\r
- return System::instance().hostApiByIndex(info_->hostApi);\r
- }\r
-\r
- const HostApi &Device::hostApi() const\r
- {\r
- // NOTE; will cause an exception when called for the null device\r
- if (info_ == NULL)\r
- throw PaException(paInternalError);\r
-\r
- return System::instance().hostApiByIndex(info_->hostApi);\r
- }\r
-\r
- // -------------------------------------------------------------------------------\r
-\r
-} // namespace portaudio\r
-\r
-\r
+#include "portaudiocpp/Device.hxx"
+
+#include <cstddef>
+
+#include "portaudiocpp/HostApi.hxx"
+#include "portaudiocpp/System.hxx"
+#include "portaudiocpp/Exception.hxx"
+
+namespace portaudio
+{
+
+ // -------------------------------------------------------------------------------
+
+ Device::Device(PaDeviceIndex index) : index_(index)
+ {
+ if (index == paNoDevice)
+ info_ = NULL;
+ else
+ info_ = Pa_GetDeviceInfo(index);
+ }
+
+ Device::~Device()
+ {
+ }
+
+ PaDeviceIndex Device::index() const
+ {
+ return index_;
+ }
+
+ const char *Device::name() const
+ {
+ if (info_ == NULL)
+ return "";
+
+ return info_->name;
+ }
+
+ int Device::maxInputChannels() const
+ {
+ if (info_ == NULL)
+ return 0;
+
+ return info_->maxInputChannels;
+ }
+
+ int Device::maxOutputChannels() const
+ {
+ if (info_ == NULL)
+ return 0;
+
+ return info_->maxOutputChannels;
+ }
+
+ PaTime Device::defaultLowInputLatency() const
+ {
+ if (info_ == NULL)
+ return static_cast<PaTime>(0.0);
+
+ return info_->defaultLowInputLatency;
+ }
+
+ PaTime Device::defaultHighInputLatency() const
+ {
+ if (info_ == NULL)
+ return static_cast<PaTime>(0.0);
+
+ return info_->defaultHighInputLatency;
+ }
+
+ PaTime Device::defaultLowOutputLatency() const
+ {
+ if (info_ == NULL)
+ return static_cast<PaTime>(0.0);
+
+ return info_->defaultLowOutputLatency;
+ }
+
+ PaTime Device::defaultHighOutputLatency() const
+ {
+ if (info_ == NULL)
+ return static_cast<PaTime>(0.0);
+
+ return info_->defaultHighOutputLatency;
+ }
+
+ double Device::defaultSampleRate() const
+ {
+ if (info_ == NULL)
+ return 0.0;
+
+ return info_->defaultSampleRate;
+ }
+
+ // -------------------------------------------------------------------------------
+
+ bool Device::isInputOnlyDevice() const
+ {
+ return (maxOutputChannels() == 0);
+ }
+
+ bool Device::isOutputOnlyDevice() const
+ {
+ return (maxInputChannels() == 0);
+ }
+
+ bool Device::isFullDuplexDevice() const
+ {
+ return (maxInputChannels() > 0 && maxOutputChannels() > 0);
+ }
+
+ bool Device::isSystemDefaultInputDevice() const
+ {
+ return (System::instance().defaultInputDevice() == *this);
+ }
+
+ bool Device::isSystemDefaultOutputDevice() const
+ {
+ return (System::instance().defaultOutputDevice() == *this);
+ }
+
+ bool Device::isHostApiDefaultInputDevice() const
+ {
+ return (hostApi().defaultInputDevice() == *this);
+ }
+
+ bool Device::isHostApiDefaultOutputDevice() const
+ {
+ return (hostApi().defaultOutputDevice() == *this);
+ }
+
+ // -------------------------------------------------------------------------------
+
+ bool Device::operator==(const Device &rhs) const
+ {
+ return (index_ == rhs.index_);
+ }
+
+ bool Device::operator!=(const Device &rhs) const
+ {
+ return !(*this == rhs);
+ }
+
+ // -------------------------------------------------------------------------------
+
+ HostApi &Device::hostApi()
+ {
+ // NOTE: will cause an exception when called for the null device
+ if (info_ == NULL)
+ throw PaException(paInternalError);
+
+ return System::instance().hostApiByIndex(info_->hostApi);
+ }
+
+ const HostApi &Device::hostApi() const
+ {
+ // NOTE; will cause an exception when called for the null device
+ if (info_ == NULL)
+ throw PaException(paInternalError);
+
+ return System::instance().hostApiByIndex(info_->hostApi);
+ }
+
+ // -------------------------------------------------------------------------------
+
+} // namespace portaudio
+
+
-#include "portaudiocpp/DirectionSpecificStreamParameters.hxx"\r
-\r
-#include "portaudiocpp/Device.hxx"\r
-\r
-namespace portaudio\r
-{\r
-\r
- // -----------------------------------------------------------------------------------\r
-\r
- //////\r
- /// Returns a `nil' DirectionSpecificStreamParameters object. This can be used to \r
- /// specify that one direction of a Stream is not required (i.e. when creating \r
- /// a half-duplex Stream). All fields of the null DirectionSpecificStreamParameters \r
- /// object are invalid except for the device and the number of channel, which are set \r
- /// to paNoDevice and 0 respectively.\r
- //////\r
- DirectionSpecificStreamParameters DirectionSpecificStreamParameters::null()\r
- {\r
- DirectionSpecificStreamParameters tmp;\r
- tmp.paStreamParameters_.device = paNoDevice;\r
- tmp.paStreamParameters_.channelCount = 0;\r
- return tmp;\r
- }\r
-\r
- // -----------------------------------------------------------------------------------\r
-\r
- //////\r
- /// Default constructor -- all parameters will be uninitialized.\r
- //////\r
- DirectionSpecificStreamParameters::DirectionSpecificStreamParameters()\r
- {\r
- }\r
-\r
- //////\r
- /// Constructor which sets all required fields.\r
- //////\r
- DirectionSpecificStreamParameters::DirectionSpecificStreamParameters(const Device &device, int numChannels, \r
- SampleDataFormat format, bool interleaved, PaTime suggestedLatency, void *hostApiSpecificStreamInfo)\r
- {\r
- setDevice(device);\r
- setNumChannels(numChannels);\r
- setSampleFormat(format, interleaved);\r
- setSuggestedLatency(suggestedLatency);\r
- setHostApiSpecificStreamInfo(hostApiSpecificStreamInfo);\r
- }\r
-\r
- // -----------------------------------------------------------------------------------\r
-\r
- void DirectionSpecificStreamParameters::setDevice(const Device &device)\r
- {\r
- paStreamParameters_.device = device.index();\r
- }\r
-\r
- void DirectionSpecificStreamParameters::setNumChannels(int numChannels)\r
- {\r
- paStreamParameters_.channelCount = numChannels;\r
- }\r
-\r
- void DirectionSpecificStreamParameters::setSampleFormat(SampleDataFormat format, bool interleaved)\r
- {\r
- paStreamParameters_.sampleFormat = static_cast<PaSampleFormat>(format);\r
-\r
- if (!interleaved)\r
- paStreamParameters_.sampleFormat |= paNonInterleaved;\r
- }\r
-\r
- void DirectionSpecificStreamParameters::setHostApiSpecificSampleFormat(PaSampleFormat format, bool interleaved)\r
- {\r
- paStreamParameters_.sampleFormat = format;\r
-\r
- paStreamParameters_.sampleFormat |= paCustomFormat;\r
-\r
- if (!interleaved)\r
- paStreamParameters_.sampleFormat |= paNonInterleaved;\r
- }\r
-\r
- void DirectionSpecificStreamParameters::setSuggestedLatency(PaTime latency)\r
- {\r
- paStreamParameters_.suggestedLatency = latency;\r
- }\r
-\r
- void DirectionSpecificStreamParameters::setHostApiSpecificStreamInfo(void *streamInfo)\r
- {\r
- paStreamParameters_.hostApiSpecificStreamInfo = streamInfo;\r
- }\r
-\r
- // -----------------------------------------------------------------------------------\r
-\r
- PaStreamParameters *DirectionSpecificStreamParameters::paStreamParameters()\r
- {\r
- if (paStreamParameters_.channelCount > 0 && paStreamParameters_.device != paNoDevice)\r
- return &paStreamParameters_;\r
- else\r
- return NULL;\r
- }\r
-\r
- const PaStreamParameters *DirectionSpecificStreamParameters::paStreamParameters() const\r
- {\r
- if (paStreamParameters_.channelCount > 0 && paStreamParameters_.device != paNoDevice)\r
- return &paStreamParameters_;\r
- else\r
- return NULL;\r
- }\r
-\r
- Device &DirectionSpecificStreamParameters::device() const\r
- {\r
- return System::instance().deviceByIndex(paStreamParameters_.device);\r
- }\r
-\r
- int DirectionSpecificStreamParameters::numChannels() const\r
- {\r
- return paStreamParameters_.channelCount;\r
- }\r
-\r
- //////\r
- /// Returns the (non host api-specific) sample format, without including \r
- /// the paNonInterleaved flag. If the sample format is host api-spefific, \r
- /// INVALID_FORMAT (0) will be returned.\r
- //////\r
- SampleDataFormat DirectionSpecificStreamParameters::sampleFormat() const\r
- {\r
- if (isSampleFormatHostApiSpecific())\r
- return INVALID_FORMAT;\r
- else\r
- return static_cast<SampleDataFormat>(paStreamParameters_.sampleFormat & ~paNonInterleaved);\r
- }\r
-\r
- bool DirectionSpecificStreamParameters::isSampleFormatInterleaved() const\r
- {\r
- return ((paStreamParameters_.sampleFormat & paNonInterleaved) == 0);\r
- }\r
-\r
- bool DirectionSpecificStreamParameters::isSampleFormatHostApiSpecific() const\r
- {\r
- return ((paStreamParameters_.sampleFormat & paCustomFormat) == 0);\r
- }\r
-\r
- //////\r
- /// Returns the host api-specific sample format, without including any \r
- /// paCustomFormat or paNonInterleaved flags. Will return 0 if the sample format is \r
- /// not host api-specific.\r
- //////\r
- PaSampleFormat DirectionSpecificStreamParameters::hostApiSpecificSampleFormat() const\r
- {\r
- if (isSampleFormatHostApiSpecific())\r
- return paStreamParameters_.sampleFormat & ~paCustomFormat & ~paNonInterleaved;\r
- else\r
- return 0;\r
- }\r
-\r
- PaTime DirectionSpecificStreamParameters::suggestedLatency() const\r
- {\r
- return paStreamParameters_.suggestedLatency;\r
- }\r
-\r
- void *DirectionSpecificStreamParameters::hostApiSpecificStreamInfo() const\r
- {\r
- return paStreamParameters_.hostApiSpecificStreamInfo;\r
- }\r
-\r
- // -----------------------------------------------------------------------------------\r
-\r
-} // namespace portaudio\r
+#include "portaudiocpp/DirectionSpecificStreamParameters.hxx"
+
+#include "portaudiocpp/Device.hxx"
+
+namespace portaudio
+{
+
+ // -----------------------------------------------------------------------------------
+
+ //////
+ /// Returns a `nil' DirectionSpecificStreamParameters object. This can be used to
+ /// specify that one direction of a Stream is not required (i.e. when creating
+ /// a half-duplex Stream). All fields of the null DirectionSpecificStreamParameters
+ /// object are invalid except for the device and the number of channel, which are set
+ /// to paNoDevice and 0 respectively.
+ //////
+ DirectionSpecificStreamParameters DirectionSpecificStreamParameters::null()
+ {
+ DirectionSpecificStreamParameters tmp;
+ tmp.paStreamParameters_.device = paNoDevice;
+ tmp.paStreamParameters_.channelCount = 0;
+ return tmp;
+ }
+
+ // -----------------------------------------------------------------------------------
+
+ //////
+ /// Default constructor -- all parameters will be uninitialized.
+ //////
+ DirectionSpecificStreamParameters::DirectionSpecificStreamParameters()
+ {
+ }
+
+ //////
+ /// Constructor which sets all required fields.
+ //////
+ DirectionSpecificStreamParameters::DirectionSpecificStreamParameters(const Device &device, int numChannels,
+ SampleDataFormat format, bool interleaved, PaTime suggestedLatency, void *hostApiSpecificStreamInfo)
+ {
+ setDevice(device);
+ setNumChannels(numChannels);
+ setSampleFormat(format, interleaved);
+ setSuggestedLatency(suggestedLatency);
+ setHostApiSpecificStreamInfo(hostApiSpecificStreamInfo);
+ }
+
+ // -----------------------------------------------------------------------------------
+
+ void DirectionSpecificStreamParameters::setDevice(const Device &device)
+ {
+ paStreamParameters_.device = device.index();
+ }
+
+ void DirectionSpecificStreamParameters::setNumChannels(int numChannels)
+ {
+ paStreamParameters_.channelCount = numChannels;
+ }
+
+ void DirectionSpecificStreamParameters::setSampleFormat(SampleDataFormat format, bool interleaved)
+ {
+ paStreamParameters_.sampleFormat = static_cast<PaSampleFormat>(format);
+
+ if (!interleaved)
+ paStreamParameters_.sampleFormat |= paNonInterleaved;
+ }
+
+ void DirectionSpecificStreamParameters::setHostApiSpecificSampleFormat(PaSampleFormat format, bool interleaved)
+ {
+ paStreamParameters_.sampleFormat = format;
+
+ paStreamParameters_.sampleFormat |= paCustomFormat;
+
+ if (!interleaved)
+ paStreamParameters_.sampleFormat |= paNonInterleaved;
+ }
+
+ void DirectionSpecificStreamParameters::setSuggestedLatency(PaTime latency)
+ {
+ paStreamParameters_.suggestedLatency = latency;
+ }
+
+ void DirectionSpecificStreamParameters::setHostApiSpecificStreamInfo(void *streamInfo)
+ {
+ paStreamParameters_.hostApiSpecificStreamInfo = streamInfo;
+ }
+
+ // -----------------------------------------------------------------------------------
+
+ PaStreamParameters *DirectionSpecificStreamParameters::paStreamParameters()
+ {
+ if (paStreamParameters_.channelCount > 0 && paStreamParameters_.device != paNoDevice)
+ return &paStreamParameters_;
+ else
+ return NULL;
+ }
+
+ const PaStreamParameters *DirectionSpecificStreamParameters::paStreamParameters() const
+ {
+ if (paStreamParameters_.channelCount > 0 && paStreamParameters_.device != paNoDevice)
+ return &paStreamParameters_;
+ else
+ return NULL;
+ }
+
+ Device &DirectionSpecificStreamParameters::device() const
+ {
+ return System::instance().deviceByIndex(paStreamParameters_.device);
+ }
+
+ int DirectionSpecificStreamParameters::numChannels() const
+ {
+ return paStreamParameters_.channelCount;
+ }
+
+ //////
+ /// Returns the (non host api-specific) sample format, without including
+ /// the paNonInterleaved flag. If the sample format is host api-spefific,
+ /// INVALID_FORMAT (0) will be returned.
+ //////
+ SampleDataFormat DirectionSpecificStreamParameters::sampleFormat() const
+ {
+ if (isSampleFormatHostApiSpecific())
+ return INVALID_FORMAT;
+ else
+ return static_cast<SampleDataFormat>(paStreamParameters_.sampleFormat & ~paNonInterleaved);
+ }
+
+ bool DirectionSpecificStreamParameters::isSampleFormatInterleaved() const
+ {
+ return ((paStreamParameters_.sampleFormat & paNonInterleaved) == 0);
+ }
+
+ bool DirectionSpecificStreamParameters::isSampleFormatHostApiSpecific() const
+ {
+ return ((paStreamParameters_.sampleFormat & paCustomFormat) == 0);
+ }
+
+ //////
+ /// Returns the host api-specific sample format, without including any
+ /// paCustomFormat or paNonInterleaved flags. Will return 0 if the sample format is
+ /// not host api-specific.
+ //////
+ PaSampleFormat DirectionSpecificStreamParameters::hostApiSpecificSampleFormat() const
+ {
+ if (isSampleFormatHostApiSpecific())
+ return paStreamParameters_.sampleFormat & ~paCustomFormat & ~paNonInterleaved;
+ else
+ return 0;
+ }
+
+ PaTime DirectionSpecificStreamParameters::suggestedLatency() const
+ {
+ return paStreamParameters_.suggestedLatency;
+ }
+
+ void *DirectionSpecificStreamParameters::hostApiSpecificStreamInfo() const
+ {
+ return paStreamParameters_.hostApiSpecificStreamInfo;
+ }
+
+ // -----------------------------------------------------------------------------------
+
+} // namespace portaudio
-#include "portaudiocpp/Exception.hxx"\r
-\r
-namespace portaudio\r
-{\r
- // -----------------------------------------------------------------------------------\r
- // PaException:\r
- // -----------------------------------------------------------------------------------\r
-\r
- //////\r
- /// Wraps a PortAudio error into a PortAudioCpp PaException.\r
- //////\r
- PaException::PaException(PaError error) : error_(error)\r
- {\r
- }\r
-\r
- // -----------------------------------------------------------------------------------\r
-\r
- //////\r
- /// Alias for paErrorText(), to have std::exception compliance.\r
- //////\r
- const char *PaException::what() const throw()\r
- {\r
- return paErrorText();\r
- }\r
-\r
- // -----------------------------------------------------------------------------------\r
-\r
- //////\r
- /// Returns the PortAudio error code (PaError).\r
- //////\r
- PaError PaException::paError() const\r
- {\r
- return error_;\r
- }\r
-\r
- //////\r
- /// Returns the error as a (zero-terminated) text string.\r
- //////\r
- const char *PaException::paErrorText() const\r
- {\r
- return Pa_GetErrorText(error_);\r
- }\r
-\r
- //////\r
- /// Returns true is the error is a HostApi error.\r
- //////\r
- bool PaException::isHostApiError() const\r
- {\r
- return (error_ == paUnanticipatedHostError);\r
- }\r
-\r
- //////\r
- /// Returns the last HostApi error (which is the current one if \r
- /// isHostApiError() returns true) as an error code.\r
- //////\r
- long PaException::lastHostApiError() const\r
- {\r
- return Pa_GetLastHostErrorInfo()->errorCode;\r
- }\r
-\r
- //////\r
- /// Returns the last HostApi error (which is the current one if \r
- /// isHostApiError() returns true) as a (zero-terminated) text \r
- /// string, if it's available.\r
- //////\r
- const char *PaException::lastHostApiErrorText() const\r
- {\r
- return Pa_GetLastHostErrorInfo()->errorText;\r
- }\r
-\r
- // -----------------------------------------------------------------------------------\r
-\r
- bool PaException::operator==(const PaException &rhs) const\r
- {\r
- return (error_ == rhs.error_);\r
- }\r
-\r
- bool PaException::operator!=(const PaException &rhs) const\r
- {\r
- return !(*this == rhs);\r
- }\r
-\r
- // -----------------------------------------------------------------------------------\r
- // PaCppException:\r
- // -----------------------------------------------------------------------------------\r
- \r
- PaCppException::PaCppException(ExceptionSpecifier specifier) : specifier_(specifier)\r
- {\r
- }\r
-\r
- const char *PaCppException::what() const throw()\r
- {\r
- switch (specifier_)\r
- {\r
- case UNABLE_TO_ADAPT_DEVICE:\r
- {\r
- return "Unable to adapt the given device to the specified host api specific device extension";\r
- }\r
- }\r
-\r
- return "Unknown exception";\r
- }\r
-\r
- PaCppException::ExceptionSpecifier PaCppException::specifier() const\r
- {\r
- return specifier_;\r
- }\r
-\r
- bool PaCppException::operator==(const PaCppException &rhs) const\r
- {\r
- return (specifier_ == rhs.specifier_);\r
- }\r
-\r
- bool PaCppException::operator!=(const PaCppException &rhs) const\r
- {\r
- return !(*this == rhs);\r
- }\r
-\r
- // -----------------------------------------------------------------------------------\r
-\r
-} // namespace portaudio\r
-\r
-\r
+#include "portaudiocpp/Exception.hxx"
+
+namespace portaudio
+{
+ // -----------------------------------------------------------------------------------
+ // PaException:
+ // -----------------------------------------------------------------------------------
+
+ //////
+ /// Wraps a PortAudio error into a PortAudioCpp PaException.
+ //////
+ PaException::PaException(PaError error) : error_(error)
+ {
+ }
+
+ // -----------------------------------------------------------------------------------
+
+ //////
+ /// Alias for paErrorText(), to have std::exception compliance.
+ //////
+ const char *PaException::what() const throw()
+ {
+ return paErrorText();
+ }
+
+ // -----------------------------------------------------------------------------------
+
+ //////
+ /// Returns the PortAudio error code (PaError).
+ //////
+ PaError PaException::paError() const
+ {
+ return error_;
+ }
+
+ //////
+ /// Returns the error as a (zero-terminated) text string.
+ //////
+ const char *PaException::paErrorText() const
+ {
+ return Pa_GetErrorText(error_);
+ }
+
+ //////
+ /// Returns true is the error is a HostApi error.
+ //////
+ bool PaException::isHostApiError() const
+ {
+ return (error_ == paUnanticipatedHostError);
+ }
+
+ //////
+ /// Returns the last HostApi error (which is the current one if
+ /// isHostApiError() returns true) as an error code.
+ //////
+ long PaException::lastHostApiError() const
+ {
+ return Pa_GetLastHostErrorInfo()->errorCode;
+ }
+
+ //////
+ /// Returns the last HostApi error (which is the current one if
+ /// isHostApiError() returns true) as a (zero-terminated) text
+ /// string, if it's available.
+ //////
+ const char *PaException::lastHostApiErrorText() const
+ {
+ return Pa_GetLastHostErrorInfo()->errorText;
+ }
+
+ // -----------------------------------------------------------------------------------
+
+ bool PaException::operator==(const PaException &rhs) const
+ {
+ return (error_ == rhs.error_);
+ }
+
+ bool PaException::operator!=(const PaException &rhs) const
+ {
+ return !(*this == rhs);
+ }
+
+ // -----------------------------------------------------------------------------------
+ // PaCppException:
+ // -----------------------------------------------------------------------------------
+
+ PaCppException::PaCppException(ExceptionSpecifier specifier) : specifier_(specifier)
+ {
+ }
+
+ const char *PaCppException::what() const throw()
+ {
+ switch (specifier_)
+ {
+ case UNABLE_TO_ADAPT_DEVICE:
+ {
+ return "Unable to adapt the given device to the specified host api specific device extension";
+ }
+ }
+
+ return "Unknown exception";
+ }
+
+ PaCppException::ExceptionSpecifier PaCppException::specifier() const
+ {
+ return specifier_;
+ }
+
+ bool PaCppException::operator==(const PaCppException &rhs) const
+ {
+ return (specifier_ == rhs.specifier_);
+ }
+
+ bool PaCppException::operator!=(const PaCppException &rhs) const
+ {
+ return !(*this == rhs);
+ }
+
+ // -----------------------------------------------------------------------------------
+
+} // namespace portaudio
+
+
-#include "portaudiocpp/HostApi.hxx"\r
-\r
-#include "portaudiocpp/System.hxx"\r
-#include "portaudiocpp/Device.hxx"\r
-#include "portaudiocpp/SystemDeviceIterator.hxx"\r
-#include "portaudiocpp/Exception.hxx"\r
-\r
-namespace portaudio\r
-{\r
-\r
- // -----------------------------------------------------------------------------------\r
-\r
- HostApi::HostApi(PaHostApiIndex index) : devices_(NULL)\r
- {\r
- try\r
- {\r
- info_ = Pa_GetHostApiInfo(index);\r
-\r
- // Create and populate devices array:\r
- int numDevices = deviceCount();\r
-\r
- devices_ = new Device*[numDevices];\r
-\r
- for (int i = 0; i < numDevices; ++i)\r
- {\r
- PaDeviceIndex deviceIndex = Pa_HostApiDeviceIndexToDeviceIndex(index, i);\r
-\r
- if (deviceIndex < 0)\r
- {\r
- throw PaException(deviceIndex);\r
- }\r
-\r
- devices_[i] = &System::instance().deviceByIndex(deviceIndex);\r
- }\r
- }\r
- catch (const std::exception &e)\r
- {\r
- // Delete any (partially) constructed objects (deconstructor isn't called):\r
- delete[] devices_; // devices_ is either NULL or valid\r
-\r
- // Re-throw exception:\r
- throw e;\r
- }\r
- }\r
-\r
- HostApi::~HostApi()\r
- {\r
- // Destroy devices array:\r
- delete[] devices_;\r
- }\r
-\r
- // -----------------------------------------------------------------------------------\r
-\r
- PaHostApiTypeId HostApi::typeId() const\r
- {\r
- return info_->type;\r
- }\r
-\r
- PaHostApiIndex HostApi::index() const\r
- {\r
- PaHostApiIndex index = Pa_HostApiTypeIdToHostApiIndex(typeId());\r
-\r
- if (index < 0)\r
- throw PaException(index);\r
-\r
- return index;\r
- }\r
-\r
- const char *HostApi::name() const\r
- {\r
- return info_->name;\r
- }\r
-\r
- int HostApi::deviceCount() const\r
- {\r
- return info_->deviceCount;\r
- }\r
-\r
- // -----------------------------------------------------------------------------------\r
-\r
- HostApi::DeviceIterator HostApi::devicesBegin()\r
- {\r
- DeviceIterator tmp;\r
- tmp.ptr_ = &devices_[0]; // begin (first element)\r
- return tmp;\r
- }\r
-\r
- HostApi::DeviceIterator HostApi::devicesEnd()\r
- {\r
- DeviceIterator tmp;\r
- tmp.ptr_ = &devices_[deviceCount()]; // end (one past last element)\r
- return tmp;\r
- }\r
-\r
- // -----------------------------------------------------------------------------------\r
-\r
- Device &HostApi::defaultInputDevice() const\r
- {\r
- return System::instance().deviceByIndex(info_->defaultInputDevice);\r
- }\r
-\r
- Device &HostApi::defaultOutputDevice() const\r
- {\r
- return System::instance().deviceByIndex(info_->defaultOutputDevice);\r
- }\r
-\r
- // -----------------------------------------------------------------------------------\r
-\r
- bool HostApi::operator==(const HostApi &rhs) const\r
- {\r
- return (typeId() == rhs.typeId());\r
- }\r
-\r
- bool HostApi::operator!=(const HostApi &rhs) const\r
- {\r
- return !(*this == rhs);\r
- }\r
-\r
- // -----------------------------------------------------------------------------------\r
-\r
-} // namespace portaudio\r
+#include "portaudiocpp/HostApi.hxx"
+
+#include "portaudiocpp/System.hxx"
+#include "portaudiocpp/Device.hxx"
+#include "portaudiocpp/SystemDeviceIterator.hxx"
+#include "portaudiocpp/Exception.hxx"
+
+namespace portaudio
+{
+
+ // -----------------------------------------------------------------------------------
+
+ HostApi::HostApi(PaHostApiIndex index) : devices_(NULL)
+ {
+ try
+ {
+ info_ = Pa_GetHostApiInfo(index);
+
+ // Create and populate devices array:
+ int numDevices = deviceCount();
+
+ devices_ = new Device*[numDevices];
+
+ for (int i = 0; i < numDevices; ++i)
+ {
+ PaDeviceIndex deviceIndex = Pa_HostApiDeviceIndexToDeviceIndex(index, i);
+
+ if (deviceIndex < 0)
+ {
+ throw PaException(deviceIndex);
+ }
+
+ devices_[i] = &System::instance().deviceByIndex(deviceIndex);
+ }
+ }
+ catch (const std::exception &e)
+ {
+ // Delete any (partially) constructed objects (deconstructor isn't called):
+ delete[] devices_; // devices_ is either NULL or valid
+
+ // Re-throw exception:
+ throw e;
+ }
+ }
+
+ HostApi::~HostApi()
+ {
+ // Destroy devices array:
+ delete[] devices_;
+ }
+
+ // -----------------------------------------------------------------------------------
+
+ PaHostApiTypeId HostApi::typeId() const
+ {
+ return info_->type;
+ }
+
+ PaHostApiIndex HostApi::index() const
+ {
+ PaHostApiIndex index = Pa_HostApiTypeIdToHostApiIndex(typeId());
+
+ if (index < 0)
+ throw PaException(index);
+
+ return index;
+ }
+
+ const char *HostApi::name() const
+ {
+ return info_->name;
+ }
+
+ int HostApi::deviceCount() const
+ {
+ return info_->deviceCount;
+ }
+
+ // -----------------------------------------------------------------------------------
+
+ HostApi::DeviceIterator HostApi::devicesBegin()
+ {
+ DeviceIterator tmp;
+ tmp.ptr_ = &devices_[0]; // begin (first element)
+ return tmp;
+ }
+
+ HostApi::DeviceIterator HostApi::devicesEnd()
+ {
+ DeviceIterator tmp;
+ tmp.ptr_ = &devices_[deviceCount()]; // end (one past last element)
+ return tmp;
+ }
+
+ // -----------------------------------------------------------------------------------
+
+ Device &HostApi::defaultInputDevice() const
+ {
+ return System::instance().deviceByIndex(info_->defaultInputDevice);
+ }
+
+ Device &HostApi::defaultOutputDevice() const
+ {
+ return System::instance().deviceByIndex(info_->defaultOutputDevice);
+ }
+
+ // -----------------------------------------------------------------------------------
+
+ bool HostApi::operator==(const HostApi &rhs) const
+ {
+ return (typeId() == rhs.typeId());
+ }
+
+ bool HostApi::operator!=(const HostApi &rhs) const
+ {
+ return !(*this == rhs);
+ }
+
+ // -----------------------------------------------------------------------------------
+
+} // namespace portaudio
-#include "portaudiocpp/InterfaceCallbackStream.hxx"\r
-\r
-#include "portaudiocpp/StreamParameters.hxx"\r
-#include "portaudiocpp/Exception.hxx"\r
-#include "portaudiocpp/CallbackInterface.hxx"\r
-\r
-namespace portaudio\r
-{\r
-\r
- // ---------------------------------------------------------------------------------==\r
-\r
- InterfaceCallbackStream::InterfaceCallbackStream()\r
- {\r
- }\r
-\r
- InterfaceCallbackStream::InterfaceCallbackStream(const StreamParameters ¶meters, CallbackInterface &instance)\r
- {\r
- open(parameters, instance);\r
- }\r
-\r
- InterfaceCallbackStream::~InterfaceCallbackStream()\r
- {\r
- try\r
- {\r
- close();\r
- }\r
- catch (...)\r
- {\r
- // ignore all errors\r
- }\r
- }\r
-\r
- // ---------------------------------------------------------------------------------==\r
-\r
- void InterfaceCallbackStream::open(const StreamParameters ¶meters, CallbackInterface &instance)\r
- {\r
- PaError err = Pa_OpenStream(&stream_, parameters.inputParameters().paStreamParameters(), parameters.outputParameters().paStreamParameters(), \r
- parameters.sampleRate(), parameters.framesPerBuffer(), parameters.flags(), &impl::callbackInterfaceToPaCallbackAdapter, static_cast<void *>(&instance));\r
-\r
- if (err != paNoError)\r
- {\r
- throw PaException(err);\r
- }\r
- }\r
-}\r
+#include "portaudiocpp/InterfaceCallbackStream.hxx"
+
+#include "portaudiocpp/StreamParameters.hxx"
+#include "portaudiocpp/Exception.hxx"
+#include "portaudiocpp/CallbackInterface.hxx"
+
+namespace portaudio
+{
+
+ // ---------------------------------------------------------------------------------==
+
+ InterfaceCallbackStream::InterfaceCallbackStream()
+ {
+ }
+
+ InterfaceCallbackStream::InterfaceCallbackStream(const StreamParameters ¶meters, CallbackInterface &instance)
+ {
+ open(parameters, instance);
+ }
+
+ InterfaceCallbackStream::~InterfaceCallbackStream()
+ {
+ try
+ {
+ close();
+ }
+ catch (...)
+ {
+ // ignore all errors
+ }
+ }
+
+ // ---------------------------------------------------------------------------------==
+
+ void InterfaceCallbackStream::open(const StreamParameters ¶meters, CallbackInterface &instance)
+ {
+ PaError err = Pa_OpenStream(&stream_, parameters.inputParameters().paStreamParameters(), parameters.outputParameters().paStreamParameters(),
+ parameters.sampleRate(), parameters.framesPerBuffer(), parameters.flags(), &impl::callbackInterfaceToPaCallbackAdapter, static_cast<void *>(&instance));
+
+ if (err != paNoError)
+ {
+ throw PaException(err);
+ }
+ }
+}
-#include "portaudiocpp/MemFunCallbackStream.hxx"\r
-\r
-// (... template class ...)\r
-\r
+#include "portaudiocpp/MemFunCallbackStream.hxx"
+
+// (... template class ...)
+
-#include "portaudiocpp/Stream.hxx"\r
-\r
-#include <cstddef>\r
-\r
-#include "portaudiocpp/Exception.hxx"\r
-#include "portaudiocpp/System.hxx"\r
-\r
-namespace portaudio\r
-{\r
-\r
- // -----------------------------------------------------------------------------------\r
-\r
- Stream::Stream() : stream_(NULL)\r
- {\r
- }\r
-\r
- Stream::~Stream()\r
- {\r
- // (can't call close here, \r
- // the derived class should atleast call \r
- // close() in it's deconstructor)\r
- }\r
-\r
- // -----------------------------------------------------------------------------------\r
-\r
- //////\r
- /// Closes the Stream if it's open, else does nothing.\r
- //////\r
- void Stream::close()\r
- {\r
- if (isOpen() && System::exists())\r
- {\r
- PaError err = Pa_CloseStream(stream_);\r
- stream_ = NULL;\r
-\r
- if (err != paNoError)\r
- throw PaException(err);\r
- }\r
- }\r
-\r
- //////\r
- /// Returns true if the Stream is open.\r
- //////\r
- bool Stream::isOpen() const\r
- {\r
- return (stream_ != NULL);\r
- }\r
-\r
- // -----------------------------------------------------------------------------------\r
-\r
- void Stream::setStreamFinishedCallback(PaStreamFinishedCallback *callback)\r
- {\r
- PaError err = Pa_SetStreamFinishedCallback(stream_, callback);\r
-\r
- if (err != paNoError)\r
- throw PaException(err);\r
- }\r
-\r
- // -----------------------------------------------------------------------------------\r
-\r
- void Stream::start()\r
- {\r
- PaError err = Pa_StartStream(stream_);\r
-\r
- if (err != paNoError)\r
- throw PaException(err);\r
- }\r
-\r
- void Stream::stop()\r
- {\r
- PaError err = Pa_StopStream(stream_);\r
-\r
- if (err != paNoError)\r
- throw PaException(err);\r
- }\r
-\r
- void Stream::abort()\r
- {\r
- PaError err = Pa_AbortStream(stream_);\r
-\r
- if (err != paNoError)\r
- throw PaException(err);\r
- }\r
-\r
- bool Stream::isStopped() const\r
- {\r
- PaError ret = Pa_IsStreamStopped(stream_);\r
-\r
- if (ret < 0)\r
- throw PaException(ret);\r
-\r
- return (ret == 1);\r
- }\r
-\r
- bool Stream::isActive() const\r
- {\r
- PaError ret = Pa_IsStreamActive(stream_);\r
-\r
- if (ret < 0)\r
- throw PaException(ret);\r
-\r
- return (ret == 1);\r
- }\r
-\r
- // -----------------------------------------------------------------------------------\r
-\r
- //////\r
- /// Returns the best known input latency for the Stream. This value may differ from the \r
- /// suggested input latency set in the StreamParameters. Includes all sources of \r
- /// latency known to PortAudio such as internal buffering, and Host API reported latency. \r
- /// Doesn't include any estimates of unknown latency.\r
- //////\r
- PaTime Stream::inputLatency() const\r
- {\r
- const PaStreamInfo *info = Pa_GetStreamInfo(stream_);\r
- if (info == NULL)\r
- {\r
- throw PaException(paInternalError);\r
- return PaTime(0.0);\r
- }\r
-\r
- return info->inputLatency;\r
- }\r
-\r
- //////\r
- /// Returns the best known output latency for the Stream. This value may differ from the \r
- /// suggested output latency set in the StreamParameters. Includes all sources of \r
- /// latency known to PortAudio such as internal buffering, and Host API reported latency. \r
- /// Doesn't include any estimates of unknown latency.\r
- //////\r
- PaTime Stream::outputLatency() const\r
- {\r
- const PaStreamInfo *info = Pa_GetStreamInfo(stream_);\r
- if (info == NULL)\r
- {\r
- throw PaException(paInternalError);\r
- return PaTime(0.0);\r
- }\r
-\r
- return info->outputLatency;\r
- }\r
-\r
- //////\r
- /// Returns the sample rate of the Stream. Usually this will be the \r
- /// best known estimate of the used sample rate. For instance when opening a \r
- /// Stream setting 44100.0 Hz in the StreamParameters, the actual sample \r
- /// rate might be something like 44103.2 Hz (due to imperfections in the \r
- /// sound card hardware).\r
- //////\r
- double Stream::sampleRate() const\r
- {\r
- const PaStreamInfo *info = Pa_GetStreamInfo(stream_);\r
- if (info == NULL)\r
- {\r
- throw PaException(paInternalError);\r
- return 0.0;\r
- }\r
-\r
- return info->sampleRate;\r
- }\r
-\r
- // -----------------------------------------------------------------------------------\r
-\r
- PaTime Stream::time() const\r
- {\r
- return Pa_GetStreamTime(stream_);\r
- }\r
-\r
- // -----------------------------------------------------------------------------------\r
-\r
- //////\r
- /// Accessor (const) for PortAudio PaStream pointer, useful for interfacing with \r
- /// PortAudio add-ons such as PortMixer for instance. Normally accessing this \r
- /// pointer should not be needed as PortAudioCpp aims to provide all of PortAudio's \r
- /// functionality.\r
- //////\r
- const PaStream *Stream::paStream() const\r
- {\r
- return stream_;\r
- }\r
-\r
- //////\r
- /// Accessor (non-const) for PortAudio PaStream pointer, useful for interfacing with \r
- /// PortAudio add-ons such as PortMixer for instance. Normally accessing this \r
- /// pointer should not be needed as PortAudioCpp aims to provide all of PortAudio's \r
- /// functionality.\r
- //////\r
- PaStream *Stream::paStream()\r
- {\r
- return stream_;\r
- }\r
-\r
- // -----------------------------------------------------------------------------------\r
-\r
-} // namespace portaudio\r
+#include "portaudiocpp/Stream.hxx"
+
+#include <cstddef>
+
+#include "portaudiocpp/Exception.hxx"
+#include "portaudiocpp/System.hxx"
+
+namespace portaudio
+{
+
+ // -----------------------------------------------------------------------------------
+
+ Stream::Stream() : stream_(NULL)
+ {
+ }
+
+ Stream::~Stream()
+ {
+ // (can't call close here,
+ // the derived class should atleast call
+ // close() in it's deconstructor)
+ }
+
+ // -----------------------------------------------------------------------------------
+
+ //////
+ /// Closes the Stream if it's open, else does nothing.
+ //////
+ void Stream::close()
+ {
+ if (isOpen() && System::exists())
+ {
+ PaError err = Pa_CloseStream(stream_);
+ stream_ = NULL;
+
+ if (err != paNoError)
+ throw PaException(err);
+ }
+ }
+
+ //////
+ /// Returns true if the Stream is open.
+ //////
+ bool Stream::isOpen() const
+ {
+ return (stream_ != NULL);
+ }
+
+ // -----------------------------------------------------------------------------------
+
+ void Stream::setStreamFinishedCallback(PaStreamFinishedCallback *callback)
+ {
+ PaError err = Pa_SetStreamFinishedCallback(stream_, callback);
+
+ if (err != paNoError)
+ throw PaException(err);
+ }
+
+ // -----------------------------------------------------------------------------------
+
+ void Stream::start()
+ {
+ PaError err = Pa_StartStream(stream_);
+
+ if (err != paNoError)
+ throw PaException(err);
+ }
+
+ void Stream::stop()
+ {
+ PaError err = Pa_StopStream(stream_);
+
+ if (err != paNoError)
+ throw PaException(err);
+ }
+
+ void Stream::abort()
+ {
+ PaError err = Pa_AbortStream(stream_);
+
+ if (err != paNoError)
+ throw PaException(err);
+ }
+
+ bool Stream::isStopped() const
+ {
+ PaError ret = Pa_IsStreamStopped(stream_);
+
+ if (ret < 0)
+ throw PaException(ret);
+
+ return (ret == 1);
+ }
+
+ bool Stream::isActive() const
+ {
+ PaError ret = Pa_IsStreamActive(stream_);
+
+ if (ret < 0)
+ throw PaException(ret);
+
+ return (ret == 1);
+ }
+
+ // -----------------------------------------------------------------------------------
+
+ //////
+ /// Returns the best known input latency for the Stream. This value may differ from the
+ /// suggested input latency set in the StreamParameters. Includes all sources of
+ /// latency known to PortAudio such as internal buffering, and Host API reported latency.
+ /// Doesn't include any estimates of unknown latency.
+ //////
+ PaTime Stream::inputLatency() const
+ {
+ const PaStreamInfo *info = Pa_GetStreamInfo(stream_);
+ if (info == NULL)
+ {
+ throw PaException(paInternalError);
+ return PaTime(0.0);
+ }
+
+ return info->inputLatency;
+ }
+
+ //////
+ /// Returns the best known output latency for the Stream. This value may differ from the
+ /// suggested output latency set in the StreamParameters. Includes all sources of
+ /// latency known to PortAudio such as internal buffering, and Host API reported latency.
+ /// Doesn't include any estimates of unknown latency.
+ //////
+ PaTime Stream::outputLatency() const
+ {
+ const PaStreamInfo *info = Pa_GetStreamInfo(stream_);
+ if (info == NULL)
+ {
+ throw PaException(paInternalError);
+ return PaTime(0.0);
+ }
+
+ return info->outputLatency;
+ }
+
+ //////
+ /// Returns the sample rate of the Stream. Usually this will be the
+ /// best known estimate of the used sample rate. For instance when opening a
+ /// Stream setting 44100.0 Hz in the StreamParameters, the actual sample
+ /// rate might be something like 44103.2 Hz (due to imperfections in the
+ /// sound card hardware).
+ //////
+ double Stream::sampleRate() const
+ {
+ const PaStreamInfo *info = Pa_GetStreamInfo(stream_);
+ if (info == NULL)
+ {
+ throw PaException(paInternalError);
+ return 0.0;
+ }
+
+ return info->sampleRate;
+ }
+
+ // -----------------------------------------------------------------------------------
+
+ PaTime Stream::time() const
+ {
+ return Pa_GetStreamTime(stream_);
+ }
+
+ // -----------------------------------------------------------------------------------
+
+ //////
+ /// Accessor (const) for PortAudio PaStream pointer, useful for interfacing with
+ /// PortAudio add-ons such as PortMixer for instance. Normally accessing this
+ /// pointer should not be needed as PortAudioCpp aims to provide all of PortAudio's
+ /// functionality.
+ //////
+ const PaStream *Stream::paStream() const
+ {
+ return stream_;
+ }
+
+ //////
+ /// Accessor (non-const) for PortAudio PaStream pointer, useful for interfacing with
+ /// PortAudio add-ons such as PortMixer for instance. Normally accessing this
+ /// pointer should not be needed as PortAudioCpp aims to provide all of PortAudio's
+ /// functionality.
+ //////
+ PaStream *Stream::paStream()
+ {
+ return stream_;
+ }
+
+ // -----------------------------------------------------------------------------------
+
+} // namespace portaudio
-#include "portaudiocpp/StreamParameters.hxx"\r
-\r
-#include <cstddef>\r
-\r
-#include "portaudiocpp/Device.hxx"\r
-\r
-namespace portaudio\r
-{\r
- // -----------------------------------------------------------------------------------\r
-\r
- //////\r
- /// Default constructor; does nothing.\r
- //////\r
- StreamParameters::StreamParameters()\r
- {\r
- }\r
-\r
- //////\r
- /// Sets up the all parameters needed to open either a half-duplex or full-duplex Stream.\r
- ///\r
- /// @param inputParameters The parameters for the input direction of the to-be opened \r
- /// Stream or DirectionSpecificStreamParameters::null() for an output-only Stream.\r
- /// @param outputParameters The parameters for the output direction of the to-be opened\r
- /// Stream or DirectionSpecificStreamParameters::null() for an input-only Stream.\r
- /// @param sampleRate The to-be opened Stream's sample rate in Hz.\r
- /// @param framesPerBuffer The number of frames per buffer for a CallbackStream, or \r
- /// the preferred buffer granularity for a BlockingStream.\r
- /// @param flags The flags for the to-be opened Stream; default paNoFlag.\r
- //////\r
- StreamParameters::StreamParameters(const DirectionSpecificStreamParameters &inputParameters, \r
- const DirectionSpecificStreamParameters &outputParameters, double sampleRate, unsigned long framesPerBuffer, \r
- PaStreamFlags flags) : inputParameters_(inputParameters), outputParameters_(outputParameters), \r
- sampleRate_(sampleRate), framesPerBuffer_(framesPerBuffer), flags_(flags)\r
- {\r
- }\r
-\r
- // -----------------------------------------------------------------------------------\r
-\r
- //////\r
- /// Sets the requested sample rate. If this sample rate isn't supported by the hardware, the \r
- /// Stream will fail to open. The real-life sample rate used might differ slightly due to \r
- /// imperfections in the sound card hardware; use Stream::sampleRate() to retreive the \r
- /// best known estimate for this value.\r
- //////\r
- void StreamParameters::setSampleRate(double sampleRate)\r
- {\r
- sampleRate_ = sampleRate;\r
- }\r
-\r
- //////\r
- /// Either the number of frames per buffer for a CallbackStream, or \r
- /// the preferred buffer granularity for a BlockingStream. See PortAudio \r
- /// documentation.\r
- //////\r
- void StreamParameters::setFramesPerBuffer(unsigned long framesPerBuffer)\r
- {\r
- framesPerBuffer_ = framesPerBuffer;\r
- }\r
-\r
- //////\r
- /// Sets the specified flag or does nothing when the flag is already set. Doesn't \r
- /// `unset' any previously existing flags (use clearFlags() for that).\r
- //////\r
- void StreamParameters::setFlag(PaStreamFlags flag)\r
- {\r
- flags_ |= flag;\r
- }\r
-\r
- //////\r
- /// Unsets the specified flag or does nothing if the flag isn't set. Doesn't affect \r
- /// any other flags.\r
- //////\r
- void StreamParameters::unsetFlag(PaStreamFlags flag)\r
- {\r
- flags_ &= ~flag;\r
- }\r
-\r
- //////\r
- /// Clears or `unsets' all set flags.\r
- //////\r
- void StreamParameters::clearFlags()\r
- {\r
- flags_ = paNoFlag;\r
- }\r
-\r
- // -----------------------------------------------------------------------------------\r
-\r
- void StreamParameters::setInputParameters(const DirectionSpecificStreamParameters ¶meters)\r
- {\r
- inputParameters_ = parameters;\r
- }\r
-\r
- void StreamParameters::setOutputParameters(const DirectionSpecificStreamParameters ¶meters)\r
- {\r
- outputParameters_ = parameters;\r
- }\r
-\r
- // -----------------------------------------------------------------------------------\r
-\r
- bool StreamParameters::isSupported() const\r
- {\r
- return (Pa_IsFormatSupported(inputParameters_.paStreamParameters(), \r
- outputParameters_.paStreamParameters(), sampleRate_) == paFormatIsSupported);\r
- }\r
-\r
- // -----------------------------------------------------------------------------------\r
-\r
- double StreamParameters::sampleRate() const\r
- {\r
- return sampleRate_;\r
- }\r
-\r
- unsigned long StreamParameters::framesPerBuffer() const\r
- {\r
- return framesPerBuffer_;\r
- }\r
-\r
- //////\r
- /// Returns all currently set flags as a binary combined \r
- /// integer value (PaStreamFlags). Use isFlagSet() to \r
- /// avoid dealing with the bitmasks.\r
- //////\r
- PaStreamFlags StreamParameters::flags() const\r
- {\r
- return flags_;\r
- }\r
-\r
- //////\r
- /// Returns true if the specified flag is currently set \r
- /// or false if it isn't.\r
- //////\r
- bool StreamParameters::isFlagSet(PaStreamFlags flag) const\r
- {\r
- return ((flags_ & flag) != 0);\r
- }\r
-\r
- // -----------------------------------------------------------------------------------\r
-\r
- DirectionSpecificStreamParameters &StreamParameters::inputParameters()\r
- {\r
- return inputParameters_;\r
- }\r
-\r
- const DirectionSpecificStreamParameters &StreamParameters::inputParameters() const\r
- {\r
- return inputParameters_;\r
- }\r
-\r
- DirectionSpecificStreamParameters &StreamParameters::outputParameters()\r
- {\r
- return outputParameters_;\r
- }\r
-\r
- const DirectionSpecificStreamParameters &StreamParameters::outputParameters() const\r
- {\r
- return outputParameters_;\r
- }\r
-\r
- // -----------------------------------------------------------------------------------\r
-} // namespace portaudio\r
-\r
-\r
-\r
-\r
-\r
+#include "portaudiocpp/StreamParameters.hxx"
+
+#include <cstddef>
+
+#include "portaudiocpp/Device.hxx"
+
+namespace portaudio
+{
+ // -----------------------------------------------------------------------------------
+
+ //////
+ /// Default constructor; does nothing.
+ //////
+ StreamParameters::StreamParameters()
+ {
+ }
+
+ //////
+ /// Sets up the all parameters needed to open either a half-duplex or full-duplex Stream.
+ ///
+ /// @param inputParameters The parameters for the input direction of the to-be opened
+ /// Stream or DirectionSpecificStreamParameters::null() for an output-only Stream.
+ /// @param outputParameters The parameters for the output direction of the to-be opened
+ /// Stream or DirectionSpecificStreamParameters::null() for an input-only Stream.
+ /// @param sampleRate The to-be opened Stream's sample rate in Hz.
+ /// @param framesPerBuffer The number of frames per buffer for a CallbackStream, or
+ /// the preferred buffer granularity for a BlockingStream.
+ /// @param flags The flags for the to-be opened Stream; default paNoFlag.
+ //////
+ StreamParameters::StreamParameters(const DirectionSpecificStreamParameters &inputParameters,
+ const DirectionSpecificStreamParameters &outputParameters, double sampleRate, unsigned long framesPerBuffer,
+ PaStreamFlags flags) : inputParameters_(inputParameters), outputParameters_(outputParameters),
+ sampleRate_(sampleRate), framesPerBuffer_(framesPerBuffer), flags_(flags)
+ {
+ }
+
+ // -----------------------------------------------------------------------------------
+
+ //////
+ /// Sets the requested sample rate. If this sample rate isn't supported by the hardware, the
+ /// Stream will fail to open. The real-life sample rate used might differ slightly due to
+ /// imperfections in the sound card hardware; use Stream::sampleRate() to retreive the
+ /// best known estimate for this value.
+ //////
+ void StreamParameters::setSampleRate(double sampleRate)
+ {
+ sampleRate_ = sampleRate;
+ }
+
+ //////
+ /// Either the number of frames per buffer for a CallbackStream, or
+ /// the preferred buffer granularity for a BlockingStream. See PortAudio
+ /// documentation.
+ //////
+ void StreamParameters::setFramesPerBuffer(unsigned long framesPerBuffer)
+ {
+ framesPerBuffer_ = framesPerBuffer;
+ }
+
+ //////
+ /// Sets the specified flag or does nothing when the flag is already set. Doesn't
+ /// `unset' any previously existing flags (use clearFlags() for that).
+ //////
+ void StreamParameters::setFlag(PaStreamFlags flag)
+ {
+ flags_ |= flag;
+ }
+
+ //////
+ /// Unsets the specified flag or does nothing if the flag isn't set. Doesn't affect
+ /// any other flags.
+ //////
+ void StreamParameters::unsetFlag(PaStreamFlags flag)
+ {
+ flags_ &= ~flag;
+ }
+
+ //////
+ /// Clears or `unsets' all set flags.
+ //////
+ void StreamParameters::clearFlags()
+ {
+ flags_ = paNoFlag;
+ }
+
+ // -----------------------------------------------------------------------------------
+
+ void StreamParameters::setInputParameters(const DirectionSpecificStreamParameters ¶meters)
+ {
+ inputParameters_ = parameters;
+ }
+
+ void StreamParameters::setOutputParameters(const DirectionSpecificStreamParameters ¶meters)
+ {
+ outputParameters_ = parameters;
+ }
+
+ // -----------------------------------------------------------------------------------
+
+ bool StreamParameters::isSupported() const
+ {
+ return (Pa_IsFormatSupported(inputParameters_.paStreamParameters(),
+ outputParameters_.paStreamParameters(), sampleRate_) == paFormatIsSupported);
+ }
+
+ // -----------------------------------------------------------------------------------
+
+ double StreamParameters::sampleRate() const
+ {
+ return sampleRate_;
+ }
+
+ unsigned long StreamParameters::framesPerBuffer() const
+ {
+ return framesPerBuffer_;
+ }
+
+ //////
+ /// Returns all currently set flags as a binary combined
+ /// integer value (PaStreamFlags). Use isFlagSet() to
+ /// avoid dealing with the bitmasks.
+ //////
+ PaStreamFlags StreamParameters::flags() const
+ {
+ return flags_;
+ }
+
+ //////
+ /// Returns true if the specified flag is currently set
+ /// or false if it isn't.
+ //////
+ bool StreamParameters::isFlagSet(PaStreamFlags flag) const
+ {
+ return ((flags_ & flag) != 0);
+ }
+
+ // -----------------------------------------------------------------------------------
+
+ DirectionSpecificStreamParameters &StreamParameters::inputParameters()
+ {
+ return inputParameters_;
+ }
+
+ const DirectionSpecificStreamParameters &StreamParameters::inputParameters() const
+ {
+ return inputParameters_;
+ }
+
+ DirectionSpecificStreamParameters &StreamParameters::outputParameters()
+ {
+ return outputParameters_;
+ }
+
+ const DirectionSpecificStreamParameters &StreamParameters::outputParameters() const
+ {
+ return outputParameters_;
+ }
+
+ // -----------------------------------------------------------------------------------
+} // namespace portaudio
+
+
+
+
+
-#include "portaudiocpp/System.hxx"\r
-\r
-#include <cstddef>\r
-#include <cassert>\r
-\r
-#include "portaudiocpp/HostApi.hxx"\r
-#include "portaudiocpp/Device.hxx"\r
-#include "portaudiocpp/Stream.hxx"\r
-#include "portaudiocpp/Exception.hxx"\r
-#include "portaudiocpp/SystemHostApiIterator.hxx"\r
-#include "portaudiocpp/SystemDeviceIterator.hxx"\r
-\r
-namespace portaudio\r
-{\r
- // -----------------------------------------------------------------------------------\r
-\r
- // Static members:\r
- System *System::instance_ = NULL;\r
- int System::initCount_ = 0;\r
- HostApi **System::hostApis_ = NULL;\r
- Device **System::devices_ = NULL;\r
- Device *System::nullDevice_ = NULL;\r
-\r
- // -----------------------------------------------------------------------------------\r
-\r
- int System::version()\r
- {\r
- return Pa_GetVersion();\r
- }\r
-\r
- const char *System::versionText()\r
- {\r
- return Pa_GetVersionText();\r
- }\r
-\r
- void System::initialize()\r
- {\r
- ++initCount_;\r
-\r
- if (initCount_ == 1)\r
- {\r
- // Create singleton:\r
- assert(instance_ == NULL);\r
- instance_ = new System();\r
-\r
- // Initialize the PortAudio system:\r
- {\r
- PaError err = Pa_Initialize();\r
-\r
- if (err != paNoError)\r
- throw PaException(err);\r
- }\r
-\r
- // Create and populate device array:\r
- {\r
- int numDevices = instance().deviceCount();\r
-\r
- devices_ = new Device*[numDevices];\r
-\r
- for (int i = 0; i < numDevices; ++i)\r
- devices_[i] = new Device(i);\r
- }\r
-\r
- // Create and populate host api array:\r
- {\r
- int numHostApis = instance().hostApiCount();\r
-\r
- hostApis_ = new HostApi*[numHostApis];\r
-\r
- for (int i = 0; i < numHostApis; ++i)\r
- hostApis_[i] = new HostApi(i);\r
- }\r
- \r
- // Create null device:\r
- nullDevice_ = new Device(paNoDevice);\r
- }\r
- }\r
-\r
- void System::terminate()\r
- {\r
- PaError err = paNoError;\r
-\r
- if (initCount_ == 1)\r
- {\r
- // Destroy null device:\r
- delete nullDevice_;\r
-\r
- // Destroy host api array:\r
- {\r
- if (hostApis_ != NULL)\r
- {\r
- int numHostApis = instance().hostApiCount();\r
-\r
- for (int i = 0; i < numHostApis; ++i)\r
- delete hostApis_[i];\r
-\r
- delete[] hostApis_;\r
- hostApis_ = NULL;\r
- }\r
- }\r
-\r
- // Destroy device array:\r
- {\r
- if (devices_ != NULL)\r
- {\r
- int numDevices = instance().deviceCount();\r
-\r
- for (int i = 0; i < numDevices; ++i)\r
- delete devices_[i];\r
-\r
- delete[] devices_;\r
- devices_ = NULL;\r
- }\r
- }\r
-\r
- // Terminate the PortAudio system:\r
- assert(instance_ != NULL);\r
- err = Pa_Terminate();\r
-\r
- // Destroy singleton:\r
- delete instance_;\r
- instance_ = NULL;\r
- }\r
-\r
- if (initCount_ > 0)\r
- --initCount_;\r
-\r
- if (err != paNoError)\r
- throw PaException(err);\r
- }\r
-\r
-\r
- System &System::instance()\r
- {\r
- assert(exists());\r
-\r
- return *instance_;\r
- }\r
-\r
- bool System::exists()\r
- {\r
- return (instance_ != NULL);\r
- }\r
-\r
- // -----------------------------------------------------------------------------------\r
-\r
- System::HostApiIterator System::hostApisBegin()\r
- {\r
- System::HostApiIterator tmp;\r
- tmp.ptr_ = &hostApis_[0]; // begin (first element)\r
- return tmp;\r
- }\r
-\r
- System::HostApiIterator System::hostApisEnd()\r
- {\r
- int count = hostApiCount();\r
-\r
- System::HostApiIterator tmp;\r
- tmp.ptr_ = &hostApis_[count]; // end (one past last element)\r
- return tmp;\r
- }\r
-\r
- HostApi &System::defaultHostApi()\r
- {\r
- PaHostApiIndex defaultHostApi = Pa_GetDefaultHostApi();\r
-\r
- if (defaultHostApi < 0)\r
- throw PaException(defaultHostApi);\r
-\r
- return *hostApis_[defaultHostApi];\r
- }\r
-\r
- HostApi &System::hostApiByTypeId(PaHostApiTypeId type)\r
- {\r
- PaHostApiIndex index = Pa_HostApiTypeIdToHostApiIndex(type);\r
-\r
- if (index < 0)\r
- throw PaException(index);\r
-\r
- return *hostApis_[index];\r
- }\r
-\r
- HostApi &System::hostApiByIndex(PaHostApiIndex index)\r
- {\r
- if (index < 0 || index >= hostApiCount())\r
- throw PaException(paInternalError);\r
-\r
- return *hostApis_[index];\r
- }\r
-\r
- int System::hostApiCount()\r
- {\r
- PaHostApiIndex count = Pa_GetHostApiCount();\r
-\r
- if (count < 0)\r
- throw PaException(count);\r
-\r
- return count;\r
- }\r
-\r
- // -----------------------------------------------------------------------------------\r
-\r
- System::DeviceIterator System::devicesBegin()\r
- {\r
- DeviceIterator tmp;\r
- tmp.ptr_ = &devices_[0];\r
-\r
- return tmp;\r
- }\r
-\r
- System::DeviceIterator System::devicesEnd()\r
- {\r
- int count = deviceCount();\r
-\r
- DeviceIterator tmp;\r
- tmp.ptr_ = &devices_[count];\r
-\r
- return tmp;\r
- }\r
-\r
- //////\r
- /// Returns the System's default input Device, or the null Device if none \r
- /// was available.\r
- //////\r
- Device &System::defaultInputDevice()\r
- {\r
- PaDeviceIndex index = Pa_GetDefaultInputDevice();\r
- return deviceByIndex(index);\r
- }\r
-\r
- //////\r
- /// Returns the System's default output Device, or the null Device if none \r
- /// was available.\r
- //////\r
- Device &System::defaultOutputDevice()\r
- {\r
- PaDeviceIndex index = Pa_GetDefaultOutputDevice();\r
- return deviceByIndex(index);\r
- }\r
-\r
- //////\r
- /// Returns the Device for the given index.\r
- /// Will throw a paInternalError equivalent PaException if the given index \r
- /// is out of range.\r
- //////\r
- Device &System::deviceByIndex(PaDeviceIndex index)\r
- {\r
- if (index < -1 || index >= deviceCount())\r
- {\r
- throw PaException(paInternalError);\r
- }\r
-\r
- if (index == -1)\r
- return System::instance().nullDevice();\r
-\r
- return *devices_[index];\r
- }\r
-\r
- int System::deviceCount()\r
- {\r
- PaDeviceIndex count = Pa_GetDeviceCount();\r
-\r
- if (count < 0)\r
- throw PaException(count);\r
-\r
- return count;\r
- }\r
-\r
- Device &System::nullDevice()\r
- {\r
- return *nullDevice_;\r
- }\r
-\r
- // -----------------------------------------------------------------------------------\r
-\r
- void System::sleep(long msec)\r
- {\r
- Pa_Sleep(msec);\r
- }\r
-\r
- int System::sizeOfSample(PaSampleFormat format)\r
- {\r
- PaError err = Pa_GetSampleSize(format);\r
- if (err < 0)\r
- {\r
- throw PaException(err);\r
- return 0;\r
- }\r
-\r
- return err;\r
- }\r
-\r
- // -----------------------------------------------------------------------------------\r
-\r
- System::System()\r
- {\r
- // (left blank intentionally)\r
- }\r
-\r
- System::~System()\r
- {\r
- // (left blank intentionally)\r
- }\r
-\r
- // -----------------------------------------------------------------------------------\r
-\r
-} // namespace portaudio\r
-\r
+#include "portaudiocpp/System.hxx"
+
+#include <cstddef>
+#include <cassert>
+
+#include "portaudiocpp/HostApi.hxx"
+#include "portaudiocpp/Device.hxx"
+#include "portaudiocpp/Stream.hxx"
+#include "portaudiocpp/Exception.hxx"
+#include "portaudiocpp/SystemHostApiIterator.hxx"
+#include "portaudiocpp/SystemDeviceIterator.hxx"
+
+namespace portaudio
+{
+ // -----------------------------------------------------------------------------------
+
+ // Static members:
+ System *System::instance_ = NULL;
+ int System::initCount_ = 0;
+ HostApi **System::hostApis_ = NULL;
+ Device **System::devices_ = NULL;
+ Device *System::nullDevice_ = NULL;
+
+ // -----------------------------------------------------------------------------------
+
+ int System::version()
+ {
+ return Pa_GetVersion();
+ }
+
+ const char *System::versionText()
+ {
+ return Pa_GetVersionText();
+ }
+
+ void System::initialize()
+ {
+ ++initCount_;
+
+ if (initCount_ == 1)
+ {
+ // Create singleton:
+ assert(instance_ == NULL);
+ instance_ = new System();
+
+ // Initialize the PortAudio system:
+ {
+ PaError err = Pa_Initialize();
+
+ if (err != paNoError)
+ throw PaException(err);
+ }
+
+ // Create and populate device array:
+ {
+ int numDevices = instance().deviceCount();
+
+ devices_ = new Device*[numDevices];
+
+ for (int i = 0; i < numDevices; ++i)
+ devices_[i] = new Device(i);
+ }
+
+ // Create and populate host api array:
+ {
+ int numHostApis = instance().hostApiCount();
+
+ hostApis_ = new HostApi*[numHostApis];
+
+ for (int i = 0; i < numHostApis; ++i)
+ hostApis_[i] = new HostApi(i);
+ }
+
+ // Create null device:
+ nullDevice_ = new Device(paNoDevice);
+ }
+ }
+
+ void System::terminate()
+ {
+ PaError err = paNoError;
+
+ if (initCount_ == 1)
+ {
+ // Destroy null device:
+ delete nullDevice_;
+
+ // Destroy host api array:
+ {
+ if (hostApis_ != NULL)
+ {
+ int numHostApis = instance().hostApiCount();
+
+ for (int i = 0; i < numHostApis; ++i)
+ delete hostApis_[i];
+
+ delete[] hostApis_;
+ hostApis_ = NULL;
+ }
+ }
+
+ // Destroy device array:
+ {
+ if (devices_ != NULL)
+ {
+ int numDevices = instance().deviceCount();
+
+ for (int i = 0; i < numDevices; ++i)
+ delete devices_[i];
+
+ delete[] devices_;
+ devices_ = NULL;
+ }
+ }
+
+ // Terminate the PortAudio system:
+ assert(instance_ != NULL);
+ err = Pa_Terminate();
+
+ // Destroy singleton:
+ delete instance_;
+ instance_ = NULL;
+ }
+
+ if (initCount_ > 0)
+ --initCount_;
+
+ if (err != paNoError)
+ throw PaException(err);
+ }
+
+
+ System &System::instance()
+ {
+ assert(exists());
+
+ return *instance_;
+ }
+
+ bool System::exists()
+ {
+ return (instance_ != NULL);
+ }
+
+ // -----------------------------------------------------------------------------------
+
+ System::HostApiIterator System::hostApisBegin()
+ {
+ System::HostApiIterator tmp;
+ tmp.ptr_ = &hostApis_[0]; // begin (first element)
+ return tmp;
+ }
+
+ System::HostApiIterator System::hostApisEnd()
+ {
+ int count = hostApiCount();
+
+ System::HostApiIterator tmp;
+ tmp.ptr_ = &hostApis_[count]; // end (one past last element)
+ return tmp;
+ }
+
+ HostApi &System::defaultHostApi()
+ {
+ PaHostApiIndex defaultHostApi = Pa_GetDefaultHostApi();
+
+ if (defaultHostApi < 0)
+ throw PaException(defaultHostApi);
+
+ return *hostApis_[defaultHostApi];
+ }
+
+ HostApi &System::hostApiByTypeId(PaHostApiTypeId type)
+ {
+ PaHostApiIndex index = Pa_HostApiTypeIdToHostApiIndex(type);
+
+ if (index < 0)
+ throw PaException(index);
+
+ return *hostApis_[index];
+ }
+
+ HostApi &System::hostApiByIndex(PaHostApiIndex index)
+ {
+ if (index < 0 || index >= hostApiCount())
+ throw PaException(paInternalError);
+
+ return *hostApis_[index];
+ }
+
+ int System::hostApiCount()
+ {
+ PaHostApiIndex count = Pa_GetHostApiCount();
+
+ if (count < 0)
+ throw PaException(count);
+
+ return count;
+ }
+
+ // -----------------------------------------------------------------------------------
+
+ System::DeviceIterator System::devicesBegin()
+ {
+ DeviceIterator tmp;
+ tmp.ptr_ = &devices_[0];
+
+ return tmp;
+ }
+
+ System::DeviceIterator System::devicesEnd()
+ {
+ int count = deviceCount();
+
+ DeviceIterator tmp;
+ tmp.ptr_ = &devices_[count];
+
+ return tmp;
+ }
+
+ //////
+ /// Returns the System's default input Device, or the null Device if none
+ /// was available.
+ //////
+ Device &System::defaultInputDevice()
+ {
+ PaDeviceIndex index = Pa_GetDefaultInputDevice();
+ return deviceByIndex(index);
+ }
+
+ //////
+ /// Returns the System's default output Device, or the null Device if none
+ /// was available.
+ //////
+ Device &System::defaultOutputDevice()
+ {
+ PaDeviceIndex index = Pa_GetDefaultOutputDevice();
+ return deviceByIndex(index);
+ }
+
+ //////
+ /// Returns the Device for the given index.
+ /// Will throw a paInternalError equivalent PaException if the given index
+ /// is out of range.
+ //////
+ Device &System::deviceByIndex(PaDeviceIndex index)
+ {
+ if (index < -1 || index >= deviceCount())
+ {
+ throw PaException(paInternalError);
+ }
+
+ if (index == -1)
+ return System::instance().nullDevice();
+
+ return *devices_[index];
+ }
+
+ int System::deviceCount()
+ {
+ PaDeviceIndex count = Pa_GetDeviceCount();
+
+ if (count < 0)
+ throw PaException(count);
+
+ return count;
+ }
+
+ Device &System::nullDevice()
+ {
+ return *nullDevice_;
+ }
+
+ // -----------------------------------------------------------------------------------
+
+ void System::sleep(long msec)
+ {
+ Pa_Sleep(msec);
+ }
+
+ int System::sizeOfSample(PaSampleFormat format)
+ {
+ PaError err = Pa_GetSampleSize(format);
+ if (err < 0)
+ {
+ throw PaException(err);
+ return 0;
+ }
+
+ return err;
+ }
+
+ // -----------------------------------------------------------------------------------
+
+ System::System()
+ {
+ // (left blank intentionally)
+ }
+
+ System::~System()
+ {
+ // (left blank intentionally)
+ }
+
+ // -----------------------------------------------------------------------------------
+
+} // namespace portaudio
+
-#include "portaudiocpp/SystemDeviceIterator.hxx"\r
-\r
-namespace portaudio\r
-{\r
- // -----------------------------------------------------------------------------------\r
-\r
- Device &System::DeviceIterator::operator*() const\r
- {\r
- return **ptr_;\r
- }\r
-\r
- Device *System::DeviceIterator::operator->() const\r
- {\r
- return &**this;\r
- }\r
-\r
- // -----------------------------------------------------------------------------------\r
-\r
- System::DeviceIterator &System::DeviceIterator::operator++()\r
- {\r
- ++ptr_;\r
- return *this;\r
- }\r
-\r
- System::DeviceIterator System::DeviceIterator::operator++(int)\r
- {\r
- System::DeviceIterator prev = *this;\r
- ++*this;\r
- return prev;\r
- }\r
-\r
- System::DeviceIterator &System::DeviceIterator::operator--()\r
- {\r
- --ptr_;\r
- return *this;\r
- }\r
-\r
- System::DeviceIterator System::DeviceIterator::operator--(int)\r
- {\r
- System::DeviceIterator prev = *this;\r
- --*this;\r
- return prev;\r
- }\r
-\r
- // -----------------------------------------------------------------------------------\r
-\r
- bool System::DeviceIterator::operator==(const System::DeviceIterator &rhs) const\r
- {\r
- return (ptr_ == rhs.ptr_);\r
- }\r
-\r
- bool System::DeviceIterator::operator!=(const System::DeviceIterator &rhs) const\r
- {\r
- return !(*this == rhs);\r
- }\r
-\r
- // -----------------------------------------------------------------------------------\r
-} // namespace portaudio\r
-\r
-\r
+#include "portaudiocpp/SystemDeviceIterator.hxx"
+
+namespace portaudio
+{
+ // -----------------------------------------------------------------------------------
+
+ Device &System::DeviceIterator::operator*() const
+ {
+ return **ptr_;
+ }
+
+ Device *System::DeviceIterator::operator->() const
+ {
+ return &**this;
+ }
+
+ // -----------------------------------------------------------------------------------
+
+ System::DeviceIterator &System::DeviceIterator::operator++()
+ {
+ ++ptr_;
+ return *this;
+ }
+
+ System::DeviceIterator System::DeviceIterator::operator++(int)
+ {
+ System::DeviceIterator prev = *this;
+ ++*this;
+ return prev;
+ }
+
+ System::DeviceIterator &System::DeviceIterator::operator--()
+ {
+ --ptr_;
+ return *this;
+ }
+
+ System::DeviceIterator System::DeviceIterator::operator--(int)
+ {
+ System::DeviceIterator prev = *this;
+ --*this;
+ return prev;
+ }
+
+ // -----------------------------------------------------------------------------------
+
+ bool System::DeviceIterator::operator==(const System::DeviceIterator &rhs) const
+ {
+ return (ptr_ == rhs.ptr_);
+ }
+
+ bool System::DeviceIterator::operator!=(const System::DeviceIterator &rhs) const
+ {
+ return !(*this == rhs);
+ }
+
+ // -----------------------------------------------------------------------------------
+} // namespace portaudio
+
+
-#include "portaudiocpp/SystemHostApiIterator.hxx"\r
-\r
-namespace portaudio\r
-{\r
- // -----------------------------------------------------------------------------------\r
-\r
- HostApi &System::HostApiIterator::operator*() const\r
- {\r
- return **ptr_;\r
- }\r
-\r
- HostApi *System::HostApiIterator::operator->() const\r
- {\r
- return &**this;\r
- }\r
-\r
- // -----------------------------------------------------------------------------------\r
-\r
- System::HostApiIterator &System::HostApiIterator::operator++()\r
- {\r
- ++ptr_;\r
- return *this;\r
- }\r
-\r
- System::HostApiIterator System::HostApiIterator::operator++(int)\r
- {\r
- System::HostApiIterator prev = *this;\r
- ++*this;\r
- return prev;\r
- }\r
-\r
- System::HostApiIterator &System::HostApiIterator::operator--()\r
- {\r
- --ptr_;\r
- return *this;\r
- }\r
-\r
- System::HostApiIterator System::HostApiIterator::operator--(int)\r
- {\r
- System::HostApiIterator prev = *this;\r
- --*this;\r
- return prev;\r
- }\r
-\r
- // -----------------------------------------------------------------------------------\r
-\r
- bool System::HostApiIterator::operator==(const System::HostApiIterator &rhs) const\r
- {\r
- return (ptr_ == rhs.ptr_);\r
- }\r
-\r
- bool System::HostApiIterator::operator!=(const System::HostApiIterator &rhs) const\r
- {\r
- return !(*this == rhs);\r
- }\r
-\r
- // -----------------------------------------------------------------------------------\r
-} // namespace portaudio\r
-\r
+#include "portaudiocpp/SystemHostApiIterator.hxx"
+
+namespace portaudio
+{
+ // -----------------------------------------------------------------------------------
+
+ HostApi &System::HostApiIterator::operator*() const
+ {
+ return **ptr_;
+ }
+
+ HostApi *System::HostApiIterator::operator->() const
+ {
+ return &**this;
+ }
+
+ // -----------------------------------------------------------------------------------
+
+ System::HostApiIterator &System::HostApiIterator::operator++()
+ {
+ ++ptr_;
+ return *this;
+ }
+
+ System::HostApiIterator System::HostApiIterator::operator++(int)
+ {
+ System::HostApiIterator prev = *this;
+ ++*this;
+ return prev;
+ }
+
+ System::HostApiIterator &System::HostApiIterator::operator--()
+ {
+ --ptr_;
+ return *this;
+ }
+
+ System::HostApiIterator System::HostApiIterator::operator--(int)
+ {
+ System::HostApiIterator prev = *this;
+ --*this;
+ return prev;
+ }
+
+ // -----------------------------------------------------------------------------------
+
+ bool System::HostApiIterator::operator==(const System::HostApiIterator &rhs) const
+ {
+ return (ptr_ == rhs.ptr_);
+ }
+
+ bool System::HostApiIterator::operator!=(const System::HostApiIterator &rhs) const
+ {
+ return !(*this == rhs);
+ }
+
+ // -----------------------------------------------------------------------------------
+} // namespace portaudio
+
-\r
-Microsoft Visual Studio Solution File, Format Version 11.00\r
-# Visual Studio 2010\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PortAudioJNI", "PortAudioJNI.vcxproj", "{4024D885-39B0-4C8A-B3E7-BAB4BA08DFBB}"\r
-EndProject\r
-Global\r
- GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
- Debug|Win32 = Debug|Win32\r
- Debug|x64 = Debug|x64\r
- Release|Win32 = Release|Win32\r
- Release|x64 = Release|x64\r
- EndGlobalSection\r
- GlobalSection(ProjectConfigurationPlatforms) = postSolution\r
- {4024D885-39B0-4C8A-B3E7-BAB4BA08DFBB}.Debug|Win32.ActiveCfg = Debug|Win32\r
- {4024D885-39B0-4C8A-B3E7-BAB4BA08DFBB}.Debug|Win32.Build.0 = Debug|Win32\r
- {4024D885-39B0-4C8A-B3E7-BAB4BA08DFBB}.Debug|x64.ActiveCfg = Debug|x64\r
- {4024D885-39B0-4C8A-B3E7-BAB4BA08DFBB}.Debug|x64.Build.0 = Debug|x64\r
- {4024D885-39B0-4C8A-B3E7-BAB4BA08DFBB}.Release|Win32.ActiveCfg = Release|Win32\r
- {4024D885-39B0-4C8A-B3E7-BAB4BA08DFBB}.Release|Win32.Build.0 = Release|Win32\r
- {4024D885-39B0-4C8A-B3E7-BAB4BA08DFBB}.Release|x64.ActiveCfg = Release|x64\r
- {4024D885-39B0-4C8A-B3E7-BAB4BA08DFBB}.Release|x64.Build.0 = Release|x64\r
- EndGlobalSection\r
- GlobalSection(SolutionProperties) = preSolution\r
- HideSolutionNode = FALSE\r
- EndGlobalSection\r
-EndGlobal\r
+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PortAudioJNI", "PortAudioJNI.vcxproj", "{4024D885-39B0-4C8A-B3E7-BAB4BA08DFBB}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Debug|x64 = Debug|x64
+ Release|Win32 = Release|Win32
+ Release|x64 = Release|x64
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {4024D885-39B0-4C8A-B3E7-BAB4BA08DFBB}.Debug|Win32.ActiveCfg = Debug|Win32
+ {4024D885-39B0-4C8A-B3E7-BAB4BA08DFBB}.Debug|Win32.Build.0 = Debug|Win32
+ {4024D885-39B0-4C8A-B3E7-BAB4BA08DFBB}.Debug|x64.ActiveCfg = Debug|x64
+ {4024D885-39B0-4C8A-B3E7-BAB4BA08DFBB}.Debug|x64.Build.0 = Debug|x64
+ {4024D885-39B0-4C8A-B3E7-BAB4BA08DFBB}.Release|Win32.ActiveCfg = Release|Win32
+ {4024D885-39B0-4C8A-B3E7-BAB4BA08DFBB}.Release|Win32.Build.0 = Release|Win32
+ {4024D885-39B0-4C8A-B3E7-BAB4BA08DFBB}.Release|x64.ActiveCfg = Release|x64
+ {4024D885-39B0-4C8A-B3E7-BAB4BA08DFBB}.Release|x64.Build.0 = Release|x64
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
-<?xml version="1.0" encoding="Windows-1252"?>\r
-<VisualStudioProject\r
- ProjectType="Visual C++"\r
- Version="9.00"\r
- Name="PortAudioJNI"\r
- ProjectGUID="{4024D885-39B0-4C8A-B3E7-BAB4BA08DFBB}"\r
- RootNamespace="PortAudioJNI"\r
- Keyword="Win32Proj"\r
- TargetFrameworkVersion="196613"\r
- >\r
- <Platforms>\r
- <Platform\r
- Name="Win32"\r
- />\r
- </Platforms>\r
- <ToolFiles>\r
- </ToolFiles>\r
- <Configurations>\r
- <Configuration\r
- Name="Debug|Win32"\r
- OutputDirectory="..\..\..\..\jportaudio"\r
- IntermediateDirectory="$(ConfigurationName)"\r
- ConfigurationType="2"\r
- CharacterSet="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- Optimization="0"\r
- AdditionalIncludeDirectories="C:\glassfish3\jdk\include;C:\glassfish3\jdk\include\win32"\r
- PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;PORTAUDIOJNI_EXPORTS"\r
- MinimalRebuild="true"\r
- BasicRuntimeChecks="3"\r
- RuntimeLibrary="3"\r
- UsePrecompiledHeader="0"\r
- WarningLevel="3"\r
- DebugInformationFormat="4"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLinkerTool"\r
- LinkIncremental="2"\r
- GenerateDebugInformation="true"\r
- SubSystem="2"\r
- TargetMachine="1"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCManifestTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCAppVerifierTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="Release|Win32"\r
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"\r
- IntermediateDirectory="$(ConfigurationName)"\r
- ConfigurationType="2"\r
- CharacterSet="1"\r
- WholeProgramOptimization="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- Optimization="2"\r
- EnableIntrinsicFunctions="true"\r
- PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;PORTAUDIOJNI_EXPORTS"\r
- RuntimeLibrary="2"\r
- EnableFunctionLevelLinking="true"\r
- UsePrecompiledHeader="0"\r
- WarningLevel="3"\r
- DebugInformationFormat="3"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLinkerTool"\r
- LinkIncremental="1"\r
- GenerateDebugInformation="true"\r
- SubSystem="2"\r
- OptimizeReferences="2"\r
- EnableCOMDATFolding="2"\r
- TargetMachine="1"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCManifestTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCAppVerifierTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- </Configurations>\r
- <References>\r
- </References>\r
- <Files>\r
- <Filter\r
- Name="Source Files"\r
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"\r
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"\r
- >\r
- <File\r
- RelativePath="..\..\..\src\com_portaudio_PortAudio.c"\r
- >\r
- </File>\r
- </Filter>\r
- <Filter\r
- Name="Header Files"\r
- Filter="h;hpp;hxx;hm;inl;inc;xsd"\r
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"\r
- >\r
- <File\r
- RelativePath="..\..\..\src\com_portaudio_PortAudio.h"\r
- >\r
- </File>\r
- </Filter>\r
- <Filter\r
- Name="Resource Files"\r
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"\r
- UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"\r
- >\r
- </Filter>\r
- </Files>\r
- <Globals>\r
- </Globals>\r
-</VisualStudioProject>\r
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="PortAudioJNI"
+ ProjectGUID="{4024D885-39B0-4C8A-B3E7-BAB4BA08DFBB}"
+ RootNamespace="PortAudioJNI"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="196613"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="..\..\..\..\jportaudio"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="2"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="C:\glassfish3\jdk\include;C:\glassfish3\jdk\include\win32"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;PORTAUDIOJNI_EXPORTS"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ SubSystem="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="2"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ EnableIntrinsicFunctions="true"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;PORTAUDIOJNI_EXPORTS"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="2"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\..\src\com_portaudio_PortAudio.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\..\..\src\com_portaudio_PortAudio.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
- <ItemGroup Label="ProjectConfigurations">\r
- <ProjectConfiguration Include="Debug|Win32">\r
- <Configuration>Debug</Configuration>\r
- <Platform>Win32</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Debug|x64">\r
- <Configuration>Debug</Configuration>\r
- <Platform>x64</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Release|Win32">\r
- <Configuration>Release</Configuration>\r
- <Platform>Win32</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Release|x64">\r
- <Configuration>Release</Configuration>\r
- <Platform>x64</Platform>\r
- </ProjectConfiguration>\r
- </ItemGroup>\r
- <PropertyGroup Label="Globals">\r
- <ProjectGuid>{4024D885-39B0-4C8A-B3E7-BAB4BA08DFBB}</ProjectGuid>\r
- <RootNamespace>PortAudioJNI</RootNamespace>\r
- <Keyword>Win32Proj</Keyword>\r
- </PropertyGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">\r
- <ConfigurationType>DynamicLibrary</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- <WholeProgramOptimization>true</WholeProgramOptimization>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">\r
- <ConfigurationType>DynamicLibrary</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- <WholeProgramOptimization>true</WholeProgramOptimization>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">\r
- <ConfigurationType>DynamicLibrary</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">\r
- <ConfigurationType>DynamicLibrary</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- </PropertyGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
- <ImportGroup Label="ExtensionSettings">\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
- </ImportGroup>\r
- <PropertyGroup Label="UserMacros" />\r
- <PropertyGroup>\r
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\..\jportaudio\</OutDir>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\..\..\jportaudio\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Configuration)\</IntDir>\r
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>\r
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\..\jportaudio\</OutDir>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\..\jportaudio\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Configuration)\</IntDir>\r
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>\r
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>\r
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">jportaudio_x64</TargetName>\r
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">jportaudio_x86</TargetName>\r
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">jportaudio_x86</TargetName>\r
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">jportaudio_x64</TargetName>\r
- </PropertyGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
- <ClCompile>\r
- <Optimization>Disabled</Optimization>\r
- <AdditionalIncludeDirectories>..\..\..\..\..\..\include;%JAVA_HOME%\include;%JAVA_HOME%\include\win32</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;PORTAUDIOJNI_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- <MinimalRebuild>true</MinimalRebuild>\r
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
- <PrecompiledHeader>\r
- </PrecompiledHeader>\r
- <WarningLevel>Level3</WarningLevel>\r
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>\r
- </ClCompile>\r
- <Link>\r
- <GenerateDebugInformation>true</GenerateDebugInformation>\r
- <SubSystem>Windows</SubSystem>\r
- <TargetMachine>MachineX86</TargetMachine>\r
- </Link>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
- <ClCompile>\r
- <Optimization>Disabled</Optimization>\r
- <AdditionalIncludeDirectories>..\..\..\..\..\..\include;%JAVA_HOME%\include;%JAVA_HOME%\include\win32</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;PORTAUDIOJNI_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
- <PrecompiledHeader>\r
- </PrecompiledHeader>\r
- <WarningLevel>Level3</WarningLevel>\r
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
- </ClCompile>\r
- <Link>\r
- <GenerateDebugInformation>true</GenerateDebugInformation>\r
- <SubSystem>Windows</SubSystem>\r
- </Link>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
- <ClCompile>\r
- <Optimization>MaxSpeed</Optimization>\r
- <IntrinsicFunctions>true</IntrinsicFunctions>\r
- <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;PORTAUDIOJNI_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\r
- <FunctionLevelLinking>true</FunctionLevelLinking>\r
- <PrecompiledHeader>\r
- </PrecompiledHeader>\r
- <WarningLevel>Level3</WarningLevel>\r
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
- <AdditionalIncludeDirectories>..\..\..\..\..\..\include;%JAVA_HOME%\include;%JAVA_HOME%\include\win32</AdditionalIncludeDirectories>\r
- </ClCompile>\r
- <Link>\r
- <GenerateDebugInformation>true</GenerateDebugInformation>\r
- <SubSystem>Windows</SubSystem>\r
- <OptimizeReferences>true</OptimizeReferences>\r
- <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
- <TargetMachine>MachineX86</TargetMachine>\r
- </Link>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
- <ClCompile>\r
- <Optimization>MaxSpeed</Optimization>\r
- <IntrinsicFunctions>true</IntrinsicFunctions>\r
- <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;PORTAUDIOJNI_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\r
- <FunctionLevelLinking>true</FunctionLevelLinking>\r
- <PrecompiledHeader>\r
- </PrecompiledHeader>\r
- <WarningLevel>Level3</WarningLevel>\r
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
- <AdditionalIncludeDirectories>..\..\..\..\..\..\include;%JAVA_HOME%\include;%JAVA_HOME%\include\win32</AdditionalIncludeDirectories>\r
- </ClCompile>\r
- <Link>\r
- <GenerateDebugInformation>true</GenerateDebugInformation>\r
- <SubSystem>Windows</SubSystem>\r
- <OptimizeReferences>true</OptimizeReferences>\r
- <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
- </Link>\r
- </ItemDefinitionGroup>\r
- <ItemGroup>\r
- <ClCompile Include="..\..\..\src\com_portaudio_BlockingStream.c" />\r
- <ClCompile Include="..\..\..\src\com_portaudio_PortAudio.c" />\r
- <ClCompile Include="..\..\..\src\jpa_tools.c" />\r
- </ItemGroup>\r
- <ItemGroup>\r
- <ClInclude Include="..\..\..\src\com_portaudio_BlockingStream.h" />\r
- <ClInclude Include="..\..\..\src\com_portaudio_PortAudio.h" />\r
- <ClInclude Include="..\..\..\src\jpa_tools.h" />\r
- </ItemGroup>\r
- <ItemGroup>\r
- <Library Include="..\..\..\..\jportaudio\portaudio_x64.lib" />\r
- <Library Include="..\..\..\..\jportaudio\portaudio_x86.lib" />\r
- </ItemGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
- <ImportGroup Label="ExtensionTargets">\r
- </ImportGroup>\r
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{4024D885-39B0-4C8A-B3E7-BAB4BA08DFBB}</ProjectGuid>
+ <RootNamespace>PortAudioJNI</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\..\jportaudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\..\..\jportaudio\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\..\jportaudio\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\..\jportaudio\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">jportaudio_x64</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">jportaudio_x86</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">jportaudio_x86</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">jportaudio_x64</TargetName>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\..\..\include;%JAVA_HOME%\include;%JAVA_HOME%\include\win32</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;PORTAUDIOJNI_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\..\..\include;%JAVA_HOME%\include;%JAVA_HOME%\include\win32</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;PORTAUDIOJNI_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;PORTAUDIOJNI_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <AdditionalIncludeDirectories>..\..\..\..\..\..\include;%JAVA_HOME%\include;%JAVA_HOME%\include\win32</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;PORTAUDIOJNI_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <AdditionalIncludeDirectories>..\..\..\..\..\..\include;%JAVA_HOME%\include;%JAVA_HOME%\include\win32</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\src\com_portaudio_BlockingStream.c" />
+ <ClCompile Include="..\..\..\src\com_portaudio_PortAudio.c" />
+ <ClCompile Include="..\..\..\src\jpa_tools.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\..\src\com_portaudio_BlockingStream.h" />
+ <ClInclude Include="..\..\..\src\com_portaudio_PortAudio.h" />
+ <ClInclude Include="..\..\..\src\jpa_tools.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <Library Include="..\..\..\..\jportaudio\portaudio_x64.lib" />
+ <Library Include="..\..\..\..\jportaudio\portaudio_x86.lib" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
</Project>
\ No newline at end of file
-/** \r
-@page java_binding JPortAudio Java Binding\r
-@ingroup jportaudio\r
-\r
-<i>Note: this page has not been reviewed, and may contain errors.</i>\r
-\r
-@section java_draft DRAFT - IN PROGRESS\r
-\r
-9/4/12 JPortAudio is very new and should be considered an "alpha" release.\r
-The building of JPortAudio will eventually be integrated into the Makefile as an optional build.\r
-\r
-Currently JPortAudio is only supported for Windows and Macintosh. Please contact us if you want to help with porting Linux.\r
-\r
-For reference documentation of the JPortAudio API see: com.portaudio.PortAudio\r
-\r
-For an example see: PlaySine.java\r
-\r
-@section java_comp_windows Building JPortAudio on Windows\r
-\r
-Build the Java code using the Eclipse project in "jportaudio". Export as "jportaudio.jar".\r
-\r
-If you modify the JNI API then you will need to regenerate the JNI .h files using:\r
-\r
-@code\r
-cd bindings/java/scripts\r
-make_header.bat\r
-@endcode\r
-\r
-Build the JNI DLL using the Visual Studio 2010 solution in "java/c/build/vs2010/PortAudioJNI".\r
-\r
-@section java_use_windows Using JPortAudio on Windows\r
-\r
-Put the "jportaudio.jar" in the classpath for your application.\r
-Place the following libraries where they can be found, typically in the same folder as your application.\r
-\r
-- portaudio_x86.dll\r
-- portaudio_x64.dll\r
-- jportaudio_x86.dll\r
-- jportaudio_x64.dll\r
-\r
-@section java_comp_max Building JPortAudio on Mac\r
-\r
-These are notes from building JPortAudio on a Mac with 10.6.8 and XCode 4.\r
-\r
-I created a target of type 'C' library.\r
-\r
-I added the regular PortAudio frameworks plus the JavaVM framework.\r
-\r
-I modified com_portaudio_PortAudio.h and com_portaudio_BlockingStream.h so that jni.h could found.\r
-\r
-@code\r
-#if defined(__APPLE__)\r
-#include <JavaVM/jni.h>\r
-#else\r
-#include <jni.h>\r
-#endif\r
-@endcode\r
-\r
-This is bad because those header files are autogenerated and will be overwritten.\r
-We need a better solution for this.\r
-\r
-I had trouble finding the "libjportaudio.jnilib". So I added a Build Phase that copied the library to "/Users/phil/Library/Java/Extensions".\r
-\r
-On the Mac we can create a universal library for both 32 and 64-bit JVMs. So in the JAR file I will open "jportaudio" on Apple. ON WIndows I will continue to open "jportaudio_x64" and "jportaudio_x86".\r
-*/\r
+/**
+@page java_binding JPortAudio Java Binding
+@ingroup jportaudio
+
+<i>Note: this page has not been reviewed, and may contain errors.</i>
+
+@section java_draft DRAFT - IN PROGRESS
+
+9/4/12 JPortAudio is very new and should be considered an "alpha" release.
+The building of JPortAudio will eventually be integrated into the Makefile as an optional build.
+
+Currently JPortAudio is only supported for Windows and Macintosh. Please contact us if you want to help with porting Linux.
+
+For reference documentation of the JPortAudio API see: com.portaudio.PortAudio
+
+For an example see: PlaySine.java
+
+@section java_comp_windows Building JPortAudio on Windows
+
+Build the Java code using the Eclipse project in "jportaudio". Export as "jportaudio.jar".
+
+If you modify the JNI API then you will need to regenerate the JNI .h files using:
+
+@code
+cd bindings/java/scripts
+make_header.bat
+@endcode
+
+Build the JNI DLL using the Visual Studio 2010 solution in "java/c/build/vs2010/PortAudioJNI".
+
+@section java_use_windows Using JPortAudio on Windows
+
+Put the "jportaudio.jar" in the classpath for your application.
+Place the following libraries where they can be found, typically in the same folder as your application.
+
+- portaudio_x86.dll
+- portaudio_x64.dll
+- jportaudio_x86.dll
+- jportaudio_x64.dll
+
+@section java_comp_max Building JPortAudio on Mac
+
+These are notes from building JPortAudio on a Mac with 10.6.8 and XCode 4.
+
+I created a target of type 'C' library.
+
+I added the regular PortAudio frameworks plus the JavaVM framework.
+
+I modified com_portaudio_PortAudio.h and com_portaudio_BlockingStream.h so that jni.h could found.
+
+@code
+#if defined(__APPLE__)
+#include <JavaVM/jni.h>
+#else
+#include <jni.h>
+#endif
+@endcode
+
+This is bad because those header files are autogenerated and will be overwritten.
+We need a better solution for this.
+
+I had trouble finding the "libjportaudio.jnilib". So I added a Build Phase that copied the library to "/Users/phil/Library/Java/Extensions".
+
+On the Mac we can create a universal library for both 32 and 64-bit JVMs. So in the JAR file I will open "jportaudio" on Apple. ON WIndows I will continue to open "jportaudio_x64" and "jportaudio_x86".
+*/
-<?xml version="1.0" encoding="UTF-8"?>\r
-<classpath>\r
- <classpathentry kind="src" path="src"/>\r
- <classpathentry kind="src" path="jtests"/>\r
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>\r
- <classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/3"/>\r
- <classpathentry kind="output" path="bin"/>\r
-</classpath>\r
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="src" path="jtests"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/3"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
-<?xml version="1.0" encoding="UTF-8"?>\r
-<projectDescription>\r
- <name>JPortAudio</name>\r
- <comment></comment>\r
- <projects>\r
- </projects>\r
- <buildSpec>\r
- <buildCommand>\r
- <name>org.eclipse.jdt.core.javabuilder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
- </buildSpec>\r
- <natures>\r
- <nature>org.eclipse.jdt.core.javanature</nature>\r
- </natures>\r
-</projectDescription>\r
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>JPortAudio</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
-REM Generate the JNI header file from the Java code for JPortAudio\r
-REM by Phil Burk\r
-\r
-javah -classpath ../jportaudio/bin -d ../c/src com.portaudio.PortAudio com.portaudio.BlockingStream\r
+REM Generate the JNI header file from the Java code for JPortAudio
+REM by Phil Burk
+
+javah -classpath ../jportaudio/bin -d ../c/src com.portaudio.PortAudio com.portaudio.BlockingStream
-# Microsoft Developer Studio Project File - Name="portaudio" - Package Owner=<4>\r
-# Microsoft Developer Studio Generated Build File, Format Version 6.00\r
-# ** DO NOT EDIT **\r
-\r
-# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102\r
-\r
-CFG=portaudio - Win32 Release\r
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,\r
-!MESSAGE use the Export Makefile command and run\r
-!MESSAGE \r
-!MESSAGE NMAKE /f "portaudio.mak".\r
-!MESSAGE \r
-!MESSAGE You can specify a configuration when running NMAKE\r
-!MESSAGE by defining the macro CFG on the command line. For example:\r
-!MESSAGE \r
-!MESSAGE NMAKE /f "portaudio.mak" CFG="portaudio - Win32 Release"\r
-!MESSAGE \r
-!MESSAGE Possible choices for configuration are:\r
-!MESSAGE \r
-!MESSAGE "portaudio - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")\r
-!MESSAGE "portaudio - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")\r
-!MESSAGE \r
-\r
-# Begin Project\r
-# PROP AllowPerConfigDependencies 0\r
-# PROP Scc_ProjName ""\r
-# PROP Scc_LocalPath ""\r
-CPP=cl.exe\r
-MTL=midl.exe\r
-RSC=rc.exe\r
-\r
-!IF "$(CFG)" == "portaudio - Win32 Release"\r
-\r
-# PROP BASE Use_MFC 0\r
-# PROP BASE Use_Debug_Libraries 0\r
-# PROP BASE Output_Dir "Release_x86"\r
-# PROP BASE Intermediate_Dir "Release_x86"\r
-# PROP BASE Target_Dir ""\r
-# PROP Use_MFC 0\r
-# PROP Use_Debug_Libraries 0\r
-# PROP Output_Dir "Release_x86"\r
-# PROP Intermediate_Dir "Release_x86"\r
-# PROP Ignore_Export_Lib 0\r
-# PROP Target_Dir ""\r
-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /FD /c\r
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\src\common" /I "..\..\include" /I ".\\" /I "..\..\src\os\win" /D "WIN32" /D "NDEBUG" /D "_USRDLL" /D "PA_ENABLE_DEBUG_OUTPUT" /D "_CRT_SECURE_NO_DEPRECATE" /D "PAWIN_USE_WDMKS_DEVICE_INFO" /FD /c\r
-# SUBTRACT CPP /YX /Yc /Yu\r
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32\r
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32\r
-# ADD BASE RSC /l 0x409 /d "NDEBUG"\r
-# ADD RSC /l 0x409 /d "NDEBUG"\r
-BSC32=bscmake.exe\r
-# ADD BASE BSC32 /nologo\r
-# ADD BSC32 /nologo\r
-LINK32=link.exe\r
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386\r
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib setupapi.lib /nologo /dll /machine:I386 /out:"./Release_x86/portaudio_x86.dll"\r
-\r
-!ELSEIF "$(CFG)" == "portaudio - Win32 Debug"\r
-\r
-# PROP BASE Use_MFC 0\r
-# PROP BASE Use_Debug_Libraries 1\r
-# PROP BASE Output_Dir "Debug_x86"\r
-# PROP BASE Intermediate_Dir "Debug_x86"\r
-# PROP BASE Target_Dir ""\r
-# PROP Use_MFC 0\r
-# PROP Use_Debug_Libraries 1\r
-# PROP Output_Dir "Debug_x86"\r
-# PROP Intermediate_Dir "Debug_x86"\r
-# PROP Ignore_Export_Lib 0\r
-# PROP Target_Dir ""\r
-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /FD /GZ /c\r
-# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\..\src\common" /I "..\..\include" /I ".\\" /I "..\..\src\os\win" /D "WIN32" /D "_DEBUG" /D "_USRDLL" /D "PA_ENABLE_DEBUG_OUTPUT" /D "_CRT_SECURE_NO_DEPRECATE" /D "PAWIN_USE_WDMKS_DEVICE_INFO" /FD /GZ /c\r
-# SUBTRACT CPP /YX /Yc /Yu\r
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32\r
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32\r
-# ADD BASE RSC /l 0x409 /d "_DEBUG"\r
-# ADD RSC /l 0x409 /d "_DEBUG"\r
-BSC32=bscmake.exe\r
-# ADD BASE BSC32 /nologo\r
-# ADD BSC32 /nologo\r
-LINK32=link.exe\r
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept\r
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib setupapi.lib /nologo /dll /debug /machine:I386 /out:"./Debug_x86/portaudio_x86.dll" /pdbtype:sept\r
-\r
-!ENDIF \r
-\r
-# Begin Target\r
-\r
-# Name "portaudio - Win32 Release"\r
-# Name "portaudio - Win32 Debug"\r
-# Begin Group "Source Files"\r
-\r
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"\r
-# Begin Group "common"\r
-\r
-# PROP Default_Filter ""\r
-# Begin Source File\r
-\r
-SOURCE=..\..\src\common\pa_allocation.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\src\common\pa_converters.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\src\common\pa_cpuload.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\src\common\pa_debugprint.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\src\common\pa_dither.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\src\common\pa_front.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\src\common\pa_process.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\src\common\pa_ringbuffer.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\src\hostapi\skeleton\pa_hostapi_skeleton.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\src\common\pa_stream.c\r
-# End Source File\r
-# End Group\r
-# Begin Group "hostapi"\r
-\r
-# PROP Default_Filter ""\r
-# Begin Group "ASIO"\r
-\r
-# PROP Default_Filter ""\r
-# Begin Group "ASIOSDK"\r
-\r
-# PROP Default_Filter ""\r
-# Begin Source File\r
-\r
-SOURCE=..\..\src\hostapi\asio\ASIOSDK\common\asio.cpp\r
-# ADD CPP /I "..\..\src\hostapi\asio\ASIOSDK\host" /I "..\..\src\hostapi\asio\ASIOSDK\host\pc" /I "..\..\src\hostapi\asio\ASIOSDK\common"\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\src\hostapi\asio\ASIOSDK\host\ASIOConvertSamples.cpp\r
-# ADD CPP /I "..\..\src\hostapi\asio\ASIOSDK\host" /I "..\..\src\hostapi\asio\ASIOSDK\host\pc" /I "..\..\src\hostapi\asio\ASIOSDK\common"\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\src\hostapi\asio\ASIOSDK\host\asiodrivers.cpp\r
-# ADD CPP /I "..\..\src\hostapi\asio\ASIOSDK\host" /I "..\..\src\hostapi\asio\ASIOSDK\host\pc" /I "..\..\src\hostapi\asio\ASIOSDK\common"\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\src\hostapi\asio\ASIOSDK\host\pc\asiolist.cpp\r
-# ADD CPP /I "..\..\src\hostapi\asio\ASIOSDK\host" /I "..\..\src\hostapi\asio\ASIOSDK\host\pc" /I "..\..\src\hostapi\asio\ASIOSDK\common"\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\src\hostapi\asio\ASIOSDK\common\combase.cpp\r
-# ADD CPP /I "..\..\src\hostapi\asio\ASIOSDK\host" /I "..\..\src\hostapi\asio\ASIOSDK\host\pc" /I "..\..\src\hostapi\asio\ASIOSDK\common"\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\src\hostapi\asio\ASIOSDK\common\debugmessage.cpp\r
-# ADD CPP /I "..\..\src\hostapi\asio\ASIOSDK\host" /I "..\..\src\hostapi\asio\ASIOSDK\host\pc" /I "..\..\src\hostapi\asio\ASIOSDK\common"\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\src\hostapi\asio\ASIOSDK\common\register.cpp\r
-# ADD CPP /I "..\..\src\hostapi\asio\ASIOSDK\host" /I "..\..\src\hostapi\asio\ASIOSDK\host\pc" /I "..\..\src\hostapi\asio\ASIOSDK\common"\r
-# End Source File\r
-# End Group\r
-# Begin Source File\r
-\r
-SOURCE=..\..\src\hostapi\asio\pa_asio.cpp\r
-# ADD CPP /I "..\..\src\hostapi\asio\ASIOSDK\host" /I "..\..\src\hostapi\asio\ASIOSDK\host\pc" /I "..\..\src\hostapi\asio\ASIOSDK\common"\r
-# End Source File\r
-# End Group\r
-# Begin Group "dsound"\r
-\r
-# PROP Default_Filter ""\r
-# Begin Source File\r
-\r
-SOURCE=..\..\src\hostapi\dsound\pa_win_ds.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\src\hostapi\dsound\pa_win_ds_dynlink.c\r
-# End Source File\r
-# End Group\r
-# Begin Group "wmme"\r
-\r
-# PROP Default_Filter ""\r
-# Begin Source File\r
-\r
-SOURCE=..\..\src\hostapi\wmme\pa_win_wmme.c\r
-# End Source File\r
-# End Group\r
-# Begin Group "wasapi"\r
-\r
-# PROP Default_Filter ""\r
-# Begin Source File\r
-\r
-SOURCE=..\..\src\hostapi\wasapi\pa_win_wasapi.cpp\r
-# End Source File\r
-# End Group\r
-# Begin Group "wdm-ks"\r
-\r
-# PROP Default_Filter ""\r
-# Begin Source File\r
-\r
-SOURCE=..\..\src\hostapi\wdmks\pa_win_wdmks.c\r
-# End Source File\r
-# End Group\r
-# End Group\r
-# Begin Group "os"\r
-\r
-# PROP Default_Filter ""\r
-# Begin Group "win"\r
-\r
-# PROP Default_Filter ""\r
-# Begin Source File\r
-\r
-SOURCE=..\..\src\os\win\pa_win_hostapis.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\src\os\win\pa_win_util.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\src\os\win\pa_win_waveformat.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\src\os\win\pa_win_wdmks_utils.c\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=..\..\src\os\win\pa_x86_plain_converters.c\r
-# End Source File\r
-# End Group\r
-# End Group\r
-# End Group\r
-# Begin Group "Header Files"\r
-\r
-# PROP Default_Filter "h;hpp;hxx;hm;inl"\r
-# End Group\r
-# Begin Group "Resource Files"\r
-\r
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"\r
-# Begin Source File\r
-\r
-SOURCE=.\portaudio.def\r
-# End Source File\r
-# End Group\r
-# End Target\r
-# End Project\r
+# Microsoft Developer Studio Project File - Name="portaudio" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
+
+CFG=portaudio - Win32 Release
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "portaudio.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "portaudio.mak" CFG="portaudio - Win32 Release"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "portaudio - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "portaudio - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+MTL=midl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "portaudio - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release_x86"
+# PROP BASE Intermediate_Dir "Release_x86"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release_x86"
+# PROP Intermediate_Dir "Release_x86"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\src\common" /I "..\..\include" /I ".\\" /I "..\..\src\os\win" /D "WIN32" /D "NDEBUG" /D "_USRDLL" /D "PA_ENABLE_DEBUG_OUTPUT" /D "_CRT_SECURE_NO_DEPRECATE" /D "PAWIN_USE_WDMKS_DEVICE_INFO" /FD /c
+# SUBTRACT CPP /YX /Yc /Yu
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib setupapi.lib /nologo /dll /machine:I386 /out:"./Release_x86/portaudio_x86.dll"
+
+!ELSEIF "$(CFG)" == "portaudio - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug_x86"
+# PROP BASE Intermediate_Dir "Debug_x86"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug_x86"
+# PROP Intermediate_Dir "Debug_x86"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\..\src\common" /I "..\..\include" /I ".\\" /I "..\..\src\os\win" /D "WIN32" /D "_DEBUG" /D "_USRDLL" /D "PA_ENABLE_DEBUG_OUTPUT" /D "_CRT_SECURE_NO_DEPRECATE" /D "PAWIN_USE_WDMKS_DEVICE_INFO" /FD /GZ /c
+# SUBTRACT CPP /YX /Yc /Yu
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib setupapi.lib /nologo /dll /debug /machine:I386 /out:"./Debug_x86/portaudio_x86.dll" /pdbtype:sept
+
+!ENDIF
+
+# Begin Target
+
+# Name "portaudio - Win32 Release"
+# Name "portaudio - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Group "common"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\common\pa_allocation.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\common\pa_converters.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\common\pa_cpuload.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\common\pa_debugprint.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\common\pa_dither.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\common\pa_front.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\common\pa_process.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\common\pa_ringbuffer.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\hostapi\skeleton\pa_hostapi_skeleton.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\common\pa_stream.c
+# End Source File
+# End Group
+# Begin Group "hostapi"
+
+# PROP Default_Filter ""
+# Begin Group "ASIO"
+
+# PROP Default_Filter ""
+# Begin Group "ASIOSDK"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\hostapi\asio\ASIOSDK\common\asio.cpp
+# ADD CPP /I "..\..\src\hostapi\asio\ASIOSDK\host" /I "..\..\src\hostapi\asio\ASIOSDK\host\pc" /I "..\..\src\hostapi\asio\ASIOSDK\common"
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\hostapi\asio\ASIOSDK\host\ASIOConvertSamples.cpp
+# ADD CPP /I "..\..\src\hostapi\asio\ASIOSDK\host" /I "..\..\src\hostapi\asio\ASIOSDK\host\pc" /I "..\..\src\hostapi\asio\ASIOSDK\common"
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\hostapi\asio\ASIOSDK\host\asiodrivers.cpp
+# ADD CPP /I "..\..\src\hostapi\asio\ASIOSDK\host" /I "..\..\src\hostapi\asio\ASIOSDK\host\pc" /I "..\..\src\hostapi\asio\ASIOSDK\common"
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\hostapi\asio\ASIOSDK\host\pc\asiolist.cpp
+# ADD CPP /I "..\..\src\hostapi\asio\ASIOSDK\host" /I "..\..\src\hostapi\asio\ASIOSDK\host\pc" /I "..\..\src\hostapi\asio\ASIOSDK\common"
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\hostapi\asio\ASIOSDK\common\combase.cpp
+# ADD CPP /I "..\..\src\hostapi\asio\ASIOSDK\host" /I "..\..\src\hostapi\asio\ASIOSDK\host\pc" /I "..\..\src\hostapi\asio\ASIOSDK\common"
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\hostapi\asio\ASIOSDK\common\debugmessage.cpp
+# ADD CPP /I "..\..\src\hostapi\asio\ASIOSDK\host" /I "..\..\src\hostapi\asio\ASIOSDK\host\pc" /I "..\..\src\hostapi\asio\ASIOSDK\common"
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\hostapi\asio\ASIOSDK\common\register.cpp
+# ADD CPP /I "..\..\src\hostapi\asio\ASIOSDK\host" /I "..\..\src\hostapi\asio\ASIOSDK\host\pc" /I "..\..\src\hostapi\asio\ASIOSDK\common"
+# End Source File
+# End Group
+# Begin Source File
+
+SOURCE=..\..\src\hostapi\asio\pa_asio.cpp
+# ADD CPP /I "..\..\src\hostapi\asio\ASIOSDK\host" /I "..\..\src\hostapi\asio\ASIOSDK\host\pc" /I "..\..\src\hostapi\asio\ASIOSDK\common"
+# End Source File
+# End Group
+# Begin Group "dsound"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\hostapi\dsound\pa_win_ds.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\hostapi\dsound\pa_win_ds_dynlink.c
+# End Source File
+# End Group
+# Begin Group "wmme"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\hostapi\wmme\pa_win_wmme.c
+# End Source File
+# End Group
+# Begin Group "wasapi"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\hostapi\wasapi\pa_win_wasapi.cpp
+# End Source File
+# End Group
+# Begin Group "wdm-ks"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\hostapi\wdmks\pa_win_wdmks.c
+# End Source File
+# End Group
+# End Group
+# Begin Group "os"
+
+# PROP Default_Filter ""
+# Begin Group "win"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\os\win\pa_win_hostapis.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\os\win\pa_win_util.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\os\win\pa_win_waveformat.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\os\win\pa_win_wdmks_utils.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\os\win\pa_x86_plain_converters.c
+# End Source File
+# End Group
+# End Group
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# Begin Source File
+
+SOURCE=.\portaudio.def
+# End Source File
+# End Group
+# End Target
+# End Project
-Microsoft Developer Studio Workspace File, Format Version 6.00\r
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!\r
-\r
-###############################################################################\r
-\r
-Project: "portaudio"=".\portaudio.dsp" - Package Owner=<4>\r
-\r
-Package=<5>\r
-{{{\r
-}}}\r
-\r
-Package=<4>\r
-{{{\r
-}}}\r
-\r
-###############################################################################\r
-\r
-Global:\r
-\r
-Package=<5>\r
-{{{\r
-}}}\r
-\r
-Package=<3>\r
-{{{\r
-}}}\r
-\r
-###############################################################################\r
-\r
+Microsoft Developer Studio Workspace File, Format Version 6.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+
+Project: "portaudio"=".\portaudio.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+
-\r
-Microsoft Visual Studio Solution File, Format Version 9.00\r
-# Visual Studio 2005\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "portaudio", "portaudio.vcproj", "{0A18A071-125E-442F-AFF7-A3F68ABECF99}"\r
-EndProject\r
-Global\r
- GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
- Debug|Win32 = Debug|Win32\r
- Debug|x64 = Debug|x64\r
- Release|Win32 = Release|Win32\r
- Release|x64 = Release|x64\r
- ReleaseMinDependency|Win32 = ReleaseMinDependency|Win32\r
- ReleaseMinDependency|x64 = ReleaseMinDependency|x64\r
- EndGlobalSection\r
- GlobalSection(ProjectConfigurationPlatforms) = postSolution\r
- {0A18A071-125E-442F-AFF7-A3F68ABECF99}.Debug|Win32.ActiveCfg = Debug|Win32\r
- {0A18A071-125E-442F-AFF7-A3F68ABECF99}.Debug|Win32.Build.0 = Debug|Win32\r
- {0A18A071-125E-442F-AFF7-A3F68ABECF99}.Debug|x64.ActiveCfg = Debug|x64\r
- {0A18A071-125E-442F-AFF7-A3F68ABECF99}.Debug|x64.Build.0 = Debug|x64\r
- {0A18A071-125E-442F-AFF7-A3F68ABECF99}.Release|Win32.ActiveCfg = Release|Win32\r
- {0A18A071-125E-442F-AFF7-A3F68ABECF99}.Release|Win32.Build.0 = Release|Win32\r
- {0A18A071-125E-442F-AFF7-A3F68ABECF99}.Release|x64.ActiveCfg = Release|x64\r
- {0A18A071-125E-442F-AFF7-A3F68ABECF99}.Release|x64.Build.0 = Release|x64\r
- {0A18A071-125E-442F-AFF7-A3F68ABECF99}.ReleaseMinDependency|Win32.ActiveCfg = ReleaseMinDependency|Win32\r
- {0A18A071-125E-442F-AFF7-A3F68ABECF99}.ReleaseMinDependency|Win32.Build.0 = ReleaseMinDependency|Win32\r
- {0A18A071-125E-442F-AFF7-A3F68ABECF99}.ReleaseMinDependency|x64.ActiveCfg = ReleaseMinDependency|x64\r
- {0A18A071-125E-442F-AFF7-A3F68ABECF99}.ReleaseMinDependency|x64.Build.0 = ReleaseMinDependency|x64\r
- EndGlobalSection\r
- GlobalSection(SolutionProperties) = preSolution\r
- HideSolutionNode = FALSE\r
- EndGlobalSection\r
-EndGlobal\r
+
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "portaudio", "portaudio.vcproj", "{0A18A071-125E-442F-AFF7-A3F68ABECF99}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Debug|x64 = Debug|x64
+ Release|Win32 = Release|Win32
+ Release|x64 = Release|x64
+ ReleaseMinDependency|Win32 = ReleaseMinDependency|Win32
+ ReleaseMinDependency|x64 = ReleaseMinDependency|x64
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {0A18A071-125E-442F-AFF7-A3F68ABECF99}.Debug|Win32.ActiveCfg = Debug|Win32
+ {0A18A071-125E-442F-AFF7-A3F68ABECF99}.Debug|Win32.Build.0 = Debug|Win32
+ {0A18A071-125E-442F-AFF7-A3F68ABECF99}.Debug|x64.ActiveCfg = Debug|x64
+ {0A18A071-125E-442F-AFF7-A3F68ABECF99}.Debug|x64.Build.0 = Debug|x64
+ {0A18A071-125E-442F-AFF7-A3F68ABECF99}.Release|Win32.ActiveCfg = Release|Win32
+ {0A18A071-125E-442F-AFF7-A3F68ABECF99}.Release|Win32.Build.0 = Release|Win32
+ {0A18A071-125E-442F-AFF7-A3F68ABECF99}.Release|x64.ActiveCfg = Release|x64
+ {0A18A071-125E-442F-AFF7-A3F68ABECF99}.Release|x64.Build.0 = Release|x64
+ {0A18A071-125E-442F-AFF7-A3F68ABECF99}.ReleaseMinDependency|Win32.ActiveCfg = ReleaseMinDependency|Win32
+ {0A18A071-125E-442F-AFF7-A3F68ABECF99}.ReleaseMinDependency|Win32.Build.0 = ReleaseMinDependency|Win32
+ {0A18A071-125E-442F-AFF7-A3F68ABECF99}.ReleaseMinDependency|x64.ActiveCfg = ReleaseMinDependency|x64
+ {0A18A071-125E-442F-AFF7-A3F68ABECF99}.ReleaseMinDependency|x64.Build.0 = ReleaseMinDependency|x64
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
-<?xml version="1.0" encoding="Windows-1252"?>\r
-<VisualStudioProject\r
- ProjectType="Visual C++"\r
- Version="8,00"\r
- Name="portaudio"\r
- ProjectGUID="{0A18A071-125E-442F-AFF7-A3F68ABECF99}"\r
- RootNamespace="portaudio"\r
- >\r
- <Platforms>\r
- <Platform\r
- Name="Win32"\r
- />\r
- <Platform\r
- Name="x64"\r
- />\r
- </Platforms>\r
- <ToolFiles>\r
- </ToolFiles>\r
- <Configurations>\r
- <Configuration\r
- Name="Release|Win32"\r
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"\r
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"\r
- ConfigurationType="2"\r
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"\r
- UseOfMFC="0"\r
- ATLMinimizesCRunTimeLibraryUsage="false"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- PreprocessorDefinitions="NDEBUG"\r
- MkTypLibCompatible="true"\r
- SuppressStartupBanner="true"\r
- TargetEnvironment="1"\r
- TypeLibraryName=".\Release_x86/portaudio.tlb"\r
- HeaderFileName=""\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- Optimization="2"\r
- InlineFunctionExpansion="1"\r
- EnableIntrinsicFunctions="true"\r
- FavorSizeOrSpeed="1"\r
- AdditionalIncludeDirectories="..\..\src\common;..\..\include;.\;..\..\src\os\win"\r
- PreprocessorDefinitions="WIN32;NDEBUG;_USRDLL;PA_ENABLE_DEBUG_OUTPUT;_CRT_SECURE_NO_DEPRECATE;PAWIN_USE_WDMKS_DEVICE_INFO;PA_USE_ASIO=0;PA_USE_DS=0;PA_USE_WMME=1;PA_USE_WASAPI=1;PA_USE_WDMKS=1"\r
- StringPooling="true"\r
- RuntimeLibrary="2"\r
- EnableFunctionLevelLinking="true"\r
- PrecompiledHeaderFile="$(PlatformName)\$(ConfigurationName)/portaudio.pch"\r
- AssemblerListingLocation="$(PlatformName)\$(ConfigurationName)\"\r
- ObjectFile="$(PlatformName)\$(ConfigurationName)\"\r
- ProgramDataBaseFileName="$(PlatformName)\$(ConfigurationName)\"\r
- WarningLevel="3"\r
- SuppressStartupBanner="true"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- PreprocessorDefinitions="NDEBUG"\r
- Culture="1033"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLinkerTool"\r
- AdditionalDependencies="ksuser.lib"\r
- OutputFile="$(PlatformName)\$(ConfigurationName)\portaudio_x86.dll"\r
- LinkIncremental="1"\r
- SuppressStartupBanner="true"\r
- AdditionalLibraryDirectories=""\r
- ModuleDefinitionFile=".\portaudio.def"\r
- ProgramDatabaseFile="$(PlatformName)\$(ConfigurationName)\portaudio_x86.pdb"\r
- ImportLibrary="$(PlatformName)\$(ConfigurationName)\portaudio_x86.lib"\r
- TargetMachine="1"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCManifestTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- SuppressStartupBanner="true"\r
- OutputFile="$(PlatformName)\$(ConfigurationName)\portaudio.bsc"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCAppVerifierTool"\r
- />\r
- <Tool\r
- Name="VCWebDeploymentTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="Release|x64"\r
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"\r
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"\r
- ConfigurationType="2"\r
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"\r
- UseOfMFC="0"\r
- ATLMinimizesCRunTimeLibraryUsage="false"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- PreprocessorDefinitions="NDEBUG"\r
- MkTypLibCompatible="true"\r
- SuppressStartupBanner="true"\r
- TargetEnvironment="3"\r
- TypeLibraryName=".\Release_x86/portaudio.tlb"\r
- HeaderFileName=""\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- Optimization="2"\r
- InlineFunctionExpansion="1"\r
- EnableIntrinsicFunctions="true"\r
- FavorSizeOrSpeed="1"\r
- AdditionalIncludeDirectories="..\..\src\common;..\..\include;.\;..\..\src\os\win"\r
- PreprocessorDefinitions="_WIN64;NDEBUG;_USRDLL;PA_ENABLE_DEBUG_OUTPUT;_CRT_SECURE_NO_DEPRECATE;PAWIN_USE_WDMKS_DEVICE_INFO;PA_USE_ASIO=0;PA_USE_DS=0;PA_USE_WMME=1;PA_USE_WASAPI=1;PA_USE_WDMKS=1"\r
- StringPooling="true"\r
- RuntimeLibrary="2"\r
- EnableFunctionLevelLinking="true"\r
- PrecompiledHeaderFile="$(PlatformName)\$(ConfigurationName)\portaudio.pch"\r
- AssemblerListingLocation="$(PlatformName)\$(ConfigurationName)\"\r
- ObjectFile="$(PlatformName)\$(ConfigurationName)\"\r
- ProgramDataBaseFileName="$(PlatformName)\$(ConfigurationName)\"\r
- WarningLevel="3"\r
- SuppressStartupBanner="true"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- PreprocessorDefinitions="NDEBUG"\r
- Culture="1033"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLinkerTool"\r
- AdditionalDependencies="ksuser.lib"\r
- OutputFile="$(PlatformName)\$(ConfigurationName)\portaudio_x64.dll"\r
- LinkIncremental="1"\r
- SuppressStartupBanner="true"\r
- AdditionalLibraryDirectories=""\r
- ModuleDefinitionFile=".\portaudio.def"\r
- ProgramDatabaseFile="$(PlatformName)\$(ConfigurationName)/portaudio_x64.pdb"\r
- ImportLibrary="$(PlatformName)\$(ConfigurationName)/portaudio_x64.lib"\r
- TargetMachine="17"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCManifestTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- SuppressStartupBanner="true"\r
- OutputFile="$(PlatformName)\$(ConfigurationName)\portaudio_x64.bsc"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCAppVerifierTool"\r
- />\r
- <Tool\r
- Name="VCWebDeploymentTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="Debug|Win32"\r
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"\r
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"\r
- ConfigurationType="2"\r
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"\r
- UseOfMFC="0"\r
- ATLMinimizesCRunTimeLibraryUsage="false"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- PreprocessorDefinitions="_DEBUG"\r
- MkTypLibCompatible="true"\r
- SuppressStartupBanner="true"\r
- TargetEnvironment="1"\r
- TypeLibraryName=".\Debug_x86/portaudio.tlb"\r
- HeaderFileName=""\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- Optimization="0"\r
- AdditionalIncludeDirectories="..\..\src\common;..\..\include;.\;..\..\src\os\win"\r
- PreprocessorDefinitions="WIN32;_DEBUG;_USRDLL;PA_ENABLE_DEBUG_OUTPUT;_CRT_SECURE_NO_DEPRECATE;PAWIN_USE_WDMKS_DEVICE_INFO;PA_USE_ASIO=0;PA_USE_DS=0;PA_USE_WMME=1;PA_USE_WASAPI=1;PA_USE_WDMKS=1"\r
- MinimalRebuild="true"\r
- BasicRuntimeChecks="3"\r
- RuntimeLibrary="3"\r
- PrecompiledHeaderFile="$(PlatformName)\$(ConfigurationName)/portaudio.pch"\r
- AssemblerListingLocation="$(PlatformName)\$(ConfigurationName)\"\r
- ObjectFile="$(PlatformName)\$(ConfigurationName)\"\r
- ProgramDataBaseFileName="$(PlatformName)\$(ConfigurationName)\"\r
- WarningLevel="3"\r
- SuppressStartupBanner="true"\r
- DebugInformationFormat="4"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- PreprocessorDefinitions="_DEBUG"\r
- Culture="1033"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLinkerTool"\r
- AdditionalDependencies=""\r
- OutputFile="$(PlatformName)\$(ConfigurationName)\portaudio_x86.dll"\r
- LinkIncremental="2"\r
- SuppressStartupBanner="true"\r
- ModuleDefinitionFile=".\portaudio.def"\r
- GenerateDebugInformation="true"\r
- ProgramDatabaseFile="$(PlatformName)\$(ConfigurationName)\portaudio_x86.pdb"\r
- ImportLibrary="$(PlatformName)\$(ConfigurationName)\portaudio_x86.lib"\r
- TargetMachine="1"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCManifestTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- SuppressStartupBanner="true"\r
- OutputFile="$(PlatformName)\$(ConfigurationName)\portaudio.bsc"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCAppVerifierTool"\r
- />\r
- <Tool\r
- Name="VCWebDeploymentTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="Debug|x64"\r
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"\r
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"\r
- ConfigurationType="2"\r
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"\r
- UseOfMFC="0"\r
- ATLMinimizesCRunTimeLibraryUsage="false"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- PreprocessorDefinitions="_DEBUG"\r
- MkTypLibCompatible="true"\r
- SuppressStartupBanner="true"\r
- TargetEnvironment="3"\r
- TypeLibraryName=".\Debug_x86/portaudio.tlb"\r
- HeaderFileName=""\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- Optimization="0"\r
- AdditionalIncludeDirectories="..\..\src\common,..\..\include,.\,..\..\src\os\win"\r
- PreprocessorDefinitions="_WIN64;_DEBUG;_USRDLL;PA_ENABLE_DEBUG_OUTPUT;_CRT_SECURE_NO_DEPRECATE;PAWIN_USE_WDMKS_DEVICE_INFO;PA_USE_ASIO=0;PA_USE_DS=0;PA_USE_WMME=1;PA_USE_WASAPI=1;PA_USE_WDMKS=1"\r
- MinimalRebuild="true"\r
- BasicRuntimeChecks="3"\r
- RuntimeLibrary="3"\r
- PrecompiledHeaderFile="$(PlatformName)\$(ConfigurationName)\portaudio.pch"\r
- AssemblerListingLocation="$(PlatformName)\$(ConfigurationName)\"\r
- ObjectFile="$(PlatformName)\$(ConfigurationName)\"\r
- ProgramDataBaseFileName="$(PlatformName)\$(ConfigurationName)\"\r
- WarningLevel="3"\r
- SuppressStartupBanner="true"\r
- DebugInformationFormat="3"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- PreprocessorDefinitions="_DEBUG"\r
- Culture="1033"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLinkerTool"\r
- AdditionalDependencies=""\r
- OutputFile="$(PlatformName)\$(ConfigurationName)\portaudio_x64.dll"\r
- LinkIncremental="2"\r
- SuppressStartupBanner="true"\r
- ModuleDefinitionFile=".\portaudio.def"\r
- GenerateDebugInformation="true"\r
- ProgramDatabaseFile="$(PlatformName)\$(ConfigurationName)/portaudio_x64.pdb"\r
- ImportLibrary="$(PlatformName)\$(ConfigurationName)\portaudio_x64.lib"\r
- TargetMachine="17"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCManifestTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- SuppressStartupBanner="true"\r
- OutputFile="$(PlatformName)\$(ConfigurationName)/portaudio_x64.bsc"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCAppVerifierTool"\r
- />\r
- <Tool\r
- Name="VCWebDeploymentTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="ReleaseMinDependency|Win32"\r
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"\r
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"\r
- ConfigurationType="2"\r
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"\r
- UseOfMFC="0"\r
- ATLMinimizesCRunTimeLibraryUsage="false"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- PreprocessorDefinitions="NDEBUG"\r
- MkTypLibCompatible="true"\r
- SuppressStartupBanner="true"\r
- TargetEnvironment="1"\r
- TypeLibraryName=".\Release_x86/portaudio.tlb"\r
- HeaderFileName=""\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- Optimization="2"\r
- InlineFunctionExpansion="1"\r
- EnableIntrinsicFunctions="true"\r
- FavorSizeOrSpeed="1"\r
- AdditionalIncludeDirectories="..\..\src\common;..\..\include;.\;..\..\src\os\win"\r
- PreprocessorDefinitions="WIN32;NDEBUG;_USRDLL;PA_ENABLE_DEBUG_OUTPUT;_CRT_SECURE_NO_DEPRECATE;PAWIN_USE_WDMKS_DEVICE_INFO;PA_USE_ASIO=0;PA_USE_DS=0;PA_USE_WMME=1;PA_USE_WASAPI=1;PA_USE_WDMKS=1"\r
- StringPooling="true"\r
- RuntimeLibrary="0"\r
- EnableFunctionLevelLinking="true"\r
- PrecompiledHeaderFile="$(PlatformName)\$(ConfigurationName)/portaudio.pch"\r
- AssemblerListingLocation="$(PlatformName)\$(ConfigurationName)\"\r
- ObjectFile="$(PlatformName)\$(ConfigurationName)\"\r
- ProgramDataBaseFileName="$(PlatformName)\$(ConfigurationName)\"\r
- WarningLevel="3"\r
- SuppressStartupBanner="true"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- PreprocessorDefinitions="NDEBUG"\r
- Culture="1033"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLinkerTool"\r
- AdditionalDependencies="ksuser.lib"\r
- OutputFile="$(PlatformName)\$(ConfigurationName)\portaudio_x86.dll"\r
- LinkIncremental="1"\r
- SuppressStartupBanner="true"\r
- AdditionalLibraryDirectories=""\r
- ModuleDefinitionFile=".\portaudio.def"\r
- ProgramDatabaseFile="$(PlatformName)\$(ConfigurationName)\portaudio_x86.pdb"\r
- ImportLibrary="$(PlatformName)\$(ConfigurationName)\portaudio_x86.lib"\r
- TargetMachine="1"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCManifestTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- SuppressStartupBanner="true"\r
- OutputFile="$(PlatformName)\$(ConfigurationName)\portaudio.bsc"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCAppVerifierTool"\r
- />\r
- <Tool\r
- Name="VCWebDeploymentTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="ReleaseMinDependency|x64"\r
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"\r
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"\r
- ConfigurationType="2"\r
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"\r
- UseOfMFC="0"\r
- ATLMinimizesCRunTimeLibraryUsage="false"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- PreprocessorDefinitions="NDEBUG"\r
- MkTypLibCompatible="true"\r
- SuppressStartupBanner="true"\r
- TargetEnvironment="3"\r
- TypeLibraryName=".\Release_x86/portaudio.tlb"\r
- HeaderFileName=""\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- Optimization="2"\r
- InlineFunctionExpansion="1"\r
- EnableIntrinsicFunctions="true"\r
- FavorSizeOrSpeed="1"\r
- AdditionalIncludeDirectories="..\..\src\common;..\..\include;.\;..\..\src\os\win"\r
- PreprocessorDefinitions="_WIN64;NDEBUG;_USRDLL;PA_ENABLE_DEBUG_OUTPUT;_CRT_SECURE_NO_DEPRECATE;PAWIN_USE_WDMKS_DEVICE_INFO;PA_USE_ASIO=0;PA_USE_DS=0;PA_USE_WMME=1;PA_USE_WASAPI=1;PA_USE_WDMKS=1"\r
- StringPooling="true"\r
- RuntimeLibrary="0"\r
- EnableFunctionLevelLinking="true"\r
- PrecompiledHeaderFile="$(PlatformName)\$(ConfigurationName)\portaudio.pch"\r
- AssemblerListingLocation="$(PlatformName)\$(ConfigurationName)\"\r
- ObjectFile="$(PlatformName)\$(ConfigurationName)\"\r
- ProgramDataBaseFileName="$(PlatformName)\$(ConfigurationName)\"\r
- WarningLevel="3"\r
- SuppressStartupBanner="true"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- PreprocessorDefinitions="NDEBUG"\r
- Culture="1033"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLinkerTool"\r
- AdditionalDependencies="ksuser.lib"\r
- OutputFile="$(PlatformName)\$(ConfigurationName)\portaudio_x64.dll"\r
- LinkIncremental="1"\r
- SuppressStartupBanner="true"\r
- AdditionalLibraryDirectories=""\r
- ModuleDefinitionFile=".\portaudio.def"\r
- ProgramDatabaseFile="$(PlatformName)\$(ConfigurationName)/portaudio_x64.pdb"\r
- ImportLibrary="$(PlatformName)\$(ConfigurationName)/portaudio_x64.lib"\r
- TargetMachine="17"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCManifestTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- SuppressStartupBanner="true"\r
- OutputFile="$(PlatformName)\$(ConfigurationName)\portaudio_x64.bsc"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCAppVerifierTool"\r
- />\r
- <Tool\r
- Name="VCWebDeploymentTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- </Configurations>\r
- <References>\r
- </References>\r
- <Files>\r
- <Filter\r
- Name="Source Files"\r
- Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"\r
- >\r
- <Filter\r
- Name="common"\r
- >\r
- <File\r
- RelativePath="..\..\src\common\pa_allocation.c"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Release|x64"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|x64"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="ReleaseMinDependency|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="ReleaseMinDependency|x64"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath="..\..\src\common\pa_converters.c"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Release|x64"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|x64"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="ReleaseMinDependency|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="ReleaseMinDependency|x64"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath="..\..\src\common\pa_cpuload.c"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Release|x64"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|x64"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="ReleaseMinDependency|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="ReleaseMinDependency|x64"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath="..\..\src\common\pa_debugprint.c"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Release|x64"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|x64"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="ReleaseMinDependency|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="ReleaseMinDependency|x64"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath="..\..\src\common\pa_dither.c"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Release|x64"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|x64"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="ReleaseMinDependency|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="ReleaseMinDependency|x64"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath="..\..\src\common\pa_front.c"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Release|x64"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|x64"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="ReleaseMinDependency|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="ReleaseMinDependency|x64"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath="..\..\src\hostapi\skeleton\pa_hostapi_skeleton.c"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Release|x64"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|x64"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="ReleaseMinDependency|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="ReleaseMinDependency|x64"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath="..\..\src\common\pa_process.c"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Release|x64"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|x64"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="ReleaseMinDependency|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="ReleaseMinDependency|x64"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath="..\..\src\common\pa_ringbuffer.c"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Release|x64"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|x64"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="ReleaseMinDependency|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="ReleaseMinDependency|x64"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath="..\..\src\common\pa_stream.c"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Release|x64"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|x64"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="ReleaseMinDependency|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="ReleaseMinDependency|x64"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath="..\..\src\common\pa_trace.c"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Release|x64"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|x64"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="ReleaseMinDependency|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="ReleaseMinDependency|x64"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- </File>\r
- </Filter>\r
- <Filter\r
- Name="hostapi"\r
- >\r
- <Filter\r
- Name="ASIO"\r
- >\r
- <File\r
- RelativePath="..\..\src\hostapi\asio\pa_asio.cpp"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories="..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common"\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Release|x64"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories="..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common"\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories="..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common"\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|x64"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories="..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common"\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="ReleaseMinDependency|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories="..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common"\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="ReleaseMinDependency|x64"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories="..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common"\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- </File>\r
- <Filter\r
- Name="ASIOSDK"\r
- >\r
- <File\r
- RelativePath="..\..\src\hostapi\asio\ASIOSDK\common\asio.cpp"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories="..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common"\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Release|x64"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories="..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common"\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories="..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common"\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|x64"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories="..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common"\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="ReleaseMinDependency|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories="..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common"\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="ReleaseMinDependency|x64"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories="..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common"\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath="..\..\src\hostapi\asio\ASIOSDK\host\asiodrivers.cpp"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories="..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common"\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Release|x64"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories="..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common"\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories="..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common"\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|x64"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories="..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common"\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="ReleaseMinDependency|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories="..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common"\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="ReleaseMinDependency|x64"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories="..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common"\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath="..\..\src\hostapi\asio\ASIOSDK\host\pc\asiolist.cpp"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories="..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common"\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Release|x64"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories="..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common"\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories="..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common"\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|x64"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories="..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common"\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="ReleaseMinDependency|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories="..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common"\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="ReleaseMinDependency|x64"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories="..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common"\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- </File>\r
- </Filter>\r
- </Filter>\r
- <Filter\r
- Name="dsound"\r
- >\r
- <File\r
- RelativePath="..\..\src\hostapi\dsound\pa_win_ds.c"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Release|x64"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|x64"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="ReleaseMinDependency|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="ReleaseMinDependency|x64"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath="..\..\src\hostapi\dsound\pa_win_ds_dynlink.c"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Release|x64"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|x64"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="ReleaseMinDependency|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="ReleaseMinDependency|x64"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- </File>\r
- </Filter>\r
- <Filter\r
- Name="wmme"\r
- >\r
- <File\r
- RelativePath="..\..\src\hostapi\wmme\pa_win_wmme.c"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Release|x64"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|x64"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="ReleaseMinDependency|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="ReleaseMinDependency|x64"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- </File>\r
- </Filter>\r
- <Filter\r
- Name="wasapi"\r
- >\r
- <File\r
- RelativePath="..\..\src\hostapi\wasapi\pa_win_wasapi.c"\r
- >\r
- </File>\r
- </Filter>\r
- <Filter\r
- Name="wdmks"\r
- >\r
- <File\r
- RelativePath="..\..\src\hostapi\wdmks\pa_win_wdmks.c"\r
- >\r
- </File>\r
- </Filter>\r
- </Filter>\r
- <Filter\r
- Name="os"\r
- >\r
- <Filter\r
- Name="win"\r
- >\r
- <File\r
- RelativePath="..\..\src\os\win\pa_win_coinitialize.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath="..\..\src\os\win\pa_win_hostapis.c"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Release|x64"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|x64"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="ReleaseMinDependency|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="ReleaseMinDependency|x64"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath="..\..\src\os\win\pa_win_util.c"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Release|x64"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|x64"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="ReleaseMinDependency|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="ReleaseMinDependency|x64"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath="..\..\src\os\win\pa_win_waveformat.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath="..\..\src\os\win\pa_win_wdmks_utils.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath="..\..\src\os\win\pa_x86_plain_converters.c"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Release|x64"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="Debug|x64"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="ReleaseMinDependency|Win32"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- <FileConfiguration\r
- Name="ReleaseMinDependency|x64"\r
- >\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions=""\r
- />\r
- </FileConfiguration>\r
- </File>\r
- </Filter>\r
- </Filter>\r
- </Filter>\r
- <Filter\r
- Name="Resource Files"\r
- Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"\r
- >\r
- <File\r
- RelativePath="portaudio.def"\r
- >\r
- </File>\r
- </Filter>\r
- <Filter\r
- Name="Header Files"\r
- Filter="h;hpp;hxx;hm;inl"\r
- >\r
- <File\r
- RelativePath="..\..\include\pa_asio.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath="..\..\include\pa_win_ds.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath="..\..\include\pa_win_wasapi.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath="..\..\include\pa_win_waveformat.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath="..\..\include\pa_win_wmme.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath="..\..\include\portaudio.h"\r
- >\r
- </File>\r
- </Filter>\r
- </Files>\r
- <Globals>\r
- </Globals>\r
-</VisualStudioProject>\r
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8,00"
+ Name="portaudio"
+ ProjectGUID="{0A18A071-125E-442F-AFF7-A3F68ABECF99}"
+ RootNamespace="portaudio"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ <Platform
+ Name="x64"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName=".\Release_x86/portaudio.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ EnableIntrinsicFunctions="true"
+ FavorSizeOrSpeed="1"
+ AdditionalIncludeDirectories="..\..\src\common;..\..\include;.\;..\..\src\os\win"
+ PreprocessorDefinitions="WIN32;NDEBUG;_USRDLL;PA_ENABLE_DEBUG_OUTPUT;_CRT_SECURE_NO_DEPRECATE;PAWIN_USE_WDMKS_DEVICE_INFO;PA_USE_ASIO=0;PA_USE_DS=0;PA_USE_WMME=1;PA_USE_WASAPI=1;PA_USE_WDMKS=1"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ PrecompiledHeaderFile="$(PlatformName)\$(ConfigurationName)/portaudio.pch"
+ AssemblerListingLocation="$(PlatformName)\$(ConfigurationName)\"
+ ObjectFile="$(PlatformName)\$(ConfigurationName)\"
+ ProgramDataBaseFileName="$(PlatformName)\$(ConfigurationName)\"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ksuser.lib"
+ OutputFile="$(PlatformName)\$(ConfigurationName)\portaudio_x86.dll"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories=""
+ ModuleDefinitionFile=".\portaudio.def"
+ ProgramDatabaseFile="$(PlatformName)\$(ConfigurationName)\portaudio_x86.pdb"
+ ImportLibrary="$(PlatformName)\$(ConfigurationName)\portaudio_x86.lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile="$(PlatformName)\$(ConfigurationName)\portaudio.bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|x64"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="3"
+ TypeLibraryName=".\Release_x86/portaudio.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ EnableIntrinsicFunctions="true"
+ FavorSizeOrSpeed="1"
+ AdditionalIncludeDirectories="..\..\src\common;..\..\include;.\;..\..\src\os\win"
+ PreprocessorDefinitions="_WIN64;NDEBUG;_USRDLL;PA_ENABLE_DEBUG_OUTPUT;_CRT_SECURE_NO_DEPRECATE;PAWIN_USE_WDMKS_DEVICE_INFO;PA_USE_ASIO=0;PA_USE_DS=0;PA_USE_WMME=1;PA_USE_WASAPI=1;PA_USE_WDMKS=1"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ PrecompiledHeaderFile="$(PlatformName)\$(ConfigurationName)\portaudio.pch"
+ AssemblerListingLocation="$(PlatformName)\$(ConfigurationName)\"
+ ObjectFile="$(PlatformName)\$(ConfigurationName)\"
+ ProgramDataBaseFileName="$(PlatformName)\$(ConfigurationName)\"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ksuser.lib"
+ OutputFile="$(PlatformName)\$(ConfigurationName)\portaudio_x64.dll"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories=""
+ ModuleDefinitionFile=".\portaudio.def"
+ ProgramDatabaseFile="$(PlatformName)\$(ConfigurationName)/portaudio_x64.pdb"
+ ImportLibrary="$(PlatformName)\$(ConfigurationName)/portaudio_x64.lib"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile="$(PlatformName)\$(ConfigurationName)\portaudio_x64.bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName=".\Debug_x86/portaudio.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\src\common;..\..\include;.\;..\..\src\os\win"
+ PreprocessorDefinitions="WIN32;_DEBUG;_USRDLL;PA_ENABLE_DEBUG_OUTPUT;_CRT_SECURE_NO_DEPRECATE;PAWIN_USE_WDMKS_DEVICE_INFO;PA_USE_ASIO=0;PA_USE_DS=0;PA_USE_WMME=1;PA_USE_WASAPI=1;PA_USE_WDMKS=1"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ PrecompiledHeaderFile="$(PlatformName)\$(ConfigurationName)/portaudio.pch"
+ AssemblerListingLocation="$(PlatformName)\$(ConfigurationName)\"
+ ObjectFile="$(PlatformName)\$(ConfigurationName)\"
+ ProgramDataBaseFileName="$(PlatformName)\$(ConfigurationName)\"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies=""
+ OutputFile="$(PlatformName)\$(ConfigurationName)\portaudio_x86.dll"
+ LinkIncremental="2"
+ SuppressStartupBanner="true"
+ ModuleDefinitionFile=".\portaudio.def"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(PlatformName)\$(ConfigurationName)\portaudio_x86.pdb"
+ ImportLibrary="$(PlatformName)\$(ConfigurationName)\portaudio_x86.lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile="$(PlatformName)\$(ConfigurationName)\portaudio.bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|x64"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="3"
+ TypeLibraryName=".\Debug_x86/portaudio.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\src\common,..\..\include,.\,..\..\src\os\win"
+ PreprocessorDefinitions="_WIN64;_DEBUG;_USRDLL;PA_ENABLE_DEBUG_OUTPUT;_CRT_SECURE_NO_DEPRECATE;PAWIN_USE_WDMKS_DEVICE_INFO;PA_USE_ASIO=0;PA_USE_DS=0;PA_USE_WMME=1;PA_USE_WASAPI=1;PA_USE_WDMKS=1"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ PrecompiledHeaderFile="$(PlatformName)\$(ConfigurationName)\portaudio.pch"
+ AssemblerListingLocation="$(PlatformName)\$(ConfigurationName)\"
+ ObjectFile="$(PlatformName)\$(ConfigurationName)\"
+ ProgramDataBaseFileName="$(PlatformName)\$(ConfigurationName)\"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies=""
+ OutputFile="$(PlatformName)\$(ConfigurationName)\portaudio_x64.dll"
+ LinkIncremental="2"
+ SuppressStartupBanner="true"
+ ModuleDefinitionFile=".\portaudio.def"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(PlatformName)\$(ConfigurationName)/portaudio_x64.pdb"
+ ImportLibrary="$(PlatformName)\$(ConfigurationName)\portaudio_x64.lib"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile="$(PlatformName)\$(ConfigurationName)/portaudio_x64.bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="ReleaseMinDependency|Win32"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName=".\Release_x86/portaudio.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ EnableIntrinsicFunctions="true"
+ FavorSizeOrSpeed="1"
+ AdditionalIncludeDirectories="..\..\src\common;..\..\include;.\;..\..\src\os\win"
+ PreprocessorDefinitions="WIN32;NDEBUG;_USRDLL;PA_ENABLE_DEBUG_OUTPUT;_CRT_SECURE_NO_DEPRECATE;PAWIN_USE_WDMKS_DEVICE_INFO;PA_USE_ASIO=0;PA_USE_DS=0;PA_USE_WMME=1;PA_USE_WASAPI=1;PA_USE_WDMKS=1"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ PrecompiledHeaderFile="$(PlatformName)\$(ConfigurationName)/portaudio.pch"
+ AssemblerListingLocation="$(PlatformName)\$(ConfigurationName)\"
+ ObjectFile="$(PlatformName)\$(ConfigurationName)\"
+ ProgramDataBaseFileName="$(PlatformName)\$(ConfigurationName)\"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ksuser.lib"
+ OutputFile="$(PlatformName)\$(ConfigurationName)\portaudio_x86.dll"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories=""
+ ModuleDefinitionFile=".\portaudio.def"
+ ProgramDatabaseFile="$(PlatformName)\$(ConfigurationName)\portaudio_x86.pdb"
+ ImportLibrary="$(PlatformName)\$(ConfigurationName)\portaudio_x86.lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile="$(PlatformName)\$(ConfigurationName)\portaudio.bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="ReleaseMinDependency|x64"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="3"
+ TypeLibraryName=".\Release_x86/portaudio.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ EnableIntrinsicFunctions="true"
+ FavorSizeOrSpeed="1"
+ AdditionalIncludeDirectories="..\..\src\common;..\..\include;.\;..\..\src\os\win"
+ PreprocessorDefinitions="_WIN64;NDEBUG;_USRDLL;PA_ENABLE_DEBUG_OUTPUT;_CRT_SECURE_NO_DEPRECATE;PAWIN_USE_WDMKS_DEVICE_INFO;PA_USE_ASIO=0;PA_USE_DS=0;PA_USE_WMME=1;PA_USE_WASAPI=1;PA_USE_WDMKS=1"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ PrecompiledHeaderFile="$(PlatformName)\$(ConfigurationName)\portaudio.pch"
+ AssemblerListingLocation="$(PlatformName)\$(ConfigurationName)\"
+ ObjectFile="$(PlatformName)\$(ConfigurationName)\"
+ ProgramDataBaseFileName="$(PlatformName)\$(ConfigurationName)\"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ksuser.lib"
+ OutputFile="$(PlatformName)\$(ConfigurationName)\portaudio_x64.dll"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories=""
+ ModuleDefinitionFile=".\portaudio.def"
+ ProgramDatabaseFile="$(PlatformName)\$(ConfigurationName)/portaudio_x64.pdb"
+ ImportLibrary="$(PlatformName)\$(ConfigurationName)/portaudio_x64.lib"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile="$(PlatformName)\$(ConfigurationName)\portaudio_x64.bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+ >
+ <Filter
+ Name="common"
+ >
+ <File
+ RelativePath="..\..\src\common\pa_allocation.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="ReleaseMinDependency|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="ReleaseMinDependency|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\src\common\pa_converters.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="ReleaseMinDependency|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="ReleaseMinDependency|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\src\common\pa_cpuload.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="ReleaseMinDependency|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="ReleaseMinDependency|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\src\common\pa_debugprint.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="ReleaseMinDependency|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="ReleaseMinDependency|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\src\common\pa_dither.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="ReleaseMinDependency|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="ReleaseMinDependency|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\src\common\pa_front.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="ReleaseMinDependency|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="ReleaseMinDependency|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\src\hostapi\skeleton\pa_hostapi_skeleton.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="ReleaseMinDependency|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="ReleaseMinDependency|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\src\common\pa_process.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="ReleaseMinDependency|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="ReleaseMinDependency|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\src\common\pa_ringbuffer.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="ReleaseMinDependency|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="ReleaseMinDependency|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\src\common\pa_stream.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="ReleaseMinDependency|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="ReleaseMinDependency|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\src\common\pa_trace.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="ReleaseMinDependency|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="ReleaseMinDependency|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <Filter
+ Name="hostapi"
+ >
+ <Filter
+ Name="ASIO"
+ >
+ <File
+ RelativePath="..\..\src\hostapi\asio\pa_asio.cpp"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common"
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common"
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common"
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common"
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="ReleaseMinDependency|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common"
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="ReleaseMinDependency|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common"
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <Filter
+ Name="ASIOSDK"
+ >
+ <File
+ RelativePath="..\..\src\hostapi\asio\ASIOSDK\common\asio.cpp"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common"
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common"
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common"
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common"
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="ReleaseMinDependency|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common"
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="ReleaseMinDependency|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common"
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\src\hostapi\asio\ASIOSDK\host\asiodrivers.cpp"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common"
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common"
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common"
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common"
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="ReleaseMinDependency|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common"
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="ReleaseMinDependency|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common"
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\src\hostapi\asio\ASIOSDK\host\pc\asiolist.cpp"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common"
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common"
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common"
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common"
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="ReleaseMinDependency|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common"
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="ReleaseMinDependency|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common"
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ </Filter>
+ <Filter
+ Name="dsound"
+ >
+ <File
+ RelativePath="..\..\src\hostapi\dsound\pa_win_ds.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="ReleaseMinDependency|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="ReleaseMinDependency|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\src\hostapi\dsound\pa_win_ds_dynlink.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="ReleaseMinDependency|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="ReleaseMinDependency|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <Filter
+ Name="wmme"
+ >
+ <File
+ RelativePath="..\..\src\hostapi\wmme\pa_win_wmme.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="ReleaseMinDependency|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="ReleaseMinDependency|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <Filter
+ Name="wasapi"
+ >
+ <File
+ RelativePath="..\..\src\hostapi\wasapi\pa_win_wasapi.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="wdmks"
+ >
+ <File
+ RelativePath="..\..\src\hostapi\wdmks\pa_win_wdmks.c"
+ >
+ </File>
+ </Filter>
+ </Filter>
+ <Filter
+ Name="os"
+ >
+ <Filter
+ Name="win"
+ >
+ <File
+ RelativePath="..\..\src\os\win\pa_win_coinitialize.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\src\os\win\pa_win_hostapis.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="ReleaseMinDependency|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="ReleaseMinDependency|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\src\os\win\pa_win_util.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="ReleaseMinDependency|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="ReleaseMinDependency|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\src\os\win\pa_win_waveformat.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\src\os\win\pa_win_wdmks_utils.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\src\os\win\pa_x86_plain_converters.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="ReleaseMinDependency|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="ReleaseMinDependency|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ </Filter>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+ >
+ <File
+ RelativePath="portaudio.def"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl"
+ >
+ <File
+ RelativePath="..\..\include\pa_asio.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\include\pa_win_ds.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\include\pa_win_wasapi.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\include\pa_win_waveformat.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\include\pa_win_wmme.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\include\portaudio.h"
+ >
+ </File>
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
-# $Id: $\r
-#\r
-# - Try to find the ASIO SDK\r
-# Once done this will define\r
-#\r
-# ASIOSDK_FOUND - system has ASIO SDK\r
-# ASIOSDK_ROOT_DIR - path to the ASIO SDK base directory\r
-# ASIOSDK_INCLUDE_DIR - the ASIO SDK include directory\r
-\r
-if(WIN32)\r
-else(WIN32)\r
- message(FATAL_ERROR "FindASIOSDK.cmake: Unsupported platform ${CMAKE_SYSTEM_NAME}" )\r
-endif(WIN32)\r
-\r
-file(GLOB results "${CMAKE_CURRENT_SOURCE_DIR}/../as*")\r
-foreach(f ${results})\r
- if(IS_DIRECTORY ${f})\r
- set(ASIOSDK_PATH_HINT ${ASIOSDK_PATH_HINT} ${f})\r
- endif()\r
-endforeach()\r
-\r
-find_path(ASIOSDK_ROOT_DIR\r
- common/asio.h\r
- HINTS\r
- ${ASIOSDK_PATH_HINT}\r
-)\r
-\r
-find_path(ASIOSDK_INCLUDE_DIR\r
- asio.h\r
- PATHS\r
- ${ASIOSDK_ROOT_DIR}/common \r
-) \r
-\r
-# handle the QUIETLY and REQUIRED arguments and set ASIOSDK_FOUND to TRUE if \r
-# all listed variables are TRUE\r
-INCLUDE(FindPackageHandleStandardArgs)\r
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(ASIOSDK DEFAULT_MSG ASIOSDK_ROOT_DIR ASIOSDK_INCLUDE_DIR)\r
-\r
-MARK_AS_ADVANCED(\r
- ASIOSDK_ROOT_DIR ASIOSDK_INCLUDE_DIR\r
-)\r
+# $Id: $
+#
+# - Try to find the ASIO SDK
+# Once done this will define
+#
+# ASIOSDK_FOUND - system has ASIO SDK
+# ASIOSDK_ROOT_DIR - path to the ASIO SDK base directory
+# ASIOSDK_INCLUDE_DIR - the ASIO SDK include directory
+
+if(WIN32)
+else(WIN32)
+ message(FATAL_ERROR "FindASIOSDK.cmake: Unsupported platform ${CMAKE_SYSTEM_NAME}" )
+endif(WIN32)
+
+file(GLOB results "${CMAKE_CURRENT_SOURCE_DIR}/../as*")
+foreach(f ${results})
+ if(IS_DIRECTORY ${f})
+ set(ASIOSDK_PATH_HINT ${ASIOSDK_PATH_HINT} ${f})
+ endif()
+endforeach()
+
+find_path(ASIOSDK_ROOT_DIR
+ common/asio.h
+ HINTS
+ ${ASIOSDK_PATH_HINT}
+)
+
+find_path(ASIOSDK_INCLUDE_DIR
+ asio.h
+ PATHS
+ ${ASIOSDK_ROOT_DIR}/common
+)
+
+# handle the QUIETLY and REQUIRED arguments and set ASIOSDK_FOUND to TRUE if
+# all listed variables are TRUE
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(ASIOSDK DEFAULT_MSG ASIOSDK_ROOT_DIR ASIOSDK_INCLUDE_DIR)
+
+MARK_AS_ADVANCED(
+ ASIOSDK_ROOT_DIR ASIOSDK_INCLUDE_DIR
+)
-# $Id: $\r
-#\r
-# - Try to find the DirectX SDK\r
-# Once done this will define\r
-#\r
-# DXSDK_FOUND - system has DirectX SDK\r
-# DXSDK_ROOT_DIR - path to the DirectX SDK base directory\r
-# DXSDK_INCLUDE_DIR - the DirectX SDK include directory\r
-# DXSDK_LIBRARY_DIR - DirectX SDK libraries path\r
-#\r
-# DXSDK_DSOUND_LIBRARY - Path to dsound.lib\r
-#\r
-\r
-if(WIN32)\r
-else(WIN32)\r
- message(FATAL_ERROR "FindDXSDK.cmake: Unsupported platform ${CMAKE_SYSTEM_NAME}" )\r
-endif(WIN32)\r
-\r
-find_path(DXSDK_ROOT_DIR\r
- include/dxsdkver.h\r
- HINTS\r
- $ENV{DXSDK_DIR}\r
-)\r
-\r
-find_path(DXSDK_INCLUDE_DIR\r
- dxsdkver.h\r
- PATHS\r
- ${DXSDK_ROOT_DIR}/include \r
-) \r
-\r
-IF(CMAKE_CL_64)\r
-find_path(DXSDK_LIBRARY_DIR\r
- dsound.lib\r
- PATHS\r
- ${DXSDK_ROOT_DIR}/lib/x64\r
-)\r
-ELSE(CMAKE_CL_64)\r
-find_path(DXSDK_LIBRARY_DIR\r
- dsound.lib\r
- PATHS\r
- ${DXSDK_ROOT_DIR}/lib/x86\r
-)\r
-ENDIF(CMAKE_CL_64)\r
-\r
-find_library(DXSDK_DSOUND_LIBRARY \r
- dsound.lib\r
- PATHS\r
- ${DXSDK_LIBRARY_DIR}\r
-)\r
-\r
-# handle the QUIETLY and REQUIRED arguments and set DXSDK_FOUND to TRUE if \r
-# all listed variables are TRUE\r
-INCLUDE(FindPackageHandleStandardArgs)\r
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(DXSDK DEFAULT_MSG DXSDK_ROOT_DIR DXSDK_INCLUDE_DIR)\r
-\r
-MARK_AS_ADVANCED(\r
- DXSDK_ROOT_DIR DXSDK_INCLUDE_DIR\r
- DXSDK_LIBRARY_DIR DXSDK_DSOUND_LIBRARY\r
-)\r
+# $Id: $
+#
+# - Try to find the DirectX SDK
+# Once done this will define
+#
+# DXSDK_FOUND - system has DirectX SDK
+# DXSDK_ROOT_DIR - path to the DirectX SDK base directory
+# DXSDK_INCLUDE_DIR - the DirectX SDK include directory
+# DXSDK_LIBRARY_DIR - DirectX SDK libraries path
+#
+# DXSDK_DSOUND_LIBRARY - Path to dsound.lib
+#
+
+if(WIN32)
+else(WIN32)
+ message(FATAL_ERROR "FindDXSDK.cmake: Unsupported platform ${CMAKE_SYSTEM_NAME}" )
+endif(WIN32)
+
+find_path(DXSDK_ROOT_DIR
+ include/dxsdkver.h
+ HINTS
+ $ENV{DXSDK_DIR}
+)
+
+find_path(DXSDK_INCLUDE_DIR
+ dxsdkver.h
+ PATHS
+ ${DXSDK_ROOT_DIR}/include
+)
+
+IF(CMAKE_CL_64)
+find_path(DXSDK_LIBRARY_DIR
+ dsound.lib
+ PATHS
+ ${DXSDK_ROOT_DIR}/lib/x64
+)
+ELSE(CMAKE_CL_64)
+find_path(DXSDK_LIBRARY_DIR
+ dsound.lib
+ PATHS
+ ${DXSDK_ROOT_DIR}/lib/x86
+)
+ENDIF(CMAKE_CL_64)
+
+find_library(DXSDK_DSOUND_LIBRARY
+ dsound.lib
+ PATHS
+ ${DXSDK_LIBRARY_DIR}
+)
+
+# handle the QUIETLY and REQUIRED arguments and set DXSDK_FOUND to TRUE if
+# all listed variables are TRUE
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(DXSDK DEFAULT_MSG DXSDK_ROOT_DIR DXSDK_INCLUDE_DIR)
+
+MARK_AS_ADVANCED(
+ DXSDK_ROOT_DIR DXSDK_INCLUDE_DIR
+ DXSDK_LIBRARY_DIR DXSDK_DSOUND_LIBRARY
+)
-/* $Id: $\r
-\r
- !!! @GENERATED_MESSAGE@ !!!\r
-\r
- Header file configured by CMake to convert CMake options/vars to macros. It is done this way because if set via\r
- preprocessor options, MSVC f.i. has no way of knowing when an option (or var) changes as there is no dependency chain.\r
- \r
- The generated "options_cmake.h" should be included like so:\r
- \r
- #ifdef PORTAUDIO_CMAKE_GENERATED\r
- #include "options_cmake.h"\r
- #endif\r
- \r
- so that non-CMake build environments are left intact.\r
- \r
- Source template: cmake_support/options_cmake.h.in\r
-*/\r
-\r
-#ifdef _WIN32\r
-#if defined(PA_USE_ASIO) || defined(PA_USE_DS) || defined(PA_USE_WMME) || defined(PA_USE_WASAPI) || defined(PA_USE_WDMKS)\r
-#error "This header needs to be included before pa_hostapi.h!!"\r
-#endif\r
-\r
-#cmakedefine01 PA_USE_ASIO\r
-#cmakedefine01 PA_USE_DS\r
-#cmakedefine01 PA_USE_WMME\r
-#cmakedefine01 PA_USE_WASAPI\r
-#cmakedefine01 PA_USE_WDMKS\r
-#else\r
-#error "Platform currently not supported by CMake script"\r
-#endif\r
+/* $Id: $
+
+ !!! @GENERATED_MESSAGE@ !!!
+
+ Header file configured by CMake to convert CMake options/vars to macros. It is done this way because if set via
+ preprocessor options, MSVC f.i. has no way of knowing when an option (or var) changes as there is no dependency chain.
+
+ The generated "options_cmake.h" should be included like so:
+
+ #ifdef PORTAUDIO_CMAKE_GENERATED
+ #include "options_cmake.h"
+ #endif
+
+ so that non-CMake build environments are left intact.
+
+ Source template: cmake_support/options_cmake.h.in
+*/
+
+#ifdef _WIN32
+#if defined(PA_USE_ASIO) || defined(PA_USE_DS) || defined(PA_USE_WMME) || defined(PA_USE_WASAPI) || defined(PA_USE_WDMKS)
+#error "This header needs to be included before pa_hostapi.h!!"
+#endif
+
+#cmakedefine01 PA_USE_ASIO
+#cmakedefine01 PA_USE_DS
+#cmakedefine01 PA_USE_WMME
+#cmakedefine01 PA_USE_WASAPI
+#cmakedefine01 PA_USE_WDMKS
+#else
+#error "Platform currently not supported by CMake script"
+#endif
-; $Id: $\r
-;\r
-; !!! @GENERATED_MESSAGE@ !!!\r
-EXPORTS\r
-\r
-;\r
-Pa_GetVersion @1\r
-Pa_GetVersionText @2\r
-Pa_GetErrorText @3 \r
-Pa_Initialize @4\r
-Pa_Terminate @5\r
-Pa_GetHostApiCount @6\r
-Pa_GetDefaultHostApi @7\r
-Pa_GetHostApiInfo @8\r
-Pa_HostApiTypeIdToHostApiIndex @9\r
-Pa_HostApiDeviceIndexToDeviceIndex @10\r
-Pa_GetLastHostErrorInfo @11\r
-Pa_GetDeviceCount @12\r
-Pa_GetDefaultInputDevice @13\r
-Pa_GetDefaultOutputDevice @14\r
-Pa_GetDeviceInfo @15\r
-Pa_IsFormatSupported @16\r
-Pa_OpenStream @17\r
-Pa_OpenDefaultStream @18\r
-Pa_CloseStream @19\r
-Pa_SetStreamFinishedCallback @20\r
-Pa_StartStream @21\r
-Pa_StopStream @22\r
-Pa_AbortStream @23\r
-Pa_IsStreamStopped @24\r
-Pa_IsStreamActive @25\r
-Pa_GetStreamInfo @26\r
-Pa_GetStreamTime @27\r
-Pa_GetStreamCpuLoad @28\r
-Pa_ReadStream @29\r
-Pa_WriteStream @30\r
-Pa_GetStreamReadAvailable @31\r
-Pa_GetStreamWriteAvailable @32\r
-Pa_GetSampleSize @33\r
-Pa_Sleep @34\r
-@DEF_EXCLUDE_ASIO_SYMBOLS@PaAsio_GetAvailableBufferSizes @50\r
-@DEF_EXCLUDE_ASIO_SYMBOLS@PaAsio_ShowControlPanel @51\r
-PaUtil_InitializeX86PlainConverters @52\r
-@DEF_EXCLUDE_ASIO_SYMBOLS@PaAsio_GetInputChannelName @53\r
-@DEF_EXCLUDE_ASIO_SYMBOLS@PaAsio_GetOutputChannelName @54\r
-PaUtil_SetDebugPrintFunction @55\r
-@DEF_EXCLUDE_WASAPI_SYMBOLS@PaWasapi_GetDeviceDefaultFormat @56\r
-@DEF_EXCLUDE_WASAPI_SYMBOLS@PaWasapi_GetDeviceRole @57\r
-@DEF_EXCLUDE_WASAPI_SYMBOLS@PaWasapi_ThreadPriorityBoost @58\r
-@DEF_EXCLUDE_WASAPI_SYMBOLS@PaWasapi_ThreadPriorityRevert @59\r
-@DEF_EXCLUDE_WASAPI_SYMBOLS@PaWasapi_GetFramesPerHostBuffer @60\r
-@DEF_EXCLUDE_WASAPI_SYMBOLS@PaWasapi_GetJackDescription @61\r
-@DEF_EXCLUDE_WASAPI_SYMBOLS@PaWasapi_GetJackCount @62\r
+; $Id: $
+;
+; !!! @GENERATED_MESSAGE@ !!!
+EXPORTS
+
+;
+Pa_GetVersion @1
+Pa_GetVersionText @2
+Pa_GetErrorText @3
+Pa_Initialize @4
+Pa_Terminate @5
+Pa_GetHostApiCount @6
+Pa_GetDefaultHostApi @7
+Pa_GetHostApiInfo @8
+Pa_HostApiTypeIdToHostApiIndex @9
+Pa_HostApiDeviceIndexToDeviceIndex @10
+Pa_GetLastHostErrorInfo @11
+Pa_GetDeviceCount @12
+Pa_GetDefaultInputDevice @13
+Pa_GetDefaultOutputDevice @14
+Pa_GetDeviceInfo @15
+Pa_IsFormatSupported @16
+Pa_OpenStream @17
+Pa_OpenDefaultStream @18
+Pa_CloseStream @19
+Pa_SetStreamFinishedCallback @20
+Pa_StartStream @21
+Pa_StopStream @22
+Pa_AbortStream @23
+Pa_IsStreamStopped @24
+Pa_IsStreamActive @25
+Pa_GetStreamInfo @26
+Pa_GetStreamTime @27
+Pa_GetStreamCpuLoad @28
+Pa_ReadStream @29
+Pa_WriteStream @30
+Pa_GetStreamReadAvailable @31
+Pa_GetStreamWriteAvailable @32
+Pa_GetSampleSize @33
+Pa_Sleep @34
+@DEF_EXCLUDE_ASIO_SYMBOLS@PaAsio_GetAvailableBufferSizes @50
+@DEF_EXCLUDE_ASIO_SYMBOLS@PaAsio_ShowControlPanel @51
+PaUtil_InitializeX86PlainConverters @52
+@DEF_EXCLUDE_ASIO_SYMBOLS@PaAsio_GetInputChannelName @53
+@DEF_EXCLUDE_ASIO_SYMBOLS@PaAsio_GetOutputChannelName @54
+PaUtil_SetDebugPrintFunction @55
+@DEF_EXCLUDE_WASAPI_SYMBOLS@PaWasapi_GetDeviceDefaultFormat @56
+@DEF_EXCLUDE_WASAPI_SYMBOLS@PaWasapi_GetDeviceRole @57
+@DEF_EXCLUDE_WASAPI_SYMBOLS@PaWasapi_ThreadPriorityBoost @58
+@DEF_EXCLUDE_WASAPI_SYMBOLS@PaWasapi_ThreadPriorityRevert @59
+@DEF_EXCLUDE_WASAPI_SYMBOLS@PaWasapi_GetFramesPerHostBuffer @60
+@DEF_EXCLUDE_WASAPI_SYMBOLS@PaWasapi_GetJackDescription @61
+@DEF_EXCLUDE_WASAPI_SYMBOLS@PaWasapi_GetJackCount @62
-/** @page api_overview PortAudio API Overview\r
-\r
-This page provides a top-down overview of the entire PortAudio API. It describes how all of the PortAudio data types and functions fit together. It provides links to the documentation for each function and data type. You can find all of the detailed documentation for each API function and data type on the portaudio.h page.\r
-\r
-@section introduction Introduction\r
-\r
-PortAudio provides a uniform application programming interface (API) across all supported platforms. You can think of the PortAudio library as a wrapper that converts calls to the PortAudio API into calls to platform-specific native audio APIs. Operating systems often offer more than one native audio API and some APIs (such as JACK) may be available on multiple target operating systems. PortAudio supports all the major native audio APIs on each supported platform. The diagram below illustrates the relationship between your application, PortAudio, and the supported native audio APIs:\r
-\r
-@image html portaudio-external-architecture-diagram.png\r
-\r
-PortAudio provides a uniform interface to native audio APIs. However, it doesn't always provide totally uniform functionality. There are cases where PortAudio is limited by the capabilities of the underlying native audio API. For example, PortAudio doesn't provide sample rate conversion if you request a sample rate that is not supported by the native audio API. Another example is that the ASIO SDK only allows one device to be open at a time, so PortAudio/ASIO doesn't currently support opening multiple ASIO devices simultaneously.\r
-\r
-@section key_abstractions Key abstractions: Host APIs, Devices and Streams\r
-\r
-The PortAudio processing model includes three main abstractions: <i>Host APIs</i>, audio <i>Devices</i> and audio <i>Streams</i>.\r
-\r
-Host APIs represent platform-specific native audio APIs. Some examples of Host APIs are Core Audio on Mac OS, WMME and DirectSound on Windows and OSS and ALSA on Linux. The diagram in the previous section shows many of the supported native APIs. Sometimes it's useful to know which Host APIs you're dealing with, but it is easy to use PortAudio without ever interacting directly with the Host API abstraction.\r
-\r
-Devices represent individual hardware audio interfaces or audio ports on the host platform. Devices have names and certain capabilities such as supported sample rates and the number of supported input and output channels. PortAudio provides functions to enumerate available Devices and to query for Device capabilities.\r
-\r
-Streams manage active audio input and output from and to Devices. Streams may be half duplex (input or output) or full duplex (simultaneous input and output). Streams operate at a specific sample rate with particular sample formats, buffer sizes and internal buffering latencies. You specify these parameters when you open the Stream. Audio data is communicated between a Stream and your application via a user provided asynchronous callback function or by invoking synchronous read and write functions.\r
-\r
-PortAudio supports audio input and output in a variety of sample formats: 8, 16, 24 and 32 bit integer formats and 32 bit floating point, irrespective of the formats supported by the native audio API. PortAudio also supports multichannel buffers in both interleaved and non-interleaved (separate buffer per channel) formats and automatically performs conversion when necessary. If requested, PortAudio can clamp out-of range samples and/or dither to a native format.\r
-\r
-The PortAudio API offers the following functionality:\r
-- Initialize and terminate the library\r
-- Enumerate available Host APIs\r
-- Enumerate available Devices either globally, or within each Host API\r
-- Discover default or recommended Devices and Device settings\r
-- Discover Device capabilities such as supported audio data formats and sample rates\r
-- Create and control audio Streams to acquire audio from and output audio to Devices\r
-- Provide Stream timing information to support synchronising audio with other parts of your application\r
-- Retrieve version and error information.\r
-\r
-These functions are described in more detail below.\r
-\r
-\r
-@section top_level_functions Initialization, termination and utility functions\r
-\r
-The PortAudio library must be initialized before it can be used and terminated to clean up afterwards. You initialize PortAudio by calling Pa_Initialize() and clean up by calling Pa_Terminate(). \r
-\r
-You can query PortAudio for version information using Pa_GetVersion() to get a numeric version number and Pa_GetVersionText() to get a string.\r
-\r
-The size in bytes of the various sample formats represented by the @ref PaSampleFormat enumeration can be obtained using Pa_GetSampleSize().\r
-\r
-Pa_Sleep() sleeps for a specified number of milliseconds. This isn't intended for use in production systems; it's provided only as a simple portable way to implement tests and examples where the main thread sleeps while audio is acquired or played by an asynchronous callback function.\r
-\r
-@section host_apis Host APIs\r
-\r
-A Host API acts as a top-level grouping for all of the Devices offered by a single native platform audio API. Each Host API has a unique type identifier, a name, zero or more Devices, and nominated default input and output Devices. \r
-\r
-Host APIs are usually referenced by index: an integer of type @ref PaHostApiIndex that ranges between zero and Pa_GetHostApiCount() - 1. You can enumerate all available Host APIs by counting across this range.\r
-\r
-You can retrieve the index of the default Host API by calling Pa_GetDefaultHostApi().\r
-\r
-Information about a Host API, such as it's name and default devices, is stored in a @ref PaHostApiInfo structure. You can retrieve a pointer to a particular Host API's @ref PaHostApiInfo structure by calling Pa_GetHostApiInfo() with the Host API's index as a parameter.\r
-\r
-Most PortAudio functions reference Host APIs by @ref PaHostApiIndex indices. Each Host API also has a unique type identifier defined in the @ref PaHostApiTypeId enumeration.\r
-You can call Pa_HostApiTypeIdToHostApiIndex() to retrieve the current @ref PaHostApiIndex for a particular @ref PaHostApiTypeId.\r
-\r
-@section devices Devices\r
-\r
-A Device represents an audio endpoint provided by a particular native audio API. This usually corresponds to a specific input or output port on a hardware audio interface, or to the interface as a whole. Each Host API operates independently, so a single physical audio port may be addressable via different Devices exposed by different Host APIs.\r
-\r
-A Device has a name, is associated with a Host API, and has a maximum number of supported input and output channels. PortAudio provides recommended default latency values and a default sample rate for each Device. To obtain more detailed information about device capabilities you can call Pa_IsFormatSupported() to query whether it is possible to open a Stream using particular Devices, parameters and sample rate.\r
-\r
-Although each Device conceptually belongs to a specific Host API, most PortAudio functions and data structures refer to Devices using a global, Host API-independent index of type @ref PaDeviceIndex – an integer of that ranges between zero and Pa_GetDeviceCount() - 1. The reasons for this are partly historical but it also makes it easy for applications to ignore the Host API abstraction and just work with Devices and Streams.\r
-\r
-If you want to enumerate Devices belonging to a particular Host API you can count between 0 and PaHostApiInfo::deviceCount - 1. You can convert this Host API-specific index value to a global @ref PaDeviceIndex value by calling Pa_HostApiDeviceIndexToDeviceIndex().\r
-\r
-Information about a Device is stored in a @ref PaDeviceInfo structure. You can retrieve a pointer to a Devices's @ref PaDeviceInfo structure by calling Pa_GetDeviceInfo() with the Device's index as a parameter.\r
-\r
-You can retrieve the indices of the global default input and output devices using Pa_GetDefaultInputDevice() and Pa_GetDefaultOutputDevice(). Default Devices for each Host API are stored in the Host API's @ref PaHostApiInfo structures.\r
-\r
-For an example of enumerating devices and printing information about their capabilities see the pa_devs.c program in the test directory of the PortAudio distribution.\r
-\r
-@section streams Streams\r
-\r
-A Stream represents an active flow of audio data between your application and one or more audio Devices. A Stream operates at a specific sample rate with specific sample formats and buffer sizes.\r
-\r
-@subsection io_methods I/O Methods: callback and read/write\r
-\r
-PortAudio offers two methods for communicating audio data between an open Stream and your Application: (1) an asynchronous callback interface, where PortAudio calls a user defined callback function when new audio data is available or required, and (2) synchronous read and write functions which can be used in a blocking or non-blocking manner. You choose between the two methods when you open a Stream. The two methods are discussed in more detail below.\r
-\r
-@subsection opening_and_closing_streams Opening and Closing Streams\r
-\r
-You call Pa_OpenStream() to open a Stream, specifying the Device(s) to use, the number of input and output channels, sample formats, suggested latency values and flags that control dithering, clipping and overflow handling. You specify many of these parameters in two PaStreamParameters structures, one for input and one for output. If you're using the callback I/O method you also pass a callback buffer size, callback function pointer and user data pointer. \r
-\r
-Devices may be full duplex (supporting simultaneous input and output) or half duplex (supporting input or output) – usually this reflects the structure of the underlying native audio API. When opening a Stream you can specify one full duplex Device for both input and output, or two different Devices for input and output. Some Host APIs only support full-duplex operation with a full-duplex device (e.g. ASIO) but most are able to aggregate two half duplex devices into a full duplex Stream. PortAudio requires that all devices specified in a call to Pa_OpenStream() belong to the same Host API.\r
-\r
-A successful call to Pa_OpenStream() creates a pointer to a @ref PaStream – an opaque handle representing the open Stream. All PortAudio API functions that operate on open Streams take a pointer to a @ref PaStream as their first parameter.\r
-\r
-PortAudio also provides Pa_OpenDefaultStream() – a simpler alternative to Pa_OpenStream() which you can use when you want to open the default audio Device(s) with default latency parameters.\r
-\r
-You call Pa_CloseStream() to close a Stream when you've finished using it.\r
-\r
-@subsection starting_and_stopping_streams Starting and Stopping Streams\r
-\r
-Newly opened Streams are initially stopped. You call Pa_StartStream() to start a Stream. You can stop a running Stream using Pa_StopStream() or Pa_AbortStream() (the Stop function plays out all internally queued audio data, while Abort tries to stop as quickly as possible). An open Stream can be started and stopped multiple times. You can call Pa_IsStreamStopped() to query whether a Stream is running or stopped.\r
-\r
-By calling Pa_SetStreamFinishedCallback() it is possible to register a special @ref PaStreamFinishedCallback that will be called when the Stream has completed playing any internally queued buffers. This can be used in conjunction with the @ref paComplete stream callback return value (see below) to avoid blocking on a call to Pa_StopStream() while queued audio data is still playing.\r
-\r
-@subsection callback_io_method The Callback I/O Method\r
-\r
-So-called 'callback Streams' operate by periodically invoking a callback function you supply to Pa_OpenStream(). The callback function must implement the @ref PaStreamCallback signature. It gets called by PortAudio every time PortAudio needs your application to consume or produce audio data. The callback is passed pointers to buffers containing the audio to process. The format (interleave, sample data type) and size of these buffers is determined by the parameters passed to Pa_OpenStream() when the Stream was opened.\r
-\r
-Stream callbacks usually return @ref paContinue to indicate that PortAudio should keep the stream running. It is possible to deactivate a Stream from the stream callback by returning either @ref paComplete or @ref paAbort. In this case the Stream enters a deactivated state after the last buffer has finished playing (@ref paComplete) or as soon as possible (@ref paAbort). You can detect the deactivated state by calling Pa_IsStreamActive() or by using Pa_SetStreamFinishedCallback() to subscribe to a stream finished notification. Note that even if the stream callback returns @ref paComplete it's still necessary to call Pa_StopStream() or Pa_AbortStream() to enter the stopped state.\r
-\r
-Many of the tests in the /tests directory of the PortAudio distribution implement PortAudio stream callbacks. For example see: patest_sine.c (audio output), patest_record.c (audio input), patest_wire.c (audio pass-through) and pa_fuzz.c (simple audio effects processing).\r
-\r
-<strong>IMPORTANT:</strong> The stream callback function often needs to operate with very high or real-time priority. As a result there are strict requirements placed on the type of code that can be executed in a stream callback. In general this means avoiding any code that might block, including: acquiring locks, calling OS API functions including allocating memory. With the exception of Pa_GetStreamCpuLoad() you may not call PortAudio API functions from within the stream callback.\r
-\r
-@subsection read_write_io_method The Read/Write I/O Method\r
-\r
-As an alternative to the callback I/O method, PortAudio provides a synchronous read/write interface for acquiring and playing audio. This can be useful for applications that don't require the lowest possibly latency, or don't warrant the increased complexity of synchronising with an asynchronous callback funciton. This I/O method is also useful when calling PortAudio from programming languages that don't support asynchronous callbacks. \r
-\r
-To open a Stream in read/write mode you pass a NULL stream callback function pointer to Pa_OpenStream().\r
-\r
-To write audio data to a Stream call Pa_WriteStream() and to read data call Pa_ReadStream(). These functions will block if the internal buffers are full, making them safe to call in a tight loop. If you want to avoid blocking you can query the amount of available read or write space using Pa_GetStreamReadAvailable() or Pa_GetStreamWriteAvailable() and use the returned values to limit the amount of data you read or write.\r
-\r
-For examples of the read/write I/O method see the following examples in the /tests directory of the PortAudio distribution: patest_read_record.c (audio input), patest_write_sine.c (audio output), patest_read_write_wire.c (audio pass-through).\r
-\r
-@subsection stream_info Retrieving Stream Information\r
-\r
-You can retrieve information about an open Stream by calling Pa_GetStreamInfo(). This returns a @ref PaStreamInfo structure containing the actual input and output latency and sample rate of the stream. It's possible for these values to be different from the suggested values passed to Pa_OpenStream().\r
-\r
-When using a callback stream you can call Pa_GetStreamCpuLoad() to retrieve a rough estimate of the amount of CPU time your callback function is using.\r
-\r
-@subsection stream_timing Stream Timing Information\r
-\r
-When using the callback I/O method your stream callback function receives timing information via a pointer to a PaStreamCallbackTimeInfo structure. This structure contains the current time along with the estimated hardware capture and playback time of the first sample of the input and output buffers. All times are measured in seconds relative to a Stream-specific clock. The current Stream clock time can be retrieved using Pa_GetStreamTime().\r
-\r
-You can use the stream callback @ref PaStreamCallbackTimeInfo times in conjunction with timestamps returned by Pa_GetStreamTime() to implement time synchronization schemes such as time aligning your GUI display with rendered audio, or maintaining synchronization between MIDI and audio playback.\r
-\r
-@section error_handling Error Handling\r
-\r
-Most PortAudio functions return error codes using values from the @ref PaError enumeration. All error codes are negative values. Some functions return values greater than or equal to zero for normal results and a negative error code in case of error.\r
-\r
-You can convert @ref PaError error codes to human readable text by calling Pa_GetErrorText().\r
-\r
-PortAudio usually tries to translate error conditions into portable @ref PaError error codes. However if an unexpected error is encountered the @ref paUnanticipatedHostError code may be returned. In this case a further mechanism is provided to query for Host API-specific error information. If PortAudio returns @ref paUnanticipatedHostError you can call Pa_GetLastHostErrorInfo() to retrieve a pointer to a @ref PaHostErrorInfo structure that provides more information, including the Host API that encountered the error, a native API error code and error text. \r
-\r
-@section host_api_extensions Host API and Platform-specific Extensions\r
-\r
-The public PortAudio API only exposes functionality that can be provided across all target platforms. In some cases individual native audio APIs offer unique functionality. Some PortAudio Host APIs expose this functionality via Host API-specific extensions. Examples include access to low-level buffering and priority parameters, opening a Stream with only a subset of a Device's channels, or accessing channel metadata such as channel names.\r
-\r
-Host API-specific extensions are provided in the form of additional functions and data structures defined in Host API-specific header files found in the /include directory.\r
-\r
-The @ref PaStreamParameters structure passed to Pa_IsFormatSupported() and Pa_OpenStream() has a field named @ref PaStreamParameters::hostApiSpecificStreamInfo that is sometimes used to pass low level information when opening a Stream.\r
-\r
-See the documentation for the individual Host API-specific header files for details of the extended functionality they expose:\r
-\r
-- pa_asio.h\r
-- pa_jack.h\r
-- pa_linux_alsa.h\r
-- pa_mac_core.h\r
-- pa_win_ds.h\r
-- pa_win_wasapi.h\r
-- pa_win_wmme.h\r
-- pa_win_waveformat.h\r
-\r
+/** @page api_overview PortAudio API Overview
+
+This page provides a top-down overview of the entire PortAudio API. It describes how all of the PortAudio data types and functions fit together. It provides links to the documentation for each function and data type. You can find all of the detailed documentation for each API function and data type on the portaudio.h page.
+
+@section introduction Introduction
+
+PortAudio provides a uniform application programming interface (API) across all supported platforms. You can think of the PortAudio library as a wrapper that converts calls to the PortAudio API into calls to platform-specific native audio APIs. Operating systems often offer more than one native audio API and some APIs (such as JACK) may be available on multiple target operating systems. PortAudio supports all the major native audio APIs on each supported platform. The diagram below illustrates the relationship between your application, PortAudio, and the supported native audio APIs:
+
+@image html portaudio-external-architecture-diagram.png
+
+PortAudio provides a uniform interface to native audio APIs. However, it doesn't always provide totally uniform functionality. There are cases where PortAudio is limited by the capabilities of the underlying native audio API. For example, PortAudio doesn't provide sample rate conversion if you request a sample rate that is not supported by the native audio API. Another example is that the ASIO SDK only allows one device to be open at a time, so PortAudio/ASIO doesn't currently support opening multiple ASIO devices simultaneously.
+
+@section key_abstractions Key abstractions: Host APIs, Devices and Streams
+
+The PortAudio processing model includes three main abstractions: <i>Host APIs</i>, audio <i>Devices</i> and audio <i>Streams</i>.
+
+Host APIs represent platform-specific native audio APIs. Some examples of Host APIs are Core Audio on Mac OS, WMME and DirectSound on Windows and OSS and ALSA on Linux. The diagram in the previous section shows many of the supported native APIs. Sometimes it's useful to know which Host APIs you're dealing with, but it is easy to use PortAudio without ever interacting directly with the Host API abstraction.
+
+Devices represent individual hardware audio interfaces or audio ports on the host platform. Devices have names and certain capabilities such as supported sample rates and the number of supported input and output channels. PortAudio provides functions to enumerate available Devices and to query for Device capabilities.
+
+Streams manage active audio input and output from and to Devices. Streams may be half duplex (input or output) or full duplex (simultaneous input and output). Streams operate at a specific sample rate with particular sample formats, buffer sizes and internal buffering latencies. You specify these parameters when you open the Stream. Audio data is communicated between a Stream and your application via a user provided asynchronous callback function or by invoking synchronous read and write functions.
+
+PortAudio supports audio input and output in a variety of sample formats: 8, 16, 24 and 32 bit integer formats and 32 bit floating point, irrespective of the formats supported by the native audio API. PortAudio also supports multichannel buffers in both interleaved and non-interleaved (separate buffer per channel) formats and automatically performs conversion when necessary. If requested, PortAudio can clamp out-of range samples and/or dither to a native format.
+
+The PortAudio API offers the following functionality:
+- Initialize and terminate the library
+- Enumerate available Host APIs
+- Enumerate available Devices either globally, or within each Host API
+- Discover default or recommended Devices and Device settings
+- Discover Device capabilities such as supported audio data formats and sample rates
+- Create and control audio Streams to acquire audio from and output audio to Devices
+- Provide Stream timing information to support synchronising audio with other parts of your application
+- Retrieve version and error information.
+
+These functions are described in more detail below.
+
+
+@section top_level_functions Initialization, termination and utility functions
+
+The PortAudio library must be initialized before it can be used and terminated to clean up afterwards. You initialize PortAudio by calling Pa_Initialize() and clean up by calling Pa_Terminate().
+
+You can query PortAudio for version information using Pa_GetVersion() to get a numeric version number and Pa_GetVersionText() to get a string.
+
+The size in bytes of the various sample formats represented by the @ref PaSampleFormat enumeration can be obtained using Pa_GetSampleSize().
+
+Pa_Sleep() sleeps for a specified number of milliseconds. This isn't intended for use in production systems; it's provided only as a simple portable way to implement tests and examples where the main thread sleeps while audio is acquired or played by an asynchronous callback function.
+
+@section host_apis Host APIs
+
+A Host API acts as a top-level grouping for all of the Devices offered by a single native platform audio API. Each Host API has a unique type identifier, a name, zero or more Devices, and nominated default input and output Devices.
+
+Host APIs are usually referenced by index: an integer of type @ref PaHostApiIndex that ranges between zero and Pa_GetHostApiCount() - 1. You can enumerate all available Host APIs by counting across this range.
+
+You can retrieve the index of the default Host API by calling Pa_GetDefaultHostApi().
+
+Information about a Host API, such as it's name and default devices, is stored in a @ref PaHostApiInfo structure. You can retrieve a pointer to a particular Host API's @ref PaHostApiInfo structure by calling Pa_GetHostApiInfo() with the Host API's index as a parameter.
+
+Most PortAudio functions reference Host APIs by @ref PaHostApiIndex indices. Each Host API also has a unique type identifier defined in the @ref PaHostApiTypeId enumeration.
+You can call Pa_HostApiTypeIdToHostApiIndex() to retrieve the current @ref PaHostApiIndex for a particular @ref PaHostApiTypeId.
+
+@section devices Devices
+
+A Device represents an audio endpoint provided by a particular native audio API. This usually corresponds to a specific input or output port on a hardware audio interface, or to the interface as a whole. Each Host API operates independently, so a single physical audio port may be addressable via different Devices exposed by different Host APIs.
+
+A Device has a name, is associated with a Host API, and has a maximum number of supported input and output channels. PortAudio provides recommended default latency values and a default sample rate for each Device. To obtain more detailed information about device capabilities you can call Pa_IsFormatSupported() to query whether it is possible to open a Stream using particular Devices, parameters and sample rate.
+
+Although each Device conceptually belongs to a specific Host API, most PortAudio functions and data structures refer to Devices using a global, Host API-independent index of type @ref PaDeviceIndex – an integer of that ranges between zero and Pa_GetDeviceCount() - 1. The reasons for this are partly historical but it also makes it easy for applications to ignore the Host API abstraction and just work with Devices and Streams.
+
+If you want to enumerate Devices belonging to a particular Host API you can count between 0 and PaHostApiInfo::deviceCount - 1. You can convert this Host API-specific index value to a global @ref PaDeviceIndex value by calling Pa_HostApiDeviceIndexToDeviceIndex().
+
+Information about a Device is stored in a @ref PaDeviceInfo structure. You can retrieve a pointer to a Devices's @ref PaDeviceInfo structure by calling Pa_GetDeviceInfo() with the Device's index as a parameter.
+
+You can retrieve the indices of the global default input and output devices using Pa_GetDefaultInputDevice() and Pa_GetDefaultOutputDevice(). Default Devices for each Host API are stored in the Host API's @ref PaHostApiInfo structures.
+
+For an example of enumerating devices and printing information about their capabilities see the pa_devs.c program in the test directory of the PortAudio distribution.
+
+@section streams Streams
+
+A Stream represents an active flow of audio data between your application and one or more audio Devices. A Stream operates at a specific sample rate with specific sample formats and buffer sizes.
+
+@subsection io_methods I/O Methods: callback and read/write
+
+PortAudio offers two methods for communicating audio data between an open Stream and your Application: (1) an asynchronous callback interface, where PortAudio calls a user defined callback function when new audio data is available or required, and (2) synchronous read and write functions which can be used in a blocking or non-blocking manner. You choose between the two methods when you open a Stream. The two methods are discussed in more detail below.
+
+@subsection opening_and_closing_streams Opening and Closing Streams
+
+You call Pa_OpenStream() to open a Stream, specifying the Device(s) to use, the number of input and output channels, sample formats, suggested latency values and flags that control dithering, clipping and overflow handling. You specify many of these parameters in two PaStreamParameters structures, one for input and one for output. If you're using the callback I/O method you also pass a callback buffer size, callback function pointer and user data pointer.
+
+Devices may be full duplex (supporting simultaneous input and output) or half duplex (supporting input or output) – usually this reflects the structure of the underlying native audio API. When opening a Stream you can specify one full duplex Device for both input and output, or two different Devices for input and output. Some Host APIs only support full-duplex operation with a full-duplex device (e.g. ASIO) but most are able to aggregate two half duplex devices into a full duplex Stream. PortAudio requires that all devices specified in a call to Pa_OpenStream() belong to the same Host API.
+
+A successful call to Pa_OpenStream() creates a pointer to a @ref PaStream – an opaque handle representing the open Stream. All PortAudio API functions that operate on open Streams take a pointer to a @ref PaStream as their first parameter.
+
+PortAudio also provides Pa_OpenDefaultStream() – a simpler alternative to Pa_OpenStream() which you can use when you want to open the default audio Device(s) with default latency parameters.
+
+You call Pa_CloseStream() to close a Stream when you've finished using it.
+
+@subsection starting_and_stopping_streams Starting and Stopping Streams
+
+Newly opened Streams are initially stopped. You call Pa_StartStream() to start a Stream. You can stop a running Stream using Pa_StopStream() or Pa_AbortStream() (the Stop function plays out all internally queued audio data, while Abort tries to stop as quickly as possible). An open Stream can be started and stopped multiple times. You can call Pa_IsStreamStopped() to query whether a Stream is running or stopped.
+
+By calling Pa_SetStreamFinishedCallback() it is possible to register a special @ref PaStreamFinishedCallback that will be called when the Stream has completed playing any internally queued buffers. This can be used in conjunction with the @ref paComplete stream callback return value (see below) to avoid blocking on a call to Pa_StopStream() while queued audio data is still playing.
+
+@subsection callback_io_method The Callback I/O Method
+
+So-called 'callback Streams' operate by periodically invoking a callback function you supply to Pa_OpenStream(). The callback function must implement the @ref PaStreamCallback signature. It gets called by PortAudio every time PortAudio needs your application to consume or produce audio data. The callback is passed pointers to buffers containing the audio to process. The format (interleave, sample data type) and size of these buffers is determined by the parameters passed to Pa_OpenStream() when the Stream was opened.
+
+Stream callbacks usually return @ref paContinue to indicate that PortAudio should keep the stream running. It is possible to deactivate a Stream from the stream callback by returning either @ref paComplete or @ref paAbort. In this case the Stream enters a deactivated state after the last buffer has finished playing (@ref paComplete) or as soon as possible (@ref paAbort). You can detect the deactivated state by calling Pa_IsStreamActive() or by using Pa_SetStreamFinishedCallback() to subscribe to a stream finished notification. Note that even if the stream callback returns @ref paComplete it's still necessary to call Pa_StopStream() or Pa_AbortStream() to enter the stopped state.
+
+Many of the tests in the /tests directory of the PortAudio distribution implement PortAudio stream callbacks. For example see: patest_sine.c (audio output), patest_record.c (audio input), patest_wire.c (audio pass-through) and pa_fuzz.c (simple audio effects processing).
+
+<strong>IMPORTANT:</strong> The stream callback function often needs to operate with very high or real-time priority. As a result there are strict requirements placed on the type of code that can be executed in a stream callback. In general this means avoiding any code that might block, including: acquiring locks, calling OS API functions including allocating memory. With the exception of Pa_GetStreamCpuLoad() you may not call PortAudio API functions from within the stream callback.
+
+@subsection read_write_io_method The Read/Write I/O Method
+
+As an alternative to the callback I/O method, PortAudio provides a synchronous read/write interface for acquiring and playing audio. This can be useful for applications that don't require the lowest possibly latency, or don't warrant the increased complexity of synchronising with an asynchronous callback funciton. This I/O method is also useful when calling PortAudio from programming languages that don't support asynchronous callbacks.
+
+To open a Stream in read/write mode you pass a NULL stream callback function pointer to Pa_OpenStream().
+
+To write audio data to a Stream call Pa_WriteStream() and to read data call Pa_ReadStream(). These functions will block if the internal buffers are full, making them safe to call in a tight loop. If you want to avoid blocking you can query the amount of available read or write space using Pa_GetStreamReadAvailable() or Pa_GetStreamWriteAvailable() and use the returned values to limit the amount of data you read or write.
+
+For examples of the read/write I/O method see the following examples in the /tests directory of the PortAudio distribution: patest_read_record.c (audio input), patest_write_sine.c (audio output), patest_read_write_wire.c (audio pass-through).
+
+@subsection stream_info Retrieving Stream Information
+
+You can retrieve information about an open Stream by calling Pa_GetStreamInfo(). This returns a @ref PaStreamInfo structure containing the actual input and output latency and sample rate of the stream. It's possible for these values to be different from the suggested values passed to Pa_OpenStream().
+
+When using a callback stream you can call Pa_GetStreamCpuLoad() to retrieve a rough estimate of the amount of CPU time your callback function is using.
+
+@subsection stream_timing Stream Timing Information
+
+When using the callback I/O method your stream callback function receives timing information via a pointer to a PaStreamCallbackTimeInfo structure. This structure contains the current time along with the estimated hardware capture and playback time of the first sample of the input and output buffers. All times are measured in seconds relative to a Stream-specific clock. The current Stream clock time can be retrieved using Pa_GetStreamTime().
+
+You can use the stream callback @ref PaStreamCallbackTimeInfo times in conjunction with timestamps returned by Pa_GetStreamTime() to implement time synchronization schemes such as time aligning your GUI display with rendered audio, or maintaining synchronization between MIDI and audio playback.
+
+@section error_handling Error Handling
+
+Most PortAudio functions return error codes using values from the @ref PaError enumeration. All error codes are negative values. Some functions return values greater than or equal to zero for normal results and a negative error code in case of error.
+
+You can convert @ref PaError error codes to human readable text by calling Pa_GetErrorText().
+
+PortAudio usually tries to translate error conditions into portable @ref PaError error codes. However if an unexpected error is encountered the @ref paUnanticipatedHostError code may be returned. In this case a further mechanism is provided to query for Host API-specific error information. If PortAudio returns @ref paUnanticipatedHostError you can call Pa_GetLastHostErrorInfo() to retrieve a pointer to a @ref PaHostErrorInfo structure that provides more information, including the Host API that encountered the error, a native API error code and error text.
+
+@section host_api_extensions Host API and Platform-specific Extensions
+
+The public PortAudio API only exposes functionality that can be provided across all target platforms. In some cases individual native audio APIs offer unique functionality. Some PortAudio Host APIs expose this functionality via Host API-specific extensions. Examples include access to low-level buffering and priority parameters, opening a Stream with only a subset of a Device's channels, or accessing channel metadata such as channel names.
+
+Host API-specific extensions are provided in the form of additional functions and data structures defined in Host API-specific header files found in the /include directory.
+
+The @ref PaStreamParameters structure passed to Pa_IsFormatSupported() and Pa_OpenStream() has a field named @ref PaStreamParameters::hostApiSpecificStreamInfo that is sometimes used to pass low level information when opening a Stream.
+
+See the documentation for the individual Host API-specific header files for details of the extended functionality they expose:
+
+- pa_asio.h
+- pa_jack.h
+- pa_linux_alsa.h
+- pa_mac_core.h
+- pa_win_ds.h
+- pa_win_wasapi.h
+- pa_win_wmme.h
+- pa_win_waveformat.h
+
*/
\ No newline at end of file
-/** @page License PortAudio License\r
-\r
-PortAudio Portable Real-Time Audio Library <br>\r
-Copyright (c) 1999-2011 Ross Bencina, Phil Burk\r
-\r
-\r
-\r
-Permission is hereby granted, free of charge, to any person obtaining\r
-a copy of this software and associated documentation files\r
-(the "Software"), to deal in the Software without restriction,\r
-including without limitation the rights to use, copy, modify, merge,\r
-publish, distribute, sublicense, and/or sell copies of the Software,\r
-and to permit persons to whom the Software is furnished to do so,\r
-subject to the following conditions:\r
-\r
-The above copyright notice and this permission notice shall be\r
-included in all copies or substantial portions of the Software.\r
-\r
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\r
-IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\r
-ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\r
-CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\r
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
-\r
-<br>\r
-\r
-The text above constitutes the entire PortAudio license; however, \r
-the PortAudio community also makes the following non-binding requests:\r
-\r
-Any person wishing to distribute modifications to the Software is\r
-requested to send the modifications to the original developer so that\r
-they can be incorporated into the canonical version. It is also \r
-requested that these non-binding requests be included along with the \r
-license above.\r
-\r
+/** @page License PortAudio License
+
+PortAudio Portable Real-Time Audio Library <br>
+Copyright (c) 1999-2011 Ross Bencina, Phil Burk
+
+
+
+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.
+
+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.
+
+<br>
+
+The text above constitutes the entire PortAudio license; however,
+the PortAudio community also makes the following non-binding requests:
+
+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. It is also
+requested that these non-binding requests be included along with the
+license above.
+
*/
\ No newline at end of file
-/* doxygen index page */\r
-/** @mainpage\r
-\r
-@section overview Overview\r
-\r
-PortAudio is a cross-platform, open-source C language library for real-time audio input and output.\r
-The library provides functions that allow your software to acquire and output real-time audio streams from your computer's hardware audio interfaces. It is designed to simplify writing cross-platform audio applications, and also to simplify the development of audio software in general by hiding the complexities of dealing directly with each native audio API. PortAudio is used to implement sound recording, editing and mixing applications, software synthesizers, effects processors, music players, internet telephony applications, software defined radios and more. Supported platforms include MS Windows, Mac OS X and Linux. Third-party language bindings make it possible to call PortAudio from other programming languages including @ref java_binding "Java", C++, C#, Python, PureBasic, FreePascal and Lazarus.\r
-\r
-@section start_here Start here\r
-\r
-- @ref api_overview<br>\r
-A top-down view of the PortAudio API, its capabilities, functions and data structures\r
-\r
-- @ref tutorial_start<br> \r
-Get started writing code with PortAudio tutorials\r
-\r
-- @ref examples_src "Examples"<br>\r
-Simple example programs demonstrating PortAudio usage\r
-\r
-- @ref License<br>\r
-PortAudio is licenced under the MIT Expat open source licence. We make a non-binding request for you to contribute your changes back to the project.\r
-\r
-\r
-@section reference API Reference\r
-\r
-- portaudio.h Portable API<br>\r
-Detailed documentation for each portable API function and data type\r
-\r
-- @ref public_header "Host API Specific Extensions"<br>\r
-Documentation for non-portable platform-specific host API extensions\r
-\r
-\r
-@section resources Resources\r
-\r
-- <a href="http://www.portaudio.com">The PortAudio website</a>\r
-\r
-- <a href="http://music.columbia.edu/mailman/listinfo/portaudio/">Our mailing list for users and developers</a><br>\r
-\r
-- <a href="http://www.assembla.com/spaces/portaudio/wiki">The PortAudio wiki</a>\r
-\r
-- @ref java_binding<br>\r
-Documentation for the Java JNI interface to PortAudio\r
-\r
-@section developer_resources Developer Resources\r
-\r
-@if INTERNAL\r
-- @ref srcguide\r
-@endif\r
-\r
-- <a href="http://www.assembla.com/spaces/portaudio/wiki">Our wiki and issue tracking system</a>\r
-\r
-- <a href="https://www.assembla.com/spaces/portaudio/wiki/DeveloperGuidelines">Developer guidelines</a>\r
-\r
-- <a href="https://www.assembla.com/spaces/portaudio/wiki/ImplementationStyleGuidelines">Implementation style guidelines</a>\r
-\r
-If you're interested in helping out with PortAudio development we're more than happy for you to be involved. Just drop by the PortAudio mailing list and ask how you can help. Or <a href="http://www.assembla.com/spaces/portaudio/tickets">check out the starter tickets</a>.\r
-\r
-\r
-@section older_api_versions Older API Versions\r
-\r
-This documentation covers the current API version: PortAudio V19, API version 2.0. API 2.0 differs in a number of ways from previous versions (most often encountered in PortAudio V18), please consult the enhancement proposals for details of what was added/changed for V19:\r
-http://www.portaudio.com/docs/proposals/index.html\r
-\r
+/* doxygen index page */
+/** @mainpage
+
+@section overview Overview
+
+PortAudio is a cross-platform, open-source C language library for real-time audio input and output.
+The library provides functions that allow your software to acquire and output real-time audio streams from your computer's hardware audio interfaces. It is designed to simplify writing cross-platform audio applications, and also to simplify the development of audio software in general by hiding the complexities of dealing directly with each native audio API. PortAudio is used to implement sound recording, editing and mixing applications, software synthesizers, effects processors, music players, internet telephony applications, software defined radios and more. Supported platforms include MS Windows, Mac OS X and Linux. Third-party language bindings make it possible to call PortAudio from other programming languages including @ref java_binding "Java", C++, C#, Python, PureBasic, FreePascal and Lazarus.
+
+@section start_here Start here
+
+- @ref api_overview<br>
+A top-down view of the PortAudio API, its capabilities, functions and data structures
+
+- @ref tutorial_start<br>
+Get started writing code with PortAudio tutorials
+
+- @ref examples_src "Examples"<br>
+Simple example programs demonstrating PortAudio usage
+
+- @ref License<br>
+PortAudio is licenced under the MIT Expat open source licence. We make a non-binding request for you to contribute your changes back to the project.
+
+
+@section reference API Reference
+
+- portaudio.h Portable API<br>
+Detailed documentation for each portable API function and data type
+
+- @ref public_header "Host API Specific Extensions"<br>
+Documentation for non-portable platform-specific host API extensions
+
+
+@section resources Resources
+
+- <a href="http://www.portaudio.com">The PortAudio website</a>
+
+- <a href="http://music.columbia.edu/mailman/listinfo/portaudio/">Our mailing list for users and developers</a><br>
+
+- <a href="http://www.assembla.com/spaces/portaudio/wiki">The PortAudio wiki</a>
+
+- @ref java_binding<br>
+Documentation for the Java JNI interface to PortAudio
+
+@section developer_resources Developer Resources
+
+@if INTERNAL
+- @ref srcguide
+@endif
+
+- <a href="http://www.assembla.com/spaces/portaudio/wiki">Our wiki and issue tracking system</a>
+
+- <a href="https://www.assembla.com/spaces/portaudio/wiki/DeveloperGuidelines">Developer guidelines</a>
+
+- <a href="https://www.assembla.com/spaces/portaudio/wiki/ImplementationStyleGuidelines">Implementation style guidelines</a>
+
+If you're interested in helping out with PortAudio development we're more than happy for you to be involved. Just drop by the PortAudio mailing list and ask how you can help. Or <a href="http://www.assembla.com/spaces/portaudio/tickets">check out the starter tickets</a>.
+
+
+@section older_api_versions Older API Versions
+
+This documentation covers the current API version: PortAudio V19, API version 2.0. API 2.0 differs in a number of ways from previous versions (most often encountered in PortAudio V18), please consult the enhancement proposals for details of what was added/changed for V19:
+http://www.portaudio.com/docs/proposals/index.html
+
*/
\ No newline at end of file
-/*\r
- define all of the file groups used to structure the documentation.\r
-*/\r
-\r
-/**\r
- @defgroup public_header Public API definitions for users of PortAudio \r
-*/\r
-\r
-/**\r
- @internal\r
- @defgroup common_src Source code common to all implementations\r
-*/\r
-\r
-/**\r
- @internal\r
- @defgroup win_src Source code common to all Windows implementations\r
-*/\r
-\r
-/**\r
- @internal\r
- @defgroup unix_src Source code common to all Unix implementations\r
-*/\r
-\r
-/**\r
- @internal\r
- @defgroup macosx_src Source code common to all Macintosh implementations\r
-*/\r
-\r
-/**\r
- @internal\r
- @defgroup hostapi_src Source code for specific Host APIs\r
-*/\r
-\r
-/**\r
- @internal\r
- @defgroup test_src Test programs\r
-*/\r
-\r
-/**\r
- @defgroup examples_src Example programs demonstrating PortAudio usage\r
-*/\r
-\r
-/**\r
- @internal\r
- @page srcguide A guide to the PortAudio sources\r
-\r
- - \ref public_header\r
- - \ref examples_src\r
- - \ref common_src\r
- - \ref win_src\r
- - \ref unix_src\r
- - \ref macosx_src\r
- - \ref hostapi_src\r
- - \ref test_src\r
+/*
+ define all of the file groups used to structure the documentation.
+*/
+
+/**
+ @defgroup public_header Public API definitions for users of PortAudio
+*/
+
+/**
+ @internal
+ @defgroup common_src Source code common to all implementations
+*/
+
+/**
+ @internal
+ @defgroup win_src Source code common to all Windows implementations
+*/
+
+/**
+ @internal
+ @defgroup unix_src Source code common to all Unix implementations
+*/
+
+/**
+ @internal
+ @defgroup macosx_src Source code common to all Macintosh implementations
+*/
+
+/**
+ @internal
+ @defgroup hostapi_src Source code for specific Host APIs
+*/
+
+/**
+ @internal
+ @defgroup test_src Test programs
+*/
+
+/**
+ @defgroup examples_src Example programs demonstrating PortAudio usage
+*/
+
+/**
+ @internal
+ @page srcguide A guide to the PortAudio sources
+
+ - \ref public_header
+ - \ref examples_src
+ - \ref common_src
+ - \ref win_src
+ - \ref unix_src
+ - \ref macosx_src
+ - \ref hostapi_src
+ - \ref test_src
*/
\ No newline at end of file
-/** @page blocking_read_write Blocking Read/Write Functions\r
-@ingroup tutorial\r
-\r
-PortAudio V19 adds a huge advance over previous versions with a feature called Blocking I/O. Although it may have lower performance that the callback method described earlier in this tutorial, blocking I/O is easier to understand and is, in some cases, more compatible with third party systems than the callback method. Most people starting audio programming also find Blocking I/O easier to learn.\r
-\r
-Blocking I/O works in much the same way as the callback method except that instead of providing a function to provide (or consume) audio data, you must feed data to (or consume data from) PortAudio at regular intervals, usually inside a loop. The example below, excepted from patest_read_write_wire.c, shows how to open the default device, and pass data from its input to its output for a set period of time. Note that we use the default high latency values to help avoid underruns since we are usually reading and writing audio data from a relatively low priority thread, and there is usually extra buffering required to make blocking I/O work.\r
-\r
-Note that not all API's implement Blocking I/O at this point, so for maximum portability or performance, you'll still want to use callbacks.\r
-\r
-@code\r
- /* -- initialize PortAudio -- */\r
- err = Pa_Initialize();\r
- if( err != paNoError ) goto error;\r
-\r
- /* -- setup input and output -- */\r
- inputParameters.device = Pa_GetDefaultInputDevice(); /* default input device */\r
- inputParameters.channelCount = NUM_CHANNELS;\r
- inputParameters.sampleFormat = PA_SAMPLE_TYPE;\r
- inputParameters.suggestedLatency = Pa_GetDeviceInfo( inputParameters.device )->defaultHighInputLatency ;\r
- inputParameters.hostApiSpecificStreamInfo = NULL;\r
-\r
- outputParameters.device = Pa_GetDefaultOutputDevice(); /* default output device */\r
- outputParameters.channelCount = NUM_CHANNELS;\r
- outputParameters.sampleFormat = PA_SAMPLE_TYPE;\r
- outputParameters.suggestedLatency = Pa_GetDeviceInfo( outputParameters.device )->defaultHighOutputLatency;\r
- outputParameters.hostApiSpecificStreamInfo = NULL;\r
-\r
- /* -- setup stream -- */\r
- err = Pa_OpenStream(\r
- &stream,\r
- &inputParameters,\r
- &outputParameters,\r
- SAMPLE_RATE,\r
- FRAMES_PER_BUFFER,\r
- paClipOff, /* we won't output out of range samples so don't bother clipping them */\r
- NULL, /* no callback, use blocking API */\r
- NULL ); /* no callback, so no callback userData */\r
- if( err != paNoError ) goto error;\r
-\r
- /* -- start stream -- */\r
- err = Pa_StartStream( stream );\r
- if( err != paNoError ) goto error;\r
- printf("Wire on. Will run one minute.\n"); fflush(stdout);\r
-\r
- /* -- Here's the loop where we pass data from input to output -- */\r
- for( i=0; i<(60*SAMPLE_RATE)/FRAMES_PER_BUFFER; ++i )\r
- {\r
- err = Pa_WriteStream( stream, sampleBlock, FRAMES_PER_BUFFER );\r
- if( err ) goto xrun;\r
- err = Pa_ReadStream( stream, sampleBlock, FRAMES_PER_BUFFER );\r
- if( err ) goto xrun;\r
- }\r
- /* -- Now we stop the stream -- */\r
- err = Pa_StopStream( stream );\r
- if( err != paNoError ) goto error;\r
-\r
- /* -- don't forget to cleanup! -- */\r
- err = Pa_CloseStream( stream );\r
- if( err != paNoError ) goto error;\r
-\r
- Pa_Terminate();\r
- return 0;\r
-@endcode\r
-\r
-\r
-Previous: \ref querying_devices | Next: \ref exploring\r
-\r
+/** @page blocking_read_write Blocking Read/Write Functions
+@ingroup tutorial
+
+PortAudio V19 adds a huge advance over previous versions with a feature called Blocking I/O. Although it may have lower performance that the callback method described earlier in this tutorial, blocking I/O is easier to understand and is, in some cases, more compatible with third party systems than the callback method. Most people starting audio programming also find Blocking I/O easier to learn.
+
+Blocking I/O works in much the same way as the callback method except that instead of providing a function to provide (or consume) audio data, you must feed data to (or consume data from) PortAudio at regular intervals, usually inside a loop. The example below, excepted from patest_read_write_wire.c, shows how to open the default device, and pass data from its input to its output for a set period of time. Note that we use the default high latency values to help avoid underruns since we are usually reading and writing audio data from a relatively low priority thread, and there is usually extra buffering required to make blocking I/O work.
+
+Note that not all API's implement Blocking I/O at this point, so for maximum portability or performance, you'll still want to use callbacks.
+
+@code
+ /* -- initialize PortAudio -- */
+ err = Pa_Initialize();
+ if( err != paNoError ) goto error;
+
+ /* -- setup input and output -- */
+ inputParameters.device = Pa_GetDefaultInputDevice(); /* default input device */
+ inputParameters.channelCount = NUM_CHANNELS;
+ inputParameters.sampleFormat = PA_SAMPLE_TYPE;
+ inputParameters.suggestedLatency = Pa_GetDeviceInfo( inputParameters.device )->defaultHighInputLatency ;
+ inputParameters.hostApiSpecificStreamInfo = NULL;
+
+ outputParameters.device = Pa_GetDefaultOutputDevice(); /* default output device */
+ outputParameters.channelCount = NUM_CHANNELS;
+ outputParameters.sampleFormat = PA_SAMPLE_TYPE;
+ outputParameters.suggestedLatency = Pa_GetDeviceInfo( outputParameters.device )->defaultHighOutputLatency;
+ outputParameters.hostApiSpecificStreamInfo = NULL;
+
+ /* -- setup stream -- */
+ err = Pa_OpenStream(
+ &stream,
+ &inputParameters,
+ &outputParameters,
+ SAMPLE_RATE,
+ FRAMES_PER_BUFFER,
+ paClipOff, /* we won't output out of range samples so don't bother clipping them */
+ NULL, /* no callback, use blocking API */
+ NULL ); /* no callback, so no callback userData */
+ if( err != paNoError ) goto error;
+
+ /* -- start stream -- */
+ err = Pa_StartStream( stream );
+ if( err != paNoError ) goto error;
+ printf("Wire on. Will run one minute.\n"); fflush(stdout);
+
+ /* -- Here's the loop where we pass data from input to output -- */
+ for( i=0; i<(60*SAMPLE_RATE)/FRAMES_PER_BUFFER; ++i )
+ {
+ err = Pa_WriteStream( stream, sampleBlock, FRAMES_PER_BUFFER );
+ if( err ) goto xrun;
+ err = Pa_ReadStream( stream, sampleBlock, FRAMES_PER_BUFFER );
+ if( err ) goto xrun;
+ }
+ /* -- Now we stop the stream -- */
+ err = Pa_StopStream( stream );
+ if( err != paNoError ) goto error;
+
+ /* -- don't forget to cleanup! -- */
+ err = Pa_CloseStream( stream );
+ if( err != paNoError ) goto error;
+
+ Pa_Terminate();
+ return 0;
+@endcode
+
+
+Previous: \ref querying_devices | Next: \ref exploring
+
*/
\ No newline at end of file
-/** @page compile_cmake Creating MSVC Build Files via CMake\r
-@ingroup tutorial\r
-\r
-This is a simple "How-to" for creating build files for Microsoft Visual C++ via CMake and the CMakeLists.txt file\r
-\r
-1. Install CMake if you haven't got it already ([http://www.cmake.org], minimum version required is 2.8).\r
-\r
-2. If you want ASIO support you need to D/L the ASIO2 SDK from Steinberg, and place it according to \ref compile_windows_asio_msvc\r
-\r
-3. Run the CMake GUI application and browse to <b>source files</b> directory and <b>build</b> directory:\r
- a. The <b>source files</b> directory (<i>"Where is the source code"</i>) is where the portaudio CMakeLists.txt file is located.\r
- b. The <b>build</b> directory (<i>"Where to build the binaries"</i>) is pretty much anywhere you like. A common practice though is to have the build directory located <b>outside</b> the\r
- source files tree (a so called "out-of-source build")\r
-\r
-4. Click <i>Configure</i>. This will prompt you to select which build files to generate. <b>Note</b> Only Microsoft Visual C++ build files currently supported!\r
-\r
-5. In the CMake option list, enable the PORTAUDIO_xxx options you need, then click <i>Configure</i> again (Note that after this there are no options marked with red color)\r
-\r
-6. Click <i>Generate</i> and you'll now (hopefully) have your VS build files in your previously defined <b>build</b> directory.\r
-\r
-Both ASIO and DirectX SDK are automatically searched for by the CMake script, so if you have DirectX SDK installed and have placed the ASIO2 SDK according to point 2 above, you should be able to build portaudio with !DirectSound and ASIO support.\r
-\r
-Should you later on decide to change a portaudio option, just jump in at step 5 above (MSVC will then prompt you to reload projects/solutions/workspace)\r
-\r
---- Robert Bielik\r
-\r
-Back to the Tutorial: \ref tutorial_start\r
-\r
+/** @page compile_cmake Creating MSVC Build Files via CMake
+@ingroup tutorial
+
+This is a simple "How-to" for creating build files for Microsoft Visual C++ via CMake and the CMakeLists.txt file
+
+1. Install CMake if you haven't got it already ([http://www.cmake.org], minimum version required is 2.8).
+
+2. If you want ASIO support you need to D/L the ASIO2 SDK from Steinberg, and place it according to \ref compile_windows_asio_msvc
+
+3. Run the CMake GUI application and browse to <b>source files</b> directory and <b>build</b> directory:
+ a. The <b>source files</b> directory (<i>"Where is the source code"</i>) is where the portaudio CMakeLists.txt file is located.
+ b. The <b>build</b> directory (<i>"Where to build the binaries"</i>) is pretty much anywhere you like. A common practice though is to have the build directory located <b>outside</b> the
+ source files tree (a so called "out-of-source build")
+
+4. Click <i>Configure</i>. This will prompt you to select which build files to generate. <b>Note</b> Only Microsoft Visual C++ build files currently supported!
+
+5. In the CMake option list, enable the PORTAUDIO_xxx options you need, then click <i>Configure</i> again (Note that after this there are no options marked with red color)
+
+6. Click <i>Generate</i> and you'll now (hopefully) have your VS build files in your previously defined <b>build</b> directory.
+
+Both ASIO and DirectX SDK are automatically searched for by the CMake script, so if you have DirectX SDK installed and have placed the ASIO2 SDK according to point 2 above, you should be able to build portaudio with !DirectSound and ASIO support.
+
+Should you later on decide to change a portaudio option, just jump in at step 5 above (MSVC will then prompt you to reload projects/solutions/workspace)
+
+--- Robert Bielik
+
+Back to the Tutorial: \ref tutorial_start
+
*/
\ No newline at end of file
-/** @page compile_linux Building Portaudio for Linux\r
-@ingroup tutorial\r
-\r
-<i>Note: this page has not been reviewed, and may contain errors.</i>\r
-\r
-@section comp_linux1 Installing ALSA Development Kit\r
-\r
-The OSS sound API is very old and not well supported. It is recommended that you use the ALSA sound API.\r
-The PortAudio configure script will look for the ALSA SDK. You can install the ALSA SDK on Ubuntu using:\r
-\r
-@code\r
-sudo apt-get install libasound-dev\r
-@endcode\r
-\r
-You might need to use yum, or some other package manager, instead of apt-get on your machine.\r
-If you do not install ALSA then you might get a message when testing that says you have no audio devices.\r
-\r
-You can find out more about ALSA here: http://www.alsa-project.org/\r
-\r
-@section comp_linux2 Configuring and Compiling PortAudio\r
-\r
-You can build PortAudio in Linux Environments using the standard configure/make tools:\r
-\r
-@code\r
-./configure && make\r
-@endcode\r
-\r
-That will build PortAudio using Jack, ALSA and OSS in whatever combination they are found on your system. For example, if you have Jack and OSS but not ALSA, it will build using Jack and OSS but not ALSA. This step also builds a number of tests, which can be found in the bin directory of PortAudio. It's a good idea to run some of these tests to make sure PortAudio is working correctly.\r
-\r
-@section comp_linux3 Using PortAudio in your Projects\r
-\r
-To use PortAudio in your apps, you can simply install the .so files:\r
-\r
-@code\r
-sudo make install\r
-@endcode\r
-\r
-Projects built this way will expect PortAudio to be installed on target systems in order to run. If you want to build a more self-contained binary, you may use the libportaudio.a file:\r
-\r
-@code\r
-cp lib/.libs/libportaudio.a /YOUR/PROJECT/DIR\r
-@endcode\r
-\r
-On some systems you may need to use:\r
-\r
-@code\r
-cp /usr/local/lib/libportaudio.a /YOUR/PROJECT/DIR\r
-@endcode\r
-\r
-You may also need to copy portaudio.h, located in the include/ directory of PortAudio into your project. Note that you will usually need to link with the approriate libraries that you used, such as ALSA and JACK, as well as with librt and libpthread. For example:\r
-\r
-@code\r
-gcc main.c libportaudio.a -lrt -lm -lasound -ljack -pthread -o YOUR_BINARY\r
-@endcode\r
-\r
-@section comp_linux4 Linux Extensions\r
-\r
-Note that the ALSA PortAudio back-end adds a few extensions to the standard API that you may take advantage of. To use these functions be sure to include the pa_linux_alsa.h file found in the include file in the PortAudio folder. This file contains further documentation on the following functions:\r
-\r
- PaAlsaStreamInfo/PaAlsa_InitializeStreamInfo::\r
- Objects of the !PaAlsaStreamInfo type may be used for the !hostApiSpecificStreamInfo attribute of a !PaStreamParameters object, in order to specify the name of an ALSA device to open directly. Specify the device via !PaAlsaStreamInfo.deviceString, after initializing the object with PaAlsa_InitializeStreamInfo.\r
- \r
- PaAlsa_EnableRealtimeScheduling::\r
- PA ALSA supports real-time scheduling of the audio callback thread (using the FIFO pthread scheduling policy), via the extension PaAlsa_EnableRealtimeScheduling. Call this on the stream before starting it with the <i>enableScheduling</i> parameter set to true or false, to enable or disable this behaviour respectively.\r
- \r
- PaAlsa_GetStreamInputCard::\r
- Use this function to get the ALSA-lib card index of the stream's input device.\r
- \r
- PaAlsa_GetStreamOutputCard::\r
- Use this function to get the ALSA-lib card index of the stream's output device.\r
-\r
-Of particular importance is PaAlsa_EnableRealtimeScheduling, which allows ALSA to run at a high priority to prevent ordinary processes on the system from preempting audio playback. Without this, low latency audio playback will be irregular and will contain frequent drop-outs.\r
-\r
-@section comp_linux5 Linux Debugging\r
-\r
-Eliot Blennerhassett writes:\r
-\r
-On linux build, use e.g. "libtool gdb bin/patest_sine8" to debug that program.\r
-This is because on linux bin/patest_sine8 is a libtool shell script that wraps \r
-bin/.libs/patest_sine8 and allows it to find the appropriate libraries within \r
-the build tree.\r
-\r
+/** @page compile_linux Building Portaudio for Linux
+@ingroup tutorial
+
+<i>Note: this page has not been reviewed, and may contain errors.</i>
+
+@section comp_linux1 Installing ALSA Development Kit
+
+The OSS sound API is very old and not well supported. It is recommended that you use the ALSA sound API.
+The PortAudio configure script will look for the ALSA SDK. You can install the ALSA SDK on Ubuntu using:
+
+@code
+sudo apt-get install libasound-dev
+@endcode
+
+You might need to use yum, or some other package manager, instead of apt-get on your machine.
+If you do not install ALSA then you might get a message when testing that says you have no audio devices.
+
+You can find out more about ALSA here: http://www.alsa-project.org/
+
+@section comp_linux2 Configuring and Compiling PortAudio
+
+You can build PortAudio in Linux Environments using the standard configure/make tools:
+
+@code
+./configure && make
+@endcode
+
+That will build PortAudio using Jack, ALSA and OSS in whatever combination they are found on your system. For example, if you have Jack and OSS but not ALSA, it will build using Jack and OSS but not ALSA. This step also builds a number of tests, which can be found in the bin directory of PortAudio. It's a good idea to run some of these tests to make sure PortAudio is working correctly.
+
+@section comp_linux3 Using PortAudio in your Projects
+
+To use PortAudio in your apps, you can simply install the .so files:
+
+@code
+sudo make install
+@endcode
+
+Projects built this way will expect PortAudio to be installed on target systems in order to run. If you want to build a more self-contained binary, you may use the libportaudio.a file:
+
+@code
+cp lib/.libs/libportaudio.a /YOUR/PROJECT/DIR
+@endcode
+
+On some systems you may need to use:
+
+@code
+cp /usr/local/lib/libportaudio.a /YOUR/PROJECT/DIR
+@endcode
+
+You may also need to copy portaudio.h, located in the include/ directory of PortAudio into your project. Note that you will usually need to link with the approriate libraries that you used, such as ALSA and JACK, as well as with librt and libpthread. For example:
+
+@code
+gcc main.c libportaudio.a -lrt -lm -lasound -ljack -pthread -o YOUR_BINARY
+@endcode
+
+@section comp_linux4 Linux Extensions
+
+Note that the ALSA PortAudio back-end adds a few extensions to the standard API that you may take advantage of. To use these functions be sure to include the pa_linux_alsa.h file found in the include file in the PortAudio folder. This file contains further documentation on the following functions:
+
+ PaAlsaStreamInfo/PaAlsa_InitializeStreamInfo::
+ Objects of the !PaAlsaStreamInfo type may be used for the !hostApiSpecificStreamInfo attribute of a !PaStreamParameters object, in order to specify the name of an ALSA device to open directly. Specify the device via !PaAlsaStreamInfo.deviceString, after initializing the object with PaAlsa_InitializeStreamInfo.
+
+ PaAlsa_EnableRealtimeScheduling::
+ PA ALSA supports real-time scheduling of the audio callback thread (using the FIFO pthread scheduling policy), via the extension PaAlsa_EnableRealtimeScheduling. Call this on the stream before starting it with the <i>enableScheduling</i> parameter set to true or false, to enable or disable this behaviour respectively.
+
+ PaAlsa_GetStreamInputCard::
+ Use this function to get the ALSA-lib card index of the stream's input device.
+
+ PaAlsa_GetStreamOutputCard::
+ Use this function to get the ALSA-lib card index of the stream's output device.
+
+Of particular importance is PaAlsa_EnableRealtimeScheduling, which allows ALSA to run at a high priority to prevent ordinary processes on the system from preempting audio playback. Without this, low latency audio playback will be irregular and will contain frequent drop-outs.
+
+@section comp_linux5 Linux Debugging
+
+Eliot Blennerhassett writes:
+
+On linux build, use e.g. "libtool gdb bin/patest_sine8" to debug that program.
+This is because on linux bin/patest_sine8 is a libtool shell script that wraps
+bin/.libs/patest_sine8 and allows it to find the appropriate libraries within
+the build tree.
+
*/
\ No newline at end of file
-/** @page compile_mac_coreaudio Building Portaudio for Mac OS X\r
-@ingroup tutorial\r
-\r
-@section comp_mac_ca_1 Requirements\r
-\r
-* OS X 10.4 or later. PortAudio v19 currently only compiles and runs on OS X version 10.4 or later. Because of its heavy reliance on memory barriers, it's not clear how easy it would be to back-port PortAudio to OS X version 10.3. Leopard support requires the 2007 snapshot or later.\r
-\r
-* Apple's Xcode and its related tools installed in the default location. There is no Xcode project for PortAudio.\r
-\r
-* Mac 10.4 SDK. Look for "/Developer/SDKs/MacOSX10.4u.sdk" folder on your system. It may be installed with XCode. If not then you can download it from Apple Developer Connection. http://connect.apple.com/\r
-\r
-@section comp_mac_ca_2 Building\r
-\r
-To build PortAudio, simply use the Unix-style "./configure && make":\r
-\r
-@code\r
- ./configure && make\r
-@endcode\r
-\r
-You do <b>not</b> need to do "make install", and we don't recommend it; however, you may be using software that instructs you to do so, in which case you should follow those instructions. (Note from Phil: I had to do "sudo make install" after the command above, otherwise XCode complained that it could not find "/usr/local/lib/libportaudio.dylib" when I compiled an example.)\r
-\r
-The result of these steps will be a file named "libportaudio.dylib" in the directory "usr/local/lib/".\r
-\r
-By default, this will create universal binaries and therefore requires the Universal SDK from Apple, included with XCode 2.1 and higher. \r
-\r
-@section comp_mac_ca_3 Other Build Options\r
-\r
-There are a variety of other options for building PortAudio. The default described above is recommended as it is the most supported and tested; however, your needs may differ and require other options, which are described below.\r
-\r
-@subsection comp_mac_ca_3.1 Building Non-Universal Libraries\r
-\r
-By default, PortAudio is built as a universal binary. This includes 64-bit versions if you are compiling on 10.5, Leopard. If you want a "thin", or single architecture library, you have two options:\r
-\r
- * build a non-universal library using configure options.\r
- * use lipo(1) on whatever part of the library you plan to use.\r
-\r
-Note that the first option may require an extremely recent version of PortAudio (February 5th '08 at least).\r
-\r
-@subsection comp_mac_ca_3.2 Building with <i>--disable-mac-universal</i>\r
-\r
-To build a non-universal library for the host architecture, simply use the <i>--disable-mac-universal</i> option with configure.\r
-\r
-@code\r
- ./configure --disable-mac-universal && make\r
-@endcode\r
-\r
-The <i>--disable-mac-universal</i> option may also be used in conjunction with environment variables to give you more control over the universal binary build process. For example, to build a universal binary for the i386 and ppc architectures using the 10.4u sdk (which is the default on 10.4, but not 10.5), you might specify this configure command line:\r
-\r
-@code\r
- CFLAGS="-O2 -g -Wall -arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.3" \\r
- LDFLAGS="-arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.3" \\r
- ./configure --disable-mac-universal --disable-dependency-tracking\r
-@endcode\r
-\r
-For more info, see Apple's documentation on the matter:\r
-\r
- * http://developer.apple.com/technotes/tn2005/tn2137.html\r
- * http://developer.apple.com/documentation/Porting/Conceptual/PortingUnix/intro/chapter_1_section_1.html\r
-\r
-@subsection comp_mac_ca_3.3 Using lipo\r
-\r
-The second option is to build normally, and use lipo (1) to extract the architectures you want. For example, if you want a "thin", i386 library only:\r
-\r
-@code\r
- lipo lib/.libs/libportaudio.a -thin i386 -output libportaudio.a\r
-@endcode\r
-\r
-or if you want to extract a single architecture fat file:\r
-\r
-@code\r
- lipo lib/.libs/libportaudio.a -extract i386 -output libportaudio.a\r
-@endcode\r
-\r
-@subsection comp_mac_ca_3.4 Building With Debug Options\r
-\r
-By default, PortAudio on the mac is built without any debugging options. This is because asserts are generally inappropriate for a production environment and debugging information has been suspected, though not proven, to cause trouble with some interfaces. If you would like to compile with debugging, you must run configure with the appropriate flags. For example:\r
-\r
-@code\r
- ./configure --enable-mac-debug && make\r
-@endcode\r
-\r
-This will enable -g and disable -DNDEBUG which will effectively enable asserts.\r
-\r
-@section comp_mac_ca_4 Using the Library in XCode Projects\r
-\r
-If you are planning to follow the rest of the tutorial, several project types will work. You can create a "Standard Tool" under "Command Line Utility". If you are not following the rest of the tutorial, any type of project should work with PortAudio, but these instructions may not work perfectly.\r
-\r
-Once you've compiled PortAudio, the easiest and recommended way to use PortAudio in your XCode project is to add "<portaudio>/include/portaudio.h" and "<portaudio>/lib/.libs/libportaudio.a" to your project. Because "<portaudio>/lib/.libs/" is a hidden directory, you won't be able to navigate to it using the finder or the standard Mac OS file dialogs by clicking on files and folders. You can use command-shift-G in the finder to specify the exact path, or, from the shell, if you are in the portaudio directory, you can enter this command:\r
-\r
-@code\r
- open lib/.libs\r
-@endcode\r
-\r
-Then drag the "libportaudio.a" file into your XCode project and place it in the "External Frameworks and Libraries" group, if the project type has it. If not you can simply add it to the top level folder of the project.\r
-\r
-You will need to add the following frameworks to your XCode project:\r
-\r
- - CoreAudio.framework\r
- - AudioToolbox.framework\r
- - AudioUnit.framework\r
- - CoreServices.framework\r
- - Carbon.framework\r
-\r
-@section comp_mac_ca_5 Using the Library in Other Projects\r
-\r
-For gcc/Make style projects, include "include/portaudio.h" and link "libportaudio.a", and use the frameworks listed in the previous section. How you do so depends on your build.\r
-\r
-@section comp_mac_ca_6 Using Mac-only Extensions to PortAudio\r
-\r
-For additional, Mac-only extensions to the PortAudio interface, you may also want to grab "include/pa_mac_core.h". This file contains some special, mac-only features relating to sample-rate conversion, channel mapping, performance and device hogging. See "src/hostapi/coreaudio/notes.txt" for more details on these features.\r
-\r
-@section comp_mac_ca_7 What Happened to Makefile.darwin?\r
-\r
-Note, there used to be a special makefile just for darwin. This is no longer supported because you can build universal binaries from the standard configure routine. If you find this file in your directory structure it means you have an outdated version of PortAudio.\r
-\r
-@code\r
- make -f Makefile.darwin\r
-@endcode\r
-\r
-Back to the Tutorial: \ref tutorial_start\r
-\r
-*/\r
+/** @page compile_mac_coreaudio Building Portaudio for Mac OS X
+@ingroup tutorial
+
+@section comp_mac_ca_1 Requirements
+
+* OS X 10.4 or later. PortAudio v19 currently only compiles and runs on OS X version 10.4 or later. Because of its heavy reliance on memory barriers, it's not clear how easy it would be to back-port PortAudio to OS X version 10.3. Leopard support requires the 2007 snapshot or later.
+
+* Apple's Xcode and its related tools installed in the default location. There is no Xcode project for PortAudio.
+
+* Mac 10.4 SDK. Look for "/Developer/SDKs/MacOSX10.4u.sdk" folder on your system. It may be installed with XCode. If not then you can download it from Apple Developer Connection. http://connect.apple.com/
+
+@section comp_mac_ca_2 Building
+
+To build PortAudio, simply use the Unix-style "./configure && make":
+
+@code
+ ./configure && make
+@endcode
+
+You do <b>not</b> need to do "make install", and we don't recommend it; however, you may be using software that instructs you to do so, in which case you should follow those instructions. (Note from Phil: I had to do "sudo make install" after the command above, otherwise XCode complained that it could not find "/usr/local/lib/libportaudio.dylib" when I compiled an example.)
+
+The result of these steps will be a file named "libportaudio.dylib" in the directory "usr/local/lib/".
+
+By default, this will create universal binaries and therefore requires the Universal SDK from Apple, included with XCode 2.1 and higher.
+
+@section comp_mac_ca_3 Other Build Options
+
+There are a variety of other options for building PortAudio. The default described above is recommended as it is the most supported and tested; however, your needs may differ and require other options, which are described below.
+
+@subsection comp_mac_ca_3.1 Building Non-Universal Libraries
+
+By default, PortAudio is built as a universal binary. This includes 64-bit versions if you are compiling on 10.5, Leopard. If you want a "thin", or single architecture library, you have two options:
+
+ * build a non-universal library using configure options.
+ * use lipo(1) on whatever part of the library you plan to use.
+
+Note that the first option may require an extremely recent version of PortAudio (February 5th '08 at least).
+
+@subsection comp_mac_ca_3.2 Building with <i>--disable-mac-universal</i>
+
+To build a non-universal library for the host architecture, simply use the <i>--disable-mac-universal</i> option with configure.
+
+@code
+ ./configure --disable-mac-universal && make
+@endcode
+
+The <i>--disable-mac-universal</i> option may also be used in conjunction with environment variables to give you more control over the universal binary build process. For example, to build a universal binary for the i386 and ppc architectures using the 10.4u sdk (which is the default on 10.4, but not 10.5), you might specify this configure command line:
+
+@code
+ CFLAGS="-O2 -g -Wall -arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.3" \
+ LDFLAGS="-arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.3" \
+ ./configure --disable-mac-universal --disable-dependency-tracking
+@endcode
+
+For more info, see Apple's documentation on the matter:
+
+ * http://developer.apple.com/technotes/tn2005/tn2137.html
+ * http://developer.apple.com/documentation/Porting/Conceptual/PortingUnix/intro/chapter_1_section_1.html
+
+@subsection comp_mac_ca_3.3 Using lipo
+
+The second option is to build normally, and use lipo (1) to extract the architectures you want. For example, if you want a "thin", i386 library only:
+
+@code
+ lipo lib/.libs/libportaudio.a -thin i386 -output libportaudio.a
+@endcode
+
+or if you want to extract a single architecture fat file:
+
+@code
+ lipo lib/.libs/libportaudio.a -extract i386 -output libportaudio.a
+@endcode
+
+@subsection comp_mac_ca_3.4 Building With Debug Options
+
+By default, PortAudio on the mac is built without any debugging options. This is because asserts are generally inappropriate for a production environment and debugging information has been suspected, though not proven, to cause trouble with some interfaces. If you would like to compile with debugging, you must run configure with the appropriate flags. For example:
+
+@code
+ ./configure --enable-mac-debug && make
+@endcode
+
+This will enable -g and disable -DNDEBUG which will effectively enable asserts.
+
+@section comp_mac_ca_4 Using the Library in XCode Projects
+
+If you are planning to follow the rest of the tutorial, several project types will work. You can create a "Standard Tool" under "Command Line Utility". If you are not following the rest of the tutorial, any type of project should work with PortAudio, but these instructions may not work perfectly.
+
+Once you've compiled PortAudio, the easiest and recommended way to use PortAudio in your XCode project is to add "<portaudio>/include/portaudio.h" and "<portaudio>/lib/.libs/libportaudio.a" to your project. Because "<portaudio>/lib/.libs/" is a hidden directory, you won't be able to navigate to it using the finder or the standard Mac OS file dialogs by clicking on files and folders. You can use command-shift-G in the finder to specify the exact path, or, from the shell, if you are in the portaudio directory, you can enter this command:
+
+@code
+ open lib/.libs
+@endcode
+
+Then drag the "libportaudio.a" file into your XCode project and place it in the "External Frameworks and Libraries" group, if the project type has it. If not you can simply add it to the top level folder of the project.
+
+You will need to add the following frameworks to your XCode project:
+
+ - CoreAudio.framework
+ - AudioToolbox.framework
+ - AudioUnit.framework
+ - CoreServices.framework
+ - Carbon.framework
+
+@section comp_mac_ca_5 Using the Library in Other Projects
+
+For gcc/Make style projects, include "include/portaudio.h" and link "libportaudio.a", and use the frameworks listed in the previous section. How you do so depends on your build.
+
+@section comp_mac_ca_6 Using Mac-only Extensions to PortAudio
+
+For additional, Mac-only extensions to the PortAudio interface, you may also want to grab "include/pa_mac_core.h". This file contains some special, mac-only features relating to sample-rate conversion, channel mapping, performance and device hogging. See "src/hostapi/coreaudio/notes.txt" for more details on these features.
+
+@section comp_mac_ca_7 What Happened to Makefile.darwin?
+
+Note, there used to be a special makefile just for darwin. This is no longer supported because you can build universal binaries from the standard configure routine. If you find this file in your directory structure it means you have an outdated version of PortAudio.
+
+@code
+ make -f Makefile.darwin
+@endcode
+
+Back to the Tutorial: \ref tutorial_start
+
+*/
-/** @page compile_windows Building PortAudio for Windows using Microsoft Visual Studio\r
-@ingroup tutorial\r
-\r
-Below is a list of steps to build PortAudio into a dll and lib file. The resulting dll file may contain all five current win32 PortAudio APIs: MME, DirectSound, WASAPI, WDM/KS and ASIO, depending on the preprocessor definitions set in step 9 below.\r
-\r
-PortAudio can be compiled using Visual C++ Express Edition which is available free from Microsoft. If you do not already have a C++ development environment, simply download and install. These instructions have been observed to succeed using Visual Studio 2010 as well.\r
-\r
-1) Building PortAudio with DirectSound support requires the files <i>dsound.h</i> and <i>dsconf.h</i>. Download and install the DirectX SDK from http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=3021d52b-514e-41d3-ad02-438a3ba730ba to obtain these files. If you installed the DirectX SDK then the DirectSound libraries and header files should be found automatically by Visual Studio/Visual C++. If you get an error saying dsound.h or dsconf.h is missing, you will need to add an extra include path to the Visual Studio project file referencing the DirectX includes directory.\r
-\r
-2) For ASIO support, download the ASIO SDK from Steinberg at http://www.steinberg.net/en/company/developer.html . The SDK is free, but you will need to set up a developer account with Steinberg. To use the Visual Studio projects mentioned below, copy the entire ASIOSDK2 folder into src\\hostapi\\asio\\. Rename it from ASIOSDK2 to ASIOSDK. To build without ASIO (or other host API) see the "Building without ASIO support" section below.\r
-\r
-3) If you have Visual Studio 6.0, 7.0(VC.NET/2001) or 7.1(VC.2003), open portaudio.dsp and convert if needed.\r
-\r
-4) If you have Visual Studio 2005, Visual C++ 2008 Express Edition or Visual Studio 2010, open the portaudio.sln file located in build\\msvc\\. Doing so will open Visual Studio or Visual C++. Click "Finish" if a conversion wizard appears. The sln file contains four configurations: Win32 and Win64 in both Release and Debug variants.\r
-\r
-@section comp_win1 For Visual Studio 2005, Visual C++ 2008 Express Edition or Visual Studio 2010\r
-\r
-The steps below describe settings for recent versions of Visual Studio. Similar settings can be set in earlier versions of Visual Studio.\r
-\r
-5) Open Project -> portaudio Properties and select "Configuration Properties" in the tree view.\r
-\r
-6) Select "all configurations" in the "Configurations" combo box above. Select "All Platforms" in the "Platforms" combo box.\r
-\r
-7) Now set a few options:\r
-\r
-Required:\r
-\r
-C/C++ -> Code Generation -> Runtime library = /MT\r
-\r
-Optional:\r
-\r
-C/C++ -> Optimization -> Omit frame pointers = Yes\r
-\r
-Optional: C/C++ -> Code Generation -> Floating point model = fast\r
-\r
-NOTE: When using PortAudio from C/C++ it is not usually necessary to explicitly set the structure member alignment; the default should work fine. However some languages require, for example, 4-byte alignment. If you are having problems with portaudio.h structure members not being properly read or written to, it may be necessary to explicitly set this value by going to C/C++ -> Code Generation -> Struct member alignment and setting it to an appropriate value (four is a common value). If your compiler is configurable, you should ensure that it is set to use the same structure member alignment value as used for the PortAudio build.\r
-\r
-Click "Ok" when you have finished setting these parameters.\r
-\r
-@section comp_win2 Preprocessor Definitions\r
-\r
-Since the preprocessor definitions are different for each configuration and platform, you'll need to edit these individually for each configuration/platform combination that you want to modify using the "Configurations" and "Platforms" combo boxes.\r
-\r
-8) To suppress PortAudio runtime debug console output, go to Project -> Properties -> Configuration Properties -> C/C++ -> Preprocessor. In the field 'Preprocessor Definitions', find PA_ENABLE_DEBUG_OUTPUT and remove it. The console will not output debug messages.\r
-\r
-9) Also in the preprocessor definitions you need to explicitly define the native audio APIs you wish to use. For Windows the available API definitions are:\r
-\r
-PA_USE_ASIO<br>\r
-PA_USE_DS (DirectSound)<br>\r
-PA_USE_WMME (MME)<br>\r
-PA_USE_WASAPI<br>\r
-PA_USE_WDMKS<br>\r
-PA_USE_SKELETON\r
-\r
-For each of these, the value of 0 indicates that support for this API should not be included. The value 1 indicates that support for this API should be included. (PA_USE_SKELETON is not usually used, it is a code sample for developers wanting to support a new API).\r
-\r
-@section comp_win3 Building\r
-\r
-As when setting Preprocessor definitions, building is a per-configuration per-platform process. Follow these instructions for each configuration/platform combination that you're interested in.\r
-\r
-10) From the Build menu click Build -> Build solution. For 32-bit compilations, the dll file created by this process (portaudio_x86.dll) can be found in the directory build\\msvc\\Win32\\Release. For 64-bit compilations, the dll file is called portaudio_x64.dll, and is found in the directory build\\msvc\\x64\\Release.\r
-\r
-11) Now, any project that requires portaudio can be linked with portaudio_x86.lib (or _x64) and include the relevant headers (portaudio.h, and/or pa_asio.h , pa_x86_plain_converters.h) You may want to add/remove some DLL entry points. At the time of writing the following 6 entries are not part of the official PortAudio API defined in portaudio.h:\r
-\r
-(from portaudio.def)\r
-@code\r
-...\r
-PaAsio_GetAvailableLatencyValues @50\r
-PaAsio_ShowControlPanel @51\r
-PaUtil_InitializeX86PlainConverters @52\r
-PaAsio_GetInputChannelName @53\r
-PaAsio_GetOutputChannelName @54\r
-PaUtil_SetLogPrintFunction @55\r
-@endcode\r
-\r
-@section comp_win4 Building without ASIO support\r
-\r
-To build PortAudio without ASIO support you need to:\r
-\r
-1) Make sure your project doesn't try to build any ASIO SDK files. If you're using one of the shipped projects, remove the ASIO related files from the project. In the shipped projects you can find them in the project tree under portaudio > Source Files > hostapi > ASIO > ASIOSDK\r
-\r
-2) Make sure your project doesn't try to build the PortAudio ASIO implementation files:\r
-\r
-@code\r
-src\\hostapi\\pa_asio.cpp\r
-src\\hostapi\\iasiothiscallresolver.cpp\r
-@endcode\r
-\r
-If you're using one of the shipped projects, remove them from the project. In the shipped projects you can find them in the project tree under portaudio > Source Files > hostapi > ASIO\r
-\r
-3) Define the preprocessor symbols in the project properties as described in step 9 above. In VS2005 this can be accomplished by selecting\r
-Project Properties -> Configuration Properties -> C/C++ -> Preprocessor -> Preprocessor Definitions. Omitting PA_USE_ASIO or setting it to 0 stops src\\os\\win\\pa_win_hostapis.c from trying to initialize the PortAudio ASIO implementation.\r
-\r
-4) Remove PaAsio_* entry points from portaudio.def\r
-\r
-\r
------\r
-David Viens, davidv@plogue.com\r
-\r
-Updated by Chris on 5/26/2011\r
-\r
-Improvements by John Clements on 12/15/2011\r
-\r
-Edits by Ross on 1/20/2014\r
-\r
-Back to the Tutorial: \ref tutorial_start\r
-\r
+/** @page compile_windows Building PortAudio for Windows using Microsoft Visual Studio
+@ingroup tutorial
+
+Below is a list of steps to build PortAudio into a dll and lib file. The resulting dll file may contain all five current win32 PortAudio APIs: MME, DirectSound, WASAPI, WDM/KS and ASIO, depending on the preprocessor definitions set in step 9 below.
+
+PortAudio can be compiled using Visual C++ Express Edition which is available free from Microsoft. If you do not already have a C++ development environment, simply download and install. These instructions have been observed to succeed using Visual Studio 2010 as well.
+
+1) Building PortAudio with DirectSound support requires the files <i>dsound.h</i> and <i>dsconf.h</i>. Download and install the DirectX SDK from http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=3021d52b-514e-41d3-ad02-438a3ba730ba to obtain these files. If you installed the DirectX SDK then the DirectSound libraries and header files should be found automatically by Visual Studio/Visual C++. If you get an error saying dsound.h or dsconf.h is missing, you will need to add an extra include path to the Visual Studio project file referencing the DirectX includes directory.
+
+2) For ASIO support, download the ASIO SDK from Steinberg at http://www.steinberg.net/en/company/developer.html . The SDK is free, but you will need to set up a developer account with Steinberg. To use the Visual Studio projects mentioned below, copy the entire ASIOSDK2 folder into src\\hostapi\\asio\\. Rename it from ASIOSDK2 to ASIOSDK. To build without ASIO (or other host API) see the "Building without ASIO support" section below.
+
+3) If you have Visual Studio 6.0, 7.0(VC.NET/2001) or 7.1(VC.2003), open portaudio.dsp and convert if needed.
+
+4) If you have Visual Studio 2005, Visual C++ 2008 Express Edition or Visual Studio 2010, open the portaudio.sln file located in build\\msvc\\. Doing so will open Visual Studio or Visual C++. Click "Finish" if a conversion wizard appears. The sln file contains four configurations: Win32 and Win64 in both Release and Debug variants.
+
+@section comp_win1 For Visual Studio 2005, Visual C++ 2008 Express Edition or Visual Studio 2010
+
+The steps below describe settings for recent versions of Visual Studio. Similar settings can be set in earlier versions of Visual Studio.
+
+5) Open Project -> portaudio Properties and select "Configuration Properties" in the tree view.
+
+6) Select "all configurations" in the "Configurations" combo box above. Select "All Platforms" in the "Platforms" combo box.
+
+7) Now set a few options:
+
+Required:
+
+C/C++ -> Code Generation -> Runtime library = /MT
+
+Optional:
+
+C/C++ -> Optimization -> Omit frame pointers = Yes
+
+Optional: C/C++ -> Code Generation -> Floating point model = fast
+
+NOTE: When using PortAudio from C/C++ it is not usually necessary to explicitly set the structure member alignment; the default should work fine. However some languages require, for example, 4-byte alignment. If you are having problems with portaudio.h structure members not being properly read or written to, it may be necessary to explicitly set this value by going to C/C++ -> Code Generation -> Struct member alignment and setting it to an appropriate value (four is a common value). If your compiler is configurable, you should ensure that it is set to use the same structure member alignment value as used for the PortAudio build.
+
+Click "Ok" when you have finished setting these parameters.
+
+@section comp_win2 Preprocessor Definitions
+
+Since the preprocessor definitions are different for each configuration and platform, you'll need to edit these individually for each configuration/platform combination that you want to modify using the "Configurations" and "Platforms" combo boxes.
+
+8) To suppress PortAudio runtime debug console output, go to Project -> Properties -> Configuration Properties -> C/C++ -> Preprocessor. In the field 'Preprocessor Definitions', find PA_ENABLE_DEBUG_OUTPUT and remove it. The console will not output debug messages.
+
+9) Also in the preprocessor definitions you need to explicitly define the native audio APIs you wish to use. For Windows the available API definitions are:
+
+PA_USE_ASIO<br>
+PA_USE_DS (DirectSound)<br>
+PA_USE_WMME (MME)<br>
+PA_USE_WASAPI<br>
+PA_USE_WDMKS<br>
+PA_USE_SKELETON
+
+For each of these, the value of 0 indicates that support for this API should not be included. The value 1 indicates that support for this API should be included. (PA_USE_SKELETON is not usually used, it is a code sample for developers wanting to support a new API).
+
+@section comp_win3 Building
+
+As when setting Preprocessor definitions, building is a per-configuration per-platform process. Follow these instructions for each configuration/platform combination that you're interested in.
+
+10) From the Build menu click Build -> Build solution. For 32-bit compilations, the dll file created by this process (portaudio_x86.dll) can be found in the directory build\\msvc\\Win32\\Release. For 64-bit compilations, the dll file is called portaudio_x64.dll, and is found in the directory build\\msvc\\x64\\Release.
+
+11) Now, any project that requires portaudio can be linked with portaudio_x86.lib (or _x64) and include the relevant headers (portaudio.h, and/or pa_asio.h , pa_x86_plain_converters.h) You may want to add/remove some DLL entry points. At the time of writing the following 6 entries are not part of the official PortAudio API defined in portaudio.h:
+
+(from portaudio.def)
+@code
+...
+PaAsio_GetAvailableLatencyValues @50
+PaAsio_ShowControlPanel @51
+PaUtil_InitializeX86PlainConverters @52
+PaAsio_GetInputChannelName @53
+PaAsio_GetOutputChannelName @54
+PaUtil_SetLogPrintFunction @55
+@endcode
+
+@section comp_win4 Building without ASIO support
+
+To build PortAudio without ASIO support you need to:
+
+1) Make sure your project doesn't try to build any ASIO SDK files. If you're using one of the shipped projects, remove the ASIO related files from the project. In the shipped projects you can find them in the project tree under portaudio > Source Files > hostapi > ASIO > ASIOSDK
+
+2) Make sure your project doesn't try to build the PortAudio ASIO implementation files:
+
+@code
+src\\hostapi\\pa_asio.cpp
+src\\hostapi\\iasiothiscallresolver.cpp
+@endcode
+
+If you're using one of the shipped projects, remove them from the project. In the shipped projects you can find them in the project tree under portaudio > Source Files > hostapi > ASIO
+
+3) Define the preprocessor symbols in the project properties as described in step 9 above. In VS2005 this can be accomplished by selecting
+Project Properties -> Configuration Properties -> C/C++ -> Preprocessor -> Preprocessor Definitions. Omitting PA_USE_ASIO or setting it to 0 stops src\\os\\win\\pa_win_hostapis.c from trying to initialize the PortAudio ASIO implementation.
+
+4) Remove PaAsio_* entry points from portaudio.def
+
+
+-----
+David Viens, davidv@plogue.com
+
+Updated by Chris on 5/26/2011
+
+Improvements by John Clements on 12/15/2011
+
+Edits by Ross on 1/20/2014
+
+Back to the Tutorial: \ref tutorial_start
+
*/
\ No newline at end of file
-/** @page compile_windows_asio_msvc Building Portaudio for Windows with ASIO support using MSVC\r
-@ingroup tutorial\r
-\r
-@section comp_win_asiomsvc1 Portaudio Windows ASIO with MSVC\r
-\r
-This tutorial describes how to build PortAudio with ASIO support using MSVC *from scratch*, without an existing Visual Studio project. For instructions for building PortAudio (including ASIO support) using the bundled Visual Studio project file see the compiling instructions for \ref compile_windows.\r
-\r
-ASIO is a low latency audio API from Steinberg. To compile an ASIO\r
-application, you must first download the ASIO SDK from Steinberg. You also\r
-need to obtain ASIO drivers for your audio device. Download the ASIO SDK from Steinberg at http://www.steinberg.net/en/company/developer.html . The SDK is free but you will need to set up a developer account with Steinberg.\r
-\r
-This tutorial assumes that you have 3 directories set up at the same level (side by side), one containing PortAudio, one containing the ASIO SDK and one containing your Visual Studio project:\r
-\r
-@code\r
-/ASIOSDK2 \r
-/portaudio\r
-/DirContainingYourVisualStudioProject (should directly contain the .sln, .vcproj or .vcprojx etc.)\r
-@endcode\r
-\r
-First, make sure that the Steinberg SDK and the portaudio files are "side by side" in the same directory.\r
-\r
-Open Microsoft Visual C++ and create a new blank Console exe Project/Workspace in that same directory.\r
-\r
-For example, the paths for all three groups might read like this:\r
-\r
-@code\r
-C:\Program Files\Microsoft Visual Studio\VC98\My Projects\ASIOSDK2\r
-C:\Program Files\Microsoft Visual Studio\VC98\My Projects\portaudio\r
-C:\Program Files\Microsoft Visual Studio\VC98\My Projects\Sawtooth\r
-@endcode\r
-\r
-\r
-Next, add the following Steinberg ASIO SDK files to the project Source Files: \r
-\r
-@code\r
-asio.cpp (ASIOSDK2\common)\r
-asiodrivers.cpp (ASIOSDK2\host)\r
-asiolist.cpp (ASIOSDK2\host\pc)\r
-@endcode\r
-\r
-\r
-Then, add the following PortAudio files to the project Source Files:\r
-\r
-@code\r
-pa_asio.cpp (portaudio\src\hostapi\asio)\r
-pa_allocation.c (portaudio\src\common)\r
-pa_converters.c (portaudio\src\common)\r
-pa_cpuload.c (portaudio\src\common)\r
-pa_dither.c (portaudio\src\common)\r
-pa_front.c (portaudio\src\common)\r
-pa_process.c (portaudio\src\common)\r
-pa_ringbuffer.c (portaudio\src\common)\r
-pa_stream.c (portaudio\src\common)\r
-pa_trace.c (portaudio\src\common)\r
-pa_win_hostapis.c (portaudio\src\os\win)\r
-pa_win_util.c (portaudio\src\os\win)\r
-pa_win_coinitialize.c (portaudio\src\os\win)\r
-pa_win_waveformat.c (portaudio\src\os\win)\r
-pa_x86_plain_converters.c (portaudio\src\os\win)\r
-paex_saw.c (portaudio\examples) (Or another file containing main() \r
- for the console exe to be built.)\r
-@endcode\r
-\r
-\r
-Although not strictly necessary, you may also want to add the following files to the project Header Files:\r
-\r
-@code\r
-portaudio.h (portaudio\include)\r
-pa_asio.h (portaudio\include)\r
-@endcode\r
-\r
-These header files define the interfaces to the PortAudio API.\r
-\r
-\r
-Next, go to Project Settings > All Configurations > C/C++ > Preprocessor > Preprocessor Definitions and add\r
-PA_USE_ASIO=1 to any entries that might be there.\r
-\r
-eg: WIN32;_CONSOLE;_MBCS changes to WIN32;_CONSOLE,_MBCS;PA_USE_ASIO=1\r
-\r
-Then, on the same Project Settings tab, go down to Additional Include Directories (in VS2010 you'll find this setting under C/C++ > General) and enter the following relative include paths:\r
-\r
-@code\r
-..\portaudio\include;..\portaudio\src\common;..\portaudio\src\os\win;..\asiosdk2\common;..\asiosdk2\host;..\asiosdk2\host\pc\r
-@endcode\r
-\r
-You'll need to make sure the relative paths are correct for the particular directory layout you're using. The above should work fine if you use the side-by-side layout we recommended earlier.\r
-\r
-Some source code in the ASIO SDK is not compatible with the Win32 API UNICODE mode (The ASIO SDK expects the non-Unicode Win32 API). Therefore you need to make sure your project is set to not use Unicode. You do this by setting the project Character Set to "Use Multi-Byte Character Set" (NOT "Use Unicode Character Set"). In VS2010 the Character Set option can be found at Configuration Properties > General > Character Set. (An alternative to setting the project to non-Unicode is to patch asiolist.cpp to work when UNICODE is defined: put #undef UNICODE at the top of the file before windows.h is included.)\r
-\r
-You should now be able to build any of the test executables in the portaudio\\examples directory.\r
-We suggest that you start with paex_saw.c because it's one of the simplest example files.\r
-\r
---- Chris Share, Tom McCandless, Ross Bencina\r
-\r
-Back to the Tutorial: \ref tutorial_start\r
-\r
+/** @page compile_windows_asio_msvc Building Portaudio for Windows with ASIO support using MSVC
+@ingroup tutorial
+
+@section comp_win_asiomsvc1 Portaudio Windows ASIO with MSVC
+
+This tutorial describes how to build PortAudio with ASIO support using MSVC *from scratch*, without an existing Visual Studio project. For instructions for building PortAudio (including ASIO support) using the bundled Visual Studio project file see the compiling instructions for \ref compile_windows.
+
+ASIO is a low latency audio API from Steinberg. To compile an ASIO
+application, you must first download the ASIO SDK from Steinberg. You also
+need to obtain ASIO drivers for your audio device. Download the ASIO SDK from Steinberg at http://www.steinberg.net/en/company/developer.html . The SDK is free but you will need to set up a developer account with Steinberg.
+
+This tutorial assumes that you have 3 directories set up at the same level (side by side), one containing PortAudio, one containing the ASIO SDK and one containing your Visual Studio project:
+
+@code
+/ASIOSDK2
+/portaudio
+/DirContainingYourVisualStudioProject (should directly contain the .sln, .vcproj or .vcprojx etc.)
+@endcode
+
+First, make sure that the Steinberg SDK and the portaudio files are "side by side" in the same directory.
+
+Open Microsoft Visual C++ and create a new blank Console exe Project/Workspace in that same directory.
+
+For example, the paths for all three groups might read like this:
+
+@code
+C:\Program Files\Microsoft Visual Studio\VC98\My Projects\ASIOSDK2
+C:\Program Files\Microsoft Visual Studio\VC98\My Projects\portaudio
+C:\Program Files\Microsoft Visual Studio\VC98\My Projects\Sawtooth
+@endcode
+
+
+Next, add the following Steinberg ASIO SDK files to the project Source Files:
+
+@code
+asio.cpp (ASIOSDK2\common)
+asiodrivers.cpp (ASIOSDK2\host)
+asiolist.cpp (ASIOSDK2\host\pc)
+@endcode
+
+
+Then, add the following PortAudio files to the project Source Files:
+
+@code
+pa_asio.cpp (portaudio\src\hostapi\asio)
+pa_allocation.c (portaudio\src\common)
+pa_converters.c (portaudio\src\common)
+pa_cpuload.c (portaudio\src\common)
+pa_dither.c (portaudio\src\common)
+pa_front.c (portaudio\src\common)
+pa_process.c (portaudio\src\common)
+pa_ringbuffer.c (portaudio\src\common)
+pa_stream.c (portaudio\src\common)
+pa_trace.c (portaudio\src\common)
+pa_win_hostapis.c (portaudio\src\os\win)
+pa_win_util.c (portaudio\src\os\win)
+pa_win_coinitialize.c (portaudio\src\os\win)
+pa_win_waveformat.c (portaudio\src\os\win)
+pa_x86_plain_converters.c (portaudio\src\os\win)
+paex_saw.c (portaudio\examples) (Or another file containing main()
+ for the console exe to be built.)
+@endcode
+
+
+Although not strictly necessary, you may also want to add the following files to the project Header Files:
+
+@code
+portaudio.h (portaudio\include)
+pa_asio.h (portaudio\include)
+@endcode
+
+These header files define the interfaces to the PortAudio API.
+
+
+Next, go to Project Settings > All Configurations > C/C++ > Preprocessor > Preprocessor Definitions and add
+PA_USE_ASIO=1 to any entries that might be there.
+
+eg: WIN32;_CONSOLE;_MBCS changes to WIN32;_CONSOLE,_MBCS;PA_USE_ASIO=1
+
+Then, on the same Project Settings tab, go down to Additional Include Directories (in VS2010 you'll find this setting under C/C++ > General) and enter the following relative include paths:
+
+@code
+..\portaudio\include;..\portaudio\src\common;..\portaudio\src\os\win;..\asiosdk2\common;..\asiosdk2\host;..\asiosdk2\host\pc
+@endcode
+
+You'll need to make sure the relative paths are correct for the particular directory layout you're using. The above should work fine if you use the side-by-side layout we recommended earlier.
+
+Some source code in the ASIO SDK is not compatible with the Win32 API UNICODE mode (The ASIO SDK expects the non-Unicode Win32 API). Therefore you need to make sure your project is set to not use Unicode. You do this by setting the project Character Set to "Use Multi-Byte Character Set" (NOT "Use Unicode Character Set"). In VS2010 the Character Set option can be found at Configuration Properties > General > Character Set. (An alternative to setting the project to non-Unicode is to patch asiolist.cpp to work when UNICODE is defined: put #undef UNICODE at the top of the file before windows.h is included.)
+
+You should now be able to build any of the test executables in the portaudio\\examples directory.
+We suggest that you start with paex_saw.c because it's one of the simplest example files.
+
+--- Chris Share, Tom McCandless, Ross Bencina
+
+Back to the Tutorial: \ref tutorial_start
+
*/
\ No newline at end of file
-/** @page compile_windows_mingw Building Portaudio for Windows with MinGW\r
-@ingroup tutorial\r
-\r
-@section comp_mingw1 Portaudio for Windows With MinGW\r
-\r
-<i>The following document is still being reviewed</i>\r
-\r
-= MinGW/MSYS =\r
-\r
-From the [http://www.mingw.org MinGW projectpage]:\r
-\r
-MinGW: A collection of freely available and freely distributable\r
-Windows specific header files and import libraries, augmenting\r
-the GNU Compiler Collection, (GCC), and its associated\r
-tools, (GNU binutils). MinGW provides a complete Open Source\r
-programming tool set which is suitable for the development of\r
-native Windows programs that do not depend on any 3rd-party C\r
-runtime DLLs.\r
-\r
-MSYS: A Minimal SYStem providing a POSIX compatible Bourne shell\r
-environment, with a small collection of UNIX command line\r
-tools. Primarily developed as a means to execute the configure\r
-scripts and Makefiles used to build Open Source software, but\r
-also useful as a general purpose command line interface to\r
-replace Windows cmd.exe.\r
-\r
-MinGW provides a compiler/linker toolchain while MSYS is required\r
-to actually run the PortAudio configure script.\r
-\r
-Once MinGW and MSYS are installed (see the [http://www.mingw.org/MinGWiki MinGW-Wiki]) open an MSYS shell and run the famous:\r
-\r
-@code\r
-./configure\r
-make\r
-make install\r
-@endcode\r
-\r
-The above should create a working version though you might want to\r
-provide '--prefix=<path-to-install-dir>' to configure.\r
-\r
-'./configure --help' gives details as to what can be tinkered with.\r
-\r
---- Mikael Magnusson\r
-\r
-To update your copy or check out a fresh copy of the source\r
-\r
-[wiki:UsingThePortAudioSvnRepository SVN instructions]\r
-\r
---- Bob !McGwier\r
-\r
-Back to the Tutorial: \ref tutorial_start\r
-\r
+/** @page compile_windows_mingw Building Portaudio for Windows with MinGW
+@ingroup tutorial
+
+@section comp_mingw1 Portaudio for Windows With MinGW
+
+<i>The following document is still being reviewed</i>
+
+= MinGW/MSYS =
+
+From the [http://www.mingw.org MinGW projectpage]:
+
+MinGW: A collection of freely available and freely distributable
+Windows specific header files and import libraries, augmenting
+the GNU Compiler Collection, (GCC), and its associated
+tools, (GNU binutils). MinGW provides a complete Open Source
+programming tool set which is suitable for the development of
+native Windows programs that do not depend on any 3rd-party C
+runtime DLLs.
+
+MSYS: A Minimal SYStem providing a POSIX compatible Bourne shell
+environment, with a small collection of UNIX command line
+tools. Primarily developed as a means to execute the configure
+scripts and Makefiles used to build Open Source software, but
+also useful as a general purpose command line interface to
+replace Windows cmd.exe.
+
+MinGW provides a compiler/linker toolchain while MSYS is required
+to actually run the PortAudio configure script.
+
+Once MinGW and MSYS are installed (see the [http://www.mingw.org/MinGWiki MinGW-Wiki]) open an MSYS shell and run the famous:
+
+@code
+./configure
+make
+make install
+@endcode
+
+The above should create a working version though you might want to
+provide '--prefix=<path-to-install-dir>' to configure.
+
+'./configure --help' gives details as to what can be tinkered with.
+
+--- Mikael Magnusson
+
+To update your copy or check out a fresh copy of the source
+
+[wiki:UsingThePortAudioSvnRepository SVN instructions]
+
+--- Bob !McGwier
+
+Back to the Tutorial: \ref tutorial_start
+
*/
\ No newline at end of file
-/** @page exploring Exploring PortAudio\r
-@ingroup tutorial\r
-\r
-Now that you have a good idea of how PortAudio works, you can try out the example programs. You'll find them in the examples/ directory in the PortAudio distribution.\r
-\r
-For an example of playing a sine wave, see examples/paex_sine.c. \r
-\r
-For an example of recording and playing back a sound, see examples/paex_record.c. \r
-\r
-I also encourage you to examine the source for the PortAudio libraries. If you have suggestions on ways to improve them, please let us know. If you want to implement PortAudio on a new platform, please let us know as well so we can coordinate people's efforts.\r
-\r
-\r
-Previous: \ref blocking_read_write | Next: This is the end of the tutorial.\r
-\r
+/** @page exploring Exploring PortAudio
+@ingroup tutorial
+
+Now that you have a good idea of how PortAudio works, you can try out the example programs. You'll find them in the examples/ directory in the PortAudio distribution.
+
+For an example of playing a sine wave, see examples/paex_sine.c.
+
+For an example of recording and playing back a sound, see examples/paex_record.c.
+
+I also encourage you to examine the source for the PortAudio libraries. If you have suggestions on ways to improve them, please let us know. If you want to implement PortAudio on a new platform, please let us know as well so we can coordinate people's efforts.
+
+
+Previous: \ref blocking_read_write | Next: This is the end of the tutorial.
+
*/
\ No newline at end of file
-/** @page initializing_portaudio Initializing PortAudio\r
-@ingroup tutorial\r
-\r
-@section tut_init1 Initializing PortAudio\r
-\r
-Before making any other calls to PortAudio, you 'must' call Pa_Initialize(). This will trigger a scan of available devices which can be queried later. Like most PA functions, it will return a result of type paError. If the result is not paNoError, then an error has occurred.\r
-@code\r
-err = Pa_Initialize();\r
-if( err != paNoError ) goto error;\r
-@endcode\r
-\r
-You can get a text message that explains the error message by passing it to Pa_GetErrorText( err ). For Example:\r
-\r
-@code\r
-printf( "PortAudio error: %s\n", Pa_GetErrorText( err ) );\r
-@endcode\r
-\r
-It is also important, when you are done with PortAudio, to Terminate it:\r
-\r
-@code\r
-err = Pa_Terminate();\r
-if( err != paNoError )\r
- printf( "PortAudio error: %s\n", Pa_GetErrorText( err ) );\r
-@endcode\r
-\r
-\r
-Previous: \ref writing_a_callback | Next: \ref open_default_stream\r
-\r
+/** @page initializing_portaudio Initializing PortAudio
+@ingroup tutorial
+
+@section tut_init1 Initializing PortAudio
+
+Before making any other calls to PortAudio, you 'must' call Pa_Initialize(). This will trigger a scan of available devices which can be queried later. Like most PA functions, it will return a result of type paError. If the result is not paNoError, then an error has occurred.
+@code
+err = Pa_Initialize();
+if( err != paNoError ) goto error;
+@endcode
+
+You can get a text message that explains the error message by passing it to Pa_GetErrorText( err ). For Example:
+
+@code
+printf( "PortAudio error: %s\n", Pa_GetErrorText( err ) );
+@endcode
+
+It is also important, when you are done with PortAudio, to Terminate it:
+
+@code
+err = Pa_Terminate();
+if( err != paNoError )
+ printf( "PortAudio error: %s\n", Pa_GetErrorText( err ) );
+@endcode
+
+
+Previous: \ref writing_a_callback | Next: \ref open_default_stream
+
*/
\ No newline at end of file
-/** @page open_default_stream Opening a Stream Using Defaults\r
-@ingroup tutorial\r
-\r
-The next step is to open a stream, which is similar to opening a file. You can specify whether you want audio input and/or output, how many channels, the data format, sample rate, etc. Opening a ''default'' stream means opening the default input and output devices, which saves you the trouble of getting a list of devices and choosing one from the list. (We'll see how to do that later.)\r
-@code\r
-#define SAMPLE_RATE (44100)\r
-static paTestData data;\r
-\r
-.....\r
-\r
- PaStream *stream;\r
- PaError err;\r
-\r
- /* Open an audio I/O stream. */\r
- err = Pa_OpenDefaultStream( &stream,\r
- 0, /* no input channels */\r
- 2, /* stereo output */\r
- paFloat32, /* 32 bit floating point output */\r
- SAMPLE_RATE,\r
- 256, /* frames per buffer, i.e. the number\r
- of sample frames that PortAudio will\r
- request from the callback. Many apps\r
- may want to use\r
- paFramesPerBufferUnspecified, which\r
- tells PortAudio to pick the best,\r
- possibly changing, buffer size.*/\r
- patestCallback, /* this is your callback function */\r
- &data ); /*This is a pointer that will be passed to\r
- your callback*/\r
- if( err != paNoError ) goto error;\r
-@endcode\r
-\r
-The data structure and callback are described in \ref writing_a_callback.\r
-\r
-The above example opens the stream for writing, which is sufficient for playback. It is also possible to open a stream for reading, to do recording, or both reading and writing, for simultaneous recording and playback or even real-time audio processing. If you plan to do playback and recording at the same time, open only one stream with valid input and output parameters.\r
-\r
-There are some caveats to note about simultaneous read/write:\r
-\r
- - Some platforms can only open a read/write stream using the same device.\r
- - Although multiple streams can be opened, it is difficult to synchronize them.\r
- - Some platforms don't support opening multiple streams on the same device.\r
- - Using multiple streams may not be as well tested as other features.\r
- - The PortAudio library calls must be made from the same thread or synchronized by the user.\r
-\r
-\r
-Previous: \ref initializing_portaudio | Next: \ref start_stop_abort\r
-\r
+/** @page open_default_stream Opening a Stream Using Defaults
+@ingroup tutorial
+
+The next step is to open a stream, which is similar to opening a file. You can specify whether you want audio input and/or output, how many channels, the data format, sample rate, etc. Opening a ''default'' stream means opening the default input and output devices, which saves you the trouble of getting a list of devices and choosing one from the list. (We'll see how to do that later.)
+@code
+#define SAMPLE_RATE (44100)
+static paTestData data;
+
+.....
+
+ PaStream *stream;
+ PaError err;
+
+ /* Open an audio I/O stream. */
+ err = Pa_OpenDefaultStream( &stream,
+ 0, /* no input channels */
+ 2, /* stereo output */
+ paFloat32, /* 32 bit floating point output */
+ SAMPLE_RATE,
+ 256, /* frames per buffer, i.e. the number
+ of sample frames that PortAudio will
+ request from the callback. Many apps
+ may want to use
+ paFramesPerBufferUnspecified, which
+ tells PortAudio to pick the best,
+ possibly changing, buffer size.*/
+ patestCallback, /* this is your callback function */
+ &data ); /*This is a pointer that will be passed to
+ your callback*/
+ if( err != paNoError ) goto error;
+@endcode
+
+The data structure and callback are described in \ref writing_a_callback.
+
+The above example opens the stream for writing, which is sufficient for playback. It is also possible to open a stream for reading, to do recording, or both reading and writing, for simultaneous recording and playback or even real-time audio processing. If you plan to do playback and recording at the same time, open only one stream with valid input and output parameters.
+
+There are some caveats to note about simultaneous read/write:
+
+ - Some platforms can only open a read/write stream using the same device.
+ - Although multiple streams can be opened, it is difficult to synchronize them.
+ - Some platforms don't support opening multiple streams on the same device.
+ - Using multiple streams may not be as well tested as other features.
+ - The PortAudio library calls must be made from the same thread or synchronized by the user.
+
+
+Previous: \ref initializing_portaudio | Next: \ref start_stop_abort
+
*/
\ No newline at end of file
-/** @page querying_devices Enumerating and Querying PortAudio Devices\r
-@ingroup tutorial\r
-\r
-@section tut_query1 Querying Devices\r
-\r
-It is often fine to use the default device as we did previously in this tutorial, but there are times when you'll want to explicitly choose the device from a list of available devices on the system. To see a working example of this, check out pa_devs.c in the tests/ directory of the PortAudio source code. To do so, you'll need to first initialize PortAudio and Query for the number of Devices:\r
-\r
-@code\r
- int numDevices;\r
-\r
- numDevices = Pa_GetDeviceCount();\r
- if( numDevices < 0 )\r
- {\r
- printf( "ERROR: Pa_CountDevices returned 0x%x\n", numDevices );\r
- err = numDevices;\r
- goto error;\r
- }\r
-@endcode\r
-\r
-\r
-If you want to get information about each device, simply loop through as follows:\r
-\r
-@code\r
- const PaDeviceInfo *deviceInfo;\r
-\r
- for( i=0; i<numDevices; i++ )\r
- {\r
- deviceInfo = Pa_GetDeviceInfo( i );\r
- ...\r
- }\r
-@endcode\r
-\r
-The Pa_DeviceInfo structure contains a wealth of information such as the name of the devices, the default latency associated with the devices and more. The structure has the following fields:\r
-\r
-@code\r
-int structVersion\r
-const char * name\r
-PaHostApiIndex hostApi\r
-int maxInputChannels\r
-int maxOutputChannels\r
-PaTime defaultLowInputLatency\r
-PaTime defaultLowOutputLatency\r
-PaTime defaultHighInputLatency\r
-PaTime defaultHighOutputLatency\r
-double defaultSampleRate\r
-@endcode\r
-\r
-You may notice that you can't determine, from this information alone, whether or not a particular sample rate is supported. This is because some devices support ranges of sample rates, others support, a list of sample rates, and still others support some sample rates and number of channels combinations but not others. To get around this, PortAudio offers a function for testing a particular device with a given format:\r
-\r
-@code\r
- const PaStreamParameters *inputParameters;\r
- const PaStreamParameters *outputParameters;\r
- double desiredSampleRate;\r
- ...\r
- PaError err;\r
-\r
- err = Pa_IsFormatSupported( inputParameters, outputParameters, desiredSampleRate );\r
- if( err == paFormatIsSupported )\r
- {\r
- printf( "Hooray!\n");\r
- }\r
- else\r
- {\r
- printf("Too Bad.\n");\r
- }\r
-@endcode\r
-\r
-Filling in the inputParameters and outputParameters fields is shown in a moment.\r
-\r
-Once you've found a configuration you like, or one you'd like to go ahead and try, you can open the stream by filling in the PaStreamParameters structures, and calling Pa_OpenStream:\r
-\r
-@code\r
- double srate = ... ;\r
- PaStream *stream;\r
- unsigned long framesPerBuffer = ... ; //could be paFramesPerBufferUnspecified, in which case PortAudio will do its best to manage it for you, but, on some platforms, the framesPerBuffer will change in each call to the callback\r
- PaStreamParameters outputParameters;\r
- PaStreamParameters inputParameters;\r
-\r
- bzero( &inputParameters, sizeof( inputParameters ) ); //not necessary if you are filling in all the fields\r
- inputParameters.channelCount = inChan;\r
- inputParameters.device = inDevNum;\r
- inputParameters.hostApiSpecificStreamInfo = NULL;\r
- inputParameters.sampleFormat = paFloat32;\r
- inputParameters.suggestedLatency = Pa_GetDeviceInfo(inDevNum)->defaultLowInputLatency ;\r
- inputParameters.hostApiSpecificStreamInfo = NULL; //See you specific host's API docs for info on using this field\r
-\r
-\r
- bzero( &outputParameters, sizeof( outputParameters ) ); //not necessary if you are filling in all the fields\r
- outputParameters.channelCount = outChan;\r
- outputParameters.device = outDevNum;\r
- outputParameters.hostApiSpecificStreamInfo = NULL;\r
- outputParameters.sampleFormat = paFloat32;\r
- outputParameters.suggestedLatency = Pa_GetDeviceInfo(outDevNum)->defaultLowOutputLatency ;\r
- outputParameters.hostApiSpecificStreamInfo = NULL; //See you specific host's API docs for info on using this field\r
-\r
- err = Pa_OpenStream(\r
- &stream,\r
- &inputParameters,\r
- &outputParameters,\r
- srate,\r
- framesPerBuffer,\r
- paNoFlag, //flags that can be used to define dither, clip settings and more\r
- portAudioCallback, //your callback function\r
- (void *)this ); //data to be passed to callback. In C++, it is frequently (void *)this\r
- //don't forget to check errors!\r
-@endcode\r
-\r
-\r
-Previous: \ref utility_functions | Next: \ref blocking_read_write\r
-\r
+/** @page querying_devices Enumerating and Querying PortAudio Devices
+@ingroup tutorial
+
+@section tut_query1 Querying Devices
+
+It is often fine to use the default device as we did previously in this tutorial, but there are times when you'll want to explicitly choose the device from a list of available devices on the system. To see a working example of this, check out pa_devs.c in the tests/ directory of the PortAudio source code. To do so, you'll need to first initialize PortAudio and Query for the number of Devices:
+
+@code
+ int numDevices;
+
+ numDevices = Pa_GetDeviceCount();
+ if( numDevices < 0 )
+ {
+ printf( "ERROR: Pa_CountDevices returned 0x%x\n", numDevices );
+ err = numDevices;
+ goto error;
+ }
+@endcode
+
+
+If you want to get information about each device, simply loop through as follows:
+
+@code
+ const PaDeviceInfo *deviceInfo;
+
+ for( i=0; i<numDevices; i++ )
+ {
+ deviceInfo = Pa_GetDeviceInfo( i );
+ ...
+ }
+@endcode
+
+The Pa_DeviceInfo structure contains a wealth of information such as the name of the devices, the default latency associated with the devices and more. The structure has the following fields:
+
+@code
+int structVersion
+const char * name
+PaHostApiIndex hostApi
+int maxInputChannels
+int maxOutputChannels
+PaTime defaultLowInputLatency
+PaTime defaultLowOutputLatency
+PaTime defaultHighInputLatency
+PaTime defaultHighOutputLatency
+double defaultSampleRate
+@endcode
+
+You may notice that you can't determine, from this information alone, whether or not a particular sample rate is supported. This is because some devices support ranges of sample rates, others support, a list of sample rates, and still others support some sample rates and number of channels combinations but not others. To get around this, PortAudio offers a function for testing a particular device with a given format:
+
+@code
+ const PaStreamParameters *inputParameters;
+ const PaStreamParameters *outputParameters;
+ double desiredSampleRate;
+ ...
+ PaError err;
+
+ err = Pa_IsFormatSupported( inputParameters, outputParameters, desiredSampleRate );
+ if( err == paFormatIsSupported )
+ {
+ printf( "Hooray!\n");
+ }
+ else
+ {
+ printf("Too Bad.\n");
+ }
+@endcode
+
+Filling in the inputParameters and outputParameters fields is shown in a moment.
+
+Once you've found a configuration you like, or one you'd like to go ahead and try, you can open the stream by filling in the PaStreamParameters structures, and calling Pa_OpenStream:
+
+@code
+ double srate = ... ;
+ PaStream *stream;
+ unsigned long framesPerBuffer = ... ; //could be paFramesPerBufferUnspecified, in which case PortAudio will do its best to manage it for you, but, on some platforms, the framesPerBuffer will change in each call to the callback
+ PaStreamParameters outputParameters;
+ PaStreamParameters inputParameters;
+
+ bzero( &inputParameters, sizeof( inputParameters ) ); //not necessary if you are filling in all the fields
+ inputParameters.channelCount = inChan;
+ inputParameters.device = inDevNum;
+ inputParameters.hostApiSpecificStreamInfo = NULL;
+ inputParameters.sampleFormat = paFloat32;
+ inputParameters.suggestedLatency = Pa_GetDeviceInfo(inDevNum)->defaultLowInputLatency ;
+ inputParameters.hostApiSpecificStreamInfo = NULL; //See you specific host's API docs for info on using this field
+
+
+ bzero( &outputParameters, sizeof( outputParameters ) ); //not necessary if you are filling in all the fields
+ outputParameters.channelCount = outChan;
+ outputParameters.device = outDevNum;
+ outputParameters.hostApiSpecificStreamInfo = NULL;
+ outputParameters.sampleFormat = paFloat32;
+ outputParameters.suggestedLatency = Pa_GetDeviceInfo(outDevNum)->defaultLowOutputLatency ;
+ outputParameters.hostApiSpecificStreamInfo = NULL; //See you specific host's API docs for info on using this field
+
+ err = Pa_OpenStream(
+ &stream,
+ &inputParameters,
+ &outputParameters,
+ srate,
+ framesPerBuffer,
+ paNoFlag, //flags that can be used to define dither, clip settings and more
+ portAudioCallback, //your callback function
+ (void *)this ); //data to be passed to callback. In C++, it is frequently (void *)this
+ //don't forget to check errors!
+@endcode
+
+
+Previous: \ref utility_functions | Next: \ref blocking_read_write
+
*/
\ No newline at end of file
-/** @page start_stop_abort Starting, Stopping and Aborting a Stream\r
-@ingroup tutorial\r
-\r
-@section tut_startstop1 Starting, Stopping and Aborting a Stream\r
-\r
-PortAudio will not start playing back audio until you start the stream. After calling Pa_StartStream(), PortAudio will start calling your callback function to perform the audio processing.\r
-\r
-@code\r
- err = Pa_StartStream( stream );\r
- if( err != paNoError ) goto error;\r
-@endcode\r
-\r
-You can communicate with your callback routine through the data structure you passed in on the open call, or through global variables, or using other interprocess communication techniques, but please be aware that your callback function may be called at interrupt time when your foreground process is least expecting it. So avoid sharing complex data structures that are easily corrupted like double linked lists, and avoid using locks such as mutexs as this may cause your callback function to block and therefore drop audio. Such techniques may even cause deadlock on some platforms.\r
-\r
-PortAudio will continue to call your callback and process audio until you stop the stream. This can be done in one of several ways, but, before we do so, we'll want to see that some of our audio gets processed by sleeping for a few seconds. This is easy to do with Pa_Sleep(), which is used by many of the examples in the patests/ directory for exactly this purpose. Note that, for a variety of reasons, you can not rely on this function for accurate scheduling, so your stream may not run for exactly the same amount of time as you expect, but it's good enough for our example.\r
-\r
-@code\r
- /* Sleep for several seconds. */\r
- Pa_Sleep(NUM_SECONDS*1000);\r
-@endcode\r
-\r
-Now we need to stop playback. There are several ways to do this, the simplest of which is to call Pa_StopStream():\r
-\r
-@code\r
- err = Pa_StopStream( stream );\r
- if( err != paNoError ) goto error;\r
-@endcode\r
-\r
-Pa_StopStream() is designed to make sure that the buffers you've processed in your callback are all played, which may cause some delay. Alternatively, you could call Pa_AbortStream(). On some platforms, aborting the stream is much faster and may cause some data processed by your callback not to be played.\r
-\r
-Another way to stop the stream is to return either paComplete, or paAbort from your callback. paComplete ensures that the last buffer is played whereas paAbort stops the stream as soon as possible. If you stop the stream using this technique, you will need to call Pa_StopStream() before starting the stream again.\r
-\r
-Previous: \ref open_default_stream | Next: \ref terminating_portaudio\r
-\r
+/** @page start_stop_abort Starting, Stopping and Aborting a Stream
+@ingroup tutorial
+
+@section tut_startstop1 Starting, Stopping and Aborting a Stream
+
+PortAudio will not start playing back audio until you start the stream. After calling Pa_StartStream(), PortAudio will start calling your callback function to perform the audio processing.
+
+@code
+ err = Pa_StartStream( stream );
+ if( err != paNoError ) goto error;
+@endcode
+
+You can communicate with your callback routine through the data structure you passed in on the open call, or through global variables, or using other interprocess communication techniques, but please be aware that your callback function may be called at interrupt time when your foreground process is least expecting it. So avoid sharing complex data structures that are easily corrupted like double linked lists, and avoid using locks such as mutexs as this may cause your callback function to block and therefore drop audio. Such techniques may even cause deadlock on some platforms.
+
+PortAudio will continue to call your callback and process audio until you stop the stream. This can be done in one of several ways, but, before we do so, we'll want to see that some of our audio gets processed by sleeping for a few seconds. This is easy to do with Pa_Sleep(), which is used by many of the examples in the patests/ directory for exactly this purpose. Note that, for a variety of reasons, you can not rely on this function for accurate scheduling, so your stream may not run for exactly the same amount of time as you expect, but it's good enough for our example.
+
+@code
+ /* Sleep for several seconds. */
+ Pa_Sleep(NUM_SECONDS*1000);
+@endcode
+
+Now we need to stop playback. There are several ways to do this, the simplest of which is to call Pa_StopStream():
+
+@code
+ err = Pa_StopStream( stream );
+ if( err != paNoError ) goto error;
+@endcode
+
+Pa_StopStream() is designed to make sure that the buffers you've processed in your callback are all played, which may cause some delay. Alternatively, you could call Pa_AbortStream(). On some platforms, aborting the stream is much faster and may cause some data processed by your callback not to be played.
+
+Another way to stop the stream is to return either paComplete, or paAbort from your callback. paComplete ensures that the last buffer is played whereas paAbort stops the stream as soon as possible. If you stop the stream using this technique, you will need to call Pa_StopStream() before starting the stream again.
+
+Previous: \ref open_default_stream | Next: \ref terminating_portaudio
+
*/
\ No newline at end of file
-/** @page terminating_portaudio Closing a Stream and Terminating PortAudio\r
-@ingroup tutorial\r
-\r
-When you are done with a stream, you should close it to free up resources:\r
-\r
-@code\r
- err = Pa_CloseStream( stream );\r
- if( err != paNoError ) goto error;\r
-@endcode\r
-\r
-We've already mentioned this in \ref initializing_portaudio, but in case you forgot, be sure to terminate PortAudio when you are done:\r
-\r
-@code\r
- err = Pa_Terminate( );\r
- if( err != paNoError ) goto error;\r
-@endcode\r
-\r
-Previous: \ref start_stop_abort | Next: \ref utility_functions\r
-\r
+/** @page terminating_portaudio Closing a Stream and Terminating PortAudio
+@ingroup tutorial
+
+When you are done with a stream, you should close it to free up resources:
+
+@code
+ err = Pa_CloseStream( stream );
+ if( err != paNoError ) goto error;
+@endcode
+
+We've already mentioned this in \ref initializing_portaudio, but in case you forgot, be sure to terminate PortAudio when you are done:
+
+@code
+ err = Pa_Terminate( );
+ if( err != paNoError ) goto error;
+@endcode
+
+Previous: \ref start_stop_abort | Next: \ref utility_functions
+
*/
\ No newline at end of file
-/** @page tutorial_start PortAudio Tutorials\r
-@ingroup tutorial\r
-\r
-These tutorials takes you through a hands-on example of using PortAudio to make sound. If you'd prefer to start with a top-down overview of the PortAudio API, check out the @ref api_overview.\r
-\r
-@section tut_start1 Downloading\r
-\r
-First thing you need to do is download the PortAudio source code either <a href="http://www.portaudio.com/download.html">as a tarball from the website</a>, or <a href="http://www.portaudio.com/usingsvn.html">from the Subversion Repository</a>.\r
-\r
-@section tut_start2 Compiling\r
-\r
-Once you've downloaded PortAudio you'll need to compile it, which of course, depends on your environment:\r
-\r
- - Windows\r
- - \ref compile_windows\r
- - \ref compile_windows_mingw\r
- - \ref compile_windows_asio_msvc\r
- - \ref compile_cmake\r
- - Mac OS X\r
- - \ref compile_mac_coreaudio\r
- - POSIX\r
- - \ref compile_linux\r
-\r
-Many platforms with GCC/make can use the simple ./configure && make combination and simply use the resulting libraries in their code.\r
-\r
-@section tut_start3 Programming with PortAudio\r
-\r
-Below are the steps to writing a PortAudio application using the callback technique:\r
-\r
- - Write a callback function that will be called by PortAudio when audio processing is needed.\r
- - Initialize the PA library and open a stream for audio I/O.\r
- - Start the stream. Your callback function will be now be called repeatedly by PA in the background.\r
- - In your callback you can read audio data from the inputBuffer and/or write data to the outputBuffer.\r
- - Stop the stream by returning 1 from your callback, or by calling a stop function.\r
- - Close the stream and terminate the library.\r
-\r
-In addition to this "Callback" architecture, V19 also supports a "Blocking I/O" model which uses read and write calls which may be more familiar to non-audio programmers. Note that at this time, not all APIs support this functionality.\r
-\r
-In this tutorial, we'll show how to use the callback architecture to play a sawtooth wave. Much of the tutorial is taken from the file paex_saw.c, which is part of the PortAudio distribution. When you're done with this tutorial, you'll be armed with the basic knowledge you need to write an audio program. If you need more sample code, look in the "examples" and "test" directory of the PortAudio distribution. Another great source of info is the portaudio.h Doxygen page, which documents the entire V19 API. Also see the page for <a href="http://www.assembla.com/spaces/portaudio/wiki/Tips">tips on programming PortAudio</a> on the PortAudio wiki.\r
-\r
-@section tut_start4 Programming Tutorial Contents\r
-\r
-- \ref writing_a_callback\r
-- \ref initializing_portaudio\r
-- \ref open_default_stream\r
-- \ref start_stop_abort\r
-- \ref terminating_portaudio\r
-- \ref utility_functions\r
-- \ref querying_devices\r
-- \ref blocking_read_write\r
-\r
-If you are upgrading from V18, you may want to look at the <a href="http://www.portaudio.com/docs/proposals/index.html">Proposed Enhancements to PortAudio</a>, which describes the differences between V18 and V19.\r
-\r
-Once you have a basic understanding of how to use PortAudio, you might be interested in \ref exploring.\r
-\r
-Next: \ref writing_a_callback\r
-\r
+/** @page tutorial_start PortAudio Tutorials
+@ingroup tutorial
+
+These tutorials takes you through a hands-on example of using PortAudio to make sound. If you'd prefer to start with a top-down overview of the PortAudio API, check out the @ref api_overview.
+
+@section tut_start1 Downloading
+
+First thing you need to do is download the PortAudio source code either <a href="http://www.portaudio.com/download.html">as a tarball from the website</a>, or <a href="http://www.portaudio.com/usingsvn.html">from the Subversion Repository</a>.
+
+@section tut_start2 Compiling
+
+Once you've downloaded PortAudio you'll need to compile it, which of course, depends on your environment:
+
+ - Windows
+ - \ref compile_windows
+ - \ref compile_windows_mingw
+ - \ref compile_windows_asio_msvc
+ - \ref compile_cmake
+ - Mac OS X
+ - \ref compile_mac_coreaudio
+ - POSIX
+ - \ref compile_linux
+
+Many platforms with GCC/make can use the simple ./configure && make combination and simply use the resulting libraries in their code.
+
+@section tut_start3 Programming with PortAudio
+
+Below are the steps to writing a PortAudio application using the callback technique:
+
+ - Write a callback function that will be called by PortAudio when audio processing is needed.
+ - Initialize the PA library and open a stream for audio I/O.
+ - Start the stream. Your callback function will be now be called repeatedly by PA in the background.
+ - In your callback you can read audio data from the inputBuffer and/or write data to the outputBuffer.
+ - Stop the stream by returning 1 from your callback, or by calling a stop function.
+ - Close the stream and terminate the library.
+
+In addition to this "Callback" architecture, V19 also supports a "Blocking I/O" model which uses read and write calls which may be more familiar to non-audio programmers. Note that at this time, not all APIs support this functionality.
+
+In this tutorial, we'll show how to use the callback architecture to play a sawtooth wave. Much of the tutorial is taken from the file paex_saw.c, which is part of the PortAudio distribution. When you're done with this tutorial, you'll be armed with the basic knowledge you need to write an audio program. If you need more sample code, look in the "examples" and "test" directory of the PortAudio distribution. Another great source of info is the portaudio.h Doxygen page, which documents the entire V19 API. Also see the page for <a href="http://www.assembla.com/spaces/portaudio/wiki/Tips">tips on programming PortAudio</a> on the PortAudio wiki.
+
+@section tut_start4 Programming Tutorial Contents
+
+- \ref writing_a_callback
+- \ref initializing_portaudio
+- \ref open_default_stream
+- \ref start_stop_abort
+- \ref terminating_portaudio
+- \ref utility_functions
+- \ref querying_devices
+- \ref blocking_read_write
+
+If you are upgrading from V18, you may want to look at the <a href="http://www.portaudio.com/docs/proposals/index.html">Proposed Enhancements to PortAudio</a>, which describes the differences between V18 and V19.
+
+Once you have a basic understanding of how to use PortAudio, you might be interested in \ref exploring.
+
+Next: \ref writing_a_callback
+
*/
\ No newline at end of file
-/** @page utility_functions Utility Functions\r
-@ingroup tutorial\r
-\r
-In addition to the functions described elsewhere in this tutorial, PortAudio provides a number of Utility functions that are useful in a variety of circumstances. \r
-You'll want to read the portaudio.h reference, which documents the entire V19 API for details, but we'll try to cover the basics here.\r
-\r
-@section tut_util2 Version Information\r
-\r
-PortAudio offers two functions to determine the PortAudio Version. This is most useful when you are using PortAudio as a dynamic library, but it may also be useful at other times.\r
-\r
-@code\r
-int Pa_GetVersion (void)\r
-const char * Pa_GetVersionText (void)\r
-@endcode\r
-\r
-@section tut_util3 Error Text\r
-\r
-PortAudio allows you to get error text from an error number.\r
-\r
-@code\r
-const char * Pa_GetErrorText (PaError errorCode)\r
-@endcode\r
-\r
-@section tut_util4 Stream State\r
-\r
-PortAudio Streams exist in 3 states: Active, Stopped, and Callback Stopped. If a stream is in callback stopped state, you'll need to stop it before you can start it again. If you need to query the state of a PortAudio stream, there are two functions for doing so:\r
-\r
-@code\r
-PaError Pa_IsStreamStopped (PaStream *stream)\r
-PaError Pa_IsStreamActive (PaStream *stream)\r
-@endcode\r
-\r
-@section tut_util5 Stream Info\r
-\r
-If you need to retrieve info about a given stream, such as latency, and sample rate info, there's a function for that too:\r
-\r
-@code\r
-const PaStreamInfo * Pa_GetStreamInfo (PaStream *stream)\r
-@endcode\r
-\r
-@section tut_util6 Stream Time\r
-\r
-If you need to synchronise other activities such as display updates or MIDI output with the PortAudio callback you need to know the current time according to the same timebase used by the stream callback timestamps.\r
-\r
-@code\r
-PaTime Pa_GetStreamTime (PaStream *stream)\r
-@endcode\r
-\r
-@section tut_util6CPU Usage\r
-\r
-To determine how much CPU is being used by the callback, use these:\r
-\r
-@code\r
-double Pa_GetStreamCpuLoad (PaStream *stream)\r
-@endcode\r
-\r
-@section tut_util7 Other utilities\r
-\r
-These functions allow you to determine the size of a sample from its format and sleep for a given amount of time. The sleep function should not be used for precise timing or synchronization because it makes few guarantees about the exact length of time it waits. It is most useful for testing.\r
-\r
-@code\r
-PaError Pa_GetSampleSize (PaSampleFormat format)\r
-void Pa_Sleep (long msec)\r
-@endcode\r
-\r
-\r
-Previous: \ref terminating_portaudio | Next: \ref querying_devices\r
-\r
+/** @page utility_functions Utility Functions
+@ingroup tutorial
+
+In addition to the functions described elsewhere in this tutorial, PortAudio provides a number of Utility functions that are useful in a variety of circumstances.
+You'll want to read the portaudio.h reference, which documents the entire V19 API for details, but we'll try to cover the basics here.
+
+@section tut_util2 Version Information
+
+PortAudio offers two functions to determine the PortAudio Version. This is most useful when you are using PortAudio as a dynamic library, but it may also be useful at other times.
+
+@code
+int Pa_GetVersion (void)
+const char * Pa_GetVersionText (void)
+@endcode
+
+@section tut_util3 Error Text
+
+PortAudio allows you to get error text from an error number.
+
+@code
+const char * Pa_GetErrorText (PaError errorCode)
+@endcode
+
+@section tut_util4 Stream State
+
+PortAudio Streams exist in 3 states: Active, Stopped, and Callback Stopped. If a stream is in callback stopped state, you'll need to stop it before you can start it again. If you need to query the state of a PortAudio stream, there are two functions for doing so:
+
+@code
+PaError Pa_IsStreamStopped (PaStream *stream)
+PaError Pa_IsStreamActive (PaStream *stream)
+@endcode
+
+@section tut_util5 Stream Info
+
+If you need to retrieve info about a given stream, such as latency, and sample rate info, there's a function for that too:
+
+@code
+const PaStreamInfo * Pa_GetStreamInfo (PaStream *stream)
+@endcode
+
+@section tut_util6 Stream Time
+
+If you need to synchronise other activities such as display updates or MIDI output with the PortAudio callback you need to know the current time according to the same timebase used by the stream callback timestamps.
+
+@code
+PaTime Pa_GetStreamTime (PaStream *stream)
+@endcode
+
+@section tut_util6CPU Usage
+
+To determine how much CPU is being used by the callback, use these:
+
+@code
+double Pa_GetStreamCpuLoad (PaStream *stream)
+@endcode
+
+@section tut_util7 Other utilities
+
+These functions allow you to determine the size of a sample from its format and sleep for a given amount of time. The sleep function should not be used for precise timing or synchronization because it makes few guarantees about the exact length of time it waits. It is most useful for testing.
+
+@code
+PaError Pa_GetSampleSize (PaSampleFormat format)
+void Pa_Sleep (long msec)
+@endcode
+
+
+Previous: \ref terminating_portaudio | Next: \ref querying_devices
+
*/
\ No newline at end of file
-/** @page writing_a_callback Writing a Callback Function\r
-@ingroup tutorial\r
-\r
-To write a program using PortAudio, you must include the "portaudio.h" include file. You may wish to read "portaudio.h" because it contains a complete description of the PortAudio functions and constants. Alternatively, you could browse the [http://www.portaudio.com/docs/v19-doxydocs/portaudio_8h.html "portaudio.h" Doxygen page]\r
-@code\r
-#include "portaudio.h"\r
-@endcode\r
-The next task is to write your own "callback" function. The "callback" is a function that is called by the PortAudio engine whenever it has captured audio data, or when it needs more audio data for output.\r
-\r
-Before we begin, it's important to realize that the callback is a delicate place. This is because some systems perform the callback in a special thread, or interrupt handler, and it is rarely treated the same as the rest of your code.\r
-For most modern systems, you won't be able to cause crashes by making disallowed calls in the callback, but if you want your code to produce glitch-free audio, you will have to make sure you avoid function calls that may take an unbounded amount of time\r
-to execute. Exactly what these are depend on your platform but almost certainly include the following: memory allocation/deallocation, I/O (including file I/O as well as console I/O, such as printf()), context switching (such as exec() or\r
-yield()), mutex operations, or anything else that might rely on the OS. If you think short critical sections are safe please go read about priority inversion. Windows amd Mac OS schedulers have no real-time safe priority inversion prevention. Other platforms require special mutex flags. In addition, it is not safe to call any PortAudio API functions in the callback except as explicitly permitted in the documentation.\r
-\r
-\r
-Your callback function must return an int and accept the exact parameters specified in this typedef:\r
-\r
-@code\r
-typedef int PaStreamCallback( const void *input,\r
- void *output,\r
- unsigned long frameCount,\r
- const PaStreamCallbackTimeInfo* timeInfo,\r
- PaStreamCallbackFlags statusFlags,\r
- void *userData ) ;\r
-@endcode\r
-Here is an example callback function from the test file "patests/patest_saw.c". It calculates a simple left and right sawtooth signal and writes it to the output buffer. Notice that in this example, the signals are of float data type. The signals must be between -1.0 and +1.0. You can also use 16 bit integers or other formats which are specified during setup, but floats are easiest to work with. You can pass a pointer to your data structure through PortAudio which will appear as userData.\r
-\r
-@code\r
-typedef struct\r
-{\r
- float left_phase;\r
- float right_phase;\r
-} \r
-paTestData;\r
-\r
-/* This routine will be called by the PortAudio engine when audio is needed.\r
-** It may called at interrupt level on some machines so don't do anything\r
-** that could mess up the system like calling malloc() or free().\r
-*/ \r
-static int patestCallback( const void *inputBuffer, void *outputBuffer,\r
- unsigned long framesPerBuffer,\r
- const PaStreamCallbackTimeInfo* timeInfo,\r
- PaStreamCallbackFlags statusFlags,\r
- void *userData )\r
-{\r
- /* Cast data passed through stream to our structure. */\r
- paTestData *data = (paTestData*)userData; \r
- float *out = (float*)outputBuffer;\r
- unsigned int i;\r
- (void) inputBuffer; /* Prevent unused variable warning. */\r
- \r
- for( i=0; i<framesPerBuffer; i++ )\r
- {\r
- *out++ = data->left_phase; /* left */\r
- *out++ = data->right_phase; /* right */\r
- /* Generate simple sawtooth phaser that ranges between -1.0 and 1.0. */\r
- data->left_phase += 0.01f;\r
- /* When signal reaches top, drop back down. */\r
- if( data->left_phase >= 1.0f ) data->left_phase -= 2.0f;\r
- /* higher pitch so we can distinguish left and right. */\r
- data->right_phase += 0.03f;\r
- if( data->right_phase >= 1.0f ) data->right_phase -= 2.0f;\r
- }\r
- return 0;\r
-}\r
-@endcode\r
-\r
-Previous: \ref tutorial_start | Next: \ref initializing_portaudio\r
-\r
-*/\r
+/** @page writing_a_callback Writing a Callback Function
+@ingroup tutorial
+
+To write a program using PortAudio, you must include the "portaudio.h" include file. You may wish to read "portaudio.h" because it contains a complete description of the PortAudio functions and constants. Alternatively, you could browse the [http://www.portaudio.com/docs/v19-doxydocs/portaudio_8h.html "portaudio.h" Doxygen page]
+@code
+#include "portaudio.h"
+@endcode
+The next task is to write your own "callback" function. The "callback" is a function that is called by the PortAudio engine whenever it has captured audio data, or when it needs more audio data for output.
+
+Before we begin, it's important to realize that the callback is a delicate place. This is because some systems perform the callback in a special thread, or interrupt handler, and it is rarely treated the same as the rest of your code.
+For most modern systems, you won't be able to cause crashes by making disallowed calls in the callback, but if you want your code to produce glitch-free audio, you will have to make sure you avoid function calls that may take an unbounded amount of time
+to execute. Exactly what these are depend on your platform but almost certainly include the following: memory allocation/deallocation, I/O (including file I/O as well as console I/O, such as printf()), context switching (such as exec() or
+yield()), mutex operations, or anything else that might rely on the OS. If you think short critical sections are safe please go read about priority inversion. Windows amd Mac OS schedulers have no real-time safe priority inversion prevention. Other platforms require special mutex flags. In addition, it is not safe to call any PortAudio API functions in the callback except as explicitly permitted in the documentation.
+
+
+Your callback function must return an int and accept the exact parameters specified in this typedef:
+
+@code
+typedef int PaStreamCallback( const void *input,
+ void *output,
+ unsigned long frameCount,
+ const PaStreamCallbackTimeInfo* timeInfo,
+ PaStreamCallbackFlags statusFlags,
+ void *userData ) ;
+@endcode
+Here is an example callback function from the test file "patests/patest_saw.c". It calculates a simple left and right sawtooth signal and writes it to the output buffer. Notice that in this example, the signals are of float data type. The signals must be between -1.0 and +1.0. You can also use 16 bit integers or other formats which are specified during setup, but floats are easiest to work with. You can pass a pointer to your data structure through PortAudio which will appear as userData.
+
+@code
+typedef struct
+{
+ float left_phase;
+ float right_phase;
+}
+paTestData;
+
+/* This routine will be called by the PortAudio engine when audio is needed.
+** It may called at interrupt level on some machines so don't do anything
+** that could mess up the system like calling malloc() or free().
+*/
+static int patestCallback( const void *inputBuffer, void *outputBuffer,
+ unsigned long framesPerBuffer,
+ const PaStreamCallbackTimeInfo* timeInfo,
+ PaStreamCallbackFlags statusFlags,
+ void *userData )
+{
+ /* Cast data passed through stream to our structure. */
+ paTestData *data = (paTestData*)userData;
+ float *out = (float*)outputBuffer;
+ unsigned int i;
+ (void) inputBuffer; /* Prevent unused variable warning. */
+
+ for( i=0; i<framesPerBuffer; i++ )
+ {
+ *out++ = data->left_phase; /* left */
+ *out++ = data->right_phase; /* right */
+ /* Generate simple sawtooth phaser that ranges between -1.0 and 1.0. */
+ data->left_phase += 0.01f;
+ /* When signal reaches top, drop back down. */
+ if( data->left_phase >= 1.0f ) data->left_phase -= 2.0f;
+ /* higher pitch so we can distinguish left and right. */
+ data->right_phase += 0.03f;
+ if( data->right_phase >= 1.0f ) data->right_phase -= 2.0f;
+ }
+ return 0;
+}
+@endcode
+
+Previous: \ref tutorial_start | Next: \ref initializing_portaudio
+
+*/
-import os\r
-import os.path\r
-import string\r
-\r
-paRootDirectory = '../../'\r
-paHtmlDocDirectory = os.path.join( paRootDirectory, "doc", "html" )\r
-\r
-## Script to check documentation status\r
-## this script assumes that html doxygen documentation has been generated\r
-##\r
-## it then walks the entire portaudio source tree and check that\r
-## - every source file (.c,.h,.cpp) has a doxygen comment block containing\r
-## - a @file directive\r
-## - a @brief directive\r
-## - a @ingroup directive\r
-## - it also checks that a corresponding html documentation file has been generated.\r
-##\r
-## This can be used as a first-level check to make sure the documentation is in order.\r
-##\r
-## The idea is to get a list of which files are missing doxygen documentation.\r
-##\r
-## How to run:\r
-## $ cd doc/utils\r
-## $ python checkfiledocs.py\r
-\r
-def oneOf_a_in_b(a, b):\r
- for x in a:\r
- if x in b:\r
- return True\r
- return False\r
-\r
-# recurse from top and return a list of all with the given\r
-# extensions. ignore .svn directories. return absolute paths\r
-def recursiveFindFiles( top, extensions, dirBlacklist, includePaths ):\r
- result = []\r
- for (dirpath, dirnames, filenames) in os.walk(top):\r
- if not oneOf_a_in_b(dirBlacklist, dirpath):\r
- for f in filenames:\r
- if os.path.splitext(f)[1] in extensions:\r
- if includePaths:\r
- result.append( os.path.abspath( os.path.join( dirpath, f ) ) )\r
- else:\r
- result.append( f )\r
- return result\r
-\r
-# generate the html file name that doxygen would use for\r
-# a particular source file. this is a brittle conversion\r
-# which i worked out by trial and error\r
-def doxygenHtmlDocFileName( sourceFile ):\r
- return sourceFile.replace( '_', '__' ).replace( '.', '_8' ) + '.html'\r
-\r
-\r
-sourceFiles = recursiveFindFiles( os.path.join(paRootDirectory,'src'), [ '.c', '.h', '.cpp' ], ['.svn', 'mingw-include'], True );\r
-sourceFiles += recursiveFindFiles( os.path.join(paRootDirectory,'include'), [ '.c', '.h', '.cpp' ], ['.svn'], True );\r
-docFiles = recursiveFindFiles( paHtmlDocDirectory, [ '.html' ], ['.svn'], False );\r
-\r
-\r
-\r
-currentFile = ""\r
-\r
-def printError( f, message ):\r
- global currentFile\r
- if f != currentFile:\r
- currentFile = f\r
- print f, ":"\r
- print "\t!", message\r
-\r
-\r
-for f in sourceFiles:\r
- if not doxygenHtmlDocFileName( os.path.basename(f) ) in docFiles:\r
- printError( f, "no doxygen generated doc page" )\r
-\r
- s = file( f, 'rt' ).read()\r
-\r
- if not '/**' in s:\r
- printError( f, "no doxygen /** block" ) \r
- \r
- if not '@file' in s:\r
- printError( f, "no doxygen @file tag" )\r
-\r
- if not '@brief' in s:\r
- printError( f, "no doxygen @brief tag" )\r
- \r
- if not '@ingroup' in s:\r
- printError( f, "no doxygen @ingroup tag" )\r
- \r
-\r
+import os
+import os.path
+import string
+
+paRootDirectory = '../../'
+paHtmlDocDirectory = os.path.join( paRootDirectory, "doc", "html" )
+
+## Script to check documentation status
+## this script assumes that html doxygen documentation has been generated
+##
+## it then walks the entire portaudio source tree and check that
+## - every source file (.c,.h,.cpp) has a doxygen comment block containing
+## - a @file directive
+## - a @brief directive
+## - a @ingroup directive
+## - it also checks that a corresponding html documentation file has been generated.
+##
+## This can be used as a first-level check to make sure the documentation is in order.
+##
+## The idea is to get a list of which files are missing doxygen documentation.
+##
+## How to run:
+## $ cd doc/utils
+## $ python checkfiledocs.py
+
+def oneOf_a_in_b(a, b):
+ for x in a:
+ if x in b:
+ return True
+ return False
+
+# recurse from top and return a list of all with the given
+# extensions. ignore .svn directories. return absolute paths
+def recursiveFindFiles( top, extensions, dirBlacklist, includePaths ):
+ result = []
+ for (dirpath, dirnames, filenames) in os.walk(top):
+ if not oneOf_a_in_b(dirBlacklist, dirpath):
+ for f in filenames:
+ if os.path.splitext(f)[1] in extensions:
+ if includePaths:
+ result.append( os.path.abspath( os.path.join( dirpath, f ) ) )
+ else:
+ result.append( f )
+ return result
+
+# generate the html file name that doxygen would use for
+# a particular source file. this is a brittle conversion
+# which i worked out by trial and error
+def doxygenHtmlDocFileName( sourceFile ):
+ return sourceFile.replace( '_', '__' ).replace( '.', '_8' ) + '.html'
+
+
+sourceFiles = recursiveFindFiles( os.path.join(paRootDirectory,'src'), [ '.c', '.h', '.cpp' ], ['.svn', 'mingw-include'], True );
+sourceFiles += recursiveFindFiles( os.path.join(paRootDirectory,'include'), [ '.c', '.h', '.cpp' ], ['.svn'], True );
+docFiles = recursiveFindFiles( paHtmlDocDirectory, [ '.html' ], ['.svn'], False );
+
+
+
+currentFile = ""
+
+def printError( f, message ):
+ global currentFile
+ if f != currentFile:
+ currentFile = f
+ print f, ":"
+ print "\t!", message
+
+
+for f in sourceFiles:
+ if not doxygenHtmlDocFileName( os.path.basename(f) ) in docFiles:
+ printError( f, "no doxygen generated doc page" )
+
+ s = file( f, 'rt' ).read()
+
+ if not '/**' in s:
+ printError( f, "no doxygen /** block" )
+
+ if not '@file' in s:
+ printError( f, "no doxygen @file tag" )
+
+ if not '@brief' in s:
+ printError( f, "no doxygen @brief tag" )
+
+ if not '@ingroup' in s:
+ printError( f, "no doxygen @ingroup tag" )
+
+
-/** @file paex_read_write_wire.c\r
- @ingroup examples_src\r
- @brief Tests full duplex blocking I/O by passing input straight to output.\r
- @author Bjorn Roche. XO Audio LLC for Z-Systems Engineering.\r
- @author based on code by: Phil Burk http://www.softsynth.com\r
- @author based on code by: Ross Bencina rossb@audiomulch.com\r
-*/\r
-/*\r
- * $Id: patest_read_record.c 757 2004-02-13 07:48:10Z rossbencina $\r
- *\r
- * This program uses the PortAudio Portable Audio Library.\r
- * For more information see: http://www.portaudio.com\r
- * Copyright (c) 1999-2000 Ross Bencina and Phil Burk\r
- *\r
- * Permission is hereby granted, free of charge, to any person obtaining\r
- * a copy of this software and associated documentation files\r
- * (the "Software"), to deal in the Software without restriction,\r
- * including without limitation the rights to use, copy, modify, merge,\r
- * publish, distribute, sublicense, and/or sell copies of the Software,\r
- * and to permit persons to whom the Software is furnished to do so,\r
- * subject to the following conditions:\r
- *\r
- * The above copyright notice and this permission notice shall be\r
- * included in all copies or substantial portions of the Software.\r
- *\r
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\r
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\r
- * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\r
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\r
- * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
- */\r
-\r
-/*\r
- * The text above constitutes the entire PortAudio license; however, \r
- * the PortAudio community also makes the following non-binding requests:\r
- *\r
- * Any person wishing to distribute modifications to the Software is\r
- * requested to send the modifications to the original developer so that\r
- * they can be incorporated into the canonical version. It is also \r
- * requested that these non-binding requests be included along with the \r
- * license above.\r
- */\r
-\r
-#include <stdio.h>\r
-#include <stdlib.h>\r
-#include <string.h>\r
-#include "portaudio.h"\r
-\r
-/* #define SAMPLE_RATE (17932) // Test failure to open with this value. */\r
-#define SAMPLE_RATE (44100)\r
-#define FRAMES_PER_BUFFER (1024)\r
-#define NUM_CHANNELS (2)\r
-#define NUM_SECONDS (15)\r
-/* #define DITHER_FLAG (paDitherOff) */\r
-#define DITHER_FLAG (0) /**/\r
-\r
-/* @todo Underflow and overflow is disabled until we fix priming of blocking write. */\r
-#define CHECK_OVERFLOW (0)\r
-#define CHECK_UNDERFLOW (0)\r
-\r
-\r
-/* Select sample format. */\r
-#if 0\r
-#define PA_SAMPLE_TYPE paFloat32\r
-#define SAMPLE_SIZE (4)\r
-#define SAMPLE_SILENCE (0.0f)\r
-#define CLEAR(a) memset( (a), 0, FRAMES_PER_BUFFER * NUM_CHANNELS * SAMPLE_SIZE )\r
-#define PRINTF_S_FORMAT "%.8f"\r
-#elif 0\r
-#define PA_SAMPLE_TYPE paInt16\r
-#define SAMPLE_SIZE (2)\r
-#define SAMPLE_SILENCE (0)\r
-#define CLEAR(a) memset( (a), 0, FRAMES_PER_BUFFER * NUM_CHANNELS * SAMPLE_SIZE )\r
-#define PRINTF_S_FORMAT "%d"\r
-#elif 1\r
-#define PA_SAMPLE_TYPE paInt24\r
-#define SAMPLE_SIZE (3)\r
-#define SAMPLE_SILENCE (0)\r
-#define CLEAR(a) memset( (a), 0, FRAMES_PER_BUFFER * NUM_CHANNELS * SAMPLE_SIZE )\r
-#define PRINTF_S_FORMAT "%d"\r
-#elif 0\r
-#define PA_SAMPLE_TYPE paInt8\r
-#define SAMPLE_SIZE (1)\r
-#define SAMPLE_SILENCE (0)\r
-#define CLEAR(a) memset( (a), 0, FRAMES_PER_BUFFER * NUM_CHANNELS * SAMPLE_SIZE )\r
-#define PRINTF_S_FORMAT "%d"\r
-#else\r
-#define PA_SAMPLE_TYPE paUInt8\r
-#define SAMPLE_SIZE (1)\r
-#define SAMPLE_SILENCE (128)\r
-#define CLEAR( a ) { \\r
- int i; \\r
- for( i=0; i<FRAMES_PER_BUFFER*NUM_CHANNELS; i++ ) \\r
- ((unsigned char *)a)[i] = (SAMPLE_SILENCE); \\r
-}\r
-#define PRINTF_S_FORMAT "%d"\r
-#endif\r
-\r
-\r
-/*******************************************************************/\r
-int main(void);\r
-int main(void)\r
-{\r
- PaStreamParameters inputParameters, outputParameters;\r
- PaStream *stream = NULL;\r
- PaError err;\r
- char *sampleBlock;\r
- int i;\r
- int numBytes;\r
- \r
- \r
- printf("patest_read_write_wire.c\n"); fflush(stdout);\r
-\r
- numBytes = FRAMES_PER_BUFFER * NUM_CHANNELS * SAMPLE_SIZE ;\r
- sampleBlock = (char *) malloc( numBytes );\r
- if( sampleBlock == NULL )\r
- {\r
- printf("Could not allocate record array.\n");\r
- exit(1);\r
- }\r
- CLEAR( sampleBlock );\r
-\r
- err = Pa_Initialize();\r
- if( err != paNoError ) goto error;\r
-\r
- inputParameters.device = Pa_GetDefaultInputDevice(); /* default input device */\r
- printf( "Input device # %d.\n", inputParameters.device );\r
- printf( "Input LL: %g s\n", Pa_GetDeviceInfo( inputParameters.device )->defaultLowInputLatency );\r
- printf( "Input HL: %g s\n", Pa_GetDeviceInfo( inputParameters.device )->defaultHighInputLatency );\r
- inputParameters.channelCount = NUM_CHANNELS;\r
- inputParameters.sampleFormat = PA_SAMPLE_TYPE;\r
- inputParameters.suggestedLatency = Pa_GetDeviceInfo( inputParameters.device )->defaultHighInputLatency ;\r
- inputParameters.hostApiSpecificStreamInfo = NULL;\r
-\r
- outputParameters.device = Pa_GetDefaultOutputDevice(); /* default output device */\r
- printf( "Output device # %d.\n", outputParameters.device );\r
- printf( "Output LL: %g s\n", Pa_GetDeviceInfo( outputParameters.device )->defaultLowOutputLatency );\r
- printf( "Output HL: %g s\n", Pa_GetDeviceInfo( outputParameters.device )->defaultHighOutputLatency );\r
- outputParameters.channelCount = NUM_CHANNELS;\r
- outputParameters.sampleFormat = PA_SAMPLE_TYPE;\r
- outputParameters.suggestedLatency = Pa_GetDeviceInfo( outputParameters.device )->defaultHighOutputLatency;\r
- outputParameters.hostApiSpecificStreamInfo = NULL;\r
-\r
- /* -- setup -- */\r
-\r
- err = Pa_OpenStream(\r
- &stream,\r
- &inputParameters,\r
- &outputParameters,\r
- SAMPLE_RATE,\r
- FRAMES_PER_BUFFER,\r
- paClipOff, /* we won't output out of range samples so don't bother clipping them */\r
- NULL, /* no callback, use blocking API */\r
- NULL ); /* no callback, so no callback userData */\r
- if( err != paNoError ) goto error;\r
-\r
- err = Pa_StartStream( stream );\r
- if( err != paNoError ) goto error;\r
- printf("Wire on. Will run %d seconds.\n", NUM_SECONDS); fflush(stdout);\r
-\r
- for( i=0; i<(NUM_SECONDS*SAMPLE_RATE)/FRAMES_PER_BUFFER; ++i )\r
- {\r
- err = Pa_WriteStream( stream, sampleBlock, FRAMES_PER_BUFFER );\r
- if( err && CHECK_UNDERFLOW ) goto xrun;\r
- err = Pa_ReadStream( stream, sampleBlock, FRAMES_PER_BUFFER );\r
- if( err && CHECK_OVERFLOW ) goto xrun;\r
- }\r
- err = Pa_StopStream( stream );\r
- if( err != paNoError ) goto error;\r
-\r
- CLEAR( sampleBlock );\r
-/*\r
- err = Pa_StartStream( stream );\r
- if( err != paNoError ) goto error;\r
- printf("Wire on. Interrupt to stop.\n"); fflush(stdout);\r
-\r
- while( 1 )\r
- {\r
- err = Pa_WriteStream( stream, sampleBlock, FRAMES_PER_BUFFER );\r
- if( err ) goto xrun;\r
- err = Pa_ReadStream( stream, sampleBlock, FRAMES_PER_BUFFER );\r
- if( err ) goto xrun;\r
- }\r
- err = Pa_StopStream( stream );\r
- if( err != paNoError ) goto error;\r
-\r
- Pa_CloseStream( stream );\r
-*/\r
- free( sampleBlock );\r
-\r
- Pa_Terminate();\r
- return 0;\r
-\r
-xrun:\r
- if( stream ) {\r
- Pa_AbortStream( stream );\r
- Pa_CloseStream( stream );\r
- }\r
- free( sampleBlock );\r
- Pa_Terminate();\r
- if( err & paInputOverflow )\r
- fprintf( stderr, "Input Overflow.\n" );\r
- if( err & paOutputUnderflow )\r
- fprintf( stderr, "Output Underflow.\n" );\r
- return -2;\r
-\r
-error:\r
- if( stream ) {\r
- Pa_AbortStream( stream );\r
- Pa_CloseStream( stream );\r
- }\r
- free( sampleBlock );\r
- Pa_Terminate();\r
- fprintf( stderr, "An error occured while using the portaudio stream\n" );\r
- fprintf( stderr, "Error number: %d\n", err );\r
- fprintf( stderr, "Error message: %s\n", Pa_GetErrorText( err ) );\r
- return -1;\r
-}\r
-\r
+/** @file paex_read_write_wire.c
+ @ingroup examples_src
+ @brief Tests full duplex blocking I/O by passing input straight to output.
+ @author Bjorn Roche. XO Audio LLC for Z-Systems Engineering.
+ @author based on code by: Phil Burk http://www.softsynth.com
+ @author based on code by: Ross Bencina rossb@audiomulch.com
+*/
+/*
+ * $Id: patest_read_record.c 757 2004-02-13 07:48:10Z rossbencina $
+ *
+ * This program uses the PortAudio Portable Audio Library.
+ * For more information see: http://www.portaudio.com
+ * Copyright (c) 1999-2000 Ross Bencina and Phil Burk
+ *
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * The text above constitutes the entire PortAudio license; however,
+ * the PortAudio community also makes the following non-binding requests:
+ *
+ * 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. It is also
+ * requested that these non-binding requests be included along with the
+ * license above.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "portaudio.h"
+
+/* #define SAMPLE_RATE (17932) // Test failure to open with this value. */
+#define SAMPLE_RATE (44100)
+#define FRAMES_PER_BUFFER (1024)
+#define NUM_CHANNELS (2)
+#define NUM_SECONDS (15)
+/* #define DITHER_FLAG (paDitherOff) */
+#define DITHER_FLAG (0) /**/
+
+/* @todo Underflow and overflow is disabled until we fix priming of blocking write. */
+#define CHECK_OVERFLOW (0)
+#define CHECK_UNDERFLOW (0)
+
+
+/* Select sample format. */
+#if 0
+#define PA_SAMPLE_TYPE paFloat32
+#define SAMPLE_SIZE (4)
+#define SAMPLE_SILENCE (0.0f)
+#define CLEAR(a) memset( (a), 0, FRAMES_PER_BUFFER * NUM_CHANNELS * SAMPLE_SIZE )
+#define PRINTF_S_FORMAT "%.8f"
+#elif 0
+#define PA_SAMPLE_TYPE paInt16
+#define SAMPLE_SIZE (2)
+#define SAMPLE_SILENCE (0)
+#define CLEAR(a) memset( (a), 0, FRAMES_PER_BUFFER * NUM_CHANNELS * SAMPLE_SIZE )
+#define PRINTF_S_FORMAT "%d"
+#elif 1
+#define PA_SAMPLE_TYPE paInt24
+#define SAMPLE_SIZE (3)
+#define SAMPLE_SILENCE (0)
+#define CLEAR(a) memset( (a), 0, FRAMES_PER_BUFFER * NUM_CHANNELS * SAMPLE_SIZE )
+#define PRINTF_S_FORMAT "%d"
+#elif 0
+#define PA_SAMPLE_TYPE paInt8
+#define SAMPLE_SIZE (1)
+#define SAMPLE_SILENCE (0)
+#define CLEAR(a) memset( (a), 0, FRAMES_PER_BUFFER * NUM_CHANNELS * SAMPLE_SIZE )
+#define PRINTF_S_FORMAT "%d"
+#else
+#define PA_SAMPLE_TYPE paUInt8
+#define SAMPLE_SIZE (1)
+#define SAMPLE_SILENCE (128)
+#define CLEAR( a ) { \
+ int i; \
+ for( i=0; i<FRAMES_PER_BUFFER*NUM_CHANNELS; i++ ) \
+ ((unsigned char *)a)[i] = (SAMPLE_SILENCE); \
+}
+#define PRINTF_S_FORMAT "%d"
+#endif
+
+
+/*******************************************************************/
+int main(void);
+int main(void)
+{
+ PaStreamParameters inputParameters, outputParameters;
+ PaStream *stream = NULL;
+ PaError err;
+ char *sampleBlock;
+ int i;
+ int numBytes;
+
+
+ printf("patest_read_write_wire.c\n"); fflush(stdout);
+
+ numBytes = FRAMES_PER_BUFFER * NUM_CHANNELS * SAMPLE_SIZE ;
+ sampleBlock = (char *) malloc( numBytes );
+ if( sampleBlock == NULL )
+ {
+ printf("Could not allocate record array.\n");
+ exit(1);
+ }
+ CLEAR( sampleBlock );
+
+ err = Pa_Initialize();
+ if( err != paNoError ) goto error;
+
+ inputParameters.device = Pa_GetDefaultInputDevice(); /* default input device */
+ printf( "Input device # %d.\n", inputParameters.device );
+ printf( "Input LL: %g s\n", Pa_GetDeviceInfo( inputParameters.device )->defaultLowInputLatency );
+ printf( "Input HL: %g s\n", Pa_GetDeviceInfo( inputParameters.device )->defaultHighInputLatency );
+ inputParameters.channelCount = NUM_CHANNELS;
+ inputParameters.sampleFormat = PA_SAMPLE_TYPE;
+ inputParameters.suggestedLatency = Pa_GetDeviceInfo( inputParameters.device )->defaultHighInputLatency ;
+ inputParameters.hostApiSpecificStreamInfo = NULL;
+
+ outputParameters.device = Pa_GetDefaultOutputDevice(); /* default output device */
+ printf( "Output device # %d.\n", outputParameters.device );
+ printf( "Output LL: %g s\n", Pa_GetDeviceInfo( outputParameters.device )->defaultLowOutputLatency );
+ printf( "Output HL: %g s\n", Pa_GetDeviceInfo( outputParameters.device )->defaultHighOutputLatency );
+ outputParameters.channelCount = NUM_CHANNELS;
+ outputParameters.sampleFormat = PA_SAMPLE_TYPE;
+ outputParameters.suggestedLatency = Pa_GetDeviceInfo( outputParameters.device )->defaultHighOutputLatency;
+ outputParameters.hostApiSpecificStreamInfo = NULL;
+
+ /* -- setup -- */
+
+ err = Pa_OpenStream(
+ &stream,
+ &inputParameters,
+ &outputParameters,
+ SAMPLE_RATE,
+ FRAMES_PER_BUFFER,
+ paClipOff, /* we won't output out of range samples so don't bother clipping them */
+ NULL, /* no callback, use blocking API */
+ NULL ); /* no callback, so no callback userData */
+ if( err != paNoError ) goto error;
+
+ err = Pa_StartStream( stream );
+ if( err != paNoError ) goto error;
+ printf("Wire on. Will run %d seconds.\n", NUM_SECONDS); fflush(stdout);
+
+ for( i=0; i<(NUM_SECONDS*SAMPLE_RATE)/FRAMES_PER_BUFFER; ++i )
+ {
+ err = Pa_WriteStream( stream, sampleBlock, FRAMES_PER_BUFFER );
+ if( err && CHECK_UNDERFLOW ) goto xrun;
+ err = Pa_ReadStream( stream, sampleBlock, FRAMES_PER_BUFFER );
+ if( err && CHECK_OVERFLOW ) goto xrun;
+ }
+ err = Pa_StopStream( stream );
+ if( err != paNoError ) goto error;
+
+ CLEAR( sampleBlock );
+/*
+ err = Pa_StartStream( stream );
+ if( err != paNoError ) goto error;
+ printf("Wire on. Interrupt to stop.\n"); fflush(stdout);
+
+ while( 1 )
+ {
+ err = Pa_WriteStream( stream, sampleBlock, FRAMES_PER_BUFFER );
+ if( err ) goto xrun;
+ err = Pa_ReadStream( stream, sampleBlock, FRAMES_PER_BUFFER );
+ if( err ) goto xrun;
+ }
+ err = Pa_StopStream( stream );
+ if( err != paNoError ) goto error;
+
+ Pa_CloseStream( stream );
+*/
+ free( sampleBlock );
+
+ Pa_Terminate();
+ return 0;
+
+xrun:
+ if( stream ) {
+ Pa_AbortStream( stream );
+ Pa_CloseStream( stream );
+ }
+ free( sampleBlock );
+ Pa_Terminate();
+ if( err & paInputOverflow )
+ fprintf( stderr, "Input Overflow.\n" );
+ if( err & paOutputUnderflow )
+ fprintf( stderr, "Output Underflow.\n" );
+ return -2;
+
+error:
+ if( stream ) {
+ Pa_AbortStream( stream );
+ Pa_CloseStream( stream );
+ }
+ free( sampleBlock );
+ Pa_Terminate();
+ fprintf( stderr, "An error occured while using the portaudio stream\n" );
+ fprintf( stderr, "Error number: %d\n", err );
+ fprintf( stderr, "Error message: %s\n", Pa_GetErrorText( err ) );
+ return -1;
+}
+
-/** @file paex_record_file.c\r
- @ingroup examples_src\r
- @brief Record input into a file, then playback recorded data from file (Windows only at the moment) \r
- @author Robert Bielik\r
-*/\r
-/*\r
- * $Id: paex_record_file.c 1752 2011-09-08 03:21:55Z philburk $\r
- *\r
- * This program uses the PortAudio Portable Audio Library.\r
- * For more information see: http://www.portaudio.com\r
- * Copyright (c) 1999-2000 Ross Bencina and Phil Burk\r
- *\r
- * Permission is hereby granted, free of charge, to any person obtaining\r
- * a copy of this software and associated documentation files\r
- * (the "Software"), to deal in the Software without restriction,\r
- * including without limitation the rights to use, copy, modify, merge,\r
- * publish, distribute, sublicense, and/or sell copies of the Software,\r
- * and to permit persons to whom the Software is furnished to do so,\r
- * subject to the following conditions:\r
- *\r
- * The above copyright notice and this permission notice shall be\r
- * included in all copies or substantial portions of the Software.\r
- *\r
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\r
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\r
- * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\r
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\r
- * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
- */\r
-\r
-/*\r
- * The text above constitutes the entire PortAudio license; however, \r
- * the PortAudio community also makes the following non-binding requests:\r
- *\r
- * Any person wishing to distribute modifications to the Software is\r
- * requested to send the modifications to the original developer so that\r
- * they can be incorporated into the canonical version. It is also \r
- * requested that these non-binding requests be included along with the \r
- * license above.\r
- */\r
-\r
-#include <stdio.h>\r
-#include <stdlib.h>\r
-#include "portaudio.h"\r
-#include "pa_ringbuffer.h"\r
-#include "pa_util.h"\r
-\r
-#ifdef _WIN32\r
-#include <windows.h>\r
-#include <process.h>\r
-#endif\r
-\r
-/* #define SAMPLE_RATE (17932) // Test failure to open with this value. */\r
-#define FILE_NAME "audio_data.raw"\r
-#define SAMPLE_RATE (44100)\r
-#define FRAMES_PER_BUFFER (512)\r
-#define NUM_SECONDS (10)\r
-#define NUM_CHANNELS (2)\r
-#define NUM_WRITES_PER_BUFFER (4)\r
-/* #define DITHER_FLAG (paDitherOff) */\r
-#define DITHER_FLAG (0) /**/\r
-\r
-\r
-/* Select sample format. */\r
-#if 1\r
-#define PA_SAMPLE_TYPE paFloat32\r
-typedef float SAMPLE;\r
-#define SAMPLE_SILENCE (0.0f)\r
-#define PRINTF_S_FORMAT "%.8f"\r
-#elif 1\r
-#define PA_SAMPLE_TYPE paInt16\r
-typedef short SAMPLE;\r
-#define SAMPLE_SILENCE (0)\r
-#define PRINTF_S_FORMAT "%d"\r
-#elif 0\r
-#define PA_SAMPLE_TYPE paInt8\r
-typedef char SAMPLE;\r
-#define SAMPLE_SILENCE (0)\r
-#define PRINTF_S_FORMAT "%d"\r
-#else\r
-#define PA_SAMPLE_TYPE paUInt8\r
-typedef unsigned char SAMPLE;\r
-#define SAMPLE_SILENCE (128)\r
-#define PRINTF_S_FORMAT "%d"\r
-#endif\r
-\r
-typedef struct\r
-{\r
- unsigned frameIndex;\r
- int threadSyncFlag;\r
- SAMPLE *ringBufferData;\r
- PaUtilRingBuffer ringBuffer;\r
- FILE *file;\r
- void *threadHandle;\r
-}\r
-paTestData;\r
-\r
-/* This routine is run in a separate thread to write data from the ring buffer into a file (during Recording) */\r
-static int threadFunctionWriteToRawFile(void* ptr)\r
-{\r
- paTestData* pData = (paTestData*)ptr;\r
-\r
- /* Mark thread started */\r
- pData->threadSyncFlag = 0;\r
-\r
- while (1)\r
- {\r
- ring_buffer_size_t elementsInBuffer = PaUtil_GetRingBufferReadAvailable(&pData->ringBuffer);\r
- if ( (elementsInBuffer >= pData->ringBuffer.bufferSize / NUM_WRITES_PER_BUFFER) ||\r
- pData->threadSyncFlag )\r
- {\r
- void* ptr[2] = {0};\r
- ring_buffer_size_t sizes[2] = {0};\r
-\r
- /* By using PaUtil_GetRingBufferReadRegions, we can read directly from the ring buffer */\r
- ring_buffer_size_t elementsRead = PaUtil_GetRingBufferReadRegions(&pData->ringBuffer, elementsInBuffer, ptr + 0, sizes + 0, ptr + 1, sizes + 1);\r
- if (elementsRead > 0)\r
- {\r
- int i;\r
- for (i = 0; i < 2 && ptr[i] != NULL; ++i)\r
- {\r
- fwrite(ptr[i], pData->ringBuffer.elementSizeBytes, sizes[i], pData->file);\r
- }\r
- PaUtil_AdvanceRingBufferReadIndex(&pData->ringBuffer, elementsRead);\r
- }\r
-\r
- if (pData->threadSyncFlag)\r
- {\r
- break;\r
- }\r
- }\r
-\r
- /* Sleep a little while... */\r
- Pa_Sleep(20);\r
- }\r
-\r
- pData->threadSyncFlag = 0;\r
-\r
- return 0;\r
-}\r
-\r
-/* This routine is run in a separate thread to read data from file into the ring buffer (during Playback). When the file\r
- has reached EOF, a flag is set so that the play PA callback can return paComplete */\r
-static int threadFunctionReadFromRawFile(void* ptr)\r
-{\r
- paTestData* pData = (paTestData*)ptr;\r
-\r
- while (1)\r
- {\r
- ring_buffer_size_t elementsInBuffer = PaUtil_GetRingBufferWriteAvailable(&pData->ringBuffer);\r
-\r
- if (elementsInBuffer >= pData->ringBuffer.bufferSize / NUM_WRITES_PER_BUFFER)\r
- {\r
- void* ptr[2] = {0};\r
- ring_buffer_size_t sizes[2] = {0};\r
-\r
- /* By using PaUtil_GetRingBufferWriteRegions, we can write directly into the ring buffer */\r
- PaUtil_GetRingBufferWriteRegions(&pData->ringBuffer, elementsInBuffer, ptr + 0, sizes + 0, ptr + 1, sizes + 1);\r
-\r
- if (!feof(pData->file))\r
- {\r
- ring_buffer_size_t itemsReadFromFile = 0;\r
- int i;\r
- for (i = 0; i < 2 && ptr[i] != NULL; ++i)\r
- {\r
- itemsReadFromFile += (ring_buffer_size_t)fread(ptr[i], pData->ringBuffer.elementSizeBytes, sizes[i], pData->file);\r
- }\r
- PaUtil_AdvanceRingBufferWriteIndex(&pData->ringBuffer, itemsReadFromFile);\r
-\r
- /* Mark thread started here, that way we "prime" the ring buffer before playback */\r
- pData->threadSyncFlag = 0;\r
- }\r
- else\r
- {\r
- /* No more data to read */\r
- pData->threadSyncFlag = 1;\r
- break;\r
- }\r
- }\r
-\r
- /* Sleep a little while... */\r
- Pa_Sleep(20);\r
- }\r
-\r
- return 0;\r
-}\r
-\r
-typedef int (*ThreadFunctionType)(void*);\r
-\r
-/* Start up a new thread in the given function, at the moment only Windows, but should be very easy to extend\r
- to posix type OSs (Linux/Mac) */\r
-static PaError startThread( paTestData* pData, ThreadFunctionType fn )\r
-{\r
-#ifdef _WIN32\r
- typedef unsigned (__stdcall* WinThreadFunctionType)(void*);\r
- pData->threadHandle = (void*)_beginthreadex(NULL, 0, (WinThreadFunctionType)fn, pData, CREATE_SUSPENDED, NULL);\r
- if (pData->threadHandle == NULL) return paUnanticipatedHostError;\r
-\r
- /* Set file thread to a little higher prio than normal */\r
- SetThreadPriority(pData->threadHandle, THREAD_PRIORITY_ABOVE_NORMAL);\r
-\r
- /* Start it up */\r
- pData->threadSyncFlag = 1;\r
- ResumeThread(pData->threadHandle);\r
-\r
-#endif\r
-\r
- /* Wait for thread to startup */\r
- while (pData->threadSyncFlag) {\r
- Pa_Sleep(10);\r
- }\r
-\r
- return paNoError;\r
-}\r
-\r
-static int stopThread( paTestData* pData )\r
-{\r
- pData->threadSyncFlag = 1;\r
- /* Wait for thread to stop */\r
- while (pData->threadSyncFlag) {\r
- Pa_Sleep(10);\r
- }\r
-#ifdef _WIN32\r
- CloseHandle(pData->threadHandle);\r
- pData->threadHandle = 0;\r
-#endif\r
-\r
- return paNoError;\r
-}\r
-\r
-\r
-/* This routine will be called by the PortAudio engine when audio is needed.\r
-** It may be called at interrupt level on some machines so don't do anything\r
-** that could mess up the system like calling malloc() or free().\r
-*/\r
-static int recordCallback( const void *inputBuffer, void *outputBuffer,\r
- unsigned long framesPerBuffer,\r
- const PaStreamCallbackTimeInfo* timeInfo,\r
- PaStreamCallbackFlags statusFlags,\r
- void *userData )\r
-{\r
- paTestData *data = (paTestData*)userData;\r
- ring_buffer_size_t elementsWriteable = PaUtil_GetRingBufferWriteAvailable(&data->ringBuffer);\r
- ring_buffer_size_t elementsToWrite = min(elementsWriteable, (ring_buffer_size_t)(framesPerBuffer * NUM_CHANNELS));\r
- const SAMPLE *rptr = (const SAMPLE*)inputBuffer;\r
-\r
- (void) outputBuffer; /* Prevent unused variable warnings. */\r
- (void) timeInfo;\r
- (void) statusFlags;\r
- (void) userData;\r
-\r
- data->frameIndex += PaUtil_WriteRingBuffer(&data->ringBuffer, rptr, elementsToWrite);\r
-\r
- return paContinue;\r
-}\r
-\r
-/* This routine will be called by the PortAudio engine when audio is needed.\r
-** It may be called at interrupt level on some machines so don't do anything\r
-** that could mess up the system like calling malloc() or free().\r
-*/\r
-static int playCallback( const void *inputBuffer, void *outputBuffer,\r
- unsigned long framesPerBuffer,\r
- const PaStreamCallbackTimeInfo* timeInfo,\r
- PaStreamCallbackFlags statusFlags,\r
- void *userData )\r
-{\r
- paTestData *data = (paTestData*)userData;\r
- ring_buffer_size_t elementsToPlay = PaUtil_GetRingBufferReadAvailable(&data->ringBuffer);\r
- ring_buffer_size_t elementsToRead = min(elementsToPlay, (ring_buffer_size_t)(framesPerBuffer * NUM_CHANNELS));\r
- SAMPLE* wptr = (SAMPLE*)outputBuffer;\r
-\r
- (void) inputBuffer; /* Prevent unused variable warnings. */\r
- (void) timeInfo;\r
- (void) statusFlags;\r
- (void) userData;\r
-\r
- data->frameIndex += PaUtil_ReadRingBuffer(&data->ringBuffer, wptr, elementsToRead);\r
-\r
- return data->threadSyncFlag ? paComplete : paContinue;\r
-}\r
-\r
-static unsigned NextPowerOf2(unsigned val)\r
-{\r
- val--;\r
- val = (val >> 1) | val;\r
- val = (val >> 2) | val;\r
- val = (val >> 4) | val;\r
- val = (val >> 8) | val;\r
- val = (val >> 16) | val;\r
- return ++val;\r
-}\r
-\r
-/*******************************************************************/\r
-int main(void);\r
-int main(void)\r
-{\r
- PaStreamParameters inputParameters,\r
- outputParameters;\r
- PaStream* stream;\r
- PaError err = paNoError;\r
- paTestData data = {0};\r
- unsigned delayCntr;\r
- unsigned numSamples;\r
- unsigned numBytes;\r
-\r
- printf("patest_record.c\n"); fflush(stdout);\r
-\r
- /* We set the ring buffer size to about 500 ms */\r
- numSamples = NextPowerOf2((unsigned)(SAMPLE_RATE * 0.5 * NUM_CHANNELS));\r
- numBytes = numSamples * sizeof(SAMPLE);\r
- data.ringBufferData = (SAMPLE *) PaUtil_AllocateMemory( numBytes );\r
- if( data.ringBufferData == NULL )\r
- {\r
- printf("Could not allocate ring buffer data.\n");\r
- goto done;\r
- }\r
-\r
- if (PaUtil_InitializeRingBuffer(&data.ringBuffer, sizeof(SAMPLE), numSamples, data.ringBufferData) < 0)\r
- {\r
- printf("Failed to initialize ring buffer. Size is not power of 2 ??\n");\r
- goto done;\r
- }\r
-\r
- err = Pa_Initialize();\r
- if( err != paNoError ) goto done;\r
-\r
- inputParameters.device = Pa_GetDefaultInputDevice(); /* default input device */\r
- if (inputParameters.device == paNoDevice) {\r
- fprintf(stderr,"Error: No default input device.\n");\r
- goto done;\r
- }\r
- inputParameters.channelCount = 2; /* stereo input */\r
- inputParameters.sampleFormat = PA_SAMPLE_TYPE;\r
- inputParameters.suggestedLatency = Pa_GetDeviceInfo( inputParameters.device )->defaultLowInputLatency;\r
- inputParameters.hostApiSpecificStreamInfo = NULL;\r
-\r
- /* Record some audio. -------------------------------------------- */\r
- err = Pa_OpenStream(\r
- &stream,\r
- &inputParameters,\r
- NULL, /* &outputParameters, */\r
- SAMPLE_RATE,\r
- FRAMES_PER_BUFFER,\r
- paClipOff, /* we won't output out of range samples so don't bother clipping them */\r
- recordCallback,\r
- &data );\r
- if( err != paNoError ) goto done;\r
-\r
- /* Open the raw audio 'cache' file... */\r
- data.file = fopen(FILE_NAME, "wb");\r
- if (data.file == 0) goto done;\r
-\r
- /* Start the file writing thread */\r
- err = startThread(&data, threadFunctionWriteToRawFile);\r
- if( err != paNoError ) goto done;\r
-\r
- err = Pa_StartStream( stream );\r
- if( err != paNoError ) goto done;\r
- printf("\n=== Now recording to '" FILE_NAME "' for %d seconds!! Please speak into the microphone. ===\n", NUM_SECONDS); fflush(stdout);\r
-\r
- /* Note that the RECORDING part is limited with TIME, not size of the file and/or buffer, so you can\r
- increase NUM_SECONDS until you run out of disk */\r
- delayCntr = 0;\r
- while( delayCntr++ < NUM_SECONDS )\r
- {\r
- printf("index = %d\n", data.frameIndex ); fflush(stdout);\r
- Pa_Sleep(1000);\r
- }\r
- if( err < 0 ) goto done;\r
-\r
- err = Pa_CloseStream( stream );\r
- if( err != paNoError ) goto done;\r
-\r
- /* Stop the thread */\r
- err = stopThread(&data);\r
- if( err != paNoError ) goto done;\r
-\r
- /* Close file */\r
- fclose(data.file);\r
- data.file = 0;\r
-\r
- /* Playback recorded data. -------------------------------------------- */\r
- data.frameIndex = 0;\r
-\r
- outputParameters.device = Pa_GetDefaultOutputDevice(); /* default output device */\r
- if (outputParameters.device == paNoDevice) {\r
- fprintf(stderr,"Error: No default output device.\n");\r
- goto done;\r
- }\r
- outputParameters.channelCount = 2; /* stereo output */\r
- outputParameters.sampleFormat = PA_SAMPLE_TYPE;\r
- outputParameters.suggestedLatency = Pa_GetDeviceInfo( outputParameters.device )->defaultLowOutputLatency;\r
- outputParameters.hostApiSpecificStreamInfo = NULL;\r
-\r
- printf("\n=== Now playing back from file '" FILE_NAME "' until end-of-file is reached ===\n"); fflush(stdout);\r
- err = Pa_OpenStream(\r
- &stream,\r
- NULL, /* no input */\r
- &outputParameters,\r
- SAMPLE_RATE,\r
- FRAMES_PER_BUFFER,\r
- paClipOff, /* we won't output out of range samples so don't bother clipping them */\r
- playCallback,\r
- &data );\r
- if( err != paNoError ) goto done;\r
-\r
- if( stream )\r
- {\r
- /* Open file again for reading */\r
- data.file = fopen(FILE_NAME, "rb");\r
- if (data.file != 0)\r
- {\r
- /* Start the file reading thread */\r
- err = startThread(&data, threadFunctionReadFromRawFile);\r
- if( err != paNoError ) goto done;\r
-\r
- err = Pa_StartStream( stream );\r
- if( err != paNoError ) goto done;\r
-\r
- printf("Waiting for playback to finish.\n"); fflush(stdout);\r
-\r
- /* The playback will end when EOF is reached */\r
- while( ( err = Pa_IsStreamActive( stream ) ) == 1 ) {\r
- printf("index = %d\n", data.frameIndex ); fflush(stdout);\r
- Pa_Sleep(1000);\r
- }\r
- if( err < 0 ) goto done;\r
- }\r
- \r
- err = Pa_CloseStream( stream );\r
- if( err != paNoError ) goto done;\r
-\r
- fclose(data.file);\r
- \r
- printf("Done.\n"); fflush(stdout);\r
- }\r
-\r
-done:\r
- Pa_Terminate();\r
- if( data.ringBufferData ) /* Sure it is NULL or valid. */\r
- PaUtil_FreeMemory( data.ringBufferData );\r
- if( err != paNoError )\r
- {\r
- fprintf( stderr, "An error occured while using the portaudio stream\n" );\r
- fprintf( stderr, "Error number: %d\n", err );\r
- fprintf( stderr, "Error message: %s\n", Pa_GetErrorText( err ) );\r
- err = 1; /* Always return 0 or 1, but no other return codes. */\r
- }\r
- return err;\r
-}\r
-\r
+/** @file paex_record_file.c
+ @ingroup examples_src
+ @brief Record input into a file, then playback recorded data from file (Windows only at the moment)
+ @author Robert Bielik
+*/
+/*
+ * $Id: paex_record_file.c 1752 2011-09-08 03:21:55Z philburk $
+ *
+ * This program uses the PortAudio Portable Audio Library.
+ * For more information see: http://www.portaudio.com
+ * Copyright (c) 1999-2000 Ross Bencina and Phil Burk
+ *
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * The text above constitutes the entire PortAudio license; however,
+ * the PortAudio community also makes the following non-binding requests:
+ *
+ * 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. It is also
+ * requested that these non-binding requests be included along with the
+ * license above.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "portaudio.h"
+#include "pa_ringbuffer.h"
+#include "pa_util.h"
+
+#ifdef _WIN32
+#include <windows.h>
+#include <process.h>
+#endif
+
+/* #define SAMPLE_RATE (17932) // Test failure to open with this value. */
+#define FILE_NAME "audio_data.raw"
+#define SAMPLE_RATE (44100)
+#define FRAMES_PER_BUFFER (512)
+#define NUM_SECONDS (10)
+#define NUM_CHANNELS (2)
+#define NUM_WRITES_PER_BUFFER (4)
+/* #define DITHER_FLAG (paDitherOff) */
+#define DITHER_FLAG (0) /**/
+
+
+/* Select sample format. */
+#if 1
+#define PA_SAMPLE_TYPE paFloat32
+typedef float SAMPLE;
+#define SAMPLE_SILENCE (0.0f)
+#define PRINTF_S_FORMAT "%.8f"
+#elif 1
+#define PA_SAMPLE_TYPE paInt16
+typedef short SAMPLE;
+#define SAMPLE_SILENCE (0)
+#define PRINTF_S_FORMAT "%d"
+#elif 0
+#define PA_SAMPLE_TYPE paInt8
+typedef char SAMPLE;
+#define SAMPLE_SILENCE (0)
+#define PRINTF_S_FORMAT "%d"
+#else
+#define PA_SAMPLE_TYPE paUInt8
+typedef unsigned char SAMPLE;
+#define SAMPLE_SILENCE (128)
+#define PRINTF_S_FORMAT "%d"
+#endif
+
+typedef struct
+{
+ unsigned frameIndex;
+ int threadSyncFlag;
+ SAMPLE *ringBufferData;
+ PaUtilRingBuffer ringBuffer;
+ FILE *file;
+ void *threadHandle;
+}
+paTestData;
+
+/* This routine is run in a separate thread to write data from the ring buffer into a file (during Recording) */
+static int threadFunctionWriteToRawFile(void* ptr)
+{
+ paTestData* pData = (paTestData*)ptr;
+
+ /* Mark thread started */
+ pData->threadSyncFlag = 0;
+
+ while (1)
+ {
+ ring_buffer_size_t elementsInBuffer = PaUtil_GetRingBufferReadAvailable(&pData->ringBuffer);
+ if ( (elementsInBuffer >= pData->ringBuffer.bufferSize / NUM_WRITES_PER_BUFFER) ||
+ pData->threadSyncFlag )
+ {
+ void* ptr[2] = {0};
+ ring_buffer_size_t sizes[2] = {0};
+
+ /* By using PaUtil_GetRingBufferReadRegions, we can read directly from the ring buffer */
+ ring_buffer_size_t elementsRead = PaUtil_GetRingBufferReadRegions(&pData->ringBuffer, elementsInBuffer, ptr + 0, sizes + 0, ptr + 1, sizes + 1);
+ if (elementsRead > 0)
+ {
+ int i;
+ for (i = 0; i < 2 && ptr[i] != NULL; ++i)
+ {
+ fwrite(ptr[i], pData->ringBuffer.elementSizeBytes, sizes[i], pData->file);
+ }
+ PaUtil_AdvanceRingBufferReadIndex(&pData->ringBuffer, elementsRead);
+ }
+
+ if (pData->threadSyncFlag)
+ {
+ break;
+ }
+ }
+
+ /* Sleep a little while... */
+ Pa_Sleep(20);
+ }
+
+ pData->threadSyncFlag = 0;
+
+ return 0;
+}
+
+/* This routine is run in a separate thread to read data from file into the ring buffer (during Playback). When the file
+ has reached EOF, a flag is set so that the play PA callback can return paComplete */
+static int threadFunctionReadFromRawFile(void* ptr)
+{
+ paTestData* pData = (paTestData*)ptr;
+
+ while (1)
+ {
+ ring_buffer_size_t elementsInBuffer = PaUtil_GetRingBufferWriteAvailable(&pData->ringBuffer);
+
+ if (elementsInBuffer >= pData->ringBuffer.bufferSize / NUM_WRITES_PER_BUFFER)
+ {
+ void* ptr[2] = {0};
+ ring_buffer_size_t sizes[2] = {0};
+
+ /* By using PaUtil_GetRingBufferWriteRegions, we can write directly into the ring buffer */
+ PaUtil_GetRingBufferWriteRegions(&pData->ringBuffer, elementsInBuffer, ptr + 0, sizes + 0, ptr + 1, sizes + 1);
+
+ if (!feof(pData->file))
+ {
+ ring_buffer_size_t itemsReadFromFile = 0;
+ int i;
+ for (i = 0; i < 2 && ptr[i] != NULL; ++i)
+ {
+ itemsReadFromFile += (ring_buffer_size_t)fread(ptr[i], pData->ringBuffer.elementSizeBytes, sizes[i], pData->file);
+ }
+ PaUtil_AdvanceRingBufferWriteIndex(&pData->ringBuffer, itemsReadFromFile);
+
+ /* Mark thread started here, that way we "prime" the ring buffer before playback */
+ pData->threadSyncFlag = 0;
+ }
+ else
+ {
+ /* No more data to read */
+ pData->threadSyncFlag = 1;
+ break;
+ }
+ }
+
+ /* Sleep a little while... */
+ Pa_Sleep(20);
+ }
+
+ return 0;
+}
+
+typedef int (*ThreadFunctionType)(void*);
+
+/* Start up a new thread in the given function, at the moment only Windows, but should be very easy to extend
+ to posix type OSs (Linux/Mac) */
+static PaError startThread( paTestData* pData, ThreadFunctionType fn )
+{
+#ifdef _WIN32
+ typedef unsigned (__stdcall* WinThreadFunctionType)(void*);
+ pData->threadHandle = (void*)_beginthreadex(NULL, 0, (WinThreadFunctionType)fn, pData, CREATE_SUSPENDED, NULL);
+ if (pData->threadHandle == NULL) return paUnanticipatedHostError;
+
+ /* Set file thread to a little higher prio than normal */
+ SetThreadPriority(pData->threadHandle, THREAD_PRIORITY_ABOVE_NORMAL);
+
+ /* Start it up */
+ pData->threadSyncFlag = 1;
+ ResumeThread(pData->threadHandle);
+
+#endif
+
+ /* Wait for thread to startup */
+ while (pData->threadSyncFlag) {
+ Pa_Sleep(10);
+ }
+
+ return paNoError;
+}
+
+static int stopThread( paTestData* pData )
+{
+ pData->threadSyncFlag = 1;
+ /* Wait for thread to stop */
+ while (pData->threadSyncFlag) {
+ Pa_Sleep(10);
+ }
+#ifdef _WIN32
+ CloseHandle(pData->threadHandle);
+ pData->threadHandle = 0;
+#endif
+
+ return paNoError;
+}
+
+
+/* This routine will be called by the PortAudio engine when audio is needed.
+** It may be called at interrupt level on some machines so don't do anything
+** that could mess up the system like calling malloc() or free().
+*/
+static int recordCallback( const void *inputBuffer, void *outputBuffer,
+ unsigned long framesPerBuffer,
+ const PaStreamCallbackTimeInfo* timeInfo,
+ PaStreamCallbackFlags statusFlags,
+ void *userData )
+{
+ paTestData *data = (paTestData*)userData;
+ ring_buffer_size_t elementsWriteable = PaUtil_GetRingBufferWriteAvailable(&data->ringBuffer);
+ ring_buffer_size_t elementsToWrite = min(elementsWriteable, (ring_buffer_size_t)(framesPerBuffer * NUM_CHANNELS));
+ const SAMPLE *rptr = (const SAMPLE*)inputBuffer;
+
+ (void) outputBuffer; /* Prevent unused variable warnings. */
+ (void) timeInfo;
+ (void) statusFlags;
+ (void) userData;
+
+ data->frameIndex += PaUtil_WriteRingBuffer(&data->ringBuffer, rptr, elementsToWrite);
+
+ return paContinue;
+}
+
+/* This routine will be called by the PortAudio engine when audio is needed.
+** It may be called at interrupt level on some machines so don't do anything
+** that could mess up the system like calling malloc() or free().
+*/
+static int playCallback( const void *inputBuffer, void *outputBuffer,
+ unsigned long framesPerBuffer,
+ const PaStreamCallbackTimeInfo* timeInfo,
+ PaStreamCallbackFlags statusFlags,
+ void *userData )
+{
+ paTestData *data = (paTestData*)userData;
+ ring_buffer_size_t elementsToPlay = PaUtil_GetRingBufferReadAvailable(&data->ringBuffer);
+ ring_buffer_size_t elementsToRead = min(elementsToPlay, (ring_buffer_size_t)(framesPerBuffer * NUM_CHANNELS));
+ SAMPLE* wptr = (SAMPLE*)outputBuffer;
+
+ (void) inputBuffer; /* Prevent unused variable warnings. */
+ (void) timeInfo;
+ (void) statusFlags;
+ (void) userData;
+
+ data->frameIndex += PaUtil_ReadRingBuffer(&data->ringBuffer, wptr, elementsToRead);
+
+ return data->threadSyncFlag ? paComplete : paContinue;
+}
+
+static unsigned NextPowerOf2(unsigned val)
+{
+ val--;
+ val = (val >> 1) | val;
+ val = (val >> 2) | val;
+ val = (val >> 4) | val;
+ val = (val >> 8) | val;
+ val = (val >> 16) | val;
+ return ++val;
+}
+
+/*******************************************************************/
+int main(void);
+int main(void)
+{
+ PaStreamParameters inputParameters,
+ outputParameters;
+ PaStream* stream;
+ PaError err = paNoError;
+ paTestData data = {0};
+ unsigned delayCntr;
+ unsigned numSamples;
+ unsigned numBytes;
+
+ printf("patest_record.c\n"); fflush(stdout);
+
+ /* We set the ring buffer size to about 500 ms */
+ numSamples = NextPowerOf2((unsigned)(SAMPLE_RATE * 0.5 * NUM_CHANNELS));
+ numBytes = numSamples * sizeof(SAMPLE);
+ data.ringBufferData = (SAMPLE *) PaUtil_AllocateMemory( numBytes );
+ if( data.ringBufferData == NULL )
+ {
+ printf("Could not allocate ring buffer data.\n");
+ goto done;
+ }
+
+ if (PaUtil_InitializeRingBuffer(&data.ringBuffer, sizeof(SAMPLE), numSamples, data.ringBufferData) < 0)
+ {
+ printf("Failed to initialize ring buffer. Size is not power of 2 ??\n");
+ goto done;
+ }
+
+ err = Pa_Initialize();
+ if( err != paNoError ) goto done;
+
+ inputParameters.device = Pa_GetDefaultInputDevice(); /* default input device */
+ if (inputParameters.device == paNoDevice) {
+ fprintf(stderr,"Error: No default input device.\n");
+ goto done;
+ }
+ inputParameters.channelCount = 2; /* stereo input */
+ inputParameters.sampleFormat = PA_SAMPLE_TYPE;
+ inputParameters.suggestedLatency = Pa_GetDeviceInfo( inputParameters.device )->defaultLowInputLatency;
+ inputParameters.hostApiSpecificStreamInfo = NULL;
+
+ /* Record some audio. -------------------------------------------- */
+ err = Pa_OpenStream(
+ &stream,
+ &inputParameters,
+ NULL, /* &outputParameters, */
+ SAMPLE_RATE,
+ FRAMES_PER_BUFFER,
+ paClipOff, /* we won't output out of range samples so don't bother clipping them */
+ recordCallback,
+ &data );
+ if( err != paNoError ) goto done;
+
+ /* Open the raw audio 'cache' file... */
+ data.file = fopen(FILE_NAME, "wb");
+ if (data.file == 0) goto done;
+
+ /* Start the file writing thread */
+ err = startThread(&data, threadFunctionWriteToRawFile);
+ if( err != paNoError ) goto done;
+
+ err = Pa_StartStream( stream );
+ if( err != paNoError ) goto done;
+ printf("\n=== Now recording to '" FILE_NAME "' for %d seconds!! Please speak into the microphone. ===\n", NUM_SECONDS); fflush(stdout);
+
+ /* Note that the RECORDING part is limited with TIME, not size of the file and/or buffer, so you can
+ increase NUM_SECONDS until you run out of disk */
+ delayCntr = 0;
+ while( delayCntr++ < NUM_SECONDS )
+ {
+ printf("index = %d\n", data.frameIndex ); fflush(stdout);
+ Pa_Sleep(1000);
+ }
+ if( err < 0 ) goto done;
+
+ err = Pa_CloseStream( stream );
+ if( err != paNoError ) goto done;
+
+ /* Stop the thread */
+ err = stopThread(&data);
+ if( err != paNoError ) goto done;
+
+ /* Close file */
+ fclose(data.file);
+ data.file = 0;
+
+ /* Playback recorded data. -------------------------------------------- */
+ data.frameIndex = 0;
+
+ outputParameters.device = Pa_GetDefaultOutputDevice(); /* default output device */
+ if (outputParameters.device == paNoDevice) {
+ fprintf(stderr,"Error: No default output device.\n");
+ goto done;
+ }
+ outputParameters.channelCount = 2; /* stereo output */
+ outputParameters.sampleFormat = PA_SAMPLE_TYPE;
+ outputParameters.suggestedLatency = Pa_GetDeviceInfo( outputParameters.device )->defaultLowOutputLatency;
+ outputParameters.hostApiSpecificStreamInfo = NULL;
+
+ printf("\n=== Now playing back from file '" FILE_NAME "' until end-of-file is reached ===\n"); fflush(stdout);
+ err = Pa_OpenStream(
+ &stream,
+ NULL, /* no input */
+ &outputParameters,
+ SAMPLE_RATE,
+ FRAMES_PER_BUFFER,
+ paClipOff, /* we won't output out of range samples so don't bother clipping them */
+ playCallback,
+ &data );
+ if( err != paNoError ) goto done;
+
+ if( stream )
+ {
+ /* Open file again for reading */
+ data.file = fopen(FILE_NAME, "rb");
+ if (data.file != 0)
+ {
+ /* Start the file reading thread */
+ err = startThread(&data, threadFunctionReadFromRawFile);
+ if( err != paNoError ) goto done;
+
+ err = Pa_StartStream( stream );
+ if( err != paNoError ) goto done;
+
+ printf("Waiting for playback to finish.\n"); fflush(stdout);
+
+ /* The playback will end when EOF is reached */
+ while( ( err = Pa_IsStreamActive( stream ) ) == 1 ) {
+ printf("index = %d\n", data.frameIndex ); fflush(stdout);
+ Pa_Sleep(1000);
+ }
+ if( err < 0 ) goto done;
+ }
+
+ err = Pa_CloseStream( stream );
+ if( err != paNoError ) goto done;
+
+ fclose(data.file);
+
+ printf("Done.\n"); fflush(stdout);
+ }
+
+done:
+ Pa_Terminate();
+ if( data.ringBufferData ) /* Sure it is NULL or valid. */
+ PaUtil_FreeMemory( data.ringBufferData );
+ if( err != paNoError )
+ {
+ fprintf( stderr, "An error occured while using the portaudio stream\n" );
+ fprintf( stderr, "Error number: %d\n", err );
+ fprintf( stderr, "Error message: %s\n", Pa_GetErrorText( err ) );
+ err = 1; /* Always return 0 or 1, but no other return codes. */
+ }
+ return err;
+}
+
-/** @file paex_sine.c\r
- @ingroup examples_src\r
- @brief Play a sine wave for several seconds.\r
- @author Ross Bencina <rossb@audiomulch.com>\r
- @author Phil Burk <philburk@softsynth.com>\r
-*/\r
-/*\r
- * $Id: paex_sine.c 1752 2011-09-08 03:21:55Z philburk $\r
- *\r
- * This program uses the PortAudio Portable Audio Library.\r
- * For more information see: http://www.portaudio.com/\r
- * Copyright (c) 1999-2000 Ross Bencina and Phil Burk\r
- *\r
- * Permission is hereby granted, free of charge, to any person obtaining\r
- * a copy of this software and associated documentation files\r
- * (the "Software"), to deal in the Software without restriction,\r
- * including without limitation the rights to use, copy, modify, merge,\r
- * publish, distribute, sublicense, and/or sell copies of the Software,\r
- * and to permit persons to whom the Software is furnished to do so,\r
- * subject to the following conditions:\r
- *\r
- * The above copyright notice and this permission notice shall be\r
- * included in all copies or substantial portions of the Software.\r
- *\r
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\r
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\r
- * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\r
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\r
- * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
- */\r
-\r
-/*\r
- * The text above constitutes the entire PortAudio license; however, \r
- * the PortAudio community also makes the following non-binding requests:\r
- *\r
- * Any person wishing to distribute modifications to the Software is\r
- * requested to send the modifications to the original developer so that\r
- * they can be incorporated into the canonical version. It is also \r
- * requested that these non-binding requests be included along with the \r
- * license above.\r
- */\r
-#include <stdio.h>\r
-#include <math.h>\r
-#include "portaudio.h"\r
-\r
-#define NUM_SECONDS (5)\r
-#define SAMPLE_RATE (44100)\r
-#define FRAMES_PER_BUFFER (64)\r
-\r
-#ifndef M_PI\r
-#define M_PI (3.14159265)\r
-#endif\r
-\r
-#define TABLE_SIZE (200)\r
-\r
-class Sine\r
-{\r
-public:\r
- Sine() : stream(0), left_phase(0), right_phase(0)\r
- {\r
- /* initialise sinusoidal wavetable */\r
- for( int i=0; i<TABLE_SIZE; i++ )\r
- {\r
- sine[i] = (float) sin( ((double)i/(double)TABLE_SIZE) * M_PI * 2. );\r
- }\r
-\r
- sprintf( message, "No Message" );\r
- }\r
-\r
- bool open(PaDeviceIndex index)\r
- {\r
- PaStreamParameters outputParameters;\r
-\r
- outputParameters.device = index;\r
- if (outputParameters.device == paNoDevice) {\r
- return false;\r
- }\r
-\r
- const PaDeviceInfo* pInfo = Pa_GetDeviceInfo(index);\r
- if (pInfo != 0)\r
- {\r
- printf("Output device name: '%s'\r", pInfo->name);\r
- }\r
-\r
- outputParameters.channelCount = 2; /* stereo output */\r
- outputParameters.sampleFormat = paFloat32; /* 32 bit floating point output */\r
- outputParameters.suggestedLatency = Pa_GetDeviceInfo( outputParameters.device )->defaultLowOutputLatency;\r
- outputParameters.hostApiSpecificStreamInfo = NULL;\r
-\r
- PaError err = Pa_OpenStream(\r
- &stream,\r
- NULL, /* no input */\r
- &outputParameters,\r
- SAMPLE_RATE,\r
- paFramesPerBufferUnspecified,\r
- paClipOff, /* we won't output out of range samples so don't bother clipping them */\r
- &Sine::paCallback,\r
- this /* Using 'this' for userData so we can cast to Sine* in paCallback method */\r
- );\r
-\r
- if (err != paNoError)\r
- {\r
- /* Failed to open stream to device !!! */\r
- return false;\r
- }\r
-\r
- err = Pa_SetStreamFinishedCallback( stream, &Sine::paStreamFinished );\r
-\r
- if (err != paNoError)\r
- {\r
- Pa_CloseStream( stream );\r
- stream = 0;\r
-\r
- return false;\r
- }\r
-\r
- return true;\r
- }\r
-\r
- bool close()\r
- {\r
- if (stream == 0)\r
- return false;\r
-\r
- PaError err = Pa_CloseStream( stream );\r
- stream = 0;\r
-\r
- return (err == paNoError);\r
- }\r
-\r
-\r
- bool start()\r
- {\r
- if (stream == 0)\r
- return false;\r
-\r
- PaError err = Pa_StartStream( stream );\r
-\r
- return (err == paNoError);\r
- }\r
-\r
- bool stop()\r
- {\r
- if (stream == 0)\r
- return false;\r
-\r
- PaError err = Pa_StopStream( stream );\r
-\r
- return (err == paNoError);\r
- }\r
-\r
-private:\r
- /* The instance callback, where we have access to every method/variable in object of class Sine */\r
- int paCallbackMethod(const void *inputBuffer, void *outputBuffer,\r
- unsigned long framesPerBuffer,\r
- const PaStreamCallbackTimeInfo* timeInfo,\r
- PaStreamCallbackFlags statusFlags)\r
- {\r
- float *out = (float*)outputBuffer;\r
- unsigned long i;\r
-\r
- (void) timeInfo; /* Prevent unused variable warnings. */\r
- (void) statusFlags;\r
- (void) inputBuffer;\r
-\r
- for( i=0; i<framesPerBuffer; i++ )\r
- {\r
- *out++ = sine[left_phase]; /* left */\r
- *out++ = sine[right_phase]; /* right */\r
- left_phase += 1;\r
- if( left_phase >= TABLE_SIZE ) left_phase -= TABLE_SIZE;\r
- right_phase += 3; /* higher pitch so we can distinguish left and right. */\r
- if( right_phase >= TABLE_SIZE ) right_phase -= TABLE_SIZE;\r
- }\r
-\r
- return paContinue;\r
-\r
- }\r
-\r
- /* This routine will be called by the PortAudio engine when audio is needed.\r
- ** It may called at interrupt level on some machines so don't do anything\r
- ** that could mess up the system like calling malloc() or free().\r
- */\r
- static int paCallback( const void *inputBuffer, void *outputBuffer,\r
- unsigned long framesPerBuffer,\r
- const PaStreamCallbackTimeInfo* timeInfo,\r
- PaStreamCallbackFlags statusFlags,\r
- void *userData )\r
- {\r
- /* Here we cast userData to Sine* type so we can call the instance method paCallbackMethod, we can do that since \r
- we called Pa_OpenStream with 'this' for userData */\r
- return ((Sine*)userData)->paCallbackMethod(inputBuffer, outputBuffer,\r
- framesPerBuffer,\r
- timeInfo,\r
- statusFlags);\r
- }\r
-\r
-\r
- void paStreamFinishedMethod()\r
- {\r
- printf( "Stream Completed: %s\n", message );\r
- }\r
-\r
- /*\r
- * This routine is called by portaudio when playback is done.\r
- */\r
- static void paStreamFinished(void* userData)\r
- {\r
- return ((Sine*)userData)->paStreamFinishedMethod();\r
- }\r
-\r
- PaStream *stream;\r
- float sine[TABLE_SIZE];\r
- int left_phase;\r
- int right_phase;\r
- char message[20];\r
-};\r
-\r
-class ScopedPaHandler\r
-{\r
-public:\r
- ScopedPaHandler()\r
- : _result(Pa_Initialize())\r
- {\r
- }\r
- ~ScopedPaHandler()\r
- {\r
- if (_result == paNoError)\r
- {\r
- Pa_Terminate();\r
- }\r
- }\r
-\r
- PaError result() const { return _result; }\r
-\r
-private:\r
- PaError _result;\r
-};\r
-\r
-\r
-/*******************************************************************/\r
-int main(void);\r
-int main(void)\r
-{\r
- Sine sine;\r
-\r
- printf("PortAudio Test: output sine wave. SR = %d, BufSize = %d\n", SAMPLE_RATE, FRAMES_PER_BUFFER);\r
- \r
- ScopedPaHandler paInit;\r
- if( paInit.result() != paNoError ) goto error;\r
-\r
- if (sine.open(Pa_GetDefaultOutputDevice()))\r
- {\r
- if (sine.start())\r
- {\r
- printf("Play for %d seconds.\n", NUM_SECONDS );\r
- Pa_Sleep( NUM_SECONDS * 1000 );\r
-\r
- sine.stop();\r
- }\r
-\r
- sine.close();\r
- }\r
-\r
- printf("Test finished.\n");\r
- return paNoError;\r
-\r
-error:\r
- fprintf( stderr, "An error occured while using the portaudio stream\n" );\r
- fprintf( stderr, "Error number: %d\n", paInit.result() );\r
- fprintf( stderr, "Error message: %s\n", Pa_GetErrorText( paInit.result() ) );\r
- return 1;\r
-}\r
+/** @file paex_sine.c
+ @ingroup examples_src
+ @brief Play a sine wave for several seconds.
+ @author Ross Bencina <rossb@audiomulch.com>
+ @author Phil Burk <philburk@softsynth.com>
+*/
+/*
+ * $Id: paex_sine.c 1752 2011-09-08 03:21:55Z philburk $
+ *
+ * This program uses the PortAudio Portable Audio Library.
+ * For more information see: http://www.portaudio.com/
+ * Copyright (c) 1999-2000 Ross Bencina and Phil Burk
+ *
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * The text above constitutes the entire PortAudio license; however,
+ * the PortAudio community also makes the following non-binding requests:
+ *
+ * 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. It is also
+ * requested that these non-binding requests be included along with the
+ * license above.
+ */
+#include <stdio.h>
+#include <math.h>
+#include "portaudio.h"
+
+#define NUM_SECONDS (5)
+#define SAMPLE_RATE (44100)
+#define FRAMES_PER_BUFFER (64)
+
+#ifndef M_PI
+#define M_PI (3.14159265)
+#endif
+
+#define TABLE_SIZE (200)
+
+class Sine
+{
+public:
+ Sine() : stream(0), left_phase(0), right_phase(0)
+ {
+ /* initialise sinusoidal wavetable */
+ for( int i=0; i<TABLE_SIZE; i++ )
+ {
+ sine[i] = (float) sin( ((double)i/(double)TABLE_SIZE) * M_PI * 2. );
+ }
+
+ sprintf( message, "No Message" );
+ }
+
+ bool open(PaDeviceIndex index)
+ {
+ PaStreamParameters outputParameters;
+
+ outputParameters.device = index;
+ if (outputParameters.device == paNoDevice) {
+ return false;
+ }
+
+ const PaDeviceInfo* pInfo = Pa_GetDeviceInfo(index);
+ if (pInfo != 0)
+ {
+ printf("Output device name: '%s'\r", pInfo->name);
+ }
+
+ outputParameters.channelCount = 2; /* stereo output */
+ outputParameters.sampleFormat = paFloat32; /* 32 bit floating point output */
+ outputParameters.suggestedLatency = Pa_GetDeviceInfo( outputParameters.device )->defaultLowOutputLatency;
+ outputParameters.hostApiSpecificStreamInfo = NULL;
+
+ PaError err = Pa_OpenStream(
+ &stream,
+ NULL, /* no input */
+ &outputParameters,
+ SAMPLE_RATE,
+ paFramesPerBufferUnspecified,
+ paClipOff, /* we won't output out of range samples so don't bother clipping them */
+ &Sine::paCallback,
+ this /* Using 'this' for userData so we can cast to Sine* in paCallback method */
+ );
+
+ if (err != paNoError)
+ {
+ /* Failed to open stream to device !!! */
+ return false;
+ }
+
+ err = Pa_SetStreamFinishedCallback( stream, &Sine::paStreamFinished );
+
+ if (err != paNoError)
+ {
+ Pa_CloseStream( stream );
+ stream = 0;
+
+ return false;
+ }
+
+ return true;
+ }
+
+ bool close()
+ {
+ if (stream == 0)
+ return false;
+
+ PaError err = Pa_CloseStream( stream );
+ stream = 0;
+
+ return (err == paNoError);
+ }
+
+
+ bool start()
+ {
+ if (stream == 0)
+ return false;
+
+ PaError err = Pa_StartStream( stream );
+
+ return (err == paNoError);
+ }
+
+ bool stop()
+ {
+ if (stream == 0)
+ return false;
+
+ PaError err = Pa_StopStream( stream );
+
+ return (err == paNoError);
+ }
+
+private:
+ /* The instance callback, where we have access to every method/variable in object of class Sine */
+ int paCallbackMethod(const void *inputBuffer, void *outputBuffer,
+ unsigned long framesPerBuffer,
+ const PaStreamCallbackTimeInfo* timeInfo,
+ PaStreamCallbackFlags statusFlags)
+ {
+ float *out = (float*)outputBuffer;
+ unsigned long i;
+
+ (void) timeInfo; /* Prevent unused variable warnings. */
+ (void) statusFlags;
+ (void) inputBuffer;
+
+ for( i=0; i<framesPerBuffer; i++ )
+ {
+ *out++ = sine[left_phase]; /* left */
+ *out++ = sine[right_phase]; /* right */
+ left_phase += 1;
+ if( left_phase >= TABLE_SIZE ) left_phase -= TABLE_SIZE;
+ right_phase += 3; /* higher pitch so we can distinguish left and right. */
+ if( right_phase >= TABLE_SIZE ) right_phase -= TABLE_SIZE;
+ }
+
+ return paContinue;
+
+ }
+
+ /* This routine will be called by the PortAudio engine when audio is needed.
+ ** It may called at interrupt level on some machines so don't do anything
+ ** that could mess up the system like calling malloc() or free().
+ */
+ static int paCallback( const void *inputBuffer, void *outputBuffer,
+ unsigned long framesPerBuffer,
+ const PaStreamCallbackTimeInfo* timeInfo,
+ PaStreamCallbackFlags statusFlags,
+ void *userData )
+ {
+ /* Here we cast userData to Sine* type so we can call the instance method paCallbackMethod, we can do that since
+ we called Pa_OpenStream with 'this' for userData */
+ return ((Sine*)userData)->paCallbackMethod(inputBuffer, outputBuffer,
+ framesPerBuffer,
+ timeInfo,
+ statusFlags);
+ }
+
+
+ void paStreamFinishedMethod()
+ {
+ printf( "Stream Completed: %s\n", message );
+ }
+
+ /*
+ * This routine is called by portaudio when playback is done.
+ */
+ static void paStreamFinished(void* userData)
+ {
+ return ((Sine*)userData)->paStreamFinishedMethod();
+ }
+
+ PaStream *stream;
+ float sine[TABLE_SIZE];
+ int left_phase;
+ int right_phase;
+ char message[20];
+};
+
+class ScopedPaHandler
+{
+public:
+ ScopedPaHandler()
+ : _result(Pa_Initialize())
+ {
+ }
+ ~ScopedPaHandler()
+ {
+ if (_result == paNoError)
+ {
+ Pa_Terminate();
+ }
+ }
+
+ PaError result() const { return _result; }
+
+private:
+ PaError _result;
+};
+
+
+/*******************************************************************/
+int main(void);
+int main(void)
+{
+ Sine sine;
+
+ printf("PortAudio Test: output sine wave. SR = %d, BufSize = %d\n", SAMPLE_RATE, FRAMES_PER_BUFFER);
+
+ ScopedPaHandler paInit;
+ if( paInit.result() != paNoError ) goto error;
+
+ if (sine.open(Pa_GetDefaultOutputDevice()))
+ {
+ if (sine.start())
+ {
+ printf("Play for %d seconds.\n", NUM_SECONDS );
+ Pa_Sleep( NUM_SECONDS * 1000 );
+
+ sine.stop();
+ }
+
+ sine.close();
+ }
+
+ printf("Test finished.\n");
+ return paNoError;
+
+error:
+ fprintf( stderr, "An error occured while using the portaudio stream\n" );
+ fprintf( stderr, "Error number: %d\n", paInit.result() );
+ fprintf( stderr, "Error message: %s\n", Pa_GetErrorText( paInit.result() ) );
+ return 1;
+}
-/** @file paex_wmme_ac3.c\r
- @ingroup examples_src\r
- @brief Use WMME-specific interface to send raw AC3 data to a S/PDIF output.\r
- @author Ross Bencina <rossb@audiomulch.com>\r
-*/\r
-/*\r
- * $Id: $\r
- * Portable Audio I/O Library\r
- * Windows MME ac3 sound output test\r
- *\r
- * Copyright (c) 2009 Ross Bencina\r
- *\r
- * Permission is hereby granted, free of charge, to any person obtaining\r
- * a copy of this software and associated documentation files\r
- * (the "Software"), to deal in the Software without restriction,\r
- * including without limitation the rights to use, copy, modify, merge,\r
- * publish, distribute, sublicense, and/or sell copies of the Software,\r
- * and to permit persons to whom the Software is furnished to do so,\r
- * subject to the following conditions:\r
- *\r
- * The above copyright notice and this permission notice shall be\r
- * included in all copies or substantial portions of the Software.\r
- *\r
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\r
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\r
- * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\r
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\r
- * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
- */\r
-\r
-/*\r
- * The text above constitutes the entire PortAudio license; however, \r
- * the PortAudio community also makes the following non-binding requests:\r
- *\r
- * Any person wishing to distribute modifications to the Software is\r
- * requested to send the modifications to the original developer so that\r
- * they can be incorporated into the canonical version. It is also \r
- * requested that these non-binding requests be included along with the \r
- * license above.\r
- */\r
-\r
-#include <stdio.h>\r
-#include <math.h>\r
-\r
-#include <windows.h> /* required when using pa_win_wmme.h */\r
-#include <mmsystem.h> /* required when using pa_win_wmme.h */\r
-\r
-#include "portaudio.h"\r
-#include "pa_win_wmme.h"\r
-\r
-#define NUM_SECONDS (20)\r
-#define SAMPLE_RATE (48000)\r
-#define FRAMES_PER_BUFFER (64)\r
-\r
-#ifndef M_PI\r
-#define M_PI (3.14159265)\r
-#endif\r
-\r
-#define TABLE_SIZE (100)\r
-\r
-#define CHANNEL_COUNT (2)\r
-\r
-\r
-\r
-typedef struct\r
-{\r
- short *buffer;\r
- int bufferSampleCount;\r
- int playbackIndex;\r
-}\r
-paTestData;\r
-\r
-/* This routine will be called by the PortAudio engine when audio is needed.\r
-** It may called at interrupt level on some machines so don't do anything\r
-** that could mess up the system like calling malloc() or free().\r
-*/\r
-static int patestCallback( const void *inputBuffer, void *outputBuffer,\r
- unsigned long framesPerBuffer,\r
- const PaStreamCallbackTimeInfo* timeInfo,\r
- PaStreamCallbackFlags statusFlags,\r
- void *userData )\r
-{\r
- paTestData *data = (paTestData*)userData;\r
- short *out = (short*)outputBuffer;\r
- unsigned long i,j;\r
-\r
- (void) timeInfo; /* Prevent unused variable warnings. */\r
- (void) statusFlags;\r
- (void) inputBuffer;\r
-\r
- /* stream out contents of data->buffer looping at end */\r
- \r
- for( i=0; i<framesPerBuffer; i++ )\r
- {\r
- for( j = 0; j < CHANNEL_COUNT; ++j ){\r
- *out++ = data->buffer[ data->playbackIndex++ ];\r
-\r
- if( data->playbackIndex >= data->bufferSampleCount )\r
- data->playbackIndex = 0; /* loop at end of buffer */\r
- }\r
- }\r
- \r
- return paContinue;\r
-}\r
-\r
-/*******************************************************************/\r
-int main(int argc, char* argv[])\r
-{\r
- PaStreamParameters outputParameters;\r
- PaWinMmeStreamInfo wmmeStreamInfo;\r
- PaStream *stream;\r
- PaError err;\r
- paTestData data;\r
- int deviceIndex;\r
- FILE *fp;\r
- const char *fileName = "c:\\test_48k.ac3.spdif";\r
- data.buffer = NULL;\r
-\r
- printf("usage: patest_wmme_ac3 fileName [paDeviceIndex]\n");\r
- printf("**IMPORTANT*** The provided file must include the spdif preamble at the start of every AC-3 frame. Using a normal ac3 file won't work.\n");\r
- printf("PortAudio Test: output a raw spdif ac3 stream. SR = %d, BufSize = %d, Chans = %d\n", \r
- SAMPLE_RATE, FRAMES_PER_BUFFER, CHANNEL_COUNT);\r
-\r
- \r
- if( argc >= 2 )\r
- fileName = argv[1];\r
-\r
- printf( "reading spdif ac3 raw stream file %s\n", fileName );\r
-\r
- fp = fopen( fileName, "rb" );\r
- if( !fp ){\r
- fprintf( stderr, "error opening spdif ac3 file.\n" );\r
- return -1;\r
- }\r
- /* get file size */\r
- fseek( fp, 0, SEEK_END );\r
- data.bufferSampleCount = ftell( fp ) / sizeof(short);\r
- fseek( fp, 0, SEEK_SET );\r
-\r
- /* allocate buffer, read the whole file into memory */\r
- data.buffer = (short*)malloc( data.bufferSampleCount * sizeof(short) );\r
- if( !data.buffer ){\r
- fprintf( stderr, "error allocating buffer.\n" );\r
- return -1;\r
- }\r
-\r
- fread( data.buffer, sizeof(short), data.bufferSampleCount, fp );\r
- fclose( fp );\r
-\r
- data.playbackIndex = 0;\r
-\r
- err = Pa_Initialize();\r
- if( err != paNoError ) goto error;\r
-\r
- deviceIndex = Pa_GetHostApiInfo( Pa_HostApiTypeIdToHostApiIndex( paMME ) )->defaultOutputDevice;\r
- if( argc >= 3 ){\r
- sscanf( argv[1], "%d", &deviceIndex );\r
- }\r
-\r
- printf( "using device id %d (%s)\n", deviceIndex, Pa_GetDeviceInfo(deviceIndex)->name );\r
-\r
- \r
- outputParameters.device = deviceIndex;\r
- outputParameters.channelCount = CHANNEL_COUNT;\r
- outputParameters.sampleFormat = paInt16; /* IMPORTANT must use paInt16 for WMME AC3 */\r
- outputParameters.suggestedLatency = Pa_GetDeviceInfo( outputParameters.device )->defaultLowOutputLatency;\r
- outputParameters.hostApiSpecificStreamInfo = NULL;\r
-\r
- wmmeStreamInfo.size = sizeof(PaWinMmeStreamInfo);\r
- wmmeStreamInfo.hostApiType = paMME; \r
- wmmeStreamInfo.version = 1;\r
- wmmeStreamInfo.flags = paWinMmeWaveFormatDolbyAc3Spdif;\r
- outputParameters.hostApiSpecificStreamInfo = &wmmeStreamInfo;\r
-\r
-\r
- if( Pa_IsFormatSupported( 0, &outputParameters, SAMPLE_RATE ) == paFormatIsSupported ){\r
- printf( "Pa_IsFormatSupported reports device will support %d channels.\n", CHANNEL_COUNT );\r
- }else{\r
- printf( "Pa_IsFormatSupported reports device will not support %d channels.\n", CHANNEL_COUNT );\r
- }\r
-\r
- err = Pa_OpenStream(\r
- &stream,\r
- NULL, /* no input */\r
- &outputParameters,\r
- SAMPLE_RATE,\r
- FRAMES_PER_BUFFER,\r
- 0,\r
- patestCallback,\r
- &data );\r
- if( err != paNoError ) goto error;\r
-\r
- err = Pa_StartStream( stream );\r
- if( err != paNoError ) goto error;\r
-\r
- printf("Play for %d seconds.\n", NUM_SECONDS );\r
- Pa_Sleep( NUM_SECONDS * 1000 );\r
-\r
- err = Pa_StopStream( stream );\r
- if( err != paNoError ) goto error;\r
-\r
- err = Pa_CloseStream( stream );\r
- if( err != paNoError ) goto error;\r
-\r
- Pa_Terminate();\r
- free( data.buffer );\r
- printf("Test finished.\n");\r
- \r
- return err;\r
-error:\r
- Pa_Terminate();\r
- free( data.buffer );\r
-\r
- fprintf( stderr, "An error occured while using the portaudio stream\n" );\r
- fprintf( stderr, "Error number: %d\n", err );\r
- fprintf( stderr, "Error message: %s\n", Pa_GetErrorText( err ) );\r
- return err;\r
-}\r
-\r
+/** @file paex_wmme_ac3.c
+ @ingroup examples_src
+ @brief Use WMME-specific interface to send raw AC3 data to a S/PDIF output.
+ @author Ross Bencina <rossb@audiomulch.com>
+*/
+/*
+ * $Id: $
+ * Portable Audio I/O Library
+ * Windows MME ac3 sound output test
+ *
+ * Copyright (c) 2009 Ross Bencina
+ *
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * The text above constitutes the entire PortAudio license; however,
+ * the PortAudio community also makes the following non-binding requests:
+ *
+ * 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. It is also
+ * requested that these non-binding requests be included along with the
+ * license above.
+ */
+
+#include <stdio.h>
+#include <math.h>
+
+#include <windows.h> /* required when using pa_win_wmme.h */
+#include <mmsystem.h> /* required when using pa_win_wmme.h */
+
+#include "portaudio.h"
+#include "pa_win_wmme.h"
+
+#define NUM_SECONDS (20)
+#define SAMPLE_RATE (48000)
+#define FRAMES_PER_BUFFER (64)
+
+#ifndef M_PI
+#define M_PI (3.14159265)
+#endif
+
+#define TABLE_SIZE (100)
+
+#define CHANNEL_COUNT (2)
+
+
+
+typedef struct
+{
+ short *buffer;
+ int bufferSampleCount;
+ int playbackIndex;
+}
+paTestData;
+
+/* This routine will be called by the PortAudio engine when audio is needed.
+** It may called at interrupt level on some machines so don't do anything
+** that could mess up the system like calling malloc() or free().
+*/
+static int patestCallback( const void *inputBuffer, void *outputBuffer,
+ unsigned long framesPerBuffer,
+ const PaStreamCallbackTimeInfo* timeInfo,
+ PaStreamCallbackFlags statusFlags,
+ void *userData )
+{
+ paTestData *data = (paTestData*)userData;
+ short *out = (short*)outputBuffer;
+ unsigned long i,j;
+
+ (void) timeInfo; /* Prevent unused variable warnings. */
+ (void) statusFlags;
+ (void) inputBuffer;
+
+ /* stream out contents of data->buffer looping at end */
+
+ for( i=0; i<framesPerBuffer; i++ )
+ {
+ for( j = 0; j < CHANNEL_COUNT; ++j ){
+ *out++ = data->buffer[ data->playbackIndex++ ];
+
+ if( data->playbackIndex >= data->bufferSampleCount )
+ data->playbackIndex = 0; /* loop at end of buffer */
+ }
+ }
+
+ return paContinue;
+}
+
+/*******************************************************************/
+int main(int argc, char* argv[])
+{
+ PaStreamParameters outputParameters;
+ PaWinMmeStreamInfo wmmeStreamInfo;
+ PaStream *stream;
+ PaError err;
+ paTestData data;
+ int deviceIndex;
+ FILE *fp;
+ const char *fileName = "c:\\test_48k.ac3.spdif";
+ data.buffer = NULL;
+
+ printf("usage: patest_wmme_ac3 fileName [paDeviceIndex]\n");
+ printf("**IMPORTANT*** The provided file must include the spdif preamble at the start of every AC-3 frame. Using a normal ac3 file won't work.\n");
+ printf("PortAudio Test: output a raw spdif ac3 stream. SR = %d, BufSize = %d, Chans = %d\n",
+ SAMPLE_RATE, FRAMES_PER_BUFFER, CHANNEL_COUNT);
+
+
+ if( argc >= 2 )
+ fileName = argv[1];
+
+ printf( "reading spdif ac3 raw stream file %s\n", fileName );
+
+ fp = fopen( fileName, "rb" );
+ if( !fp ){
+ fprintf( stderr, "error opening spdif ac3 file.\n" );
+ return -1;
+ }
+ /* get file size */
+ fseek( fp, 0, SEEK_END );
+ data.bufferSampleCount = ftell( fp ) / sizeof(short);
+ fseek( fp, 0, SEEK_SET );
+
+ /* allocate buffer, read the whole file into memory */
+ data.buffer = (short*)malloc( data.bufferSampleCount * sizeof(short) );
+ if( !data.buffer ){
+ fprintf( stderr, "error allocating buffer.\n" );
+ return -1;
+ }
+
+ fread( data.buffer, sizeof(short), data.bufferSampleCount, fp );
+ fclose( fp );
+
+ data.playbackIndex = 0;
+
+ err = Pa_Initialize();
+ if( err != paNoError ) goto error;
+
+ deviceIndex = Pa_GetHostApiInfo( Pa_HostApiTypeIdToHostApiIndex( paMME ) )->defaultOutputDevice;
+ if( argc >= 3 ){
+ sscanf( argv[1], "%d", &deviceIndex );
+ }
+
+ printf( "using device id %d (%s)\n", deviceIndex, Pa_GetDeviceInfo(deviceIndex)->name );
+
+
+ outputParameters.device = deviceIndex;
+ outputParameters.channelCount = CHANNEL_COUNT;
+ outputParameters.sampleFormat = paInt16; /* IMPORTANT must use paInt16 for WMME AC3 */
+ outputParameters.suggestedLatency = Pa_GetDeviceInfo( outputParameters.device )->defaultLowOutputLatency;
+ outputParameters.hostApiSpecificStreamInfo = NULL;
+
+ wmmeStreamInfo.size = sizeof(PaWinMmeStreamInfo);
+ wmmeStreamInfo.hostApiType = paMME;
+ wmmeStreamInfo.version = 1;
+ wmmeStreamInfo.flags = paWinMmeWaveFormatDolbyAc3Spdif;
+ outputParameters.hostApiSpecificStreamInfo = &wmmeStreamInfo;
+
+
+ if( Pa_IsFormatSupported( 0, &outputParameters, SAMPLE_RATE ) == paFormatIsSupported ){
+ printf( "Pa_IsFormatSupported reports device will support %d channels.\n", CHANNEL_COUNT );
+ }else{
+ printf( "Pa_IsFormatSupported reports device will not support %d channels.\n", CHANNEL_COUNT );
+ }
+
+ err = Pa_OpenStream(
+ &stream,
+ NULL, /* no input */
+ &outputParameters,
+ SAMPLE_RATE,
+ FRAMES_PER_BUFFER,
+ 0,
+ patestCallback,
+ &data );
+ if( err != paNoError ) goto error;
+
+ err = Pa_StartStream( stream );
+ if( err != paNoError ) goto error;
+
+ printf("Play for %d seconds.\n", NUM_SECONDS );
+ Pa_Sleep( NUM_SECONDS * 1000 );
+
+ err = Pa_StopStream( stream );
+ if( err != paNoError ) goto error;
+
+ err = Pa_CloseStream( stream );
+ if( err != paNoError ) goto error;
+
+ Pa_Terminate();
+ free( data.buffer );
+ printf("Test finished.\n");
+
+ return err;
+error:
+ Pa_Terminate();
+ free( data.buffer );
+
+ fprintf( stderr, "An error occured while using the portaudio stream\n" );
+ fprintf( stderr, "Error number: %d\n", err );
+ fprintf( stderr, "Error message: %s\n", Pa_GetErrorText( err ) );
+ return err;
+}
+
-/** @file paex_wmme_surround.c\r
- @ingroup examples_src\r
- @brief Use WMME-specific channelMask to request 5.1 surround sound output.\r
- @author Ross Bencina <rossb@audiomulch.com>\r
-*/\r
-/*\r
- * $Id: $\r
- * Portable Audio I/O Library\r
- * Windows MME surround sound output test\r
- *\r
- * Copyright (c) 2007 Ross Bencina\r
- *\r
- * Permission is hereby granted, free of charge, to any person obtaining\r
- * a copy of this software and associated documentation files\r
- * (the "Software"), to deal in the Software without restriction,\r
- * including without limitation the rights to use, copy, modify, merge,\r
- * publish, distribute, sublicense, and/or sell copies of the Software,\r
- * and to permit persons to whom the Software is furnished to do so,\r
- * subject to the following conditions:\r
- *\r
- * The above copyright notice and this permission notice shall be\r
- * included in all copies or substantial portions of the Software.\r
- *\r
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\r
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\r
- * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\r
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\r
- * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
- */\r
-\r
-/*\r
- * The text above constitutes the entire PortAudio license; however, \r
- * the PortAudio community also makes the following non-binding requests:\r
- *\r
- * Any person wishing to distribute modifications to the Software is\r
- * requested to send the modifications to the original developer so that\r
- * they can be incorporated into the canonical version. It is also \r
- * requested that these non-binding requests be included along with the \r
- * license above.\r
- */\r
-\r
-#include <stdio.h>\r
-#include <math.h>\r
-\r
-#include <windows.h> /* required when using pa_win_wmme.h */\r
-#include <mmsystem.h> /* required when using pa_win_wmme.h */\r
-\r
-#include "portaudio.h"\r
-#include "pa_win_wmme.h"\r
-\r
-#define NUM_SECONDS (12)\r
-#define SAMPLE_RATE (44100)\r
-#define FRAMES_PER_BUFFER (64)\r
-\r
-#ifndef M_PI\r
-#define M_PI (3.14159265)\r
-#endif\r
-\r
-#define TABLE_SIZE (100)\r
-\r
-#define CHANNEL_COUNT (6)\r
-\r
-\r
-\r
-typedef struct\r
-{\r
- float sine[TABLE_SIZE];\r
- int phase;\r
- int currentChannel;\r
- int cycleCount;\r
-}\r
-paTestData;\r
-\r
-/* This routine will be called by the PortAudio engine when audio is needed.\r
-** It may called at interrupt level on some machines so don't do anything\r
-** that could mess up the system like calling malloc() or free().\r
-*/\r
-static int patestCallback( const void *inputBuffer, void *outputBuffer,\r
- unsigned long framesPerBuffer,\r
- const PaStreamCallbackTimeInfo* timeInfo,\r
- PaStreamCallbackFlags statusFlags,\r
- void *userData )\r
-{\r
- paTestData *data = (paTestData*)userData;\r
- float *out = (float*)outputBuffer;\r
- unsigned long i,j;\r
-\r
- (void) timeInfo; /* Prevent unused variable warnings. */\r
- (void) statusFlags;\r
- (void) inputBuffer;\r
- \r
- for( i=0; i<framesPerBuffer; i++ )\r
- {\r
- for( j = 0; j < CHANNEL_COUNT; ++j ){\r
- if( j == data->currentChannel && data->cycleCount < 4410 ){\r
- *out++ = data->sine[data->phase];\r
- data->phase += 1 + j; // play each channel at a different pitch so they can be distinguished\r
- if( data->phase >= TABLE_SIZE ){\r
- data->phase -= TABLE_SIZE;\r
- }\r
- }else{\r
- *out++ = 0;\r
- }\r
- }\r
- \r
- data->cycleCount++;\r
- if( data->cycleCount > 44100 ){\r
- data->cycleCount = 0;\r
-\r
- ++data->currentChannel;\r
- if( data->currentChannel >= CHANNEL_COUNT )\r
- data->currentChannel -= CHANNEL_COUNT;\r
- }\r
- }\r
- \r
- return paContinue;\r
-}\r
-\r
-/*******************************************************************/\r
-int main(int argc, char* argv[])\r
-{\r
- PaStreamParameters outputParameters;\r
- PaWinMmeStreamInfo wmmeStreamInfo;\r
- PaStream *stream;\r
- PaError err;\r
- paTestData data;\r
- int i;\r
- int deviceIndex;\r
-\r
- printf("PortAudio Test: output a sine blip on each channel. SR = %d, BufSize = %d, Chans = %d\n", SAMPLE_RATE, FRAMES_PER_BUFFER, CHANNEL_COUNT);\r
-\r
- err = Pa_Initialize();\r
- if( err != paNoError ) goto error;\r
-\r
- deviceIndex = Pa_GetHostApiInfo( Pa_HostApiTypeIdToHostApiIndex( paMME ) )->defaultOutputDevice;\r
- if( argc == 2 ){\r
- sscanf( argv[1], "%d", &deviceIndex );\r
- }\r
-\r
- printf( "using device id %d (%s)\n", deviceIndex, Pa_GetDeviceInfo(deviceIndex)->name );\r
-\r
- /* initialise sinusoidal wavetable */\r
- for( i=0; i<TABLE_SIZE; i++ )\r
- {\r
- data.sine[i] = (float) sin( ((double)i/(double)TABLE_SIZE) * M_PI * 2. );\r
- }\r
-\r
- data.phase = 0;\r
- data.currentChannel = 0;\r
- data.cycleCount = 0;\r
-\r
- outputParameters.device = deviceIndex;\r
- outputParameters.channelCount = CHANNEL_COUNT;\r
- outputParameters.sampleFormat = paFloat32; /* 32 bit floating point processing */\r
- outputParameters.suggestedLatency = Pa_GetDeviceInfo( outputParameters.device )->defaultLowOutputLatency;\r
- outputParameters.hostApiSpecificStreamInfo = NULL;\r
-\r
- /* it's not strictly necessary to provide a channelMask for surround sound\r
- output. But if you want to be sure which channel mask PortAudio will use\r
- then you should supply one */\r
- wmmeStreamInfo.size = sizeof(PaWinMmeStreamInfo);\r
- wmmeStreamInfo.hostApiType = paMME; \r
- wmmeStreamInfo.version = 1;\r
- wmmeStreamInfo.flags = paWinMmeUseChannelMask;\r
- wmmeStreamInfo.channelMask = PAWIN_SPEAKER_5POINT1; /* request 5.1 output format */\r
- outputParameters.hostApiSpecificStreamInfo = &wmmeStreamInfo;\r
-\r
-\r
- if( Pa_IsFormatSupported( 0, &outputParameters, SAMPLE_RATE ) == paFormatIsSupported ){\r
- printf( "Pa_IsFormatSupported reports device will support %d channels.\n", CHANNEL_COUNT );\r
- }else{\r
- printf( "Pa_IsFormatSupported reports device will not support %d channels.\n", CHANNEL_COUNT );\r
- }\r
-\r
- err = Pa_OpenStream(\r
- &stream,\r
- NULL, /* no input */\r
- &outputParameters,\r
- SAMPLE_RATE,\r
- FRAMES_PER_BUFFER,\r
- paClipOff, /* we won't output out of range samples so don't bother clipping them */\r
- patestCallback,\r
- &data );\r
- if( err != paNoError ) goto error;\r
-\r
- err = Pa_StartStream( stream );\r
- if( err != paNoError ) goto error;\r
-\r
- printf("Play for %d seconds.\n", NUM_SECONDS );\r
- Pa_Sleep( NUM_SECONDS * 1000 );\r
-\r
- err = Pa_StopStream( stream );\r
- if( err != paNoError ) goto error;\r
-\r
- err = Pa_CloseStream( stream );\r
- if( err != paNoError ) goto error;\r
-\r
- Pa_Terminate();\r
- printf("Test finished.\n");\r
- \r
- return err;\r
-error:\r
- Pa_Terminate();\r
- fprintf( stderr, "An error occured while using the portaudio stream\n" );\r
- fprintf( stderr, "Error number: %d\n", err );\r
- fprintf( stderr, "Error message: %s\n", Pa_GetErrorText( err ) );\r
- return err;\r
-}\r
-\r
+/** @file paex_wmme_surround.c
+ @ingroup examples_src
+ @brief Use WMME-specific channelMask to request 5.1 surround sound output.
+ @author Ross Bencina <rossb@audiomulch.com>
+*/
+/*
+ * $Id: $
+ * Portable Audio I/O Library
+ * Windows MME surround sound output test
+ *
+ * Copyright (c) 2007 Ross Bencina
+ *
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * The text above constitutes the entire PortAudio license; however,
+ * the PortAudio community also makes the following non-binding requests:
+ *
+ * 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. It is also
+ * requested that these non-binding requests be included along with the
+ * license above.
+ */
+
+#include <stdio.h>
+#include <math.h>
+
+#include <windows.h> /* required when using pa_win_wmme.h */
+#include <mmsystem.h> /* required when using pa_win_wmme.h */
+
+#include "portaudio.h"
+#include "pa_win_wmme.h"
+
+#define NUM_SECONDS (12)
+#define SAMPLE_RATE (44100)
+#define FRAMES_PER_BUFFER (64)
+
+#ifndef M_PI
+#define M_PI (3.14159265)
+#endif
+
+#define TABLE_SIZE (100)
+
+#define CHANNEL_COUNT (6)
+
+
+
+typedef struct
+{
+ float sine[TABLE_SIZE];
+ int phase;
+ int currentChannel;
+ int cycleCount;
+}
+paTestData;
+
+/* This routine will be called by the PortAudio engine when audio is needed.
+** It may called at interrupt level on some machines so don't do anything
+** that could mess up the system like calling malloc() or free().
+*/
+static int patestCallback( const void *inputBuffer, void *outputBuffer,
+ unsigned long framesPerBuffer,
+ const PaStreamCallbackTimeInfo* timeInfo,
+ PaStreamCallbackFlags statusFlags,
+ void *userData )
+{
+ paTestData *data = (paTestData*)userData;
+ float *out = (float*)outputBuffer;
+ unsigned long i,j;
+
+ (void) timeInfo; /* Prevent unused variable warnings. */
+ (void) statusFlags;
+ (void) inputBuffer;
+
+ for( i=0; i<framesPerBuffer; i++ )
+ {
+ for( j = 0; j < CHANNEL_COUNT; ++j ){
+ if( j == data->currentChannel && data->cycleCount < 4410 ){
+ *out++ = data->sine[data->phase];
+ data->phase += 1 + j; // play each channel at a different pitch so they can be distinguished
+ if( data->phase >= TABLE_SIZE ){
+ data->phase -= TABLE_SIZE;
+ }
+ }else{
+ *out++ = 0;
+ }
+ }
+
+ data->cycleCount++;
+ if( data->cycleCount > 44100 ){
+ data->cycleCount = 0;
+
+ ++data->currentChannel;
+ if( data->currentChannel >= CHANNEL_COUNT )
+ data->currentChannel -= CHANNEL_COUNT;
+ }
+ }
+
+ return paContinue;
+}
+
+/*******************************************************************/
+int main(int argc, char* argv[])
+{
+ PaStreamParameters outputParameters;
+ PaWinMmeStreamInfo wmmeStreamInfo;
+ PaStream *stream;
+ PaError err;
+ paTestData data;
+ int i;
+ int deviceIndex;
+
+ printf("PortAudio Test: output a sine blip on each channel. SR = %d, BufSize = %d, Chans = %d\n", SAMPLE_RATE, FRAMES_PER_BUFFER, CHANNEL_COUNT);
+
+ err = Pa_Initialize();
+ if( err != paNoError ) goto error;
+
+ deviceIndex = Pa_GetHostApiInfo( Pa_HostApiTypeIdToHostApiIndex( paMME ) )->defaultOutputDevice;
+ if( argc == 2 ){
+ sscanf( argv[1], "%d", &deviceIndex );
+ }
+
+ printf( "using device id %d (%s)\n", deviceIndex, Pa_GetDeviceInfo(deviceIndex)->name );
+
+ /* initialise sinusoidal wavetable */
+ for( i=0; i<TABLE_SIZE; i++ )
+ {
+ data.sine[i] = (float) sin( ((double)i/(double)TABLE_SIZE) * M_PI * 2. );
+ }
+
+ data.phase = 0;
+ data.currentChannel = 0;
+ data.cycleCount = 0;
+
+ outputParameters.device = deviceIndex;
+ outputParameters.channelCount = CHANNEL_COUNT;
+ outputParameters.sampleFormat = paFloat32; /* 32 bit floating point processing */
+ outputParameters.suggestedLatency = Pa_GetDeviceInfo( outputParameters.device )->defaultLowOutputLatency;
+ outputParameters.hostApiSpecificStreamInfo = NULL;
+
+ /* it's not strictly necessary to provide a channelMask for surround sound
+ output. But if you want to be sure which channel mask PortAudio will use
+ then you should supply one */
+ wmmeStreamInfo.size = sizeof(PaWinMmeStreamInfo);
+ wmmeStreamInfo.hostApiType = paMME;
+ wmmeStreamInfo.version = 1;
+ wmmeStreamInfo.flags = paWinMmeUseChannelMask;
+ wmmeStreamInfo.channelMask = PAWIN_SPEAKER_5POINT1; /* request 5.1 output format */
+ outputParameters.hostApiSpecificStreamInfo = &wmmeStreamInfo;
+
+
+ if( Pa_IsFormatSupported( 0, &outputParameters, SAMPLE_RATE ) == paFormatIsSupported ){
+ printf( "Pa_IsFormatSupported reports device will support %d channels.\n", CHANNEL_COUNT );
+ }else{
+ printf( "Pa_IsFormatSupported reports device will not support %d channels.\n", CHANNEL_COUNT );
+ }
+
+ err = Pa_OpenStream(
+ &stream,
+ NULL, /* no input */
+ &outputParameters,
+ SAMPLE_RATE,
+ FRAMES_PER_BUFFER,
+ paClipOff, /* we won't output out of range samples so don't bother clipping them */
+ patestCallback,
+ &data );
+ if( err != paNoError ) goto error;
+
+ err = Pa_StartStream( stream );
+ if( err != paNoError ) goto error;
+
+ printf("Play for %d seconds.\n", NUM_SECONDS );
+ Pa_Sleep( NUM_SECONDS * 1000 );
+
+ err = Pa_StopStream( stream );
+ if( err != paNoError ) goto error;
+
+ err = Pa_CloseStream( stream );
+ if( err != paNoError ) goto error;
+
+ Pa_Terminate();
+ printf("Test finished.\n");
+
+ return err;
+error:
+ Pa_Terminate();
+ fprintf( stderr, "An error occured while using the portaudio stream\n" );
+ fprintf( stderr, "Error number: %d\n", err );
+ fprintf( stderr, "Error message: %s\n", Pa_GetErrorText( err ) );
+ return err;
+}
+
-#ifndef PA_WIN_DS_H\r
-#define PA_WIN_DS_H\r
-/*\r
- * $Id: $\r
- * PortAudio Portable Real-Time Audio Library\r
- * DirectSound specific extensions\r
- *\r
- * Copyright (c) 1999-2007 Ross Bencina and Phil Burk\r
- *\r
- * Permission is hereby granted, free of charge, to any person obtaining\r
- * a copy of this software and associated documentation files\r
- * (the "Software"), to deal in the Software without restriction,\r
- * including without limitation the rights to use, copy, modify, merge,\r
- * publish, distribute, sublicense, and/or sell copies of the Software,\r
- * and to permit persons to whom the Software is furnished to do so,\r
- * subject to the following conditions:\r
- *\r
- * The above copyright notice and this permission notice shall be\r
- * included in all copies or substantial portions of the Software.\r
- *\r
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\r
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\r
- * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\r
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\r
- * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
- */\r
-\r
-/*\r
- * The text above constitutes the entire PortAudio license; however, \r
- * the PortAudio community also makes the following non-binding requests:\r
- *\r
- * Any person wishing to distribute modifications to the Software is\r
- * requested to send the modifications to the original developer so that\r
- * they can be incorporated into the canonical version. It is also \r
- * requested that these non-binding requests be included along with the \r
- * license above.\r
- */\r
-\r
-/** @file\r
- @ingroup public_header\r
- @brief DirectSound-specific PortAudio API extension header file.\r
-*/\r
-\r
-#include "portaudio.h"\r
-#include "pa_win_waveformat.h"\r
-\r
-#ifdef __cplusplus\r
-extern "C"\r
-{\r
-#endif /* __cplusplus */\r
-\r
-\r
-#define paWinDirectSoundUseLowLevelLatencyParameters (0x01)\r
-#define paWinDirectSoundUseChannelMask (0x04)\r
-\r
-\r
-typedef struct PaWinDirectSoundStreamInfo{\r
- unsigned long size; /**< sizeof(PaWinDirectSoundStreamInfo) */\r
- PaHostApiTypeId hostApiType; /**< paDirectSound */\r
- unsigned long version; /**< 2 */\r
-\r
- unsigned long flags; /**< enable other features of this struct */\r
-\r
- /** \r
- low-level latency setting support\r
- Sets the size of the DirectSound host buffer.\r
- When flags contains the paWinDirectSoundUseLowLevelLatencyParameters\r
- this size will be used instead of interpreting the generic latency \r
- parameters to Pa_OpenStream(). If the flag is not set this value is ignored.\r
-\r
- If the stream is a full duplex stream the implementation requires that\r
- the values of framesPerBuffer for input and output match (if both are specified).\r
- */\r
- unsigned long framesPerBuffer;\r
-\r
- /**\r
- support for WAVEFORMATEXTENSIBLE channel masks. If flags contains\r
- paWinDirectSoundUseChannelMask this allows you to specify which speakers \r
- to address in a multichannel stream. Constants for channelMask\r
- are specified in pa_win_waveformat.h\r
-\r
- */\r
- PaWinWaveFormatChannelMask channelMask;\r
-\r
-}PaWinDirectSoundStreamInfo;\r
-\r
-\r
-\r
-#ifdef __cplusplus\r
-}\r
-#endif /* __cplusplus */\r
-\r
-#endif /* PA_WIN_DS_H */ \r
+#ifndef PA_WIN_DS_H
+#define PA_WIN_DS_H
+/*
+ * $Id: $
+ * PortAudio Portable Real-Time Audio Library
+ * DirectSound specific extensions
+ *
+ * Copyright (c) 1999-2007 Ross Bencina and Phil Burk
+ *
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * The text above constitutes the entire PortAudio license; however,
+ * the PortAudio community also makes the following non-binding requests:
+ *
+ * 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. It is also
+ * requested that these non-binding requests be included along with the
+ * license above.
+ */
+
+/** @file
+ @ingroup public_header
+ @brief DirectSound-specific PortAudio API extension header file.
+*/
+
+#include "portaudio.h"
+#include "pa_win_waveformat.h"
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+
+#define paWinDirectSoundUseLowLevelLatencyParameters (0x01)
+#define paWinDirectSoundUseChannelMask (0x04)
+
+
+typedef struct PaWinDirectSoundStreamInfo{
+ unsigned long size; /**< sizeof(PaWinDirectSoundStreamInfo) */
+ PaHostApiTypeId hostApiType; /**< paDirectSound */
+ unsigned long version; /**< 2 */
+
+ unsigned long flags; /**< enable other features of this struct */
+
+ /**
+ low-level latency setting support
+ Sets the size of the DirectSound host buffer.
+ When flags contains the paWinDirectSoundUseLowLevelLatencyParameters
+ this size will be used instead of interpreting the generic latency
+ parameters to Pa_OpenStream(). If the flag is not set this value is ignored.
+
+ If the stream is a full duplex stream the implementation requires that
+ the values of framesPerBuffer for input and output match (if both are specified).
+ */
+ unsigned long framesPerBuffer;
+
+ /**
+ support for WAVEFORMATEXTENSIBLE channel masks. If flags contains
+ paWinDirectSoundUseChannelMask this allows you to specify which speakers
+ to address in a multichannel stream. Constants for channelMask
+ are specified in pa_win_waveformat.h
+
+ */
+ PaWinWaveFormatChannelMask channelMask;
+
+}PaWinDirectSoundStreamInfo;
+
+
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* PA_WIN_DS_H */
-#ifndef PA_WIN_WASAPI_H\r
-#define PA_WIN_WASAPI_H\r
-/*\r
- * $Id: $\r
- * PortAudio Portable Real-Time Audio Library\r
- * DirectSound specific extensions\r
- *\r
- * Copyright (c) 1999-2007 Ross Bencina and Phil Burk\r
- *\r
- * Permission is hereby granted, free of charge, to any person obtaining\r
- * a copy of this software and associated documentation files\r
- * (the "Software"), to deal in the Software without restriction,\r
- * including without limitation the rights to use, copy, modify, merge,\r
- * publish, distribute, sublicense, and/or sell copies of the Software,\r
- * and to permit persons to whom the Software is furnished to do so,\r
- * subject to the following conditions:\r
- *\r
- * The above copyright notice and this permission notice shall be\r
- * included in all copies or substantial portions of the Software.\r
- *\r
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\r
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\r
- * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\r
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\r
- * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
- */\r
-\r
-/*\r
- * The text above constitutes the entire PortAudio license; however, \r
- * the PortAudio community also makes the following non-binding requests:\r
- *\r
- * Any person wishing to distribute modifications to the Software is\r
- * requested to send the modifications to the original developer so that\r
- * they can be incorporated into the canonical version. It is also \r
- * requested that these non-binding requests be included along with the \r
- * license above.\r
- */\r
-\r
-/** @file\r
- @ingroup public_header\r
- @brief WASAPI-specific PortAudio API extension header file.\r
-*/\r
-\r
-#include "portaudio.h"\r
-#include "pa_win_waveformat.h"\r
-\r
-#ifdef __cplusplus\r
-extern "C"\r
-{\r
-#endif /* __cplusplus */\r
-\r
-\r
-/* Setup flags */\r
-typedef enum PaWasapiFlags\r
-{\r
- /* puts WASAPI into exclusive mode */\r
- paWinWasapiExclusive = (1 << 0),\r
-\r
- /* allows to skip internal PA processing completely */\r
- paWinWasapiRedirectHostProcessor = (1 << 1),\r
-\r
- /* assigns custom channel mask */\r
- paWinWasapiUseChannelMask = (1 << 2),\r
-\r
- /* selects non-Event driven method of data read/write\r
- Note: WASAPI Event driven core is capable of 2ms latency!!!, but Polling\r
- method can only provide 15-20ms latency. */\r
- paWinWasapiPolling = (1 << 3),\r
-\r
- /* forces custom thread priority setting, must be used if PaWasapiStreamInfo::threadPriority \r
- is set to a custom value */\r
- paWinWasapiThreadPriority = (1 << 4)\r
-}\r
-PaWasapiFlags;\r
-#define paWinWasapiExclusive (paWinWasapiExclusive)\r
-#define paWinWasapiRedirectHostProcessor (paWinWasapiRedirectHostProcessor)\r
-#define paWinWasapiUseChannelMask (paWinWasapiUseChannelMask)\r
-#define paWinWasapiPolling (paWinWasapiPolling)\r
-#define paWinWasapiThreadPriority (paWinWasapiThreadPriority)\r
-\r
-\r
-/* Host processor. Allows to skip internal PA processing completely. \r
- You must set paWinWasapiRedirectHostProcessor flag to PaWasapiStreamInfo::flags member\r
- in order to have host processor redirected to your callback.\r
- Use with caution! inputFrames and outputFrames depend solely on final device setup.\r
- To query maximal values of inputFrames/outputFrames use PaWasapi_GetFramesPerHostBuffer.\r
-*/\r
-typedef void (*PaWasapiHostProcessorCallback) (void *inputBuffer, long inputFrames,\r
- void *outputBuffer, long outputFrames,\r
- void *userData);\r
-\r
-/* Device role. */\r
-typedef enum PaWasapiDeviceRole\r
-{\r
- eRoleRemoteNetworkDevice = 0,\r
- eRoleSpeakers,\r
- eRoleLineLevel,\r
- eRoleHeadphones,\r
- eRoleMicrophone,\r
- eRoleHeadset,\r
- eRoleHandset,\r
- eRoleUnknownDigitalPassthrough,\r
- eRoleSPDIF,\r
- eRoleHDMI,\r
- eRoleUnknownFormFactor\r
-}\r
-PaWasapiDeviceRole;\r
-\r
-\r
-/* Jack connection type. */\r
-typedef enum PaWasapiJackConnectionType\r
-{\r
- eJackConnTypeUnknown,\r
- eJackConnType3Point5mm,\r
- eJackConnTypeQuarter,\r
- eJackConnTypeAtapiInternal,\r
- eJackConnTypeRCA,\r
- eJackConnTypeOptical,\r
- eJackConnTypeOtherDigital,\r
- eJackConnTypeOtherAnalog,\r
- eJackConnTypeMultichannelAnalogDIN,\r
- eJackConnTypeXlrProfessional,\r
- eJackConnTypeRJ11Modem,\r
- eJackConnTypeCombination\r
-} \r
-PaWasapiJackConnectionType;\r
-\r
-\r
-/* Jack geometric location. */\r
-typedef enum PaWasapiJackGeoLocation\r
-{\r
- eJackGeoLocUnk = 0,\r
- eJackGeoLocRear = 0x1, /* matches EPcxGeoLocation::eGeoLocRear */\r
- eJackGeoLocFront,\r
- eJackGeoLocLeft,\r
- eJackGeoLocRight,\r
- eJackGeoLocTop,\r
- eJackGeoLocBottom,\r
- eJackGeoLocRearPanel,\r
- eJackGeoLocRiser,\r
- eJackGeoLocInsideMobileLid,\r
- eJackGeoLocDrivebay,\r
- eJackGeoLocHDMI,\r
- eJackGeoLocOutsideMobileLid,\r
- eJackGeoLocATAPI,\r
- eJackGeoLocReserved5,\r
- eJackGeoLocReserved6,\r
-} \r
-PaWasapiJackGeoLocation;\r
-\r
-\r
-/* Jack general location. */\r
-typedef enum PaWasapiJackGenLocation\r
-{\r
- eJackGenLocPrimaryBox = 0,\r
- eJackGenLocInternal,\r
- eJackGenLocSeparate,\r
- eJackGenLocOther\r
-} \r
-PaWasapiJackGenLocation;\r
-\r
-\r
-/* Jack's type of port. */\r
-typedef enum PaWasapiJackPortConnection\r
-{\r
- eJackPortConnJack = 0,\r
- eJackPortConnIntegratedDevice,\r
- eJackPortConnBothIntegratedAndJack,\r
- eJackPortConnUnknown\r
-} \r
-PaWasapiJackPortConnection;\r
-\r
-\r
-/* Thread priority. */\r
-typedef enum PaWasapiThreadPriority\r
-{\r
- eThreadPriorityNone = 0,\r
- eThreadPriorityAudio, //!< Default for Shared mode.\r
- eThreadPriorityCapture,\r
- eThreadPriorityDistribution,\r
- eThreadPriorityGames,\r
- eThreadPriorityPlayback,\r
- eThreadPriorityProAudio, //!< Default for Exclusive mode.\r
- eThreadPriorityWindowManager\r
-}\r
-PaWasapiThreadPriority;\r
-\r
-\r
-/* Stream descriptor. */\r
-typedef struct PaWasapiJackDescription \r
-{\r
- unsigned long channelMapping;\r
- unsigned long color; /* derived from macro: #define RGB(r,g,b) ((COLORREF)(((BYTE)(r)|((WORD)((BYTE)(g))<<8))|(((DWORD)(BYTE)(b))<<16))) */\r
- PaWasapiJackConnectionType connectionType;\r
- PaWasapiJackGeoLocation geoLocation;\r
- PaWasapiJackGenLocation genLocation;\r
- PaWasapiJackPortConnection portConnection;\r
- unsigned int isConnected;\r
-}\r
-PaWasapiJackDescription;\r
-\r
-\r
-/* Stream category.\r
- Note:\r
- - values are equal to WASAPI AUDIO_STREAM_CATEGORY enum\r
- - supported since Windows 8.0, noop on earler versions\r
- - values 1,2 are deprecated on Windows 10 and not included into enumeration\r
-*/\r
-typedef enum PaWasapiStreamCategory\r
-{\r
- eAudioCategoryOther = 0,\r
- eAudioCategoryCommunications = 3,\r
- eAudioCategoryAlerts = 4,\r
- eAudioCategorySoundEffects = 5,\r
- eAudioCategoryGameEffects = 6,\r
- eAudioCategoryGameMedia = 7,\r
- eAudioCategoryGameChat = 8,\r
- eAudioCategorySpeech = 9,\r
- eAudioCategoryMovie = 10,\r
- eAudioCategoryMedia = 11\r
-}\r
-PaWasapiStreamCategory;\r
-\r
-\r
-/* Stream option.\r
- Note:\r
- - values are equal to WASAPI AUDCLNT_STREAMOPTIONS enum\r
- - supported since Windows 8.1, noop on earler versions\r
-*/\r
-typedef enum PaWasapiStreamOption\r
-{\r
- eStreamOptionNone = 0, //!< default\r
- eStreamOptionRaw = 1, //!< bypass WASAPI Audio Engine DSP effects, supported since Windows 8.1\r
- eStreamOptionMatchFormat = 2 //!< force WASAPI Audio Engine into a stream format, supported since Windows 10\r
-}\r
-PaWasapiStreamOption;\r
-\r
-\r
-/* Stream descriptor. */\r
-typedef struct PaWasapiStreamInfo \r
-{\r
- unsigned long size; /**< sizeof(PaWasapiStreamInfo) */\r
- PaHostApiTypeId hostApiType; /**< paWASAPI */\r
- unsigned long version; /**< 1 */\r
-\r
- unsigned long flags; /**< collection of PaWasapiFlags */\r
-\r
- /* Support for WAVEFORMATEXTENSIBLE channel masks. If flags contains\r
- paWinWasapiUseChannelMask this allows you to specify which speakers \r
- to address in a multichannel stream. Constants for channelMask\r
- are specified in pa_win_waveformat.h. Will be used only if \r
- paWinWasapiUseChannelMask flag is specified.\r
- */\r
- PaWinWaveFormatChannelMask channelMask;\r
-\r
- /* Delivers raw data to callback obtained from GetBuffer() methods skipping \r
- internal PortAudio processing inventory completely. userData parameter will \r
- be the same that was passed to Pa_OpenStream method. Will be used only if \r
- paWinWasapiRedirectHostProcessor flag is specified.\r
- */\r
- PaWasapiHostProcessorCallback hostProcessorOutput;\r
- PaWasapiHostProcessorCallback hostProcessorInput;\r
-\r
- /* Specifies thread priority explicitly. Will be used only if paWinWasapiThreadPriority flag\r
- is specified.\r
-\r
- Please note, if Input/Output streams are opened simultaniously (Full-Duplex mode)\r
- you shall specify same value for threadPriority or othervise one of the values will be used\r
- to setup thread priority.\r
- */\r
- PaWasapiThreadPriority threadPriority;\r
-\r
- /* Stream category. */\r
- PaWasapiStreamCategory streamCategory;\r
-\r
- /* Stream option. */\r
- PaWasapiStreamOption streamOption;\r
-} \r
-PaWasapiStreamInfo;\r
-\r
-\r
-/** Returns default sound format for device. Format is represented by PaWinWaveFormat or \r
- WAVEFORMATEXTENSIBLE structure.\r
-\r
- @param pFormat Pointer to PaWinWaveFormat or WAVEFORMATEXTENSIBLE structure.\r
- @param nFormatSize Size of PaWinWaveFormat or WAVEFORMATEXTENSIBLE structure in bytes.\r
- @param nDevice Device index.\r
-\r
- @return Non-negative value indicating the number of bytes copied into format decriptor\r
- or, a PaErrorCode (which are always negative) if PortAudio is not initialized\r
- or an error is encountered.\r
-*/\r
-int PaWasapi_GetDeviceDefaultFormat( void *pFormat, unsigned int nFormatSize, PaDeviceIndex nDevice );\r
-\r
-\r
-/** Returns device role (PaWasapiDeviceRole enum).\r
-\r
- @param nDevice device index.\r
-\r
- @return Non-negative value indicating device role or, a PaErrorCode (which are always negative)\r
- if PortAudio is not initialized or an error is encountered.\r
-*/\r
-int/*PaWasapiDeviceRole*/ PaWasapi_GetDeviceRole( PaDeviceIndex nDevice );\r
-\r
-\r
-/** Boost thread priority of calling thread (MMCSS). Use it for Blocking Interface only for thread\r
- which makes calls to Pa_WriteStream/Pa_ReadStream.\r
-\r
- @param hTask Handle to pointer to priority task. Must be used with PaWasapi_RevertThreadPriority\r
- method to revert thread priority to initial state.\r
-\r
- @param nPriorityClass Id of thread priority of PaWasapiThreadPriority type. Specifying \r
- eThreadPriorityNone does nothing.\r
-\r
- @return Error code indicating success or failure.\r
- @see PaWasapi_RevertThreadPriority\r
-*/\r
-PaError PaWasapi_ThreadPriorityBoost( void **hTask, PaWasapiThreadPriority nPriorityClass );\r
-\r
-\r
-/** Boost thread priority of calling thread (MMCSS). Use it for Blocking Interface only for thread\r
- which makes calls to Pa_WriteStream/Pa_ReadStream.\r
-\r
- @param hTask Task handle obtained by PaWasapi_BoostThreadPriority method.\r
- @return Error code indicating success or failure.\r
- @see PaWasapi_BoostThreadPriority\r
-*/\r
-PaError PaWasapi_ThreadPriorityRevert( void *hTask );\r
-\r
-\r
-/** Get number of frames per host buffer. This is maximal value of frames of WASAPI buffer which \r
- can be locked for operations. Use this method as helper to findout maximal values of \r
- inputFrames/outputFrames of PaWasapiHostProcessorCallback.\r
-\r
- @param pStream Pointer to PaStream to query.\r
- @param nInput Pointer to variable to receive number of input frames. Can be NULL.\r
- @param nOutput Pointer to variable to receive number of output frames. Can be NULL.\r
- @return Error code indicating success or failure.\r
- @see PaWasapiHostProcessorCallback\r
-*/\r
-PaError PaWasapi_GetFramesPerHostBuffer( PaStream *pStream, unsigned int *nInput, unsigned int *nOutput );\r
-\r
-\r
-/** Get number of jacks associated with a WASAPI device. Use this method to determine if\r
- there are any jacks associated with the provided WASAPI device. Not all audio devices\r
- will support this capability. This is valid for both input and output devices.\r
- @param nDevice device index.\r
- @param jcount Number of jacks is returned in this variable\r
- @return Error code indicating success or failure\r
- @see PaWasapi_GetJackDescription\r
- */\r
-PaError PaWasapi_GetJackCount(PaDeviceIndex nDevice, int *jcount);\r
-\r
-\r
-/** Get the jack description associated with a WASAPI device and jack number\r
- Before this function is called, use PaWasapi_GetJackCount to determine the\r
- number of jacks associated with device. If jcount is greater than zero, then\r
- each jack from 0 to jcount can be queried with this function to get the jack\r
- description.\r
- @param nDevice device index.\r
- @param jindex Which jack to return information\r
- @param KSJACK_DESCRIPTION This structure filled in on success.\r
- @return Error code indicating success or failure\r
- @see PaWasapi_GetJackCount\r
- */\r
-PaError PaWasapi_GetJackDescription(PaDeviceIndex nDevice, int jindex, PaWasapiJackDescription *pJackDescription);\r
-\r
-\r
-/*\r
- IMPORTANT:\r
-\r
- WASAPI is implemented for Callback and Blocking interfaces. It supports Shared and Exclusive\r
- share modes. \r
- \r
- Exclusive Mode:\r
-\r
- Exclusive mode allows to deliver audio data directly to hardware bypassing\r
- software mixing.\r
- Exclusive mode is specified by 'paWinWasapiExclusive' flag.\r
-\r
- Callback Interface:\r
-\r
- Provides best audio quality with low latency. Callback interface is implemented in \r
- two versions:\r
-\r
- 1) Event-Driven:\r
- This is the most powerful WASAPI implementation which provides glitch-free\r
- audio at around 3ms latency in Exclusive mode. Lowest possible latency for this mode is \r
- 3 ms for HD Audio class audio chips. For the Shared mode latency can not be \r
- lower than 20 ms.\r
-\r
- 2) Poll-Driven:\r
- Polling is another 2-nd method to operate with WASAPI. It is less efficient than Event-Driven\r
- and provides latency at around 10-13ms. Polling must be used to overcome a system bug\r
- under Windows Vista x64 when application is WOW64(32-bit) and Event-Driven method simply \r
- times out (event handle is never signalled on buffer completion). Please note, such WOW64 bug \r
- does not exist in Vista x86 or Windows 7.\r
- Polling can be setup by speciying 'paWinWasapiPolling' flag. Our WASAPI implementation detects\r
- WOW64 bug and sets 'paWinWasapiPolling' automatically.\r
-\r
- Thread priority:\r
-\r
- Normally thread priority is set automatically and does not require modification. Although\r
- if user wants some tweaking thread priority can be modified by setting 'paWinWasapiThreadPriority'\r
- flag and specifying 'PaWasapiStreamInfo::threadPriority' with value from PaWasapiThreadPriority \r
- enum.\r
-\r
- Blocking Interface:\r
-\r
- Blocking interface is implemented but due to above described Poll-Driven method can not\r
- deliver lowest possible latency. Specifying too low latency in Shared mode will result in \r
- distorted audio although Exclusive mode adds stability.\r
-\r
- Pa_IsFormatSupported:\r
-\r
- To check format with correct Share Mode (Exclusive/Shared) you must supply\r
- PaWasapiStreamInfo with flags paWinWasapiExclusive set through member of \r
- PaStreamParameters::hostApiSpecificStreamInfo structure.\r
-\r
- Pa_OpenStream:\r
-\r
- To set desired Share Mode (Exclusive/Shared) you must supply\r
- PaWasapiStreamInfo with flags paWinWasapiExclusive set through member of \r
- PaStreamParameters::hostApiSpecificStreamInfo structure.\r
-*/\r
-\r
-#ifdef __cplusplus\r
-}\r
-#endif /* __cplusplus */\r
-\r
-#endif /* PA_WIN_WASAPI_H */ \r
+#ifndef PA_WIN_WASAPI_H
+#define PA_WIN_WASAPI_H
+/*
+ * $Id: $
+ * PortAudio Portable Real-Time Audio Library
+ * DirectSound specific extensions
+ *
+ * Copyright (c) 1999-2007 Ross Bencina and Phil Burk
+ *
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * The text above constitutes the entire PortAudio license; however,
+ * the PortAudio community also makes the following non-binding requests:
+ *
+ * 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. It is also
+ * requested that these non-binding requests be included along with the
+ * license above.
+ */
+
+/** @file
+ @ingroup public_header
+ @brief WASAPI-specific PortAudio API extension header file.
+*/
+
+#include "portaudio.h"
+#include "pa_win_waveformat.h"
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+
+/* Setup flags */
+typedef enum PaWasapiFlags
+{
+ /* puts WASAPI into exclusive mode */
+ paWinWasapiExclusive = (1 << 0),
+
+ /* allows to skip internal PA processing completely */
+ paWinWasapiRedirectHostProcessor = (1 << 1),
+
+ /* assigns custom channel mask */
+ paWinWasapiUseChannelMask = (1 << 2),
+
+ /* selects non-Event driven method of data read/write
+ Note: WASAPI Event driven core is capable of 2ms latency!!!, but Polling
+ method can only provide 15-20ms latency. */
+ paWinWasapiPolling = (1 << 3),
+
+ /* forces custom thread priority setting, must be used if PaWasapiStreamInfo::threadPriority
+ is set to a custom value */
+ paWinWasapiThreadPriority = (1 << 4)
+}
+PaWasapiFlags;
+#define paWinWasapiExclusive (paWinWasapiExclusive)
+#define paWinWasapiRedirectHostProcessor (paWinWasapiRedirectHostProcessor)
+#define paWinWasapiUseChannelMask (paWinWasapiUseChannelMask)
+#define paWinWasapiPolling (paWinWasapiPolling)
+#define paWinWasapiThreadPriority (paWinWasapiThreadPriority)
+
+
+/* Host processor. Allows to skip internal PA processing completely.
+ You must set paWinWasapiRedirectHostProcessor flag to PaWasapiStreamInfo::flags member
+ in order to have host processor redirected to your callback.
+ Use with caution! inputFrames and outputFrames depend solely on final device setup.
+ To query maximal values of inputFrames/outputFrames use PaWasapi_GetFramesPerHostBuffer.
+*/
+typedef void (*PaWasapiHostProcessorCallback) (void *inputBuffer, long inputFrames,
+ void *outputBuffer, long outputFrames,
+ void *userData);
+
+/* Device role. */
+typedef enum PaWasapiDeviceRole
+{
+ eRoleRemoteNetworkDevice = 0,
+ eRoleSpeakers,
+ eRoleLineLevel,
+ eRoleHeadphones,
+ eRoleMicrophone,
+ eRoleHeadset,
+ eRoleHandset,
+ eRoleUnknownDigitalPassthrough,
+ eRoleSPDIF,
+ eRoleHDMI,
+ eRoleUnknownFormFactor
+}
+PaWasapiDeviceRole;
+
+
+/* Jack connection type. */
+typedef enum PaWasapiJackConnectionType
+{
+ eJackConnTypeUnknown,
+ eJackConnType3Point5mm,
+ eJackConnTypeQuarter,
+ eJackConnTypeAtapiInternal,
+ eJackConnTypeRCA,
+ eJackConnTypeOptical,
+ eJackConnTypeOtherDigital,
+ eJackConnTypeOtherAnalog,
+ eJackConnTypeMultichannelAnalogDIN,
+ eJackConnTypeXlrProfessional,
+ eJackConnTypeRJ11Modem,
+ eJackConnTypeCombination
+}
+PaWasapiJackConnectionType;
+
+
+/* Jack geometric location. */
+typedef enum PaWasapiJackGeoLocation
+{
+ eJackGeoLocUnk = 0,
+ eJackGeoLocRear = 0x1, /* matches EPcxGeoLocation::eGeoLocRear */
+ eJackGeoLocFront,
+ eJackGeoLocLeft,
+ eJackGeoLocRight,
+ eJackGeoLocTop,
+ eJackGeoLocBottom,
+ eJackGeoLocRearPanel,
+ eJackGeoLocRiser,
+ eJackGeoLocInsideMobileLid,
+ eJackGeoLocDrivebay,
+ eJackGeoLocHDMI,
+ eJackGeoLocOutsideMobileLid,
+ eJackGeoLocATAPI,
+ eJackGeoLocReserved5,
+ eJackGeoLocReserved6,
+}
+PaWasapiJackGeoLocation;
+
+
+/* Jack general location. */
+typedef enum PaWasapiJackGenLocation
+{
+ eJackGenLocPrimaryBox = 0,
+ eJackGenLocInternal,
+ eJackGenLocSeparate,
+ eJackGenLocOther
+}
+PaWasapiJackGenLocation;
+
+
+/* Jack's type of port. */
+typedef enum PaWasapiJackPortConnection
+{
+ eJackPortConnJack = 0,
+ eJackPortConnIntegratedDevice,
+ eJackPortConnBothIntegratedAndJack,
+ eJackPortConnUnknown
+}
+PaWasapiJackPortConnection;
+
+
+/* Thread priority. */
+typedef enum PaWasapiThreadPriority
+{
+ eThreadPriorityNone = 0,
+ eThreadPriorityAudio, //!< Default for Shared mode.
+ eThreadPriorityCapture,
+ eThreadPriorityDistribution,
+ eThreadPriorityGames,
+ eThreadPriorityPlayback,
+ eThreadPriorityProAudio, //!< Default for Exclusive mode.
+ eThreadPriorityWindowManager
+}
+PaWasapiThreadPriority;
+
+
+/* Stream descriptor. */
+typedef struct PaWasapiJackDescription
+{
+ unsigned long channelMapping;
+ unsigned long color; /* derived from macro: #define RGB(r,g,b) ((COLORREF)(((BYTE)(r)|((WORD)((BYTE)(g))<<8))|(((DWORD)(BYTE)(b))<<16))) */
+ PaWasapiJackConnectionType connectionType;
+ PaWasapiJackGeoLocation geoLocation;
+ PaWasapiJackGenLocation genLocation;
+ PaWasapiJackPortConnection portConnection;
+ unsigned int isConnected;
+}
+PaWasapiJackDescription;
+
+
+/* Stream category.
+ Note:
+ - values are equal to WASAPI AUDIO_STREAM_CATEGORY enum
+ - supported since Windows 8.0, noop on earler versions
+ - values 1,2 are deprecated on Windows 10 and not included into enumeration
+*/
+typedef enum PaWasapiStreamCategory
+{
+ eAudioCategoryOther = 0,
+ eAudioCategoryCommunications = 3,
+ eAudioCategoryAlerts = 4,
+ eAudioCategorySoundEffects = 5,
+ eAudioCategoryGameEffects = 6,
+ eAudioCategoryGameMedia = 7,
+ eAudioCategoryGameChat = 8,
+ eAudioCategorySpeech = 9,
+ eAudioCategoryMovie = 10,
+ eAudioCategoryMedia = 11
+}
+PaWasapiStreamCategory;
+
+
+/* Stream option.
+ Note:
+ - values are equal to WASAPI AUDCLNT_STREAMOPTIONS enum
+ - supported since Windows 8.1, noop on earler versions
+*/
+typedef enum PaWasapiStreamOption
+{
+ eStreamOptionNone = 0, //!< default
+ eStreamOptionRaw = 1, //!< bypass WASAPI Audio Engine DSP effects, supported since Windows 8.1
+ eStreamOptionMatchFormat = 2 //!< force WASAPI Audio Engine into a stream format, supported since Windows 10
+}
+PaWasapiStreamOption;
+
+
+/* Stream descriptor. */
+typedef struct PaWasapiStreamInfo
+{
+ unsigned long size; /**< sizeof(PaWasapiStreamInfo) */
+ PaHostApiTypeId hostApiType; /**< paWASAPI */
+ unsigned long version; /**< 1 */
+
+ unsigned long flags; /**< collection of PaWasapiFlags */
+
+ /* Support for WAVEFORMATEXTENSIBLE channel masks. If flags contains
+ paWinWasapiUseChannelMask this allows you to specify which speakers
+ to address in a multichannel stream. Constants for channelMask
+ are specified in pa_win_waveformat.h. Will be used only if
+ paWinWasapiUseChannelMask flag is specified.
+ */
+ PaWinWaveFormatChannelMask channelMask;
+
+ /* Delivers raw data to callback obtained from GetBuffer() methods skipping
+ internal PortAudio processing inventory completely. userData parameter will
+ be the same that was passed to Pa_OpenStream method. Will be used only if
+ paWinWasapiRedirectHostProcessor flag is specified.
+ */
+ PaWasapiHostProcessorCallback hostProcessorOutput;
+ PaWasapiHostProcessorCallback hostProcessorInput;
+
+ /* Specifies thread priority explicitly. Will be used only if paWinWasapiThreadPriority flag
+ is specified.
+
+ Please note, if Input/Output streams are opened simultaniously (Full-Duplex mode)
+ you shall specify same value for threadPriority or othervise one of the values will be used
+ to setup thread priority.
+ */
+ PaWasapiThreadPriority threadPriority;
+
+ /* Stream category. */
+ PaWasapiStreamCategory streamCategory;
+
+ /* Stream option. */
+ PaWasapiStreamOption streamOption;
+}
+PaWasapiStreamInfo;
+
+
+/** Returns default sound format for device. Format is represented by PaWinWaveFormat or
+ WAVEFORMATEXTENSIBLE structure.
+
+ @param pFormat Pointer to PaWinWaveFormat or WAVEFORMATEXTENSIBLE structure.
+ @param nFormatSize Size of PaWinWaveFormat or WAVEFORMATEXTENSIBLE structure in bytes.
+ @param nDevice Device index.
+
+ @return Non-negative value indicating the number of bytes copied into format decriptor
+ or, a PaErrorCode (which are always negative) if PortAudio is not initialized
+ or an error is encountered.
+*/
+int PaWasapi_GetDeviceDefaultFormat( void *pFormat, unsigned int nFormatSize, PaDeviceIndex nDevice );
+
+
+/** Returns device role (PaWasapiDeviceRole enum).
+
+ @param nDevice device index.
+
+ @return Non-negative value indicating device role or, a PaErrorCode (which are always negative)
+ if PortAudio is not initialized or an error is encountered.
+*/
+int/*PaWasapiDeviceRole*/ PaWasapi_GetDeviceRole( PaDeviceIndex nDevice );
+
+
+/** Boost thread priority of calling thread (MMCSS). Use it for Blocking Interface only for thread
+ which makes calls to Pa_WriteStream/Pa_ReadStream.
+
+ @param hTask Handle to pointer to priority task. Must be used with PaWasapi_RevertThreadPriority
+ method to revert thread priority to initial state.
+
+ @param nPriorityClass Id of thread priority of PaWasapiThreadPriority type. Specifying
+ eThreadPriorityNone does nothing.
+
+ @return Error code indicating success or failure.
+ @see PaWasapi_RevertThreadPriority
+*/
+PaError PaWasapi_ThreadPriorityBoost( void **hTask, PaWasapiThreadPriority nPriorityClass );
+
+
+/** Boost thread priority of calling thread (MMCSS). Use it for Blocking Interface only for thread
+ which makes calls to Pa_WriteStream/Pa_ReadStream.
+
+ @param hTask Task handle obtained by PaWasapi_BoostThreadPriority method.
+ @return Error code indicating success or failure.
+ @see PaWasapi_BoostThreadPriority
+*/
+PaError PaWasapi_ThreadPriorityRevert( void *hTask );
+
+
+/** Get number of frames per host buffer. This is maximal value of frames of WASAPI buffer which
+ can be locked for operations. Use this method as helper to findout maximal values of
+ inputFrames/outputFrames of PaWasapiHostProcessorCallback.
+
+ @param pStream Pointer to PaStream to query.
+ @param nInput Pointer to variable to receive number of input frames. Can be NULL.
+ @param nOutput Pointer to variable to receive number of output frames. Can be NULL.
+ @return Error code indicating success or failure.
+ @see PaWasapiHostProcessorCallback
+*/
+PaError PaWasapi_GetFramesPerHostBuffer( PaStream *pStream, unsigned int *nInput, unsigned int *nOutput );
+
+
+/** Get number of jacks associated with a WASAPI device. Use this method to determine if
+ there are any jacks associated with the provided WASAPI device. Not all audio devices
+ will support this capability. This is valid for both input and output devices.
+ @param nDevice device index.
+ @param jcount Number of jacks is returned in this variable
+ @return Error code indicating success or failure
+ @see PaWasapi_GetJackDescription
+ */
+PaError PaWasapi_GetJackCount(PaDeviceIndex nDevice, int *jcount);
+
+
+/** Get the jack description associated with a WASAPI device and jack number
+ Before this function is called, use PaWasapi_GetJackCount to determine the
+ number of jacks associated with device. If jcount is greater than zero, then
+ each jack from 0 to jcount can be queried with this function to get the jack
+ description.
+ @param nDevice device index.
+ @param jindex Which jack to return information
+ @param KSJACK_DESCRIPTION This structure filled in on success.
+ @return Error code indicating success or failure
+ @see PaWasapi_GetJackCount
+ */
+PaError PaWasapi_GetJackDescription(PaDeviceIndex nDevice, int jindex, PaWasapiJackDescription *pJackDescription);
+
+
+/*
+ IMPORTANT:
+
+ WASAPI is implemented for Callback and Blocking interfaces. It supports Shared and Exclusive
+ share modes.
+
+ Exclusive Mode:
+
+ Exclusive mode allows to deliver audio data directly to hardware bypassing
+ software mixing.
+ Exclusive mode is specified by 'paWinWasapiExclusive' flag.
+
+ Callback Interface:
+
+ Provides best audio quality with low latency. Callback interface is implemented in
+ two versions:
+
+ 1) Event-Driven:
+ This is the most powerful WASAPI implementation which provides glitch-free
+ audio at around 3ms latency in Exclusive mode. Lowest possible latency for this mode is
+ 3 ms for HD Audio class audio chips. For the Shared mode latency can not be
+ lower than 20 ms.
+
+ 2) Poll-Driven:
+ Polling is another 2-nd method to operate with WASAPI. It is less efficient than Event-Driven
+ and provides latency at around 10-13ms. Polling must be used to overcome a system bug
+ under Windows Vista x64 when application is WOW64(32-bit) and Event-Driven method simply
+ times out (event handle is never signalled on buffer completion). Please note, such WOW64 bug
+ does not exist in Vista x86 or Windows 7.
+ Polling can be setup by speciying 'paWinWasapiPolling' flag. Our WASAPI implementation detects
+ WOW64 bug and sets 'paWinWasapiPolling' automatically.
+
+ Thread priority:
+
+ Normally thread priority is set automatically and does not require modification. Although
+ if user wants some tweaking thread priority can be modified by setting 'paWinWasapiThreadPriority'
+ flag and specifying 'PaWasapiStreamInfo::threadPriority' with value from PaWasapiThreadPriority
+ enum.
+
+ Blocking Interface:
+
+ Blocking interface is implemented but due to above described Poll-Driven method can not
+ deliver lowest possible latency. Specifying too low latency in Shared mode will result in
+ distorted audio although Exclusive mode adds stability.
+
+ Pa_IsFormatSupported:
+
+ To check format with correct Share Mode (Exclusive/Shared) you must supply
+ PaWasapiStreamInfo with flags paWinWasapiExclusive set through member of
+ PaStreamParameters::hostApiSpecificStreamInfo structure.
+
+ Pa_OpenStream:
+
+ To set desired Share Mode (Exclusive/Shared) you must supply
+ PaWasapiStreamInfo with flags paWinWasapiExclusive set through member of
+ PaStreamParameters::hostApiSpecificStreamInfo structure.
+*/
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* PA_WIN_WASAPI_H */
-#ifndef PA_WIN_WAVEFORMAT_H\r
-#define PA_WIN_WAVEFORMAT_H\r
-\r
-/*\r
- * PortAudio Portable Real-Time Audio Library\r
- * Windows WAVEFORMAT* data structure utilities\r
- * portaudio.h should be included before this file.\r
- *\r
- * Copyright (c) 2007 Ross Bencina\r
- *\r
- * Permission is hereby granted, free of charge, to any person obtaining\r
- * a copy of this software and associated documentation files\r
- * (the "Software"), to deal in the Software without restriction,\r
- * including without limitation the rights to use, copy, modify, merge,\r
- * publish, distribute, sublicense, and/or sell copies of the Software,\r
- * and to permit persons to whom the Software is furnished to do so,\r
- * subject to the following conditions:\r
- *\r
- * The above copyright notice and this permission notice shall be\r
- * included in all copies or substantial portions of the Software.\r
- *\r
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\r
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\r
- * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\r
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\r
- * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
- */\r
-\r
-/*\r
- * The text above constitutes the entire PortAudio license; however, \r
- * the PortAudio community also makes the following non-binding requests:\r
- *\r
- * Any person wishing to distribute modifications to the Software is\r
- * requested to send the modifications to the original developer so that\r
- * they can be incorporated into the canonical version. It is also \r
- * requested that these non-binding requests be included along with the \r
- * license above.\r
- */\r
-\r
-/** @file\r
- @ingroup public_header\r
- @brief Windows specific PortAudio API extension and utilities header file.\r
-*/\r
-\r
-#ifdef __cplusplus\r
-extern "C" {\r
-#endif\r
-\r
-/*\r
- The following #defines for speaker channel masks are the same\r
- as those in ksmedia.h, except with PAWIN_ prepended, KSAUDIO_ removed\r
- in some cases, and casts to PaWinWaveFormatChannelMask added.\r
-*/\r
-\r
-typedef unsigned long PaWinWaveFormatChannelMask;\r
-\r
-/* Speaker Positions: */\r
-#define PAWIN_SPEAKER_FRONT_LEFT ((PaWinWaveFormatChannelMask)0x1)\r
-#define PAWIN_SPEAKER_FRONT_RIGHT ((PaWinWaveFormatChannelMask)0x2)\r
-#define PAWIN_SPEAKER_FRONT_CENTER ((PaWinWaveFormatChannelMask)0x4)\r
-#define PAWIN_SPEAKER_LOW_FREQUENCY ((PaWinWaveFormatChannelMask)0x8)\r
-#define PAWIN_SPEAKER_BACK_LEFT ((PaWinWaveFormatChannelMask)0x10)\r
-#define PAWIN_SPEAKER_BACK_RIGHT ((PaWinWaveFormatChannelMask)0x20)\r
-#define PAWIN_SPEAKER_FRONT_LEFT_OF_CENTER ((PaWinWaveFormatChannelMask)0x40)\r
-#define PAWIN_SPEAKER_FRONT_RIGHT_OF_CENTER ((PaWinWaveFormatChannelMask)0x80)\r
-#define PAWIN_SPEAKER_BACK_CENTER ((PaWinWaveFormatChannelMask)0x100)\r
-#define PAWIN_SPEAKER_SIDE_LEFT ((PaWinWaveFormatChannelMask)0x200)\r
-#define PAWIN_SPEAKER_SIDE_RIGHT ((PaWinWaveFormatChannelMask)0x400)\r
-#define PAWIN_SPEAKER_TOP_CENTER ((PaWinWaveFormatChannelMask)0x800)\r
-#define PAWIN_SPEAKER_TOP_FRONT_LEFT ((PaWinWaveFormatChannelMask)0x1000)\r
-#define PAWIN_SPEAKER_TOP_FRONT_CENTER ((PaWinWaveFormatChannelMask)0x2000)\r
-#define PAWIN_SPEAKER_TOP_FRONT_RIGHT ((PaWinWaveFormatChannelMask)0x4000)\r
-#define PAWIN_SPEAKER_TOP_BACK_LEFT ((PaWinWaveFormatChannelMask)0x8000)\r
-#define PAWIN_SPEAKER_TOP_BACK_CENTER ((PaWinWaveFormatChannelMask)0x10000)\r
-#define PAWIN_SPEAKER_TOP_BACK_RIGHT ((PaWinWaveFormatChannelMask)0x20000)\r
-\r
-/* Bit mask locations reserved for future use */\r
-#define PAWIN_SPEAKER_RESERVED ((PaWinWaveFormatChannelMask)0x7FFC0000)\r
-\r
-/* Used to specify that any possible permutation of speaker configurations */\r
-#define PAWIN_SPEAKER_ALL ((PaWinWaveFormatChannelMask)0x80000000)\r
-\r
-/* DirectSound Speaker Config */\r
-#define PAWIN_SPEAKER_DIRECTOUT 0\r
-#define PAWIN_SPEAKER_MONO (PAWIN_SPEAKER_FRONT_CENTER)\r
-#define PAWIN_SPEAKER_STEREO (PAWIN_SPEAKER_FRONT_LEFT | PAWIN_SPEAKER_FRONT_RIGHT)\r
-#define PAWIN_SPEAKER_QUAD (PAWIN_SPEAKER_FRONT_LEFT | PAWIN_SPEAKER_FRONT_RIGHT | \\r
- PAWIN_SPEAKER_BACK_LEFT | PAWIN_SPEAKER_BACK_RIGHT)\r
-#define PAWIN_SPEAKER_SURROUND (PAWIN_SPEAKER_FRONT_LEFT | PAWIN_SPEAKER_FRONT_RIGHT | \\r
- PAWIN_SPEAKER_FRONT_CENTER | PAWIN_SPEAKER_BACK_CENTER)\r
-#define PAWIN_SPEAKER_5POINT1 (PAWIN_SPEAKER_FRONT_LEFT | PAWIN_SPEAKER_FRONT_RIGHT | \\r
- PAWIN_SPEAKER_FRONT_CENTER | PAWIN_SPEAKER_LOW_FREQUENCY | \\r
- PAWIN_SPEAKER_BACK_LEFT | PAWIN_SPEAKER_BACK_RIGHT)\r
-#define PAWIN_SPEAKER_7POINT1 (PAWIN_SPEAKER_FRONT_LEFT | PAWIN_SPEAKER_FRONT_RIGHT | \\r
- PAWIN_SPEAKER_FRONT_CENTER | PAWIN_SPEAKER_LOW_FREQUENCY | \\r
- PAWIN_SPEAKER_BACK_LEFT | PAWIN_SPEAKER_BACK_RIGHT | \\r
- PAWIN_SPEAKER_FRONT_LEFT_OF_CENTER | PAWIN_SPEAKER_FRONT_RIGHT_OF_CENTER)\r
-#define PAWIN_SPEAKER_5POINT1_SURROUND (PAWIN_SPEAKER_FRONT_LEFT | PAWIN_SPEAKER_FRONT_RIGHT | \\r
- PAWIN_SPEAKER_FRONT_CENTER | PAWIN_SPEAKER_LOW_FREQUENCY | \\r
- PAWIN_SPEAKER_SIDE_LEFT | PAWIN_SPEAKER_SIDE_RIGHT)\r
-#define PAWIN_SPEAKER_7POINT1_SURROUND (PAWIN_SPEAKER_FRONT_LEFT | PAWIN_SPEAKER_FRONT_RIGHT | \\r
- PAWIN_SPEAKER_FRONT_CENTER | PAWIN_SPEAKER_LOW_FREQUENCY | \\r
- PAWIN_SPEAKER_BACK_LEFT | PAWIN_SPEAKER_BACK_RIGHT | \\r
- PAWIN_SPEAKER_SIDE_LEFT | PAWIN_SPEAKER_SIDE_RIGHT)\r
-/*\r
- According to the Microsoft documentation:\r
- The following are obsolete 5.1 and 7.1 settings (they lack side speakers). Note this means\r
- that the default 5.1 and 7.1 settings (KSAUDIO_SPEAKER_5POINT1 and KSAUDIO_SPEAKER_7POINT1 are\r
- similarly obsolete but are unchanged for compatibility reasons).\r
-*/\r
-#define PAWIN_SPEAKER_5POINT1_BACK PAWIN_SPEAKER_5POINT1\r
-#define PAWIN_SPEAKER_7POINT1_WIDE PAWIN_SPEAKER_7POINT1\r
-\r
-/* DVD Speaker Positions */\r
-#define PAWIN_SPEAKER_GROUND_FRONT_LEFT PAWIN_SPEAKER_FRONT_LEFT\r
-#define PAWIN_SPEAKER_GROUND_FRONT_CENTER PAWIN_SPEAKER_FRONT_CENTER\r
-#define PAWIN_SPEAKER_GROUND_FRONT_RIGHT PAWIN_SPEAKER_FRONT_RIGHT\r
-#define PAWIN_SPEAKER_GROUND_REAR_LEFT PAWIN_SPEAKER_BACK_LEFT\r
-#define PAWIN_SPEAKER_GROUND_REAR_RIGHT PAWIN_SPEAKER_BACK_RIGHT\r
-#define PAWIN_SPEAKER_TOP_MIDDLE PAWIN_SPEAKER_TOP_CENTER\r
-#define PAWIN_SPEAKER_SUPER_WOOFER PAWIN_SPEAKER_LOW_FREQUENCY\r
-\r
-\r
-/*\r
- PaWinWaveFormat is defined here to provide compatibility with\r
- compilation environments which don't have headers defining \r
- WAVEFORMATEXTENSIBLE (e.g. older versions of MSVC, Borland C++ etc.\r
-\r
- The fields for WAVEFORMATEX and WAVEFORMATEXTENSIBLE are declared as an\r
- unsigned char array here to avoid clients who include this file having \r
- a dependency on windows.h and mmsystem.h, and also to to avoid having\r
- to write separate packing pragmas for each compiler.\r
-*/\r
-#define PAWIN_SIZEOF_WAVEFORMATEX 18\r
-#define PAWIN_SIZEOF_WAVEFORMATEXTENSIBLE (PAWIN_SIZEOF_WAVEFORMATEX + 22)\r
-\r
-typedef struct{\r
- unsigned char fields[ PAWIN_SIZEOF_WAVEFORMATEXTENSIBLE ];\r
- unsigned long extraLongForAlignment; /* ensure that compiler aligns struct to DWORD */ \r
-} PaWinWaveFormat;\r
-\r
-/*\r
- WAVEFORMATEXTENSIBLE fields:\r
- \r
- union {\r
- WORD wValidBitsPerSample; \r
- WORD wSamplesPerBlock; \r
- WORD wReserved; \r
- } Samples;\r
- DWORD dwChannelMask; \r
- GUID SubFormat;\r
-*/\r
-\r
-#define PAWIN_INDEXOF_WVALIDBITSPERSAMPLE (PAWIN_SIZEOF_WAVEFORMATEX+0)\r
-#define PAWIN_INDEXOF_DWCHANNELMASK (PAWIN_SIZEOF_WAVEFORMATEX+2)\r
-#define PAWIN_INDEXOF_SUBFORMAT (PAWIN_SIZEOF_WAVEFORMATEX+6)\r
-\r
-\r
-/*\r
- Valid values to pass for the waveFormatTag PaWin_InitializeWaveFormatEx and\r
- PaWin_InitializeWaveFormatExtensible functions below. These must match\r
- the standard Windows WAVE_FORMAT_* values.\r
-*/\r
-#define PAWIN_WAVE_FORMAT_PCM (1)\r
-#define PAWIN_WAVE_FORMAT_IEEE_FLOAT (3)\r
-#define PAWIN_WAVE_FORMAT_DOLBY_AC3_SPDIF (0x0092)\r
-#define PAWIN_WAVE_FORMAT_WMA_SPDIF (0x0164)\r
-\r
-\r
-/*\r
- returns PAWIN_WAVE_FORMAT_PCM or PAWIN_WAVE_FORMAT_IEEE_FLOAT\r
- depending on the sampleFormat parameter.\r
-*/\r
-int PaWin_SampleFormatToLinearWaveFormatTag( PaSampleFormat sampleFormat );\r
-\r
-/*\r
- Use the following two functions to initialize the waveformat structure.\r
-*/\r
-\r
-void PaWin_InitializeWaveFormatEx( PaWinWaveFormat *waveFormat, \r
- int numChannels, PaSampleFormat sampleFormat, int waveFormatTag, double sampleRate );\r
-\r
-\r
-void PaWin_InitializeWaveFormatExtensible( PaWinWaveFormat *waveFormat, \r
- int numChannels, PaSampleFormat sampleFormat, int waveFormatTag, double sampleRate,\r
- PaWinWaveFormatChannelMask channelMask );\r
-\r
-\r
-/* Map a channel count to a speaker channel mask */\r
-PaWinWaveFormatChannelMask PaWin_DefaultChannelMask( int numChannels );\r
-\r
-\r
-#ifdef __cplusplus\r
-}\r
-#endif /* __cplusplus */\r
-\r
+#ifndef PA_WIN_WAVEFORMAT_H
+#define PA_WIN_WAVEFORMAT_H
+
+/*
+ * PortAudio Portable Real-Time Audio Library
+ * Windows WAVEFORMAT* data structure utilities
+ * portaudio.h should be included before this file.
+ *
+ * Copyright (c) 2007 Ross Bencina
+ *
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * The text above constitutes the entire PortAudio license; however,
+ * the PortAudio community also makes the following non-binding requests:
+ *
+ * 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. It is also
+ * requested that these non-binding requests be included along with the
+ * license above.
+ */
+
+/** @file
+ @ingroup public_header
+ @brief Windows specific PortAudio API extension and utilities header file.
+*/
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ The following #defines for speaker channel masks are the same
+ as those in ksmedia.h, except with PAWIN_ prepended, KSAUDIO_ removed
+ in some cases, and casts to PaWinWaveFormatChannelMask added.
+*/
+
+typedef unsigned long PaWinWaveFormatChannelMask;
+
+/* Speaker Positions: */
+#define PAWIN_SPEAKER_FRONT_LEFT ((PaWinWaveFormatChannelMask)0x1)
+#define PAWIN_SPEAKER_FRONT_RIGHT ((PaWinWaveFormatChannelMask)0x2)
+#define PAWIN_SPEAKER_FRONT_CENTER ((PaWinWaveFormatChannelMask)0x4)
+#define PAWIN_SPEAKER_LOW_FREQUENCY ((PaWinWaveFormatChannelMask)0x8)
+#define PAWIN_SPEAKER_BACK_LEFT ((PaWinWaveFormatChannelMask)0x10)
+#define PAWIN_SPEAKER_BACK_RIGHT ((PaWinWaveFormatChannelMask)0x20)
+#define PAWIN_SPEAKER_FRONT_LEFT_OF_CENTER ((PaWinWaveFormatChannelMask)0x40)
+#define PAWIN_SPEAKER_FRONT_RIGHT_OF_CENTER ((PaWinWaveFormatChannelMask)0x80)
+#define PAWIN_SPEAKER_BACK_CENTER ((PaWinWaveFormatChannelMask)0x100)
+#define PAWIN_SPEAKER_SIDE_LEFT ((PaWinWaveFormatChannelMask)0x200)
+#define PAWIN_SPEAKER_SIDE_RIGHT ((PaWinWaveFormatChannelMask)0x400)
+#define PAWIN_SPEAKER_TOP_CENTER ((PaWinWaveFormatChannelMask)0x800)
+#define PAWIN_SPEAKER_TOP_FRONT_LEFT ((PaWinWaveFormatChannelMask)0x1000)
+#define PAWIN_SPEAKER_TOP_FRONT_CENTER ((PaWinWaveFormatChannelMask)0x2000)
+#define PAWIN_SPEAKER_TOP_FRONT_RIGHT ((PaWinWaveFormatChannelMask)0x4000)
+#define PAWIN_SPEAKER_TOP_BACK_LEFT ((PaWinWaveFormatChannelMask)0x8000)
+#define PAWIN_SPEAKER_TOP_BACK_CENTER ((PaWinWaveFormatChannelMask)0x10000)
+#define PAWIN_SPEAKER_TOP_BACK_RIGHT ((PaWinWaveFormatChannelMask)0x20000)
+
+/* Bit mask locations reserved for future use */
+#define PAWIN_SPEAKER_RESERVED ((PaWinWaveFormatChannelMask)0x7FFC0000)
+
+/* Used to specify that any possible permutation of speaker configurations */
+#define PAWIN_SPEAKER_ALL ((PaWinWaveFormatChannelMask)0x80000000)
+
+/* DirectSound Speaker Config */
+#define PAWIN_SPEAKER_DIRECTOUT 0
+#define PAWIN_SPEAKER_MONO (PAWIN_SPEAKER_FRONT_CENTER)
+#define PAWIN_SPEAKER_STEREO (PAWIN_SPEAKER_FRONT_LEFT | PAWIN_SPEAKER_FRONT_RIGHT)
+#define PAWIN_SPEAKER_QUAD (PAWIN_SPEAKER_FRONT_LEFT | PAWIN_SPEAKER_FRONT_RIGHT | \
+ PAWIN_SPEAKER_BACK_LEFT | PAWIN_SPEAKER_BACK_RIGHT)
+#define PAWIN_SPEAKER_SURROUND (PAWIN_SPEAKER_FRONT_LEFT | PAWIN_SPEAKER_FRONT_RIGHT | \
+ PAWIN_SPEAKER_FRONT_CENTER | PAWIN_SPEAKER_BACK_CENTER)
+#define PAWIN_SPEAKER_5POINT1 (PAWIN_SPEAKER_FRONT_LEFT | PAWIN_SPEAKER_FRONT_RIGHT | \
+ PAWIN_SPEAKER_FRONT_CENTER | PAWIN_SPEAKER_LOW_FREQUENCY | \
+ PAWIN_SPEAKER_BACK_LEFT | PAWIN_SPEAKER_BACK_RIGHT)
+#define PAWIN_SPEAKER_7POINT1 (PAWIN_SPEAKER_FRONT_LEFT | PAWIN_SPEAKER_FRONT_RIGHT | \
+ PAWIN_SPEAKER_FRONT_CENTER | PAWIN_SPEAKER_LOW_FREQUENCY | \
+ PAWIN_SPEAKER_BACK_LEFT | PAWIN_SPEAKER_BACK_RIGHT | \
+ PAWIN_SPEAKER_FRONT_LEFT_OF_CENTER | PAWIN_SPEAKER_FRONT_RIGHT_OF_CENTER)
+#define PAWIN_SPEAKER_5POINT1_SURROUND (PAWIN_SPEAKER_FRONT_LEFT | PAWIN_SPEAKER_FRONT_RIGHT | \
+ PAWIN_SPEAKER_FRONT_CENTER | PAWIN_SPEAKER_LOW_FREQUENCY | \
+ PAWIN_SPEAKER_SIDE_LEFT | PAWIN_SPEAKER_SIDE_RIGHT)
+#define PAWIN_SPEAKER_7POINT1_SURROUND (PAWIN_SPEAKER_FRONT_LEFT | PAWIN_SPEAKER_FRONT_RIGHT | \
+ PAWIN_SPEAKER_FRONT_CENTER | PAWIN_SPEAKER_LOW_FREQUENCY | \
+ PAWIN_SPEAKER_BACK_LEFT | PAWIN_SPEAKER_BACK_RIGHT | \
+ PAWIN_SPEAKER_SIDE_LEFT | PAWIN_SPEAKER_SIDE_RIGHT)
+/*
+ According to the Microsoft documentation:
+ The following are obsolete 5.1 and 7.1 settings (they lack side speakers). Note this means
+ that the default 5.1 and 7.1 settings (KSAUDIO_SPEAKER_5POINT1 and KSAUDIO_SPEAKER_7POINT1 are
+ similarly obsolete but are unchanged for compatibility reasons).
+*/
+#define PAWIN_SPEAKER_5POINT1_BACK PAWIN_SPEAKER_5POINT1
+#define PAWIN_SPEAKER_7POINT1_WIDE PAWIN_SPEAKER_7POINT1
+
+/* DVD Speaker Positions */
+#define PAWIN_SPEAKER_GROUND_FRONT_LEFT PAWIN_SPEAKER_FRONT_LEFT
+#define PAWIN_SPEAKER_GROUND_FRONT_CENTER PAWIN_SPEAKER_FRONT_CENTER
+#define PAWIN_SPEAKER_GROUND_FRONT_RIGHT PAWIN_SPEAKER_FRONT_RIGHT
+#define PAWIN_SPEAKER_GROUND_REAR_LEFT PAWIN_SPEAKER_BACK_LEFT
+#define PAWIN_SPEAKER_GROUND_REAR_RIGHT PAWIN_SPEAKER_BACK_RIGHT
+#define PAWIN_SPEAKER_TOP_MIDDLE PAWIN_SPEAKER_TOP_CENTER
+#define PAWIN_SPEAKER_SUPER_WOOFER PAWIN_SPEAKER_LOW_FREQUENCY
+
+
+/*
+ PaWinWaveFormat is defined here to provide compatibility with
+ compilation environments which don't have headers defining
+ WAVEFORMATEXTENSIBLE (e.g. older versions of MSVC, Borland C++ etc.
+
+ The fields for WAVEFORMATEX and WAVEFORMATEXTENSIBLE are declared as an
+ unsigned char array here to avoid clients who include this file having
+ a dependency on windows.h and mmsystem.h, and also to to avoid having
+ to write separate packing pragmas for each compiler.
+*/
+#define PAWIN_SIZEOF_WAVEFORMATEX 18
+#define PAWIN_SIZEOF_WAVEFORMATEXTENSIBLE (PAWIN_SIZEOF_WAVEFORMATEX + 22)
+
+typedef struct{
+ unsigned char fields[ PAWIN_SIZEOF_WAVEFORMATEXTENSIBLE ];
+ unsigned long extraLongForAlignment; /* ensure that compiler aligns struct to DWORD */
+} PaWinWaveFormat;
+
+/*
+ WAVEFORMATEXTENSIBLE fields:
+
+ union {
+ WORD wValidBitsPerSample;
+ WORD wSamplesPerBlock;
+ WORD wReserved;
+ } Samples;
+ DWORD dwChannelMask;
+ GUID SubFormat;
+*/
+
+#define PAWIN_INDEXOF_WVALIDBITSPERSAMPLE (PAWIN_SIZEOF_WAVEFORMATEX+0)
+#define PAWIN_INDEXOF_DWCHANNELMASK (PAWIN_SIZEOF_WAVEFORMATEX+2)
+#define PAWIN_INDEXOF_SUBFORMAT (PAWIN_SIZEOF_WAVEFORMATEX+6)
+
+
+/*
+ Valid values to pass for the waveFormatTag PaWin_InitializeWaveFormatEx and
+ PaWin_InitializeWaveFormatExtensible functions below. These must match
+ the standard Windows WAVE_FORMAT_* values.
+*/
+#define PAWIN_WAVE_FORMAT_PCM (1)
+#define PAWIN_WAVE_FORMAT_IEEE_FLOAT (3)
+#define PAWIN_WAVE_FORMAT_DOLBY_AC3_SPDIF (0x0092)
+#define PAWIN_WAVE_FORMAT_WMA_SPDIF (0x0164)
+
+
+/*
+ returns PAWIN_WAVE_FORMAT_PCM or PAWIN_WAVE_FORMAT_IEEE_FLOAT
+ depending on the sampleFormat parameter.
+*/
+int PaWin_SampleFormatToLinearWaveFormatTag( PaSampleFormat sampleFormat );
+
+/*
+ Use the following two functions to initialize the waveformat structure.
+*/
+
+void PaWin_InitializeWaveFormatEx( PaWinWaveFormat *waveFormat,
+ int numChannels, PaSampleFormat sampleFormat, int waveFormatTag, double sampleRate );
+
+
+void PaWin_InitializeWaveFormatExtensible( PaWinWaveFormat *waveFormat,
+ int numChannels, PaSampleFormat sampleFormat, int waveFormatTag, double sampleRate,
+ PaWinWaveFormatChannelMask channelMask );
+
+
+/* Map a channel count to a speaker channel mask */
+PaWinWaveFormatChannelMask PaWin_DefaultChannelMask( int numChannels );
+
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#endif /* PA_WIN_WAVEFORMAT_H */
\ No newline at end of file
-#include <math.h>\r
-#include <string.h>\r
-\r
-#include "biquad_filter.h"\r
-\r
-/**\r
- * Unit_BiquadFilter implements a second order IIR filter. \r
- Here is the equation that we use for this filter:\r
- y(n) = a0*x(n) + a1*x(n-1) + a2*x(n-2) - b1*y(n-1) - b2*y(n-2)\r
- *\r
- * @author (C) 2002 Phil Burk, SoftSynth.com, All Rights Reserved\r
- */\r
-\r
-#define FILTER_PI (3.141592653589793238462643)\r
-/***********************************************************\r
-** Calculate coefficients common to many parametric biquad filters.\r
-*/\r
-static void BiquadFilter_CalculateCommon( BiquadFilter *filter, double ratio, double Q )\r
-{\r
- double omega;\r
- \r
- memset( filter, 0, sizeof(BiquadFilter) );\r
-\r
-/* Don't let frequency get too close to Nyquist or filter will blow up. */\r
- if( ratio >= 0.499 ) ratio = 0.499; \r
- omega = 2.0 * (double)FILTER_PI * ratio;\r
-\r
- filter->cos_omega = (double) cos( omega );\r
- filter->sin_omega = (double) sin( omega );\r
- filter->alpha = filter->sin_omega / (2.0 * Q);\r
-}\r
-\r
-/*********************************************************************************\r
- ** Calculate coefficients for Highpass filter.\r
- */\r
-void BiquadFilter_SetupHighPass( BiquadFilter *filter, double ratio, double Q )\r
-{\r
- double scalar, opc;\r
- \r
- if( ratio < BIQUAD_MIN_RATIO ) ratio = BIQUAD_MIN_RATIO;\r
- if( Q < BIQUAD_MIN_Q ) Q = BIQUAD_MIN_Q;\r
- \r
- BiquadFilter_CalculateCommon( filter, ratio, Q );\r
- \r
- scalar = 1.0 / (1.0 + filter->alpha);\r
- opc = (1.0 + filter->cos_omega);\r
- \r
- filter->a0 = opc * 0.5 * scalar;\r
- filter->a1 = - opc * scalar;\r
- filter->a2 = filter->a0;\r
- filter->b1 = -2.0 * filter->cos_omega * scalar;\r
- filter->b2 = (1.0 - filter->alpha) * scalar;\r
-}\r
-\r
-\r
-/*********************************************************************************\r
- ** Calculate coefficients for Notch filter.\r
- */\r
-void BiquadFilter_SetupNotch( BiquadFilter *filter, double ratio, double Q )\r
-{\r
- double scalar, opc;\r
- \r
- if( ratio < BIQUAD_MIN_RATIO ) ratio = BIQUAD_MIN_RATIO;\r
- if( Q < BIQUAD_MIN_Q ) Q = BIQUAD_MIN_Q;\r
- \r
- BiquadFilter_CalculateCommon( filter, ratio, Q );\r
- \r
- scalar = 1.0 / (1.0 + filter->alpha);\r
- opc = (1.0 + filter->cos_omega);\r
- \r
- filter->a0 = scalar;\r
- filter->a1 = -2.0 * filter->cos_omega * scalar;\r
- filter->a2 = filter->a0;\r
- filter->b1 = filter->a1;\r
- filter->b2 = (1.0 - filter->alpha) * scalar;\r
-}\r
-\r
-/*****************************************************************\r
-** Perform core IIR filter calculation without permutation.\r
-*/\r
-void BiquadFilter_Filter( BiquadFilter *filter, float *inputs, float *outputs, int numSamples )\r
-{\r
- int i;\r
- double xn, yn;\r
- // Pull values from structure to speed up the calculation.\r
- double a0 = filter->a0;\r
- double a1 = filter->a1;\r
- double a2 = filter->a2;\r
- double b1 = filter->b1;\r
- double b2 = filter->b2;\r
- double xn1 = filter->xn1;\r
- double xn2 = filter->xn2;\r
- double yn1 = filter->yn1;\r
- double yn2 = filter->yn2;\r
-\r
- for( i=0; i<numSamples; i++)\r
- {\r
- // Generate outputs by filtering inputs.\r
- xn = inputs[i];\r
- yn = (a0 * xn) + (a1 * xn1) + (a2 * xn2) - (b1 * yn1) - (b2 * yn2);\r
- outputs[i] = yn;\r
-\r
- // Delay input and output values.\r
- xn2 = xn1;\r
- xn1 = xn;\r
- yn2 = yn1;\r
- yn1 = yn;\r
- \r
- if( (i & 7) == 0 )\r
- {\r
- // Apply a small bipolar impulse to filter to prevent arithmetic underflow.\r
- // Underflows can cause the FPU to interrupt the CPU.\r
- yn1 += (double) 1.0E-26;\r
- yn2 -= (double) 1.0E-26;\r
- }\r
- }\r
- \r
- filter->xn1 = xn1;\r
- filter->xn2 = xn2;\r
- filter->yn1 = yn1;\r
- filter->yn2 = yn2; \r
+#include <math.h>
+#include <string.h>
+
+#include "biquad_filter.h"
+
+/**
+ * Unit_BiquadFilter implements a second order IIR filter.
+ Here is the equation that we use for this filter:
+ y(n) = a0*x(n) + a1*x(n-1) + a2*x(n-2) - b1*y(n-1) - b2*y(n-2)
+ *
+ * @author (C) 2002 Phil Burk, SoftSynth.com, All Rights Reserved
+ */
+
+#define FILTER_PI (3.141592653589793238462643)
+/***********************************************************
+** Calculate coefficients common to many parametric biquad filters.
+*/
+static void BiquadFilter_CalculateCommon( BiquadFilter *filter, double ratio, double Q )
+{
+ double omega;
+
+ memset( filter, 0, sizeof(BiquadFilter) );
+
+/* Don't let frequency get too close to Nyquist or filter will blow up. */
+ if( ratio >= 0.499 ) ratio = 0.499;
+ omega = 2.0 * (double)FILTER_PI * ratio;
+
+ filter->cos_omega = (double) cos( omega );
+ filter->sin_omega = (double) sin( omega );
+ filter->alpha = filter->sin_omega / (2.0 * Q);
+}
+
+/*********************************************************************************
+ ** Calculate coefficients for Highpass filter.
+ */
+void BiquadFilter_SetupHighPass( BiquadFilter *filter, double ratio, double Q )
+{
+ double scalar, opc;
+
+ if( ratio < BIQUAD_MIN_RATIO ) ratio = BIQUAD_MIN_RATIO;
+ if( Q < BIQUAD_MIN_Q ) Q = BIQUAD_MIN_Q;
+
+ BiquadFilter_CalculateCommon( filter, ratio, Q );
+
+ scalar = 1.0 / (1.0 + filter->alpha);
+ opc = (1.0 + filter->cos_omega);
+
+ filter->a0 = opc * 0.5 * scalar;
+ filter->a1 = - opc * scalar;
+ filter->a2 = filter->a0;
+ filter->b1 = -2.0 * filter->cos_omega * scalar;
+ filter->b2 = (1.0 - filter->alpha) * scalar;
+}
+
+
+/*********************************************************************************
+ ** Calculate coefficients for Notch filter.
+ */
+void BiquadFilter_SetupNotch( BiquadFilter *filter, double ratio, double Q )
+{
+ double scalar, opc;
+
+ if( ratio < BIQUAD_MIN_RATIO ) ratio = BIQUAD_MIN_RATIO;
+ if( Q < BIQUAD_MIN_Q ) Q = BIQUAD_MIN_Q;
+
+ BiquadFilter_CalculateCommon( filter, ratio, Q );
+
+ scalar = 1.0 / (1.0 + filter->alpha);
+ opc = (1.0 + filter->cos_omega);
+
+ filter->a0 = scalar;
+ filter->a1 = -2.0 * filter->cos_omega * scalar;
+ filter->a2 = filter->a0;
+ filter->b1 = filter->a1;
+ filter->b2 = (1.0 - filter->alpha) * scalar;
+}
+
+/*****************************************************************
+** Perform core IIR filter calculation without permutation.
+*/
+void BiquadFilter_Filter( BiquadFilter *filter, float *inputs, float *outputs, int numSamples )
+{
+ int i;
+ double xn, yn;
+ // Pull values from structure to speed up the calculation.
+ double a0 = filter->a0;
+ double a1 = filter->a1;
+ double a2 = filter->a2;
+ double b1 = filter->b1;
+ double b2 = filter->b2;
+ double xn1 = filter->xn1;
+ double xn2 = filter->xn2;
+ double yn1 = filter->yn1;
+ double yn2 = filter->yn2;
+
+ for( i=0; i<numSamples; i++)
+ {
+ // Generate outputs by filtering inputs.
+ xn = inputs[i];
+ yn = (a0 * xn) + (a1 * xn1) + (a2 * xn2) - (b1 * yn1) - (b2 * yn2);
+ outputs[i] = yn;
+
+ // Delay input and output values.
+ xn2 = xn1;
+ xn1 = xn;
+ yn2 = yn1;
+ yn1 = yn;
+
+ if( (i & 7) == 0 )
+ {
+ // Apply a small bipolar impulse to filter to prevent arithmetic underflow.
+ // Underflows can cause the FPU to interrupt the CPU.
+ yn1 += (double) 1.0E-26;
+ yn2 -= (double) 1.0E-26;
+ }
+ }
+
+ filter->xn1 = xn1;
+ filter->xn2 = xn2;
+ filter->yn1 = yn1;
+ filter->yn2 = yn2;
}
\ No newline at end of file
-#ifndef _BIQUADFILTER_H\r
-#define _BIQUADFILTER_H\r
-\r
-\r
-/**\r
- * Unit_BiquadFilter implements a second order IIR filter. \r
- *\r
- * @author (C) 2002 Phil Burk, SoftSynth.com, All Rights Reserved\r
- */\r
-\r
-#define BIQUAD_MIN_RATIO (0.000001)\r
-#define BIQUAD_MIN_Q (0.00001)\r
-\r
-typedef struct BiquadFilter_s\r
-{\r
- double xn1; // storage for delayed signals\r
- double xn2;\r
- double yn1;\r
- double yn2;\r
-\r
- double a0; // coefficients\r
- double a1;\r
- double a2;\r
-\r
- double b1;\r
- double b2;\r
-\r
- double cos_omega;\r
- double sin_omega;\r
- double alpha;\r
-} BiquadFilter;\r
-\r
-void BiquadFilter_SetupHighPass( BiquadFilter *filter, double ratio, double Q );\r
-void BiquadFilter_SetupNotch( BiquadFilter *filter, double ratio, double Q );\r
-\r
-void BiquadFilter_Filter( BiquadFilter *filter, float *inputs, float *outputs, int numSamples );\r
-\r
-#endif\r
+#ifndef _BIQUADFILTER_H
+#define _BIQUADFILTER_H
+
+
+/**
+ * Unit_BiquadFilter implements a second order IIR filter.
+ *
+ * @author (C) 2002 Phil Burk, SoftSynth.com, All Rights Reserved
+ */
+
+#define BIQUAD_MIN_RATIO (0.000001)
+#define BIQUAD_MIN_Q (0.00001)
+
+typedef struct BiquadFilter_s
+{
+ double xn1; // storage for delayed signals
+ double xn2;
+ double yn1;
+ double yn2;
+
+ double a0; // coefficients
+ double a1;
+ double a2;
+
+ double b1;
+ double b2;
+
+ double cos_omega;
+ double sin_omega;
+ double alpha;
+} BiquadFilter;
+
+void BiquadFilter_SetupHighPass( BiquadFilter *filter, double ratio, double Q );
+void BiquadFilter_SetupNotch( BiquadFilter *filter, double ratio, double Q );
+
+void BiquadFilter_Filter( BiquadFilter *filter, float *inputs, float *outputs, int numSamples );
+
+#endif
-\r
-/*\r
- * PortAudio Portable Real-Time Audio Library\r
- * Latest Version at: http://www.portaudio.com\r
- *\r
- * Copyright (c) 1999-2010 Phil Burk and Ross Bencina\r
- *\r
- * Permission is hereby granted, free of charge, to any person obtaining\r
- * a copy of this software and associated documentation files\r
- * (the "Software"), to deal in the Software without restriction,\r
- * including without limitation the rights to use, copy, modify, merge,\r
- * publish, distribute, sublicense, and/or sell copies of the Software,\r
- * and to permit persons to whom the Software is furnished to do so,\r
- * subject to the following conditions:\r
- *\r
- * The above copyright notice and this permission notice shall be\r
- * included in all copies or substantial portions of the Software.\r
- *\r
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\r
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\r
- * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\r
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\r
- * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
- */\r
-\r
-/*\r
- * The text above constitutes the entire PortAudio license; however, \r
- * the PortAudio community also makes the following non-binding requests:\r
- *\r
- * Any person wishing to distribute modifications to the Software is\r
- * requested to send the modifications to the original developer so that\r
- * they can be incorporated into the canonical version. It is also \r
- * requested that these non-binding requests be included along with the \r
- * license above.\r
- */\r
-\r
-#ifndef _QA_TOOLS_H\r
-#define _QA_TOOLS_H\r
-\r
-extern int g_testsPassed;\r
-extern int g_testsFailed;\r
-\r
-#define QA_ASSERT_TRUE( message, flag ) \\r
- if( !(flag) ) \\r
- { \\r
- printf( "%s:%d - ERROR - %s\n", __FILE__, __LINE__, message ); \\r
- g_testsFailed++; \\r
- goto error; \\r
- } \\r
- else g_testsPassed++;\r
-\r
-\r
-#define QA_ASSERT_EQUALS( message, expected, actual ) \\r
- if( ((expected) != (actual)) ) \\r
- { \\r
- printf( "%s:%d - ERROR - %s, expected %d, got %d\n", __FILE__, __LINE__, message, expected, actual ); \\r
- g_testsFailed++; \\r
- goto error; \\r
- } \\r
- else g_testsPassed++;\r
-\r
-#define QA_ASSERT_CLOSE( message, expected, actual, tolerance ) \\r
- if (fabs((expected)-(actual))>(tolerance)) \\r
- { \\r
- printf( "%s:%d - ERROR - %s, expected %f, got %f, tol=%f\n", __FILE__, __LINE__, message, ((double)(expected)), ((double)(actual)), ((double)(tolerance)) ); \\r
- g_testsFailed++; \\r
- goto error; \\r
- } \\r
- else g_testsPassed++;\r
-\r
-\r
-#endif\r
+
+/*
+ * PortAudio Portable Real-Time Audio Library
+ * Latest Version at: http://www.portaudio.com
+ *
+ * Copyright (c) 1999-2010 Phil Burk and Ross Bencina
+ *
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * The text above constitutes the entire PortAudio license; however,
+ * the PortAudio community also makes the following non-binding requests:
+ *
+ * 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. It is also
+ * requested that these non-binding requests be included along with the
+ * license above.
+ */
+
+#ifndef _QA_TOOLS_H
+#define _QA_TOOLS_H
+
+extern int g_testsPassed;
+extern int g_testsFailed;
+
+#define QA_ASSERT_TRUE( message, flag ) \
+ if( !(flag) ) \
+ { \
+ printf( "%s:%d - ERROR - %s\n", __FILE__, __LINE__, message ); \
+ g_testsFailed++; \
+ goto error; \
+ } \
+ else g_testsPassed++;
+
+
+#define QA_ASSERT_EQUALS( message, expected, actual ) \
+ if( ((expected) != (actual)) ) \
+ { \
+ printf( "%s:%d - ERROR - %s, expected %d, got %d\n", __FILE__, __LINE__, message, expected, actual ); \
+ g_testsFailed++; \
+ goto error; \
+ } \
+ else g_testsPassed++;
+
+#define QA_ASSERT_CLOSE( message, expected, actual, tolerance ) \
+ if (fabs((expected)-(actual))>(tolerance)) \
+ { \
+ printf( "%s:%d - ERROR - %s, expected %f, got %f, tol=%f\n", __FILE__, __LINE__, message, ((double)(expected)), ((double)(actual)), ((double)(tolerance)) ); \
+ g_testsFailed++; \
+ goto error; \
+ } \
+ else g_testsPassed++;
+
+
+#endif
-/*\r
- * PortAudio Portable Real-Time Audio Library\r
- * Latest Version at: http://www.portaudio.com\r
- *\r
- * Copyright (c) 1999-2010 Phil Burk and Ross Bencina\r
- *\r
- * Permission is hereby granted, free of charge, to any person obtaining\r
- * a copy of this software and associated documentation files\r
- * (the "Software"), to deal in the Software without restriction,\r
- * including without limitation the rights to use, copy, modify, merge,\r
- * publish, distribute, sublicense, and/or sell copies of the Software,\r
- * and to permit persons to whom the Software is furnished to do so,\r
- * subject to the following conditions:\r
- *\r
- * The above copyright notice and this permission notice shall be\r
- * included in all copies or substantial portions of the Software.\r
- *\r
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\r
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\r
- * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\r
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\r
- * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
- */\r
-\r
-/*\r
- * The text above constitutes the entire PortAudio license; however, \r
- * the PortAudio community also makes the following non-binding requests:\r
- *\r
- * Any person wishing to distribute modifications to the Software is\r
- * requested to send the modifications to the original developer so that\r
- * they can be incorporated into the canonical version. It is also \r
- * requested that these non-binding requests be included along with the \r
- * license above.\r
- */\r
-\r
-/**\r
- * Very simple WAV file writer for saving captured audio.\r
- */\r
-\r
-#include <stdio.h>\r
-#include <stdlib.h>\r
-#include "write_wav.h"\r
-\r
-\r
-/* Write long word data to a little endian format byte array. */\r
-static void WriteLongLE( unsigned char **addrPtr, unsigned long data )\r
-{\r
- unsigned char *addr = *addrPtr;\r
- *addr++ = (unsigned char) data;\r
- *addr++ = (unsigned char) (data>>8);\r
- *addr++ = (unsigned char) (data>>16);\r
- *addr++ = (unsigned char) (data>>24);\r
- *addrPtr = addr;\r
-}\r
-\r
-/* Write short word data to a little endian format byte array. */\r
-static void WriteShortLE( unsigned char **addrPtr, unsigned short data )\r
-{\r
- unsigned char *addr = *addrPtr;\r
- *addr++ = (unsigned char) data;\r
- *addr++ = (unsigned char) (data>>8);\r
- *addrPtr = addr;\r
-}\r
-\r
-/* Write IFF ChunkType data to a byte array. */\r
-static void WriteChunkType( unsigned char **addrPtr, unsigned long cktyp )\r
-{\r
- unsigned char *addr = *addrPtr;\r
- *addr++ = (unsigned char) (cktyp>>24);\r
- *addr++ = (unsigned char) (cktyp>>16);\r
- *addr++ = (unsigned char) (cktyp>>8);\r
- *addr++ = (unsigned char) cktyp;\r
- *addrPtr = addr;\r
-}\r
-\r
-#define WAV_HEADER_SIZE (4 + 4 + 4 + /* RIFF+size+WAVE */ \\r
- 4 + 4 + 16 + /* fmt chunk */ \\r
- 4 + 4 ) /* data chunk */\r
-\r
-\r
-/*********************************************************************************\r
- * Open named file and write WAV header to the file.\r
- * The header includes the DATA chunk type and size.\r
- * Returns number of bytes written to file or negative error code.\r
- */\r
-long Audio_WAV_OpenWriter( WAV_Writer *writer, const char *fileName, int frameRate, int samplesPerFrame )\r
-{\r
- unsigned int bytesPerSecond;\r
- unsigned char header[ WAV_HEADER_SIZE ];\r
- unsigned char *addr = header;\r
- int numWritten;\r
- \r
- writer->dataSize = 0;\r
- writer->dataSizeOffset = 0;\r
- \r
- writer->fid = fopen( fileName, "wb" );\r
- if( writer->fid == NULL )\r
- {\r
- return -1;\r
- }\r
-\r
-/* Write RIFF header. */\r
- WriteChunkType( &addr, RIFF_ID );\r
-\r
-/* Write RIFF size as zero for now. Will patch later. */\r
- WriteLongLE( &addr, 0 );\r
-\r
-/* Write WAVE form ID. */\r
- WriteChunkType( &addr, WAVE_ID );\r
-\r
-/* Write format chunk based on AudioSample structure. */\r
- WriteChunkType( &addr, FMT_ID );\r
- WriteLongLE( &addr, 16 );\r
- WriteShortLE( &addr, WAVE_FORMAT_PCM );\r
- bytesPerSecond = frameRate * samplesPerFrame * sizeof( short);\r
- WriteShortLE( &addr, (short) samplesPerFrame );\r
- WriteLongLE( &addr, frameRate );\r
- WriteLongLE( &addr, bytesPerSecond );\r
- WriteShortLE( &addr, (short) (samplesPerFrame * sizeof( short)) ); /* bytesPerBlock */\r
- WriteShortLE( &addr, (short) 16 ); /* bits per sample */\r
-\r
-/* Write ID and size for 'data' chunk. */\r
- WriteChunkType( &addr, DATA_ID );\r
-/* Save offset so we can patch it later. */\r
- writer->dataSizeOffset = (int) (addr - header);\r
- WriteLongLE( &addr, 0 );\r
-\r
- numWritten = fwrite( header, 1, sizeof(header), writer->fid );\r
- if( numWritten != sizeof(header) ) return -1;\r
-\r
- return (int) numWritten;\r
-}\r
-\r
-/*********************************************************************************\r
- * Write to the data chunk portion of a WAV file.\r
- * Returns bytes written or negative error code.\r
- */\r
-long Audio_WAV_WriteShorts( WAV_Writer *writer,\r
- short *samples,\r
- int numSamples\r
- )\r
-{\r
- unsigned char buffer[2];\r
- unsigned char *bufferPtr;\r
- int i;\r
- short *p = samples;\r
- int numWritten;\r
- int bytesWritten;\r
- if( numSamples <= 0 )\r
- {\r
- return -1;\r
- }\r
-\r
- for( i=0; i<numSamples; i++ )\r
- {\r
- bufferPtr = buffer;\r
- WriteShortLE( &bufferPtr, *p++ );\r
- numWritten = fwrite( buffer, 1, sizeof( buffer), writer->fid );\r
- if( numWritten != sizeof(buffer) ) return -1;\r
- }\r
- bytesWritten = numSamples * sizeof(short);\r
- writer->dataSize += bytesWritten;\r
- return (int) bytesWritten;\r
-}\r
-\r
-/*********************************************************************************\r
- * Close WAV file.\r
- * Update chunk sizes so it can be read by audio applications.\r
- */\r
-long Audio_WAV_CloseWriter( WAV_Writer *writer )\r
-{\r
- unsigned char buffer[4];\r
- unsigned char *bufferPtr;\r
- int numWritten;\r
- int riffSize;\r
-\r
- /* Go back to beginning of file and update DATA size */\r
- int result = fseek( writer->fid, writer->dataSizeOffset, SEEK_SET );\r
- if( result < 0 ) return result;\r
-\r
- bufferPtr = buffer;\r
- WriteLongLE( &bufferPtr, writer->dataSize );\r
- numWritten = fwrite( buffer, 1, sizeof( buffer), writer->fid );\r
- if( numWritten != sizeof(buffer) ) return -1;\r
-\r
- /* Update RIFF size */\r
- result = fseek( writer->fid, 4, SEEK_SET );\r
- if( result < 0 ) return result;\r
-\r
- riffSize = writer->dataSize + (WAV_HEADER_SIZE - 8);\r
- bufferPtr = buffer;\r
- WriteLongLE( &bufferPtr, riffSize );\r
- numWritten = fwrite( buffer, 1, sizeof( buffer), writer->fid );\r
- if( numWritten != sizeof(buffer) ) return -1;\r
-\r
- fclose( writer->fid );\r
- writer->fid = NULL;\r
- return writer->dataSize;\r
-}\r
-\r
-/*********************************************************************************\r
- * Simple test that write a sawtooth waveform to a file.\r
- */\r
-#if 0\r
-int main( void )\r
-{\r
- int i;\r
- WAV_Writer writer;\r
- int result;\r
-#define NUM_SAMPLES (200)\r
- short data[NUM_SAMPLES];\r
- short saw = 0;\r
- \r
- for( i=0; i<NUM_SAMPLES; i++ )\r
- {\r
- data[i] = saw;\r
- saw += 293;\r
- }\r
-\r
-\r
- result = Audio_WAV_OpenWriter( &writer, "rendered_midi.wav", 44100, 1 );\r
- if( result < 0 ) goto error;\r
-\r
- for( i=0; i<15; i++ )\r
- {\r
- result = Audio_WAV_WriteShorts( &writer, data, NUM_SAMPLES );\r
- if( result < 0 ) goto error;\r
- }\r
-\r
- result = Audio_WAV_CloseWriter( &writer );\r
- if( result < 0 ) goto error;\r
-\r
-\r
- return 0;\r
-\r
-error:\r
- printf("ERROR: result = %d\n", result );\r
- return result;\r
-}\r
-#endif\r
+/*
+ * PortAudio Portable Real-Time Audio Library
+ * Latest Version at: http://www.portaudio.com
+ *
+ * Copyright (c) 1999-2010 Phil Burk and Ross Bencina
+ *
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * The text above constitutes the entire PortAudio license; however,
+ * the PortAudio community also makes the following non-binding requests:
+ *
+ * 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. It is also
+ * requested that these non-binding requests be included along with the
+ * license above.
+ */
+
+/**
+ * Very simple WAV file writer for saving captured audio.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "write_wav.h"
+
+
+/* Write long word data to a little endian format byte array. */
+static void WriteLongLE( unsigned char **addrPtr, unsigned long data )
+{
+ unsigned char *addr = *addrPtr;
+ *addr++ = (unsigned char) data;
+ *addr++ = (unsigned char) (data>>8);
+ *addr++ = (unsigned char) (data>>16);
+ *addr++ = (unsigned char) (data>>24);
+ *addrPtr = addr;
+}
+
+/* Write short word data to a little endian format byte array. */
+static void WriteShortLE( unsigned char **addrPtr, unsigned short data )
+{
+ unsigned char *addr = *addrPtr;
+ *addr++ = (unsigned char) data;
+ *addr++ = (unsigned char) (data>>8);
+ *addrPtr = addr;
+}
+
+/* Write IFF ChunkType data to a byte array. */
+static void WriteChunkType( unsigned char **addrPtr, unsigned long cktyp )
+{
+ unsigned char *addr = *addrPtr;
+ *addr++ = (unsigned char) (cktyp>>24);
+ *addr++ = (unsigned char) (cktyp>>16);
+ *addr++ = (unsigned char) (cktyp>>8);
+ *addr++ = (unsigned char) cktyp;
+ *addrPtr = addr;
+}
+
+#define WAV_HEADER_SIZE (4 + 4 + 4 + /* RIFF+size+WAVE */ \
+ 4 + 4 + 16 + /* fmt chunk */ \
+ 4 + 4 ) /* data chunk */
+
+
+/*********************************************************************************
+ * Open named file and write WAV header to the file.
+ * The header includes the DATA chunk type and size.
+ * Returns number of bytes written to file or negative error code.
+ */
+long Audio_WAV_OpenWriter( WAV_Writer *writer, const char *fileName, int frameRate, int samplesPerFrame )
+{
+ unsigned int bytesPerSecond;
+ unsigned char header[ WAV_HEADER_SIZE ];
+ unsigned char *addr = header;
+ int numWritten;
+
+ writer->dataSize = 0;
+ writer->dataSizeOffset = 0;
+
+ writer->fid = fopen( fileName, "wb" );
+ if( writer->fid == NULL )
+ {
+ return -1;
+ }
+
+/* Write RIFF header. */
+ WriteChunkType( &addr, RIFF_ID );
+
+/* Write RIFF size as zero for now. Will patch later. */
+ WriteLongLE( &addr, 0 );
+
+/* Write WAVE form ID. */
+ WriteChunkType( &addr, WAVE_ID );
+
+/* Write format chunk based on AudioSample structure. */
+ WriteChunkType( &addr, FMT_ID );
+ WriteLongLE( &addr, 16 );
+ WriteShortLE( &addr, WAVE_FORMAT_PCM );
+ bytesPerSecond = frameRate * samplesPerFrame * sizeof( short);
+ WriteShortLE( &addr, (short) samplesPerFrame );
+ WriteLongLE( &addr, frameRate );
+ WriteLongLE( &addr, bytesPerSecond );
+ WriteShortLE( &addr, (short) (samplesPerFrame * sizeof( short)) ); /* bytesPerBlock */
+ WriteShortLE( &addr, (short) 16 ); /* bits per sample */
+
+/* Write ID and size for 'data' chunk. */
+ WriteChunkType( &addr, DATA_ID );
+/* Save offset so we can patch it later. */
+ writer->dataSizeOffset = (int) (addr - header);
+ WriteLongLE( &addr, 0 );
+
+ numWritten = fwrite( header, 1, sizeof(header), writer->fid );
+ if( numWritten != sizeof(header) ) return -1;
+
+ return (int) numWritten;
+}
+
+/*********************************************************************************
+ * Write to the data chunk portion of a WAV file.
+ * Returns bytes written or negative error code.
+ */
+long Audio_WAV_WriteShorts( WAV_Writer *writer,
+ short *samples,
+ int numSamples
+ )
+{
+ unsigned char buffer[2];
+ unsigned char *bufferPtr;
+ int i;
+ short *p = samples;
+ int numWritten;
+ int bytesWritten;
+ if( numSamples <= 0 )
+ {
+ return -1;
+ }
+
+ for( i=0; i<numSamples; i++ )
+ {
+ bufferPtr = buffer;
+ WriteShortLE( &bufferPtr, *p++ );
+ numWritten = fwrite( buffer, 1, sizeof( buffer), writer->fid );
+ if( numWritten != sizeof(buffer) ) return -1;
+ }
+ bytesWritten = numSamples * sizeof(short);
+ writer->dataSize += bytesWritten;
+ return (int) bytesWritten;
+}
+
+/*********************************************************************************
+ * Close WAV file.
+ * Update chunk sizes so it can be read by audio applications.
+ */
+long Audio_WAV_CloseWriter( WAV_Writer *writer )
+{
+ unsigned char buffer[4];
+ unsigned char *bufferPtr;
+ int numWritten;
+ int riffSize;
+
+ /* Go back to beginning of file and update DATA size */
+ int result = fseek( writer->fid, writer->dataSizeOffset, SEEK_SET );
+ if( result < 0 ) return result;
+
+ bufferPtr = buffer;
+ WriteLongLE( &bufferPtr, writer->dataSize );
+ numWritten = fwrite( buffer, 1, sizeof( buffer), writer->fid );
+ if( numWritten != sizeof(buffer) ) return -1;
+
+ /* Update RIFF size */
+ result = fseek( writer->fid, 4, SEEK_SET );
+ if( result < 0 ) return result;
+
+ riffSize = writer->dataSize + (WAV_HEADER_SIZE - 8);
+ bufferPtr = buffer;
+ WriteLongLE( &bufferPtr, riffSize );
+ numWritten = fwrite( buffer, 1, sizeof( buffer), writer->fid );
+ if( numWritten != sizeof(buffer) ) return -1;
+
+ fclose( writer->fid );
+ writer->fid = NULL;
+ return writer->dataSize;
+}
+
+/*********************************************************************************
+ * Simple test that write a sawtooth waveform to a file.
+ */
+#if 0
+int main( void )
+{
+ int i;
+ WAV_Writer writer;
+ int result;
+#define NUM_SAMPLES (200)
+ short data[NUM_SAMPLES];
+ short saw = 0;
+
+ for( i=0; i<NUM_SAMPLES; i++ )
+ {
+ data[i] = saw;
+ saw += 293;
+ }
+
+
+ result = Audio_WAV_OpenWriter( &writer, "rendered_midi.wav", 44100, 1 );
+ if( result < 0 ) goto error;
+
+ for( i=0; i<15; i++ )
+ {
+ result = Audio_WAV_WriteShorts( &writer, data, NUM_SAMPLES );
+ if( result < 0 ) goto error;
+ }
+
+ result = Audio_WAV_CloseWriter( &writer );
+ if( result < 0 ) goto error;
+
+
+ return 0;
+
+error:
+ printf("ERROR: result = %d\n", result );
+ return result;
+}
+#endif
-/*\r
- * PortAudio Portable Real-Time Audio Library\r
- * Latest Version at: http://www.portaudio.com\r
- *\r
- * Copyright (c) 1999-2010 Phil Burk and Ross Bencina\r
- *\r
- * Permission is hereby granted, free of charge, to any person obtaining\r
- * a copy of this software and associated documentation files\r
- * (the "Software"), to deal in the Software without restriction,\r
- * including without limitation the rights to use, copy, modify, merge,\r
- * publish, distribute, sublicense, and/or sell copies of the Software,\r
- * and to permit persons to whom the Software is furnished to do so,\r
- * subject to the following conditions:\r
- *\r
- * The above copyright notice and this permission notice shall be\r
- * included in all copies or substantial portions of the Software.\r
- *\r
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\r
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\r
- * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\r
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\r
- * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
- */\r
-\r
-/*\r
- * The text above constitutes the entire PortAudio license; however, \r
- * the PortAudio community also makes the following non-binding requests:\r
- *\r
- * Any person wishing to distribute modifications to the Software is\r
- * requested to send the modifications to the original developer so that\r
- * they can be incorporated into the canonical version. It is also \r
- * requested that these non-binding requests be included along with the \r
- * license above.\r
- */\r
-#ifndef _WAV_WRITER_H\r
-#define _WAV_WRITER_H\r
-\r
-/*\r
- * WAV file writer.\r
- *\r
- * Author: Phil Burk\r
- */\r
-\r
-#ifdef __cplusplus\r
-extern "C" {\r
-#endif\r
-\r
-/* Define WAV Chunk and FORM types as 4 byte integers. */\r
-#define RIFF_ID (('R'<<24) | ('I'<<16) | ('F'<<8) | 'F')\r
-#define WAVE_ID (('W'<<24) | ('A'<<16) | ('V'<<8) | 'E')\r
-#define FMT_ID (('f'<<24) | ('m'<<16) | ('t'<<8) | ' ')\r
-#define DATA_ID (('d'<<24) | ('a'<<16) | ('t'<<8) | 'a')\r
-#define FACT_ID (('f'<<24) | ('a'<<16) | ('c'<<8) | 't')\r
-\r
-/* Errors returned by Audio_ParseSampleImage_WAV */\r
-#define WAV_ERR_CHUNK_SIZE (-1) /* Chunk size is illegal or past file size. */\r
-#define WAV_ERR_FILE_TYPE (-2) /* Not a WAV file. */\r
-#define WAV_ERR_ILLEGAL_VALUE (-3) /* Illegal or unsupported value. Eg. 927 bits/sample */\r
-#define WAV_ERR_FORMAT_TYPE (-4) /* Unsupported format, eg. compressed. */\r
-#define WAV_ERR_TRUNCATED (-5) /* End of file missing. */\r
-\r
-/* WAV PCM data format ID */\r
-#define WAVE_FORMAT_PCM (1)\r
-#define WAVE_FORMAT_IMA_ADPCM (0x0011)\r
-\r
- \r
-typedef struct WAV_Writer_s\r
-{\r
- FILE *fid;\r
- /* Offset in file for data size. */\r
- int dataSizeOffset;\r
- int dataSize;\r
-} WAV_Writer;\r
-\r
-/*********************************************************************************\r
- * Open named file and write WAV header to the file.\r
- * The header includes the DATA chunk type and size.\r
- * Returns number of bytes written to file or negative error code.\r
- */\r
-long Audio_WAV_OpenWriter( WAV_Writer *writer, const char *fileName, int frameRate, int samplesPerFrame );\r
-\r
-/*********************************************************************************\r
- * Write to the data chunk portion of a WAV file.\r
- * Returns bytes written or negative error code.\r
- */\r
-long Audio_WAV_WriteShorts( WAV_Writer *writer,\r
- short *samples,\r
- int numSamples\r
- );\r
-\r
-/*********************************************************************************\r
- * Close WAV file.\r
- * Update chunk sizes so it can be read by audio applications.\r
- */\r
-long Audio_WAV_CloseWriter( WAV_Writer *writer );\r
-\r
-#ifdef __cplusplus\r
-};\r
-#endif\r
-\r
-#endif /* _WAV_WRITER_H */\r
+/*
+ * PortAudio Portable Real-Time Audio Library
+ * Latest Version at: http://www.portaudio.com
+ *
+ * Copyright (c) 1999-2010 Phil Burk and Ross Bencina
+ *
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * The text above constitutes the entire PortAudio license; however,
+ * the PortAudio community also makes the following non-binding requests:
+ *
+ * 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. It is also
+ * requested that these non-binding requests be included along with the
+ * license above.
+ */
+#ifndef _WAV_WRITER_H
+#define _WAV_WRITER_H
+
+/*
+ * WAV file writer.
+ *
+ * Author: Phil Burk
+ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Define WAV Chunk and FORM types as 4 byte integers. */
+#define RIFF_ID (('R'<<24) | ('I'<<16) | ('F'<<8) | 'F')
+#define WAVE_ID (('W'<<24) | ('A'<<16) | ('V'<<8) | 'E')
+#define FMT_ID (('f'<<24) | ('m'<<16) | ('t'<<8) | ' ')
+#define DATA_ID (('d'<<24) | ('a'<<16) | ('t'<<8) | 'a')
+#define FACT_ID (('f'<<24) | ('a'<<16) | ('c'<<8) | 't')
+
+/* Errors returned by Audio_ParseSampleImage_WAV */
+#define WAV_ERR_CHUNK_SIZE (-1) /* Chunk size is illegal or past file size. */
+#define WAV_ERR_FILE_TYPE (-2) /* Not a WAV file. */
+#define WAV_ERR_ILLEGAL_VALUE (-3) /* Illegal or unsupported value. Eg. 927 bits/sample */
+#define WAV_ERR_FORMAT_TYPE (-4) /* Unsupported format, eg. compressed. */
+#define WAV_ERR_TRUNCATED (-5) /* End of file missing. */
+
+/* WAV PCM data format ID */
+#define WAVE_FORMAT_PCM (1)
+#define WAVE_FORMAT_IMA_ADPCM (0x0011)
+
+
+typedef struct WAV_Writer_s
+{
+ FILE *fid;
+ /* Offset in file for data size. */
+ int dataSizeOffset;
+ int dataSize;
+} WAV_Writer;
+
+/*********************************************************************************
+ * Open named file and write WAV header to the file.
+ * The header includes the DATA chunk type and size.
+ * Returns number of bytes written to file or negative error code.
+ */
+long Audio_WAV_OpenWriter( WAV_Writer *writer, const char *fileName, int frameRate, int samplesPerFrame );
+
+/*********************************************************************************
+ * Write to the data chunk portion of a WAV file.
+ * Returns bytes written or negative error code.
+ */
+long Audio_WAV_WriteShorts( WAV_Writer *writer,
+ short *samples,
+ int numSamples
+ );
+
+/*********************************************************************************
+ * Close WAV file.
+ * Update chunk sizes so it can be read by audio applications.
+ */
+long Audio_WAV_CloseWriter( WAV_Writer *writer );
+
+#ifdef __cplusplus
+};
+#endif
+
+#endif /* _WAV_WRITER_H */
-/*\r
- * $Id: pa_log.c $\r
- * Portable Audio I/O Library Multi-Host API front end\r
- * Validate function parameters and manage multiple host APIs.\r
- *\r
- * Based on the Open Source API proposed by Ross Bencina\r
- * Copyright (c) 1999-2006 Ross Bencina, Phil Burk\r
- *\r
- * Permission is hereby granted, free of charge, to any person obtaining\r
- * a copy of this software and associated documentation files\r
- * (the "Software"), to deal in the Software without restriction,\r
- * including without limitation the rights to use, copy, modify, merge,\r
- * publish, distribute, sublicense, and/or sell copies of the Software,\r
- * and to permit persons to whom the Software is furnished to do so,\r
- * subject to the following conditions:\r
- *\r
- * The above copyright notice and this permission notice shall be\r
- * included in all copies or substantial portions of the Software.\r
- *\r
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\r
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\r
- * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\r
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\r
- * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
- */\r
-\r
-/*\r
- * The text above constitutes the entire PortAudio license; however,\r
- * the PortAudio community also makes the following non-binding requests:\r
- *\r
- * Any person wishing to distribute modifications to the Software is\r
- * requested to send the modifications to the original developer so that\r
- * they can be incorporated into the canonical version. It is also\r
- * requested that these non-binding requests be included along with the\r
- * license above.\r
- */\r
-\r
-/** @file\r
- @ingroup common_src\r
-\r
- @brief Implements log function.\r
-\r
- PaUtil_SetLogPrintFunction can be user called to replace the provided\r
- DefaultLogPrint function, which writes to stderr.\r
- One can NOT pass var_args across compiler/dll boundaries as it is not\r
- "byte code/abi portable". So the technique used here is to allocate a local\r
- a static array, write in it, then callback the user with a pointer to its\r
- start.\r
-*/\r
-\r
-#include <stdio.h>\r
-#include <stdarg.h>\r
-\r
-#include "pa_debugprint.h"\r
-\r
-// for OutputDebugStringA\r
-#if defined(_MSC_VER) && defined(PA_ENABLE_MSVC_DEBUG_OUTPUT)\r
- #define WIN32_LEAN_AND_MEAN // exclude rare headers\r
- #include "windows.h"\r
-#endif\r
-\r
-// User callback\r
-static PaUtilLogCallback userCB = NULL;\r
-\r
-// Sets user callback\r
-void PaUtil_SetDebugPrintFunction(PaUtilLogCallback cb)\r
-{\r
- userCB = cb;\r
-}\r
-\r
-/*\r
- If your platform doesn\92t have vsnprintf, you are stuck with a\r
- VERY dangerous alternative, vsprintf (with no n)\r
-*/\r
-#if _MSC_VER\r
- /* Some Windows Mobile SDKs don't define vsnprintf but all define _vsnprintf (hopefully).\r
- According to MSDN "vsnprintf is identical to _vsnprintf". So we use _vsnprintf with MSC.\r
- */\r
- #define VSNPRINTF _vsnprintf \r
-#else\r
- #define VSNPRINTF vsnprintf\r
-#endif\r
-\r
-#define PA_LOG_BUF_SIZE 2048\r
-\r
-void PaUtil_DebugPrint( const char *format, ... )\r
-{\r
- // Optional logging into Output console of Visual Studio\r
-#if defined(_MSC_VER) && defined(PA_ENABLE_MSVC_DEBUG_OUTPUT)\r
- {\r
- char buf[PA_LOG_BUF_SIZE];\r
- va_list ap;\r
- va_start(ap, format);\r
- VSNPRINTF(buf, sizeof(buf), format, ap);\r
- buf[sizeof(buf)-1] = 0;\r
- OutputDebugStringA(buf);\r
- va_end(ap);\r
- }\r
-#endif\r
-\r
- // Output to User-Callback\r
- if (userCB != NULL)\r
- {\r
- char strdump[PA_LOG_BUF_SIZE];\r
- va_list ap;\r
- va_start(ap, format);\r
- VSNPRINTF(strdump, sizeof(strdump), format, ap);\r
- strdump[sizeof(strdump)-1] = 0;\r
- userCB(strdump);\r
- va_end(ap);\r
- }\r
- else\r
- // Standard output to stderr\r
- {\r
- va_list ap;\r
- va_start(ap, format);\r
- vfprintf(stderr, format, ap);\r
- va_end(ap);\r
- fflush(stderr);\r
- }\r
-}\r
+/*
+ * $Id: pa_log.c $
+ * Portable Audio I/O Library Multi-Host API front end
+ * Validate function parameters and manage multiple host APIs.
+ *
+ * Based on the Open Source API proposed by Ross Bencina
+ * Copyright (c) 1999-2006 Ross Bencina, Phil Burk
+ *
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * The text above constitutes the entire PortAudio license; however,
+ * the PortAudio community also makes the following non-binding requests:
+ *
+ * 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. It is also
+ * requested that these non-binding requests be included along with the
+ * license above.
+ */
+
+/** @file
+ @ingroup common_src
+
+ @brief Implements log function.
+
+ PaUtil_SetLogPrintFunction can be user called to replace the provided
+ DefaultLogPrint function, which writes to stderr.
+ One can NOT pass var_args across compiler/dll boundaries as it is not
+ "byte code/abi portable". So the technique used here is to allocate a local
+ a static array, write in it, then callback the user with a pointer to its
+ start.
+*/
+
+#include <stdio.h>
+#include <stdarg.h>
+
+#include "pa_debugprint.h"
+
+// for OutputDebugStringA
+#if defined(_MSC_VER) && defined(PA_ENABLE_MSVC_DEBUG_OUTPUT)
+ #define WIN32_LEAN_AND_MEAN // exclude rare headers
+ #include "windows.h"
+#endif
+
+// User callback
+static PaUtilLogCallback userCB = NULL;
+
+// Sets user callback
+void PaUtil_SetDebugPrintFunction(PaUtilLogCallback cb)
+{
+ userCB = cb;
+}
+
+/*
+ If your platform doesn\92t have vsnprintf, you are stuck with a
+ VERY dangerous alternative, vsprintf (with no n)
+*/
+#if _MSC_VER
+ /* Some Windows Mobile SDKs don't define vsnprintf but all define _vsnprintf (hopefully).
+ According to MSDN "vsnprintf is identical to _vsnprintf". So we use _vsnprintf with MSC.
+ */
+ #define VSNPRINTF _vsnprintf
+#else
+ #define VSNPRINTF vsnprintf
+#endif
+
+#define PA_LOG_BUF_SIZE 2048
+
+void PaUtil_DebugPrint( const char *format, ... )
+{
+ // Optional logging into Output console of Visual Studio
+#if defined(_MSC_VER) && defined(PA_ENABLE_MSVC_DEBUG_OUTPUT)
+ {
+ char buf[PA_LOG_BUF_SIZE];
+ va_list ap;
+ va_start(ap, format);
+ VSNPRINTF(buf, sizeof(buf), format, ap);
+ buf[sizeof(buf)-1] = 0;
+ OutputDebugStringA(buf);
+ va_end(ap);
+ }
+#endif
+
+ // Output to User-Callback
+ if (userCB != NULL)
+ {
+ char strdump[PA_LOG_BUF_SIZE];
+ va_list ap;
+ va_start(ap, format);
+ VSNPRINTF(strdump, sizeof(strdump), format, ap);
+ strdump[sizeof(strdump)-1] = 0;
+ userCB(strdump);
+ va_end(ap);
+ }
+ else
+ // Standard output to stderr
+ {
+ va_list ap;
+ va_start(ap, format);
+ vfprintf(stderr, format, ap);
+ va_end(ap);
+ fflush(stderr);
+ }
+}
-#ifndef PA_LOG_H\r
-#define PA_LOG_H\r
-/*\r
- * Log file redirector function\r
- * Copyright (c) 1999-2006 Ross Bencina, Phil Burk\r
- *\r
- * Permission is hereby granted, free of charge, to any person obtaining\r
- * a copy of this software and associated documentation files\r
- * (the "Software"), to deal in the Software without restriction,\r
- * including without limitation the rights to use, copy, modify, merge,\r
- * publish, distribute, sublicense, and/or sell copies of the Software,\r
- * and to permit persons to whom the Software is furnished to do so,\r
- * subject to the following conditions:\r
- *\r
- * The above copyright notice and this permission notice shall be\r
- * included in all copies or substantial portions of the Software.\r
- *\r
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\r
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\r
- * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\r
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\r
- * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
- */\r
-\r
-/*\r
- * The text above constitutes the entire PortAudio license; however,\r
- * the PortAudio community also makes the following non-binding requests:\r
- *\r
- * Any person wishing to distribute modifications to the Software is\r
- * requested to send the modifications to the original developer so that\r
- * they can be incorporated into the canonical version. It is also\r
- * requested that these non-binding requests be included along with the\r
- * license above.\r
- */\r
-\r
-/** @file\r
- @ingroup common_src\r
-*/\r
-\r
-\r
-#ifdef __cplusplus\r
-extern "C"\r
-{\r
-#endif /* __cplusplus */\r
-\r
-\r
-\r
-void PaUtil_DebugPrint( const char *format, ... );\r
-\r
-\r
-/*\r
- The basic format for log messages is described below. If you need to\r
- add any log messages, please follow this format.\r
-\r
- Function entry (void function):\r
-\r
- "FunctionName called.\n"\r
-\r
- Function entry (non void function):\r
-\r
- "FunctionName called:\n"\r
- "\tParam1Type param1: param1Value\n"\r
- "\tParam2Type param2: param2Value\n" (etc...)\r
-\r
-\r
- Function exit (no return value):\r
-\r
- "FunctionName returned.\n"\r
-\r
- Function exit (simple return value):\r
-\r
- "FunctionName returned:\n"\r
- "\tReturnType: returnValue\n"\r
-\r
- If the return type is an error code, the error text is displayed in ()\r
-\r
- If the return type is not an error code, but has taken a special value\r
- because an error occurred, then the reason for the error is shown in []\r
-\r
- If the return type is a struct ptr, the struct is dumped.\r
-\r
- See the code below for examples\r
-*/\r
-\r
-/** PA_DEBUG() provides a simple debug message printing facility. The macro\r
- passes it's argument to a printf-like function called PaUtil_DebugPrint()\r
- which prints to stderr and always flushes the stream after printing.\r
- Because preprocessor macros cannot directly accept variable length argument\r
- lists, calls to the macro must include an additional set of parenthesis, eg:\r
- PA_DEBUG(("errorno: %d", 1001 ));\r
-*/\r
-\r
-\r
-#ifdef PA_ENABLE_DEBUG_OUTPUT\r
-#define PA_DEBUG(x) PaUtil_DebugPrint x ;\r
-#else\r
-#define PA_DEBUG(x)\r
-#endif\r
-\r
-\r
-#ifdef PA_LOG_API_CALLS\r
-#define PA_LOGAPI(x) PaUtil_DebugPrint x \r
-\r
-#define PA_LOGAPI_ENTER(functionName) PaUtil_DebugPrint( functionName " called.\n" )\r
-\r
-#define PA_LOGAPI_ENTER_PARAMS(functionName) PaUtil_DebugPrint( functionName " called:\n" )\r
-\r
-#define PA_LOGAPI_EXIT(functionName) PaUtil_DebugPrint( functionName " returned.\n" )\r
-\r
-#define PA_LOGAPI_EXIT_PAERROR( functionName, result ) \\r
- PaUtil_DebugPrint( functionName " returned:\n" ); \\r
- PaUtil_DebugPrint("\tPaError: %d ( %s )\n", result, Pa_GetErrorText( result ) )\r
-\r
-#define PA_LOGAPI_EXIT_T( functionName, resultFormatString, result ) \\r
- PaUtil_DebugPrint( functionName " returned:\n" ); \\r
- PaUtil_DebugPrint("\t" resultFormatString "\n", result )\r
-\r
-#define PA_LOGAPI_EXIT_PAERROR_OR_T_RESULT( functionName, positiveResultFormatString, result ) \\r
- PaUtil_DebugPrint( functionName " returned:\n" ); \\r
- if( result > 0 ) \\r
- PaUtil_DebugPrint("\t" positiveResultFormatString "\n", result ); \\r
- else \\r
- PaUtil_DebugPrint("\tPaError: %d ( %s )\n", result, Pa_GetErrorText( result ) )\r
-#else\r
-#define PA_LOGAPI(x)\r
-#define PA_LOGAPI_ENTER(functionName)\r
-#define PA_LOGAPI_ENTER_PARAMS(functionName)\r
-#define PA_LOGAPI_EXIT(functionName)\r
-#define PA_LOGAPI_EXIT_PAERROR( functionName, result )\r
-#define PA_LOGAPI_EXIT_T( functionName, resultFormatString, result )\r
-#define PA_LOGAPI_EXIT_PAERROR_OR_T_RESULT( functionName, positiveResultFormatString, result )\r
-#endif\r
-\r
- \r
-typedef void (*PaUtilLogCallback ) (const char *log);\r
-\r
-/**\r
- Install user provided log function\r
-*/\r
-void PaUtil_SetDebugPrintFunction(PaUtilLogCallback cb);\r
-\r
-\r
-\r
-#ifdef __cplusplus\r
-}\r
-#endif /* __cplusplus */\r
-#endif /* PA_LOG_H */\r
+#ifndef PA_LOG_H
+#define PA_LOG_H
+/*
+ * Log file redirector function
+ * Copyright (c) 1999-2006 Ross Bencina, Phil Burk
+ *
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * The text above constitutes the entire PortAudio license; however,
+ * the PortAudio community also makes the following non-binding requests:
+ *
+ * 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. It is also
+ * requested that these non-binding requests be included along with the
+ * license above.
+ */
+
+/** @file
+ @ingroup common_src
+*/
+
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+
+
+void PaUtil_DebugPrint( const char *format, ... );
+
+
+/*
+ The basic format for log messages is described below. If you need to
+ add any log messages, please follow this format.
+
+ Function entry (void function):
+
+ "FunctionName called.\n"
+
+ Function entry (non void function):
+
+ "FunctionName called:\n"
+ "\tParam1Type param1: param1Value\n"
+ "\tParam2Type param2: param2Value\n" (etc...)
+
+
+ Function exit (no return value):
+
+ "FunctionName returned.\n"
+
+ Function exit (simple return value):
+
+ "FunctionName returned:\n"
+ "\tReturnType: returnValue\n"
+
+ If the return type is an error code, the error text is displayed in ()
+
+ If the return type is not an error code, but has taken a special value
+ because an error occurred, then the reason for the error is shown in []
+
+ If the return type is a struct ptr, the struct is dumped.
+
+ See the code below for examples
+*/
+
+/** PA_DEBUG() provides a simple debug message printing facility. The macro
+ passes it's argument to a printf-like function called PaUtil_DebugPrint()
+ which prints to stderr and always flushes the stream after printing.
+ Because preprocessor macros cannot directly accept variable length argument
+ lists, calls to the macro must include an additional set of parenthesis, eg:
+ PA_DEBUG(("errorno: %d", 1001 ));
+*/
+
+
+#ifdef PA_ENABLE_DEBUG_OUTPUT
+#define PA_DEBUG(x) PaUtil_DebugPrint x ;
+#else
+#define PA_DEBUG(x)
+#endif
+
+
+#ifdef PA_LOG_API_CALLS
+#define PA_LOGAPI(x) PaUtil_DebugPrint x
+
+#define PA_LOGAPI_ENTER(functionName) PaUtil_DebugPrint( functionName " called.\n" )
+
+#define PA_LOGAPI_ENTER_PARAMS(functionName) PaUtil_DebugPrint( functionName " called:\n" )
+
+#define PA_LOGAPI_EXIT(functionName) PaUtil_DebugPrint( functionName " returned.\n" )
+
+#define PA_LOGAPI_EXIT_PAERROR( functionName, result ) \
+ PaUtil_DebugPrint( functionName " returned:\n" ); \
+ PaUtil_DebugPrint("\tPaError: %d ( %s )\n", result, Pa_GetErrorText( result ) )
+
+#define PA_LOGAPI_EXIT_T( functionName, resultFormatString, result ) \
+ PaUtil_DebugPrint( functionName " returned:\n" ); \
+ PaUtil_DebugPrint("\t" resultFormatString "\n", result )
+
+#define PA_LOGAPI_EXIT_PAERROR_OR_T_RESULT( functionName, positiveResultFormatString, result ) \
+ PaUtil_DebugPrint( functionName " returned:\n" ); \
+ if( result > 0 ) \
+ PaUtil_DebugPrint("\t" positiveResultFormatString "\n", result ); \
+ else \
+ PaUtil_DebugPrint("\tPaError: %d ( %s )\n", result, Pa_GetErrorText( result ) )
+#else
+#define PA_LOGAPI(x)
+#define PA_LOGAPI_ENTER(functionName)
+#define PA_LOGAPI_ENTER_PARAMS(functionName)
+#define PA_LOGAPI_EXIT(functionName)
+#define PA_LOGAPI_EXIT_PAERROR( functionName, result )
+#define PA_LOGAPI_EXIT_T( functionName, resultFormatString, result )
+#define PA_LOGAPI_EXIT_PAERROR_OR_T_RESULT( functionName, positiveResultFormatString, result )
+#endif
+
+
+typedef void (*PaUtilLogCallback ) (const char *log);
+
+/**
+ Install user provided log function
+*/
+void PaUtil_SetDebugPrintFunction(PaUtilLogCallback cb);
+
+
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+#endif /* PA_LOG_H */
-/*\r
- * $Id:$\r
- * PortAudio Portable Real-Time Audio Library\r
- * Latest Version at: http://www.portaudio.com\r
- * AudioScience HPI implementation by Fred Gleason, Ludwig Schwardt and\r
- * Eliot Blennerhassett\r
- *\r
- * Copyright (c) 2003 Fred Gleason <fredg@salemradiolabs.com>\r
- * Copyright (c) 2005,2006 Ludwig Schwardt <schwardt@sun.ac.za>\r
- * Copyright (c) 2011 Eliot Blennerhassett <eblennerhassett@audioscience.com>\r
- *\r
- * Based on the Open Source API proposed by Ross Bencina\r
- * Copyright (c) 1999-2008 Ross Bencina, Phil Burk\r
- *\r
- * Permission is hereby granted, free of charge, to any person obtaining\r
- * a copy of this software and associated documentation files\r
- * (the "Software"), to deal in the Software without restriction,\r
- * including without limitation the rights to use, copy, modify, merge,\r
- * publish, distribute, sublicense, and/or sell copies of the Software,\r
- * and to permit persons to whom the Software is furnished to do so,\r
- * subject to the following conditions:\r
- *\r
- * The above copyright notice and this permission notice shall be\r
- * included in all copies or substantial portions of the Software.\r
- *\r
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\r
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\r
- * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\r
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\r
- * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
- */\r
-\r
-/*\r
- * The text above constitutes the entire PortAudio license; however,\r
- * the PortAudio community also makes the following non-binding requests:\r
- *\r
- * Any person wishing to distribute modifications to the Software is\r
- * requested to send the modifications to the original developer so that\r
- * they can be incorporated into the canonical version. It is also\r
- * requested that these non-binding requests be included along with the\r
- * license above.\r
- */\r
-\r
-/*\r
- * Modification History\r
- * 12/2003 - Initial version\r
- * 09/2005 - v19 version [rewrite]\r
- */\r
-\r
-/** @file\r
- @ingroup hostapi_src\r
- @brief Host API implementation supporting AudioScience cards\r
- via the Linux HPI interface.\r
-\r
- <h3>Overview</h3>\r
-\r
- This is a PortAudio implementation for the AudioScience HPI Audio API\r
- on the Linux platform. AudioScience makes a range of audio adapters customised\r
- for the broadcasting industry, with support for both Windows and Linux.\r
- More information on their products can be found on their website:\r
-\r
- http://www.audioscience.com\r
-\r
- Documentation for the HPI API can be found at:\r
-\r
- http://www.audioscience.com/internet/download/sdk/hpi_usermanual_html/html/index.html\r
-\r
- The Linux HPI driver itself (a kernel module + library) can be downloaded from:\r
-\r
- http://www.audioscience.com/internet/download/linux_drivers.htm\r
-\r
- <h3>Implementation strategy</h3>\r
-\r
- *Note* Ideally, AudioScience cards should be handled by the PortAudio ALSA\r
- implementation on Linux, as ALSA is the preferred Linux soundcard API. The existence\r
- of this host API implementation might therefore seem a bit flawed. Unfortunately, at\r
- the time of the creation of this implementation (June 2006), the PA ALSA implementation\r
- could not make use of the existing AudioScience ALSA driver. PA ALSA uses the\r
- "memory-mapped" (mmap) ALSA access mode to interact with the ALSA library, while the\r
- AudioScience ALSA driver only supports the "read-write" access mode. The appropriate\r
- solution to this problem is to add "read-write" support to PortAudio ALSA, thereby\r
- extending the range of soundcards it supports (AudioScience cards are not the only\r
- ones with this problem). Given the author's limited knowledge of ALSA and the\r
- simplicity of the HPI API, the second-best solution was born...\r
-\r
- The following mapping between HPI and PA was followed:\r
- HPI subsystem => PortAudio host API\r
- HPI adapter => nothing specific\r
- HPI stream => PortAudio device\r
-\r
- Each HPI stream is either input or output (not both), and can support\r
- different channel counts, sampling rates and sample formats. It is therefore\r
- a more natural fit to a PA device. A PA stream can therefore combine two\r
- HPI streams (one input and one output) into a "full-duplex" stream. These\r
- HPI streams can even be on different physical adapters. The two streams ought to be\r
- sample-synchronised when they reside on the same adapter, as most AudioScience adapters\r
- derive their ADC and DAC clocks from one master clock. When combining two adapters\r
- into one full-duplex stream, however, the use of a word clock connection between the\r
- adapters is strongly recommended.\r
-\r
- The HPI interface is inherently blocking, making use of read and write calls to\r
- transfer data between user buffers and driver buffers. The callback interface therefore\r
- requires a helper thread ("callback engine") which periodically transfers data (one thread\r
- per PA stream, in fact). The current implementation explicitly sleeps via Pa_Sleep() until\r
- enough samples can be transferred (select() or poll() would be better, but currently seems\r
- impossible...). The thread implementation makes use of the Unix thread helper functions\r
- and some pthread calls here and there. If a unified PA thread exists, this host API\r
- implementation might also compile on Windows, as this is the only real Linux-specific\r
- part of the code.\r
-\r
- There is no inherent fixed buffer size in the HPI interface, as in some other host APIs.\r
- The PortAudio implementation contains a buffer that is allocated during OpenStream and\r
- used to transfer data between the callback and the HPI driver buffer. The size of this\r
- buffer is quite flexible and is derived from latency suggestions and matched to the\r
- requested callback buffer size as far as possible. It can become quite huge, as the\r
- AudioScience cards are typically geared towards higher-latency applications and contain\r
- large hardware buffers.\r
-\r
- The HPI interface natively supports most common sample formats and sample rates (some\r
- conversion is done on the adapter itself).\r
-\r
- Stream time is measured based on the number of processed frames, which is adjusted by the\r
- number of frames currently buffered by the HPI driver.\r
-\r
- There is basic support for detecting overflow and underflow. The HPI interface does not\r
- explicitly indicate this, so thresholds on buffer levels are used in combination with\r
- stream state. Recovery from overflow and underflow is left to the PA client.\r
-\r
- Blocking streams are also implemented. It makes use of the same polling routines that\r
- the callback interface uses, in order to prevent the allocation of variable-sized\r
- buffers during reading and writing. The framesPerBuffer parameter is therefore still\r
- relevant, and this can be increased in the blocking case to improve efficiency.\r
-\r
- The implementation contains extensive reporting macros (slightly modified PA_ENSURE and\r
- PA_UNLESS versions) and a useful stream dump routine to provide debugging feedback.\r
-\r
- Output buffer priming via the user callback (i.e. paPrimeOutputBuffersUsingStreamCallback\r
- and friends) is not implemented yet. All output is primed with silence.\r
- */\r
-\r
-#include <unistd.h>\r
-#include <stdio.h>\r
-#include <stdlib.h>\r
-#include <string.h> /* strlen() */\r
-#include <pthread.h> /* pthreads and friends */\r
-#include <assert.h> /* assert */\r
-#include <math.h> /* ceil, floor */\r
-\r
-#include <asihpi/hpi.h> /* HPI API */\r
-\r
-#include "portaudio.h" /* PortAudio API */\r
-#include "pa_util.h" /* PA_DEBUG, other small utilities */\r
-#include "pa_unix_util.h" /* Unix threading utilities */\r
-#include "pa_allocation.h" /* Group memory allocation */\r
-#include "pa_hostapi.h" /* Host API structs */\r
-#include "pa_stream.h" /* Stream interface structs */\r
-#include "pa_cpuload.h" /* CPU load measurer */\r
-#include "pa_process.h" /* Buffer processor */\r
-#include "pa_converters.h" /* PaUtilZeroer */\r
-#include "pa_debugprint.h"\r
-\r
-/* -------------------------------------------------------------------------- */\r
-\r
-/*\r
- * Defines\r
- */\r
-\r
-/* Error reporting and assertions */\r
-\r
-/** Evaluate expression, and return on any PortAudio errors */\r
-#define PA_ENSURE_(expr) \\r
- do { \\r
- PaError paError = (expr); \\r
- if( UNLIKELY( paError < paNoError ) ) \\r
- { \\r
- PA_DEBUG(( "Expression '" #expr "' failed in '" __FILE__ "', line: " STRINGIZE( __LINE__ ) "\n" )); \\r
- result = paError; \\r
- goto error; \\r
- } \\r
- } while (0);\r
-\r
-/** Assert expression, else return the provided PaError */\r
-#define PA_UNLESS_(expr, paError) \\r
- do { \\r
- if( UNLIKELY( (expr) == 0 ) ) \\r
- { \\r
- PA_DEBUG(( "Expression '" #expr "' failed in '" __FILE__ "', line: " STRINGIZE( __LINE__ ) "\n" )); \\r
- result = (paError); \\r
- goto error; \\r
- } \\r
- } while( 0 );\r
-\r
-/** Check return value of HPI function, and map it to PaError */\r
-#define PA_ASIHPI_UNLESS_(expr, paError) \\r
- do { \\r
- hpi_err_t hpiError = (expr); \\r
- /* If HPI error occurred */ \\r
- if( UNLIKELY( hpiError ) ) \\r
- { \\r
- char szError[256]; \\r
- HPI_GetErrorText( hpiError, szError ); \\r
- PA_DEBUG(( "HPI error %d occurred: %s\n", hpiError, szError )); \\r
- /* This message will always be displayed, even if debug info is disabled */ \\r
- PA_DEBUG(( "Expression '" #expr "' failed in '" __FILE__ "', line: " STRINGIZE( __LINE__ ) "\n" )); \\r
- if( (paError) == paUnanticipatedHostError ) \\r
- { \\r
- PA_DEBUG(( "Host error description: %s\n", szError )); \\r
- /* PaUtil_SetLastHostErrorInfo should only be used in the main thread */ \\r
- if( pthread_equal( pthread_self(), paUnixMainThread ) ) \\r
- { \\r
- PaUtil_SetLastHostErrorInfo( paInDevelopment, hpiError, szError ); \\r
- } \\r
- } \\r
- /* If paNoError is specified, continue as usual */ \\r
- /* (useful if you only want to print out the debug messages above) */ \\r
- if( (paError) < 0 ) \\r
- { \\r
- result = (paError); \\r
- goto error; \\r
- } \\r
- } \\r
- } while( 0 );\r
-\r
-/** Report HPI error code and text */\r
-#define PA_ASIHPI_REPORT_ERROR_(hpiErrorCode) \\r
- do { \\r
- char szError[256]; \\r
- HPI_GetErrorText( hpiError, szError ); \\r
- PA_DEBUG(( "HPI error %d occurred: %s\n", hpiError, szError )); \\r
- /* PaUtil_SetLastHostErrorInfo should only be used in the main thread */ \\r
- if( pthread_equal( pthread_self(), paUnixMainThread ) ) \\r
- { \\r
- PaUtil_SetLastHostErrorInfo( paInDevelopment, (hpiErrorCode), szError ); \\r
- } \\r
- } while( 0 );\r
-\r
-/* Defaults */\r
-\r
-/** Sample formats available natively on AudioScience hardware */\r
-#define PA_ASIHPI_AVAILABLE_FORMATS_ (paFloat32 | paInt32 | paInt24 | paInt16 | paUInt8)\r
-/** Enable background bus mastering (BBM) for buffer transfers, if available (see HPI docs) */\r
-#define PA_ASIHPI_USE_BBM_ 1\r
-/** Minimum number of frames in HPI buffer (for either data or available space).\r
- If buffer contains less data/space, it indicates xrun or completion. */\r
-#define PA_ASIHPI_MIN_FRAMES_ 1152\r
-/** Minimum polling interval in milliseconds, which determines minimum host buffer size */\r
-#define PA_ASIHPI_MIN_POLLING_INTERVAL_ 10\r
-\r
-/* -------------------------------------------------------------------------- */\r
-\r
-/*\r
- * Structures\r
- */\r
-\r
-/** Host API global data */\r
-typedef struct PaAsiHpiHostApiRepresentation\r
-{\r
- /* PortAudio "base class" - keep the baseRep first! (C-style inheritance) */\r
- PaUtilHostApiRepresentation baseHostApiRep;\r
- PaUtilStreamInterface callbackStreamInterface;\r
- PaUtilStreamInterface blockingStreamInterface;\r
-\r
- PaUtilAllocationGroup *allocations;\r
-\r
- /* implementation specific data goes here */\r
-\r
- PaHostApiIndex hostApiIndex;\r
-}\r
-PaAsiHpiHostApiRepresentation;\r
-\r
-\r
-/** Device data */\r
-typedef struct PaAsiHpiDeviceInfo\r
-{\r
- /* PortAudio "base class" - keep the baseRep first! (C-style inheritance) */\r
- /** Common PortAudio device information */\r
- PaDeviceInfo baseDeviceInfo;\r
-\r
- /* implementation specific data goes here */\r
-\r
- /** Adapter index */\r
- uint16_t adapterIndex;\r
- /** Adapter model number (hex) */\r
- uint16_t adapterType;\r
- /** Adapter HW/SW version */\r
- uint16_t adapterVersion;\r
- /** Adapter serial number */\r
- uint32_t adapterSerialNumber;\r
- /** Stream number */\r
- uint16_t streamIndex;\r
- /** 0=Input, 1=Output (HPI streams are either input or output but not both) */\r
- uint16_t streamIsOutput;\r
-}\r
-PaAsiHpiDeviceInfo;\r
-\r
-\r
-/** Stream state as defined by PortAudio.\r
- It seems that the host API implementation has to keep track of the PortAudio stream state.\r
- Please note that this is NOT the same as the state of the underlying HPI stream. By separating\r
- these two concepts, a lot of flexibility is gained. There is a rough match between the two,\r
- of course, but forcing a precise match is difficult. For example, HPI_STATE_DRAINED can occur\r
- during the Active state of PortAudio (due to underruns) and also during CallBackFinished in\r
- the case of an output stream. Similarly, HPI_STATE_STOPPED mostly coincides with the Stopped\r
- PortAudio state, by may also occur in the CallbackFinished state when recording is finished.\r
-\r
- Here is a rough match-up:\r
-\r
- PortAudio state => HPI state\r
- --------------- ---------\r
- Active => HPI_STATE_RECORDING, HPI_STATE_PLAYING, (HPI_STATE_DRAINED)\r
- Stopped => HPI_STATE_STOPPED\r
- CallbackFinished => HPI_STATE_STOPPED, HPI_STATE_DRAINED */\r
-typedef enum PaAsiHpiStreamState\r
-{\r
- paAsiHpiStoppedState=0,\r
- paAsiHpiActiveState=1,\r
- paAsiHpiCallbackFinishedState=2\r
-}\r
-PaAsiHpiStreamState;\r
-\r
-\r
-/** Stream component data (associated with one direction, i.e. either input or output) */\r
-typedef struct PaAsiHpiStreamComponent\r
-{\r
- /** Device information (HPI handles, etc) */\r
- PaAsiHpiDeviceInfo *hpiDevice;\r
- /** Stream handle, as passed to HPI interface. */\r
- hpi_handle_t hpiStream;\r
- /** Stream format, as passed to HPI interface */\r
- struct hpi_format hpiFormat;\r
- /** Number of bytes per frame, derived from hpiFormat and saved for convenience */\r
- uint32_t bytesPerFrame;\r
- /** Size of hardware (on-card) buffer of stream in bytes */\r
- uint32_t hardwareBufferSize;\r
- /** Size of host (BBM) buffer of stream in bytes (if used) */\r
- uint32_t hostBufferSize;\r
- /** Upper limit on the utilization of output stream buffer (both hardware and host).\r
- This prevents large latencies in an output-only stream with a potentially huge buffer\r
- and a fast data generator, which would otherwise keep the hardware buffer filled to\r
- capacity. See also the "Hardware Buffering=off" option in the AudioScience WAV driver. */\r
- uint32_t outputBufferCap;\r
- /** Sample buffer (halfway station between HPI and buffer processor) */\r
- uint8_t *tempBuffer;\r
- /** Sample buffer size, in bytes */\r
- uint32_t tempBufferSize;\r
-}\r
-PaAsiHpiStreamComponent;\r
-\r
-\r
-/** Stream data */\r
-typedef struct PaAsiHpiStream\r
-{\r
- /* PortAudio "base class" - keep the baseRep first! (C-style inheritance) */\r
- PaUtilStreamRepresentation baseStreamRep;\r
- PaUtilCpuLoadMeasurer cpuLoadMeasurer;\r
- PaUtilBufferProcessor bufferProcessor;\r
-\r
- PaUtilAllocationGroup *allocations;\r
-\r
- /* implementation specific data goes here */\r
-\r
- /** Separate structs for input and output sides of stream */\r
- PaAsiHpiStreamComponent *input, *output;\r
-\r
- /** Polling interval (in milliseconds) */\r
- uint32_t pollingInterval;\r
- /** Are we running in callback mode? */\r
- int callbackMode;\r
- /** Number of frames to transfer at a time to/from HPI */\r
- unsigned long maxFramesPerHostBuffer;\r
- /** Indicates that the stream is in the paNeverDropInput mode */\r
- int neverDropInput;\r
- /** Contains copy of user buffers, used by blocking interface to transfer non-interleaved data.\r
- It went here instead of to each stream component, as the stream component buffer setup in\r
- PaAsiHpi_SetupBuffers doesn't know the stream details such as callbackMode.\r
- (Maybe a problem later if ReadStream and WriteStream happens concurrently on same stream.) */\r
- void **blockingUserBufferCopy;\r
-\r
- /* Thread-related variables */\r
-\r
- /** Helper thread which will deliver data to user callback */\r
- PaUnixThread thread;\r
- /** PortAudio stream state (Active/Stopped/CallbackFinished) */\r
- volatile sig_atomic_t state;\r
- /** Hard abort, i.e. drop frames? */\r
- volatile sig_atomic_t callbackAbort;\r
- /** True if stream stopped via exiting callback with paComplete/paAbort flag\r
- (as opposed to explicit call to StopStream/AbortStream) */\r
- volatile sig_atomic_t callbackFinished;\r
-}\r
-PaAsiHpiStream;\r
-\r
-\r
-/** Stream state information, collected together for convenience */\r
-typedef struct PaAsiHpiStreamInfo\r
-{\r
- /** HPI stream state (HPI_STATE_STOPPED, HPI_STATE_PLAYING, etc.) */\r
- uint16_t state;\r
- /** Size (in bytes) of recording/playback data buffer in HPI driver */\r
- uint32_t bufferSize;\r
- /** Amount of data (in bytes) available in the buffer */\r
- uint32_t dataSize;\r
- /** Number of frames played/recorded since last stream reset */\r
- uint32_t frameCounter;\r
- /** Amount of data (in bytes) in hardware (on-card) buffer.\r
- This differs from dataSize if bus mastering (BBM) is used, which introduces another\r
- driver-level buffer to which dataSize/bufferSize then refers. */\r
- uint32_t auxDataSize;\r
- /** Total number of data frames currently buffered by HPI driver (host + hw buffers) */\r
- uint32_t totalBufferedData;\r
- /** Size of immediately available data (for input) or space (for output) in frames.\r
- This only checks the first-level buffer (typically host buffer). This amount can be\r
- transferred immediately. */\r
- uint32_t availableFrames;\r
- /** Indicates that hardware buffer is getting too full */\r
- int overflow;\r
- /** Indicates that hardware buffer is getting too empty */\r
- int underflow;\r
-}\r
-PaAsiHpiStreamInfo;\r
-\r
-/* -------------------------------------------------------------------------- */\r
-\r
-/*\r
- * Function prototypes\r
- */\r
-\r
-#ifdef __cplusplus\r
-extern "C"\r
-{\r
-#endif /* __cplusplus */\r
-\r
- /* The only exposed function in the entire host API implementation */\r
- PaError PaAsiHpi_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );\r
-\r
-#ifdef __cplusplus\r
-}\r
-#endif /* __cplusplus */\r
-\r
-static void Terminate( struct PaUtilHostApiRepresentation *hostApi );\r
-static PaError IsFormatSupported( struct PaUtilHostApiRepresentation *hostApi,\r
- const PaStreamParameters *inputParameters,\r
- const PaStreamParameters *outputParameters,\r
- double sampleRate );\r
-\r
-/* Stream prototypes */\r
-static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,\r
- PaStream **s,\r
- const PaStreamParameters *inputParameters,\r
- const PaStreamParameters *outputParameters,\r
- double sampleRate,\r
- unsigned long framesPerBuffer,\r
- PaStreamFlags streamFlags,\r
- PaStreamCallback *streamCallback,\r
- void *userData );\r
-static PaError CloseStream( PaStream *s );\r
-static PaError StartStream( PaStream *s );\r
-static PaError StopStream( PaStream *s );\r
-static PaError AbortStream( PaStream *s );\r
-static PaError IsStreamStopped( PaStream *s );\r
-static PaError IsStreamActive( PaStream *s );\r
-static PaTime GetStreamTime( PaStream *s );\r
-static double GetStreamCpuLoad( PaStream *s );\r
-\r
-/* Blocking prototypes */\r
-static PaError ReadStream( PaStream *s, void *buffer, unsigned long frames );\r
-static PaError WriteStream( PaStream *s, const void *buffer, unsigned long frames );\r
-static signed long GetStreamReadAvailable( PaStream *s );\r
-static signed long GetStreamWriteAvailable( PaStream *s );\r
-\r
-/* Callback prototypes */\r
-static void *CallbackThreadFunc( void *userData );\r
-\r
-/* Functions specific to this API */\r
-static PaError PaAsiHpi_BuildDeviceList( PaAsiHpiHostApiRepresentation *hpiHostApi );\r
-static uint16_t PaAsiHpi_PaToHpiFormat( PaSampleFormat paFormat );\r
-static PaSampleFormat PaAsiHpi_HpiToPaFormat( uint16_t hpiFormat );\r
-static PaError PaAsiHpi_CreateFormat( struct PaUtilHostApiRepresentation *hostApi,\r
- const PaStreamParameters *parameters, double sampleRate,\r
- PaAsiHpiDeviceInfo **hpiDevice, struct hpi_format *hpiFormat );\r
-static PaError PaAsiHpi_OpenInput( struct PaUtilHostApiRepresentation *hostApi,\r
- const PaAsiHpiDeviceInfo *hpiDevice, const struct hpi_format *hpiFormat,\r
- hpi_handle_t *hpiStream );\r
-static PaError PaAsiHpi_OpenOutput( struct PaUtilHostApiRepresentation *hostApi,\r
- const PaAsiHpiDeviceInfo *hpiDevice, const struct hpi_format *hpiFormat,\r
- hpi_handle_t *hpiStream );\r
-static PaError PaAsiHpi_GetStreamInfo( PaAsiHpiStreamComponent *streamComp, PaAsiHpiStreamInfo *info );\r
-static void PaAsiHpi_StreamComponentDump( PaAsiHpiStreamComponent *streamComp, PaAsiHpiStream *stream );\r
-static void PaAsiHpi_StreamDump( PaAsiHpiStream *stream );\r
-static PaError PaAsiHpi_SetupBuffers( PaAsiHpiStreamComponent *streamComp, uint32_t pollingInterval,\r
- unsigned long framesPerPaHostBuffer, PaTime suggestedLatency );\r
-static PaError PaAsiHpi_PrimeOutputWithSilence( PaAsiHpiStream *stream );\r
-static PaError PaAsiHpi_StartStream( PaAsiHpiStream *stream, int outputPrimed );\r
-static PaError PaAsiHpi_StopStream( PaAsiHpiStream *stream, int abort );\r
-static PaError PaAsiHpi_ExplicitStop( PaAsiHpiStream *stream, int abort );\r
-static void PaAsiHpi_OnThreadExit( void *userData );\r
-static PaError PaAsiHpi_WaitForFrames( PaAsiHpiStream *stream, unsigned long *framesAvail,\r
- PaStreamCallbackFlags *cbFlags );\r
-static void PaAsiHpi_CalculateTimeInfo( PaAsiHpiStream *stream, PaStreamCallbackTimeInfo *timeInfo );\r
-static PaError PaAsiHpi_BeginProcessing( PaAsiHpiStream* stream, unsigned long* numFrames,\r
- PaStreamCallbackFlags *cbFlags );\r
-static PaError PaAsiHpi_EndProcessing( PaAsiHpiStream *stream, unsigned long numFrames,\r
- PaStreamCallbackFlags *cbFlags );\r
-\r
-/* ==========================================================================\r
- * ============================= IMPLEMENTATION =============================\r
- * ========================================================================== */\r
-\r
-/* --------------------------- Host API Interface --------------------------- */\r
-\r
-/** Enumerate all PA devices (= HPI streams).\r
- This compiles a list of all HPI adapters, and registers a PA device for each input and\r
- output stream it finds. Most errors are ignored, as missing or erroneous devices are\r
- simply skipped.\r
-\r
- @param hpiHostApi Pointer to HPI host API struct\r
-\r
- @return PortAudio error code (only paInsufficientMemory in practice)\r
- */\r
-static PaError PaAsiHpi_BuildDeviceList( PaAsiHpiHostApiRepresentation *hpiHostApi )\r
-{\r
- PaError result = paNoError;\r
- PaUtilHostApiRepresentation *hostApi = &hpiHostApi->baseHostApiRep;\r
- PaHostApiInfo *baseApiInfo = &hostApi->info;\r
- PaAsiHpiDeviceInfo *hpiDeviceList;\r
- int numAdapters;\r
- hpi_err_t hpiError = 0;\r
- int i, j, deviceCount = 0, deviceIndex = 0;\r
-\r
- assert( hpiHostApi );\r
-\r
- /* Errors not considered critical here (subsystem may report 0 devices), but report them */\r
- /* in debug mode. */\r
- PA_ASIHPI_UNLESS_( HPI_SubSysGetNumAdapters( NULL, &numAdapters), paNoError );\r
-\r
- for( i=0; i < numAdapters; ++i )\r
- {\r
- uint16_t inStreams, outStreams;\r
- uint16_t version;\r
- uint32_t serial;\r
- uint16_t type;\r
- uint32_t idx;\r
-\r
- hpiError = HPI_SubSysGetAdapter(NULL, i, &idx, &type);\r
- if (hpiError)\r
- continue;\r
-\r
- /* Try to open adapter */\r
- hpiError = HPI_AdapterOpen( NULL, idx );\r
- /* Report error and skip to next device on failure */\r
- if( hpiError )\r
- {\r
- PA_ASIHPI_REPORT_ERROR_( hpiError );\r
- continue;\r
- }\r
- hpiError = HPI_AdapterGetInfo( NULL, idx, &outStreams, &inStreams,\r
- &version, &serial, &type );\r
- /* Skip to next device on failure */\r
- if( hpiError )\r
- {\r
- PA_ASIHPI_REPORT_ERROR_( hpiError );\r
- continue;\r
- }\r
- else\r
- {\r
- /* Assign default devices if available and increment device count */\r
- if( (baseApiInfo->defaultInputDevice == paNoDevice) && (inStreams > 0) )\r
- baseApiInfo->defaultInputDevice = deviceCount;\r
- deviceCount += inStreams;\r
- if( (baseApiInfo->defaultOutputDevice == paNoDevice) && (outStreams > 0) )\r
- baseApiInfo->defaultOutputDevice = deviceCount;\r
- deviceCount += outStreams;\r
- }\r
- }\r
-\r
- /* Register any discovered devices */\r
- if( deviceCount > 0 )\r
- {\r
- /* Memory allocation */\r
- PA_UNLESS_( hostApi->deviceInfos = (PaDeviceInfo**) PaUtil_GroupAllocateMemory(\r
- hpiHostApi->allocations, sizeof(PaDeviceInfo*) * deviceCount ),\r
- paInsufficientMemory );\r
- /* Allocate all device info structs in a contiguous block */\r
- PA_UNLESS_( hpiDeviceList = (PaAsiHpiDeviceInfo*) PaUtil_GroupAllocateMemory(\r
- hpiHostApi->allocations, sizeof(PaAsiHpiDeviceInfo) * deviceCount ),\r
- paInsufficientMemory );\r
-\r
- /* Now query devices again for information */\r
- for( i=0; i < numAdapters; ++i )\r
- {\r
- uint16_t inStreams, outStreams;\r
- uint16_t version;\r
- uint32_t serial;\r
- uint16_t type;\r
- uint32_t idx;\r
-\r
- hpiError = HPI_SubSysGetAdapter( NULL, i, &idx, &type );\r
- if (hpiError)\r
- continue;\r
-\r
- /* Assume adapter is still open from previous round */\r
- hpiError = HPI_AdapterGetInfo( NULL, idx,\r
- &outStreams, &inStreams, &version, &serial, &type );\r
- /* Report error and skip to next device on failure */\r
- if( hpiError )\r
- {\r
- PA_ASIHPI_REPORT_ERROR_( hpiError );\r
- continue;\r
- }\r
- else\r
- {\r
- PA_DEBUG(( "Found HPI Adapter ID=%4X Idx=%d #In=%d #Out=%d S/N=%d HWver=%c%d DSPver=%03d\n",\r
- type, idx, inStreams, outStreams, serial,\r
- ((version>>3)&0xf)+'A', /* Hw version major */\r
- version&0x7, /* Hw version minor */\r
- ((version>>13)*100)+((version>>7)&0x3f) /* DSP code version */\r
- ));\r
- }\r
-\r
- /* First add all input streams as devices */\r
- for( j=0; j < inStreams; ++j )\r
- {\r
- PaAsiHpiDeviceInfo *hpiDevice = &hpiDeviceList[deviceIndex];\r
- PaDeviceInfo *baseDeviceInfo = &hpiDevice->baseDeviceInfo;\r
- char srcName[72];\r
- char *deviceName;\r
-\r
- memset( hpiDevice, 0, sizeof(PaAsiHpiDeviceInfo) );\r
- /* Set implementation-specific device details */\r
- hpiDevice->adapterIndex = idx;\r
- hpiDevice->adapterType = type;\r
- hpiDevice->adapterVersion = version;\r
- hpiDevice->adapterSerialNumber = serial;\r
- hpiDevice->streamIndex = j;\r
- hpiDevice->streamIsOutput = 0;\r
- /* Set common PortAudio device stats */\r
- baseDeviceInfo->structVersion = 2;\r
- /* Make sure name string is owned by API info structure */\r
- sprintf( srcName,\r
- "Adapter %d (%4X) - Input Stream %d", i+1, type, j+1 );\r
- PA_UNLESS_( deviceName = (char *) PaUtil_GroupAllocateMemory(\r
- hpiHostApi->allocations, strlen(srcName) + 1 ), paInsufficientMemory );\r
- strcpy( deviceName, srcName );\r
- baseDeviceInfo->name = deviceName;\r
- baseDeviceInfo->hostApi = hpiHostApi->hostApiIndex;\r
- baseDeviceInfo->maxInputChannels = HPI_MAX_CHANNELS;\r
- baseDeviceInfo->maxOutputChannels = 0;\r
- /* Default latency values for interactive performance */\r
- baseDeviceInfo->defaultLowInputLatency = 0.01;\r
- baseDeviceInfo->defaultLowOutputLatency = -1.0;\r
- /* Default latency values for robust non-interactive applications (eg. playing sound files) */\r
- baseDeviceInfo->defaultHighInputLatency = 0.2;\r
- baseDeviceInfo->defaultHighOutputLatency = -1.0;\r
- /* HPI interface can actually handle any sampling rate to 1 Hz accuracy,\r
- * so this default is as good as any */\r
- baseDeviceInfo->defaultSampleRate = 44100;\r
-\r
- /* Store device in global PortAudio list */\r
- hostApi->deviceInfos[deviceIndex++] = (PaDeviceInfo *) hpiDevice;\r
- }\r
-\r
- /* Now add all output streams as devices (I know, the repetition is painful) */\r
- for( j=0; j < outStreams; ++j )\r
- {\r
- PaAsiHpiDeviceInfo *hpiDevice = &hpiDeviceList[deviceIndex];\r
- PaDeviceInfo *baseDeviceInfo = &hpiDevice->baseDeviceInfo;\r
- char srcName[72];\r
- char *deviceName;\r
-\r
- memset( hpiDevice, 0, sizeof(PaAsiHpiDeviceInfo) );\r
- /* Set implementation-specific device details */\r
- hpiDevice->adapterIndex = idx;\r
- hpiDevice->adapterType = type;\r
- hpiDevice->adapterVersion = version;\r
- hpiDevice->adapterSerialNumber = serial;\r
- hpiDevice->streamIndex = j;\r
- hpiDevice->streamIsOutput = 1;\r
- /* Set common PortAudio device stats */\r
- baseDeviceInfo->structVersion = 2;\r
- /* Make sure name string is owned by API info structure */\r
- sprintf( srcName,\r
- "Adapter %d (%4X) - Output Stream %d", i+1, type, j+1 );\r
- PA_UNLESS_( deviceName = (char *) PaUtil_GroupAllocateMemory(\r
- hpiHostApi->allocations, strlen(srcName) + 1 ), paInsufficientMemory );\r
- strcpy( deviceName, srcName );\r
- baseDeviceInfo->name = deviceName;\r
- baseDeviceInfo->hostApi = hpiHostApi->hostApiIndex;\r
- baseDeviceInfo->maxInputChannels = 0;\r
- baseDeviceInfo->maxOutputChannels = HPI_MAX_CHANNELS;\r
- /* Default latency values for interactive performance. */\r
- baseDeviceInfo->defaultLowInputLatency = -1.0;\r
- baseDeviceInfo->defaultLowOutputLatency = 0.01;\r
- /* Default latency values for robust non-interactive applications (eg. playing sound files). */\r
- baseDeviceInfo->defaultHighInputLatency = -1.0;\r
- baseDeviceInfo->defaultHighOutputLatency = 0.2;\r
- /* HPI interface can actually handle any sampling rate to 1 Hz accuracy,\r
- * so this default is as good as any */\r
- baseDeviceInfo->defaultSampleRate = 44100;\r
-\r
- /* Store device in global PortAudio list */\r
- hostApi->deviceInfos[deviceIndex++] = (PaDeviceInfo *) hpiDevice;\r
- }\r
- }\r
- }\r
-\r
- /* Finally acknowledge checked devices */\r
- baseApiInfo->deviceCount = deviceIndex;\r
-\r
-error:\r
- return result;\r
-}\r
-\r
-\r
-/** Initialize host API implementation.\r
- This is the only function exported beyond this file. It is called by PortAudio to initialize\r
- the host API. It stores API info, finds and registers all devices, and sets up callback and\r
- blocking interfaces.\r
-\r
- @param hostApi Pointer to host API struct\r
-\r
- @param hostApiIndex Index of current (HPI) host API\r
-\r
- @return PortAudio error code\r
- */\r
-PaError PaAsiHpi_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex hostApiIndex )\r
-{\r
- PaError result = paNoError;\r
- PaAsiHpiHostApiRepresentation *hpiHostApi = NULL;\r
- PaHostApiInfo *baseApiInfo;\r
-\r
- /* Try to initialize HPI subsystem */\r
- if (!HPI_SubSysCreate())\r
- {\r
- /* the V19 development docs say that if an implementation\r
- * detects that it cannot be used, it should return a NULL\r
- * interface and paNoError */\r
- PA_DEBUG(( "Could not open HPI interface\n" ));\r
-\r
- *hostApi = NULL;\r
- return paNoError;\r
- }\r
- else\r
- {\r
- uint32_t hpiVersion;\r
- PA_ASIHPI_UNLESS_( HPI_SubSysGetVersionEx( NULL, &hpiVersion ), paUnanticipatedHostError );\r
- PA_DEBUG(( "HPI interface v%d.%02d.%02d\n",\r
- hpiVersion >> 16, (hpiVersion >> 8) & 0x0F, (hpiVersion & 0x0F) ));\r
- }\r
-\r
- /* Allocate host API structure */\r
- PA_UNLESS_( hpiHostApi = (PaAsiHpiHostApiRepresentation*) PaUtil_AllocateMemory(\r
- sizeof(PaAsiHpiHostApiRepresentation) ), paInsufficientMemory );\r
- PA_UNLESS_( hpiHostApi->allocations = PaUtil_CreateAllocationGroup(), paInsufficientMemory );\r
-\r
- hpiHostApi->hostApiIndex = hostApiIndex;\r
-\r
- *hostApi = &hpiHostApi->baseHostApiRep;\r
- baseApiInfo = &((*hostApi)->info);\r
- /* Fill in common API details */\r
- baseApiInfo->structVersion = 1;\r
- baseApiInfo->type = paAudioScienceHPI;\r
- baseApiInfo->name = "AudioScience HPI";\r
- baseApiInfo->deviceCount = 0;\r
- baseApiInfo->defaultInputDevice = paNoDevice;\r
- baseApiInfo->defaultOutputDevice = paNoDevice;\r
-\r
- PA_ENSURE_( PaAsiHpi_BuildDeviceList( hpiHostApi ) );\r
-\r
- (*hostApi)->Terminate = Terminate;\r
- (*hostApi)->OpenStream = OpenStream;\r
- (*hostApi)->IsFormatSupported = IsFormatSupported;\r
-\r
- PaUtil_InitializeStreamInterface( &hpiHostApi->callbackStreamInterface, CloseStream, StartStream,\r
- StopStream, AbortStream, IsStreamStopped, IsStreamActive,\r
- GetStreamTime, GetStreamCpuLoad,\r
- PaUtil_DummyRead, PaUtil_DummyWrite,\r
- PaUtil_DummyGetReadAvailable, PaUtil_DummyGetWriteAvailable );\r
-\r
- PaUtil_InitializeStreamInterface( &hpiHostApi->blockingStreamInterface, CloseStream, StartStream,\r
- StopStream, AbortStream, IsStreamStopped, IsStreamActive,\r
- GetStreamTime, PaUtil_DummyGetCpuLoad,\r
- ReadStream, WriteStream, GetStreamReadAvailable, GetStreamWriteAvailable );\r
-\r
- /* Store identity of main thread */\r
- PA_ENSURE_( PaUnixThreading_Initialize() );\r
-\r
- return result;\r
-error:\r
- if (hpiHostApi)\r
- PaUtil_FreeMemory( hpiHostApi );\r
- return result;\r
-}\r
-\r
-\r
-/** Terminate host API implementation.\r
- This closes all HPI adapters and frees the HPI subsystem. It also frees the host API struct\r
- memory. It should be called once for every PaAsiHpi_Initialize call.\r
-\r
- @param Pointer to host API struct\r
- */\r
-static void Terminate( struct PaUtilHostApiRepresentation *hostApi )\r
-{\r
- PaAsiHpiHostApiRepresentation *hpiHostApi = (PaAsiHpiHostApiRepresentation*)hostApi;\r
- int i;\r
- PaError result = paNoError;\r
-\r
- if( hpiHostApi )\r
- {\r
- /* Get rid of HPI-specific structures */\r
- uint16_t lastAdapterIndex = HPI_MAX_ADAPTERS;\r
- /* Iterate through device list and close adapters */\r
- for( i=0; i < hostApi->info.deviceCount; ++i )\r
- {\r
- PaAsiHpiDeviceInfo *hpiDevice = (PaAsiHpiDeviceInfo *) hostApi->deviceInfos[ i ];\r
- /* Close adapter only if it differs from previous one */\r
- if( hpiDevice->adapterIndex != lastAdapterIndex )\r
- {\r
- /* Ignore errors (report only during debugging) */\r
- PA_ASIHPI_UNLESS_( HPI_AdapterClose( NULL,\r
- hpiDevice->adapterIndex ), paNoError );\r
- lastAdapterIndex = hpiDevice->adapterIndex;\r
- }\r
- }\r
- /* Finally dismantle HPI subsystem */\r
- HPI_SubSysFree( NULL );\r
-\r
- if( hpiHostApi->allocations )\r
- {\r
- PaUtil_FreeAllAllocations( hpiHostApi->allocations );\r
- PaUtil_DestroyAllocationGroup( hpiHostApi->allocations );\r
- }\r
-\r
- PaUtil_FreeMemory( hpiHostApi );\r
- }\r
-error:\r
- return;\r
-}\r
-\r
-\r
-/** Converts PortAudio sample format to equivalent HPI format.\r
-\r
- @param paFormat PortAudio sample format\r
-\r
- @return HPI sample format\r
- */\r
-static uint16_t PaAsiHpi_PaToHpiFormat( PaSampleFormat paFormat )\r
-{\r
- /* Ignore interleaving flag */\r
- switch( paFormat & ~paNonInterleaved )\r
- {\r
- case paFloat32:\r
- return HPI_FORMAT_PCM32_FLOAT;\r
-\r
- case paInt32:\r
- return HPI_FORMAT_PCM32_SIGNED;\r
-\r
- case paInt24:\r
- return HPI_FORMAT_PCM24_SIGNED;\r
-\r
- case paInt16:\r
- return HPI_FORMAT_PCM16_SIGNED;\r
-\r
- case paUInt8:\r
- return HPI_FORMAT_PCM8_UNSIGNED;\r
-\r
- /* Default is 16-bit signed */\r
- case paInt8:\r
- default:\r
- return HPI_FORMAT_PCM16_SIGNED;\r
- }\r
-}\r
-\r
-\r
-/** Converts HPI sample format to equivalent PortAudio format.\r
-\r
- @param paFormat HPI sample format\r
-\r
- @return PortAudio sample format\r
- */\r
-static PaSampleFormat PaAsiHpi_HpiToPaFormat( uint16_t hpiFormat )\r
-{\r
- switch( hpiFormat )\r
- {\r
- case HPI_FORMAT_PCM32_FLOAT:\r
- return paFloat32;\r
-\r
- case HPI_FORMAT_PCM32_SIGNED:\r
- return paInt32;\r
-\r
- case HPI_FORMAT_PCM24_SIGNED:\r
- return paInt24;\r
-\r
- case HPI_FORMAT_PCM16_SIGNED:\r
- return paInt16;\r
-\r
- case HPI_FORMAT_PCM8_UNSIGNED:\r
- return paUInt8;\r
-\r
- /* Default is custom format (e.g. for HPI MP3 format) */\r
- default:\r
- return paCustomFormat;\r
- }\r
-}\r
-\r
-\r
-/** Creates HPI format struct based on PortAudio parameters.\r
- This also does some checks to see whether the desired format is valid, and whether\r
- the device allows it. This only checks the format of one half (input or output) of the\r
- PortAudio stream.\r
-\r
- @param hostApi Pointer to host API struct\r
-\r
- @param parameters Pointer to stream parameter struct\r
-\r
- @param sampleRate Desired sample rate\r
-\r
- @param hpiDevice Pointer to HPI device struct\r
-\r
- @param hpiFormat Resulting HPI format returned here\r
-\r
- @return PortAudio error code (typically indicating a problem with stream format)\r
- */\r
-static PaError PaAsiHpi_CreateFormat( struct PaUtilHostApiRepresentation *hostApi,\r
- const PaStreamParameters *parameters, double sampleRate,\r
- PaAsiHpiDeviceInfo **hpiDevice, struct hpi_format *hpiFormat )\r
-{\r
- int maxChannelCount = 0;\r
- PaSampleFormat hostSampleFormat = 0;\r
- hpi_err_t hpiError = 0;\r
-\r
- /* Unless alternate device specification is supported, reject the use of\r
- paUseHostApiSpecificDeviceSpecification */\r
- if( parameters->device == paUseHostApiSpecificDeviceSpecification )\r
- return paInvalidDevice;\r
- else\r
- {\r
- assert( parameters->device < hostApi->info.deviceCount );\r
- *hpiDevice = (PaAsiHpiDeviceInfo*) hostApi->deviceInfos[ parameters->device ];\r
- }\r
-\r
- /* Validate streamInfo - this implementation doesn't use custom stream info */\r
- if( parameters->hostApiSpecificStreamInfo )\r
- return paIncompatibleHostApiSpecificStreamInfo;\r
-\r
- /* Check that device can support channel count */\r
- if( (*hpiDevice)->streamIsOutput )\r
- {\r
- maxChannelCount = (*hpiDevice)->baseDeviceInfo.maxOutputChannels;\r
- }\r
- else\r
- {\r
- maxChannelCount = (*hpiDevice)->baseDeviceInfo.maxInputChannels;\r
- }\r
- if( (maxChannelCount == 0) || (parameters->channelCount > maxChannelCount) )\r
- return paInvalidChannelCount;\r
-\r
- /* All standard sample formats are supported by the buffer adapter,\r
- and this implementation doesn't support any custom sample formats */\r
- if( parameters->sampleFormat & paCustomFormat )\r
- return paSampleFormatNotSupported;\r
-\r
- /* Switch to closest HPI native format */\r
- hostSampleFormat = PaUtil_SelectClosestAvailableFormat(PA_ASIHPI_AVAILABLE_FORMATS_,\r
- parameters->sampleFormat );\r
- /* Setup format + info objects */\r
- hpiError = HPI_FormatCreate( hpiFormat, (uint16_t)parameters->channelCount,\r
- PaAsiHpi_PaToHpiFormat( hostSampleFormat ),\r
- (uint32_t)sampleRate, 0, 0 );\r
- if( hpiError )\r
- {\r
- PA_ASIHPI_REPORT_ERROR_( hpiError );\r
- switch( hpiError )\r
- {\r
- case HPI_ERROR_INVALID_FORMAT:\r
- return paSampleFormatNotSupported;\r
-\r
- case HPI_ERROR_INVALID_SAMPLERATE:\r
- case HPI_ERROR_INCOMPATIBLE_SAMPLERATE:\r
- return paInvalidSampleRate;\r
-\r
- case HPI_ERROR_INVALID_CHANNELS:\r
- return paInvalidChannelCount;\r
- }\r
- }\r
-\r
- return paNoError;\r
-}\r
-\r
-\r
-/** Open HPI input stream with given format.\r
- This attempts to open HPI input stream with desired format. If the format is not supported\r
- or the device is unavailable, the stream is closed and a PortAudio error code is returned.\r
-\r
- @param hostApi Pointer to host API struct\r
-\r
- @param hpiDevice Pointer to HPI device struct\r
-\r
- @param hpiFormat Pointer to HPI format struct\r
-\r
- @return PortAudio error code (typically indicating a problem with stream format or device)\r
-*/\r
-static PaError PaAsiHpi_OpenInput( struct PaUtilHostApiRepresentation *hostApi,\r
- const PaAsiHpiDeviceInfo *hpiDevice, const struct hpi_format *hpiFormat,\r
- hpi_handle_t *hpiStream )\r
-{\r
- PaAsiHpiHostApiRepresentation *hpiHostApi = (PaAsiHpiHostApiRepresentation*)hostApi;\r
- PaError result = paNoError;\r
- hpi_err_t hpiError = 0;\r
-\r
- /* Catch misplaced output devices, as they typically have 0 input channels */\r
- PA_UNLESS_( !hpiDevice->streamIsOutput, paInvalidChannelCount );\r
- /* Try to open input stream */\r
- PA_ASIHPI_UNLESS_( HPI_InStreamOpen( NULL, hpiDevice->adapterIndex,\r
- hpiDevice->streamIndex, hpiStream ), paDeviceUnavailable );\r
- /* Set input format (checking it in the process) */\r
- /* Could also use HPI_InStreamQueryFormat, but this economizes the process */\r
- hpiError = HPI_InStreamSetFormat( NULL, *hpiStream, (struct hpi_format*)hpiFormat );\r
- if( hpiError )\r
- {\r
- PA_ASIHPI_REPORT_ERROR_( hpiError );\r
- PA_ASIHPI_UNLESS_( HPI_InStreamClose( NULL, *hpiStream ), paNoError );\r
- switch( hpiError )\r
- {\r
- case HPI_ERROR_INVALID_FORMAT:\r
- return paSampleFormatNotSupported;\r
-\r
- case HPI_ERROR_INVALID_SAMPLERATE:\r
- case HPI_ERROR_INCOMPATIBLE_SAMPLERATE:\r
- return paInvalidSampleRate;\r
-\r
- case HPI_ERROR_INVALID_CHANNELS:\r
- return paInvalidChannelCount;\r
-\r
- default:\r
- /* In case anything else went wrong */\r
- return paInvalidDevice;\r
- }\r
- }\r
-\r
-error:\r
- return result;\r
-}\r
-\r
-\r
-/** Open HPI output stream with given format.\r
- This attempts to open HPI output stream with desired format. If the format is not supported\r
- or the device is unavailable, the stream is closed and a PortAudio error code is returned.\r
-\r
- @param hostApi Pointer to host API struct\r
-\r
- @param hpiDevice Pointer to HPI device struct\r
-\r
- @param hpiFormat Pointer to HPI format struct\r
-\r
- @return PortAudio error code (typically indicating a problem with stream format or device)\r
-*/\r
-static PaError PaAsiHpi_OpenOutput( struct PaUtilHostApiRepresentation *hostApi,\r
- const PaAsiHpiDeviceInfo *hpiDevice, const struct hpi_format *hpiFormat,\r
- hpi_handle_t *hpiStream )\r
-{\r
- PaAsiHpiHostApiRepresentation *hpiHostApi = (PaAsiHpiHostApiRepresentation*)hostApi;\r
- PaError result = paNoError;\r
- hpi_err_t hpiError = 0;\r
-\r
- /* Catch misplaced input devices, as they typically have 0 output channels */\r
- PA_UNLESS_( hpiDevice->streamIsOutput, paInvalidChannelCount );\r
- /* Try to open output stream */\r
- PA_ASIHPI_UNLESS_( HPI_OutStreamOpen( NULL, hpiDevice->adapterIndex,\r
- hpiDevice->streamIndex, hpiStream ), paDeviceUnavailable );\r
-\r
- /* Check output format (format is set on first write to output stream) */\r
- hpiError = HPI_OutStreamQueryFormat( NULL, *hpiStream, (struct hpi_format*)hpiFormat );\r
- if( hpiError )\r
- {\r
- PA_ASIHPI_REPORT_ERROR_( hpiError );\r
- PA_ASIHPI_UNLESS_( HPI_OutStreamClose( NULL, *hpiStream ), paNoError );\r
- switch( hpiError )\r
- {\r
- case HPI_ERROR_INVALID_FORMAT:\r
- return paSampleFormatNotSupported;\r
-\r
- case HPI_ERROR_INVALID_SAMPLERATE:\r
- case HPI_ERROR_INCOMPATIBLE_SAMPLERATE:\r
- return paInvalidSampleRate;\r
-\r
- case HPI_ERROR_INVALID_CHANNELS:\r
- return paInvalidChannelCount;\r
-\r
- default:\r
- /* In case anything else went wrong */\r
- return paInvalidDevice;\r
- }\r
- }\r
-\r
-error:\r
- return result;\r
-}\r
-\r
-\r
-/** Checks whether the desired stream formats and devices are supported\r
- (for both input and output).\r
- This is done by actually opening the appropriate HPI streams and closing them again.\r
-\r
- @param hostApi Pointer to host API struct\r
-\r
- @param inputParameters Pointer to stream parameter struct for input side of stream\r
-\r
- @param outputParameters Pointer to stream parameter struct for output side of stream\r
-\r
- @param sampleRate Desired sample rate\r
-\r
- @return PortAudio error code (paFormatIsSupported on success)\r
- */\r
-static PaError IsFormatSupported( struct PaUtilHostApiRepresentation *hostApi,\r
- const PaStreamParameters *inputParameters,\r
- const PaStreamParameters *outputParameters,\r
- double sampleRate )\r
-{\r
- PaError result = paFormatIsSupported;\r
- PaAsiHpiHostApiRepresentation *hpiHostApi = (PaAsiHpiHostApiRepresentation*)hostApi;\r
- PaAsiHpiDeviceInfo *hpiDevice = NULL;\r
- struct hpi_format hpiFormat;\r
-\r
- /* Input stream */\r
- if( inputParameters )\r
- {\r
- hpi_handle_t hpiStream;\r
- PA_DEBUG(( "%s: Checking input params: dev=%d, sr=%d, chans=%d, fmt=%d\n",\r
- __FUNCTION__, inputParameters->device, (int)sampleRate,\r
- inputParameters->channelCount, inputParameters->sampleFormat ));\r
- /* Create and validate format */\r
- PA_ENSURE_( PaAsiHpi_CreateFormat( hostApi, inputParameters, sampleRate,\r
- &hpiDevice, &hpiFormat ) );\r
- /* Open stream to further check format */\r
- PA_ENSURE_( PaAsiHpi_OpenInput( hostApi, hpiDevice, &hpiFormat, &hpiStream ) );\r
- /* Close stream again */\r
- PA_ASIHPI_UNLESS_( HPI_InStreamClose( NULL, hpiStream ), paNoError );\r
- }\r
-\r
- /* Output stream */\r
- if( outputParameters )\r
- {\r
- hpi_handle_t hpiStream;\r
- PA_DEBUG(( "%s: Checking output params: dev=%d, sr=%d, chans=%d, fmt=%d\n",\r
- __FUNCTION__, outputParameters->device, (int)sampleRate,\r
- outputParameters->channelCount, outputParameters->sampleFormat ));\r
- /* Create and validate format */\r
- PA_ENSURE_( PaAsiHpi_CreateFormat( hostApi, outputParameters, sampleRate,\r
- &hpiDevice, &hpiFormat ) );\r
- /* Open stream to further check format */\r
- PA_ENSURE_( PaAsiHpi_OpenOutput( hostApi, hpiDevice, &hpiFormat, &hpiStream ) );\r
- /* Close stream again */\r
- PA_ASIHPI_UNLESS_( HPI_OutStreamClose( NULL, hpiStream ), paNoError );\r
- }\r
-\r
-error:\r
- return result;\r
-}\r
-\r
-/* ---------------------------- Stream Interface ---------------------------- */\r
-\r
-/** Obtain HPI stream information.\r
- This obtains info such as stream state and available data/space in buffers. It also\r
- estimates whether an underflow or overflow occurred.\r
-\r
- @param streamComp Pointer to stream component (input or output) to query\r
-\r
- @param info Pointer to stream info struct that will contain result\r
-\r
- @return PortAudio error code (either paNoError, paDeviceUnavailable or paUnanticipatedHostError)\r
- */\r
-static PaError PaAsiHpi_GetStreamInfo( PaAsiHpiStreamComponent *streamComp, PaAsiHpiStreamInfo *info )\r
-{\r
- PaError result = paDeviceUnavailable;\r
- uint16_t state;\r
- uint32_t bufferSize, dataSize, frameCounter, auxDataSize, threshold;\r
- uint32_t hwBufferSize, hwDataSize;\r
-\r
- assert( streamComp );\r
- assert( info );\r
-\r
- /* First blank the stream info struct, in case something goes wrong below.\r
- This saves the caller from initializing the struct. */\r
- info->state = 0;\r
- info->bufferSize = 0;\r
- info->dataSize = 0;\r
- info->frameCounter = 0;\r
- info->auxDataSize = 0;\r
- info->totalBufferedData = 0;\r
- info->availableFrames = 0;\r
- info->underflow = 0;\r
- info->overflow = 0;\r
-\r
- if( streamComp->hpiDevice && streamComp->hpiStream )\r
- {\r
- /* Obtain detailed stream info (either input or output) */\r
- if( streamComp->hpiDevice->streamIsOutput )\r
- {\r
- PA_ASIHPI_UNLESS_( HPI_OutStreamGetInfoEx( NULL,\r
- streamComp->hpiStream,\r
- &state, &bufferSize, &dataSize, &frameCounter,\r
- &auxDataSize ), paUnanticipatedHostError );\r
- }\r
- else\r
- {\r
- PA_ASIHPI_UNLESS_( HPI_InStreamGetInfoEx( NULL,\r
- streamComp->hpiStream,\r
- &state, &bufferSize, &dataSize, &frameCounter,\r
- &auxDataSize ), paUnanticipatedHostError );\r
- }\r
- /* Load stream info */\r
- info->state = state;\r
- info->bufferSize = bufferSize;\r
- info->dataSize = dataSize;\r
- info->frameCounter = frameCounter;\r
- info->auxDataSize = auxDataSize;\r
- /* Determine total buffered data */\r
- info->totalBufferedData = dataSize;\r
- if( streamComp->hostBufferSize > 0 )\r
- info->totalBufferedData += auxDataSize;\r
- info->totalBufferedData /= streamComp->bytesPerFrame;\r
- /* Determine immediately available frames */\r
- info->availableFrames = streamComp->hpiDevice->streamIsOutput ?\r
- bufferSize - dataSize : dataSize;\r
- info->availableFrames /= streamComp->bytesPerFrame;\r
- /* Minimum space/data required in buffers */\r
- threshold = PA_MIN( streamComp->tempBufferSize,\r
- streamComp->bytesPerFrame * PA_ASIHPI_MIN_FRAMES_ );\r
- /* Obtain hardware buffer stats first, to simplify things */\r
- hwBufferSize = streamComp->hardwareBufferSize;\r
- hwDataSize = streamComp->hostBufferSize > 0 ? auxDataSize : dataSize;\r
- /* Underflow is a bit tricky */\r
- info->underflow = streamComp->hpiDevice->streamIsOutput ?\r
- /* Stream seems to start in drained state sometimes, so ignore initial underflow */\r
- (frameCounter > 0) && ( (state == HPI_STATE_DRAINED) || (hwDataSize == 0) ) :\r
- /* Input streams check the first-level (host) buffer for underflow */\r
- (state != HPI_STATE_STOPPED) && (dataSize < threshold);\r
- /* Check for overflow in second-level (hardware) buffer for both input and output */\r
- info->overflow = (state != HPI_STATE_STOPPED) && (hwBufferSize - hwDataSize < threshold);\r
-\r
- return paNoError;\r
- }\r
-\r
-error:\r
- return result;\r
-}\r
-\r
-\r
-/** Display stream component information for debugging purposes.\r
-\r
- @param streamComp Pointer to stream component (input or output) to query\r
-\r
- @param stream Pointer to stream struct which contains the component above\r
- */\r
-static void PaAsiHpi_StreamComponentDump( PaAsiHpiStreamComponent *streamComp,\r
- PaAsiHpiStream *stream )\r
-{\r
- PaAsiHpiStreamInfo streamInfo;\r
-\r
- assert( streamComp );\r
- assert( stream );\r
-\r
- /* Name of soundcard/device used by component */\r
- PA_DEBUG(( "device: %s\n", streamComp->hpiDevice->baseDeviceInfo.name ));\r
- /* Unfortunately some overlap between input and output here */\r
- if( streamComp->hpiDevice->streamIsOutput )\r
- {\r
- /* Settings on the user side (as experienced by user callback) */\r
- PA_DEBUG(( "user: %d-bit, %d ",\r
- 8*stream->bufferProcessor.bytesPerUserOutputSample,\r
- stream->bufferProcessor.outputChannelCount));\r
- if( stream->bufferProcessor.userOutputIsInterleaved )\r
- {\r
- PA_DEBUG(( "interleaved channels, " ));\r
- }\r
- else\r
- {\r
- PA_DEBUG(( "non-interleaved channels, " ));\r
- }\r
- PA_DEBUG(( "%d frames/buffer, latency = %5.1f ms\n",\r
- stream->bufferProcessor.framesPerUserBuffer,\r
- 1000*stream->baseStreamRep.streamInfo.outputLatency ));\r
- /* Settings on the host side (internal to PortAudio host API) */\r
- PA_DEBUG(( "host: %d-bit, %d interleaved channels, %d frames/buffer ",\r
- 8*stream->bufferProcessor.bytesPerHostOutputSample,\r
- stream->bufferProcessor.outputChannelCount,\r
- stream->bufferProcessor.framesPerHostBuffer ));\r
- }\r
- else\r
- {\r
- /* Settings on the user side (as experienced by user callback) */\r
- PA_DEBUG(( "user: %d-bit, %d ",\r
- 8*stream->bufferProcessor.bytesPerUserInputSample,\r
- stream->bufferProcessor.inputChannelCount));\r
- if( stream->bufferProcessor.userInputIsInterleaved )\r
- {\r
- PA_DEBUG(( "interleaved channels, " ));\r
- }\r
- else\r
- {\r
- PA_DEBUG(( "non-interleaved channels, " ));\r
- }\r
- PA_DEBUG(( "%d frames/buffer, latency = %5.1f ms\n",\r
- stream->bufferProcessor.framesPerUserBuffer,\r
- 1000*stream->baseStreamRep.streamInfo.inputLatency ));\r
- /* Settings on the host side (internal to PortAudio host API) */\r
- PA_DEBUG(( "host: %d-bit, %d interleaved channels, %d frames/buffer ",\r
- 8*stream->bufferProcessor.bytesPerHostInputSample,\r
- stream->bufferProcessor.inputChannelCount,\r
- stream->bufferProcessor.framesPerHostBuffer ));\r
- }\r
- switch( stream->bufferProcessor.hostBufferSizeMode )\r
- {\r
- case paUtilFixedHostBufferSize:\r
- PA_DEBUG(( "[fixed] " ));\r
- break;\r
- case paUtilBoundedHostBufferSize:\r
- PA_DEBUG(( "[bounded] " ));\r
- break;\r
- case paUtilUnknownHostBufferSize:\r
- PA_DEBUG(( "[unknown] " ));\r
- break;\r
- case paUtilVariableHostBufferSizePartialUsageAllowed:\r
- PA_DEBUG(( "[variable] " ));\r
- break;\r
- }\r
- PA_DEBUG(( "(%d max)\n", streamComp->tempBufferSize / streamComp->bytesPerFrame ));\r
- /* HPI hardware settings */\r
- PA_DEBUG(( "HPI: adapter %d stream %d, %d-bit, %d-channel, %d Hz\n",\r
- streamComp->hpiDevice->adapterIndex, streamComp->hpiDevice->streamIndex,\r
- 8 * streamComp->bytesPerFrame / streamComp->hpiFormat.wChannels,\r
- streamComp->hpiFormat.wChannels,\r
- streamComp->hpiFormat.dwSampleRate ));\r
- /* Stream state and buffer levels */\r
- PA_DEBUG(( "HPI: " ));\r
- PaAsiHpi_GetStreamInfo( streamComp, &streamInfo );\r
- switch( streamInfo.state )\r
- {\r
- case HPI_STATE_STOPPED:\r
- PA_DEBUG(( "[STOPPED] " ));\r
- break;\r
- case HPI_STATE_PLAYING:\r
- PA_DEBUG(( "[PLAYING] " ));\r
- break;\r
- case HPI_STATE_RECORDING:\r
- PA_DEBUG(( "[RECORDING] " ));\r
- break;\r
- case HPI_STATE_DRAINED:\r
- PA_DEBUG(( "[DRAINED] " ));\r
- break;\r
- default:\r
- PA_DEBUG(( "[unknown state] " ));\r
- break;\r
- }\r
- if( streamComp->hostBufferSize )\r
- {\r
- PA_DEBUG(( "host = %d/%d B, ", streamInfo.dataSize, streamComp->hostBufferSize ));\r
- PA_DEBUG(( "hw = %d/%d (%d) B, ", streamInfo.auxDataSize,\r
- streamComp->hardwareBufferSize, streamComp->outputBufferCap ));\r
- }\r
- else\r
- {\r
- PA_DEBUG(( "hw = %d/%d B, ", streamInfo.dataSize, streamComp->hardwareBufferSize ));\r
- }\r
- PA_DEBUG(( "count = %d", streamInfo.frameCounter ));\r
- if( streamInfo.overflow )\r
- {\r
- PA_DEBUG(( " [overflow]" ));\r
- }\r
- else if( streamInfo.underflow )\r
- {\r
- PA_DEBUG(( " [underflow]" ));\r
- }\r
- PA_DEBUG(( "\n" ));\r
-}\r
-\r
-\r
-/** Display stream information for debugging purposes.\r
-\r
- @param stream Pointer to stream to query\r
- */\r
-static void PaAsiHpi_StreamDump( PaAsiHpiStream *stream )\r
-{\r
- assert( stream );\r
-\r
- PA_DEBUG(( "\n------------------------- STREAM INFO FOR %p ---------------------------\n", stream ));\r
- /* General stream info (input+output) */\r
- if( stream->baseStreamRep.streamCallback )\r
- {\r
- PA_DEBUG(( "[callback] " ));\r
- }\r
- else\r
- {\r
- PA_DEBUG(( "[blocking] " ));\r
- }\r
- PA_DEBUG(( "sr=%d Hz, poll=%d ms, max %d frames/buf ",\r
- (int)stream->baseStreamRep.streamInfo.sampleRate,\r
- stream->pollingInterval, stream->maxFramesPerHostBuffer ));\r
- switch( stream->state )\r
- {\r
- case paAsiHpiStoppedState:\r
- PA_DEBUG(( "[stopped]\n" ));\r
- break;\r
- case paAsiHpiActiveState:\r
- PA_DEBUG(( "[active]\n" ));\r
- break;\r
- case paAsiHpiCallbackFinishedState:\r
- PA_DEBUG(( "[cb fin]\n" ));\r
- break;\r
- default:\r
- PA_DEBUG(( "[unknown state]\n" ));\r
- break;\r
- }\r
- if( stream->callbackMode )\r
- {\r
- PA_DEBUG(( "cb info: thread=%p, cbAbort=%d, cbFinished=%d\n",\r
- stream->thread.thread, stream->callbackAbort, stream->callbackFinished ));\r
- }\r
-\r
- PA_DEBUG(( "----------------------------------- Input ------------------------------------\n" ));\r
- if( stream->input )\r
- {\r
- PaAsiHpi_StreamComponentDump( stream->input, stream );\r
- }\r
- else\r
- {\r
- PA_DEBUG(( "*none*\n" ));\r
- }\r
-\r
- PA_DEBUG(( "----------------------------------- Output ------------------------------------\n" ));\r
- if( stream->output )\r
- {\r
- PaAsiHpi_StreamComponentDump( stream->output, stream );\r
- }\r
- else\r
- {\r
- PA_DEBUG(( "*none*\n" ));\r
- }\r
- PA_DEBUG(( "-------------------------------------------------------------------------------\n\n" ));\r
-\r
-}\r
-\r
-\r
-/** Determine buffer sizes and allocate appropriate stream buffers.\r
- This attempts to allocate a BBM (host) buffer for the HPI stream component (either input\r
- or output, as both have similar buffer needs). Not all AudioScience adapters support BBM,\r
- in which case the hardware buffer has to suffice. The size of the HPI host buffer is chosen\r
- as a multiple of framesPerPaHostBuffer, and also influenced by the suggested latency and the\r
- estimated minimum polling interval. The HPI host and hardware buffer sizes are stored, and an\r
- appropriate cap for the hardware buffer is also calculated. Finally, the temporary stream\r
- buffer which serves as the PortAudio host buffer for this implementation is allocated.\r
- This buffer contains an integer number of user buffers, to simplify buffer adaption in the\r
- buffer processor. The function returns paBufferTooBig if the HPI interface cannot allocate\r
- an HPI host buffer of the desired size.\r
-\r
- @param streamComp Pointer to stream component struct\r
-\r
- @param pollingInterval Polling interval for stream, in milliseconds\r
-\r
- @param framesPerPaHostBuffer Size of PortAudio host buffer, in frames\r
-\r
- @param suggestedLatency Suggested latency for stream component, in seconds\r
-\r
- @return PortAudio error code (possibly paBufferTooBig or paInsufficientMemory)\r
- */\r
-static PaError PaAsiHpi_SetupBuffers( PaAsiHpiStreamComponent *streamComp, uint32_t pollingInterval,\r
- unsigned long framesPerPaHostBuffer, PaTime suggestedLatency )\r
-{\r
- PaError result = paNoError;\r
- PaAsiHpiStreamInfo streamInfo;\r
- unsigned long hpiBufferSize = 0, paHostBufferSize = 0;\r
-\r
- assert( streamComp );\r
- assert( streamComp->hpiDevice );\r
-\r
- /* Obtain size of hardware buffer of HPI stream, since we will be activating BBM shortly\r
- and afterwards the buffer size will refer to the BBM (host-side) buffer.\r
- This is necessary to enable reliable detection of xruns. */\r
- PA_ENSURE_( PaAsiHpi_GetStreamInfo( streamComp, &streamInfo ) );\r
- streamComp->hardwareBufferSize = streamInfo.bufferSize;\r
- hpiBufferSize = streamInfo.bufferSize;\r
-\r
- /* Check if BBM (background bus mastering) is to be enabled */\r
- if( PA_ASIHPI_USE_BBM_ )\r
- {\r
- uint32_t bbmBufferSize = 0, preLatencyBufferSize = 0;\r
- hpi_err_t hpiError = 0;\r
- PaTime pollingOverhead;\r
-\r
- /* Check overhead of Pa_Sleep() call (minimum sleep duration in ms -> OS dependent) */\r
- pollingOverhead = PaUtil_GetTime();\r
- Pa_Sleep( 0 );\r
- pollingOverhead = 1000*(PaUtil_GetTime() - pollingOverhead);\r
- PA_DEBUG(( "polling overhead = %f ms (length of 0-second sleep)\n", pollingOverhead ));\r
- /* Obtain minimum recommended size for host buffer (in bytes) */\r
- PA_ASIHPI_UNLESS_( HPI_StreamEstimateBufferSize( &streamComp->hpiFormat,\r
- pollingInterval + (uint32_t)ceil( pollingOverhead ),\r
- &bbmBufferSize ), paUnanticipatedHostError );\r
- /* BBM places more stringent requirements on buffer size (see description */\r
- /* of HPI_StreamEstimateBufferSize in HPI API document) */\r
- bbmBufferSize *= 3;\r
- /* Make sure the BBM buffer contains multiple PA host buffers */\r
- if( bbmBufferSize < 3 * streamComp->bytesPerFrame * framesPerPaHostBuffer )\r
- bbmBufferSize = 3 * streamComp->bytesPerFrame * framesPerPaHostBuffer;\r
- /* Try to honor latency suggested by user by growing buffer (no decrease possible) */\r
- if( suggestedLatency > 0.0 )\r
- {\r
- PaTime bufferDuration = ((PaTime)bbmBufferSize) / streamComp->bytesPerFrame\r
- / streamComp->hpiFormat.dwSampleRate;\r
- /* Don't decrease buffer */\r
- if( bufferDuration < suggestedLatency )\r
- {\r
- /* Save old buffer size, to be retried if new size proves too big */\r
- preLatencyBufferSize = bbmBufferSize;\r
- bbmBufferSize = (uint32_t)ceil( suggestedLatency * streamComp->bytesPerFrame\r
- * streamComp->hpiFormat.dwSampleRate );\r
- }\r
- }\r
- /* Choose closest memory block boundary (HPI API document states that\r
- "a buffer size of Nx4096 - 20 makes the best use of memory"\r
- (under the entry for HPI_StreamEstimateBufferSize)) */\r
- bbmBufferSize = ((uint32_t)ceil((bbmBufferSize + 20)/4096.0))*4096 - 20;\r
- streamComp->hostBufferSize = bbmBufferSize;\r
- /* Allocate BBM host buffer (this enables bus mastering transfers in background) */\r
- if( streamComp->hpiDevice->streamIsOutput )\r
- hpiError = HPI_OutStreamHostBufferAllocate( NULL,\r
- streamComp->hpiStream,\r
- bbmBufferSize );\r
- else\r
- hpiError = HPI_InStreamHostBufferAllocate( NULL,\r
- streamComp->hpiStream,\r
- bbmBufferSize );\r
- if( hpiError )\r
- {\r
- /* Indicate that BBM is disabled */\r
- streamComp->hostBufferSize = 0;\r
- /* Retry with smaller buffer size (transfers will still work, but not via BBM) */\r
- if( hpiError == HPI_ERROR_INVALID_DATASIZE )\r
- {\r
- /* Retry BBM allocation with smaller size if requested latency proved too big */\r
- if( preLatencyBufferSize > 0 )\r
- {\r
- PA_DEBUG(( "Retrying BBM allocation with smaller size (%d vs. %d bytes)\n",\r
- preLatencyBufferSize, bbmBufferSize ));\r
- bbmBufferSize = preLatencyBufferSize;\r
- if( streamComp->hpiDevice->streamIsOutput )\r
- hpiError = HPI_OutStreamHostBufferAllocate( NULL,\r
- streamComp->hpiStream,\r
- bbmBufferSize );\r
- else\r
- hpiError = HPI_InStreamHostBufferAllocate( NULL,\r
- streamComp->hpiStream,\r
- bbmBufferSize );\r
- /* Another round of error checking */\r
- if( hpiError )\r
- {\r
- PA_ASIHPI_REPORT_ERROR_( hpiError );\r
- /* No escapes this time */\r
- if( hpiError == HPI_ERROR_INVALID_DATASIZE )\r
- {\r
- result = paBufferTooBig;\r
- goto error;\r
- }\r
- else if( hpiError != HPI_ERROR_INVALID_OPERATION )\r
- {\r
- result = paUnanticipatedHostError;\r
- goto error;\r
- }\r
- }\r
- else\r
- {\r
- streamComp->hostBufferSize = bbmBufferSize;\r
- hpiBufferSize = bbmBufferSize;\r
- }\r
- }\r
- else\r
- {\r
- result = paBufferTooBig;\r
- goto error;\r
- }\r
- }\r
- /* If BBM not supported, foreground transfers will be used, but not a show-stopper */\r
- /* Anything else is an error */\r
- else if (( hpiError != HPI_ERROR_INVALID_OPERATION ) &&\r
- ( hpiError != HPI_ERROR_INVALID_FUNC ))\r
- {\r
- PA_ASIHPI_REPORT_ERROR_( hpiError );\r
- result = paUnanticipatedHostError;\r
- goto error;\r
- }\r
- }\r
- else\r
- {\r
- hpiBufferSize = bbmBufferSize;\r
- }\r
- }\r
-\r
- /* Final check of buffer size */\r
- paHostBufferSize = streamComp->bytesPerFrame * framesPerPaHostBuffer;\r
- if( hpiBufferSize < 3*paHostBufferSize )\r
- {\r
- result = paBufferTooBig;\r
- goto error;\r
- }\r
- /* Set cap on output buffer size, based on latency suggestions */\r
- if( streamComp->hpiDevice->streamIsOutput )\r
- {\r
- PaTime latency = suggestedLatency > 0.0 ? suggestedLatency :\r
- streamComp->hpiDevice->baseDeviceInfo.defaultHighOutputLatency;\r
- streamComp->outputBufferCap =\r
- (uint32_t)ceil( latency * streamComp->bytesPerFrame * streamComp->hpiFormat.dwSampleRate );\r
- /* The cap should not be too small, to prevent underflow */\r
- if( streamComp->outputBufferCap < 4*paHostBufferSize )\r
- streamComp->outputBufferCap = 4*paHostBufferSize;\r
- }\r
- else\r
- {\r
- streamComp->outputBufferCap = 0;\r
- }\r
- /* Temp buffer size should be multiple of PA host buffer size (or 1x, if using fixed blocks) */\r
- streamComp->tempBufferSize = paHostBufferSize;\r
- /* Allocate temp buffer */\r
- PA_UNLESS_( streamComp->tempBuffer = (uint8_t *)PaUtil_AllocateMemory( streamComp->tempBufferSize ),\r
- paInsufficientMemory );\r
-error:\r
- return result;\r
-}\r
-\r
-\r
-/** Opens PortAudio stream.\r
- This determines a suitable value for framesPerBuffer, if the user didn't specify it,\r
- based on the suggested latency. It then opens each requested stream direction with the\r
- appropriate stream format, and allocates the required stream buffers. It sets up the\r
- various PortAudio structures dealing with streams, and estimates the stream latency.\r
-\r
- See pa_hostapi.h for a list of validity guarantees made about OpenStream parameters.\r
-\r
- @param hostApi Pointer to host API struct\r
-\r
- @param s List of open streams, where successfully opened stream will go\r
-\r
- @param inputParameters Pointer to stream parameter struct for input side of stream\r
-\r
- @param outputParameters Pointer to stream parameter struct for output side of stream\r
-\r
- @param sampleRate Desired sample rate\r
-\r
- @param framesPerBuffer Desired number of frames per buffer passed to user callback\r
- (or chunk size for blocking stream)\r
-\r
- @param streamFlags Stream flags\r
-\r
- @param streamCallback Pointer to user callback function (zero for blocking interface)\r
-\r
- @param userData Pointer to user data that will be passed to callback function along with data\r
-\r
- @return PortAudio error code\r
-*/\r
-static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,\r
- PaStream **s,\r
- const PaStreamParameters *inputParameters,\r
- const PaStreamParameters *outputParameters,\r
- double sampleRate,\r
- unsigned long framesPerBuffer,\r
- PaStreamFlags streamFlags,\r
- PaStreamCallback *streamCallback,\r
- void *userData )\r
-{\r
- PaError result = paNoError;\r
- PaAsiHpiHostApiRepresentation *hpiHostApi = (PaAsiHpiHostApiRepresentation*)hostApi;\r
- PaAsiHpiStream *stream = NULL;\r
- unsigned long framesPerHostBuffer = framesPerBuffer;\r
- int inputChannelCount = 0, outputChannelCount = 0;\r
- PaSampleFormat inputSampleFormat = 0, outputSampleFormat = 0;\r
- PaSampleFormat hostInputSampleFormat = 0, hostOutputSampleFormat = 0;\r
- PaTime maxSuggestedLatency = 0.0;\r
-\r
- /* Validate platform-specific flags -> none expected for HPI */\r
- if( (streamFlags & paPlatformSpecificFlags) != 0 )\r
- return paInvalidFlag; /* unexpected platform-specific flag */\r
-\r
- /* Create blank stream structure */\r
- PA_UNLESS_( stream = (PaAsiHpiStream *)PaUtil_AllocateMemory( sizeof(PaAsiHpiStream) ),\r
- paInsufficientMemory );\r
- memset( stream, 0, sizeof(PaAsiHpiStream) );\r
-\r
- /* If the number of frames per buffer is unspecified, we have to come up with one. */\r
- if( framesPerHostBuffer == paFramesPerBufferUnspecified )\r
- {\r
- if( inputParameters )\r
- maxSuggestedLatency = inputParameters->suggestedLatency;\r
- if( outputParameters && (outputParameters->suggestedLatency > maxSuggestedLatency) )\r
- maxSuggestedLatency = outputParameters->suggestedLatency;\r
- /* Use suggested latency if available */\r
- if( maxSuggestedLatency > 0.0 )\r
- framesPerHostBuffer = (unsigned long)ceil( maxSuggestedLatency * sampleRate );\r
- else\r
- /* AudioScience cards like BIG buffers by default */\r
- framesPerHostBuffer = 4096;\r
- }\r
- /* Lower bounds on host buffer size, due to polling and HPI constraints */\r
- if( 1000.0*framesPerHostBuffer/sampleRate < PA_ASIHPI_MIN_POLLING_INTERVAL_ )\r
- framesPerHostBuffer = (unsigned long)ceil( sampleRate * PA_ASIHPI_MIN_POLLING_INTERVAL_ / 1000.0 );\r
- /* if( framesPerHostBuffer < PA_ASIHPI_MIN_FRAMES_ )\r
- framesPerHostBuffer = PA_ASIHPI_MIN_FRAMES_; */\r
- /* Efficient if host buffer size is integer multiple of user buffer size */\r
- if( framesPerBuffer > 0 )\r
- framesPerHostBuffer = (unsigned long)ceil( (double)framesPerHostBuffer / framesPerBuffer ) * framesPerBuffer;\r
- /* Buffer should always be a multiple of 4 bytes to facilitate 32-bit PCI transfers.\r
- By keeping the frames a multiple of 4, this is ensured even for 8-bit mono sound. */\r
- framesPerHostBuffer = (framesPerHostBuffer / 4) * 4;\r
- /* Polling is based on time length (in milliseconds) of user-requested block size */\r
- stream->pollingInterval = (uint32_t)ceil( 1000.0*framesPerHostBuffer/sampleRate );\r
- assert( framesPerHostBuffer > 0 );\r
-\r
- /* Open underlying streams, check formats and allocate buffers */\r
- if( inputParameters )\r
- {\r
- /* Create blank stream component structure */\r
- PA_UNLESS_( stream->input = (PaAsiHpiStreamComponent *)PaUtil_AllocateMemory( sizeof(PaAsiHpiStreamComponent) ),\r
- paInsufficientMemory );\r
- memset( stream->input, 0, sizeof(PaAsiHpiStreamComponent) );\r
- /* Create/validate format */\r
- PA_ENSURE_( PaAsiHpi_CreateFormat( hostApi, inputParameters, sampleRate,\r
- &stream->input->hpiDevice, &stream->input->hpiFormat ) );\r
- /* Open stream and set format */\r
- PA_ENSURE_( PaAsiHpi_OpenInput( hostApi, stream->input->hpiDevice, &stream->input->hpiFormat,\r
- &stream->input->hpiStream ) );\r
- inputChannelCount = inputParameters->channelCount;\r
- inputSampleFormat = inputParameters->sampleFormat;\r
- hostInputSampleFormat = PaAsiHpi_HpiToPaFormat( stream->input->hpiFormat.wFormat );\r
- stream->input->bytesPerFrame = inputChannelCount * Pa_GetSampleSize( hostInputSampleFormat );\r
- assert( stream->input->bytesPerFrame > 0 );\r
- /* Allocate host and temp buffers of appropriate size */\r
- PA_ENSURE_( PaAsiHpi_SetupBuffers( stream->input, stream->pollingInterval,\r
- framesPerHostBuffer, inputParameters->suggestedLatency ) );\r
- }\r
- if( outputParameters )\r
- {\r
- /* Create blank stream component structure */\r
- PA_UNLESS_( stream->output = (PaAsiHpiStreamComponent *)PaUtil_AllocateMemory( sizeof(PaAsiHpiStreamComponent) ),\r
- paInsufficientMemory );\r
- memset( stream->output, 0, sizeof(PaAsiHpiStreamComponent) );\r
- /* Create/validate format */\r
- PA_ENSURE_( PaAsiHpi_CreateFormat( hostApi, outputParameters, sampleRate,\r
- &stream->output->hpiDevice, &stream->output->hpiFormat ) );\r
- /* Open stream and check format */\r
- PA_ENSURE_( PaAsiHpi_OpenOutput( hostApi, stream->output->hpiDevice,\r
- &stream->output->hpiFormat,\r
- &stream->output->hpiStream ) );\r
- outputChannelCount = outputParameters->channelCount;\r
- outputSampleFormat = outputParameters->sampleFormat;\r
- hostOutputSampleFormat = PaAsiHpi_HpiToPaFormat( stream->output->hpiFormat.wFormat );\r
- stream->output->bytesPerFrame = outputChannelCount * Pa_GetSampleSize( hostOutputSampleFormat );\r
- /* Allocate host and temp buffers of appropriate size */\r
- PA_ENSURE_( PaAsiHpi_SetupBuffers( stream->output, stream->pollingInterval,\r
- framesPerHostBuffer, outputParameters->suggestedLatency ) );\r
- }\r
-\r
- /* Determine maximum frames per host buffer (least common denominator of input/output) */\r
- if( inputParameters && outputParameters )\r
- {\r
- stream->maxFramesPerHostBuffer = PA_MIN( stream->input->tempBufferSize / stream->input->bytesPerFrame,\r
- stream->output->tempBufferSize / stream->output->bytesPerFrame );\r
- }\r
- else\r
- {\r
- stream->maxFramesPerHostBuffer = inputParameters ? stream->input->tempBufferSize / stream->input->bytesPerFrame\r
- : stream->output->tempBufferSize / stream->output->bytesPerFrame;\r
- }\r
- assert( stream->maxFramesPerHostBuffer > 0 );\r
- /* Initialize various other stream parameters */\r
- stream->neverDropInput = streamFlags & paNeverDropInput;\r
- stream->state = paAsiHpiStoppedState;\r
-\r
- /* Initialize either callback or blocking interface */\r
- if( streamCallback )\r
- {\r
- PaUtil_InitializeStreamRepresentation( &stream->baseStreamRep,\r
- &hpiHostApi->callbackStreamInterface,\r
- streamCallback, userData );\r
- stream->callbackMode = 1;\r
- }\r
- else\r
- {\r
- PaUtil_InitializeStreamRepresentation( &stream->baseStreamRep,\r
- &hpiHostApi->blockingStreamInterface,\r
- streamCallback, userData );\r
- /* Pre-allocate non-interleaved user buffer pointers for blocking interface */\r
- PA_UNLESS_( stream->blockingUserBufferCopy =\r
- PaUtil_AllocateMemory( sizeof(void *) * PA_MAX( inputChannelCount, outputChannelCount ) ),\r
- paInsufficientMemory );\r
- stream->callbackMode = 0;\r
- }\r
- PaUtil_InitializeCpuLoadMeasurer( &stream->cpuLoadMeasurer, sampleRate );\r
-\r
- /* Following pa_linux_alsa's lead, we operate with fixed host buffer size by default, */\r
- /* since other modes will invariably lead to block adaption (maybe Bounded better?) */\r
- PA_ENSURE_( PaUtil_InitializeBufferProcessor( &stream->bufferProcessor,\r
- inputChannelCount, inputSampleFormat, hostInputSampleFormat,\r
- outputChannelCount, outputSampleFormat, hostOutputSampleFormat,\r
- sampleRate, streamFlags,\r
- framesPerBuffer, framesPerHostBuffer, paUtilFixedHostBufferSize,\r
- streamCallback, userData ) );\r
-\r
- stream->baseStreamRep.streamInfo.structVersion = 1;\r
- stream->baseStreamRep.streamInfo.sampleRate = sampleRate;\r
- /* Determine input latency from buffer processor and buffer sizes */\r
- if( stream->input )\r
- {\r
- PaTime bufferDuration = ( stream->input->hostBufferSize + stream->input->hardwareBufferSize )\r
- / sampleRate / stream->input->bytesPerFrame;\r
- stream->baseStreamRep.streamInfo.inputLatency =\r
- bufferDuration +\r
- ((PaTime)PaUtil_GetBufferProcessorInputLatencyFrames( &stream->bufferProcessor ) -\r
- stream->maxFramesPerHostBuffer) / sampleRate;\r
- assert( stream->baseStreamRep.streamInfo.inputLatency > 0.0 );\r
- }\r
- /* Determine output latency from buffer processor and buffer sizes */\r
- if( stream->output )\r
- {\r
- PaTime bufferDuration = ( stream->output->hostBufferSize + stream->output->hardwareBufferSize )\r
- / sampleRate / stream->output->bytesPerFrame;\r
- /* Take buffer size cap into account (see PaAsiHpi_WaitForFrames) */\r
- if( !stream->input && (stream->output->outputBufferCap > 0) )\r
- {\r
- bufferDuration = PA_MIN( bufferDuration,\r
- stream->output->outputBufferCap / sampleRate / stream->output->bytesPerFrame );\r
- }\r
- stream->baseStreamRep.streamInfo.outputLatency =\r
- bufferDuration +\r
- ((PaTime)PaUtil_GetBufferProcessorOutputLatencyFrames( &stream->bufferProcessor ) -\r
- stream->maxFramesPerHostBuffer) / sampleRate;\r
- assert( stream->baseStreamRep.streamInfo.outputLatency > 0.0 );\r
- }\r
-\r
- /* Report stream info, for debugging purposes */\r
- PaAsiHpi_StreamDump( stream );\r
-\r
- /* Save initialized stream to PA stream list */\r
- *s = (PaStream*)stream;\r
- return result;\r
-\r
-error:\r
- CloseStream( (PaStream*)stream );\r
- return result;\r
-}\r
-\r
-\r
-/** Close PortAudio stream.\r
- When CloseStream() is called, the multi-api layer ensures that the stream has already\r
- been stopped or aborted. This closes the underlying HPI streams and deallocates stream\r
- buffers and structs.\r
-\r
- @param s Pointer to PortAudio stream\r
-\r
- @return PortAudio error code\r
-*/\r
-static PaError CloseStream( PaStream *s )\r
-{\r
- PaError result = paNoError;\r
- PaAsiHpiStream *stream = (PaAsiHpiStream*)s;\r
-\r
- /* If stream is already gone, all is well */\r
- if( stream == NULL )\r
- return paNoError;\r
-\r
- /* Generic stream cleanup */\r
- PaUtil_TerminateBufferProcessor( &stream->bufferProcessor );\r
- PaUtil_TerminateStreamRepresentation( &stream->baseStreamRep );\r
-\r
- /* Implementation-specific details - close internal streams */\r
- if( stream->input )\r
- {\r
- /* Close HPI stream (freeing BBM host buffer in the process, if used) */\r
- if( stream->input->hpiStream )\r
- {\r
- PA_ASIHPI_UNLESS_( HPI_InStreamClose( NULL,\r
- stream->input->hpiStream ), paUnanticipatedHostError );\r
- }\r
- /* Free temp buffer and stream component */\r
- PaUtil_FreeMemory( stream->input->tempBuffer );\r
- PaUtil_FreeMemory( stream->input );\r
- }\r
- if( stream->output )\r
- {\r
- /* Close HPI stream (freeing BBM host buffer in the process, if used) */\r
- if( stream->output->hpiStream )\r
- {\r
- PA_ASIHPI_UNLESS_( HPI_OutStreamClose( NULL,\r
- stream->output->hpiStream ), paUnanticipatedHostError );\r
- }\r
- /* Free temp buffer and stream component */\r
- PaUtil_FreeMemory( stream->output->tempBuffer );\r
- PaUtil_FreeMemory( stream->output );\r
- }\r
-\r
- PaUtil_FreeMemory( stream->blockingUserBufferCopy );\r
- PaUtil_FreeMemory( stream );\r
-\r
-error:\r
- return result;\r
-}\r
-\r
-\r
-/** Prime HPI output stream with silence.\r
- This resets the output stream and uses PortAudio helper routines to fill the\r
- temp buffer with silence. It then writes two host buffers to the stream. This is supposed\r
- to be called before the stream is started. It has no effect on input-only streams.\r
-\r
- @param stream Pointer to stream struct\r
-\r
- @return PortAudio error code\r
- */\r
-static PaError PaAsiHpi_PrimeOutputWithSilence( PaAsiHpiStream *stream )\r
-{\r
- PaError result = paNoError;\r
- PaAsiHpiStreamComponent *out;\r
- PaUtilZeroer *zeroer;\r
- PaSampleFormat outputFormat;\r
- assert( stream );\r
- out = stream->output;\r
- /* Only continue if stream has output channels */\r
- if( !out )\r
- return result;\r
- assert( out->tempBuffer );\r
-\r
- /* Clear all existing data in hardware playback buffer */\r
- PA_ASIHPI_UNLESS_( HPI_OutStreamReset( NULL,\r
- out->hpiStream ), paUnanticipatedHostError );\r
- /* Fill temp buffer with silence */\r
- outputFormat = PaAsiHpi_HpiToPaFormat( out->hpiFormat.wFormat );\r
- zeroer = PaUtil_SelectZeroer( outputFormat );\r
- zeroer(out->tempBuffer, 1, out->tempBufferSize / Pa_GetSampleSize(outputFormat) );\r
- /* Write temp buffer to hardware fifo twice, to get started */\r
- PA_ASIHPI_UNLESS_( HPI_OutStreamWriteBuf( NULL, out->hpiStream,\r
- out->tempBuffer, out->tempBufferSize, &out->hpiFormat),\r
- paUnanticipatedHostError );\r
- PA_ASIHPI_UNLESS_( HPI_OutStreamWriteBuf( NULL, out->hpiStream,\r
- out->tempBuffer, out->tempBufferSize, &out->hpiFormat),\r
- paUnanticipatedHostError );\r
-error:\r
- return result;\r
-}\r
-\r
-\r
-/** Start HPI streams (both input + output).\r
- This starts all HPI streams in the PortAudio stream. Output streams are first primed with\r
- silence, if required. After this call the PA stream is in the Active state.\r
-\r
- @todo Implement priming via the user callback\r
-\r
- @param stream Pointer to stream struct\r
-\r
- @param outputPrimed True if output is already primed (if false, silence will be loaded before starting)\r
-\r
- @return PortAudio error code\r
- */\r
-static PaError PaAsiHpi_StartStream( PaAsiHpiStream *stream, int outputPrimed )\r
-{\r
- PaError result = paNoError;\r
-\r
- if( stream->input )\r
- {\r
- PA_ASIHPI_UNLESS_( HPI_InStreamStart( NULL,\r
- stream->input->hpiStream ), paUnanticipatedHostError );\r
- }\r
- if( stream->output )\r
- {\r
- if( !outputPrimed )\r
- {\r
- /* Buffer isn't primed, so load stream with silence */\r
- PA_ENSURE_( PaAsiHpi_PrimeOutputWithSilence( stream ) );\r
- }\r
- PA_ASIHPI_UNLESS_( HPI_OutStreamStart( NULL,\r
- stream->output->hpiStream ), paUnanticipatedHostError );\r
- }\r
- stream->state = paAsiHpiActiveState;\r
- stream->callbackFinished = 0;\r
-\r
- /* Report stream info for debugging purposes */\r
- /* PaAsiHpi_StreamDump( stream ); */\r
-\r
-error:\r
- return result;\r
-}\r
-\r
-\r
-/** Start PortAudio stream.\r
- If the stream has a callback interface, this starts a helper thread to feed the user callback.\r
- The thread will then take care of starting the HPI streams, and this function will block\r
- until the streams actually start. In the case of a blocking interface, the HPI streams\r
- are simply started.\r
-\r
- @param s Pointer to PortAudio stream\r
-\r
- @return PortAudio error code\r
-*/\r
-static PaError StartStream( PaStream *s )\r
-{\r
- PaError result = paNoError;\r
- PaAsiHpiStream *stream = (PaAsiHpiStream*)s;\r
-\r
- assert( stream );\r
-\r
- /* Ready the processor */\r
- PaUtil_ResetBufferProcessor( &stream->bufferProcessor );\r
-\r
- if( stream->callbackMode )\r
- {\r
- /* Create and start callback engine thread */\r
- /* Also waits 1 second for stream to be started by engine thread (otherwise aborts) */\r
- PA_ENSURE_( PaUnixThread_New( &stream->thread, &CallbackThreadFunc, stream, 1., 0 /*rtSched*/ ) );\r
- }\r
- else\r
- {\r
- PA_ENSURE_( PaAsiHpi_StartStream( stream, 0 ) );\r
- }\r
-\r
-error:\r
- return result;\r
-}\r
-\r
-\r
-/** Stop HPI streams (input + output), either softly or abruptly.\r
- If abort is false, the function blocks until the output stream is drained, otherwise it\r
- stops immediately and discards data in the stream hardware buffers.\r
-\r
- This function is safe to call from the callback engine thread as well as the main thread.\r
-\r
- @param stream Pointer to stream struct\r
-\r
- @param abort True if samples in output buffer should be discarded (otherwise blocks until stream is done)\r
-\r
- @return PortAudio error code\r
-\r
- */\r
-static PaError PaAsiHpi_StopStream( PaAsiHpiStream *stream, int abort )\r
-{\r
- PaError result = paNoError;\r
-\r
- assert( stream );\r
-\r
- /* Input channels */\r
- if( stream->input )\r
- {\r
- PA_ASIHPI_UNLESS_( HPI_InStreamReset( NULL,\r
- stream->input->hpiStream ), paUnanticipatedHostError );\r
- }\r
- /* Output channels */\r
- if( stream->output )\r
- {\r
- if( !abort )\r
- {\r
- /* Wait until HPI output stream is drained */\r
- while( 1 )\r
- {\r
- PaAsiHpiStreamInfo streamInfo;\r
- PaTime timeLeft;\r
-\r
- /* Obtain number of samples waiting to be played */\r
- PA_ENSURE_( PaAsiHpi_GetStreamInfo( stream->output, &streamInfo ) );\r
- /* Check if stream is drained */\r
- if( (streamInfo.state != HPI_STATE_PLAYING) &&\r
- (streamInfo.dataSize < stream->output->bytesPerFrame * PA_ASIHPI_MIN_FRAMES_) )\r
- break;\r
- /* Sleep amount of time represented by remaining samples */\r
- timeLeft = 1000.0 * streamInfo.dataSize / stream->output->bytesPerFrame\r
- / stream->baseStreamRep.streamInfo.sampleRate;\r
- Pa_Sleep( (long)ceil( timeLeft ) );\r
- }\r
- }\r
- PA_ASIHPI_UNLESS_( HPI_OutStreamReset( NULL,\r
- stream->output->hpiStream ), paUnanticipatedHostError );\r
- }\r
-\r
- /* Report stream info for debugging purposes */\r
- /* PaAsiHpi_StreamDump( stream ); */\r
-\r
-error:\r
- return result;\r
-}\r
-\r
-\r
-/** Stop or abort PortAudio stream.\r
-\r
- This function is used to explicitly stop the PortAudio stream (via StopStream/AbortStream),\r
- as opposed to the situation when the callback finishes with a result other than paContinue.\r
- If a stream is in callback mode we will have to inspect whether the background thread has\r
- finished, or we will have to take it out. In either case we join the thread before returning.\r
- In blocking mode, we simply tell HPI to stop abruptly (abort) or finish buffers (drain).\r
- The PortAudio stream will be in the Stopped state after a call to this function.\r
-\r
- Don't call this from the callback engine thread!\r
-\r
- @param stream Pointer to stream struct\r
-\r
- @param abort True if samples in output buffer should be discarded (otherwise blocks until stream is done)\r
-\r
- @return PortAudio error code\r
-*/\r
-static PaError PaAsiHpi_ExplicitStop( PaAsiHpiStream *stream, int abort )\r
-{\r
- PaError result = paNoError;\r
-\r
- /* First deal with the callback thread, cancelling and/or joining it if necessary */\r
- if( stream->callbackMode )\r
- {\r
- PaError threadRes;\r
- stream->callbackAbort = abort;\r
- if( abort )\r
- {\r
- PA_DEBUG(( "Aborting callback\n" ));\r
- }\r
- else\r
- {\r
- PA_DEBUG(( "Stopping callback\n" ));\r
- }\r
- PA_ENSURE_( PaUnixThread_Terminate( &stream->thread, !abort, &threadRes ) );\r
- if( threadRes != paNoError )\r
- {\r
- PA_DEBUG(( "Callback thread returned: %d\n", threadRes ));\r
- }\r
- }\r
- else\r
- {\r
- PA_ENSURE_( PaAsiHpi_StopStream( stream, abort ) );\r
- }\r
-\r
- stream->state = paAsiHpiStoppedState;\r
-\r
-error:\r
- return result;\r
-}\r
-\r
-\r
-/** Stop PortAudio stream.\r
- This blocks until the output buffers are drained.\r
-\r
- @param s Pointer to PortAudio stream\r
-\r
- @return PortAudio error code\r
-*/\r
-static PaError StopStream( PaStream *s )\r
-{\r
- return PaAsiHpi_ExplicitStop( (PaAsiHpiStream *) s, 0 );\r
-}\r
-\r
-\r
-/** Abort PortAudio stream.\r
- This discards any existing data in output buffers and stops the stream immediately.\r
-\r
- @param s Pointer to PortAudio stream\r
-\r
- @return PortAudio error code\r
-*/\r
-static PaError AbortStream( PaStream *s )\r
-{\r
- return PaAsiHpi_ExplicitStop( (PaAsiHpiStream * ) s, 1 );\r
-}\r
-\r
-\r
-/** Determine whether the stream is stopped.\r
- A stream is considered to be stopped prior to a successful call to StartStream and after\r
- a successful call to StopStream or AbortStream. If a stream callback returns a value other\r
- than paContinue the stream is NOT considered to be stopped (it is in CallbackFinished state).\r
-\r
- @param s Pointer to PortAudio stream\r
-\r
- @return Returns one (1) when the stream is stopped, zero (0) when the stream is running, or\r
- a PaErrorCode (which are always negative) if PortAudio is not initialized or an\r
- error is encountered.\r
-*/\r
-static PaError IsStreamStopped( PaStream *s )\r
-{\r
- PaAsiHpiStream *stream = (PaAsiHpiStream*)s;\r
-\r
- assert( stream );\r
- return stream->state == paAsiHpiStoppedState ? 1 : 0;\r
-}\r
-\r
-\r
-/** Determine whether the stream is active.\r
- A stream is active after a successful call to StartStream(), until it becomes inactive either\r
- as a result of a call to StopStream() or AbortStream(), or as a result of a return value\r
- other than paContinue from the stream callback. In the latter case, the stream is considered\r
- inactive after the last buffer has finished playing.\r
-\r
- @param s Pointer to PortAudio stream\r
-\r
- @return Returns one (1) when the stream is active (i.e. playing or recording audio),\r
- zero (0) when not playing, or a PaErrorCode (which are always negative)\r
- if PortAudio is not initialized or an error is encountered.\r
-*/\r
-static PaError IsStreamActive( PaStream *s )\r
-{\r
- PaAsiHpiStream *stream = (PaAsiHpiStream*)s;\r
-\r
- assert( stream );\r
- return stream->state == paAsiHpiActiveState ? 1 : 0;\r
-}\r
-\r
-\r
-/** Returns current stream time.\r
- This corresponds to the system clock. The clock should run continuously while the stream\r
- is open, i.e. between calls to OpenStream() and CloseStream(), therefore a frame counter\r
- is not good enough.\r
-\r
- @param s Pointer to PortAudio stream\r
-\r
- @return Stream time, in seconds\r
- */\r
-static PaTime GetStreamTime( PaStream *s )\r
-{\r
- return PaUtil_GetTime();\r
-}\r
-\r
-\r
-/** Returns CPU load.\r
-\r
- @param s Pointer to PortAudio stream\r
-\r
- @return CPU load (0.0 if blocking interface is used)\r
- */\r
-static double GetStreamCpuLoad( PaStream *s )\r
-{\r
- PaAsiHpiStream *stream = (PaAsiHpiStream*)s;\r
-\r
- return stream->callbackMode ? PaUtil_GetCpuLoad( &stream->cpuLoadMeasurer ) : 0.0;\r
-}\r
-\r
-/* --------------------------- Callback Interface --------------------------- */\r
-\r
-/** Exit routine which is called when callback thread quits.\r
- This takes care of stopping the HPI streams (either waiting for output to finish, or\r
- abruptly). It also calls the user-supplied StreamFinished callback, and sets the\r
- stream state to CallbackFinished if it was reached via a non-paContinue return from\r
- the user callback function.\r
-\r
- @param userData A pointer to an open stream previously created with Pa_OpenStream\r
- */\r
-static void PaAsiHpi_OnThreadExit( void *userData )\r
-{\r
- PaAsiHpiStream *stream = (PaAsiHpiStream *) userData;\r
-\r
- assert( stream );\r
-\r
- PaUtil_ResetCpuLoadMeasurer( &stream->cpuLoadMeasurer );\r
-\r
- PA_DEBUG(( "%s: Stopping HPI streams\n", __FUNCTION__ ));\r
- PaAsiHpi_StopStream( stream, stream->callbackAbort );\r
- PA_DEBUG(( "%s: Stoppage\n", __FUNCTION__ ));\r
-\r
- /* Eventually notify user all buffers have played */\r
- if( stream->baseStreamRep.streamFinishedCallback )\r
- {\r
- stream->baseStreamRep.streamFinishedCallback( stream->baseStreamRep.userData );\r
- }\r
-\r
- /* Unfortunately both explicit calls to Stop/AbortStream (leading to Stopped state)\r
- and implicit stops via paComplete/paAbort (leading to CallbackFinished state)\r
- end up here - need another flag to remind us which is the case */\r
- if( stream->callbackFinished )\r
- stream->state = paAsiHpiCallbackFinishedState;\r
-}\r
-\r
-\r
-/** Wait until there is enough frames to fill a host buffer.\r
- The routine attempts to sleep until at least a full host buffer can be retrieved from the\r
- input HPI stream and passed to the output HPI stream. It will first sleep until enough\r
- output space is available, as this is usually easily achievable. If it is an output-only\r
- stream, it will also sleep if the hardware buffer is too full, thereby throttling the\r
- filling of the output buffer and reducing output latency. The routine then blocks until\r
- enough input samples are available, unless this will cause an output underflow. In the\r
- process, input overflows and output underflows are indicated.\r
-\r
- @param stream Pointer to stream struct\r
-\r
- @param framesAvail Returns the number of available frames\r
-\r
- @param cbFlags Overflows and underflows indicated in here\r
-\r
- @return PortAudio error code (only paUnanticipatedHostError expected)\r
- */\r
-static PaError PaAsiHpi_WaitForFrames( PaAsiHpiStream *stream, unsigned long *framesAvail,\r
- PaStreamCallbackFlags *cbFlags )\r
-{\r
- PaError result = paNoError;\r
- double sampleRate;\r
- unsigned long framesTarget;\r
- uint32_t outputData = 0, outputSpace = 0, inputData = 0, framesLeft = 0;\r
-\r
- assert( stream );\r
- assert( stream->input || stream->output );\r
-\r
- sampleRate = stream->baseStreamRep.streamInfo.sampleRate;\r
- /* We have to come up with this much frames on both input and output */\r
- framesTarget = stream->bufferProcessor.framesPerHostBuffer;\r
- assert( framesTarget > 0 );\r
-\r
- while( 1 )\r
- {\r
- PaAsiHpiStreamInfo info;\r
- /* Check output first, as this takes priority in the default full-duplex mode */\r
- if( stream->output )\r
- {\r
- PA_ENSURE_( PaAsiHpi_GetStreamInfo( stream->output, &info ) );\r
- /* Wait until enough space is available in output buffer to receive a full block */\r
- if( info.availableFrames < framesTarget )\r
- {\r
- framesLeft = framesTarget - info.availableFrames;\r
- Pa_Sleep( (long)ceil( 1000 * framesLeft / sampleRate ) );\r
- continue;\r
- }\r
- /* Wait until the data in hardware buffer has dropped to a sensible level.\r
- Without this, the hardware buffer quickly fills up in the absence of an input\r
- stream to regulate its data rate (if data generation is fast). This leads to\r
- large latencies, as the AudioScience hardware buffers are humongous.\r
- This is similar to the default "Hardware Buffering=off" option in the\r
- AudioScience WAV driver. */\r
- if( !stream->input && (stream->output->outputBufferCap > 0) &&\r
- ( info.totalBufferedData > stream->output->outputBufferCap / stream->output->bytesPerFrame ) )\r
- {\r
- framesLeft = info.totalBufferedData - stream->output->outputBufferCap / stream->output->bytesPerFrame;\r
- Pa_Sleep( (long)ceil( 1000 * framesLeft / sampleRate ) );\r
- continue;\r
- }\r
- outputData = info.totalBufferedData;\r
- outputSpace = info.availableFrames;\r
- /* Report output underflow to callback */\r
- if( info.underflow )\r
- {\r
- *cbFlags |= paOutputUnderflow;\r
- }\r
- }\r
-\r
- /* Now check input side */\r
- if( stream->input )\r
- {\r
- PA_ENSURE_( PaAsiHpi_GetStreamInfo( stream->input, &info ) );\r
- /* If a full block of samples hasn't been recorded yet, wait for it if possible */\r
- if( info.availableFrames < framesTarget )\r
- {\r
- framesLeft = framesTarget - info.availableFrames;\r
- /* As long as output is not disrupted in the process, wait for a full\r
- block of input samples */\r
- if( !stream->output || (outputData > framesLeft) )\r
- {\r
- Pa_Sleep( (long)ceil( 1000 * framesLeft / sampleRate ) );\r
- continue;\r
- }\r
- }\r
- inputData = info.availableFrames;\r
- /** @todo The paInputOverflow flag should be set in the callback containing the\r
- first input sample following the overflow. That means the block currently sitting\r
- at the fore-front of recording, i.e. typically the one containing the newest (last)\r
- sample in the HPI buffer system. This is most likely not the same as the current\r
- block of data being passed to the callback. The current overflow should ideally\r
- be noted in an overflow list of sorts, with an indication of when it should be\r
- reported. The trouble starts if there are several separate overflow incidents,\r
- given a big input buffer. Oh well, something to try out later... */\r
- if( info.overflow )\r
- {\r
- *cbFlags |= paInputOverflow;\r
- }\r
- }\r
- break;\r
- }\r
- /* Full-duplex stream */\r
- if( stream->input && stream->output )\r
- {\r
- if( outputSpace >= framesTarget )\r
- *framesAvail = outputSpace;\r
- /* If input didn't make the target, keep the output count instead (input underflow) */\r
- if( (inputData >= framesTarget) && (inputData < outputSpace) )\r
- *framesAvail = inputData;\r
- }\r
- else\r
- {\r
- *framesAvail = stream->input ? inputData : outputSpace;\r
- }\r
-\r
-error:\r
- return result;\r
-}\r
-\r
-\r
-/** Obtain recording, current and playback timestamps of stream.\r
- The current time is determined by the system clock. This "now" timestamp occurs at the\r
- forefront of recording (and playback in the full-duplex case), which happens later than the\r
- input timestamp by an amount equal to the total number of recorded frames in the input buffer.\r
- The output timestamp indicates when the next generated sample will actually be played. This\r
- happens after all the samples currently in the output buffer are played. The output timestamp\r
- therefore follows the current timestamp by an amount equal to the number of frames yet to be\r
- played back in the output buffer.\r
-\r
- If the current timestamp is the present, the input timestamp is in the past and the output\r
- timestamp is in the future.\r
-\r
- @param stream Pointer to stream struct\r
-\r
- @param timeInfo Pointer to timeInfo struct that will contain timestamps\r
- */\r
-static void PaAsiHpi_CalculateTimeInfo( PaAsiHpiStream *stream, PaStreamCallbackTimeInfo *timeInfo )\r
-{\r
- PaAsiHpiStreamInfo streamInfo;\r
- double sampleRate;\r
-\r
- assert( stream );\r
- assert( timeInfo );\r
- sampleRate = stream->baseStreamRep.streamInfo.sampleRate;\r
-\r
- /* The current time ("now") is at the forefront of both recording and playback */\r
- timeInfo->currentTime = GetStreamTime( (PaStream *)stream );\r
- /* The last sample in the input buffer was recorded just now, so the first sample\r
- happened (number of recorded samples)/sampleRate ago */\r
- timeInfo->inputBufferAdcTime = timeInfo->currentTime;\r
- if( stream->input )\r
- {\r
- PaAsiHpi_GetStreamInfo( stream->input, &streamInfo );\r
- timeInfo->inputBufferAdcTime -= streamInfo.totalBufferedData / sampleRate;\r
- }\r
- /* The first of the outgoing samples will be played after all the samples in the output\r
- buffer is done */\r
- timeInfo->outputBufferDacTime = timeInfo->currentTime;\r
- if( stream->output )\r
- {\r
- PaAsiHpi_GetStreamInfo( stream->output, &streamInfo );\r
- timeInfo->outputBufferDacTime += streamInfo.totalBufferedData / sampleRate;\r
- }\r
-}\r
-\r
-\r
-/** Read from HPI input stream and register buffers.\r
- This reads data from the HPI input stream (if it exists) and registers the temp stream\r
- buffers of both input and output streams with the buffer processor. In the process it also\r
- handles input underflows in the full-duplex case.\r
-\r
- @param stream Pointer to stream struct\r
-\r
- @param numFrames On entrance the number of available frames, on exit the number of\r
- received frames\r
-\r
- @param cbFlags Indicates overflows and underflows\r
-\r
- @return PortAudio error code\r
- */\r
-static PaError PaAsiHpi_BeginProcessing( PaAsiHpiStream *stream, unsigned long *numFrames,\r
- PaStreamCallbackFlags *cbFlags )\r
-{\r
- PaError result = paNoError;\r
-\r
- assert( stream );\r
- if( *numFrames > stream->maxFramesPerHostBuffer )\r
- *numFrames = stream->maxFramesPerHostBuffer;\r
-\r
- if( stream->input )\r
- {\r
- PaAsiHpiStreamInfo info;\r
-\r
- uint32_t framesToGet = *numFrames;\r
-\r
- /* Check for overflows and underflows yet again */\r
- PA_ENSURE_( PaAsiHpi_GetStreamInfo( stream->input, &info ) );\r
- if( info.overflow )\r
- {\r
- *cbFlags |= paInputOverflow;\r
- }\r
- /* Input underflow if less than expected number of samples pitch up */\r
- if( framesToGet > info.availableFrames )\r
- {\r
- PaUtilZeroer *zeroer;\r
- PaSampleFormat inputFormat;\r
-\r
- /* Never call an input-only stream with InputUnderflow set */\r
- if( stream->output )\r
- *cbFlags |= paInputUnderflow;\r
- framesToGet = info.availableFrames;\r
- /* Fill temp buffer with silence (to make up for missing input samples) */\r
- inputFormat = PaAsiHpi_HpiToPaFormat( stream->input->hpiFormat.wFormat );\r
- zeroer = PaUtil_SelectZeroer( inputFormat );\r
- zeroer(stream->input->tempBuffer, 1,\r
- stream->input->tempBufferSize / Pa_GetSampleSize(inputFormat) );\r
- }\r
-\r
- /* Read block of data into temp buffer */\r
- PA_ASIHPI_UNLESS_( HPI_InStreamReadBuf( NULL,\r
- stream->input->hpiStream,\r
- stream->input->tempBuffer,\r
- framesToGet * stream->input->bytesPerFrame),\r
- paUnanticipatedHostError );\r
- /* Register temp buffer with buffer processor (always FULL buffer) */\r
- PaUtil_SetInputFrameCount( &stream->bufferProcessor, *numFrames );\r
- /* HPI interface only allows interleaved channels */\r
- PaUtil_SetInterleavedInputChannels( &stream->bufferProcessor,\r
- 0, stream->input->tempBuffer,\r
- stream->input->hpiFormat.wChannels );\r
- }\r
- if( stream->output )\r
- {\r
- /* Register temp buffer with buffer processor */\r
- PaUtil_SetOutputFrameCount( &stream->bufferProcessor, *numFrames );\r
- /* HPI interface only allows interleaved channels */\r
- PaUtil_SetInterleavedOutputChannels( &stream->bufferProcessor,\r
- 0, stream->output->tempBuffer,\r
- stream->output->hpiFormat.wChannels );\r
- }\r
-\r
-error:\r
- return result;\r
-}\r
-\r
-\r
-/** Flush output buffers to HPI output stream.\r
- This completes the processing cycle by writing the temp buffer to the HPI interface.\r
- Additional output underflows are caught before data is written to the stream, as this\r
- action typically remedies the underflow and hides it in the process.\r
-\r
- @param stream Pointer to stream struct\r
-\r
- @param numFrames The number of frames to write to the output stream\r
-\r
- @param cbFlags Indicates overflows and underflows\r
- */\r
-static PaError PaAsiHpi_EndProcessing( PaAsiHpiStream *stream, unsigned long numFrames,\r
- PaStreamCallbackFlags *cbFlags )\r
-{\r
- PaError result = paNoError;\r
-\r
- assert( stream );\r
-\r
- if( stream->output )\r
- {\r
- PaAsiHpiStreamInfo info;\r
- /* Check for underflows after the (potentially time-consuming) callback */\r
- PA_ENSURE_( PaAsiHpi_GetStreamInfo( stream->output, &info ) );\r
- if( info.underflow )\r
- {\r
- *cbFlags |= paOutputUnderflow;\r
- }\r
-\r
- /* Write temp buffer to HPI stream */\r
- PA_ASIHPI_UNLESS_( HPI_OutStreamWriteBuf( NULL,\r
- stream->output->hpiStream,\r
- stream->output->tempBuffer,\r
- numFrames * stream->output->bytesPerFrame,\r
- &stream->output->hpiFormat),\r
- paUnanticipatedHostError );\r
- }\r
-\r
-error:\r
- return result;\r
-}\r
-\r
-\r
-/** Main callback engine.\r
- This function runs in a separate thread and does all the work of fetching audio data from\r
- the AudioScience card via the HPI interface, feeding it to the user callback via the buffer\r
- processor, and delivering the resulting output data back to the card via HPI calls.\r
- It is started and terminated when the PortAudio stream is started and stopped, and starts\r
- the HPI streams on startup.\r
-\r
- @param userData A pointer to an open stream previously created with Pa_OpenStream.\r
-*/\r
-static void *CallbackThreadFunc( void *userData )\r
-{\r
- PaError result = paNoError;\r
- PaAsiHpiStream *stream = (PaAsiHpiStream *) userData;\r
- int callbackResult = paContinue;\r
-\r
- assert( stream );\r
-\r
- /* Cleanup routine stops streams on thread exit */\r
- pthread_cleanup_push( &PaAsiHpi_OnThreadExit, stream );\r
-\r
- /* Start HPI streams and notify parent when we're done */\r
- PA_ENSURE_( PaUnixThread_PrepareNotify( &stream->thread ) );\r
- /* Buffer will be primed with silence */\r
- PA_ENSURE_( PaAsiHpi_StartStream( stream, 0 ) );\r
- PA_ENSURE_( PaUnixThread_NotifyParent( &stream->thread ) );\r
-\r
- /* MAIN LOOP */\r
- while( 1 )\r
- {\r
- PaStreamCallbackFlags cbFlags = 0;\r
- unsigned long framesAvail, framesGot;\r
-\r
- pthread_testcancel();\r
-\r
- /** @concern StreamStop if the main thread has requested a stop and the stream has not\r
- * been effectively stopped we signal this condition by modifying callbackResult\r
- * (we'll want to flush buffered output). */\r
- if( PaUnixThread_StopRequested( &stream->thread ) && (callbackResult == paContinue) )\r
- {\r
- PA_DEBUG(( "Setting callbackResult to paComplete\n" ));\r
- callbackResult = paComplete;\r
- }\r
-\r
- /* Start winding down thread if requested */\r
- if( callbackResult != paContinue )\r
- {\r
- stream->callbackAbort = (callbackResult == paAbort);\r
- if( stream->callbackAbort ||\r
- /** @concern BlockAdaption: Go on if adaption buffers are empty */\r
- PaUtil_IsBufferProcessorOutputEmpty( &stream->bufferProcessor ) )\r
- {\r
- goto end;\r
- }\r
- PA_DEBUG(( "%s: Flushing buffer processor\n", __FUNCTION__ ));\r
- /* There is still buffered output that needs to be processed */\r
- }\r
-\r
- /* SLEEP */\r
- /* Wait for data (or buffer space) to become available. This basically sleeps and\r
- polls the HPI interface until a full block of frames can be moved. */\r
- PA_ENSURE_( PaAsiHpi_WaitForFrames( stream, &framesAvail, &cbFlags ) );\r
-\r
- /* Consume buffer space. Once we have a number of frames available for consumption we\r
- must retrieve the data from the HPI interface and pass it to the PA buffer processor.\r
- We should be prepared to process several chunks successively. */\r
- while( framesAvail > 0 )\r
- {\r
- PaStreamCallbackTimeInfo timeInfo = {0, 0, 0};\r
-\r
- pthread_testcancel();\r
-\r
- framesGot = framesAvail;\r
- if( stream->bufferProcessor.hostBufferSizeMode == paUtilFixedHostBufferSize )\r
- {\r
- /* We've committed to a fixed host buffer size, stick to that */\r
- framesGot = framesGot >= stream->maxFramesPerHostBuffer ? stream->maxFramesPerHostBuffer : 0;\r
- }\r
- else\r
- {\r
- /* We've committed to an upper bound on the size of host buffers */\r
- assert( stream->bufferProcessor.hostBufferSizeMode == paUtilBoundedHostBufferSize );\r
- framesGot = PA_MIN( framesGot, stream->maxFramesPerHostBuffer );\r
- }\r
-\r
- /* Obtain buffer timestamps */\r
- PaAsiHpi_CalculateTimeInfo( stream, &timeInfo );\r
- PaUtil_BeginBufferProcessing( &stream->bufferProcessor, &timeInfo, cbFlags );\r
- /* CPU load measurement should include processing activivity external to the stream callback */\r
- PaUtil_BeginCpuLoadMeasurement( &stream->cpuLoadMeasurer );\r
- if( framesGot > 0 )\r
- {\r
- /* READ FROM HPI INPUT STREAM */\r
- PA_ENSURE_( PaAsiHpi_BeginProcessing( stream, &framesGot, &cbFlags ) );\r
- /* Input overflow in a full-duplex stream makes for interesting times */\r
- if( stream->input && stream->output && (cbFlags & paInputOverflow) )\r
- {\r
- /* Special full-duplex paNeverDropInput mode */\r
- if( stream->neverDropInput )\r
- {\r
- PaUtil_SetNoOutput( &stream->bufferProcessor );\r
- cbFlags |= paOutputOverflow;\r
- }\r
- }\r
- /* CALL USER CALLBACK WITH INPUT DATA, AND OBTAIN OUTPUT DATA */\r
- PaUtil_EndBufferProcessing( &stream->bufferProcessor, &callbackResult );\r
- /* Clear overflow and underflow information (but PaAsiHpi_EndProcessing might\r
- still show up output underflow that will carry over to next round) */\r
- cbFlags = 0;\r
- /* WRITE TO HPI OUTPUT STREAM */\r
- PA_ENSURE_( PaAsiHpi_EndProcessing( stream, framesGot, &cbFlags ) );\r
- /* Advance frame counter */\r
- framesAvail -= framesGot;\r
- }\r
- PaUtil_EndCpuLoadMeasurement( &stream->cpuLoadMeasurer, framesGot );\r
-\r
- if( framesGot == 0 )\r
- {\r
- /* Go back to polling for more frames */\r
- break;\r
-\r
- }\r
- if( callbackResult != paContinue )\r
- break;\r
- }\r
- }\r
-\r
- /* This code is unreachable, but important to include regardless because it\r
- * is possibly a macro with a closing brace to match the opening brace in\r
- * pthread_cleanup_push() above. The documentation states that they must\r
- * always occur in pairs. */\r
- pthread_cleanup_pop( 1 );\r
-\r
-end:\r
- /* Indicates normal exit of callback, as opposed to the thread getting killed explicitly */\r
- stream->callbackFinished = 1;\r
- PA_DEBUG(( "%s: Thread %d exiting (callbackResult = %d)\n ",\r
- __FUNCTION__, pthread_self(), callbackResult ));\r
- /* Exit from thread and report any PortAudio error in the process */\r
- PaUnixThreading_EXIT( result );\r
-error:\r
- goto end;\r
-}\r
-\r
-/* --------------------------- Blocking Interface --------------------------- */\r
-\r
-/* As separate stream interfaces are used for blocking and callback streams, the following\r
- functions can be guaranteed to only be called for blocking streams. */\r
-\r
-/** Read data from input stream.\r
- This reads the indicated number of frames into the supplied buffer from an input stream,\r
- and blocks until this is done.\r
-\r
- @param s Pointer to PortAudio stream\r
-\r
- @param buffer Pointer to buffer that will receive interleaved data (or an array of pointers\r
- to a buffer for each non-interleaved channel)\r
-\r
- @param frames Number of frames to read from stream\r
-\r
- @return PortAudio error code (also indicates overflow via paInputOverflowed)\r
- */\r
-static PaError ReadStream( PaStream *s,\r
- void *buffer,\r
- unsigned long frames )\r
-{\r
- PaError result = paNoError;\r
- PaAsiHpiStream *stream = (PaAsiHpiStream*)s;\r
- PaAsiHpiStreamInfo info;\r
- void *userBuffer;\r
-\r
- assert( stream );\r
- PA_UNLESS_( stream->input, paCanNotReadFromAnOutputOnlyStream );\r
-\r
- /* Check for input overflow since previous call to ReadStream */\r
- PA_ENSURE_( PaAsiHpi_GetStreamInfo( stream->input, &info ) );\r
- if( info.overflow )\r
- {\r
- result = paInputOverflowed;\r
- }\r
-\r
- /* NB Make copy of user buffer pointers, since they are advanced by buffer processor */\r
- if( stream->bufferProcessor.userInputIsInterleaved )\r
- {\r
- userBuffer = buffer;\r
- }\r
- else\r
- {\r
- /* Copy channels into local array */\r
- userBuffer = stream->blockingUserBufferCopy;\r
- memcpy( userBuffer, buffer, sizeof (void *) * stream->input->hpiFormat.wChannels );\r
- }\r
-\r
- while( frames > 0 )\r
- {\r
- unsigned long framesGot, framesAvail;\r
- PaStreamCallbackFlags cbFlags = 0;\r
-\r
- PA_ENSURE_( PaAsiHpi_WaitForFrames( stream, &framesAvail, &cbFlags ) );\r
- framesGot = PA_MIN( framesAvail, frames );\r
- PA_ENSURE_( PaAsiHpi_BeginProcessing( stream, &framesGot, &cbFlags ) );\r
-\r
- if( framesGot > 0 )\r
- {\r
- framesGot = PaUtil_CopyInput( &stream->bufferProcessor, &userBuffer, framesGot );\r
- PA_ENSURE_( PaAsiHpi_EndProcessing( stream, framesGot, &cbFlags ) );\r
- /* Advance frame counter */\r
- frames -= framesGot;\r
- }\r
- }\r
-\r
-error:\r
- return result;\r
-}\r
-\r
-\r
-/** Write data to output stream.\r
- This writes the indicated number of frames from the supplied buffer to an output stream,\r
- and blocks until this is done.\r
-\r
- @param s Pointer to PortAudio stream\r
-\r
- @param buffer Pointer to buffer that provides interleaved data (or an array of pointers\r
- to a buffer for each non-interleaved channel)\r
-\r
- @param frames Number of frames to write to stream\r
-\r
- @return PortAudio error code (also indicates underflow via paOutputUnderflowed)\r
- */\r
-static PaError WriteStream( PaStream *s,\r
- const void *buffer,\r
- unsigned long frames )\r
-{\r
- PaError result = paNoError;\r
- PaAsiHpiStream *stream = (PaAsiHpiStream*)s;\r
- PaAsiHpiStreamInfo info;\r
- const void *userBuffer;\r
-\r
- assert( stream );\r
- PA_UNLESS_( stream->output, paCanNotWriteToAnInputOnlyStream );\r
-\r
- /* Check for output underflow since previous call to WriteStream */\r
- PA_ENSURE_( PaAsiHpi_GetStreamInfo( stream->output, &info ) );\r
- if( info.underflow )\r
- {\r
- result = paOutputUnderflowed;\r
- }\r
-\r
- /* NB Make copy of user buffer pointers, since they are advanced by buffer processor */\r
- if( stream->bufferProcessor.userOutputIsInterleaved )\r
- {\r
- userBuffer = buffer;\r
- }\r
- else\r
- {\r
- /* Copy channels into local array */\r
- userBuffer = stream->blockingUserBufferCopy;\r
- memcpy( (void *)userBuffer, buffer, sizeof (void *) * stream->output->hpiFormat.wChannels );\r
- }\r
-\r
- while( frames > 0 )\r
- {\r
- unsigned long framesGot, framesAvail;\r
- PaStreamCallbackFlags cbFlags = 0;\r
-\r
- PA_ENSURE_( PaAsiHpi_WaitForFrames( stream, &framesAvail, &cbFlags ) );\r
- framesGot = PA_MIN( framesAvail, frames );\r
- PA_ENSURE_( PaAsiHpi_BeginProcessing( stream, &framesGot, &cbFlags ) );\r
-\r
- if( framesGot > 0 )\r
- {\r
- framesGot = PaUtil_CopyOutput( &stream->bufferProcessor, &userBuffer, framesGot );\r
- PA_ENSURE_( PaAsiHpi_EndProcessing( stream, framesGot, &cbFlags ) );\r
- /* Advance frame counter */\r
- frames -= framesGot;\r
- }\r
- }\r
-\r
-error:\r
- return result;\r
-}\r
-\r
-\r
-/** Number of frames that can be read from input stream without blocking.\r
-\r
- @param s Pointer to PortAudio stream\r
-\r
- @return Number of frames, or PortAudio error code\r
- */\r
-static signed long GetStreamReadAvailable( PaStream *s )\r
-{\r
- PaError result = paNoError;\r
- PaAsiHpiStream *stream = (PaAsiHpiStream*)s;\r
- PaAsiHpiStreamInfo info;\r
-\r
- assert( stream );\r
- PA_UNLESS_( stream->input, paCanNotReadFromAnOutputOnlyStream );\r
-\r
- PA_ENSURE_( PaAsiHpi_GetStreamInfo( stream->input, &info ) );\r
- /* Round down to the nearest host buffer multiple */\r
- result = (info.availableFrames / stream->maxFramesPerHostBuffer) * stream->maxFramesPerHostBuffer;\r
- if( info.overflow )\r
- {\r
- result = paInputOverflowed;\r
- }\r
-\r
-error:\r
- return result;\r
-}\r
-\r
-\r
-/** Number of frames that can be written to output stream without blocking.\r
-\r
- @param s Pointer to PortAudio stream\r
-\r
- @return Number of frames, or PortAudio error code\r
- */\r
-static signed long GetStreamWriteAvailable( PaStream *s )\r
-{\r
- PaError result = paNoError;\r
- PaAsiHpiStream *stream = (PaAsiHpiStream*)s;\r
- PaAsiHpiStreamInfo info;\r
-\r
- assert( stream );\r
- PA_UNLESS_( stream->output, paCanNotWriteToAnInputOnlyStream );\r
-\r
- PA_ENSURE_( PaAsiHpi_GetStreamInfo( stream->output, &info ) );\r
- /* Round down to the nearest host buffer multiple */\r
- result = (info.availableFrames / stream->maxFramesPerHostBuffer) * stream->maxFramesPerHostBuffer;\r
- if( info.underflow )\r
- {\r
- result = paOutputUnderflowed;\r
- }\r
-\r
-error:\r
- return result;\r
-}\r
+/*
+ * $Id:$
+ * PortAudio Portable Real-Time Audio Library
+ * Latest Version at: http://www.portaudio.com
+ * AudioScience HPI implementation by Fred Gleason, Ludwig Schwardt and
+ * Eliot Blennerhassett
+ *
+ * Copyright (c) 2003 Fred Gleason <fredg@salemradiolabs.com>
+ * Copyright (c) 2005,2006 Ludwig Schwardt <schwardt@sun.ac.za>
+ * Copyright (c) 2011 Eliot Blennerhassett <eblennerhassett@audioscience.com>
+ *
+ * Based on the Open Source API proposed by Ross Bencina
+ * Copyright (c) 1999-2008 Ross Bencina, Phil Burk
+ *
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * The text above constitutes the entire PortAudio license; however,
+ * the PortAudio community also makes the following non-binding requests:
+ *
+ * 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. It is also
+ * requested that these non-binding requests be included along with the
+ * license above.
+ */
+
+/*
+ * Modification History
+ * 12/2003 - Initial version
+ * 09/2005 - v19 version [rewrite]
+ */
+
+/** @file
+ @ingroup hostapi_src
+ @brief Host API implementation supporting AudioScience cards
+ via the Linux HPI interface.
+
+ <h3>Overview</h3>
+
+ This is a PortAudio implementation for the AudioScience HPI Audio API
+ on the Linux platform. AudioScience makes a range of audio adapters customised
+ for the broadcasting industry, with support for both Windows and Linux.
+ More information on their products can be found on their website:
+
+ http://www.audioscience.com
+
+ Documentation for the HPI API can be found at:
+
+ http://www.audioscience.com/internet/download/sdk/hpi_usermanual_html/html/index.html
+
+ The Linux HPI driver itself (a kernel module + library) can be downloaded from:
+
+ http://www.audioscience.com/internet/download/linux_drivers.htm
+
+ <h3>Implementation strategy</h3>
+
+ *Note* Ideally, AudioScience cards should be handled by the PortAudio ALSA
+ implementation on Linux, as ALSA is the preferred Linux soundcard API. The existence
+ of this host API implementation might therefore seem a bit flawed. Unfortunately, at
+ the time of the creation of this implementation (June 2006), the PA ALSA implementation
+ could not make use of the existing AudioScience ALSA driver. PA ALSA uses the
+ "memory-mapped" (mmap) ALSA access mode to interact with the ALSA library, while the
+ AudioScience ALSA driver only supports the "read-write" access mode. The appropriate
+ solution to this problem is to add "read-write" support to PortAudio ALSA, thereby
+ extending the range of soundcards it supports (AudioScience cards are not the only
+ ones with this problem). Given the author's limited knowledge of ALSA and the
+ simplicity of the HPI API, the second-best solution was born...
+
+ The following mapping between HPI and PA was followed:
+ HPI subsystem => PortAudio host API
+ HPI adapter => nothing specific
+ HPI stream => PortAudio device
+
+ Each HPI stream is either input or output (not both), and can support
+ different channel counts, sampling rates and sample formats. It is therefore
+ a more natural fit to a PA device. A PA stream can therefore combine two
+ HPI streams (one input and one output) into a "full-duplex" stream. These
+ HPI streams can even be on different physical adapters. The two streams ought to be
+ sample-synchronised when they reside on the same adapter, as most AudioScience adapters
+ derive their ADC and DAC clocks from one master clock. When combining two adapters
+ into one full-duplex stream, however, the use of a word clock connection between the
+ adapters is strongly recommended.
+
+ The HPI interface is inherently blocking, making use of read and write calls to
+ transfer data between user buffers and driver buffers. The callback interface therefore
+ requires a helper thread ("callback engine") which periodically transfers data (one thread
+ per PA stream, in fact). The current implementation explicitly sleeps via Pa_Sleep() until
+ enough samples can be transferred (select() or poll() would be better, but currently seems
+ impossible...). The thread implementation makes use of the Unix thread helper functions
+ and some pthread calls here and there. If a unified PA thread exists, this host API
+ implementation might also compile on Windows, as this is the only real Linux-specific
+ part of the code.
+
+ There is no inherent fixed buffer size in the HPI interface, as in some other host APIs.
+ The PortAudio implementation contains a buffer that is allocated during OpenStream and
+ used to transfer data between the callback and the HPI driver buffer. The size of this
+ buffer is quite flexible and is derived from latency suggestions and matched to the
+ requested callback buffer size as far as possible. It can become quite huge, as the
+ AudioScience cards are typically geared towards higher-latency applications and contain
+ large hardware buffers.
+
+ The HPI interface natively supports most common sample formats and sample rates (some
+ conversion is done on the adapter itself).
+
+ Stream time is measured based on the number of processed frames, which is adjusted by the
+ number of frames currently buffered by the HPI driver.
+
+ There is basic support for detecting overflow and underflow. The HPI interface does not
+ explicitly indicate this, so thresholds on buffer levels are used in combination with
+ stream state. Recovery from overflow and underflow is left to the PA client.
+
+ Blocking streams are also implemented. It makes use of the same polling routines that
+ the callback interface uses, in order to prevent the allocation of variable-sized
+ buffers during reading and writing. The framesPerBuffer parameter is therefore still
+ relevant, and this can be increased in the blocking case to improve efficiency.
+
+ The implementation contains extensive reporting macros (slightly modified PA_ENSURE and
+ PA_UNLESS versions) and a useful stream dump routine to provide debugging feedback.
+
+ Output buffer priming via the user callback (i.e. paPrimeOutputBuffersUsingStreamCallback
+ and friends) is not implemented yet. All output is primed with silence.
+ */
+
+#include <unistd.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h> /* strlen() */
+#include <pthread.h> /* pthreads and friends */
+#include <assert.h> /* assert */
+#include <math.h> /* ceil, floor */
+
+#include <asihpi/hpi.h> /* HPI API */
+
+#include "portaudio.h" /* PortAudio API */
+#include "pa_util.h" /* PA_DEBUG, other small utilities */
+#include "pa_unix_util.h" /* Unix threading utilities */
+#include "pa_allocation.h" /* Group memory allocation */
+#include "pa_hostapi.h" /* Host API structs */
+#include "pa_stream.h" /* Stream interface structs */
+#include "pa_cpuload.h" /* CPU load measurer */
+#include "pa_process.h" /* Buffer processor */
+#include "pa_converters.h" /* PaUtilZeroer */
+#include "pa_debugprint.h"
+
+/* -------------------------------------------------------------------------- */
+
+/*
+ * Defines
+ */
+
+/* Error reporting and assertions */
+
+/** Evaluate expression, and return on any PortAudio errors */
+#define PA_ENSURE_(expr) \
+ do { \
+ PaError paError = (expr); \
+ if( UNLIKELY( paError < paNoError ) ) \
+ { \
+ PA_DEBUG(( "Expression '" #expr "' failed in '" __FILE__ "', line: " STRINGIZE( __LINE__ ) "\n" )); \
+ result = paError; \
+ goto error; \
+ } \
+ } while (0);
+
+/** Assert expression, else return the provided PaError */
+#define PA_UNLESS_(expr, paError) \
+ do { \
+ if( UNLIKELY( (expr) == 0 ) ) \
+ { \
+ PA_DEBUG(( "Expression '" #expr "' failed in '" __FILE__ "', line: " STRINGIZE( __LINE__ ) "\n" )); \
+ result = (paError); \
+ goto error; \
+ } \
+ } while( 0 );
+
+/** Check return value of HPI function, and map it to PaError */
+#define PA_ASIHPI_UNLESS_(expr, paError) \
+ do { \
+ hpi_err_t hpiError = (expr); \
+ /* If HPI error occurred */ \
+ if( UNLIKELY( hpiError ) ) \
+ { \
+ char szError[256]; \
+ HPI_GetErrorText( hpiError, szError ); \
+ PA_DEBUG(( "HPI error %d occurred: %s\n", hpiError, szError )); \
+ /* This message will always be displayed, even if debug info is disabled */ \
+ PA_DEBUG(( "Expression '" #expr "' failed in '" __FILE__ "', line: " STRINGIZE( __LINE__ ) "\n" )); \
+ if( (paError) == paUnanticipatedHostError ) \
+ { \
+ PA_DEBUG(( "Host error description: %s\n", szError )); \
+ /* PaUtil_SetLastHostErrorInfo should only be used in the main thread */ \
+ if( pthread_equal( pthread_self(), paUnixMainThread ) ) \
+ { \
+ PaUtil_SetLastHostErrorInfo( paInDevelopment, hpiError, szError ); \
+ } \
+ } \
+ /* If paNoError is specified, continue as usual */ \
+ /* (useful if you only want to print out the debug messages above) */ \
+ if( (paError) < 0 ) \
+ { \
+ result = (paError); \
+ goto error; \
+ } \
+ } \
+ } while( 0 );
+
+/** Report HPI error code and text */
+#define PA_ASIHPI_REPORT_ERROR_(hpiErrorCode) \
+ do { \
+ char szError[256]; \
+ HPI_GetErrorText( hpiError, szError ); \
+ PA_DEBUG(( "HPI error %d occurred: %s\n", hpiError, szError )); \
+ /* PaUtil_SetLastHostErrorInfo should only be used in the main thread */ \
+ if( pthread_equal( pthread_self(), paUnixMainThread ) ) \
+ { \
+ PaUtil_SetLastHostErrorInfo( paInDevelopment, (hpiErrorCode), szError ); \
+ } \
+ } while( 0 );
+
+/* Defaults */
+
+/** Sample formats available natively on AudioScience hardware */
+#define PA_ASIHPI_AVAILABLE_FORMATS_ (paFloat32 | paInt32 | paInt24 | paInt16 | paUInt8)
+/** Enable background bus mastering (BBM) for buffer transfers, if available (see HPI docs) */
+#define PA_ASIHPI_USE_BBM_ 1
+/** Minimum number of frames in HPI buffer (for either data or available space).
+ If buffer contains less data/space, it indicates xrun or completion. */
+#define PA_ASIHPI_MIN_FRAMES_ 1152
+/** Minimum polling interval in milliseconds, which determines minimum host buffer size */
+#define PA_ASIHPI_MIN_POLLING_INTERVAL_ 10
+
+/* -------------------------------------------------------------------------- */
+
+/*
+ * Structures
+ */
+
+/** Host API global data */
+typedef struct PaAsiHpiHostApiRepresentation
+{
+ /* PortAudio "base class" - keep the baseRep first! (C-style inheritance) */
+ PaUtilHostApiRepresentation baseHostApiRep;
+ PaUtilStreamInterface callbackStreamInterface;
+ PaUtilStreamInterface blockingStreamInterface;
+
+ PaUtilAllocationGroup *allocations;
+
+ /* implementation specific data goes here */
+
+ PaHostApiIndex hostApiIndex;
+}
+PaAsiHpiHostApiRepresentation;
+
+
+/** Device data */
+typedef struct PaAsiHpiDeviceInfo
+{
+ /* PortAudio "base class" - keep the baseRep first! (C-style inheritance) */
+ /** Common PortAudio device information */
+ PaDeviceInfo baseDeviceInfo;
+
+ /* implementation specific data goes here */
+
+ /** Adapter index */
+ uint16_t adapterIndex;
+ /** Adapter model number (hex) */
+ uint16_t adapterType;
+ /** Adapter HW/SW version */
+ uint16_t adapterVersion;
+ /** Adapter serial number */
+ uint32_t adapterSerialNumber;
+ /** Stream number */
+ uint16_t streamIndex;
+ /** 0=Input, 1=Output (HPI streams are either input or output but not both) */
+ uint16_t streamIsOutput;
+}
+PaAsiHpiDeviceInfo;
+
+
+/** Stream state as defined by PortAudio.
+ It seems that the host API implementation has to keep track of the PortAudio stream state.
+ Please note that this is NOT the same as the state of the underlying HPI stream. By separating
+ these two concepts, a lot of flexibility is gained. There is a rough match between the two,
+ of course, but forcing a precise match is difficult. For example, HPI_STATE_DRAINED can occur
+ during the Active state of PortAudio (due to underruns) and also during CallBackFinished in
+ the case of an output stream. Similarly, HPI_STATE_STOPPED mostly coincides with the Stopped
+ PortAudio state, by may also occur in the CallbackFinished state when recording is finished.
+
+ Here is a rough match-up:
+
+ PortAudio state => HPI state
+ --------------- ---------
+ Active => HPI_STATE_RECORDING, HPI_STATE_PLAYING, (HPI_STATE_DRAINED)
+ Stopped => HPI_STATE_STOPPED
+ CallbackFinished => HPI_STATE_STOPPED, HPI_STATE_DRAINED */
+typedef enum PaAsiHpiStreamState
+{
+ paAsiHpiStoppedState=0,
+ paAsiHpiActiveState=1,
+ paAsiHpiCallbackFinishedState=2
+}
+PaAsiHpiStreamState;
+
+
+/** Stream component data (associated with one direction, i.e. either input or output) */
+typedef struct PaAsiHpiStreamComponent
+{
+ /** Device information (HPI handles, etc) */
+ PaAsiHpiDeviceInfo *hpiDevice;
+ /** Stream handle, as passed to HPI interface. */
+ hpi_handle_t hpiStream;
+ /** Stream format, as passed to HPI interface */
+ struct hpi_format hpiFormat;
+ /** Number of bytes per frame, derived from hpiFormat and saved for convenience */
+ uint32_t bytesPerFrame;
+ /** Size of hardware (on-card) buffer of stream in bytes */
+ uint32_t hardwareBufferSize;
+ /** Size of host (BBM) buffer of stream in bytes (if used) */
+ uint32_t hostBufferSize;
+ /** Upper limit on the utilization of output stream buffer (both hardware and host).
+ This prevents large latencies in an output-only stream with a potentially huge buffer
+ and a fast data generator, which would otherwise keep the hardware buffer filled to
+ capacity. See also the "Hardware Buffering=off" option in the AudioScience WAV driver. */
+ uint32_t outputBufferCap;
+ /** Sample buffer (halfway station between HPI and buffer processor) */
+ uint8_t *tempBuffer;
+ /** Sample buffer size, in bytes */
+ uint32_t tempBufferSize;
+}
+PaAsiHpiStreamComponent;
+
+
+/** Stream data */
+typedef struct PaAsiHpiStream
+{
+ /* PortAudio "base class" - keep the baseRep first! (C-style inheritance) */
+ PaUtilStreamRepresentation baseStreamRep;
+ PaUtilCpuLoadMeasurer cpuLoadMeasurer;
+ PaUtilBufferProcessor bufferProcessor;
+
+ PaUtilAllocationGroup *allocations;
+
+ /* implementation specific data goes here */
+
+ /** Separate structs for input and output sides of stream */
+ PaAsiHpiStreamComponent *input, *output;
+
+ /** Polling interval (in milliseconds) */
+ uint32_t pollingInterval;
+ /** Are we running in callback mode? */
+ int callbackMode;
+ /** Number of frames to transfer at a time to/from HPI */
+ unsigned long maxFramesPerHostBuffer;
+ /** Indicates that the stream is in the paNeverDropInput mode */
+ int neverDropInput;
+ /** Contains copy of user buffers, used by blocking interface to transfer non-interleaved data.
+ It went here instead of to each stream component, as the stream component buffer setup in
+ PaAsiHpi_SetupBuffers doesn't know the stream details such as callbackMode.
+ (Maybe a problem later if ReadStream and WriteStream happens concurrently on same stream.) */
+ void **blockingUserBufferCopy;
+
+ /* Thread-related variables */
+
+ /** Helper thread which will deliver data to user callback */
+ PaUnixThread thread;
+ /** PortAudio stream state (Active/Stopped/CallbackFinished) */
+ volatile sig_atomic_t state;
+ /** Hard abort, i.e. drop frames? */
+ volatile sig_atomic_t callbackAbort;
+ /** True if stream stopped via exiting callback with paComplete/paAbort flag
+ (as opposed to explicit call to StopStream/AbortStream) */
+ volatile sig_atomic_t callbackFinished;
+}
+PaAsiHpiStream;
+
+
+/** Stream state information, collected together for convenience */
+typedef struct PaAsiHpiStreamInfo
+{
+ /** HPI stream state (HPI_STATE_STOPPED, HPI_STATE_PLAYING, etc.) */
+ uint16_t state;
+ /** Size (in bytes) of recording/playback data buffer in HPI driver */
+ uint32_t bufferSize;
+ /** Amount of data (in bytes) available in the buffer */
+ uint32_t dataSize;
+ /** Number of frames played/recorded since last stream reset */
+ uint32_t frameCounter;
+ /** Amount of data (in bytes) in hardware (on-card) buffer.
+ This differs from dataSize if bus mastering (BBM) is used, which introduces another
+ driver-level buffer to which dataSize/bufferSize then refers. */
+ uint32_t auxDataSize;
+ /** Total number of data frames currently buffered by HPI driver (host + hw buffers) */
+ uint32_t totalBufferedData;
+ /** Size of immediately available data (for input) or space (for output) in frames.
+ This only checks the first-level buffer (typically host buffer). This amount can be
+ transferred immediately. */
+ uint32_t availableFrames;
+ /** Indicates that hardware buffer is getting too full */
+ int overflow;
+ /** Indicates that hardware buffer is getting too empty */
+ int underflow;
+}
+PaAsiHpiStreamInfo;
+
+/* -------------------------------------------------------------------------- */
+
+/*
+ * Function prototypes
+ */
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+ /* The only exposed function in the entire host API implementation */
+ PaError PaAsiHpi_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+static void Terminate( struct PaUtilHostApiRepresentation *hostApi );
+static PaError IsFormatSupported( struct PaUtilHostApiRepresentation *hostApi,
+ const PaStreamParameters *inputParameters,
+ const PaStreamParameters *outputParameters,
+ double sampleRate );
+
+/* Stream prototypes */
+static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
+ PaStream **s,
+ const PaStreamParameters *inputParameters,
+ const PaStreamParameters *outputParameters,
+ double sampleRate,
+ unsigned long framesPerBuffer,
+ PaStreamFlags streamFlags,
+ PaStreamCallback *streamCallback,
+ void *userData );
+static PaError CloseStream( PaStream *s );
+static PaError StartStream( PaStream *s );
+static PaError StopStream( PaStream *s );
+static PaError AbortStream( PaStream *s );
+static PaError IsStreamStopped( PaStream *s );
+static PaError IsStreamActive( PaStream *s );
+static PaTime GetStreamTime( PaStream *s );
+static double GetStreamCpuLoad( PaStream *s );
+
+/* Blocking prototypes */
+static PaError ReadStream( PaStream *s, void *buffer, unsigned long frames );
+static PaError WriteStream( PaStream *s, const void *buffer, unsigned long frames );
+static signed long GetStreamReadAvailable( PaStream *s );
+static signed long GetStreamWriteAvailable( PaStream *s );
+
+/* Callback prototypes */
+static void *CallbackThreadFunc( void *userData );
+
+/* Functions specific to this API */
+static PaError PaAsiHpi_BuildDeviceList( PaAsiHpiHostApiRepresentation *hpiHostApi );
+static uint16_t PaAsiHpi_PaToHpiFormat( PaSampleFormat paFormat );
+static PaSampleFormat PaAsiHpi_HpiToPaFormat( uint16_t hpiFormat );
+static PaError PaAsiHpi_CreateFormat( struct PaUtilHostApiRepresentation *hostApi,
+ const PaStreamParameters *parameters, double sampleRate,
+ PaAsiHpiDeviceInfo **hpiDevice, struct hpi_format *hpiFormat );
+static PaError PaAsiHpi_OpenInput( struct PaUtilHostApiRepresentation *hostApi,
+ const PaAsiHpiDeviceInfo *hpiDevice, const struct hpi_format *hpiFormat,
+ hpi_handle_t *hpiStream );
+static PaError PaAsiHpi_OpenOutput( struct PaUtilHostApiRepresentation *hostApi,
+ const PaAsiHpiDeviceInfo *hpiDevice, const struct hpi_format *hpiFormat,
+ hpi_handle_t *hpiStream );
+static PaError PaAsiHpi_GetStreamInfo( PaAsiHpiStreamComponent *streamComp, PaAsiHpiStreamInfo *info );
+static void PaAsiHpi_StreamComponentDump( PaAsiHpiStreamComponent *streamComp, PaAsiHpiStream *stream );
+static void PaAsiHpi_StreamDump( PaAsiHpiStream *stream );
+static PaError PaAsiHpi_SetupBuffers( PaAsiHpiStreamComponent *streamComp, uint32_t pollingInterval,
+ unsigned long framesPerPaHostBuffer, PaTime suggestedLatency );
+static PaError PaAsiHpi_PrimeOutputWithSilence( PaAsiHpiStream *stream );
+static PaError PaAsiHpi_StartStream( PaAsiHpiStream *stream, int outputPrimed );
+static PaError PaAsiHpi_StopStream( PaAsiHpiStream *stream, int abort );
+static PaError PaAsiHpi_ExplicitStop( PaAsiHpiStream *stream, int abort );
+static void PaAsiHpi_OnThreadExit( void *userData );
+static PaError PaAsiHpi_WaitForFrames( PaAsiHpiStream *stream, unsigned long *framesAvail,
+ PaStreamCallbackFlags *cbFlags );
+static void PaAsiHpi_CalculateTimeInfo( PaAsiHpiStream *stream, PaStreamCallbackTimeInfo *timeInfo );
+static PaError PaAsiHpi_BeginProcessing( PaAsiHpiStream* stream, unsigned long* numFrames,
+ PaStreamCallbackFlags *cbFlags );
+static PaError PaAsiHpi_EndProcessing( PaAsiHpiStream *stream, unsigned long numFrames,
+ PaStreamCallbackFlags *cbFlags );
+
+/* ==========================================================================
+ * ============================= IMPLEMENTATION =============================
+ * ========================================================================== */
+
+/* --------------------------- Host API Interface --------------------------- */
+
+/** Enumerate all PA devices (= HPI streams).
+ This compiles a list of all HPI adapters, and registers a PA device for each input and
+ output stream it finds. Most errors are ignored, as missing or erroneous devices are
+ simply skipped.
+
+ @param hpiHostApi Pointer to HPI host API struct
+
+ @return PortAudio error code (only paInsufficientMemory in practice)
+ */
+static PaError PaAsiHpi_BuildDeviceList( PaAsiHpiHostApiRepresentation *hpiHostApi )
+{
+ PaError result = paNoError;
+ PaUtilHostApiRepresentation *hostApi = &hpiHostApi->baseHostApiRep;
+ PaHostApiInfo *baseApiInfo = &hostApi->info;
+ PaAsiHpiDeviceInfo *hpiDeviceList;
+ int numAdapters;
+ hpi_err_t hpiError = 0;
+ int i, j, deviceCount = 0, deviceIndex = 0;
+
+ assert( hpiHostApi );
+
+ /* Errors not considered critical here (subsystem may report 0 devices), but report them */
+ /* in debug mode. */
+ PA_ASIHPI_UNLESS_( HPI_SubSysGetNumAdapters( NULL, &numAdapters), paNoError );
+
+ for( i=0; i < numAdapters; ++i )
+ {
+ uint16_t inStreams, outStreams;
+ uint16_t version;
+ uint32_t serial;
+ uint16_t type;
+ uint32_t idx;
+
+ hpiError = HPI_SubSysGetAdapter(NULL, i, &idx, &type);
+ if (hpiError)
+ continue;
+
+ /* Try to open adapter */
+ hpiError = HPI_AdapterOpen( NULL, idx );
+ /* Report error and skip to next device on failure */
+ if( hpiError )
+ {
+ PA_ASIHPI_REPORT_ERROR_( hpiError );
+ continue;
+ }
+ hpiError = HPI_AdapterGetInfo( NULL, idx, &outStreams, &inStreams,
+ &version, &serial, &type );
+ /* Skip to next device on failure */
+ if( hpiError )
+ {
+ PA_ASIHPI_REPORT_ERROR_( hpiError );
+ continue;
+ }
+ else
+ {
+ /* Assign default devices if available and increment device count */
+ if( (baseApiInfo->defaultInputDevice == paNoDevice) && (inStreams > 0) )
+ baseApiInfo->defaultInputDevice = deviceCount;
+ deviceCount += inStreams;
+ if( (baseApiInfo->defaultOutputDevice == paNoDevice) && (outStreams > 0) )
+ baseApiInfo->defaultOutputDevice = deviceCount;
+ deviceCount += outStreams;
+ }
+ }
+
+ /* Register any discovered devices */
+ if( deviceCount > 0 )
+ {
+ /* Memory allocation */
+ PA_UNLESS_( hostApi->deviceInfos = (PaDeviceInfo**) PaUtil_GroupAllocateMemory(
+ hpiHostApi->allocations, sizeof(PaDeviceInfo*) * deviceCount ),
+ paInsufficientMemory );
+ /* Allocate all device info structs in a contiguous block */
+ PA_UNLESS_( hpiDeviceList = (PaAsiHpiDeviceInfo*) PaUtil_GroupAllocateMemory(
+ hpiHostApi->allocations, sizeof(PaAsiHpiDeviceInfo) * deviceCount ),
+ paInsufficientMemory );
+
+ /* Now query devices again for information */
+ for( i=0; i < numAdapters; ++i )
+ {
+ uint16_t inStreams, outStreams;
+ uint16_t version;
+ uint32_t serial;
+ uint16_t type;
+ uint32_t idx;
+
+ hpiError = HPI_SubSysGetAdapter( NULL, i, &idx, &type );
+ if (hpiError)
+ continue;
+
+ /* Assume adapter is still open from previous round */
+ hpiError = HPI_AdapterGetInfo( NULL, idx,
+ &outStreams, &inStreams, &version, &serial, &type );
+ /* Report error and skip to next device on failure */
+ if( hpiError )
+ {
+ PA_ASIHPI_REPORT_ERROR_( hpiError );
+ continue;
+ }
+ else
+ {
+ PA_DEBUG(( "Found HPI Adapter ID=%4X Idx=%d #In=%d #Out=%d S/N=%d HWver=%c%d DSPver=%03d\n",
+ type, idx, inStreams, outStreams, serial,
+ ((version>>3)&0xf)+'A', /* Hw version major */
+ version&0x7, /* Hw version minor */
+ ((version>>13)*100)+((version>>7)&0x3f) /* DSP code version */
+ ));
+ }
+
+ /* First add all input streams as devices */
+ for( j=0; j < inStreams; ++j )
+ {
+ PaAsiHpiDeviceInfo *hpiDevice = &hpiDeviceList[deviceIndex];
+ PaDeviceInfo *baseDeviceInfo = &hpiDevice->baseDeviceInfo;
+ char srcName[72];
+ char *deviceName;
+
+ memset( hpiDevice, 0, sizeof(PaAsiHpiDeviceInfo) );
+ /* Set implementation-specific device details */
+ hpiDevice->adapterIndex = idx;
+ hpiDevice->adapterType = type;
+ hpiDevice->adapterVersion = version;
+ hpiDevice->adapterSerialNumber = serial;
+ hpiDevice->streamIndex = j;
+ hpiDevice->streamIsOutput = 0;
+ /* Set common PortAudio device stats */
+ baseDeviceInfo->structVersion = 2;
+ /* Make sure name string is owned by API info structure */
+ sprintf( srcName,
+ "Adapter %d (%4X) - Input Stream %d", i+1, type, j+1 );
+ PA_UNLESS_( deviceName = (char *) PaUtil_GroupAllocateMemory(
+ hpiHostApi->allocations, strlen(srcName) + 1 ), paInsufficientMemory );
+ strcpy( deviceName, srcName );
+ baseDeviceInfo->name = deviceName;
+ baseDeviceInfo->hostApi = hpiHostApi->hostApiIndex;
+ baseDeviceInfo->maxInputChannels = HPI_MAX_CHANNELS;
+ baseDeviceInfo->maxOutputChannels = 0;
+ /* Default latency values for interactive performance */
+ baseDeviceInfo->defaultLowInputLatency = 0.01;
+ baseDeviceInfo->defaultLowOutputLatency = -1.0;
+ /* Default latency values for robust non-interactive applications (eg. playing sound files) */
+ baseDeviceInfo->defaultHighInputLatency = 0.2;
+ baseDeviceInfo->defaultHighOutputLatency = -1.0;
+ /* HPI interface can actually handle any sampling rate to 1 Hz accuracy,
+ * so this default is as good as any */
+ baseDeviceInfo->defaultSampleRate = 44100;
+
+ /* Store device in global PortAudio list */
+ hostApi->deviceInfos[deviceIndex++] = (PaDeviceInfo *) hpiDevice;
+ }
+
+ /* Now add all output streams as devices (I know, the repetition is painful) */
+ for( j=0; j < outStreams; ++j )
+ {
+ PaAsiHpiDeviceInfo *hpiDevice = &hpiDeviceList[deviceIndex];
+ PaDeviceInfo *baseDeviceInfo = &hpiDevice->baseDeviceInfo;
+ char srcName[72];
+ char *deviceName;
+
+ memset( hpiDevice, 0, sizeof(PaAsiHpiDeviceInfo) );
+ /* Set implementation-specific device details */
+ hpiDevice->adapterIndex = idx;
+ hpiDevice->adapterType = type;
+ hpiDevice->adapterVersion = version;
+ hpiDevice->adapterSerialNumber = serial;
+ hpiDevice->streamIndex = j;
+ hpiDevice->streamIsOutput = 1;
+ /* Set common PortAudio device stats */
+ baseDeviceInfo->structVersion = 2;
+ /* Make sure name string is owned by API info structure */
+ sprintf( srcName,
+ "Adapter %d (%4X) - Output Stream %d", i+1, type, j+1 );
+ PA_UNLESS_( deviceName = (char *) PaUtil_GroupAllocateMemory(
+ hpiHostApi->allocations, strlen(srcName) + 1 ), paInsufficientMemory );
+ strcpy( deviceName, srcName );
+ baseDeviceInfo->name = deviceName;
+ baseDeviceInfo->hostApi = hpiHostApi->hostApiIndex;
+ baseDeviceInfo->maxInputChannels = 0;
+ baseDeviceInfo->maxOutputChannels = HPI_MAX_CHANNELS;
+ /* Default latency values for interactive performance. */
+ baseDeviceInfo->defaultLowInputLatency = -1.0;
+ baseDeviceInfo->defaultLowOutputLatency = 0.01;
+ /* Default latency values for robust non-interactive applications (eg. playing sound files). */
+ baseDeviceInfo->defaultHighInputLatency = -1.0;
+ baseDeviceInfo->defaultHighOutputLatency = 0.2;
+ /* HPI interface can actually handle any sampling rate to 1 Hz accuracy,
+ * so this default is as good as any */
+ baseDeviceInfo->defaultSampleRate = 44100;
+
+ /* Store device in global PortAudio list */
+ hostApi->deviceInfos[deviceIndex++] = (PaDeviceInfo *) hpiDevice;
+ }
+ }
+ }
+
+ /* Finally acknowledge checked devices */
+ baseApiInfo->deviceCount = deviceIndex;
+
+error:
+ return result;
+}
+
+
+/** Initialize host API implementation.
+ This is the only function exported beyond this file. It is called by PortAudio to initialize
+ the host API. It stores API info, finds and registers all devices, and sets up callback and
+ blocking interfaces.
+
+ @param hostApi Pointer to host API struct
+
+ @param hostApiIndex Index of current (HPI) host API
+
+ @return PortAudio error code
+ */
+PaError PaAsiHpi_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex hostApiIndex )
+{
+ PaError result = paNoError;
+ PaAsiHpiHostApiRepresentation *hpiHostApi = NULL;
+ PaHostApiInfo *baseApiInfo;
+
+ /* Try to initialize HPI subsystem */
+ if (!HPI_SubSysCreate())
+ {
+ /* the V19 development docs say that if an implementation
+ * detects that it cannot be used, it should return a NULL
+ * interface and paNoError */
+ PA_DEBUG(( "Could not open HPI interface\n" ));
+
+ *hostApi = NULL;
+ return paNoError;
+ }
+ else
+ {
+ uint32_t hpiVersion;
+ PA_ASIHPI_UNLESS_( HPI_SubSysGetVersionEx( NULL, &hpiVersion ), paUnanticipatedHostError );
+ PA_DEBUG(( "HPI interface v%d.%02d.%02d\n",
+ hpiVersion >> 16, (hpiVersion >> 8) & 0x0F, (hpiVersion & 0x0F) ));
+ }
+
+ /* Allocate host API structure */
+ PA_UNLESS_( hpiHostApi = (PaAsiHpiHostApiRepresentation*) PaUtil_AllocateMemory(
+ sizeof(PaAsiHpiHostApiRepresentation) ), paInsufficientMemory );
+ PA_UNLESS_( hpiHostApi->allocations = PaUtil_CreateAllocationGroup(), paInsufficientMemory );
+
+ hpiHostApi->hostApiIndex = hostApiIndex;
+
+ *hostApi = &hpiHostApi->baseHostApiRep;
+ baseApiInfo = &((*hostApi)->info);
+ /* Fill in common API details */
+ baseApiInfo->structVersion = 1;
+ baseApiInfo->type = paAudioScienceHPI;
+ baseApiInfo->name = "AudioScience HPI";
+ baseApiInfo->deviceCount = 0;
+ baseApiInfo->defaultInputDevice = paNoDevice;
+ baseApiInfo->defaultOutputDevice = paNoDevice;
+
+ PA_ENSURE_( PaAsiHpi_BuildDeviceList( hpiHostApi ) );
+
+ (*hostApi)->Terminate = Terminate;
+ (*hostApi)->OpenStream = OpenStream;
+ (*hostApi)->IsFormatSupported = IsFormatSupported;
+
+ PaUtil_InitializeStreamInterface( &hpiHostApi->callbackStreamInterface, CloseStream, StartStream,
+ StopStream, AbortStream, IsStreamStopped, IsStreamActive,
+ GetStreamTime, GetStreamCpuLoad,
+ PaUtil_DummyRead, PaUtil_DummyWrite,
+ PaUtil_DummyGetReadAvailable, PaUtil_DummyGetWriteAvailable );
+
+ PaUtil_InitializeStreamInterface( &hpiHostApi->blockingStreamInterface, CloseStream, StartStream,
+ StopStream, AbortStream, IsStreamStopped, IsStreamActive,
+ GetStreamTime, PaUtil_DummyGetCpuLoad,
+ ReadStream, WriteStream, GetStreamReadAvailable, GetStreamWriteAvailable );
+
+ /* Store identity of main thread */
+ PA_ENSURE_( PaUnixThreading_Initialize() );
+
+ return result;
+error:
+ if (hpiHostApi)
+ PaUtil_FreeMemory( hpiHostApi );
+ return result;
+}
+
+
+/** Terminate host API implementation.
+ This closes all HPI adapters and frees the HPI subsystem. It also frees the host API struct
+ memory. It should be called once for every PaAsiHpi_Initialize call.
+
+ @param Pointer to host API struct
+ */
+static void Terminate( struct PaUtilHostApiRepresentation *hostApi )
+{
+ PaAsiHpiHostApiRepresentation *hpiHostApi = (PaAsiHpiHostApiRepresentation*)hostApi;
+ int i;
+ PaError result = paNoError;
+
+ if( hpiHostApi )
+ {
+ /* Get rid of HPI-specific structures */
+ uint16_t lastAdapterIndex = HPI_MAX_ADAPTERS;
+ /* Iterate through device list and close adapters */
+ for( i=0; i < hostApi->info.deviceCount; ++i )
+ {
+ PaAsiHpiDeviceInfo *hpiDevice = (PaAsiHpiDeviceInfo *) hostApi->deviceInfos[ i ];
+ /* Close adapter only if it differs from previous one */
+ if( hpiDevice->adapterIndex != lastAdapterIndex )
+ {
+ /* Ignore errors (report only during debugging) */
+ PA_ASIHPI_UNLESS_( HPI_AdapterClose( NULL,
+ hpiDevice->adapterIndex ), paNoError );
+ lastAdapterIndex = hpiDevice->adapterIndex;
+ }
+ }
+ /* Finally dismantle HPI subsystem */
+ HPI_SubSysFree( NULL );
+
+ if( hpiHostApi->allocations )
+ {
+ PaUtil_FreeAllAllocations( hpiHostApi->allocations );
+ PaUtil_DestroyAllocationGroup( hpiHostApi->allocations );
+ }
+
+ PaUtil_FreeMemory( hpiHostApi );
+ }
+error:
+ return;
+}
+
+
+/** Converts PortAudio sample format to equivalent HPI format.
+
+ @param paFormat PortAudio sample format
+
+ @return HPI sample format
+ */
+static uint16_t PaAsiHpi_PaToHpiFormat( PaSampleFormat paFormat )
+{
+ /* Ignore interleaving flag */
+ switch( paFormat & ~paNonInterleaved )
+ {
+ case paFloat32:
+ return HPI_FORMAT_PCM32_FLOAT;
+
+ case paInt32:
+ return HPI_FORMAT_PCM32_SIGNED;
+
+ case paInt24:
+ return HPI_FORMAT_PCM24_SIGNED;
+
+ case paInt16:
+ return HPI_FORMAT_PCM16_SIGNED;
+
+ case paUInt8:
+ return HPI_FORMAT_PCM8_UNSIGNED;
+
+ /* Default is 16-bit signed */
+ case paInt8:
+ default:
+ return HPI_FORMAT_PCM16_SIGNED;
+ }
+}
+
+
+/** Converts HPI sample format to equivalent PortAudio format.
+
+ @param paFormat HPI sample format
+
+ @return PortAudio sample format
+ */
+static PaSampleFormat PaAsiHpi_HpiToPaFormat( uint16_t hpiFormat )
+{
+ switch( hpiFormat )
+ {
+ case HPI_FORMAT_PCM32_FLOAT:
+ return paFloat32;
+
+ case HPI_FORMAT_PCM32_SIGNED:
+ return paInt32;
+
+ case HPI_FORMAT_PCM24_SIGNED:
+ return paInt24;
+
+ case HPI_FORMAT_PCM16_SIGNED:
+ return paInt16;
+
+ case HPI_FORMAT_PCM8_UNSIGNED:
+ return paUInt8;
+
+ /* Default is custom format (e.g. for HPI MP3 format) */
+ default:
+ return paCustomFormat;
+ }
+}
+
+
+/** Creates HPI format struct based on PortAudio parameters.
+ This also does some checks to see whether the desired format is valid, and whether
+ the device allows it. This only checks the format of one half (input or output) of the
+ PortAudio stream.
+
+ @param hostApi Pointer to host API struct
+
+ @param parameters Pointer to stream parameter struct
+
+ @param sampleRate Desired sample rate
+
+ @param hpiDevice Pointer to HPI device struct
+
+ @param hpiFormat Resulting HPI format returned here
+
+ @return PortAudio error code (typically indicating a problem with stream format)
+ */
+static PaError PaAsiHpi_CreateFormat( struct PaUtilHostApiRepresentation *hostApi,
+ const PaStreamParameters *parameters, double sampleRate,
+ PaAsiHpiDeviceInfo **hpiDevice, struct hpi_format *hpiFormat )
+{
+ int maxChannelCount = 0;
+ PaSampleFormat hostSampleFormat = 0;
+ hpi_err_t hpiError = 0;
+
+ /* Unless alternate device specification is supported, reject the use of
+ paUseHostApiSpecificDeviceSpecification */
+ if( parameters->device == paUseHostApiSpecificDeviceSpecification )
+ return paInvalidDevice;
+ else
+ {
+ assert( parameters->device < hostApi->info.deviceCount );
+ *hpiDevice = (PaAsiHpiDeviceInfo*) hostApi->deviceInfos[ parameters->device ];
+ }
+
+ /* Validate streamInfo - this implementation doesn't use custom stream info */
+ if( parameters->hostApiSpecificStreamInfo )
+ return paIncompatibleHostApiSpecificStreamInfo;
+
+ /* Check that device can support channel count */
+ if( (*hpiDevice)->streamIsOutput )
+ {
+ maxChannelCount = (*hpiDevice)->baseDeviceInfo.maxOutputChannels;
+ }
+ else
+ {
+ maxChannelCount = (*hpiDevice)->baseDeviceInfo.maxInputChannels;
+ }
+ if( (maxChannelCount == 0) || (parameters->channelCount > maxChannelCount) )
+ return paInvalidChannelCount;
+
+ /* All standard sample formats are supported by the buffer adapter,
+ and this implementation doesn't support any custom sample formats */
+ if( parameters->sampleFormat & paCustomFormat )
+ return paSampleFormatNotSupported;
+
+ /* Switch to closest HPI native format */
+ hostSampleFormat = PaUtil_SelectClosestAvailableFormat(PA_ASIHPI_AVAILABLE_FORMATS_,
+ parameters->sampleFormat );
+ /* Setup format + info objects */
+ hpiError = HPI_FormatCreate( hpiFormat, (uint16_t)parameters->channelCount,
+ PaAsiHpi_PaToHpiFormat( hostSampleFormat ),
+ (uint32_t)sampleRate, 0, 0 );
+ if( hpiError )
+ {
+ PA_ASIHPI_REPORT_ERROR_( hpiError );
+ switch( hpiError )
+ {
+ case HPI_ERROR_INVALID_FORMAT:
+ return paSampleFormatNotSupported;
+
+ case HPI_ERROR_INVALID_SAMPLERATE:
+ case HPI_ERROR_INCOMPATIBLE_SAMPLERATE:
+ return paInvalidSampleRate;
+
+ case HPI_ERROR_INVALID_CHANNELS:
+ return paInvalidChannelCount;
+ }
+ }
+
+ return paNoError;
+}
+
+
+/** Open HPI input stream with given format.
+ This attempts to open HPI input stream with desired format. If the format is not supported
+ or the device is unavailable, the stream is closed and a PortAudio error code is returned.
+
+ @param hostApi Pointer to host API struct
+
+ @param hpiDevice Pointer to HPI device struct
+
+ @param hpiFormat Pointer to HPI format struct
+
+ @return PortAudio error code (typically indicating a problem with stream format or device)
+*/
+static PaError PaAsiHpi_OpenInput( struct PaUtilHostApiRepresentation *hostApi,
+ const PaAsiHpiDeviceInfo *hpiDevice, const struct hpi_format *hpiFormat,
+ hpi_handle_t *hpiStream )
+{
+ PaAsiHpiHostApiRepresentation *hpiHostApi = (PaAsiHpiHostApiRepresentation*)hostApi;
+ PaError result = paNoError;
+ hpi_err_t hpiError = 0;
+
+ /* Catch misplaced output devices, as they typically have 0 input channels */
+ PA_UNLESS_( !hpiDevice->streamIsOutput, paInvalidChannelCount );
+ /* Try to open input stream */
+ PA_ASIHPI_UNLESS_( HPI_InStreamOpen( NULL, hpiDevice->adapterIndex,
+ hpiDevice->streamIndex, hpiStream ), paDeviceUnavailable );
+ /* Set input format (checking it in the process) */
+ /* Could also use HPI_InStreamQueryFormat, but this economizes the process */
+ hpiError = HPI_InStreamSetFormat( NULL, *hpiStream, (struct hpi_format*)hpiFormat );
+ if( hpiError )
+ {
+ PA_ASIHPI_REPORT_ERROR_( hpiError );
+ PA_ASIHPI_UNLESS_( HPI_InStreamClose( NULL, *hpiStream ), paNoError );
+ switch( hpiError )
+ {
+ case HPI_ERROR_INVALID_FORMAT:
+ return paSampleFormatNotSupported;
+
+ case HPI_ERROR_INVALID_SAMPLERATE:
+ case HPI_ERROR_INCOMPATIBLE_SAMPLERATE:
+ return paInvalidSampleRate;
+
+ case HPI_ERROR_INVALID_CHANNELS:
+ return paInvalidChannelCount;
+
+ default:
+ /* In case anything else went wrong */
+ return paInvalidDevice;
+ }
+ }
+
+error:
+ return result;
+}
+
+
+/** Open HPI output stream with given format.
+ This attempts to open HPI output stream with desired format. If the format is not supported
+ or the device is unavailable, the stream is closed and a PortAudio error code is returned.
+
+ @param hostApi Pointer to host API struct
+
+ @param hpiDevice Pointer to HPI device struct
+
+ @param hpiFormat Pointer to HPI format struct
+
+ @return PortAudio error code (typically indicating a problem with stream format or device)
+*/
+static PaError PaAsiHpi_OpenOutput( struct PaUtilHostApiRepresentation *hostApi,
+ const PaAsiHpiDeviceInfo *hpiDevice, const struct hpi_format *hpiFormat,
+ hpi_handle_t *hpiStream )
+{
+ PaAsiHpiHostApiRepresentation *hpiHostApi = (PaAsiHpiHostApiRepresentation*)hostApi;
+ PaError result = paNoError;
+ hpi_err_t hpiError = 0;
+
+ /* Catch misplaced input devices, as they typically have 0 output channels */
+ PA_UNLESS_( hpiDevice->streamIsOutput, paInvalidChannelCount );
+ /* Try to open output stream */
+ PA_ASIHPI_UNLESS_( HPI_OutStreamOpen( NULL, hpiDevice->adapterIndex,
+ hpiDevice->streamIndex, hpiStream ), paDeviceUnavailable );
+
+ /* Check output format (format is set on first write to output stream) */
+ hpiError = HPI_OutStreamQueryFormat( NULL, *hpiStream, (struct hpi_format*)hpiFormat );
+ if( hpiError )
+ {
+ PA_ASIHPI_REPORT_ERROR_( hpiError );
+ PA_ASIHPI_UNLESS_( HPI_OutStreamClose( NULL, *hpiStream ), paNoError );
+ switch( hpiError )
+ {
+ case HPI_ERROR_INVALID_FORMAT:
+ return paSampleFormatNotSupported;
+
+ case HPI_ERROR_INVALID_SAMPLERATE:
+ case HPI_ERROR_INCOMPATIBLE_SAMPLERATE:
+ return paInvalidSampleRate;
+
+ case HPI_ERROR_INVALID_CHANNELS:
+ return paInvalidChannelCount;
+
+ default:
+ /* In case anything else went wrong */
+ return paInvalidDevice;
+ }
+ }
+
+error:
+ return result;
+}
+
+
+/** Checks whether the desired stream formats and devices are supported
+ (for both input and output).
+ This is done by actually opening the appropriate HPI streams and closing them again.
+
+ @param hostApi Pointer to host API struct
+
+ @param inputParameters Pointer to stream parameter struct for input side of stream
+
+ @param outputParameters Pointer to stream parameter struct for output side of stream
+
+ @param sampleRate Desired sample rate
+
+ @return PortAudio error code (paFormatIsSupported on success)
+ */
+static PaError IsFormatSupported( struct PaUtilHostApiRepresentation *hostApi,
+ const PaStreamParameters *inputParameters,
+ const PaStreamParameters *outputParameters,
+ double sampleRate )
+{
+ PaError result = paFormatIsSupported;
+ PaAsiHpiHostApiRepresentation *hpiHostApi = (PaAsiHpiHostApiRepresentation*)hostApi;
+ PaAsiHpiDeviceInfo *hpiDevice = NULL;
+ struct hpi_format hpiFormat;
+
+ /* Input stream */
+ if( inputParameters )
+ {
+ hpi_handle_t hpiStream;
+ PA_DEBUG(( "%s: Checking input params: dev=%d, sr=%d, chans=%d, fmt=%d\n",
+ __FUNCTION__, inputParameters->device, (int)sampleRate,
+ inputParameters->channelCount, inputParameters->sampleFormat ));
+ /* Create and validate format */
+ PA_ENSURE_( PaAsiHpi_CreateFormat( hostApi, inputParameters, sampleRate,
+ &hpiDevice, &hpiFormat ) );
+ /* Open stream to further check format */
+ PA_ENSURE_( PaAsiHpi_OpenInput( hostApi, hpiDevice, &hpiFormat, &hpiStream ) );
+ /* Close stream again */
+ PA_ASIHPI_UNLESS_( HPI_InStreamClose( NULL, hpiStream ), paNoError );
+ }
+
+ /* Output stream */
+ if( outputParameters )
+ {
+ hpi_handle_t hpiStream;
+ PA_DEBUG(( "%s: Checking output params: dev=%d, sr=%d, chans=%d, fmt=%d\n",
+ __FUNCTION__, outputParameters->device, (int)sampleRate,
+ outputParameters->channelCount, outputParameters->sampleFormat ));
+ /* Create and validate format */
+ PA_ENSURE_( PaAsiHpi_CreateFormat( hostApi, outputParameters, sampleRate,
+ &hpiDevice, &hpiFormat ) );
+ /* Open stream to further check format */
+ PA_ENSURE_( PaAsiHpi_OpenOutput( hostApi, hpiDevice, &hpiFormat, &hpiStream ) );
+ /* Close stream again */
+ PA_ASIHPI_UNLESS_( HPI_OutStreamClose( NULL, hpiStream ), paNoError );
+ }
+
+error:
+ return result;
+}
+
+/* ---------------------------- Stream Interface ---------------------------- */
+
+/** Obtain HPI stream information.
+ This obtains info such as stream state and available data/space in buffers. It also
+ estimates whether an underflow or overflow occurred.
+
+ @param streamComp Pointer to stream component (input or output) to query
+
+ @param info Pointer to stream info struct that will contain result
+
+ @return PortAudio error code (either paNoError, paDeviceUnavailable or paUnanticipatedHostError)
+ */
+static PaError PaAsiHpi_GetStreamInfo( PaAsiHpiStreamComponent *streamComp, PaAsiHpiStreamInfo *info )
+{
+ PaError result = paDeviceUnavailable;
+ uint16_t state;
+ uint32_t bufferSize, dataSize, frameCounter, auxDataSize, threshold;
+ uint32_t hwBufferSize, hwDataSize;
+
+ assert( streamComp );
+ assert( info );
+
+ /* First blank the stream info struct, in case something goes wrong below.
+ This saves the caller from initializing the struct. */
+ info->state = 0;
+ info->bufferSize = 0;
+ info->dataSize = 0;
+ info->frameCounter = 0;
+ info->auxDataSize = 0;
+ info->totalBufferedData = 0;
+ info->availableFrames = 0;
+ info->underflow = 0;
+ info->overflow = 0;
+
+ if( streamComp->hpiDevice && streamComp->hpiStream )
+ {
+ /* Obtain detailed stream info (either input or output) */
+ if( streamComp->hpiDevice->streamIsOutput )
+ {
+ PA_ASIHPI_UNLESS_( HPI_OutStreamGetInfoEx( NULL,
+ streamComp->hpiStream,
+ &state, &bufferSize, &dataSize, &frameCounter,
+ &auxDataSize ), paUnanticipatedHostError );
+ }
+ else
+ {
+ PA_ASIHPI_UNLESS_( HPI_InStreamGetInfoEx( NULL,
+ streamComp->hpiStream,
+ &state, &bufferSize, &dataSize, &frameCounter,
+ &auxDataSize ), paUnanticipatedHostError );
+ }
+ /* Load stream info */
+ info->state = state;
+ info->bufferSize = bufferSize;
+ info->dataSize = dataSize;
+ info->frameCounter = frameCounter;
+ info->auxDataSize = auxDataSize;
+ /* Determine total buffered data */
+ info->totalBufferedData = dataSize;
+ if( streamComp->hostBufferSize > 0 )
+ info->totalBufferedData += auxDataSize;
+ info->totalBufferedData /= streamComp->bytesPerFrame;
+ /* Determine immediately available frames */
+ info->availableFrames = streamComp->hpiDevice->streamIsOutput ?
+ bufferSize - dataSize : dataSize;
+ info->availableFrames /= streamComp->bytesPerFrame;
+ /* Minimum space/data required in buffers */
+ threshold = PA_MIN( streamComp->tempBufferSize,
+ streamComp->bytesPerFrame * PA_ASIHPI_MIN_FRAMES_ );
+ /* Obtain hardware buffer stats first, to simplify things */
+ hwBufferSize = streamComp->hardwareBufferSize;
+ hwDataSize = streamComp->hostBufferSize > 0 ? auxDataSize : dataSize;
+ /* Underflow is a bit tricky */
+ info->underflow = streamComp->hpiDevice->streamIsOutput ?
+ /* Stream seems to start in drained state sometimes, so ignore initial underflow */
+ (frameCounter > 0) && ( (state == HPI_STATE_DRAINED) || (hwDataSize == 0) ) :
+ /* Input streams check the first-level (host) buffer for underflow */
+ (state != HPI_STATE_STOPPED) && (dataSize < threshold);
+ /* Check for overflow in second-level (hardware) buffer for both input and output */
+ info->overflow = (state != HPI_STATE_STOPPED) && (hwBufferSize - hwDataSize < threshold);
+
+ return paNoError;
+ }
+
+error:
+ return result;
+}
+
+
+/** Display stream component information for debugging purposes.
+
+ @param streamComp Pointer to stream component (input or output) to query
+
+ @param stream Pointer to stream struct which contains the component above
+ */
+static void PaAsiHpi_StreamComponentDump( PaAsiHpiStreamComponent *streamComp,
+ PaAsiHpiStream *stream )
+{
+ PaAsiHpiStreamInfo streamInfo;
+
+ assert( streamComp );
+ assert( stream );
+
+ /* Name of soundcard/device used by component */
+ PA_DEBUG(( "device: %s\n", streamComp->hpiDevice->baseDeviceInfo.name ));
+ /* Unfortunately some overlap between input and output here */
+ if( streamComp->hpiDevice->streamIsOutput )
+ {
+ /* Settings on the user side (as experienced by user callback) */
+ PA_DEBUG(( "user: %d-bit, %d ",
+ 8*stream->bufferProcessor.bytesPerUserOutputSample,
+ stream->bufferProcessor.outputChannelCount));
+ if( stream->bufferProcessor.userOutputIsInterleaved )
+ {
+ PA_DEBUG(( "interleaved channels, " ));
+ }
+ else
+ {
+ PA_DEBUG(( "non-interleaved channels, " ));
+ }
+ PA_DEBUG(( "%d frames/buffer, latency = %5.1f ms\n",
+ stream->bufferProcessor.framesPerUserBuffer,
+ 1000*stream->baseStreamRep.streamInfo.outputLatency ));
+ /* Settings on the host side (internal to PortAudio host API) */
+ PA_DEBUG(( "host: %d-bit, %d interleaved channels, %d frames/buffer ",
+ 8*stream->bufferProcessor.bytesPerHostOutputSample,
+ stream->bufferProcessor.outputChannelCount,
+ stream->bufferProcessor.framesPerHostBuffer ));
+ }
+ else
+ {
+ /* Settings on the user side (as experienced by user callback) */
+ PA_DEBUG(( "user: %d-bit, %d ",
+ 8*stream->bufferProcessor.bytesPerUserInputSample,
+ stream->bufferProcessor.inputChannelCount));
+ if( stream->bufferProcessor.userInputIsInterleaved )
+ {
+ PA_DEBUG(( "interleaved channels, " ));
+ }
+ else
+ {
+ PA_DEBUG(( "non-interleaved channels, " ));
+ }
+ PA_DEBUG(( "%d frames/buffer, latency = %5.1f ms\n",
+ stream->bufferProcessor.framesPerUserBuffer,
+ 1000*stream->baseStreamRep.streamInfo.inputLatency ));
+ /* Settings on the host side (internal to PortAudio host API) */
+ PA_DEBUG(( "host: %d-bit, %d interleaved channels, %d frames/buffer ",
+ 8*stream->bufferProcessor.bytesPerHostInputSample,
+ stream->bufferProcessor.inputChannelCount,
+ stream->bufferProcessor.framesPerHostBuffer ));
+ }
+ switch( stream->bufferProcessor.hostBufferSizeMode )
+ {
+ case paUtilFixedHostBufferSize:
+ PA_DEBUG(( "[fixed] " ));
+ break;
+ case paUtilBoundedHostBufferSize:
+ PA_DEBUG(( "[bounded] " ));
+ break;
+ case paUtilUnknownHostBufferSize:
+ PA_DEBUG(( "[unknown] " ));
+ break;
+ case paUtilVariableHostBufferSizePartialUsageAllowed:
+ PA_DEBUG(( "[variable] " ));
+ break;
+ }
+ PA_DEBUG(( "(%d max)\n", streamComp->tempBufferSize / streamComp->bytesPerFrame ));
+ /* HPI hardware settings */
+ PA_DEBUG(( "HPI: adapter %d stream %d, %d-bit, %d-channel, %d Hz\n",
+ streamComp->hpiDevice->adapterIndex, streamComp->hpiDevice->streamIndex,
+ 8 * streamComp->bytesPerFrame / streamComp->hpiFormat.wChannels,
+ streamComp->hpiFormat.wChannels,
+ streamComp->hpiFormat.dwSampleRate ));
+ /* Stream state and buffer levels */
+ PA_DEBUG(( "HPI: " ));
+ PaAsiHpi_GetStreamInfo( streamComp, &streamInfo );
+ switch( streamInfo.state )
+ {
+ case HPI_STATE_STOPPED:
+ PA_DEBUG(( "[STOPPED] " ));
+ break;
+ case HPI_STATE_PLAYING:
+ PA_DEBUG(( "[PLAYING] " ));
+ break;
+ case HPI_STATE_RECORDING:
+ PA_DEBUG(( "[RECORDING] " ));
+ break;
+ case HPI_STATE_DRAINED:
+ PA_DEBUG(( "[DRAINED] " ));
+ break;
+ default:
+ PA_DEBUG(( "[unknown state] " ));
+ break;
+ }
+ if( streamComp->hostBufferSize )
+ {
+ PA_DEBUG(( "host = %d/%d B, ", streamInfo.dataSize, streamComp->hostBufferSize ));
+ PA_DEBUG(( "hw = %d/%d (%d) B, ", streamInfo.auxDataSize,
+ streamComp->hardwareBufferSize, streamComp->outputBufferCap ));
+ }
+ else
+ {
+ PA_DEBUG(( "hw = %d/%d B, ", streamInfo.dataSize, streamComp->hardwareBufferSize ));
+ }
+ PA_DEBUG(( "count = %d", streamInfo.frameCounter ));
+ if( streamInfo.overflow )
+ {
+ PA_DEBUG(( " [overflow]" ));
+ }
+ else if( streamInfo.underflow )
+ {
+ PA_DEBUG(( " [underflow]" ));
+ }
+ PA_DEBUG(( "\n" ));
+}
+
+
+/** Display stream information for debugging purposes.
+
+ @param stream Pointer to stream to query
+ */
+static void PaAsiHpi_StreamDump( PaAsiHpiStream *stream )
+{
+ assert( stream );
+
+ PA_DEBUG(( "\n------------------------- STREAM INFO FOR %p ---------------------------\n", stream ));
+ /* General stream info (input+output) */
+ if( stream->baseStreamRep.streamCallback )
+ {
+ PA_DEBUG(( "[callback] " ));
+ }
+ else
+ {
+ PA_DEBUG(( "[blocking] " ));
+ }
+ PA_DEBUG(( "sr=%d Hz, poll=%d ms, max %d frames/buf ",
+ (int)stream->baseStreamRep.streamInfo.sampleRate,
+ stream->pollingInterval, stream->maxFramesPerHostBuffer ));
+ switch( stream->state )
+ {
+ case paAsiHpiStoppedState:
+ PA_DEBUG(( "[stopped]\n" ));
+ break;
+ case paAsiHpiActiveState:
+ PA_DEBUG(( "[active]\n" ));
+ break;
+ case paAsiHpiCallbackFinishedState:
+ PA_DEBUG(( "[cb fin]\n" ));
+ break;
+ default:
+ PA_DEBUG(( "[unknown state]\n" ));
+ break;
+ }
+ if( stream->callbackMode )
+ {
+ PA_DEBUG(( "cb info: thread=%p, cbAbort=%d, cbFinished=%d\n",
+ stream->thread.thread, stream->callbackAbort, stream->callbackFinished ));
+ }
+
+ PA_DEBUG(( "----------------------------------- Input ------------------------------------\n" ));
+ if( stream->input )
+ {
+ PaAsiHpi_StreamComponentDump( stream->input, stream );
+ }
+ else
+ {
+ PA_DEBUG(( "*none*\n" ));
+ }
+
+ PA_DEBUG(( "----------------------------------- Output ------------------------------------\n" ));
+ if( stream->output )
+ {
+ PaAsiHpi_StreamComponentDump( stream->output, stream );
+ }
+ else
+ {
+ PA_DEBUG(( "*none*\n" ));
+ }
+ PA_DEBUG(( "-------------------------------------------------------------------------------\n\n" ));
+
+}
+
+
+/** Determine buffer sizes and allocate appropriate stream buffers.
+ This attempts to allocate a BBM (host) buffer for the HPI stream component (either input
+ or output, as both have similar buffer needs). Not all AudioScience adapters support BBM,
+ in which case the hardware buffer has to suffice. The size of the HPI host buffer is chosen
+ as a multiple of framesPerPaHostBuffer, and also influenced by the suggested latency and the
+ estimated minimum polling interval. The HPI host and hardware buffer sizes are stored, and an
+ appropriate cap for the hardware buffer is also calculated. Finally, the temporary stream
+ buffer which serves as the PortAudio host buffer for this implementation is allocated.
+ This buffer contains an integer number of user buffers, to simplify buffer adaption in the
+ buffer processor. The function returns paBufferTooBig if the HPI interface cannot allocate
+ an HPI host buffer of the desired size.
+
+ @param streamComp Pointer to stream component struct
+
+ @param pollingInterval Polling interval for stream, in milliseconds
+
+ @param framesPerPaHostBuffer Size of PortAudio host buffer, in frames
+
+ @param suggestedLatency Suggested latency for stream component, in seconds
+
+ @return PortAudio error code (possibly paBufferTooBig or paInsufficientMemory)
+ */
+static PaError PaAsiHpi_SetupBuffers( PaAsiHpiStreamComponent *streamComp, uint32_t pollingInterval,
+ unsigned long framesPerPaHostBuffer, PaTime suggestedLatency )
+{
+ PaError result = paNoError;
+ PaAsiHpiStreamInfo streamInfo;
+ unsigned long hpiBufferSize = 0, paHostBufferSize = 0;
+
+ assert( streamComp );
+ assert( streamComp->hpiDevice );
+
+ /* Obtain size of hardware buffer of HPI stream, since we will be activating BBM shortly
+ and afterwards the buffer size will refer to the BBM (host-side) buffer.
+ This is necessary to enable reliable detection of xruns. */
+ PA_ENSURE_( PaAsiHpi_GetStreamInfo( streamComp, &streamInfo ) );
+ streamComp->hardwareBufferSize = streamInfo.bufferSize;
+ hpiBufferSize = streamInfo.bufferSize;
+
+ /* Check if BBM (background bus mastering) is to be enabled */
+ if( PA_ASIHPI_USE_BBM_ )
+ {
+ uint32_t bbmBufferSize = 0, preLatencyBufferSize = 0;
+ hpi_err_t hpiError = 0;
+ PaTime pollingOverhead;
+
+ /* Check overhead of Pa_Sleep() call (minimum sleep duration in ms -> OS dependent) */
+ pollingOverhead = PaUtil_GetTime();
+ Pa_Sleep( 0 );
+ pollingOverhead = 1000*(PaUtil_GetTime() - pollingOverhead);
+ PA_DEBUG(( "polling overhead = %f ms (length of 0-second sleep)\n", pollingOverhead ));
+ /* Obtain minimum recommended size for host buffer (in bytes) */
+ PA_ASIHPI_UNLESS_( HPI_StreamEstimateBufferSize( &streamComp->hpiFormat,
+ pollingInterval + (uint32_t)ceil( pollingOverhead ),
+ &bbmBufferSize ), paUnanticipatedHostError );
+ /* BBM places more stringent requirements on buffer size (see description */
+ /* of HPI_StreamEstimateBufferSize in HPI API document) */
+ bbmBufferSize *= 3;
+ /* Make sure the BBM buffer contains multiple PA host buffers */
+ if( bbmBufferSize < 3 * streamComp->bytesPerFrame * framesPerPaHostBuffer )
+ bbmBufferSize = 3 * streamComp->bytesPerFrame * framesPerPaHostBuffer;
+ /* Try to honor latency suggested by user by growing buffer (no decrease possible) */
+ if( suggestedLatency > 0.0 )
+ {
+ PaTime bufferDuration = ((PaTime)bbmBufferSize) / streamComp->bytesPerFrame
+ / streamComp->hpiFormat.dwSampleRate;
+ /* Don't decrease buffer */
+ if( bufferDuration < suggestedLatency )
+ {
+ /* Save old buffer size, to be retried if new size proves too big */
+ preLatencyBufferSize = bbmBufferSize;
+ bbmBufferSize = (uint32_t)ceil( suggestedLatency * streamComp->bytesPerFrame
+ * streamComp->hpiFormat.dwSampleRate );
+ }
+ }
+ /* Choose closest memory block boundary (HPI API document states that
+ "a buffer size of Nx4096 - 20 makes the best use of memory"
+ (under the entry for HPI_StreamEstimateBufferSize)) */
+ bbmBufferSize = ((uint32_t)ceil((bbmBufferSize + 20)/4096.0))*4096 - 20;
+ streamComp->hostBufferSize = bbmBufferSize;
+ /* Allocate BBM host buffer (this enables bus mastering transfers in background) */
+ if( streamComp->hpiDevice->streamIsOutput )
+ hpiError = HPI_OutStreamHostBufferAllocate( NULL,
+ streamComp->hpiStream,
+ bbmBufferSize );
+ else
+ hpiError = HPI_InStreamHostBufferAllocate( NULL,
+ streamComp->hpiStream,
+ bbmBufferSize );
+ if( hpiError )
+ {
+ /* Indicate that BBM is disabled */
+ streamComp->hostBufferSize = 0;
+ /* Retry with smaller buffer size (transfers will still work, but not via BBM) */
+ if( hpiError == HPI_ERROR_INVALID_DATASIZE )
+ {
+ /* Retry BBM allocation with smaller size if requested latency proved too big */
+ if( preLatencyBufferSize > 0 )
+ {
+ PA_DEBUG(( "Retrying BBM allocation with smaller size (%d vs. %d bytes)\n",
+ preLatencyBufferSize, bbmBufferSize ));
+ bbmBufferSize = preLatencyBufferSize;
+ if( streamComp->hpiDevice->streamIsOutput )
+ hpiError = HPI_OutStreamHostBufferAllocate( NULL,
+ streamComp->hpiStream,
+ bbmBufferSize );
+ else
+ hpiError = HPI_InStreamHostBufferAllocate( NULL,
+ streamComp->hpiStream,
+ bbmBufferSize );
+ /* Another round of error checking */
+ if( hpiError )
+ {
+ PA_ASIHPI_REPORT_ERROR_( hpiError );
+ /* No escapes this time */
+ if( hpiError == HPI_ERROR_INVALID_DATASIZE )
+ {
+ result = paBufferTooBig;
+ goto error;
+ }
+ else if( hpiError != HPI_ERROR_INVALID_OPERATION )
+ {
+ result = paUnanticipatedHostError;
+ goto error;
+ }
+ }
+ else
+ {
+ streamComp->hostBufferSize = bbmBufferSize;
+ hpiBufferSize = bbmBufferSize;
+ }
+ }
+ else
+ {
+ result = paBufferTooBig;
+ goto error;
+ }
+ }
+ /* If BBM not supported, foreground transfers will be used, but not a show-stopper */
+ /* Anything else is an error */
+ else if (( hpiError != HPI_ERROR_INVALID_OPERATION ) &&
+ ( hpiError != HPI_ERROR_INVALID_FUNC ))
+ {
+ PA_ASIHPI_REPORT_ERROR_( hpiError );
+ result = paUnanticipatedHostError;
+ goto error;
+ }
+ }
+ else
+ {
+ hpiBufferSize = bbmBufferSize;
+ }
+ }
+
+ /* Final check of buffer size */
+ paHostBufferSize = streamComp->bytesPerFrame * framesPerPaHostBuffer;
+ if( hpiBufferSize < 3*paHostBufferSize )
+ {
+ result = paBufferTooBig;
+ goto error;
+ }
+ /* Set cap on output buffer size, based on latency suggestions */
+ if( streamComp->hpiDevice->streamIsOutput )
+ {
+ PaTime latency = suggestedLatency > 0.0 ? suggestedLatency :
+ streamComp->hpiDevice->baseDeviceInfo.defaultHighOutputLatency;
+ streamComp->outputBufferCap =
+ (uint32_t)ceil( latency * streamComp->bytesPerFrame * streamComp->hpiFormat.dwSampleRate );
+ /* The cap should not be too small, to prevent underflow */
+ if( streamComp->outputBufferCap < 4*paHostBufferSize )
+ streamComp->outputBufferCap = 4*paHostBufferSize;
+ }
+ else
+ {
+ streamComp->outputBufferCap = 0;
+ }
+ /* Temp buffer size should be multiple of PA host buffer size (or 1x, if using fixed blocks) */
+ streamComp->tempBufferSize = paHostBufferSize;
+ /* Allocate temp buffer */
+ PA_UNLESS_( streamComp->tempBuffer = (uint8_t *)PaUtil_AllocateMemory( streamComp->tempBufferSize ),
+ paInsufficientMemory );
+error:
+ return result;
+}
+
+
+/** Opens PortAudio stream.
+ This determines a suitable value for framesPerBuffer, if the user didn't specify it,
+ based on the suggested latency. It then opens each requested stream direction with the
+ appropriate stream format, and allocates the required stream buffers. It sets up the
+ various PortAudio structures dealing with streams, and estimates the stream latency.
+
+ See pa_hostapi.h for a list of validity guarantees made about OpenStream parameters.
+
+ @param hostApi Pointer to host API struct
+
+ @param s List of open streams, where successfully opened stream will go
+
+ @param inputParameters Pointer to stream parameter struct for input side of stream
+
+ @param outputParameters Pointer to stream parameter struct for output side of stream
+
+ @param sampleRate Desired sample rate
+
+ @param framesPerBuffer Desired number of frames per buffer passed to user callback
+ (or chunk size for blocking stream)
+
+ @param streamFlags Stream flags
+
+ @param streamCallback Pointer to user callback function (zero for blocking interface)
+
+ @param userData Pointer to user data that will be passed to callback function along with data
+
+ @return PortAudio error code
+*/
+static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
+ PaStream **s,
+ const PaStreamParameters *inputParameters,
+ const PaStreamParameters *outputParameters,
+ double sampleRate,
+ unsigned long framesPerBuffer,
+ PaStreamFlags streamFlags,
+ PaStreamCallback *streamCallback,
+ void *userData )
+{
+ PaError result = paNoError;
+ PaAsiHpiHostApiRepresentation *hpiHostApi = (PaAsiHpiHostApiRepresentation*)hostApi;
+ PaAsiHpiStream *stream = NULL;
+ unsigned long framesPerHostBuffer = framesPerBuffer;
+ int inputChannelCount = 0, outputChannelCount = 0;
+ PaSampleFormat inputSampleFormat = 0, outputSampleFormat = 0;
+ PaSampleFormat hostInputSampleFormat = 0, hostOutputSampleFormat = 0;
+ PaTime maxSuggestedLatency = 0.0;
+
+ /* Validate platform-specific flags -> none expected for HPI */
+ if( (streamFlags & paPlatformSpecificFlags) != 0 )
+ return paInvalidFlag; /* unexpected platform-specific flag */
+
+ /* Create blank stream structure */
+ PA_UNLESS_( stream = (PaAsiHpiStream *)PaUtil_AllocateMemory( sizeof(PaAsiHpiStream) ),
+ paInsufficientMemory );
+ memset( stream, 0, sizeof(PaAsiHpiStream) );
+
+ /* If the number of frames per buffer is unspecified, we have to come up with one. */
+ if( framesPerHostBuffer == paFramesPerBufferUnspecified )
+ {
+ if( inputParameters )
+ maxSuggestedLatency = inputParameters->suggestedLatency;
+ if( outputParameters && (outputParameters->suggestedLatency > maxSuggestedLatency) )
+ maxSuggestedLatency = outputParameters->suggestedLatency;
+ /* Use suggested latency if available */
+ if( maxSuggestedLatency > 0.0 )
+ framesPerHostBuffer = (unsigned long)ceil( maxSuggestedLatency * sampleRate );
+ else
+ /* AudioScience cards like BIG buffers by default */
+ framesPerHostBuffer = 4096;
+ }
+ /* Lower bounds on host buffer size, due to polling and HPI constraints */
+ if( 1000.0*framesPerHostBuffer/sampleRate < PA_ASIHPI_MIN_POLLING_INTERVAL_ )
+ framesPerHostBuffer = (unsigned long)ceil( sampleRate * PA_ASIHPI_MIN_POLLING_INTERVAL_ / 1000.0 );
+ /* if( framesPerHostBuffer < PA_ASIHPI_MIN_FRAMES_ )
+ framesPerHostBuffer = PA_ASIHPI_MIN_FRAMES_; */
+ /* Efficient if host buffer size is integer multiple of user buffer size */
+ if( framesPerBuffer > 0 )
+ framesPerHostBuffer = (unsigned long)ceil( (double)framesPerHostBuffer / framesPerBuffer ) * framesPerBuffer;
+ /* Buffer should always be a multiple of 4 bytes to facilitate 32-bit PCI transfers.
+ By keeping the frames a multiple of 4, this is ensured even for 8-bit mono sound. */
+ framesPerHostBuffer = (framesPerHostBuffer / 4) * 4;
+ /* Polling is based on time length (in milliseconds) of user-requested block size */
+ stream->pollingInterval = (uint32_t)ceil( 1000.0*framesPerHostBuffer/sampleRate );
+ assert( framesPerHostBuffer > 0 );
+
+ /* Open underlying streams, check formats and allocate buffers */
+ if( inputParameters )
+ {
+ /* Create blank stream component structure */
+ PA_UNLESS_( stream->input = (PaAsiHpiStreamComponent *)PaUtil_AllocateMemory( sizeof(PaAsiHpiStreamComponent) ),
+ paInsufficientMemory );
+ memset( stream->input, 0, sizeof(PaAsiHpiStreamComponent) );
+ /* Create/validate format */
+ PA_ENSURE_( PaAsiHpi_CreateFormat( hostApi, inputParameters, sampleRate,
+ &stream->input->hpiDevice, &stream->input->hpiFormat ) );
+ /* Open stream and set format */
+ PA_ENSURE_( PaAsiHpi_OpenInput( hostApi, stream->input->hpiDevice, &stream->input->hpiFormat,
+ &stream->input->hpiStream ) );
+ inputChannelCount = inputParameters->channelCount;
+ inputSampleFormat = inputParameters->sampleFormat;
+ hostInputSampleFormat = PaAsiHpi_HpiToPaFormat( stream->input->hpiFormat.wFormat );
+ stream->input->bytesPerFrame = inputChannelCount * Pa_GetSampleSize( hostInputSampleFormat );
+ assert( stream->input->bytesPerFrame > 0 );
+ /* Allocate host and temp buffers of appropriate size */
+ PA_ENSURE_( PaAsiHpi_SetupBuffers( stream->input, stream->pollingInterval,
+ framesPerHostBuffer, inputParameters->suggestedLatency ) );
+ }
+ if( outputParameters )
+ {
+ /* Create blank stream component structure */
+ PA_UNLESS_( stream->output = (PaAsiHpiStreamComponent *)PaUtil_AllocateMemory( sizeof(PaAsiHpiStreamComponent) ),
+ paInsufficientMemory );
+ memset( stream->output, 0, sizeof(PaAsiHpiStreamComponent) );
+ /* Create/validate format */
+ PA_ENSURE_( PaAsiHpi_CreateFormat( hostApi, outputParameters, sampleRate,
+ &stream->output->hpiDevice, &stream->output->hpiFormat ) );
+ /* Open stream and check format */
+ PA_ENSURE_( PaAsiHpi_OpenOutput( hostApi, stream->output->hpiDevice,
+ &stream->output->hpiFormat,
+ &stream->output->hpiStream ) );
+ outputChannelCount = outputParameters->channelCount;
+ outputSampleFormat = outputParameters->sampleFormat;
+ hostOutputSampleFormat = PaAsiHpi_HpiToPaFormat( stream->output->hpiFormat.wFormat );
+ stream->output->bytesPerFrame = outputChannelCount * Pa_GetSampleSize( hostOutputSampleFormat );
+ /* Allocate host and temp buffers of appropriate size */
+ PA_ENSURE_( PaAsiHpi_SetupBuffers( stream->output, stream->pollingInterval,
+ framesPerHostBuffer, outputParameters->suggestedLatency ) );
+ }
+
+ /* Determine maximum frames per host buffer (least common denominator of input/output) */
+ if( inputParameters && outputParameters )
+ {
+ stream->maxFramesPerHostBuffer = PA_MIN( stream->input->tempBufferSize / stream->input->bytesPerFrame,
+ stream->output->tempBufferSize / stream->output->bytesPerFrame );
+ }
+ else
+ {
+ stream->maxFramesPerHostBuffer = inputParameters ? stream->input->tempBufferSize / stream->input->bytesPerFrame
+ : stream->output->tempBufferSize / stream->output->bytesPerFrame;
+ }
+ assert( stream->maxFramesPerHostBuffer > 0 );
+ /* Initialize various other stream parameters */
+ stream->neverDropInput = streamFlags & paNeverDropInput;
+ stream->state = paAsiHpiStoppedState;
+
+ /* Initialize either callback or blocking interface */
+ if( streamCallback )
+ {
+ PaUtil_InitializeStreamRepresentation( &stream->baseStreamRep,
+ &hpiHostApi->callbackStreamInterface,
+ streamCallback, userData );
+ stream->callbackMode = 1;
+ }
+ else
+ {
+ PaUtil_InitializeStreamRepresentation( &stream->baseStreamRep,
+ &hpiHostApi->blockingStreamInterface,
+ streamCallback, userData );
+ /* Pre-allocate non-interleaved user buffer pointers for blocking interface */
+ PA_UNLESS_( stream->blockingUserBufferCopy =
+ PaUtil_AllocateMemory( sizeof(void *) * PA_MAX( inputChannelCount, outputChannelCount ) ),
+ paInsufficientMemory );
+ stream->callbackMode = 0;
+ }
+ PaUtil_InitializeCpuLoadMeasurer( &stream->cpuLoadMeasurer, sampleRate );
+
+ /* Following pa_linux_alsa's lead, we operate with fixed host buffer size by default, */
+ /* since other modes will invariably lead to block adaption (maybe Bounded better?) */
+ PA_ENSURE_( PaUtil_InitializeBufferProcessor( &stream->bufferProcessor,
+ inputChannelCount, inputSampleFormat, hostInputSampleFormat,
+ outputChannelCount, outputSampleFormat, hostOutputSampleFormat,
+ sampleRate, streamFlags,
+ framesPerBuffer, framesPerHostBuffer, paUtilFixedHostBufferSize,
+ streamCallback, userData ) );
+
+ stream->baseStreamRep.streamInfo.structVersion = 1;
+ stream->baseStreamRep.streamInfo.sampleRate = sampleRate;
+ /* Determine input latency from buffer processor and buffer sizes */
+ if( stream->input )
+ {
+ PaTime bufferDuration = ( stream->input->hostBufferSize + stream->input->hardwareBufferSize )
+ / sampleRate / stream->input->bytesPerFrame;
+ stream->baseStreamRep.streamInfo.inputLatency =
+ bufferDuration +
+ ((PaTime)PaUtil_GetBufferProcessorInputLatencyFrames( &stream->bufferProcessor ) -
+ stream->maxFramesPerHostBuffer) / sampleRate;
+ assert( stream->baseStreamRep.streamInfo.inputLatency > 0.0 );
+ }
+ /* Determine output latency from buffer processor and buffer sizes */
+ if( stream->output )
+ {
+ PaTime bufferDuration = ( stream->output->hostBufferSize + stream->output->hardwareBufferSize )
+ / sampleRate / stream->output->bytesPerFrame;
+ /* Take buffer size cap into account (see PaAsiHpi_WaitForFrames) */
+ if( !stream->input && (stream->output->outputBufferCap > 0) )
+ {
+ bufferDuration = PA_MIN( bufferDuration,
+ stream->output->outputBufferCap / sampleRate / stream->output->bytesPerFrame );
+ }
+ stream->baseStreamRep.streamInfo.outputLatency =
+ bufferDuration +
+ ((PaTime)PaUtil_GetBufferProcessorOutputLatencyFrames( &stream->bufferProcessor ) -
+ stream->maxFramesPerHostBuffer) / sampleRate;
+ assert( stream->baseStreamRep.streamInfo.outputLatency > 0.0 );
+ }
+
+ /* Report stream info, for debugging purposes */
+ PaAsiHpi_StreamDump( stream );
+
+ /* Save initialized stream to PA stream list */
+ *s = (PaStream*)stream;
+ return result;
+
+error:
+ CloseStream( (PaStream*)stream );
+ return result;
+}
+
+
+/** Close PortAudio stream.
+ When CloseStream() is called, the multi-api layer ensures that the stream has already
+ been stopped or aborted. This closes the underlying HPI streams and deallocates stream
+ buffers and structs.
+
+ @param s Pointer to PortAudio stream
+
+ @return PortAudio error code
+*/
+static PaError CloseStream( PaStream *s )
+{
+ PaError result = paNoError;
+ PaAsiHpiStream *stream = (PaAsiHpiStream*)s;
+
+ /* If stream is already gone, all is well */
+ if( stream == NULL )
+ return paNoError;
+
+ /* Generic stream cleanup */
+ PaUtil_TerminateBufferProcessor( &stream->bufferProcessor );
+ PaUtil_TerminateStreamRepresentation( &stream->baseStreamRep );
+
+ /* Implementation-specific details - close internal streams */
+ if( stream->input )
+ {
+ /* Close HPI stream (freeing BBM host buffer in the process, if used) */
+ if( stream->input->hpiStream )
+ {
+ PA_ASIHPI_UNLESS_( HPI_InStreamClose( NULL,
+ stream->input->hpiStream ), paUnanticipatedHostError );
+ }
+ /* Free temp buffer and stream component */
+ PaUtil_FreeMemory( stream->input->tempBuffer );
+ PaUtil_FreeMemory( stream->input );
+ }
+ if( stream->output )
+ {
+ /* Close HPI stream (freeing BBM host buffer in the process, if used) */
+ if( stream->output->hpiStream )
+ {
+ PA_ASIHPI_UNLESS_( HPI_OutStreamClose( NULL,
+ stream->output->hpiStream ), paUnanticipatedHostError );
+ }
+ /* Free temp buffer and stream component */
+ PaUtil_FreeMemory( stream->output->tempBuffer );
+ PaUtil_FreeMemory( stream->output );
+ }
+
+ PaUtil_FreeMemory( stream->blockingUserBufferCopy );
+ PaUtil_FreeMemory( stream );
+
+error:
+ return result;
+}
+
+
+/** Prime HPI output stream with silence.
+ This resets the output stream and uses PortAudio helper routines to fill the
+ temp buffer with silence. It then writes two host buffers to the stream. This is supposed
+ to be called before the stream is started. It has no effect on input-only streams.
+
+ @param stream Pointer to stream struct
+
+ @return PortAudio error code
+ */
+static PaError PaAsiHpi_PrimeOutputWithSilence( PaAsiHpiStream *stream )
+{
+ PaError result = paNoError;
+ PaAsiHpiStreamComponent *out;
+ PaUtilZeroer *zeroer;
+ PaSampleFormat outputFormat;
+ assert( stream );
+ out = stream->output;
+ /* Only continue if stream has output channels */
+ if( !out )
+ return result;
+ assert( out->tempBuffer );
+
+ /* Clear all existing data in hardware playback buffer */
+ PA_ASIHPI_UNLESS_( HPI_OutStreamReset( NULL,
+ out->hpiStream ), paUnanticipatedHostError );
+ /* Fill temp buffer with silence */
+ outputFormat = PaAsiHpi_HpiToPaFormat( out->hpiFormat.wFormat );
+ zeroer = PaUtil_SelectZeroer( outputFormat );
+ zeroer(out->tempBuffer, 1, out->tempBufferSize / Pa_GetSampleSize(outputFormat) );
+ /* Write temp buffer to hardware fifo twice, to get started */
+ PA_ASIHPI_UNLESS_( HPI_OutStreamWriteBuf( NULL, out->hpiStream,
+ out->tempBuffer, out->tempBufferSize, &out->hpiFormat),
+ paUnanticipatedHostError );
+ PA_ASIHPI_UNLESS_( HPI_OutStreamWriteBuf( NULL, out->hpiStream,
+ out->tempBuffer, out->tempBufferSize, &out->hpiFormat),
+ paUnanticipatedHostError );
+error:
+ return result;
+}
+
+
+/** Start HPI streams (both input + output).
+ This starts all HPI streams in the PortAudio stream. Output streams are first primed with
+ silence, if required. After this call the PA stream is in the Active state.
+
+ @todo Implement priming via the user callback
+
+ @param stream Pointer to stream struct
+
+ @param outputPrimed True if output is already primed (if false, silence will be loaded before starting)
+
+ @return PortAudio error code
+ */
+static PaError PaAsiHpi_StartStream( PaAsiHpiStream *stream, int outputPrimed )
+{
+ PaError result = paNoError;
+
+ if( stream->input )
+ {
+ PA_ASIHPI_UNLESS_( HPI_InStreamStart( NULL,
+ stream->input->hpiStream ), paUnanticipatedHostError );
+ }
+ if( stream->output )
+ {
+ if( !outputPrimed )
+ {
+ /* Buffer isn't primed, so load stream with silence */
+ PA_ENSURE_( PaAsiHpi_PrimeOutputWithSilence( stream ) );
+ }
+ PA_ASIHPI_UNLESS_( HPI_OutStreamStart( NULL,
+ stream->output->hpiStream ), paUnanticipatedHostError );
+ }
+ stream->state = paAsiHpiActiveState;
+ stream->callbackFinished = 0;
+
+ /* Report stream info for debugging purposes */
+ /* PaAsiHpi_StreamDump( stream ); */
+
+error:
+ return result;
+}
+
+
+/** Start PortAudio stream.
+ If the stream has a callback interface, this starts a helper thread to feed the user callback.
+ The thread will then take care of starting the HPI streams, and this function will block
+ until the streams actually start. In the case of a blocking interface, the HPI streams
+ are simply started.
+
+ @param s Pointer to PortAudio stream
+
+ @return PortAudio error code
+*/
+static PaError StartStream( PaStream *s )
+{
+ PaError result = paNoError;
+ PaAsiHpiStream *stream = (PaAsiHpiStream*)s;
+
+ assert( stream );
+
+ /* Ready the processor */
+ PaUtil_ResetBufferProcessor( &stream->bufferProcessor );
+
+ if( stream->callbackMode )
+ {
+ /* Create and start callback engine thread */
+ /* Also waits 1 second for stream to be started by engine thread (otherwise aborts) */
+ PA_ENSURE_( PaUnixThread_New( &stream->thread, &CallbackThreadFunc, stream, 1., 0 /*rtSched*/ ) );
+ }
+ else
+ {
+ PA_ENSURE_( PaAsiHpi_StartStream( stream, 0 ) );
+ }
+
+error:
+ return result;
+}
+
+
+/** Stop HPI streams (input + output), either softly or abruptly.
+ If abort is false, the function blocks until the output stream is drained, otherwise it
+ stops immediately and discards data in the stream hardware buffers.
+
+ This function is safe to call from the callback engine thread as well as the main thread.
+
+ @param stream Pointer to stream struct
+
+ @param abort True if samples in output buffer should be discarded (otherwise blocks until stream is done)
+
+ @return PortAudio error code
+
+ */
+static PaError PaAsiHpi_StopStream( PaAsiHpiStream *stream, int abort )
+{
+ PaError result = paNoError;
+
+ assert( stream );
+
+ /* Input channels */
+ if( stream->input )
+ {
+ PA_ASIHPI_UNLESS_( HPI_InStreamReset( NULL,
+ stream->input->hpiStream ), paUnanticipatedHostError );
+ }
+ /* Output channels */
+ if( stream->output )
+ {
+ if( !abort )
+ {
+ /* Wait until HPI output stream is drained */
+ while( 1 )
+ {
+ PaAsiHpiStreamInfo streamInfo;
+ PaTime timeLeft;
+
+ /* Obtain number of samples waiting to be played */
+ PA_ENSURE_( PaAsiHpi_GetStreamInfo( stream->output, &streamInfo ) );
+ /* Check if stream is drained */
+ if( (streamInfo.state != HPI_STATE_PLAYING) &&
+ (streamInfo.dataSize < stream->output->bytesPerFrame * PA_ASIHPI_MIN_FRAMES_) )
+ break;
+ /* Sleep amount of time represented by remaining samples */
+ timeLeft = 1000.0 * streamInfo.dataSize / stream->output->bytesPerFrame
+ / stream->baseStreamRep.streamInfo.sampleRate;
+ Pa_Sleep( (long)ceil( timeLeft ) );
+ }
+ }
+ PA_ASIHPI_UNLESS_( HPI_OutStreamReset( NULL,
+ stream->output->hpiStream ), paUnanticipatedHostError );
+ }
+
+ /* Report stream info for debugging purposes */
+ /* PaAsiHpi_StreamDump( stream ); */
+
+error:
+ return result;
+}
+
+
+/** Stop or abort PortAudio stream.
+
+ This function is used to explicitly stop the PortAudio stream (via StopStream/AbortStream),
+ as opposed to the situation when the callback finishes with a result other than paContinue.
+ If a stream is in callback mode we will have to inspect whether the background thread has
+ finished, or we will have to take it out. In either case we join the thread before returning.
+ In blocking mode, we simply tell HPI to stop abruptly (abort) or finish buffers (drain).
+ The PortAudio stream will be in the Stopped state after a call to this function.
+
+ Don't call this from the callback engine thread!
+
+ @param stream Pointer to stream struct
+
+ @param abort True if samples in output buffer should be discarded (otherwise blocks until stream is done)
+
+ @return PortAudio error code
+*/
+static PaError PaAsiHpi_ExplicitStop( PaAsiHpiStream *stream, int abort )
+{
+ PaError result = paNoError;
+
+ /* First deal with the callback thread, cancelling and/or joining it if necessary */
+ if( stream->callbackMode )
+ {
+ PaError threadRes;
+ stream->callbackAbort = abort;
+ if( abort )
+ {
+ PA_DEBUG(( "Aborting callback\n" ));
+ }
+ else
+ {
+ PA_DEBUG(( "Stopping callback\n" ));
+ }
+ PA_ENSURE_( PaUnixThread_Terminate( &stream->thread, !abort, &threadRes ) );
+ if( threadRes != paNoError )
+ {
+ PA_DEBUG(( "Callback thread returned: %d\n", threadRes ));
+ }
+ }
+ else
+ {
+ PA_ENSURE_( PaAsiHpi_StopStream( stream, abort ) );
+ }
+
+ stream->state = paAsiHpiStoppedState;
+
+error:
+ return result;
+}
+
+
+/** Stop PortAudio stream.
+ This blocks until the output buffers are drained.
+
+ @param s Pointer to PortAudio stream
+
+ @return PortAudio error code
+*/
+static PaError StopStream( PaStream *s )
+{
+ return PaAsiHpi_ExplicitStop( (PaAsiHpiStream *) s, 0 );
+}
+
+
+/** Abort PortAudio stream.
+ This discards any existing data in output buffers and stops the stream immediately.
+
+ @param s Pointer to PortAudio stream
+
+ @return PortAudio error code
+*/
+static PaError AbortStream( PaStream *s )
+{
+ return PaAsiHpi_ExplicitStop( (PaAsiHpiStream * ) s, 1 );
+}
+
+
+/** Determine whether the stream is stopped.
+ A stream is considered to be stopped prior to a successful call to StartStream and after
+ a successful call to StopStream or AbortStream. If a stream callback returns a value other
+ than paContinue the stream is NOT considered to be stopped (it is in CallbackFinished state).
+
+ @param s Pointer to PortAudio stream
+
+ @return Returns one (1) when the stream is stopped, zero (0) when the stream is running, or
+ a PaErrorCode (which are always negative) if PortAudio is not initialized or an
+ error is encountered.
+*/
+static PaError IsStreamStopped( PaStream *s )
+{
+ PaAsiHpiStream *stream = (PaAsiHpiStream*)s;
+
+ assert( stream );
+ return stream->state == paAsiHpiStoppedState ? 1 : 0;
+}
+
+
+/** Determine whether the stream is active.
+ A stream is active after a successful call to StartStream(), until it becomes inactive either
+ as a result of a call to StopStream() or AbortStream(), or as a result of a return value
+ other than paContinue from the stream callback. In the latter case, the stream is considered
+ inactive after the last buffer has finished playing.
+
+ @param s Pointer to PortAudio stream
+
+ @return Returns one (1) when the stream is active (i.e. playing or recording audio),
+ zero (0) when not playing, or a PaErrorCode (which are always negative)
+ if PortAudio is not initialized or an error is encountered.
+*/
+static PaError IsStreamActive( PaStream *s )
+{
+ PaAsiHpiStream *stream = (PaAsiHpiStream*)s;
+
+ assert( stream );
+ return stream->state == paAsiHpiActiveState ? 1 : 0;
+}
+
+
+/** Returns current stream time.
+ This corresponds to the system clock. The clock should run continuously while the stream
+ is open, i.e. between calls to OpenStream() and CloseStream(), therefore a frame counter
+ is not good enough.
+
+ @param s Pointer to PortAudio stream
+
+ @return Stream time, in seconds
+ */
+static PaTime GetStreamTime( PaStream *s )
+{
+ return PaUtil_GetTime();
+}
+
+
+/** Returns CPU load.
+
+ @param s Pointer to PortAudio stream
+
+ @return CPU load (0.0 if blocking interface is used)
+ */
+static double GetStreamCpuLoad( PaStream *s )
+{
+ PaAsiHpiStream *stream = (PaAsiHpiStream*)s;
+
+ return stream->callbackMode ? PaUtil_GetCpuLoad( &stream->cpuLoadMeasurer ) : 0.0;
+}
+
+/* --------------------------- Callback Interface --------------------------- */
+
+/** Exit routine which is called when callback thread quits.
+ This takes care of stopping the HPI streams (either waiting for output to finish, or
+ abruptly). It also calls the user-supplied StreamFinished callback, and sets the
+ stream state to CallbackFinished if it was reached via a non-paContinue return from
+ the user callback function.
+
+ @param userData A pointer to an open stream previously created with Pa_OpenStream
+ */
+static void PaAsiHpi_OnThreadExit( void *userData )
+{
+ PaAsiHpiStream *stream = (PaAsiHpiStream *) userData;
+
+ assert( stream );
+
+ PaUtil_ResetCpuLoadMeasurer( &stream->cpuLoadMeasurer );
+
+ PA_DEBUG(( "%s: Stopping HPI streams\n", __FUNCTION__ ));
+ PaAsiHpi_StopStream( stream, stream->callbackAbort );
+ PA_DEBUG(( "%s: Stoppage\n", __FUNCTION__ ));
+
+ /* Eventually notify user all buffers have played */
+ if( stream->baseStreamRep.streamFinishedCallback )
+ {
+ stream->baseStreamRep.streamFinishedCallback( stream->baseStreamRep.userData );
+ }
+
+ /* Unfortunately both explicit calls to Stop/AbortStream (leading to Stopped state)
+ and implicit stops via paComplete/paAbort (leading to CallbackFinished state)
+ end up here - need another flag to remind us which is the case */
+ if( stream->callbackFinished )
+ stream->state = paAsiHpiCallbackFinishedState;
+}
+
+
+/** Wait until there is enough frames to fill a host buffer.
+ The routine attempts to sleep until at least a full host buffer can be retrieved from the
+ input HPI stream and passed to the output HPI stream. It will first sleep until enough
+ output space is available, as this is usually easily achievable. If it is an output-only
+ stream, it will also sleep if the hardware buffer is too full, thereby throttling the
+ filling of the output buffer and reducing output latency. The routine then blocks until
+ enough input samples are available, unless this will cause an output underflow. In the
+ process, input overflows and output underflows are indicated.
+
+ @param stream Pointer to stream struct
+
+ @param framesAvail Returns the number of available frames
+
+ @param cbFlags Overflows and underflows indicated in here
+
+ @return PortAudio error code (only paUnanticipatedHostError expected)
+ */
+static PaError PaAsiHpi_WaitForFrames( PaAsiHpiStream *stream, unsigned long *framesAvail,
+ PaStreamCallbackFlags *cbFlags )
+{
+ PaError result = paNoError;
+ double sampleRate;
+ unsigned long framesTarget;
+ uint32_t outputData = 0, outputSpace = 0, inputData = 0, framesLeft = 0;
+
+ assert( stream );
+ assert( stream->input || stream->output );
+
+ sampleRate = stream->baseStreamRep.streamInfo.sampleRate;
+ /* We have to come up with this much frames on both input and output */
+ framesTarget = stream->bufferProcessor.framesPerHostBuffer;
+ assert( framesTarget > 0 );
+
+ while( 1 )
+ {
+ PaAsiHpiStreamInfo info;
+ /* Check output first, as this takes priority in the default full-duplex mode */
+ if( stream->output )
+ {
+ PA_ENSURE_( PaAsiHpi_GetStreamInfo( stream->output, &info ) );
+ /* Wait until enough space is available in output buffer to receive a full block */
+ if( info.availableFrames < framesTarget )
+ {
+ framesLeft = framesTarget - info.availableFrames;
+ Pa_Sleep( (long)ceil( 1000 * framesLeft / sampleRate ) );
+ continue;
+ }
+ /* Wait until the data in hardware buffer has dropped to a sensible level.
+ Without this, the hardware buffer quickly fills up in the absence of an input
+ stream to regulate its data rate (if data generation is fast). This leads to
+ large latencies, as the AudioScience hardware buffers are humongous.
+ This is similar to the default "Hardware Buffering=off" option in the
+ AudioScience WAV driver. */
+ if( !stream->input && (stream->output->outputBufferCap > 0) &&
+ ( info.totalBufferedData > stream->output->outputBufferCap / stream->output->bytesPerFrame ) )
+ {
+ framesLeft = info.totalBufferedData - stream->output->outputBufferCap / stream->output->bytesPerFrame;
+ Pa_Sleep( (long)ceil( 1000 * framesLeft / sampleRate ) );
+ continue;
+ }
+ outputData = info.totalBufferedData;
+ outputSpace = info.availableFrames;
+ /* Report output underflow to callback */
+ if( info.underflow )
+ {
+ *cbFlags |= paOutputUnderflow;
+ }
+ }
+
+ /* Now check input side */
+ if( stream->input )
+ {
+ PA_ENSURE_( PaAsiHpi_GetStreamInfo( stream->input, &info ) );
+ /* If a full block of samples hasn't been recorded yet, wait for it if possible */
+ if( info.availableFrames < framesTarget )
+ {
+ framesLeft = framesTarget - info.availableFrames;
+ /* As long as output is not disrupted in the process, wait for a full
+ block of input samples */
+ if( !stream->output || (outputData > framesLeft) )
+ {
+ Pa_Sleep( (long)ceil( 1000 * framesLeft / sampleRate ) );
+ continue;
+ }
+ }
+ inputData = info.availableFrames;
+ /** @todo The paInputOverflow flag should be set in the callback containing the
+ first input sample following the overflow. That means the block currently sitting
+ at the fore-front of recording, i.e. typically the one containing the newest (last)
+ sample in the HPI buffer system. This is most likely not the same as the current
+ block of data being passed to the callback. The current overflow should ideally
+ be noted in an overflow list of sorts, with an indication of when it should be
+ reported. The trouble starts if there are several separate overflow incidents,
+ given a big input buffer. Oh well, something to try out later... */
+ if( info.overflow )
+ {
+ *cbFlags |= paInputOverflow;
+ }
+ }
+ break;
+ }
+ /* Full-duplex stream */
+ if( stream->input && stream->output )
+ {
+ if( outputSpace >= framesTarget )
+ *framesAvail = outputSpace;
+ /* If input didn't make the target, keep the output count instead (input underflow) */
+ if( (inputData >= framesTarget) && (inputData < outputSpace) )
+ *framesAvail = inputData;
+ }
+ else
+ {
+ *framesAvail = stream->input ? inputData : outputSpace;
+ }
+
+error:
+ return result;
+}
+
+
+/** Obtain recording, current and playback timestamps of stream.
+ The current time is determined by the system clock. This "now" timestamp occurs at the
+ forefront of recording (and playback in the full-duplex case), which happens later than the
+ input timestamp by an amount equal to the total number of recorded frames in the input buffer.
+ The output timestamp indicates when the next generated sample will actually be played. This
+ happens after all the samples currently in the output buffer are played. The output timestamp
+ therefore follows the current timestamp by an amount equal to the number of frames yet to be
+ played back in the output buffer.
+
+ If the current timestamp is the present, the input timestamp is in the past and the output
+ timestamp is in the future.
+
+ @param stream Pointer to stream struct
+
+ @param timeInfo Pointer to timeInfo struct that will contain timestamps
+ */
+static void PaAsiHpi_CalculateTimeInfo( PaAsiHpiStream *stream, PaStreamCallbackTimeInfo *timeInfo )
+{
+ PaAsiHpiStreamInfo streamInfo;
+ double sampleRate;
+
+ assert( stream );
+ assert( timeInfo );
+ sampleRate = stream->baseStreamRep.streamInfo.sampleRate;
+
+ /* The current time ("now") is at the forefront of both recording and playback */
+ timeInfo->currentTime = GetStreamTime( (PaStream *)stream );
+ /* The last sample in the input buffer was recorded just now, so the first sample
+ happened (number of recorded samples)/sampleRate ago */
+ timeInfo->inputBufferAdcTime = timeInfo->currentTime;
+ if( stream->input )
+ {
+ PaAsiHpi_GetStreamInfo( stream->input, &streamInfo );
+ timeInfo->inputBufferAdcTime -= streamInfo.totalBufferedData / sampleRate;
+ }
+ /* The first of the outgoing samples will be played after all the samples in the output
+ buffer is done */
+ timeInfo->outputBufferDacTime = timeInfo->currentTime;
+ if( stream->output )
+ {
+ PaAsiHpi_GetStreamInfo( stream->output, &streamInfo );
+ timeInfo->outputBufferDacTime += streamInfo.totalBufferedData / sampleRate;
+ }
+}
+
+
+/** Read from HPI input stream and register buffers.
+ This reads data from the HPI input stream (if it exists) and registers the temp stream
+ buffers of both input and output streams with the buffer processor. In the process it also
+ handles input underflows in the full-duplex case.
+
+ @param stream Pointer to stream struct
+
+ @param numFrames On entrance the number of available frames, on exit the number of
+ received frames
+
+ @param cbFlags Indicates overflows and underflows
+
+ @return PortAudio error code
+ */
+static PaError PaAsiHpi_BeginProcessing( PaAsiHpiStream *stream, unsigned long *numFrames,
+ PaStreamCallbackFlags *cbFlags )
+{
+ PaError result = paNoError;
+
+ assert( stream );
+ if( *numFrames > stream->maxFramesPerHostBuffer )
+ *numFrames = stream->maxFramesPerHostBuffer;
+
+ if( stream->input )
+ {
+ PaAsiHpiStreamInfo info;
+
+ uint32_t framesToGet = *numFrames;
+
+ /* Check for overflows and underflows yet again */
+ PA_ENSURE_( PaAsiHpi_GetStreamInfo( stream->input, &info ) );
+ if( info.overflow )
+ {
+ *cbFlags |= paInputOverflow;
+ }
+ /* Input underflow if less than expected number of samples pitch up */
+ if( framesToGet > info.availableFrames )
+ {
+ PaUtilZeroer *zeroer;
+ PaSampleFormat inputFormat;
+
+ /* Never call an input-only stream with InputUnderflow set */
+ if( stream->output )
+ *cbFlags |= paInputUnderflow;
+ framesToGet = info.availableFrames;
+ /* Fill temp buffer with silence (to make up for missing input samples) */
+ inputFormat = PaAsiHpi_HpiToPaFormat( stream->input->hpiFormat.wFormat );
+ zeroer = PaUtil_SelectZeroer( inputFormat );
+ zeroer(stream->input->tempBuffer, 1,
+ stream->input->tempBufferSize / Pa_GetSampleSize(inputFormat) );
+ }
+
+ /* Read block of data into temp buffer */
+ PA_ASIHPI_UNLESS_( HPI_InStreamReadBuf( NULL,
+ stream->input->hpiStream,
+ stream->input->tempBuffer,
+ framesToGet * stream->input->bytesPerFrame),
+ paUnanticipatedHostError );
+ /* Register temp buffer with buffer processor (always FULL buffer) */
+ PaUtil_SetInputFrameCount( &stream->bufferProcessor, *numFrames );
+ /* HPI interface only allows interleaved channels */
+ PaUtil_SetInterleavedInputChannels( &stream->bufferProcessor,
+ 0, stream->input->tempBuffer,
+ stream->input->hpiFormat.wChannels );
+ }
+ if( stream->output )
+ {
+ /* Register temp buffer with buffer processor */
+ PaUtil_SetOutputFrameCount( &stream->bufferProcessor, *numFrames );
+ /* HPI interface only allows interleaved channels */
+ PaUtil_SetInterleavedOutputChannels( &stream->bufferProcessor,
+ 0, stream->output->tempBuffer,
+ stream->output->hpiFormat.wChannels );
+ }
+
+error:
+ return result;
+}
+
+
+/** Flush output buffers to HPI output stream.
+ This completes the processing cycle by writing the temp buffer to the HPI interface.
+ Additional output underflows are caught before data is written to the stream, as this
+ action typically remedies the underflow and hides it in the process.
+
+ @param stream Pointer to stream struct
+
+ @param numFrames The number of frames to write to the output stream
+
+ @param cbFlags Indicates overflows and underflows
+ */
+static PaError PaAsiHpi_EndProcessing( PaAsiHpiStream *stream, unsigned long numFrames,
+ PaStreamCallbackFlags *cbFlags )
+{
+ PaError result = paNoError;
+
+ assert( stream );
+
+ if( stream->output )
+ {
+ PaAsiHpiStreamInfo info;
+ /* Check for underflows after the (potentially time-consuming) callback */
+ PA_ENSURE_( PaAsiHpi_GetStreamInfo( stream->output, &info ) );
+ if( info.underflow )
+ {
+ *cbFlags |= paOutputUnderflow;
+ }
+
+ /* Write temp buffer to HPI stream */
+ PA_ASIHPI_UNLESS_( HPI_OutStreamWriteBuf( NULL,
+ stream->output->hpiStream,
+ stream->output->tempBuffer,
+ numFrames * stream->output->bytesPerFrame,
+ &stream->output->hpiFormat),
+ paUnanticipatedHostError );
+ }
+
+error:
+ return result;
+}
+
+
+/** Main callback engine.
+ This function runs in a separate thread and does all the work of fetching audio data from
+ the AudioScience card via the HPI interface, feeding it to the user callback via the buffer
+ processor, and delivering the resulting output data back to the card via HPI calls.
+ It is started and terminated when the PortAudio stream is started and stopped, and starts
+ the HPI streams on startup.
+
+ @param userData A pointer to an open stream previously created with Pa_OpenStream.
+*/
+static void *CallbackThreadFunc( void *userData )
+{
+ PaError result = paNoError;
+ PaAsiHpiStream *stream = (PaAsiHpiStream *) userData;
+ int callbackResult = paContinue;
+
+ assert( stream );
+
+ /* Cleanup routine stops streams on thread exit */
+ pthread_cleanup_push( &PaAsiHpi_OnThreadExit, stream );
+
+ /* Start HPI streams and notify parent when we're done */
+ PA_ENSURE_( PaUnixThread_PrepareNotify( &stream->thread ) );
+ /* Buffer will be primed with silence */
+ PA_ENSURE_( PaAsiHpi_StartStream( stream, 0 ) );
+ PA_ENSURE_( PaUnixThread_NotifyParent( &stream->thread ) );
+
+ /* MAIN LOOP */
+ while( 1 )
+ {
+ PaStreamCallbackFlags cbFlags = 0;
+ unsigned long framesAvail, framesGot;
+
+ pthread_testcancel();
+
+ /** @concern StreamStop if the main thread has requested a stop and the stream has not
+ * been effectively stopped we signal this condition by modifying callbackResult
+ * (we'll want to flush buffered output). */
+ if( PaUnixThread_StopRequested( &stream->thread ) && (callbackResult == paContinue) )
+ {
+ PA_DEBUG(( "Setting callbackResult to paComplete\n" ));
+ callbackResult = paComplete;
+ }
+
+ /* Start winding down thread if requested */
+ if( callbackResult != paContinue )
+ {
+ stream->callbackAbort = (callbackResult == paAbort);
+ if( stream->callbackAbort ||
+ /** @concern BlockAdaption: Go on if adaption buffers are empty */
+ PaUtil_IsBufferProcessorOutputEmpty( &stream->bufferProcessor ) )
+ {
+ goto end;
+ }
+ PA_DEBUG(( "%s: Flushing buffer processor\n", __FUNCTION__ ));
+ /* There is still buffered output that needs to be processed */
+ }
+
+ /* SLEEP */
+ /* Wait for data (or buffer space) to become available. This basically sleeps and
+ polls the HPI interface until a full block of frames can be moved. */
+ PA_ENSURE_( PaAsiHpi_WaitForFrames( stream, &framesAvail, &cbFlags ) );
+
+ /* Consume buffer space. Once we have a number of frames available for consumption we
+ must retrieve the data from the HPI interface and pass it to the PA buffer processor.
+ We should be prepared to process several chunks successively. */
+ while( framesAvail > 0 )
+ {
+ PaStreamCallbackTimeInfo timeInfo = {0, 0, 0};
+
+ pthread_testcancel();
+
+ framesGot = framesAvail;
+ if( stream->bufferProcessor.hostBufferSizeMode == paUtilFixedHostBufferSize )
+ {
+ /* We've committed to a fixed host buffer size, stick to that */
+ framesGot = framesGot >= stream->maxFramesPerHostBuffer ? stream->maxFramesPerHostBuffer : 0;
+ }
+ else
+ {
+ /* We've committed to an upper bound on the size of host buffers */
+ assert( stream->bufferProcessor.hostBufferSizeMode == paUtilBoundedHostBufferSize );
+ framesGot = PA_MIN( framesGot, stream->maxFramesPerHostBuffer );
+ }
+
+ /* Obtain buffer timestamps */
+ PaAsiHpi_CalculateTimeInfo( stream, &timeInfo );
+ PaUtil_BeginBufferProcessing( &stream->bufferProcessor, &timeInfo, cbFlags );
+ /* CPU load measurement should include processing activivity external to the stream callback */
+ PaUtil_BeginCpuLoadMeasurement( &stream->cpuLoadMeasurer );
+ if( framesGot > 0 )
+ {
+ /* READ FROM HPI INPUT STREAM */
+ PA_ENSURE_( PaAsiHpi_BeginProcessing( stream, &framesGot, &cbFlags ) );
+ /* Input overflow in a full-duplex stream makes for interesting times */
+ if( stream->input && stream->output && (cbFlags & paInputOverflow) )
+ {
+ /* Special full-duplex paNeverDropInput mode */
+ if( stream->neverDropInput )
+ {
+ PaUtil_SetNoOutput( &stream->bufferProcessor );
+ cbFlags |= paOutputOverflow;
+ }
+ }
+ /* CALL USER CALLBACK WITH INPUT DATA, AND OBTAIN OUTPUT DATA */
+ PaUtil_EndBufferProcessing( &stream->bufferProcessor, &callbackResult );
+ /* Clear overflow and underflow information (but PaAsiHpi_EndProcessing might
+ still show up output underflow that will carry over to next round) */
+ cbFlags = 0;
+ /* WRITE TO HPI OUTPUT STREAM */
+ PA_ENSURE_( PaAsiHpi_EndProcessing( stream, framesGot, &cbFlags ) );
+ /* Advance frame counter */
+ framesAvail -= framesGot;
+ }
+ PaUtil_EndCpuLoadMeasurement( &stream->cpuLoadMeasurer, framesGot );
+
+ if( framesGot == 0 )
+ {
+ /* Go back to polling for more frames */
+ break;
+
+ }
+ if( callbackResult != paContinue )
+ break;
+ }
+ }
+
+ /* This code is unreachable, but important to include regardless because it
+ * is possibly a macro with a closing brace to match the opening brace in
+ * pthread_cleanup_push() above. The documentation states that they must
+ * always occur in pairs. */
+ pthread_cleanup_pop( 1 );
+
+end:
+ /* Indicates normal exit of callback, as opposed to the thread getting killed explicitly */
+ stream->callbackFinished = 1;
+ PA_DEBUG(( "%s: Thread %d exiting (callbackResult = %d)\n ",
+ __FUNCTION__, pthread_self(), callbackResult ));
+ /* Exit from thread and report any PortAudio error in the process */
+ PaUnixThreading_EXIT( result );
+error:
+ goto end;
+}
+
+/* --------------------------- Blocking Interface --------------------------- */
+
+/* As separate stream interfaces are used for blocking and callback streams, the following
+ functions can be guaranteed to only be called for blocking streams. */
+
+/** Read data from input stream.
+ This reads the indicated number of frames into the supplied buffer from an input stream,
+ and blocks until this is done.
+
+ @param s Pointer to PortAudio stream
+
+ @param buffer Pointer to buffer that will receive interleaved data (or an array of pointers
+ to a buffer for each non-interleaved channel)
+
+ @param frames Number of frames to read from stream
+
+ @return PortAudio error code (also indicates overflow via paInputOverflowed)
+ */
+static PaError ReadStream( PaStream *s,
+ void *buffer,
+ unsigned long frames )
+{
+ PaError result = paNoError;
+ PaAsiHpiStream *stream = (PaAsiHpiStream*)s;
+ PaAsiHpiStreamInfo info;
+ void *userBuffer;
+
+ assert( stream );
+ PA_UNLESS_( stream->input, paCanNotReadFromAnOutputOnlyStream );
+
+ /* Check for input overflow since previous call to ReadStream */
+ PA_ENSURE_( PaAsiHpi_GetStreamInfo( stream->input, &info ) );
+ if( info.overflow )
+ {
+ result = paInputOverflowed;
+ }
+
+ /* NB Make copy of user buffer pointers, since they are advanced by buffer processor */
+ if( stream->bufferProcessor.userInputIsInterleaved )
+ {
+ userBuffer = buffer;
+ }
+ else
+ {
+ /* Copy channels into local array */
+ userBuffer = stream->blockingUserBufferCopy;
+ memcpy( userBuffer, buffer, sizeof (void *) * stream->input->hpiFormat.wChannels );
+ }
+
+ while( frames > 0 )
+ {
+ unsigned long framesGot, framesAvail;
+ PaStreamCallbackFlags cbFlags = 0;
+
+ PA_ENSURE_( PaAsiHpi_WaitForFrames( stream, &framesAvail, &cbFlags ) );
+ framesGot = PA_MIN( framesAvail, frames );
+ PA_ENSURE_( PaAsiHpi_BeginProcessing( stream, &framesGot, &cbFlags ) );
+
+ if( framesGot > 0 )
+ {
+ framesGot = PaUtil_CopyInput( &stream->bufferProcessor, &userBuffer, framesGot );
+ PA_ENSURE_( PaAsiHpi_EndProcessing( stream, framesGot, &cbFlags ) );
+ /* Advance frame counter */
+ frames -= framesGot;
+ }
+ }
+
+error:
+ return result;
+}
+
+
+/** Write data to output stream.
+ This writes the indicated number of frames from the supplied buffer to an output stream,
+ and blocks until this is done.
+
+ @param s Pointer to PortAudio stream
+
+ @param buffer Pointer to buffer that provides interleaved data (or an array of pointers
+ to a buffer for each non-interleaved channel)
+
+ @param frames Number of frames to write to stream
+
+ @return PortAudio error code (also indicates underflow via paOutputUnderflowed)
+ */
+static PaError WriteStream( PaStream *s,
+ const void *buffer,
+ unsigned long frames )
+{
+ PaError result = paNoError;
+ PaAsiHpiStream *stream = (PaAsiHpiStream*)s;
+ PaAsiHpiStreamInfo info;
+ const void *userBuffer;
+
+ assert( stream );
+ PA_UNLESS_( stream->output, paCanNotWriteToAnInputOnlyStream );
+
+ /* Check for output underflow since previous call to WriteStream */
+ PA_ENSURE_( PaAsiHpi_GetStreamInfo( stream->output, &info ) );
+ if( info.underflow )
+ {
+ result = paOutputUnderflowed;
+ }
+
+ /* NB Make copy of user buffer pointers, since they are advanced by buffer processor */
+ if( stream->bufferProcessor.userOutputIsInterleaved )
+ {
+ userBuffer = buffer;
+ }
+ else
+ {
+ /* Copy channels into local array */
+ userBuffer = stream->blockingUserBufferCopy;
+ memcpy( (void *)userBuffer, buffer, sizeof (void *) * stream->output->hpiFormat.wChannels );
+ }
+
+ while( frames > 0 )
+ {
+ unsigned long framesGot, framesAvail;
+ PaStreamCallbackFlags cbFlags = 0;
+
+ PA_ENSURE_( PaAsiHpi_WaitForFrames( stream, &framesAvail, &cbFlags ) );
+ framesGot = PA_MIN( framesAvail, frames );
+ PA_ENSURE_( PaAsiHpi_BeginProcessing( stream, &framesGot, &cbFlags ) );
+
+ if( framesGot > 0 )
+ {
+ framesGot = PaUtil_CopyOutput( &stream->bufferProcessor, &userBuffer, framesGot );
+ PA_ENSURE_( PaAsiHpi_EndProcessing( stream, framesGot, &cbFlags ) );
+ /* Advance frame counter */
+ frames -= framesGot;
+ }
+ }
+
+error:
+ return result;
+}
+
+
+/** Number of frames that can be read from input stream without blocking.
+
+ @param s Pointer to PortAudio stream
+
+ @return Number of frames, or PortAudio error code
+ */
+static signed long GetStreamReadAvailable( PaStream *s )
+{
+ PaError result = paNoError;
+ PaAsiHpiStream *stream = (PaAsiHpiStream*)s;
+ PaAsiHpiStreamInfo info;
+
+ assert( stream );
+ PA_UNLESS_( stream->input, paCanNotReadFromAnOutputOnlyStream );
+
+ PA_ENSURE_( PaAsiHpi_GetStreamInfo( stream->input, &info ) );
+ /* Round down to the nearest host buffer multiple */
+ result = (info.availableFrames / stream->maxFramesPerHostBuffer) * stream->maxFramesPerHostBuffer;
+ if( info.overflow )
+ {
+ result = paInputOverflowed;
+ }
+
+error:
+ return result;
+}
+
+
+/** Number of frames that can be written to output stream without blocking.
+
+ @param s Pointer to PortAudio stream
+
+ @return Number of frames, or PortAudio error code
+ */
+static signed long GetStreamWriteAvailable( PaStream *s )
+{
+ PaError result = paNoError;
+ PaAsiHpiStream *stream = (PaAsiHpiStream*)s;
+ PaAsiHpiStreamInfo info;
+
+ assert( stream );
+ PA_UNLESS_( stream->output, paCanNotWriteToAnInputOnlyStream );
+
+ PA_ENSURE_( PaAsiHpi_GetStreamInfo( stream->output, &info ) );
+ /* Round down to the nearest host buffer multiple */
+ result = (info.availableFrames / stream->maxFramesPerHostBuffer) * stream->maxFramesPerHostBuffer;
+ if( info.underflow )
+ {
+ result = paOutputUnderflowed;
+ }
+
+error:
+ return result;
+}
-/*\r
- * Implementation of the PortAudio API for Apple AUHAL\r
- *\r
- * PortAudio Portable Real-Time Audio Library\r
- * Latest Version at: http://www.portaudio.com\r
- *\r
- * Written by Bjorn Roche of XO Audio LLC, from PA skeleton code.\r
- * Portions copied from code by Dominic Mazzoni (who wrote a HAL implementation)\r
- *\r
- * Dominic's code was based on code by Phil Burk, Darren Gibbs,\r
- * Gord Peters, Stephane Letz, and Greg Pfiel.\r
- *\r
- * The following people also deserve acknowledgements:\r
- *\r
- * Olivier Tristan for feedback and testing\r
- * Glenn Zelniker and Z-Systems engineering for sponsoring the Blocking I/O\r
- * interface.\r
- * \r
- *\r
- * Based on the Open Source API proposed by Ross Bencina\r
- * Copyright (c) 1999-2002 Ross Bencina, Phil Burk\r
- *\r
- * Permission is hereby granted, free of charge, to any person obtaining\r
- * a copy of this software and associated documentation files\r
- * (the "Software"), to deal in the Software without restriction,\r
- * including without limitation the rights to use, copy, modify, merge,\r
- * publish, distribute, sublicense, and/or sell copies of the Software,\r
- * and to permit persons to whom the Software is furnished to do so,\r
- * subject to the following conditions:\r
- *\r
- * The above copyright notice and this permission notice shall be\r
- * included in all copies or substantial portions of the Software.\r
- *\r
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\r
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\r
- * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\r
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\r
- * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
- */\r
-\r
-/*\r
- * The text above constitutes the entire PortAudio license; however, \r
- * the PortAudio community also makes the following non-binding requests:\r
- *\r
- * Any person wishing to distribute modifications to the Software is\r
- * requested to send the modifications to the original developer so that\r
- * they can be incorporated into the canonical version. It is also \r
- * requested that these non-binding requests be included along with the \r
- * license above.\r
- */\r
-\r
-/**\r
- @file\r
- @ingroup hostapi_src\r
-\r
- This file contains the implementation\r
- required for blocking I/O. It is separated from pa_mac_core.c simply to ease\r
- development.\r
-*/\r
-\r
-#include "pa_mac_core_blocking.h"\r
-#include "pa_mac_core_internal.h"\r
-#include <assert.h>\r
-#ifdef MOSX_USE_NON_ATOMIC_FLAG_BITS\r
-# define OSAtomicOr32( a, b ) ( (*(b)) |= (a) )\r
-# define OSAtomicAnd32( a, b ) ( (*(b)) &= (a) )\r
-#else\r
-# include <libkern/OSAtomic.h>\r
-#endif\r
-\r
-/*\r
- * This function determines the size of a particular sample format.\r
- * if the format is not recognized, this returns zero.\r
- */\r
-static size_t computeSampleSizeFromFormat( PaSampleFormat format )\r
-{\r
- switch( format & (~paNonInterleaved) ) {\r
- case paFloat32: return 4;\r
- case paInt32: return 4;\r
- case paInt24: return 3;\r
- case paInt16: return 2;\r
- case paInt8: case paUInt8: return 1;\r
- default: return 0;\r
- }\r
-}\r
-/*\r
- * Same as computeSampleSizeFromFormat, except that if\r
- * the size is not a power of two, it returns the next power of two up\r
- */\r
-static size_t computeSampleSizeFromFormatPow2( PaSampleFormat format )\r
-{\r
- switch( format & (~paNonInterleaved) ) {\r
- case paFloat32: return 4;\r
- case paInt32: return 4;\r
- case paInt24: return 4;\r
- case paInt16: return 2;\r
- case paInt8: case paUInt8: return 1;\r
- default: return 0;\r
- }\r
-}\r
-\r
-\r
-\r
-/*\r
- * Functions for initializing, resetting, and destroying BLIO structures.\r
- *\r
- */\r
-\r
-/* This should be called with the relevant info when initializing a stream for\r
- callback. */\r
-PaError initializeBlioRingBuffers(\r
- PaMacBlio *blio,\r
- PaSampleFormat inputSampleFormat,\r
- PaSampleFormat outputSampleFormat,\r
- size_t framesPerBuffer,\r
- long ringBufferSize,\r
- int inChan,\r
- int outChan )\r
-{\r
- void *data;\r
- int result;\r
- OSStatus err;\r
-\r
- /* zeroify things */\r
- bzero( blio, sizeof( PaMacBlio ) );\r
- /* this is redundant, but the buffers are used to check\r
- if the bufffers have been initialized, so we do it explicitly. */\r
- blio->inputRingBuffer.buffer = NULL;\r
- blio->outputRingBuffer.buffer = NULL;\r
-\r
- /* initialize simple data */\r
- blio->ringBufferFrames = ringBufferSize;\r
- blio->inputSampleFormat = inputSampleFormat;\r
- blio->inputSampleSizeActual = computeSampleSizeFromFormat(inputSampleFormat);\r
- blio->inputSampleSizePow2 = computeSampleSizeFromFormatPow2(inputSampleFormat);\r
- blio->outputSampleFormat = outputSampleFormat;\r
- blio->outputSampleSizeActual = computeSampleSizeFromFormat(outputSampleFormat);\r
- blio->outputSampleSizePow2 = computeSampleSizeFromFormatPow2(outputSampleFormat);\r
-\r
- blio->framesPerBuffer = framesPerBuffer;\r
- blio->inChan = inChan;\r
- blio->outChan = outChan;\r
- blio->statusFlags = 0;\r
- blio->errors = paNoError;\r
-#ifdef PA_MAC_BLIO_MUTEX\r
- blio->isInputEmpty = false;\r
- blio->isOutputFull = false;\r
-#endif\r
-\r
- /* setup ring buffers */\r
-#ifdef PA_MAC_BLIO_MUTEX\r
- result = PaMacCore_SetUnixError( pthread_mutex_init(&(blio->inputMutex),NULL), 0 );\r
- if( result )\r
- goto error;\r
- result = UNIX_ERR( pthread_cond_init( &(blio->inputCond), NULL ) );\r
- if( result )\r
- goto error;\r
- result = UNIX_ERR( pthread_mutex_init(&(blio->outputMutex),NULL) );\r
- if( result )\r
- goto error;\r
- result = UNIX_ERR( pthread_cond_init( &(blio->outputCond), NULL ) );\r
-#endif\r
- if( inChan ) {\r
- data = calloc( ringBufferSize, blio->inputSampleSizePow2*inChan );\r
- if( !data )\r
- {\r
- result = paInsufficientMemory;\r
- goto error;\r
- }\r
-\r
- err = PaUtil_InitializeRingBuffer(\r
- &blio->inputRingBuffer,\r
- 1, ringBufferSize*blio->inputSampleSizePow2*inChan,\r
- data );\r
- assert( !err );\r
- }\r
- if( outChan ) {\r
- data = calloc( ringBufferSize, blio->outputSampleSizePow2*outChan );\r
- if( !data )\r
- {\r
- result = paInsufficientMemory;\r
- goto error;\r
- }\r
-\r
- err = PaUtil_InitializeRingBuffer(\r
- &blio->outputRingBuffer,\r
- 1, ringBufferSize*blio->outputSampleSizePow2*outChan,\r
- data );\r
- assert( !err );\r
- }\r
-\r
- result = resetBlioRingBuffers( blio );\r
- if( result )\r
- goto error;\r
-\r
- return 0;\r
-\r
- error:\r
- destroyBlioRingBuffers( blio );\r
- return result;\r
-}\r
-\r
-#ifdef PA_MAC_BLIO_MUTEX\r
-PaError blioSetIsInputEmpty( PaMacBlio *blio, bool isEmpty )\r
-{\r
- PaError result = paNoError;\r
- if( isEmpty == blio->isInputEmpty )\r
- goto done;\r
-\r
- /* we need to update the value. Here's what we do:\r
- * - Lock the mutex, so noone else can write.\r
- * - update the value.\r
- * - unlock.\r
- * - broadcast to all listeners.\r
- */\r
- result = UNIX_ERR( pthread_mutex_lock( &blio->inputMutex ) );\r
- if( result )\r
- goto done;\r
- blio->isInputEmpty = isEmpty;\r
- result = UNIX_ERR( pthread_mutex_unlock( &blio->inputMutex ) );\r
- if( result )\r
- goto done;\r
- result = UNIX_ERR( pthread_cond_broadcast( &blio->inputCond ) );\r
- if( result )\r
- goto done;\r
-\r
- done:\r
- return result;\r
-}\r
-PaError blioSetIsOutputFull( PaMacBlio *blio, bool isFull )\r
-{\r
- PaError result = paNoError;\r
- if( isFull == blio->isOutputFull )\r
- goto done;\r
-\r
- /* we need to update the value. Here's what we do:\r
- * - Lock the mutex, so noone else can write.\r
- * - update the value.\r
- * - unlock.\r
- * - broadcast to all listeners.\r
- */\r
- result = UNIX_ERR( pthread_mutex_lock( &blio->outputMutex ) );\r
- if( result )\r
- goto done;\r
- blio->isOutputFull = isFull;\r
- result = UNIX_ERR( pthread_mutex_unlock( &blio->outputMutex ) );\r
- if( result )\r
- goto done;\r
- result = UNIX_ERR( pthread_cond_broadcast( &blio->outputCond ) );\r
- if( result )\r
- goto done;\r
-\r
- done:\r
- return result;\r
-}\r
-#endif\r
-\r
-/* This should be called after stopping or aborting the stream, so that on next\r
- start, the buffers will be ready. */\r
-PaError resetBlioRingBuffers( PaMacBlio *blio )\r
-{\r
-#ifdef PA_MAC__BLIO_MUTEX\r
- int result;\r
-#endif\r
- blio->statusFlags = 0;\r
- if( blio->outputRingBuffer.buffer ) {\r
- PaUtil_FlushRingBuffer( &blio->outputRingBuffer );\r
- bzero( blio->outputRingBuffer.buffer,\r
- blio->outputRingBuffer.bufferSize );\r
- /* Advance buffer */\r
- PaUtil_AdvanceRingBufferWriteIndex( &blio->outputRingBuffer, blio->ringBufferFrames*blio->outputSampleSizeActual*blio->outChan );\r
- //PaUtil_AdvanceRingBufferWriteIndex( &blio->outputRingBuffer, blio->outputRingBuffer.bufferSize );\r
-\r
- /* Update isOutputFull. */\r
-#ifdef PA_MAC__BLIO_MUTEX\r
- result = blioSetIsOutputFull( blio, toAdvance == blio->outputRingBuffer.bufferSize );\r
- if( result )\r
- goto error;\r
-#endif\r
-/*\r
- printf( "------%d\n" , blio->framesPerBuffer );\r
- printf( "------%d\n" , blio->outChan );\r
- printf( "------%d\n" , blio->outputSampleSize );\r
- printf( "------%d\n" , blio->framesPerBuffer*blio->outChan*blio->outputSampleSize );\r
-*/\r
- }\r
- if( blio->inputRingBuffer.buffer ) {\r
- PaUtil_FlushRingBuffer( &blio->inputRingBuffer );\r
- bzero( blio->inputRingBuffer.buffer,\r
- blio->inputRingBuffer.bufferSize );\r
- /* Update isInputEmpty. */\r
-#ifdef PA_MAC__BLIO_MUTEX\r
- result = blioSetIsInputEmpty( blio, true );\r
- if( result )\r
- goto error;\r
-#endif\r
- }\r
- return paNoError;\r
-#ifdef PA_MAC__BLIO_MUTEX\r
- error:\r
- return result;\r
-#endif\r
-}\r
-\r
-/*This should be called when you are done with the blio. It can safely be called\r
- multiple times if there are no exceptions. */\r
-PaError destroyBlioRingBuffers( PaMacBlio *blio )\r
-{\r
- PaError result = paNoError;\r
- if( blio->inputRingBuffer.buffer ) {\r
- free( blio->inputRingBuffer.buffer );\r
-#ifdef PA_MAC__BLIO_MUTEX\r
- result = UNIX_ERR( pthread_mutex_destroy( & blio->inputMutex ) );\r
- if( result ) return result;\r
- result = UNIX_ERR( pthread_cond_destroy( & blio->inputCond ) );\r
- if( result ) return result;\r
-#endif\r
- }\r
- blio->inputRingBuffer.buffer = NULL;\r
- if( blio->outputRingBuffer.buffer ) {\r
- free( blio->outputRingBuffer.buffer );\r
-#ifdef PA_MAC__BLIO_MUTEX\r
- result = UNIX_ERR( pthread_mutex_destroy( & blio->outputMutex ) );\r
- if( result ) return result;\r
- result = UNIX_ERR( pthread_cond_destroy( & blio->outputCond ) );\r
- if( result ) return result;\r
-#endif\r
- }\r
- blio->outputRingBuffer.buffer = NULL;\r
-\r
- return result;\r
-}\r
-\r
-/*\r
- * this is the BlioCallback function. It expects to recieve a PaMacBlio Object\r
- * pointer as userData.\r
- *\r
- */\r
-int BlioCallback( const void *input, void *output, unsigned long frameCount,\r
- const PaStreamCallbackTimeInfo* timeInfo,\r
- PaStreamCallbackFlags statusFlags,\r
- void *userData )\r
-{\r
- PaMacBlio *blio = (PaMacBlio*)userData;\r
- long avail;\r
- long toRead;\r
- long toWrite;\r
- long read;\r
- long written;\r
-\r
- /* set flags returned by OS: */\r
- OSAtomicOr32( statusFlags, &blio->statusFlags ) ;\r
-\r
- /* --- Handle Input Buffer --- */\r
- if( blio->inChan ) {\r
- avail = PaUtil_GetRingBufferWriteAvailable( &blio->inputRingBuffer );\r
-\r
- /* check for underflow */\r
- if( avail < frameCount * blio->inputSampleSizeActual * blio->inChan )\r
- {\r
- OSAtomicOr32( paInputOverflow, &blio->statusFlags );\r
- }\r
- toRead = MIN( avail, frameCount * blio->inputSampleSizeActual * blio->inChan );\r
-\r
- /* copy the data */\r
- /*printf( "reading %d\n", toRead );*/\r
- read = PaUtil_WriteRingBuffer( &blio->inputRingBuffer, input, toRead );\r
- assert( toRead == read );\r
-#ifdef PA_MAC__BLIO_MUTEX\r
- /* Priority inversion. See notes below. */\r
- blioSetIsInputEmpty( blio, false );\r
-#endif\r
- }\r
-\r
-\r
- /* --- Handle Output Buffer --- */\r
- if( blio->outChan ) {\r
- avail = PaUtil_GetRingBufferReadAvailable( &blio->outputRingBuffer );\r
-\r
- /* check for underflow */\r
- if( avail < frameCount * blio->outputSampleSizeActual * blio->outChan )\r
- OSAtomicOr32( paOutputUnderflow, &blio->statusFlags );\r
-\r
- toWrite = MIN( avail, frameCount * blio->outputSampleSizeActual * blio->outChan );\r
-\r
- if( toWrite != frameCount * blio->outputSampleSizeActual * blio->outChan )\r
- bzero( ((char *)output)+toWrite,\r
- frameCount * blio->outputSampleSizeActual * blio->outChan - toWrite );\r
- /* copy the data */\r
- /*printf( "writing %d\n", toWrite );*/\r
- written = PaUtil_ReadRingBuffer( &blio->outputRingBuffer, output, toWrite );\r
- assert( toWrite == written );\r
-#ifdef PA_MAC__BLIO_MUTEX\r
- /* We have a priority inversion here. However, we will only have to\r
- wait if this was true and is now false, which means we've got\r
- some room in the buffer.\r
- Hopefully problems will be minimized. */\r
- blioSetIsOutputFull( blio, false );\r
-#endif\r
- }\r
-\r
- return paContinue;\r
-}\r
-\r
-PaError ReadStream( PaStream* stream,\r
- void *buffer,\r
- unsigned long frames )\r
-{\r
- PaMacBlio *blio = & ((PaMacCoreStream*)stream) -> blio;\r
- char *cbuf = (char *) buffer;\r
- PaError ret = paNoError;\r
- VVDBUG(("ReadStream()\n"));\r
-\r
- while( frames > 0 ) {\r
- long avail;\r
- long toRead;\r
- do {\r
- avail = PaUtil_GetRingBufferReadAvailable( &blio->inputRingBuffer );\r
-/*\r
- printf( "Read Buffer is %%%g full: %ld of %ld.\n",\r
- 100 * (float)avail / (float) blio->inputRingBuffer.bufferSize,\r
- avail, blio->inputRingBuffer.bufferSize );\r
-*/\r
- if( avail == 0 ) {\r
-#ifdef PA_MAC_BLIO_MUTEX\r
- /**block when empty*/\r
- ret = UNIX_ERR( pthread_mutex_lock( &blio->inputMutex ) );\r
- if( ret )\r
- return ret;\r
- while( blio->isInputEmpty ) {\r
- ret = UNIX_ERR( pthread_cond_wait( &blio->inputCond, &blio->inputMutex ) );\r
- if( ret )\r
- return ret;\r
- }\r
- ret = UNIX_ERR( pthread_mutex_unlock( &blio->inputMutex ) );\r
- if( ret )\r
- return ret;\r
-#else\r
- Pa_Sleep( PA_MAC_BLIO_BUSY_WAIT_SLEEP_INTERVAL );\r
-#endif\r
- }\r
- } while( avail == 0 );\r
- toRead = MIN( avail, frames * blio->inputSampleSizeActual * blio->inChan );\r
- toRead -= toRead % blio->inputSampleSizeActual * blio->inChan ;\r
- PaUtil_ReadRingBuffer( &blio->inputRingBuffer, (void *)cbuf, toRead );\r
- cbuf += toRead;\r
- frames -= toRead / ( blio->inputSampleSizeActual * blio->inChan );\r
-\r
- if( toRead == avail ) {\r
-#ifdef PA_MAC_BLIO_MUTEX\r
- /* we just emptied the buffer, so we need to mark it as empty. */\r
- ret = blioSetIsInputEmpty( blio, true );\r
- if( ret )\r
- return ret;\r
- /* of course, in the meantime, the callback may have put some sats\r
- in, so\r
- so check for that, too, to avoid a race condition. */\r
- if( PaUtil_GetRingBufferReadAvailable( &blio->inputRingBuffer ) ) {\r
- blioSetIsInputEmpty( blio, false );\r
- if( ret )\r
- return ret;\r
- }\r
-#endif\r
- }\r
- }\r
-\r
- /* Report either paNoError or paInputOverflowed. */\r
- /* may also want to report other errors, but this is non-standard. */\r
- ret = blio->statusFlags & paInputOverflow;\r
-\r
- /* report underflow only once: */\r
- if( ret ) {\r
- OSAtomicAnd32( (uint32_t)(~paInputOverflow), &blio->statusFlags );\r
- ret = paInputOverflowed;\r
- }\r
-\r
- return ret;\r
-}\r
-\r
-\r
-PaError WriteStream( PaStream* stream,\r
- const void *buffer,\r
- unsigned long frames )\r
-{\r
- PaMacBlio *blio = & ((PaMacCoreStream*)stream) -> blio;\r
- char *cbuf = (char *) buffer;\r
- PaError ret = paNoError;\r
- VVDBUG(("WriteStream()\n"));\r
-\r
- while( frames > 0 ) {\r
- long avail = 0;\r
- long toWrite;\r
-\r
- do {\r
- avail = PaUtil_GetRingBufferWriteAvailable( &blio->outputRingBuffer );\r
-/*\r
- printf( "Write Buffer is %%%g full: %ld of %ld.\n",\r
- 100 - 100 * (float)avail / (float) blio->outputRingBuffer.bufferSize,\r
- avail, blio->outputRingBuffer.bufferSize );\r
-*/\r
- if( avail == 0 ) {\r
-#ifdef PA_MAC_BLIO_MUTEX\r
- /*block while full*/\r
- ret = UNIX_ERR( pthread_mutex_lock( &blio->outputMutex ) );\r
- if( ret )\r
- return ret;\r
- while( blio->isOutputFull ) {\r
- ret = UNIX_ERR( pthread_cond_wait( &blio->outputCond, &blio->outputMutex ) );\r
- if( ret )\r
- return ret;\r
- }\r
- ret = UNIX_ERR( pthread_mutex_unlock( &blio->outputMutex ) );\r
- if( ret )\r
- return ret;\r
-#else\r
- Pa_Sleep( PA_MAC_BLIO_BUSY_WAIT_SLEEP_INTERVAL );\r
-#endif\r
- }\r
- } while( avail == 0 );\r
-\r
- toWrite = MIN( avail, frames * blio->outputSampleSizeActual * blio->outChan );\r
- toWrite -= toWrite % blio->outputSampleSizeActual * blio->outChan ;\r
- PaUtil_WriteRingBuffer( &blio->outputRingBuffer, (void *)cbuf, toWrite );\r
- cbuf += toWrite;\r
- frames -= toWrite / ( blio->outputSampleSizeActual * blio->outChan );\r
-\r
-#ifdef PA_MAC_BLIO_MUTEX\r
- if( toWrite == avail ) {\r
- /* we just filled up the buffer, so we need to mark it as filled. */\r
- ret = blioSetIsOutputFull( blio, true );\r
- if( ret )\r
- return ret;\r
- /* of course, in the meantime, we may have emptied the buffer, so\r
- so check for that, too, to avoid a race condition. */\r
- if( PaUtil_GetRingBufferWriteAvailable( &blio->outputRingBuffer ) ) {\r
- blioSetIsOutputFull( blio, false );\r
- if( ret )\r
- return ret;\r
- }\r
- }\r
-#endif\r
- }\r
-\r
- /* Report either paNoError or paOutputUnderflowed. */\r
- /* may also want to report other errors, but this is non-standard. */\r
- ret = blio->statusFlags & paOutputUnderflow;\r
-\r
- /* report underflow only once: */\r
- if( ret ) {\r
- OSAtomicAnd32( (uint32_t)(~paOutputUnderflow), &blio->statusFlags );\r
- ret = paOutputUnderflowed;\r
- }\r
-\r
- return ret;\r
-}\r
-\r
-/*\r
- *\r
- */\r
-void waitUntilBlioWriteBufferIsFlushed( PaMacBlio *blio )\r
-{\r
- if( blio->outputRingBuffer.buffer ) {\r
- long avail = PaUtil_GetRingBufferWriteAvailable( &blio->outputRingBuffer );\r
- while( avail != blio->outputRingBuffer.bufferSize ) {\r
- if( avail == 0 )\r
- Pa_Sleep( PA_MAC_BLIO_BUSY_WAIT_SLEEP_INTERVAL );\r
- avail = PaUtil_GetRingBufferWriteAvailable( &blio->outputRingBuffer );\r
- }\r
- }\r
-}\r
-\r
-\r
-signed long GetStreamReadAvailable( PaStream* stream )\r
-{\r
- PaMacBlio *blio = & ((PaMacCoreStream*)stream) -> blio;\r
- VVDBUG(("GetStreamReadAvailable()\n"));\r
-\r
- return PaUtil_GetRingBufferReadAvailable( &blio->inputRingBuffer )\r
- / ( blio->inputSampleSizeActual * blio->inChan );\r
-}\r
-\r
-\r
-signed long GetStreamWriteAvailable( PaStream* stream )\r
-{\r
- PaMacBlio *blio = & ((PaMacCoreStream*)stream) -> blio;\r
- VVDBUG(("GetStreamWriteAvailable()\n"));\r
-\r
- return PaUtil_GetRingBufferWriteAvailable( &blio->outputRingBuffer )\r
- / ( blio->outputSampleSizeActual * blio->outChan );\r
-}\r
-\r
+/*
+ * Implementation of the PortAudio API for Apple AUHAL
+ *
+ * PortAudio Portable Real-Time Audio Library
+ * Latest Version at: http://www.portaudio.com
+ *
+ * Written by Bjorn Roche of XO Audio LLC, from PA skeleton code.
+ * Portions copied from code by Dominic Mazzoni (who wrote a HAL implementation)
+ *
+ * Dominic's code was based on code by Phil Burk, Darren Gibbs,
+ * Gord Peters, Stephane Letz, and Greg Pfiel.
+ *
+ * The following people also deserve acknowledgements:
+ *
+ * Olivier Tristan for feedback and testing
+ * Glenn Zelniker and Z-Systems engineering for sponsoring the Blocking I/O
+ * interface.
+ *
+ *
+ * Based on the Open Source API proposed by Ross Bencina
+ * Copyright (c) 1999-2002 Ross Bencina, Phil Burk
+ *
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * The text above constitutes the entire PortAudio license; however,
+ * the PortAudio community also makes the following non-binding requests:
+ *
+ * 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. It is also
+ * requested that these non-binding requests be included along with the
+ * license above.
+ */
+
+/**
+ @file
+ @ingroup hostapi_src
+
+ This file contains the implementation
+ required for blocking I/O. It is separated from pa_mac_core.c simply to ease
+ development.
+*/
+
+#include "pa_mac_core_blocking.h"
+#include "pa_mac_core_internal.h"
+#include <assert.h>
+#ifdef MOSX_USE_NON_ATOMIC_FLAG_BITS
+# define OSAtomicOr32( a, b ) ( (*(b)) |= (a) )
+# define OSAtomicAnd32( a, b ) ( (*(b)) &= (a) )
+#else
+# include <libkern/OSAtomic.h>
+#endif
+
+/*
+ * This function determines the size of a particular sample format.
+ * if the format is not recognized, this returns zero.
+ */
+static size_t computeSampleSizeFromFormat( PaSampleFormat format )
+{
+ switch( format & (~paNonInterleaved) ) {
+ case paFloat32: return 4;
+ case paInt32: return 4;
+ case paInt24: return 3;
+ case paInt16: return 2;
+ case paInt8: case paUInt8: return 1;
+ default: return 0;
+ }
+}
+/*
+ * Same as computeSampleSizeFromFormat, except that if
+ * the size is not a power of two, it returns the next power of two up
+ */
+static size_t computeSampleSizeFromFormatPow2( PaSampleFormat format )
+{
+ switch( format & (~paNonInterleaved) ) {
+ case paFloat32: return 4;
+ case paInt32: return 4;
+ case paInt24: return 4;
+ case paInt16: return 2;
+ case paInt8: case paUInt8: return 1;
+ default: return 0;
+ }
+}
+
+
+
+/*
+ * Functions for initializing, resetting, and destroying BLIO structures.
+ *
+ */
+
+/* This should be called with the relevant info when initializing a stream for
+ callback. */
+PaError initializeBlioRingBuffers(
+ PaMacBlio *blio,
+ PaSampleFormat inputSampleFormat,
+ PaSampleFormat outputSampleFormat,
+ size_t framesPerBuffer,
+ long ringBufferSize,
+ int inChan,
+ int outChan )
+{
+ void *data;
+ int result;
+ OSStatus err;
+
+ /* zeroify things */
+ bzero( blio, sizeof( PaMacBlio ) );
+ /* this is redundant, but the buffers are used to check
+ if the bufffers have been initialized, so we do it explicitly. */
+ blio->inputRingBuffer.buffer = NULL;
+ blio->outputRingBuffer.buffer = NULL;
+
+ /* initialize simple data */
+ blio->ringBufferFrames = ringBufferSize;
+ blio->inputSampleFormat = inputSampleFormat;
+ blio->inputSampleSizeActual = computeSampleSizeFromFormat(inputSampleFormat);
+ blio->inputSampleSizePow2 = computeSampleSizeFromFormatPow2(inputSampleFormat);
+ blio->outputSampleFormat = outputSampleFormat;
+ blio->outputSampleSizeActual = computeSampleSizeFromFormat(outputSampleFormat);
+ blio->outputSampleSizePow2 = computeSampleSizeFromFormatPow2(outputSampleFormat);
+
+ blio->framesPerBuffer = framesPerBuffer;
+ blio->inChan = inChan;
+ blio->outChan = outChan;
+ blio->statusFlags = 0;
+ blio->errors = paNoError;
+#ifdef PA_MAC_BLIO_MUTEX
+ blio->isInputEmpty = false;
+ blio->isOutputFull = false;
+#endif
+
+ /* setup ring buffers */
+#ifdef PA_MAC_BLIO_MUTEX
+ result = PaMacCore_SetUnixError( pthread_mutex_init(&(blio->inputMutex),NULL), 0 );
+ if( result )
+ goto error;
+ result = UNIX_ERR( pthread_cond_init( &(blio->inputCond), NULL ) );
+ if( result )
+ goto error;
+ result = UNIX_ERR( pthread_mutex_init(&(blio->outputMutex),NULL) );
+ if( result )
+ goto error;
+ result = UNIX_ERR( pthread_cond_init( &(blio->outputCond), NULL ) );
+#endif
+ if( inChan ) {
+ data = calloc( ringBufferSize, blio->inputSampleSizePow2*inChan );
+ if( !data )
+ {
+ result = paInsufficientMemory;
+ goto error;
+ }
+
+ err = PaUtil_InitializeRingBuffer(
+ &blio->inputRingBuffer,
+ 1, ringBufferSize*blio->inputSampleSizePow2*inChan,
+ data );
+ assert( !err );
+ }
+ if( outChan ) {
+ data = calloc( ringBufferSize, blio->outputSampleSizePow2*outChan );
+ if( !data )
+ {
+ result = paInsufficientMemory;
+ goto error;
+ }
+
+ err = PaUtil_InitializeRingBuffer(
+ &blio->outputRingBuffer,
+ 1, ringBufferSize*blio->outputSampleSizePow2*outChan,
+ data );
+ assert( !err );
+ }
+
+ result = resetBlioRingBuffers( blio );
+ if( result )
+ goto error;
+
+ return 0;
+
+ error:
+ destroyBlioRingBuffers( blio );
+ return result;
+}
+
+#ifdef PA_MAC_BLIO_MUTEX
+PaError blioSetIsInputEmpty( PaMacBlio *blio, bool isEmpty )
+{
+ PaError result = paNoError;
+ if( isEmpty == blio->isInputEmpty )
+ goto done;
+
+ /* we need to update the value. Here's what we do:
+ * - Lock the mutex, so noone else can write.
+ * - update the value.
+ * - unlock.
+ * - broadcast to all listeners.
+ */
+ result = UNIX_ERR( pthread_mutex_lock( &blio->inputMutex ) );
+ if( result )
+ goto done;
+ blio->isInputEmpty = isEmpty;
+ result = UNIX_ERR( pthread_mutex_unlock( &blio->inputMutex ) );
+ if( result )
+ goto done;
+ result = UNIX_ERR( pthread_cond_broadcast( &blio->inputCond ) );
+ if( result )
+ goto done;
+
+ done:
+ return result;
+}
+PaError blioSetIsOutputFull( PaMacBlio *blio, bool isFull )
+{
+ PaError result = paNoError;
+ if( isFull == blio->isOutputFull )
+ goto done;
+
+ /* we need to update the value. Here's what we do:
+ * - Lock the mutex, so noone else can write.
+ * - update the value.
+ * - unlock.
+ * - broadcast to all listeners.
+ */
+ result = UNIX_ERR( pthread_mutex_lock( &blio->outputMutex ) );
+ if( result )
+ goto done;
+ blio->isOutputFull = isFull;
+ result = UNIX_ERR( pthread_mutex_unlock( &blio->outputMutex ) );
+ if( result )
+ goto done;
+ result = UNIX_ERR( pthread_cond_broadcast( &blio->outputCond ) );
+ if( result )
+ goto done;
+
+ done:
+ return result;
+}
+#endif
+
+/* This should be called after stopping or aborting the stream, so that on next
+ start, the buffers will be ready. */
+PaError resetBlioRingBuffers( PaMacBlio *blio )
+{
+#ifdef PA_MAC__BLIO_MUTEX
+ int result;
+#endif
+ blio->statusFlags = 0;
+ if( blio->outputRingBuffer.buffer ) {
+ PaUtil_FlushRingBuffer( &blio->outputRingBuffer );
+ bzero( blio->outputRingBuffer.buffer,
+ blio->outputRingBuffer.bufferSize );
+ /* Advance buffer */
+ PaUtil_AdvanceRingBufferWriteIndex( &blio->outputRingBuffer, blio->ringBufferFrames*blio->outputSampleSizeActual*blio->outChan );
+ //PaUtil_AdvanceRingBufferWriteIndex( &blio->outputRingBuffer, blio->outputRingBuffer.bufferSize );
+
+ /* Update isOutputFull. */
+#ifdef PA_MAC__BLIO_MUTEX
+ result = blioSetIsOutputFull( blio, toAdvance == blio->outputRingBuffer.bufferSize );
+ if( result )
+ goto error;
+#endif
+/*
+ printf( "------%d\n" , blio->framesPerBuffer );
+ printf( "------%d\n" , blio->outChan );
+ printf( "------%d\n" , blio->outputSampleSize );
+ printf( "------%d\n" , blio->framesPerBuffer*blio->outChan*blio->outputSampleSize );
+*/
+ }
+ if( blio->inputRingBuffer.buffer ) {
+ PaUtil_FlushRingBuffer( &blio->inputRingBuffer );
+ bzero( blio->inputRingBuffer.buffer,
+ blio->inputRingBuffer.bufferSize );
+ /* Update isInputEmpty. */
+#ifdef PA_MAC__BLIO_MUTEX
+ result = blioSetIsInputEmpty( blio, true );
+ if( result )
+ goto error;
+#endif
+ }
+ return paNoError;
+#ifdef PA_MAC__BLIO_MUTEX
+ error:
+ return result;
+#endif
+}
+
+/*This should be called when you are done with the blio. It can safely be called
+ multiple times if there are no exceptions. */
+PaError destroyBlioRingBuffers( PaMacBlio *blio )
+{
+ PaError result = paNoError;
+ if( blio->inputRingBuffer.buffer ) {
+ free( blio->inputRingBuffer.buffer );
+#ifdef PA_MAC__BLIO_MUTEX
+ result = UNIX_ERR( pthread_mutex_destroy( & blio->inputMutex ) );
+ if( result ) return result;
+ result = UNIX_ERR( pthread_cond_destroy( & blio->inputCond ) );
+ if( result ) return result;
+#endif
+ }
+ blio->inputRingBuffer.buffer = NULL;
+ if( blio->outputRingBuffer.buffer ) {
+ free( blio->outputRingBuffer.buffer );
+#ifdef PA_MAC__BLIO_MUTEX
+ result = UNIX_ERR( pthread_mutex_destroy( & blio->outputMutex ) );
+ if( result ) return result;
+ result = UNIX_ERR( pthread_cond_destroy( & blio->outputCond ) );
+ if( result ) return result;
+#endif
+ }
+ blio->outputRingBuffer.buffer = NULL;
+
+ return result;
+}
+
+/*
+ * this is the BlioCallback function. It expects to recieve a PaMacBlio Object
+ * pointer as userData.
+ *
+ */
+int BlioCallback( const void *input, void *output, unsigned long frameCount,
+ const PaStreamCallbackTimeInfo* timeInfo,
+ PaStreamCallbackFlags statusFlags,
+ void *userData )
+{
+ PaMacBlio *blio = (PaMacBlio*)userData;
+ long avail;
+ long toRead;
+ long toWrite;
+ long read;
+ long written;
+
+ /* set flags returned by OS: */
+ OSAtomicOr32( statusFlags, &blio->statusFlags ) ;
+
+ /* --- Handle Input Buffer --- */
+ if( blio->inChan ) {
+ avail = PaUtil_GetRingBufferWriteAvailable( &blio->inputRingBuffer );
+
+ /* check for underflow */
+ if( avail < frameCount * blio->inputSampleSizeActual * blio->inChan )
+ {
+ OSAtomicOr32( paInputOverflow, &blio->statusFlags );
+ }
+ toRead = MIN( avail, frameCount * blio->inputSampleSizeActual * blio->inChan );
+
+ /* copy the data */
+ /*printf( "reading %d\n", toRead );*/
+ read = PaUtil_WriteRingBuffer( &blio->inputRingBuffer, input, toRead );
+ assert( toRead == read );
+#ifdef PA_MAC__BLIO_MUTEX
+ /* Priority inversion. See notes below. */
+ blioSetIsInputEmpty( blio, false );
+#endif
+ }
+
+
+ /* --- Handle Output Buffer --- */
+ if( blio->outChan ) {
+ avail = PaUtil_GetRingBufferReadAvailable( &blio->outputRingBuffer );
+
+ /* check for underflow */
+ if( avail < frameCount * blio->outputSampleSizeActual * blio->outChan )
+ OSAtomicOr32( paOutputUnderflow, &blio->statusFlags );
+
+ toWrite = MIN( avail, frameCount * blio->outputSampleSizeActual * blio->outChan );
+
+ if( toWrite != frameCount * blio->outputSampleSizeActual * blio->outChan )
+ bzero( ((char *)output)+toWrite,
+ frameCount * blio->outputSampleSizeActual * blio->outChan - toWrite );
+ /* copy the data */
+ /*printf( "writing %d\n", toWrite );*/
+ written = PaUtil_ReadRingBuffer( &blio->outputRingBuffer, output, toWrite );
+ assert( toWrite == written );
+#ifdef PA_MAC__BLIO_MUTEX
+ /* We have a priority inversion here. However, we will only have to
+ wait if this was true and is now false, which means we've got
+ some room in the buffer.
+ Hopefully problems will be minimized. */
+ blioSetIsOutputFull( blio, false );
+#endif
+ }
+
+ return paContinue;
+}
+
+PaError ReadStream( PaStream* stream,
+ void *buffer,
+ unsigned long frames )
+{
+ PaMacBlio *blio = & ((PaMacCoreStream*)stream) -> blio;
+ char *cbuf = (char *) buffer;
+ PaError ret = paNoError;
+ VVDBUG(("ReadStream()\n"));
+
+ while( frames > 0 ) {
+ long avail;
+ long toRead;
+ do {
+ avail = PaUtil_GetRingBufferReadAvailable( &blio->inputRingBuffer );
+/*
+ printf( "Read Buffer is %%%g full: %ld of %ld.\n",
+ 100 * (float)avail / (float) blio->inputRingBuffer.bufferSize,
+ avail, blio->inputRingBuffer.bufferSize );
+*/
+ if( avail == 0 ) {
+#ifdef PA_MAC_BLIO_MUTEX
+ /**block when empty*/
+ ret = UNIX_ERR( pthread_mutex_lock( &blio->inputMutex ) );
+ if( ret )
+ return ret;
+ while( blio->isInputEmpty ) {
+ ret = UNIX_ERR( pthread_cond_wait( &blio->inputCond, &blio->inputMutex ) );
+ if( ret )
+ return ret;
+ }
+ ret = UNIX_ERR( pthread_mutex_unlock( &blio->inputMutex ) );
+ if( ret )
+ return ret;
+#else
+ Pa_Sleep( PA_MAC_BLIO_BUSY_WAIT_SLEEP_INTERVAL );
+#endif
+ }
+ } while( avail == 0 );
+ toRead = MIN( avail, frames * blio->inputSampleSizeActual * blio->inChan );
+ toRead -= toRead % blio->inputSampleSizeActual * blio->inChan ;
+ PaUtil_ReadRingBuffer( &blio->inputRingBuffer, (void *)cbuf, toRead );
+ cbuf += toRead;
+ frames -= toRead / ( blio->inputSampleSizeActual * blio->inChan );
+
+ if( toRead == avail ) {
+#ifdef PA_MAC_BLIO_MUTEX
+ /* we just emptied the buffer, so we need to mark it as empty. */
+ ret = blioSetIsInputEmpty( blio, true );
+ if( ret )
+ return ret;
+ /* of course, in the meantime, the callback may have put some sats
+ in, so
+ so check for that, too, to avoid a race condition. */
+ if( PaUtil_GetRingBufferReadAvailable( &blio->inputRingBuffer ) ) {
+ blioSetIsInputEmpty( blio, false );
+ if( ret )
+ return ret;
+ }
+#endif
+ }
+ }
+
+ /* Report either paNoError or paInputOverflowed. */
+ /* may also want to report other errors, but this is non-standard. */
+ ret = blio->statusFlags & paInputOverflow;
+
+ /* report underflow only once: */
+ if( ret ) {
+ OSAtomicAnd32( (uint32_t)(~paInputOverflow), &blio->statusFlags );
+ ret = paInputOverflowed;
+ }
+
+ return ret;
+}
+
+
+PaError WriteStream( PaStream* stream,
+ const void *buffer,
+ unsigned long frames )
+{
+ PaMacBlio *blio = & ((PaMacCoreStream*)stream) -> blio;
+ char *cbuf = (char *) buffer;
+ PaError ret = paNoError;
+ VVDBUG(("WriteStream()\n"));
+
+ while( frames > 0 ) {
+ long avail = 0;
+ long toWrite;
+
+ do {
+ avail = PaUtil_GetRingBufferWriteAvailable( &blio->outputRingBuffer );
+/*
+ printf( "Write Buffer is %%%g full: %ld of %ld.\n",
+ 100 - 100 * (float)avail / (float) blio->outputRingBuffer.bufferSize,
+ avail, blio->outputRingBuffer.bufferSize );
+*/
+ if( avail == 0 ) {
+#ifdef PA_MAC_BLIO_MUTEX
+ /*block while full*/
+ ret = UNIX_ERR( pthread_mutex_lock( &blio->outputMutex ) );
+ if( ret )
+ return ret;
+ while( blio->isOutputFull ) {
+ ret = UNIX_ERR( pthread_cond_wait( &blio->outputCond, &blio->outputMutex ) );
+ if( ret )
+ return ret;
+ }
+ ret = UNIX_ERR( pthread_mutex_unlock( &blio->outputMutex ) );
+ if( ret )
+ return ret;
+#else
+ Pa_Sleep( PA_MAC_BLIO_BUSY_WAIT_SLEEP_INTERVAL );
+#endif
+ }
+ } while( avail == 0 );
+
+ toWrite = MIN( avail, frames * blio->outputSampleSizeActual * blio->outChan );
+ toWrite -= toWrite % blio->outputSampleSizeActual * blio->outChan ;
+ PaUtil_WriteRingBuffer( &blio->outputRingBuffer, (void *)cbuf, toWrite );
+ cbuf += toWrite;
+ frames -= toWrite / ( blio->outputSampleSizeActual * blio->outChan );
+
+#ifdef PA_MAC_BLIO_MUTEX
+ if( toWrite == avail ) {
+ /* we just filled up the buffer, so we need to mark it as filled. */
+ ret = blioSetIsOutputFull( blio, true );
+ if( ret )
+ return ret;
+ /* of course, in the meantime, we may have emptied the buffer, so
+ so check for that, too, to avoid a race condition. */
+ if( PaUtil_GetRingBufferWriteAvailable( &blio->outputRingBuffer ) ) {
+ blioSetIsOutputFull( blio, false );
+ if( ret )
+ return ret;
+ }
+ }
+#endif
+ }
+
+ /* Report either paNoError or paOutputUnderflowed. */
+ /* may also want to report other errors, but this is non-standard. */
+ ret = blio->statusFlags & paOutputUnderflow;
+
+ /* report underflow only once: */
+ if( ret ) {
+ OSAtomicAnd32( (uint32_t)(~paOutputUnderflow), &blio->statusFlags );
+ ret = paOutputUnderflowed;
+ }
+
+ return ret;
+}
+
+/*
+ *
+ */
+void waitUntilBlioWriteBufferIsFlushed( PaMacBlio *blio )
+{
+ if( blio->outputRingBuffer.buffer ) {
+ long avail = PaUtil_GetRingBufferWriteAvailable( &blio->outputRingBuffer );
+ while( avail != blio->outputRingBuffer.bufferSize ) {
+ if( avail == 0 )
+ Pa_Sleep( PA_MAC_BLIO_BUSY_WAIT_SLEEP_INTERVAL );
+ avail = PaUtil_GetRingBufferWriteAvailable( &blio->outputRingBuffer );
+ }
+ }
+}
+
+
+signed long GetStreamReadAvailable( PaStream* stream )
+{
+ PaMacBlio *blio = & ((PaMacCoreStream*)stream) -> blio;
+ VVDBUG(("GetStreamReadAvailable()\n"));
+
+ return PaUtil_GetRingBufferReadAvailable( &blio->inputRingBuffer )
+ / ( blio->inputSampleSizeActual * blio->inChan );
+}
+
+
+signed long GetStreamWriteAvailable( PaStream* stream )
+{
+ PaMacBlio *blio = & ((PaMacCoreStream*)stream) -> blio;
+ VVDBUG(("GetStreamWriteAvailable()\n"));
+
+ return PaUtil_GetRingBufferWriteAvailable( &blio->outputRingBuffer )
+ / ( blio->outputSampleSizeActual * blio->outChan );
+}
+
-/*\r
- * Internal blocking interfaces for PortAudio Apple AUHAL implementation\r
- *\r
- * PortAudio Portable Real-Time Audio Library\r
- * Latest Version at: http://www.portaudio.com\r
- *\r
- * Written by Bjorn Roche of XO Audio LLC, from PA skeleton code.\r
- * Portions copied from code by Dominic Mazzoni (who wrote a HAL implementation)\r
- *\r
- * Dominic's code was based on code by Phil Burk, Darren Gibbs,\r
- * Gord Peters, Stephane Letz, and Greg Pfiel.\r
- *\r
- * The following people also deserve acknowledgements:\r
- *\r
- * Olivier Tristan for feedback and testing\r
- * Glenn Zelniker and Z-Systems engineering for sponsoring the Blocking I/O\r
- * interface.\r
- * \r
- *\r
- * Based on the Open Source API proposed by Ross Bencina\r
- * Copyright (c) 1999-2002 Ross Bencina, Phil Burk\r
- *\r
- * Permission is hereby granted, free of charge, to any person obtaining\r
- * a copy of this software and associated documentation files\r
- * (the "Software"), to deal in the Software without restriction,\r
- * including without limitation the rights to use, copy, modify, merge,\r
- * publish, distribute, sublicense, and/or sell copies of the Software,\r
- * and to permit persons to whom the Software is furnished to do so,\r
- * subject to the following conditions:\r
- *\r
- * The above copyright notice and this permission notice shall be\r
- * included in all copies or substantial portions of the Software.\r
- *\r
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\r
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\r
- * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\r
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\r
- * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
- */\r
-\r
-/*\r
- * The text above constitutes the entire PortAudio license; however, \r
- * the PortAudio community also makes the following non-binding requests:\r
- *\r
- * Any person wishing to distribute modifications to the Software is\r
- * requested to send the modifications to the original developer so that\r
- * they can be incorporated into the canonical version. It is also \r
- * requested that these non-binding requests be included along with the \r
- * license above.\r
- */\r
-\r
-/**\r
- @file\r
- @ingroup hostapi_src\r
-*/\r
-\r
-#ifndef PA_MAC_CORE_BLOCKING_H_\r
-#define PA_MAC_CORE_BLOCKING_H_\r
-\r
-#include "pa_ringbuffer.h"\r
-#include "portaudio.h"\r
-#include "pa_mac_core_utilities.h"\r
-\r
-/*\r
- * Number of miliseconds to busy wait whil waiting for data in blocking calls.\r
- */\r
-#define PA_MAC_BLIO_BUSY_WAIT_SLEEP_INTERVAL (5)\r
-/*\r
- * Define exactly one of these blocking methods\r
- * PA_MAC_BLIO_MUTEX is not actively maintained.\r
- */\r
-#define PA_MAC_BLIO_BUSY_WAIT\r
-/*\r
-#define PA_MAC_BLIO_MUTEX\r
-*/\r
-\r
-typedef struct {\r
- PaUtilRingBuffer inputRingBuffer;\r
- PaUtilRingBuffer outputRingBuffer;\r
- size_t ringBufferFrames;\r
- PaSampleFormat inputSampleFormat;\r
- size_t inputSampleSizeActual;\r
- size_t inputSampleSizePow2;\r
- PaSampleFormat outputSampleFormat;\r
- size_t outputSampleSizeActual;\r
- size_t outputSampleSizePow2;\r
-\r
- size_t framesPerBuffer;\r
-\r
- int inChan;\r
- int outChan;\r
-\r
- //PaStreamCallbackFlags statusFlags;\r
- uint32_t statusFlags;\r
- PaError errors;\r
-\r
- /* Here we handle blocking, using condition variables. */\r
-#ifdef PA_MAC_BLIO_MUTEX\r
- volatile bool isInputEmpty;\r
- pthread_mutex_t inputMutex;\r
- pthread_cond_t inputCond;\r
-\r
- volatile bool isOutputFull;\r
- pthread_mutex_t outputMutex;\r
- pthread_cond_t outputCond;\r
-#endif\r
-}\r
-PaMacBlio;\r
-\r
-/*\r
- * These functions operate on condition and related variables.\r
- */\r
-\r
-PaError initializeBlioRingBuffers(\r
- PaMacBlio *blio,\r
- PaSampleFormat inputSampleFormat,\r
- PaSampleFormat outputSampleFormat,\r
- size_t framesPerBuffer,\r
- long ringBufferSize,\r
- int inChan,\r
- int outChan );\r
-PaError destroyBlioRingBuffers( PaMacBlio *blio );\r
-PaError resetBlioRingBuffers( PaMacBlio *blio );\r
-\r
-int BlioCallback(\r
- const void *input, void *output,\r
- unsigned long frameCount,\r
- const PaStreamCallbackTimeInfo* timeInfo,\r
- PaStreamCallbackFlags statusFlags,\r
- void *userData );\r
-\r
-void waitUntilBlioWriteBufferIsFlushed( PaMacBlio *blio );\r
-\r
-#endif /*PA_MAC_CORE_BLOCKING_H_*/\r
+/*
+ * Internal blocking interfaces for PortAudio Apple AUHAL implementation
+ *
+ * PortAudio Portable Real-Time Audio Library
+ * Latest Version at: http://www.portaudio.com
+ *
+ * Written by Bjorn Roche of XO Audio LLC, from PA skeleton code.
+ * Portions copied from code by Dominic Mazzoni (who wrote a HAL implementation)
+ *
+ * Dominic's code was based on code by Phil Burk, Darren Gibbs,
+ * Gord Peters, Stephane Letz, and Greg Pfiel.
+ *
+ * The following people also deserve acknowledgements:
+ *
+ * Olivier Tristan for feedback and testing
+ * Glenn Zelniker and Z-Systems engineering for sponsoring the Blocking I/O
+ * interface.
+ *
+ *
+ * Based on the Open Source API proposed by Ross Bencina
+ * Copyright (c) 1999-2002 Ross Bencina, Phil Burk
+ *
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * The text above constitutes the entire PortAudio license; however,
+ * the PortAudio community also makes the following non-binding requests:
+ *
+ * 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. It is also
+ * requested that these non-binding requests be included along with the
+ * license above.
+ */
+
+/**
+ @file
+ @ingroup hostapi_src
+*/
+
+#ifndef PA_MAC_CORE_BLOCKING_H_
+#define PA_MAC_CORE_BLOCKING_H_
+
+#include "pa_ringbuffer.h"
+#include "portaudio.h"
+#include "pa_mac_core_utilities.h"
+
+/*
+ * Number of miliseconds to busy wait whil waiting for data in blocking calls.
+ */
+#define PA_MAC_BLIO_BUSY_WAIT_SLEEP_INTERVAL (5)
+/*
+ * Define exactly one of these blocking methods
+ * PA_MAC_BLIO_MUTEX is not actively maintained.
+ */
+#define PA_MAC_BLIO_BUSY_WAIT
+/*
+#define PA_MAC_BLIO_MUTEX
+*/
+
+typedef struct {
+ PaUtilRingBuffer inputRingBuffer;
+ PaUtilRingBuffer outputRingBuffer;
+ size_t ringBufferFrames;
+ PaSampleFormat inputSampleFormat;
+ size_t inputSampleSizeActual;
+ size_t inputSampleSizePow2;
+ PaSampleFormat outputSampleFormat;
+ size_t outputSampleSizeActual;
+ size_t outputSampleSizePow2;
+
+ size_t framesPerBuffer;
+
+ int inChan;
+ int outChan;
+
+ //PaStreamCallbackFlags statusFlags;
+ uint32_t statusFlags;
+ PaError errors;
+
+ /* Here we handle blocking, using condition variables. */
+#ifdef PA_MAC_BLIO_MUTEX
+ volatile bool isInputEmpty;
+ pthread_mutex_t inputMutex;
+ pthread_cond_t inputCond;
+
+ volatile bool isOutputFull;
+ pthread_mutex_t outputMutex;
+ pthread_cond_t outputCond;
+#endif
+}
+PaMacBlio;
+
+/*
+ * These functions operate on condition and related variables.
+ */
+
+PaError initializeBlioRingBuffers(
+ PaMacBlio *blio,
+ PaSampleFormat inputSampleFormat,
+ PaSampleFormat outputSampleFormat,
+ size_t framesPerBuffer,
+ long ringBufferSize,
+ int inChan,
+ int outChan );
+PaError destroyBlioRingBuffers( PaMacBlio *blio );
+PaError resetBlioRingBuffers( PaMacBlio *blio );
+
+int BlioCallback(
+ const void *input, void *output,
+ unsigned long frameCount,
+ const PaStreamCallbackTimeInfo* timeInfo,
+ PaStreamCallbackFlags statusFlags,
+ void *userData );
+
+void waitUntilBlioWriteBufferIsFlushed( PaMacBlio *blio );
+
+#endif /*PA_MAC_CORE_BLOCKING_H_*/
-//\r
-// AudioSessionTypes.h -- Copyright Microsoft Corporation, All Rights Reserved.\r
-//\r
-// Description: Type definitions used by the audio session manager RPC/COM interfaces\r
-//\r
-#pragma once\r
-\r
-#ifndef __AUDIOSESSIONTYPES__\r
-#define __AUDIOSESSIONTYPES__\r
-\r
-#if defined(__midl)\r
-#define MIDL_SIZE_IS(x) [size_is(x)]\r
-#define MIDL_STRING [string]\r
-#define MIDL_ANYSIZE_ARRAY\r
-#else // !defined(__midl)\r
-#define MIDL_SIZE_IS(x)\r
-#define MIDL_STRING\r
-#define MIDL_ANYSIZE_ARRAY ANYSIZE_ARRAY\r
-#endif // defined(__midl)\r
-\r
-//-------------------------------------------------------------------------\r
-// Description: AudioClient share mode\r
-// \r
-// AUDCLNT_SHAREMODE_SHARED - The device will be opened in shared mode and use the \r
-// WAS format.\r
-// AUDCLNT_SHAREMODE_EXCLUSIVE - The device will be opened in exclusive mode and use the \r
-// application specified format.\r
-//\r
-typedef enum _AUDCLNT_SHAREMODE\r
-{ \r
- AUDCLNT_SHAREMODE_SHARED, \r
- AUDCLNT_SHAREMODE_EXCLUSIVE \r
-} AUDCLNT_SHAREMODE;\r
-\r
-//-------------------------------------------------------------------------\r
-// Description: AudioClient stream flags\r
-// \r
-// Can be a combination of AUDCLNT_STREAMFLAGS and AUDCLNT_SYSFXFLAGS:\r
-// \r
-// AUDCLNT_STREAMFLAGS (this group of flags uses the high word, w/exception of high-bit which is reserved, 0x7FFF0000):\r
-// \r
-// AUDCLNT_STREAMFLAGS_CROSSPROCESS - Audio policy control for this stream will be shared with \r
-// with other process sessions that use the same audio session \r
-// GUID.\r
-// AUDCLNT_STREAMFLAGS_LOOPBACK - Initializes a renderer endpoint for a loopback audio application. \r
-// In this mode, a capture stream will be opened on the specified \r
-// renderer endpoint. Shared mode and a renderer endpoint is required.\r
-// Otherwise the IAudioClient::Initialize call will fail. If the \r
-// initialize is successful, a capture stream will be available \r
-// from the IAudioClient object.\r
-//\r
-// AUDCLNT_STREAMFLAGS_EVENTCALLBACK - An exclusive mode client will supply an event handle that will be\r
-// signaled when an IRP completes (or a waveRT buffer completes) telling\r
-// it to fill the next buffer\r
-//\r
-// AUDCLNT_STREAMFLAGS_NOPERSIST - Session state will not be persisted\r
-//\r
-// AUDCLNT_SYSFXFLAGS (these flags use low word 0x0000FFFF):\r
-//\r
-// none defined currently\r
-//\r
-#define AUDCLNT_STREAMFLAGS_CROSSPROCESS 0x00010000\r
-#define AUDCLNT_STREAMFLAGS_LOOPBACK 0x00020000\r
-#define AUDCLNT_STREAMFLAGS_EVENTCALLBACK 0x00040000\r
-#define AUDCLNT_STREAMFLAGS_NOPERSIST 0x00080000\r
-\r
-//-------------------------------------------------------------------------\r
-// Description: Device share mode - sharing mode for the audio device.\r
-//\r
-// DeviceShared - The device can be shared with other processes.\r
-// DeviceExclusive - The device will only be used by this process.\r
-//\r
-typedef enum _DeviceShareMode\r
-{ \r
- DeviceShared, \r
- DeviceExclusive \r
-} DeviceShareMode;\r
-\r
-\r
-//-------------------------------------------------------------------------\r
-// Description: AudioSession State.\r
-//\r
-// AudioSessionStateInactive - The session has no active audio streams.\r
-// AudioSessionStateActive - The session has active audio streams.\r
-// AudioSessionStateExpired - The session is dormant.\r
-typedef enum _AudioSessionState\r
-{\r
- AudioSessionStateInactive = 0,\r
- AudioSessionStateActive = 1,\r
- AudioSessionStateExpired = 2\r
-} AudioSessionState;\r
-\r
-#endif\r
-\r
+//
+// AudioSessionTypes.h -- Copyright Microsoft Corporation, All Rights Reserved.
+//
+// Description: Type definitions used by the audio session manager RPC/COM interfaces
+//
+#pragma once
+
+#ifndef __AUDIOSESSIONTYPES__
+#define __AUDIOSESSIONTYPES__
+
+#if defined(__midl)
+#define MIDL_SIZE_IS(x) [size_is(x)]
+#define MIDL_STRING [string]
+#define MIDL_ANYSIZE_ARRAY
+#else // !defined(__midl)
+#define MIDL_SIZE_IS(x)
+#define MIDL_STRING
+#define MIDL_ANYSIZE_ARRAY ANYSIZE_ARRAY
+#endif // defined(__midl)
+
+//-------------------------------------------------------------------------
+// Description: AudioClient share mode
+//
+// AUDCLNT_SHAREMODE_SHARED - The device will be opened in shared mode and use the
+// WAS format.
+// AUDCLNT_SHAREMODE_EXCLUSIVE - The device will be opened in exclusive mode and use the
+// application specified format.
+//
+typedef enum _AUDCLNT_SHAREMODE
+{
+ AUDCLNT_SHAREMODE_SHARED,
+ AUDCLNT_SHAREMODE_EXCLUSIVE
+} AUDCLNT_SHAREMODE;
+
+//-------------------------------------------------------------------------
+// Description: AudioClient stream flags
+//
+// Can be a combination of AUDCLNT_STREAMFLAGS and AUDCLNT_SYSFXFLAGS:
+//
+// AUDCLNT_STREAMFLAGS (this group of flags uses the high word, w/exception of high-bit which is reserved, 0x7FFF0000):
+//
+// AUDCLNT_STREAMFLAGS_CROSSPROCESS - Audio policy control for this stream will be shared with
+// with other process sessions that use the same audio session
+// GUID.
+// AUDCLNT_STREAMFLAGS_LOOPBACK - Initializes a renderer endpoint for a loopback audio application.
+// In this mode, a capture stream will be opened on the specified
+// renderer endpoint. Shared mode and a renderer endpoint is required.
+// Otherwise the IAudioClient::Initialize call will fail. If the
+// initialize is successful, a capture stream will be available
+// from the IAudioClient object.
+//
+// AUDCLNT_STREAMFLAGS_EVENTCALLBACK - An exclusive mode client will supply an event handle that will be
+// signaled when an IRP completes (or a waveRT buffer completes) telling
+// it to fill the next buffer
+//
+// AUDCLNT_STREAMFLAGS_NOPERSIST - Session state will not be persisted
+//
+// AUDCLNT_SYSFXFLAGS (these flags use low word 0x0000FFFF):
+//
+// none defined currently
+//
+#define AUDCLNT_STREAMFLAGS_CROSSPROCESS 0x00010000
+#define AUDCLNT_STREAMFLAGS_LOOPBACK 0x00020000
+#define AUDCLNT_STREAMFLAGS_EVENTCALLBACK 0x00040000
+#define AUDCLNT_STREAMFLAGS_NOPERSIST 0x00080000
+
+//-------------------------------------------------------------------------
+// Description: Device share mode - sharing mode for the audio device.
+//
+// DeviceShared - The device can be shared with other processes.
+// DeviceExclusive - The device will only be used by this process.
+//
+typedef enum _DeviceShareMode
+{
+ DeviceShared,
+ DeviceExclusive
+} DeviceShareMode;
+
+
+//-------------------------------------------------------------------------
+// Description: AudioSession State.
+//
+// AudioSessionStateInactive - The session has no active audio streams.
+// AudioSessionStateActive - The session has active audio streams.
+// AudioSessionStateExpired - The session is dormant.
+typedef enum _AudioSessionState
+{
+ AudioSessionStateInactive = 0,
+ AudioSessionStateActive = 1,
+ AudioSessionStateExpired = 2
+} AudioSessionState;
+
+#endif
+
-\r
-/*++\r
-\r
-Copyright (c) Microsoft Corporation. All rights reserved.\r
-\r
-Module Name:\r
-\r
- devpkey.h\r
-\r
-Abstract:\r
-\r
- Defines property keys for the Plug and Play Device Property API.\r
-\r
-Author:\r
-\r
- Jim Cavalaris (jamesca) 10-14-2003\r
-\r
-Environment:\r
-\r
- User-mode only.\r
-\r
-Revision History:\r
-\r
- 14-October-2003 jamesca\r
-\r
- Creation and initial implementation.\r
-\r
- 20-June-2006 dougb\r
-\r
- Copied Jim's version replaced "DEFINE_DEVPROPKEY(DEVPKEY_" with "DEFINE_PROPERTYKEY(PKEY_"\r
- \r
---*/\r
-\r
-//#include <devpropdef.h>\r
-\r
-//\r
-// _NAME\r
-//\r
-\r
-DEFINE_PROPERTYKEY(PKEY_NAME, 0xb725f130, 0x47ef, 0x101a, 0xa5, 0xf1, 0x02, 0x60, 0x8c, 0x9e, 0xeb, 0xac, 10); // DEVPROP_TYPE_STRING\r
-\r
-//\r
-// Device properties\r
-// These PKEYs correspond to the old setupapi SPDRP_XXX properties\r
-//\r
-DEFINE_PROPERTYKEY(PKEY_Device_DeviceDesc, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 2); // DEVPROP_TYPE_STRING\r
-DEFINE_PROPERTYKEY(PKEY_Device_HardwareIds, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 3); // DEVPROP_TYPE_STRING_LIST\r
-DEFINE_PROPERTYKEY(PKEY_Device_CompatibleIds, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 4); // DEVPROP_TYPE_STRING_LIST\r
-DEFINE_PROPERTYKEY(PKEY_Device_Service, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 6); // DEVPROP_TYPE_STRING\r
-DEFINE_PROPERTYKEY(PKEY_Device_Class, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 9); // DEVPROP_TYPE_STRING\r
-DEFINE_PROPERTYKEY(PKEY_Device_ClassGuid, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 10); // DEVPROP_TYPE_GUID\r
-DEFINE_PROPERTYKEY(PKEY_Device_Driver, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 11); // DEVPROP_TYPE_STRING\r
-DEFINE_PROPERTYKEY(PKEY_Device_ConfigFlags, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 12); // DEVPROP_TYPE_UINT32\r
-DEFINE_PROPERTYKEY(PKEY_Device_Manufacturer, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 13); // DEVPROP_TYPE_STRING\r
-DEFINE_PROPERTYKEY(PKEY_Device_FriendlyName, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 14); // DEVPROP_TYPE_STRING\r
-DEFINE_PROPERTYKEY(PKEY_Device_LocationInfo, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 15); // DEVPROP_TYPE_STRING\r
-DEFINE_PROPERTYKEY(PKEY_Device_PDOName, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 16); // DEVPROP_TYPE_STRING\r
-DEFINE_PROPERTYKEY(PKEY_Device_Capabilities, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 17); // DEVPROP_TYPE_UNINT32\r
-DEFINE_PROPERTYKEY(PKEY_Device_UINumber, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 18); // DEVPROP_TYPE_STRING\r
-DEFINE_PROPERTYKEY(PKEY_Device_UpperFilters, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 19); // DEVPROP_TYPE_STRING_LIST\r
-DEFINE_PROPERTYKEY(PKEY_Device_LowerFilters, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 20); // DEVPROP_TYPE_STRING_LIST\r
-DEFINE_PROPERTYKEY(PKEY_Device_BusTypeGuid, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 21); // DEVPROP_TYPE_GUID\r
-DEFINE_PROPERTYKEY(PKEY_Device_LegacyBusType, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 22); // DEVPROP_TYPE_UINT32\r
-DEFINE_PROPERTYKEY(PKEY_Device_BusNumber, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 23); // DEVPROP_TYPE_UINT32\r
-DEFINE_PROPERTYKEY(PKEY_Device_EnumeratorName, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 24); // DEVPROP_TYPE_STRING\r
-DEFINE_PROPERTYKEY(PKEY_Device_Security, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 25); // DEVPROP_TYPE_SECURITY_DESCRIPTOR\r
-DEFINE_PROPERTYKEY(PKEY_Device_SecuritySDS, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 26); // DEVPROP_TYPE_SECURITY_DESCRIPTOR_STRING\r
-DEFINE_PROPERTYKEY(PKEY_Device_DevType, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 27); // DEVPROP_TYPE_UINT32\r
-DEFINE_PROPERTYKEY(PKEY_Device_Exclusive, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 28); // DEVPROP_TYPE_UINT32\r
-DEFINE_PROPERTYKEY(PKEY_Device_Characteristics, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 29); // DEVPROP_TYPE_UINT32\r
-DEFINE_PROPERTYKEY(PKEY_Device_Address, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 30); // DEVPROP_TYPE_UINT32\r
-DEFINE_PROPERTYKEY(PKEY_Device_UINumberDescFormat, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 31); // DEVPROP_TYPE_STRING\r
-DEFINE_PROPERTYKEY(PKEY_Device_PowerData, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 32); // DEVPROP_TYPE_BINARY\r
-DEFINE_PROPERTYKEY(PKEY_Device_RemovalPolicy, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 33); // DEVPROP_TYPE_UINT32\r
-DEFINE_PROPERTYKEY(PKEY_Device_RemovalPolicyDefault, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 34); // DEVPROP_TYPE_UINT32\r
-DEFINE_PROPERTYKEY(PKEY_Device_RemovalPolicyOverride, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 35); // DEVPROP_TYPE_UINT32\r
-DEFINE_PROPERTYKEY(PKEY_Device_InstallState, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 36); // DEVPROP_TYPE_UINT32\r
-DEFINE_PROPERTYKEY(PKEY_Device_LocationPaths, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 37); // DEVPROP_TYPE_STRING_LIST\r
-\r
-//\r
-// Device properties\r
-// These PKEYs correspond to a device's status and problem code\r
-//\r
-DEFINE_PROPERTYKEY(PKEY_Device_DevNodeStatus, 0x4340a6c5, 0x93fa, 0x4706, 0x97, 0x2c, 0x7b, 0x64, 0x80, 0x08, 0xa5, 0xa7, 2); // DEVPROP_TYPE_UINT32\r
-DEFINE_PROPERTYKEY(PKEY_Device_ProblemCode, 0x4340a6c5, 0x93fa, 0x4706, 0x97, 0x2c, 0x7b, 0x64, 0x80, 0x08, 0xa5, 0xa7, 3); // DEVPROP_TYPE_UINT32\r
-\r
-//\r
-// Device properties\r
-// These PKEYs correspond to device relations\r
-//\r
-DEFINE_PROPERTYKEY(PKEY_Device_EjectionRelations, 0x4340a6c5, 0x93fa, 0x4706, 0x97, 0x2c, 0x7b, 0x64, 0x80, 0x08, 0xa5, 0xa7, 4); // DEVPROP_TYPE_STRING_LIST\r
-DEFINE_PROPERTYKEY(PKEY_Device_RemovalRelations, 0x4340a6c5, 0x93fa, 0x4706, 0x97, 0x2c, 0x7b, 0x64, 0x80, 0x08, 0xa5, 0xa7, 5); // DEVPROP_TYPE_STRING_LIST\r
-DEFINE_PROPERTYKEY(PKEY_Device_PowerRelations, 0x4340a6c5, 0x93fa, 0x4706, 0x97, 0x2c, 0x7b, 0x64, 0x80, 0x08, 0xa5, 0xa7, 6); // DEVPROP_TYPE_STRING_LIST\r
-DEFINE_PROPERTYKEY(PKEY_Device_BusRelations, 0x4340a6c5, 0x93fa, 0x4706, 0x97, 0x2c, 0x7b, 0x64, 0x80, 0x08, 0xa5, 0xa7, 7); // DEVPROP_TYPE_STRING_LIST\r
-DEFINE_PROPERTYKEY(PKEY_Device_Parent, 0x4340a6c5, 0x93fa, 0x4706, 0x97, 0x2c, 0x7b, 0x64, 0x80, 0x08, 0xa5, 0xa7, 8); // DEVPROP_TYPE_STRING\r
-DEFINE_PROPERTYKEY(PKEY_Device_Children, 0x4340a6c5, 0x93fa, 0x4706, 0x97, 0x2c, 0x7b, 0x64, 0x80, 0x08, 0xa5, 0xa7, 9); // DEVPROP_TYPE_STRING_LIST\r
-DEFINE_PROPERTYKEY(PKEY_Device_Siblings, 0x4340a6c5, 0x93fa, 0x4706, 0x97, 0x2c, 0x7b, 0x64, 0x80, 0x08, 0xa5, 0xa7, 10); // DEVPROP_TYPE_STRING_LIST\r
-\r
-//\r
-// Other Device properties\r
-//\r
-DEFINE_PROPERTYKEY(PKEY_Device_Reported, 0x80497100, 0x8c73, 0x48b9, 0xaa, 0xd9, 0xce, 0x38, 0x7e, 0x19, 0xc5, 0x6e, 2); // DEVPROP_TYPE_BOOLEAN\r
-DEFINE_PROPERTYKEY(PKEY_Device_Legacy, 0x80497100, 0x8c73, 0x48b9, 0xaa, 0xd9, 0xce, 0x38, 0x7e, 0x19, 0xc5, 0x6e, 3); // DEVPROP_TYPE_BOOLEAN\r
-DEFINE_PROPERTYKEY(PKEY_Device_InstanceId, 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 256); // DEVPROP_TYPE_STRING\r
-DEFINE_PROPERTYKEY(PKEY_Numa_Proximity_Domain, 0x540b947e, 0x8b40, 0x45bc, 0xa8, 0xa2, 0x6a, 0x0b, 0x89, 0x4c, 0xbd, 0xa2, 1); // DEVPROP_TYPE_UINT32\r
-\r
-//\r
-// Device driver properties\r
-//\r
-DEFINE_PROPERTYKEY(PKEY_Device_DriverDate, 0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 2); // DEVPROP_TYPE_FILETIME\r
-DEFINE_PROPERTYKEY(PKEY_Device_DriverVersion, 0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 3); // DEVPROP_TYPE_STRING\r
-DEFINE_PROPERTYKEY(PKEY_Device_DriverDesc, 0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 4); // DEVPROP_TYPE_STRING\r
-DEFINE_PROPERTYKEY(PKEY_Device_DriverInfPath, 0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 5); // DEVPROP_TYPE_STRING\r
-DEFINE_PROPERTYKEY(PKEY_Device_DriverInfSection, 0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 6); // DEVPROP_TYPE_STRING\r
-DEFINE_PROPERTYKEY(PKEY_Device_DriverInfSectionExt, 0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 7); // DEVPROP_TYPE_STRING\r
-DEFINE_PROPERTYKEY(PKEY_Device_MatchingDeviceId, 0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 8); // DEVPROP_TYPE_STRING\r
-DEFINE_PROPERTYKEY(PKEY_Device_DriverProvider, 0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 9); // DEVPROP_TYPE_STRING\r
-DEFINE_PROPERTYKEY(PKEY_Device_DriverPropPageProvider, 0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 10); // DEVPROP_TYPE_STRING\r
-DEFINE_PROPERTYKEY(PKEY_Device_DriverCoInstallers, 0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 11); // DEVPROP_TYPE_STRING_LIST\r
-DEFINE_PROPERTYKEY(PKEY_Device_ResourcePickerTags, 0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 12); // DEVPROP_TYPE_STRING\r
-DEFINE_PROPERTYKEY(PKEY_Device_ResourcePickerExceptions, 0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 13); // DEVPROP_TYPE_STRING\r
-DEFINE_PROPERTYKEY(PKEY_Device_DriverRank, 0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 14); // DEVPROP_TYPE_UINT32\r
-DEFINE_PROPERTYKEY(PKEY_Device_DriverLogoLevel, 0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 15); // DEVPROP_TYPE_UINT32\r
-DEFINE_PROPERTYKEY(PKEY_Device_NoConnectSound, 0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 17); // DEVPROP_TYPE_BOOLEAN\r
-DEFINE_PROPERTYKEY(PKEY_Device_GenericDriverInstalled, 0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 18); // DEVPROP_TYPE_BOOLEAN\r
-\r
-\r
-//\r
-// Device properties that were set by the driver package that was installed\r
-// on the device.\r
-//\r
-DEFINE_PROPERTYKEY(PKEY_DrvPkg_Model, 0xcf73bb51, 0x3abf, 0x44a2, 0x85, 0xe0, 0x9a, 0x3d, 0xc7, 0xa1, 0x21, 0x32, 2); // DEVPROP_TYPE_STRING\r
-DEFINE_PROPERTYKEY(PKEY_DrvPkg_VendorWebSite, 0xcf73bb51, 0x3abf, 0x44a2, 0x85, 0xe0, 0x9a, 0x3d, 0xc7, 0xa1, 0x21, 0x32, 3); // DEVPROP_TYPE_STRING\r
-DEFINE_PROPERTYKEY(PKEY_DrvPkg_DetailedDescription, 0xcf73bb51, 0x3abf, 0x44a2, 0x85, 0xe0, 0x9a, 0x3d, 0xc7, 0xa1, 0x21, 0x32, 4); // DEVPROP_TYPE_STRING\r
-DEFINE_PROPERTYKEY(PKEY_DrvPkg_DocumentationLink, 0xcf73bb51, 0x3abf, 0x44a2, 0x85, 0xe0, 0x9a, 0x3d, 0xc7, 0xa1, 0x21, 0x32, 5); // DEVPROP_TYPE_STRING\r
-DEFINE_PROPERTYKEY(PKEY_DrvPkg_Icon, 0xcf73bb51, 0x3abf, 0x44a2, 0x85, 0xe0, 0x9a, 0x3d, 0xc7, 0xa1, 0x21, 0x32, 6); // DEVPROP_TYPE_STRING_LIST\r
-DEFINE_PROPERTYKEY(PKEY_DrvPkg_BrandingIcon, 0xcf73bb51, 0x3abf, 0x44a2, 0x85, 0xe0, 0x9a, 0x3d, 0xc7, 0xa1, 0x21, 0x32, 7); // DEVPROP_TYPE_STRING_LIST\r
-\r
-//\r
-// Device setup class properties\r
-// These PKEYs correspond to the old setupapi SPCRP_XXX properties\r
-//\r
-DEFINE_PROPERTYKEY(PKEY_DeviceClass_UpperFilters, 0x4321918b, 0xf69e, 0x470d, 0xa5, 0xde, 0x4d, 0x88, 0xc7, 0x5a, 0xd2, 0x4b, 19); // DEVPROP_TYPE_STRING_LIST\r
-DEFINE_PROPERTYKEY(PKEY_DeviceClass_LowerFilters, 0x4321918b, 0xf69e, 0x470d, 0xa5, 0xde, 0x4d, 0x88, 0xc7, 0x5a, 0xd2, 0x4b, 20); // DEVPROP_TYPE_STRING_LIST\r
-DEFINE_PROPERTYKEY(PKEY_DeviceClass_Security, 0x4321918b, 0xf69e, 0x470d, 0xa5, 0xde, 0x4d, 0x88, 0xc7, 0x5a, 0xd2, 0x4b, 25); // DEVPROP_TYPE_SECURITY_DESCRIPTOR\r
-DEFINE_PROPERTYKEY(PKEY_DeviceClass_SecuritySDS, 0x4321918b, 0xf69e, 0x470d, 0xa5, 0xde, 0x4d, 0x88, 0xc7, 0x5a, 0xd2, 0x4b, 26); // DEVPROP_TYPE_SECURITY_DESCRIPTOR_STRING\r
-DEFINE_PROPERTYKEY(PKEY_DeviceClass_DevType, 0x4321918b, 0xf69e, 0x470d, 0xa5, 0xde, 0x4d, 0x88, 0xc7, 0x5a, 0xd2, 0x4b, 27); // DEVPROP_TYPE_UINT32\r
-DEFINE_PROPERTYKEY(PKEY_DeviceClass_Exclusive, 0x4321918b, 0xf69e, 0x470d, 0xa5, 0xde, 0x4d, 0x88, 0xc7, 0x5a, 0xd2, 0x4b, 28); // DEVPROP_TYPE_UINT32\r
-DEFINE_PROPERTYKEY(PKEY_DeviceClass_Characteristics, 0x4321918b, 0xf69e, 0x470d, 0xa5, 0xde, 0x4d, 0x88, 0xc7, 0x5a, 0xd2, 0x4b, 29); // DEVPROP_TYPE_UINT32\r
-\r
-//\r
-// Device setup class properties\r
-// These PKEYs correspond to registry values under the device class GUID key\r
-//\r
-DEFINE_PROPERTYKEY(PKEY_DeviceClass_Name, 0x259abffc, 0x50a7, 0x47ce, 0xaf, 0x8, 0x68, 0xc9, 0xa7, 0xd7, 0x33, 0x66, 2); // DEVPROP_TYPE_STRING\r
-DEFINE_PROPERTYKEY(PKEY_DeviceClass_ClassName, 0x259abffc, 0x50a7, 0x47ce, 0xaf, 0x8, 0x68, 0xc9, 0xa7, 0xd7, 0x33, 0x66, 3); // DEVPROP_TYPE_STRING\r
-DEFINE_PROPERTYKEY(PKEY_DeviceClass_Icon, 0x259abffc, 0x50a7, 0x47ce, 0xaf, 0x8, 0x68, 0xc9, 0xa7, 0xd7, 0x33, 0x66, 4); // DEVPROP_TYPE_STRING\r
-DEFINE_PROPERTYKEY(PKEY_DeviceClass_ClassInstaller, 0x259abffc, 0x50a7, 0x47ce, 0xaf, 0x8, 0x68, 0xc9, 0xa7, 0xd7, 0x33, 0x66, 5); // DEVPROP_TYPE_STRING\r
-DEFINE_PROPERTYKEY(PKEY_DeviceClass_PropPageProvider, 0x259abffc, 0x50a7, 0x47ce, 0xaf, 0x8, 0x68, 0xc9, 0xa7, 0xd7, 0x33, 0x66, 6); // DEVPROP_TYPE_STRING\r
-DEFINE_PROPERTYKEY(PKEY_DeviceClass_NoInstallClass, 0x259abffc, 0x50a7, 0x47ce, 0xaf, 0x8, 0x68, 0xc9, 0xa7, 0xd7, 0x33, 0x66, 7); // DEVPROP_TYPE_BOOLEAN\r
-DEFINE_PROPERTYKEY(PKEY_DeviceClass_NoDisplayClass, 0x259abffc, 0x50a7, 0x47ce, 0xaf, 0x8, 0x68, 0xc9, 0xa7, 0xd7, 0x33, 0x66, 8); // DEVPROP_TYPE_BOOLEAN\r
-DEFINE_PROPERTYKEY(PKEY_DeviceClass_SilentInstall, 0x259abffc, 0x50a7, 0x47ce, 0xaf, 0x8, 0x68, 0xc9, 0xa7, 0xd7, 0x33, 0x66, 9); // DEVPROP_TYPE_BOOLEAN\r
-DEFINE_PROPERTYKEY(PKEY_DeviceClass_NoUseClass, 0x259abffc, 0x50a7, 0x47ce, 0xaf, 0x8, 0x68, 0xc9, 0xa7, 0xd7, 0x33, 0x66, 10); // DEVPROP_TYPE_BOOLEAN\r
-DEFINE_PROPERTYKEY(PKEY_DeviceClass_DefaultService, 0x259abffc, 0x50a7, 0x47ce, 0xaf, 0x8, 0x68, 0xc9, 0xa7, 0xd7, 0x33, 0x66, 11); // DEVPROP_TYPE_STRING\r
-DEFINE_PROPERTYKEY(PKEY_DeviceClass_IconPath, 0x259abffc, 0x50a7, 0x47ce, 0xaf, 0x8, 0x68, 0xc9, 0xa7, 0xd7, 0x33, 0x66, 12); // DEVPROP_TYPE_STRING_LIST\r
-\r
-//\r
-// Other Device setup class properties\r
-//\r
-DEFINE_PROPERTYKEY(PKEY_DeviceClass_ClassCoInstallers, 0x713d1703, 0xa2e2, 0x49f5, 0x92, 0x14, 0x56, 0x47, 0x2e, 0xf3, 0xda, 0x5c, 2); // DEVPROP_TYPE_STRING_LIST\r
-\r
-//\r
-// Device interface properties\r
-//\r
-DEFINE_PROPERTYKEY(PKEY_DeviceInterface_FriendlyName, 0x026e516e, 0xb814, 0x414b, 0x83, 0xcd, 0x85, 0x6d, 0x6f, 0xef, 0x48, 0x22, 2); // DEVPROP_TYPE_STRING\r
-DEFINE_PROPERTYKEY(PKEY_DeviceInterface_Enabled, 0x026e516e, 0xb814, 0x414b, 0x83, 0xcd, 0x85, 0x6d, 0x6f, 0xef, 0x48, 0x22, 3); // DEVPROP_TYPE_BOOLEAN\r
-DEFINE_PROPERTYKEY(PKEY_DeviceInterface_ClassGuid, 0x026e516e, 0xb814, 0x414b, 0x83, 0xcd, 0x85, 0x6d, 0x6f, 0xef, 0x48, 0x22, 4); // DEVPROP_TYPE_GUID\r
-\r
-//\r
-// Device interface class properties\r
-//\r
-DEFINE_PROPERTYKEY(PKEY_DeviceInterfaceClass_DefaultInterface, 0x14c83a99, 0x0b3f, 0x44b7, 0xbe, 0x4c, 0xa1, 0x78, 0xd3, 0x99, 0x05, 0x64, 2); // DEVPROP_TYPE_STRING\r
-\r
-\r
-\r
-\r
+
+/*++
+
+Copyright (c) Microsoft Corporation. All rights reserved.
+
+Module Name:
+
+ devpkey.h
+
+Abstract:
+
+ Defines property keys for the Plug and Play Device Property API.
+
+Author:
+
+ Jim Cavalaris (jamesca) 10-14-2003
+
+Environment:
+
+ User-mode only.
+
+Revision History:
+
+ 14-October-2003 jamesca
+
+ Creation and initial implementation.
+
+ 20-June-2006 dougb
+
+ Copied Jim's version replaced "DEFINE_DEVPROPKEY(DEVPKEY_" with "DEFINE_PROPERTYKEY(PKEY_"
+
+--*/
+
+//#include <devpropdef.h>
+
+//
+// _NAME
+//
+
+DEFINE_PROPERTYKEY(PKEY_NAME, 0xb725f130, 0x47ef, 0x101a, 0xa5, 0xf1, 0x02, 0x60, 0x8c, 0x9e, 0xeb, 0xac, 10); // DEVPROP_TYPE_STRING
+
+//
+// Device properties
+// These PKEYs correspond to the old setupapi SPDRP_XXX properties
+//
+DEFINE_PROPERTYKEY(PKEY_Device_DeviceDesc, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 2); // DEVPROP_TYPE_STRING
+DEFINE_PROPERTYKEY(PKEY_Device_HardwareIds, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 3); // DEVPROP_TYPE_STRING_LIST
+DEFINE_PROPERTYKEY(PKEY_Device_CompatibleIds, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 4); // DEVPROP_TYPE_STRING_LIST
+DEFINE_PROPERTYKEY(PKEY_Device_Service, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 6); // DEVPROP_TYPE_STRING
+DEFINE_PROPERTYKEY(PKEY_Device_Class, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 9); // DEVPROP_TYPE_STRING
+DEFINE_PROPERTYKEY(PKEY_Device_ClassGuid, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 10); // DEVPROP_TYPE_GUID
+DEFINE_PROPERTYKEY(PKEY_Device_Driver, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 11); // DEVPROP_TYPE_STRING
+DEFINE_PROPERTYKEY(PKEY_Device_ConfigFlags, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 12); // DEVPROP_TYPE_UINT32
+DEFINE_PROPERTYKEY(PKEY_Device_Manufacturer, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 13); // DEVPROP_TYPE_STRING
+DEFINE_PROPERTYKEY(PKEY_Device_FriendlyName, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 14); // DEVPROP_TYPE_STRING
+DEFINE_PROPERTYKEY(PKEY_Device_LocationInfo, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 15); // DEVPROP_TYPE_STRING
+DEFINE_PROPERTYKEY(PKEY_Device_PDOName, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 16); // DEVPROP_TYPE_STRING
+DEFINE_PROPERTYKEY(PKEY_Device_Capabilities, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 17); // DEVPROP_TYPE_UNINT32
+DEFINE_PROPERTYKEY(PKEY_Device_UINumber, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 18); // DEVPROP_TYPE_STRING
+DEFINE_PROPERTYKEY(PKEY_Device_UpperFilters, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 19); // DEVPROP_TYPE_STRING_LIST
+DEFINE_PROPERTYKEY(PKEY_Device_LowerFilters, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 20); // DEVPROP_TYPE_STRING_LIST
+DEFINE_PROPERTYKEY(PKEY_Device_BusTypeGuid, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 21); // DEVPROP_TYPE_GUID
+DEFINE_PROPERTYKEY(PKEY_Device_LegacyBusType, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 22); // DEVPROP_TYPE_UINT32
+DEFINE_PROPERTYKEY(PKEY_Device_BusNumber, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 23); // DEVPROP_TYPE_UINT32
+DEFINE_PROPERTYKEY(PKEY_Device_EnumeratorName, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 24); // DEVPROP_TYPE_STRING
+DEFINE_PROPERTYKEY(PKEY_Device_Security, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 25); // DEVPROP_TYPE_SECURITY_DESCRIPTOR
+DEFINE_PROPERTYKEY(PKEY_Device_SecuritySDS, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 26); // DEVPROP_TYPE_SECURITY_DESCRIPTOR_STRING
+DEFINE_PROPERTYKEY(PKEY_Device_DevType, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 27); // DEVPROP_TYPE_UINT32
+DEFINE_PROPERTYKEY(PKEY_Device_Exclusive, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 28); // DEVPROP_TYPE_UINT32
+DEFINE_PROPERTYKEY(PKEY_Device_Characteristics, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 29); // DEVPROP_TYPE_UINT32
+DEFINE_PROPERTYKEY(PKEY_Device_Address, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 30); // DEVPROP_TYPE_UINT32
+DEFINE_PROPERTYKEY(PKEY_Device_UINumberDescFormat, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 31); // DEVPROP_TYPE_STRING
+DEFINE_PROPERTYKEY(PKEY_Device_PowerData, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 32); // DEVPROP_TYPE_BINARY
+DEFINE_PROPERTYKEY(PKEY_Device_RemovalPolicy, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 33); // DEVPROP_TYPE_UINT32
+DEFINE_PROPERTYKEY(PKEY_Device_RemovalPolicyDefault, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 34); // DEVPROP_TYPE_UINT32
+DEFINE_PROPERTYKEY(PKEY_Device_RemovalPolicyOverride, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 35); // DEVPROP_TYPE_UINT32
+DEFINE_PROPERTYKEY(PKEY_Device_InstallState, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 36); // DEVPROP_TYPE_UINT32
+DEFINE_PROPERTYKEY(PKEY_Device_LocationPaths, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 37); // DEVPROP_TYPE_STRING_LIST
+
+//
+// Device properties
+// These PKEYs correspond to a device's status and problem code
+//
+DEFINE_PROPERTYKEY(PKEY_Device_DevNodeStatus, 0x4340a6c5, 0x93fa, 0x4706, 0x97, 0x2c, 0x7b, 0x64, 0x80, 0x08, 0xa5, 0xa7, 2); // DEVPROP_TYPE_UINT32
+DEFINE_PROPERTYKEY(PKEY_Device_ProblemCode, 0x4340a6c5, 0x93fa, 0x4706, 0x97, 0x2c, 0x7b, 0x64, 0x80, 0x08, 0xa5, 0xa7, 3); // DEVPROP_TYPE_UINT32
+
+//
+// Device properties
+// These PKEYs correspond to device relations
+//
+DEFINE_PROPERTYKEY(PKEY_Device_EjectionRelations, 0x4340a6c5, 0x93fa, 0x4706, 0x97, 0x2c, 0x7b, 0x64, 0x80, 0x08, 0xa5, 0xa7, 4); // DEVPROP_TYPE_STRING_LIST
+DEFINE_PROPERTYKEY(PKEY_Device_RemovalRelations, 0x4340a6c5, 0x93fa, 0x4706, 0x97, 0x2c, 0x7b, 0x64, 0x80, 0x08, 0xa5, 0xa7, 5); // DEVPROP_TYPE_STRING_LIST
+DEFINE_PROPERTYKEY(PKEY_Device_PowerRelations, 0x4340a6c5, 0x93fa, 0x4706, 0x97, 0x2c, 0x7b, 0x64, 0x80, 0x08, 0xa5, 0xa7, 6); // DEVPROP_TYPE_STRING_LIST
+DEFINE_PROPERTYKEY(PKEY_Device_BusRelations, 0x4340a6c5, 0x93fa, 0x4706, 0x97, 0x2c, 0x7b, 0x64, 0x80, 0x08, 0xa5, 0xa7, 7); // DEVPROP_TYPE_STRING_LIST
+DEFINE_PROPERTYKEY(PKEY_Device_Parent, 0x4340a6c5, 0x93fa, 0x4706, 0x97, 0x2c, 0x7b, 0x64, 0x80, 0x08, 0xa5, 0xa7, 8); // DEVPROP_TYPE_STRING
+DEFINE_PROPERTYKEY(PKEY_Device_Children, 0x4340a6c5, 0x93fa, 0x4706, 0x97, 0x2c, 0x7b, 0x64, 0x80, 0x08, 0xa5, 0xa7, 9); // DEVPROP_TYPE_STRING_LIST
+DEFINE_PROPERTYKEY(PKEY_Device_Siblings, 0x4340a6c5, 0x93fa, 0x4706, 0x97, 0x2c, 0x7b, 0x64, 0x80, 0x08, 0xa5, 0xa7, 10); // DEVPROP_TYPE_STRING_LIST
+
+//
+// Other Device properties
+//
+DEFINE_PROPERTYKEY(PKEY_Device_Reported, 0x80497100, 0x8c73, 0x48b9, 0xaa, 0xd9, 0xce, 0x38, 0x7e, 0x19, 0xc5, 0x6e, 2); // DEVPROP_TYPE_BOOLEAN
+DEFINE_PROPERTYKEY(PKEY_Device_Legacy, 0x80497100, 0x8c73, 0x48b9, 0xaa, 0xd9, 0xce, 0x38, 0x7e, 0x19, 0xc5, 0x6e, 3); // DEVPROP_TYPE_BOOLEAN
+DEFINE_PROPERTYKEY(PKEY_Device_InstanceId, 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 256); // DEVPROP_TYPE_STRING
+DEFINE_PROPERTYKEY(PKEY_Numa_Proximity_Domain, 0x540b947e, 0x8b40, 0x45bc, 0xa8, 0xa2, 0x6a, 0x0b, 0x89, 0x4c, 0xbd, 0xa2, 1); // DEVPROP_TYPE_UINT32
+
+//
+// Device driver properties
+//
+DEFINE_PROPERTYKEY(PKEY_Device_DriverDate, 0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 2); // DEVPROP_TYPE_FILETIME
+DEFINE_PROPERTYKEY(PKEY_Device_DriverVersion, 0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 3); // DEVPROP_TYPE_STRING
+DEFINE_PROPERTYKEY(PKEY_Device_DriverDesc, 0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 4); // DEVPROP_TYPE_STRING
+DEFINE_PROPERTYKEY(PKEY_Device_DriverInfPath, 0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 5); // DEVPROP_TYPE_STRING
+DEFINE_PROPERTYKEY(PKEY_Device_DriverInfSection, 0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 6); // DEVPROP_TYPE_STRING
+DEFINE_PROPERTYKEY(PKEY_Device_DriverInfSectionExt, 0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 7); // DEVPROP_TYPE_STRING
+DEFINE_PROPERTYKEY(PKEY_Device_MatchingDeviceId, 0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 8); // DEVPROP_TYPE_STRING
+DEFINE_PROPERTYKEY(PKEY_Device_DriverProvider, 0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 9); // DEVPROP_TYPE_STRING
+DEFINE_PROPERTYKEY(PKEY_Device_DriverPropPageProvider, 0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 10); // DEVPROP_TYPE_STRING
+DEFINE_PROPERTYKEY(PKEY_Device_DriverCoInstallers, 0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 11); // DEVPROP_TYPE_STRING_LIST
+DEFINE_PROPERTYKEY(PKEY_Device_ResourcePickerTags, 0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 12); // DEVPROP_TYPE_STRING
+DEFINE_PROPERTYKEY(PKEY_Device_ResourcePickerExceptions, 0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 13); // DEVPROP_TYPE_STRING
+DEFINE_PROPERTYKEY(PKEY_Device_DriverRank, 0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 14); // DEVPROP_TYPE_UINT32
+DEFINE_PROPERTYKEY(PKEY_Device_DriverLogoLevel, 0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 15); // DEVPROP_TYPE_UINT32
+DEFINE_PROPERTYKEY(PKEY_Device_NoConnectSound, 0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 17); // DEVPROP_TYPE_BOOLEAN
+DEFINE_PROPERTYKEY(PKEY_Device_GenericDriverInstalled, 0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 18); // DEVPROP_TYPE_BOOLEAN
+
+
+//
+// Device properties that were set by the driver package that was installed
+// on the device.
+//
+DEFINE_PROPERTYKEY(PKEY_DrvPkg_Model, 0xcf73bb51, 0x3abf, 0x44a2, 0x85, 0xe0, 0x9a, 0x3d, 0xc7, 0xa1, 0x21, 0x32, 2); // DEVPROP_TYPE_STRING
+DEFINE_PROPERTYKEY(PKEY_DrvPkg_VendorWebSite, 0xcf73bb51, 0x3abf, 0x44a2, 0x85, 0xe0, 0x9a, 0x3d, 0xc7, 0xa1, 0x21, 0x32, 3); // DEVPROP_TYPE_STRING
+DEFINE_PROPERTYKEY(PKEY_DrvPkg_DetailedDescription, 0xcf73bb51, 0x3abf, 0x44a2, 0x85, 0xe0, 0x9a, 0x3d, 0xc7, 0xa1, 0x21, 0x32, 4); // DEVPROP_TYPE_STRING
+DEFINE_PROPERTYKEY(PKEY_DrvPkg_DocumentationLink, 0xcf73bb51, 0x3abf, 0x44a2, 0x85, 0xe0, 0x9a, 0x3d, 0xc7, 0xa1, 0x21, 0x32, 5); // DEVPROP_TYPE_STRING
+DEFINE_PROPERTYKEY(PKEY_DrvPkg_Icon, 0xcf73bb51, 0x3abf, 0x44a2, 0x85, 0xe0, 0x9a, 0x3d, 0xc7, 0xa1, 0x21, 0x32, 6); // DEVPROP_TYPE_STRING_LIST
+DEFINE_PROPERTYKEY(PKEY_DrvPkg_BrandingIcon, 0xcf73bb51, 0x3abf, 0x44a2, 0x85, 0xe0, 0x9a, 0x3d, 0xc7, 0xa1, 0x21, 0x32, 7); // DEVPROP_TYPE_STRING_LIST
+
+//
+// Device setup class properties
+// These PKEYs correspond to the old setupapi SPCRP_XXX properties
+//
+DEFINE_PROPERTYKEY(PKEY_DeviceClass_UpperFilters, 0x4321918b, 0xf69e, 0x470d, 0xa5, 0xde, 0x4d, 0x88, 0xc7, 0x5a, 0xd2, 0x4b, 19); // DEVPROP_TYPE_STRING_LIST
+DEFINE_PROPERTYKEY(PKEY_DeviceClass_LowerFilters, 0x4321918b, 0xf69e, 0x470d, 0xa5, 0xde, 0x4d, 0x88, 0xc7, 0x5a, 0xd2, 0x4b, 20); // DEVPROP_TYPE_STRING_LIST
+DEFINE_PROPERTYKEY(PKEY_DeviceClass_Security, 0x4321918b, 0xf69e, 0x470d, 0xa5, 0xde, 0x4d, 0x88, 0xc7, 0x5a, 0xd2, 0x4b, 25); // DEVPROP_TYPE_SECURITY_DESCRIPTOR
+DEFINE_PROPERTYKEY(PKEY_DeviceClass_SecuritySDS, 0x4321918b, 0xf69e, 0x470d, 0xa5, 0xde, 0x4d, 0x88, 0xc7, 0x5a, 0xd2, 0x4b, 26); // DEVPROP_TYPE_SECURITY_DESCRIPTOR_STRING
+DEFINE_PROPERTYKEY(PKEY_DeviceClass_DevType, 0x4321918b, 0xf69e, 0x470d, 0xa5, 0xde, 0x4d, 0x88, 0xc7, 0x5a, 0xd2, 0x4b, 27); // DEVPROP_TYPE_UINT32
+DEFINE_PROPERTYKEY(PKEY_DeviceClass_Exclusive, 0x4321918b, 0xf69e, 0x470d, 0xa5, 0xde, 0x4d, 0x88, 0xc7, 0x5a, 0xd2, 0x4b, 28); // DEVPROP_TYPE_UINT32
+DEFINE_PROPERTYKEY(PKEY_DeviceClass_Characteristics, 0x4321918b, 0xf69e, 0x470d, 0xa5, 0xde, 0x4d, 0x88, 0xc7, 0x5a, 0xd2, 0x4b, 29); // DEVPROP_TYPE_UINT32
+
+//
+// Device setup class properties
+// These PKEYs correspond to registry values under the device class GUID key
+//
+DEFINE_PROPERTYKEY(PKEY_DeviceClass_Name, 0x259abffc, 0x50a7, 0x47ce, 0xaf, 0x8, 0x68, 0xc9, 0xa7, 0xd7, 0x33, 0x66, 2); // DEVPROP_TYPE_STRING
+DEFINE_PROPERTYKEY(PKEY_DeviceClass_ClassName, 0x259abffc, 0x50a7, 0x47ce, 0xaf, 0x8, 0x68, 0xc9, 0xa7, 0xd7, 0x33, 0x66, 3); // DEVPROP_TYPE_STRING
+DEFINE_PROPERTYKEY(PKEY_DeviceClass_Icon, 0x259abffc, 0x50a7, 0x47ce, 0xaf, 0x8, 0x68, 0xc9, 0xa7, 0xd7, 0x33, 0x66, 4); // DEVPROP_TYPE_STRING
+DEFINE_PROPERTYKEY(PKEY_DeviceClass_ClassInstaller, 0x259abffc, 0x50a7, 0x47ce, 0xaf, 0x8, 0x68, 0xc9, 0xa7, 0xd7, 0x33, 0x66, 5); // DEVPROP_TYPE_STRING
+DEFINE_PROPERTYKEY(PKEY_DeviceClass_PropPageProvider, 0x259abffc, 0x50a7, 0x47ce, 0xaf, 0x8, 0x68, 0xc9, 0xa7, 0xd7, 0x33, 0x66, 6); // DEVPROP_TYPE_STRING
+DEFINE_PROPERTYKEY(PKEY_DeviceClass_NoInstallClass, 0x259abffc, 0x50a7, 0x47ce, 0xaf, 0x8, 0x68, 0xc9, 0xa7, 0xd7, 0x33, 0x66, 7); // DEVPROP_TYPE_BOOLEAN
+DEFINE_PROPERTYKEY(PKEY_DeviceClass_NoDisplayClass, 0x259abffc, 0x50a7, 0x47ce, 0xaf, 0x8, 0x68, 0xc9, 0xa7, 0xd7, 0x33, 0x66, 8); // DEVPROP_TYPE_BOOLEAN
+DEFINE_PROPERTYKEY(PKEY_DeviceClass_SilentInstall, 0x259abffc, 0x50a7, 0x47ce, 0xaf, 0x8, 0x68, 0xc9, 0xa7, 0xd7, 0x33, 0x66, 9); // DEVPROP_TYPE_BOOLEAN
+DEFINE_PROPERTYKEY(PKEY_DeviceClass_NoUseClass, 0x259abffc, 0x50a7, 0x47ce, 0xaf, 0x8, 0x68, 0xc9, 0xa7, 0xd7, 0x33, 0x66, 10); // DEVPROP_TYPE_BOOLEAN
+DEFINE_PROPERTYKEY(PKEY_DeviceClass_DefaultService, 0x259abffc, 0x50a7, 0x47ce, 0xaf, 0x8, 0x68, 0xc9, 0xa7, 0xd7, 0x33, 0x66, 11); // DEVPROP_TYPE_STRING
+DEFINE_PROPERTYKEY(PKEY_DeviceClass_IconPath, 0x259abffc, 0x50a7, 0x47ce, 0xaf, 0x8, 0x68, 0xc9, 0xa7, 0xd7, 0x33, 0x66, 12); // DEVPROP_TYPE_STRING_LIST
+
+//
+// Other Device setup class properties
+//
+DEFINE_PROPERTYKEY(PKEY_DeviceClass_ClassCoInstallers, 0x713d1703, 0xa2e2, 0x49f5, 0x92, 0x14, 0x56, 0x47, 0x2e, 0xf3, 0xda, 0x5c, 2); // DEVPROP_TYPE_STRING_LIST
+
+//
+// Device interface properties
+//
+DEFINE_PROPERTYKEY(PKEY_DeviceInterface_FriendlyName, 0x026e516e, 0xb814, 0x414b, 0x83, 0xcd, 0x85, 0x6d, 0x6f, 0xef, 0x48, 0x22, 2); // DEVPROP_TYPE_STRING
+DEFINE_PROPERTYKEY(PKEY_DeviceInterface_Enabled, 0x026e516e, 0xb814, 0x414b, 0x83, 0xcd, 0x85, 0x6d, 0x6f, 0xef, 0x48, 0x22, 3); // DEVPROP_TYPE_BOOLEAN
+DEFINE_PROPERTYKEY(PKEY_DeviceInterface_ClassGuid, 0x026e516e, 0xb814, 0x414b, 0x83, 0xcd, 0x85, 0x6d, 0x6f, 0xef, 0x48, 0x22, 4); // DEVPROP_TYPE_GUID
+
+//
+// Device interface class properties
+//
+DEFINE_PROPERTYKEY(PKEY_DeviceInterfaceClass_DefaultInterface, 0x14c83a99, 0x0b3f, 0x44b7, 0xbe, 0x4c, 0xa1, 0x78, 0xd3, 0x99, 0x05, 0x64, 2); // DEVPROP_TYPE_STRING
+
+
+
+
-\r
-\r
-/* this ALWAYS GENERATED file contains the definitions for the interfaces */\r
-\r
-\r
- /* File created by MIDL compiler version 7.00.0499 */\r
-/* Compiler settings for audioclient.idl:\r
- Oicf, W1, Zp8, env=Win32 (32b run)\r
- protocol : dce , ms_ext, c_ext, robust\r
- error checks: allocation ref bounds_check enum stub_data \r
- VC __declspec() decoration level: \r
- __declspec(uuid()), __declspec(selectany), __declspec(novtable)\r
- DECLSPEC_UUID(), MIDL_INTERFACE()\r
-*/\r
-//@@MIDL_FILE_HEADING( )\r
-\r
-#pragma warning( disable: 4049 ) /* more than 64k source lines */\r
-\r
-\r
-/* verify that the <rpcndr.h> version is high enough to compile this file*/\r
-#ifndef __REQUIRED_RPCNDR_H_VERSION__\r
-#define __REQUIRED_RPCNDR_H_VERSION__ 500\r
-#endif\r
-\r
-/* verify that the <rpcsal.h> version is high enough to compile this file*/\r
-#ifndef __REQUIRED_RPCSAL_H_VERSION__\r
-#define __REQUIRED_RPCSAL_H_VERSION__ 100\r
-#endif\r
-\r
-#include "rpc.h"\r
-#include "rpcndr.h"\r
-\r
-#ifndef __RPCNDR_H_VERSION__\r
-#error this stub requires an updated version of <rpcndr.h>\r
-#endif // __RPCNDR_H_VERSION__\r
-\r
-#ifndef COM_NO_WINDOWS_H\r
-#include "windows.h"\r
-#include "ole2.h"\r
-#endif /*COM_NO_WINDOWS_H*/\r
-\r
-#ifndef __audioclient_h__\r
-#define __audioclient_h__\r
-\r
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)\r
-#pragma once\r
-#endif\r
-\r
-/* Forward Declarations */ \r
-\r
-#ifndef __IAudioClient_FWD_DEFINED__\r
-#define __IAudioClient_FWD_DEFINED__\r
-typedef interface IAudioClient IAudioClient;\r
-#endif /* __IAudioClient_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __IAudioRenderClient_FWD_DEFINED__\r
-#define __IAudioRenderClient_FWD_DEFINED__\r
-typedef interface IAudioRenderClient IAudioRenderClient;\r
-#endif /* __IAudioRenderClient_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __IAudioCaptureClient_FWD_DEFINED__\r
-#define __IAudioCaptureClient_FWD_DEFINED__\r
-typedef interface IAudioCaptureClient IAudioCaptureClient;\r
-#endif /* __IAudioCaptureClient_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __IAudioClock_FWD_DEFINED__\r
-#define __IAudioClock_FWD_DEFINED__\r
-typedef interface IAudioClock IAudioClock;\r
-#endif /* __IAudioClock_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __ISimpleAudioVolume_FWD_DEFINED__\r
-#define __ISimpleAudioVolume_FWD_DEFINED__\r
-typedef interface ISimpleAudioVolume ISimpleAudioVolume;\r
-#endif /* __ISimpleAudioVolume_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __IAudioStreamVolume_FWD_DEFINED__\r
-#define __IAudioStreamVolume_FWD_DEFINED__\r
-typedef interface IAudioStreamVolume IAudioStreamVolume;\r
-#endif /* __IAudioStreamVolume_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __IChannelAudioVolume_FWD_DEFINED__\r
-#define __IChannelAudioVolume_FWD_DEFINED__\r
-typedef interface IChannelAudioVolume IChannelAudioVolume;\r
-#endif /* __IChannelAudioVolume_FWD_DEFINED__ */\r
-\r
-\r
-/* header files for imported files */\r
-#include "wtypes.h"\r
-#include "unknwn.h"\r
-#include "AudioSessionTypes.h"\r
-\r
-#ifdef __cplusplus\r
-extern "C"{\r
-#endif \r
-\r
-\r
-/* interface __MIDL_itf_audioclient_0000_0000 */\r
-/* [local] */ \r
-\r
-#if 0\r
-typedef /* [hidden][restricted] */ struct WAVEFORMATEX\r
- {\r
- WORD wFormatTag;\r
- WORD nChannels;\r
- DWORD nSamplesPerSec;\r
- DWORD nAvgBytesPerSec;\r
- WORD nBlockAlign;\r
- WORD wBitsPerSample;\r
- WORD cbSize;\r
- } WAVEFORMATEX;\r
-\r
-#else\r
-#include <mmreg.h>\r
-#endif\r
-#if 0\r
-typedef /* [hidden][restricted] */ LONGLONG REFERENCE_TIME;\r
-\r
-#else\r
-#define _IKsControl_\r
-#include <ks.h>\r
-#include <ksmedia.h>\r
-#endif\r
-\r
-enum _AUDCLNT_BUFFERFLAGS\r
- { AUDCLNT_BUFFERFLAGS_DATA_DISCONTINUITY = 0x1,\r
- AUDCLNT_BUFFERFLAGS_SILENT = 0x2,\r
- AUDCLNT_BUFFERFLAGS_TIMESTAMP_ERROR = 0x4\r
- } ;\r
-\r
-\r
-extern RPC_IF_HANDLE __MIDL_itf_audioclient_0000_0000_v0_0_c_ifspec;\r
-extern RPC_IF_HANDLE __MIDL_itf_audioclient_0000_0000_v0_0_s_ifspec;\r
-\r
-#ifndef __IAudioClient_INTERFACE_DEFINED__\r
-#define __IAudioClient_INTERFACE_DEFINED__\r
-\r
-/* interface IAudioClient */\r
-/* [local][unique][uuid][object] */ \r
-\r
-\r
-EXTERN_C const IID IID_IAudioClient;\r
-\r
-#if defined(__cplusplus) && !defined(CINTERFACE)\r
- \r
- MIDL_INTERFACE("1CB9AD4C-DBFA-4c32-B178-C2F568A703B2")\r
- IAudioClient : public IUnknown\r
- {\r
- public:\r
- virtual HRESULT STDMETHODCALLTYPE Initialize( \r
- /* [in] */ \r
- __in AUDCLNT_SHAREMODE ShareMode,\r
- /* [in] */ \r
- __in DWORD StreamFlags,\r
- /* [in] */ \r
- __in REFERENCE_TIME hnsBufferDuration,\r
- /* [in] */ \r
- __in REFERENCE_TIME hnsPeriodicity,\r
- /* [in] */ \r
- __in const WAVEFORMATEX *pFormat,\r
- /* [in] */ \r
- __in_opt LPCGUID AudioSessionGuid) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE GetBufferSize( \r
- /* [out] */ \r
- __out UINT32 *pNumBufferFrames) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE GetStreamLatency( \r
- /* [out] */ \r
- __out REFERENCE_TIME *phnsLatency) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE GetCurrentPadding( \r
- /* [out] */ \r
- __out UINT32 *pNumPaddingFrames) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE IsFormatSupported( \r
- /* [in] */ \r
- __in AUDCLNT_SHAREMODE ShareMode,\r
- /* [in] */ \r
- __in const WAVEFORMATEX *pFormat,\r
- /* [unique][out] */ \r
- __out_opt WAVEFORMATEX **ppClosestMatch) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE GetMixFormat( \r
- /* [out] */ \r
- __out WAVEFORMATEX **ppDeviceFormat) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE GetDevicePeriod( \r
- /* [out] */ \r
- __out_opt REFERENCE_TIME *phnsDefaultDevicePeriod,\r
- /* [out] */ \r
- __out_opt REFERENCE_TIME *phnsMinimumDevicePeriod) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE Start( void) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE Stop( void) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE Reset( void) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE SetEventHandle( \r
- /* [in] */ HANDLE eventHandle) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE GetService( \r
- /* [in] */ \r
- __in REFIID riid,\r
- /* [iid_is][out] */ \r
- __out void **ppv) = 0;\r
- \r
- };\r
- \r
-#else /* C style interface */\r
-\r
- typedef struct IAudioClientVtbl\r
- {\r
- BEGIN_INTERFACE\r
- \r
- HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r
- IAudioClient * This,\r
- /* [in] */ REFIID riid,\r
- /* [iid_is][out] */ \r
- __RPC__deref_out void **ppvObject);\r
- \r
- ULONG ( STDMETHODCALLTYPE *AddRef )( \r
- IAudioClient * This);\r
- \r
- ULONG ( STDMETHODCALLTYPE *Release )( \r
- IAudioClient * This);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *Initialize )( \r
- IAudioClient * This,\r
- /* [in] */ \r
- __in AUDCLNT_SHAREMODE ShareMode,\r
- /* [in] */ \r
- __in DWORD StreamFlags,\r
- /* [in] */ \r
- __in REFERENCE_TIME hnsBufferDuration,\r
- /* [in] */ \r
- __in REFERENCE_TIME hnsPeriodicity,\r
- /* [in] */ \r
- __in const WAVEFORMATEX *pFormat,\r
- /* [in] */ \r
- __in_opt LPCGUID AudioSessionGuid);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetBufferSize )( \r
- IAudioClient * This,\r
- /* [out] */ \r
- __out UINT32 *pNumBufferFrames);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetStreamLatency )( \r
- IAudioClient * This,\r
- /* [out] */ \r
- __out REFERENCE_TIME *phnsLatency);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetCurrentPadding )( \r
- IAudioClient * This,\r
- /* [out] */ \r
- __out UINT32 *pNumPaddingFrames);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *IsFormatSupported )( \r
- IAudioClient * This,\r
- /* [in] */ \r
- __in AUDCLNT_SHAREMODE ShareMode,\r
- /* [in] */ \r
- __in const WAVEFORMATEX *pFormat,\r
- /* [unique][out] */ \r
- __out_opt WAVEFORMATEX **ppClosestMatch);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetMixFormat )( \r
- IAudioClient * This,\r
- /* [out] */ \r
- __out WAVEFORMATEX **ppDeviceFormat);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetDevicePeriod )( \r
- IAudioClient * This,\r
- /* [out] */ \r
- __out_opt REFERENCE_TIME *phnsDefaultDevicePeriod,\r
- /* [out] */ \r
- __out_opt REFERENCE_TIME *phnsMinimumDevicePeriod);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *Start )( \r
- IAudioClient * This);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *Stop )( \r
- IAudioClient * This);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *Reset )( \r
- IAudioClient * This);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *SetEventHandle )( \r
- IAudioClient * This,\r
- /* [in] */ HANDLE eventHandle);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetService )( \r
- IAudioClient * This,\r
- /* [in] */ \r
- __in REFIID riid,\r
- /* [iid_is][out] */ \r
- __out void **ppv);\r
- \r
- END_INTERFACE\r
- } IAudioClientVtbl;\r
-\r
- interface IAudioClient\r
- {\r
- CONST_VTBL struct IAudioClientVtbl *lpVtbl;\r
- };\r
-\r
- \r
-\r
-#ifdef COBJMACROS\r
-\r
-\r
-#define IAudioClient_QueryInterface(This,riid,ppvObject) \\r
- ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r
-\r
-#define IAudioClient_AddRef(This) \\r
- ( (This)->lpVtbl -> AddRef(This) ) \r
-\r
-#define IAudioClient_Release(This) \\r
- ( (This)->lpVtbl -> Release(This) ) \r
-\r
-\r
-#define IAudioClient_Initialize(This,ShareMode,StreamFlags,hnsBufferDuration,hnsPeriodicity,pFormat,AudioSessionGuid) \\r
- ( (This)->lpVtbl -> Initialize(This,ShareMode,StreamFlags,hnsBufferDuration,hnsPeriodicity,pFormat,AudioSessionGuid) ) \r
-\r
-#define IAudioClient_GetBufferSize(This,pNumBufferFrames) \\r
- ( (This)->lpVtbl -> GetBufferSize(This,pNumBufferFrames) ) \r
-\r
-#define IAudioClient_GetStreamLatency(This,phnsLatency) \\r
- ( (This)->lpVtbl -> GetStreamLatency(This,phnsLatency) ) \r
-\r
-#define IAudioClient_GetCurrentPadding(This,pNumPaddingFrames) \\r
- ( (This)->lpVtbl -> GetCurrentPadding(This,pNumPaddingFrames) ) \r
-\r
-#define IAudioClient_IsFormatSupported(This,ShareMode,pFormat,ppClosestMatch) \\r
- ( (This)->lpVtbl -> IsFormatSupported(This,ShareMode,pFormat,ppClosestMatch) ) \r
-\r
-#define IAudioClient_GetMixFormat(This,ppDeviceFormat) \\r
- ( (This)->lpVtbl -> GetMixFormat(This,ppDeviceFormat) ) \r
-\r
-#define IAudioClient_GetDevicePeriod(This,phnsDefaultDevicePeriod,phnsMinimumDevicePeriod) \\r
- ( (This)->lpVtbl -> GetDevicePeriod(This,phnsDefaultDevicePeriod,phnsMinimumDevicePeriod) ) \r
-\r
-#define IAudioClient_Start(This) \\r
- ( (This)->lpVtbl -> Start(This) ) \r
-\r
-#define IAudioClient_Stop(This) \\r
- ( (This)->lpVtbl -> Stop(This) ) \r
-\r
-#define IAudioClient_Reset(This) \\r
- ( (This)->lpVtbl -> Reset(This) ) \r
-\r
-#define IAudioClient_SetEventHandle(This,eventHandle) \\r
- ( (This)->lpVtbl -> SetEventHandle(This,eventHandle) ) \r
-\r
-#define IAudioClient_GetService(This,riid,ppv) \\r
- ( (This)->lpVtbl -> GetService(This,riid,ppv) ) \r
-\r
-#endif /* COBJMACROS */\r
-\r
-\r
-#endif /* C style interface */\r
-\r
-\r
-\r
-\r
-#endif /* __IAudioClient_INTERFACE_DEFINED__ */\r
-\r
-\r
-#ifndef __IAudioRenderClient_INTERFACE_DEFINED__\r
-#define __IAudioRenderClient_INTERFACE_DEFINED__\r
-\r
-/* interface IAudioRenderClient */\r
-/* [local][unique][helpstring][uuid][object] */ \r
-\r
-\r
-EXTERN_C const IID IID_IAudioRenderClient;\r
-\r
-#if defined(__cplusplus) && !defined(CINTERFACE)\r
- \r
- MIDL_INTERFACE("F294ACFC-3146-4483-A7BF-ADDCA7C260E2")\r
- IAudioRenderClient : public IUnknown\r
- {\r
- public:\r
- virtual HRESULT STDMETHODCALLTYPE GetBuffer( \r
- /* [in] */ \r
- __in UINT32 NumFramesRequested,\r
- /* [out] */ \r
- __out BYTE **ppData) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE ReleaseBuffer( \r
- /* [in] */ \r
- __in UINT32 NumFramesWritten,\r
- /* [in] */ \r
- __in DWORD dwFlags) = 0;\r
- \r
- };\r
- \r
-#else /* C style interface */\r
-\r
- typedef struct IAudioRenderClientVtbl\r
- {\r
- BEGIN_INTERFACE\r
- \r
- HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r
- IAudioRenderClient * This,\r
- /* [in] */ REFIID riid,\r
- /* [iid_is][out] */ \r
- __RPC__deref_out void **ppvObject);\r
- \r
- ULONG ( STDMETHODCALLTYPE *AddRef )( \r
- IAudioRenderClient * This);\r
- \r
- ULONG ( STDMETHODCALLTYPE *Release )( \r
- IAudioRenderClient * This);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetBuffer )( \r
- IAudioRenderClient * This,\r
- /* [in] */ \r
- __in UINT32 NumFramesRequested,\r
- /* [out] */ \r
- __out BYTE **ppData);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *ReleaseBuffer )( \r
- IAudioRenderClient * This,\r
- /* [in] */ \r
- __in UINT32 NumFramesWritten,\r
- /* [in] */ \r
- __in DWORD dwFlags);\r
- \r
- END_INTERFACE\r
- } IAudioRenderClientVtbl;\r
-\r
- interface IAudioRenderClient\r
- {\r
- CONST_VTBL struct IAudioRenderClientVtbl *lpVtbl;\r
- };\r
-\r
- \r
-\r
-#ifdef COBJMACROS\r
-\r
-\r
-#define IAudioRenderClient_QueryInterface(This,riid,ppvObject) \\r
- ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r
-\r
-#define IAudioRenderClient_AddRef(This) \\r
- ( (This)->lpVtbl -> AddRef(This) ) \r
-\r
-#define IAudioRenderClient_Release(This) \\r
- ( (This)->lpVtbl -> Release(This) ) \r
-\r
-\r
-#define IAudioRenderClient_GetBuffer(This,NumFramesRequested,ppData) \\r
- ( (This)->lpVtbl -> GetBuffer(This,NumFramesRequested,ppData) ) \r
-\r
-#define IAudioRenderClient_ReleaseBuffer(This,NumFramesWritten,dwFlags) \\r
- ( (This)->lpVtbl -> ReleaseBuffer(This,NumFramesWritten,dwFlags) ) \r
-\r
-#endif /* COBJMACROS */\r
-\r
-\r
-#endif /* C style interface */\r
-\r
-\r
-\r
-\r
-#endif /* __IAudioRenderClient_INTERFACE_DEFINED__ */\r
-\r
-\r
-#ifndef __IAudioCaptureClient_INTERFACE_DEFINED__\r
-#define __IAudioCaptureClient_INTERFACE_DEFINED__\r
-\r
-/* interface IAudioCaptureClient */\r
-/* [local][unique][helpstring][uuid][object] */ \r
-\r
-\r
-EXTERN_C const IID IID_IAudioCaptureClient;\r
-\r
-#if defined(__cplusplus) && !defined(CINTERFACE)\r
- \r
- MIDL_INTERFACE("C8ADBD64-E71E-48a0-A4DE-185C395CD317")\r
- IAudioCaptureClient : public IUnknown\r
- {\r
- public:\r
- virtual HRESULT STDMETHODCALLTYPE GetBuffer( \r
- /* [out] */ \r
- __out BYTE **ppData,\r
- /* [out] */ \r
- __out UINT32 *pNumFramesToRead,\r
- /* [out] */ \r
- __out DWORD *pdwFlags,\r
- /* [unique][out] */ \r
- __out_opt UINT64 *pu64DevicePosition,\r
- /* [unique][out] */ \r
- __out_opt UINT64 *pu64QPCPosition) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE ReleaseBuffer( \r
- /* [in] */ \r
- __in UINT32 NumFramesRead) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE GetNextPacketSize( \r
- /* [out] */ \r
- __out UINT32 *pNumFramesInNextPacket) = 0;\r
- \r
- };\r
- \r
-#else /* C style interface */\r
-\r
- typedef struct IAudioCaptureClientVtbl\r
- {\r
- BEGIN_INTERFACE\r
- \r
- HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r
- IAudioCaptureClient * This,\r
- /* [in] */ REFIID riid,\r
- /* [iid_is][out] */ \r
- __RPC__deref_out void **ppvObject);\r
- \r
- ULONG ( STDMETHODCALLTYPE *AddRef )( \r
- IAudioCaptureClient * This);\r
- \r
- ULONG ( STDMETHODCALLTYPE *Release )( \r
- IAudioCaptureClient * This);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetBuffer )( \r
- IAudioCaptureClient * This,\r
- /* [out] */ \r
- __out BYTE **ppData,\r
- /* [out] */ \r
- __out UINT32 *pNumFramesToRead,\r
- /* [out] */ \r
- __out DWORD *pdwFlags,\r
- /* [unique][out] */ \r
- __out_opt UINT64 *pu64DevicePosition,\r
- /* [unique][out] */ \r
- __out_opt UINT64 *pu64QPCPosition);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *ReleaseBuffer )( \r
- IAudioCaptureClient * This,\r
- /* [in] */ \r
- __in UINT32 NumFramesRead);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetNextPacketSize )( \r
- IAudioCaptureClient * This,\r
- /* [out] */ \r
- __out UINT32 *pNumFramesInNextPacket);\r
- \r
- END_INTERFACE\r
- } IAudioCaptureClientVtbl;\r
-\r
- interface IAudioCaptureClient\r
- {\r
- CONST_VTBL struct IAudioCaptureClientVtbl *lpVtbl;\r
- };\r
-\r
- \r
-\r
-#ifdef COBJMACROS\r
-\r
-\r
-#define IAudioCaptureClient_QueryInterface(This,riid,ppvObject) \\r
- ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r
-\r
-#define IAudioCaptureClient_AddRef(This) \\r
- ( (This)->lpVtbl -> AddRef(This) ) \r
-\r
-#define IAudioCaptureClient_Release(This) \\r
- ( (This)->lpVtbl -> Release(This) ) \r
-\r
-\r
-#define IAudioCaptureClient_GetBuffer(This,ppData,pNumFramesToRead,pdwFlags,pu64DevicePosition,pu64QPCPosition) \\r
- ( (This)->lpVtbl -> GetBuffer(This,ppData,pNumFramesToRead,pdwFlags,pu64DevicePosition,pu64QPCPosition) ) \r
-\r
-#define IAudioCaptureClient_ReleaseBuffer(This,NumFramesRead) \\r
- ( (This)->lpVtbl -> ReleaseBuffer(This,NumFramesRead) ) \r
-\r
-#define IAudioCaptureClient_GetNextPacketSize(This,pNumFramesInNextPacket) \\r
- ( (This)->lpVtbl -> GetNextPacketSize(This,pNumFramesInNextPacket) ) \r
-\r
-#endif /* COBJMACROS */\r
-\r
-\r
-#endif /* C style interface */\r
-\r
-\r
-\r
-\r
-#endif /* __IAudioCaptureClient_INTERFACE_DEFINED__ */\r
-\r
-\r
-/* interface __MIDL_itf_audioclient_0000_0003 */\r
-/* [local] */ \r
-\r
-#define AUDIOCLOCK_CHARACTERISTIC_FIXED_FREQ 0x00000001\r
-\r
-\r
-extern RPC_IF_HANDLE __MIDL_itf_audioclient_0000_0003_v0_0_c_ifspec;\r
-extern RPC_IF_HANDLE __MIDL_itf_audioclient_0000_0003_v0_0_s_ifspec;\r
-\r
-#ifndef __IAudioClock_INTERFACE_DEFINED__\r
-#define __IAudioClock_INTERFACE_DEFINED__\r
-\r
-/* interface IAudioClock */\r
-/* [local][unique][uuid][object] */ \r
-\r
-\r
-EXTERN_C const IID IID_IAudioClock;\r
-\r
-#if defined(__cplusplus) && !defined(CINTERFACE)\r
- \r
- MIDL_INTERFACE("CD63314F-3FBA-4a1b-812C-EF96358728E7")\r
- IAudioClock : public IUnknown\r
- {\r
- public:\r
- virtual HRESULT STDMETHODCALLTYPE GetFrequency( \r
- /* [out] */ \r
- __out UINT64 *pu64Frequency) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE GetPosition( \r
- /* [out] */ \r
- __out UINT64 *pu64Position,\r
- /* [unique][out] */ \r
- __out_opt UINT64 *pu64QPCPosition) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE GetCharacteristics( \r
- /* [out] */ \r
- __out DWORD *pdwCharacteristics) = 0;\r
- \r
- };\r
- \r
-#else /* C style interface */\r
-\r
- typedef struct IAudioClockVtbl\r
- {\r
- BEGIN_INTERFACE\r
- \r
- HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r
- IAudioClock * This,\r
- /* [in] */ REFIID riid,\r
- /* [iid_is][out] */ \r
- __RPC__deref_out void **ppvObject);\r
- \r
- ULONG ( STDMETHODCALLTYPE *AddRef )( \r
- IAudioClock * This);\r
- \r
- ULONG ( STDMETHODCALLTYPE *Release )( \r
- IAudioClock * This);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetFrequency )( \r
- IAudioClock * This,\r
- /* [out] */ \r
- __out UINT64 *pu64Frequency);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetPosition )( \r
- IAudioClock * This,\r
- /* [out] */ \r
- __out UINT64 *pu64Position,\r
- /* [unique][out] */ \r
- __out_opt UINT64 *pu64QPCPosition);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetCharacteristics )( \r
- IAudioClock * This,\r
- /* [out] */ \r
- __out DWORD *pdwCharacteristics);\r
- \r
- END_INTERFACE\r
- } IAudioClockVtbl;\r
-\r
- interface IAudioClock\r
- {\r
- CONST_VTBL struct IAudioClockVtbl *lpVtbl;\r
- };\r
-\r
- \r
-\r
-#ifdef COBJMACROS\r
-\r
-\r
-#define IAudioClock_QueryInterface(This,riid,ppvObject) \\r
- ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r
-\r
-#define IAudioClock_AddRef(This) \\r
- ( (This)->lpVtbl -> AddRef(This) ) \r
-\r
-#define IAudioClock_Release(This) \\r
- ( (This)->lpVtbl -> Release(This) ) \r
-\r
-\r
-#define IAudioClock_GetFrequency(This,pu64Frequency) \\r
- ( (This)->lpVtbl -> GetFrequency(This,pu64Frequency) ) \r
-\r
-#define IAudioClock_GetPosition(This,pu64Position,pu64QPCPosition) \\r
- ( (This)->lpVtbl -> GetPosition(This,pu64Position,pu64QPCPosition) ) \r
-\r
-#define IAudioClock_GetCharacteristics(This,pdwCharacteristics) \\r
- ( (This)->lpVtbl -> GetCharacteristics(This,pdwCharacteristics) ) \r
-\r
-#endif /* COBJMACROS */\r
-\r
-\r
-#endif /* C style interface */\r
-\r
-\r
-\r
-\r
-#endif /* __IAudioClock_INTERFACE_DEFINED__ */\r
-\r
-\r
-#ifndef __ISimpleAudioVolume_INTERFACE_DEFINED__\r
-#define __ISimpleAudioVolume_INTERFACE_DEFINED__\r
-\r
-/* interface ISimpleAudioVolume */\r
-/* [local][unique][uuid][object] */ \r
-\r
-\r
-EXTERN_C const IID IID_ISimpleAudioVolume;\r
-\r
-#if defined(__cplusplus) && !defined(CINTERFACE)\r
- \r
- MIDL_INTERFACE("87CE5498-68D6-44E5-9215-6DA47EF883D8")\r
- ISimpleAudioVolume : public IUnknown\r
- {\r
- public:\r
- virtual HRESULT STDMETHODCALLTYPE SetMasterVolume( \r
- /* [in] */ \r
- __in float fLevel,\r
- /* [unique][in] */ LPCGUID EventContext) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE GetMasterVolume( \r
- /* [out] */ \r
- __out float *pfLevel) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE SetMute( \r
- /* [in] */ \r
- __in const BOOL bMute,\r
- /* [unique][in] */ LPCGUID EventContext) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE GetMute( \r
- /* [out] */ \r
- __out BOOL *pbMute) = 0;\r
- \r
- };\r
- \r
-#else /* C style interface */\r
-\r
- typedef struct ISimpleAudioVolumeVtbl\r
- {\r
- BEGIN_INTERFACE\r
- \r
- HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r
- ISimpleAudioVolume * This,\r
- /* [in] */ REFIID riid,\r
- /* [iid_is][out] */ \r
- __RPC__deref_out void **ppvObject);\r
- \r
- ULONG ( STDMETHODCALLTYPE *AddRef )( \r
- ISimpleAudioVolume * This);\r
- \r
- ULONG ( STDMETHODCALLTYPE *Release )( \r
- ISimpleAudioVolume * This);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *SetMasterVolume )( \r
- ISimpleAudioVolume * This,\r
- /* [in] */ \r
- __in float fLevel,\r
- /* [unique][in] */ LPCGUID EventContext);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetMasterVolume )( \r
- ISimpleAudioVolume * This,\r
- /* [out] */ \r
- __out float *pfLevel);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *SetMute )( \r
- ISimpleAudioVolume * This,\r
- /* [in] */ \r
- __in const BOOL bMute,\r
- /* [unique][in] */ LPCGUID EventContext);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetMute )( \r
- ISimpleAudioVolume * This,\r
- /* [out] */ \r
- __out BOOL *pbMute);\r
- \r
- END_INTERFACE\r
- } ISimpleAudioVolumeVtbl;\r
-\r
- interface ISimpleAudioVolume\r
- {\r
- CONST_VTBL struct ISimpleAudioVolumeVtbl *lpVtbl;\r
- };\r
-\r
- \r
-\r
-#ifdef COBJMACROS\r
-\r
-\r
-#define ISimpleAudioVolume_QueryInterface(This,riid,ppvObject) \\r
- ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r
-\r
-#define ISimpleAudioVolume_AddRef(This) \\r
- ( (This)->lpVtbl -> AddRef(This) ) \r
-\r
-#define ISimpleAudioVolume_Release(This) \\r
- ( (This)->lpVtbl -> Release(This) ) \r
-\r
-\r
-#define ISimpleAudioVolume_SetMasterVolume(This,fLevel,EventContext) \\r
- ( (This)->lpVtbl -> SetMasterVolume(This,fLevel,EventContext) ) \r
-\r
-#define ISimpleAudioVolume_GetMasterVolume(This,pfLevel) \\r
- ( (This)->lpVtbl -> GetMasterVolume(This,pfLevel) ) \r
-\r
-#define ISimpleAudioVolume_SetMute(This,bMute,EventContext) \\r
- ( (This)->lpVtbl -> SetMute(This,bMute,EventContext) ) \r
-\r
-#define ISimpleAudioVolume_GetMute(This,pbMute) \\r
- ( (This)->lpVtbl -> GetMute(This,pbMute) ) \r
-\r
-#endif /* COBJMACROS */\r
-\r
-\r
-#endif /* C style interface */\r
-\r
-\r
-\r
-\r
-#endif /* __ISimpleAudioVolume_INTERFACE_DEFINED__ */\r
-\r
-\r
-#ifndef __IAudioStreamVolume_INTERFACE_DEFINED__\r
-#define __IAudioStreamVolume_INTERFACE_DEFINED__\r
-\r
-/* interface IAudioStreamVolume */\r
-/* [local][unique][uuid][object] */ \r
-\r
-\r
-EXTERN_C const IID IID_IAudioStreamVolume;\r
-\r
-#if defined(__cplusplus) && !defined(CINTERFACE)\r
- \r
- MIDL_INTERFACE("93014887-242D-4068-8A15-CF5E93B90FE3")\r
- IAudioStreamVolume : public IUnknown\r
- {\r
- public:\r
- virtual HRESULT STDMETHODCALLTYPE GetChannelCount( \r
- /* [out] */ \r
- __out UINT32 *pdwCount) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE SetChannelVolume( \r
- /* [in] */ \r
- __in UINT32 dwIndex,\r
- /* [in] */ \r
- __in const float fLevel) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE GetChannelVolume( \r
- /* [in] */ \r
- __in UINT32 dwIndex,\r
- /* [out] */ \r
- __out float *pfLevel) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE SetAllVolumes( \r
- /* [in] */ \r
- __in UINT32 dwCount,\r
- /* [size_is][in] */ \r
- __in_ecount(dwCount) const float *pfVolumes) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE GetAllVolumes( \r
- /* [in] */ \r
- __in UINT32 dwCount,\r
- /* [size_is][out] */ \r
- __out_ecount(dwCount) float *pfVolumes) = 0;\r
- \r
- };\r
- \r
-#else /* C style interface */\r
-\r
- typedef struct IAudioStreamVolumeVtbl\r
- {\r
- BEGIN_INTERFACE\r
- \r
- HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r
- IAudioStreamVolume * This,\r
- /* [in] */ REFIID riid,\r
- /* [iid_is][out] */ \r
- __RPC__deref_out void **ppvObject);\r
- \r
- ULONG ( STDMETHODCALLTYPE *AddRef )( \r
- IAudioStreamVolume * This);\r
- \r
- ULONG ( STDMETHODCALLTYPE *Release )( \r
- IAudioStreamVolume * This);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetChannelCount )( \r
- IAudioStreamVolume * This,\r
- /* [out] */ \r
- __out UINT32 *pdwCount);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *SetChannelVolume )( \r
- IAudioStreamVolume * This,\r
- /* [in] */ \r
- __in UINT32 dwIndex,\r
- /* [in] */ \r
- __in const float fLevel);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetChannelVolume )( \r
- IAudioStreamVolume * This,\r
- /* [in] */ \r
- __in UINT32 dwIndex,\r
- /* [out] */ \r
- __out float *pfLevel);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *SetAllVolumes )( \r
- IAudioStreamVolume * This,\r
- /* [in] */ \r
- __in UINT32 dwCount,\r
- /* [size_is][in] */ \r
- __in_ecount(dwCount) const float *pfVolumes);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetAllVolumes )( \r
- IAudioStreamVolume * This,\r
- /* [in] */ \r
- __in UINT32 dwCount,\r
- /* [size_is][out] */ \r
- __out_ecount(dwCount) float *pfVolumes);\r
- \r
- END_INTERFACE\r
- } IAudioStreamVolumeVtbl;\r
-\r
- interface IAudioStreamVolume\r
- {\r
- CONST_VTBL struct IAudioStreamVolumeVtbl *lpVtbl;\r
- };\r
-\r
- \r
-\r
-#ifdef COBJMACROS\r
-\r
-\r
-#define IAudioStreamVolume_QueryInterface(This,riid,ppvObject) \\r
- ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r
-\r
-#define IAudioStreamVolume_AddRef(This) \\r
- ( (This)->lpVtbl -> AddRef(This) ) \r
-\r
-#define IAudioStreamVolume_Release(This) \\r
- ( (This)->lpVtbl -> Release(This) ) \r
-\r
-\r
-#define IAudioStreamVolume_GetChannelCount(This,pdwCount) \\r
- ( (This)->lpVtbl -> GetChannelCount(This,pdwCount) ) \r
-\r
-#define IAudioStreamVolume_SetChannelVolume(This,dwIndex,fLevel) \\r
- ( (This)->lpVtbl -> SetChannelVolume(This,dwIndex,fLevel) ) \r
-\r
-#define IAudioStreamVolume_GetChannelVolume(This,dwIndex,pfLevel) \\r
- ( (This)->lpVtbl -> GetChannelVolume(This,dwIndex,pfLevel) ) \r
-\r
-#define IAudioStreamVolume_SetAllVolumes(This,dwCount,pfVolumes) \\r
- ( (This)->lpVtbl -> SetAllVolumes(This,dwCount,pfVolumes) ) \r
-\r
-#define IAudioStreamVolume_GetAllVolumes(This,dwCount,pfVolumes) \\r
- ( (This)->lpVtbl -> GetAllVolumes(This,dwCount,pfVolumes) ) \r
-\r
-#endif /* COBJMACROS */\r
-\r
-\r
-#endif /* C style interface */\r
-\r
-\r
-\r
-\r
-#endif /* __IAudioStreamVolume_INTERFACE_DEFINED__ */\r
-\r
-\r
-#ifndef __IChannelAudioVolume_INTERFACE_DEFINED__\r
-#define __IChannelAudioVolume_INTERFACE_DEFINED__\r
-\r
-/* interface IChannelAudioVolume */\r
-/* [local][unique][uuid][object] */ \r
-\r
-\r
-EXTERN_C const IID IID_IChannelAudioVolume;\r
-\r
-#if defined(__cplusplus) && !defined(CINTERFACE)\r
- \r
- MIDL_INTERFACE("1C158861-B533-4B30-B1CF-E853E51C59B8")\r
- IChannelAudioVolume : public IUnknown\r
- {\r
- public:\r
- virtual HRESULT STDMETHODCALLTYPE GetChannelCount( \r
- /* [out] */ \r
- __out UINT32 *pdwCount) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE SetChannelVolume( \r
- /* [in] */ \r
- __in UINT32 dwIndex,\r
- /* [in] */ \r
- __in const float fLevel,\r
- /* [unique][in] */ LPCGUID EventContext) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE GetChannelVolume( \r
- /* [in] */ \r
- __in UINT32 dwIndex,\r
- /* [out] */ \r
- __out float *pfLevel) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE SetAllVolumes( \r
- /* [in] */ \r
- __in UINT32 dwCount,\r
- /* [size_is][in] */ \r
- __in_ecount(dwCount) const float *pfVolumes,\r
- /* [unique][in] */ LPCGUID EventContext) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE GetAllVolumes( \r
- /* [in] */ \r
- __in UINT32 dwCount,\r
- /* [size_is][out] */ \r
- __out_ecount(dwCount) float *pfVolumes) = 0;\r
- \r
- };\r
- \r
-#else /* C style interface */\r
-\r
- typedef struct IChannelAudioVolumeVtbl\r
- {\r
- BEGIN_INTERFACE\r
- \r
- HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r
- IChannelAudioVolume * This,\r
- /* [in] */ REFIID riid,\r
- /* [iid_is][out] */ \r
- __RPC__deref_out void **ppvObject);\r
- \r
- ULONG ( STDMETHODCALLTYPE *AddRef )( \r
- IChannelAudioVolume * This);\r
- \r
- ULONG ( STDMETHODCALLTYPE *Release )( \r
- IChannelAudioVolume * This);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetChannelCount )( \r
- IChannelAudioVolume * This,\r
- /* [out] */ \r
- __out UINT32 *pdwCount);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *SetChannelVolume )( \r
- IChannelAudioVolume * This,\r
- /* [in] */ \r
- __in UINT32 dwIndex,\r
- /* [in] */ \r
- __in const float fLevel,\r
- /* [unique][in] */ LPCGUID EventContext);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetChannelVolume )( \r
- IChannelAudioVolume * This,\r
- /* [in] */ \r
- __in UINT32 dwIndex,\r
- /* [out] */ \r
- __out float *pfLevel);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *SetAllVolumes )( \r
- IChannelAudioVolume * This,\r
- /* [in] */ \r
- __in UINT32 dwCount,\r
- /* [size_is][in] */ \r
- __in_ecount(dwCount) const float *pfVolumes,\r
- /* [unique][in] */ LPCGUID EventContext);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetAllVolumes )( \r
- IChannelAudioVolume * This,\r
- /* [in] */ \r
- __in UINT32 dwCount,\r
- /* [size_is][out] */ \r
- __out_ecount(dwCount) float *pfVolumes);\r
- \r
- END_INTERFACE\r
- } IChannelAudioVolumeVtbl;\r
-\r
- interface IChannelAudioVolume\r
- {\r
- CONST_VTBL struct IChannelAudioVolumeVtbl *lpVtbl;\r
- };\r
-\r
- \r
-\r
-#ifdef COBJMACROS\r
-\r
-\r
-#define IChannelAudioVolume_QueryInterface(This,riid,ppvObject) \\r
- ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r
-\r
-#define IChannelAudioVolume_AddRef(This) \\r
- ( (This)->lpVtbl -> AddRef(This) ) \r
-\r
-#define IChannelAudioVolume_Release(This) \\r
- ( (This)->lpVtbl -> Release(This) ) \r
-\r
-\r
-#define IChannelAudioVolume_GetChannelCount(This,pdwCount) \\r
- ( (This)->lpVtbl -> GetChannelCount(This,pdwCount) ) \r
-\r
-#define IChannelAudioVolume_SetChannelVolume(This,dwIndex,fLevel,EventContext) \\r
- ( (This)->lpVtbl -> SetChannelVolume(This,dwIndex,fLevel,EventContext) ) \r
-\r
-#define IChannelAudioVolume_GetChannelVolume(This,dwIndex,pfLevel) \\r
- ( (This)->lpVtbl -> GetChannelVolume(This,dwIndex,pfLevel) ) \r
-\r
-#define IChannelAudioVolume_SetAllVolumes(This,dwCount,pfVolumes,EventContext) \\r
- ( (This)->lpVtbl -> SetAllVolumes(This,dwCount,pfVolumes,EventContext) ) \r
-\r
-#define IChannelAudioVolume_GetAllVolumes(This,dwCount,pfVolumes) \\r
- ( (This)->lpVtbl -> GetAllVolumes(This,dwCount,pfVolumes) ) \r
-\r
-#endif /* COBJMACROS */\r
-\r
-\r
-#endif /* C style interface */\r
-\r
-\r
-\r
-\r
-#endif /* __IChannelAudioVolume_INTERFACE_DEFINED__ */\r
-\r
-\r
-/* interface __MIDL_itf_audioclient_0000_0007 */\r
-/* [local] */ \r
-\r
-#define FACILITY_AUDCLNT 0x889\r
-#define AUDCLNT_ERR(n) MAKE_HRESULT(SEVERITY_ERROR, FACILITY_AUDCLNT, n)\r
-#define AUDCLNT_SUCCESS(n) MAKE_SCODE(SEVERITY_SUCCESS, FACILITY_AUDCLNT, n)\r
-#define AUDCLNT_E_NOT_INITIALIZED AUDCLNT_ERR(0x001)\r
-#define AUDCLNT_E_ALREADY_INITIALIZED AUDCLNT_ERR(0x002)\r
-#define AUDCLNT_E_WRONG_ENDPOINT_TYPE AUDCLNT_ERR(0x003)\r
-#define AUDCLNT_E_DEVICE_INVALIDATED AUDCLNT_ERR(0x004)\r
-#define AUDCLNT_E_NOT_STOPPED AUDCLNT_ERR(0x005)\r
-#define AUDCLNT_E_BUFFER_TOO_LARGE AUDCLNT_ERR(0x006)\r
-#define AUDCLNT_E_OUT_OF_ORDER AUDCLNT_ERR(0x007)\r
-#define AUDCLNT_E_UNSUPPORTED_FORMAT AUDCLNT_ERR(0x008)\r
-#define AUDCLNT_E_INVALID_SIZE AUDCLNT_ERR(0x009)\r
-#define AUDCLNT_E_DEVICE_IN_USE AUDCLNT_ERR(0x00a)\r
-#define AUDCLNT_E_BUFFER_OPERATION_PENDING AUDCLNT_ERR(0x00b)\r
-#define AUDCLNT_E_THREAD_NOT_REGISTERED AUDCLNT_ERR(0x00c)\r
-#define AUDCLNT_E_EXCLUSIVE_MODE_NOT_ALLOWED AUDCLNT_ERR(0x00e)\r
-#define AUDCLNT_E_ENDPOINT_CREATE_FAILED AUDCLNT_ERR(0x00f)\r
-#define AUDCLNT_E_SERVICE_NOT_RUNNING AUDCLNT_ERR(0x010)\r
-#define AUDCLNT_E_EVENTHANDLE_NOT_EXPECTED AUDCLNT_ERR(0x011)\r
-#define AUDCLNT_E_EXCLUSIVE_MODE_ONLY AUDCLNT_ERR(0x012)\r
-#define AUDCLNT_E_BUFDURATION_PERIOD_NOT_EQUAL AUDCLNT_ERR(0x013)\r
-#define AUDCLNT_E_EVENTHANDLE_NOT_SET AUDCLNT_ERR(0x014)\r
-#define AUDCLNT_E_INCORRECT_BUFFER_SIZE AUDCLNT_ERR(0x015)\r
-#define AUDCLNT_E_BUFFER_SIZE_ERROR AUDCLNT_ERR(0x016)\r
-#define AUDCLNT_E_CPUUSAGE_EXCEEDED AUDCLNT_ERR(0x017)\r
-#define AUDCLNT_S_BUFFER_EMPTY AUDCLNT_SUCCESS(0x001)\r
-#define AUDCLNT_S_THREAD_ALREADY_REGISTERED AUDCLNT_SUCCESS(0x002)\r
-#define AUDCLNT_S_POSITION_STALLED AUDCLNT_SUCCESS(0x003)\r
-\r
-\r
-extern RPC_IF_HANDLE __MIDL_itf_audioclient_0000_0007_v0_0_c_ifspec;\r
-extern RPC_IF_HANDLE __MIDL_itf_audioclient_0000_0007_v0_0_s_ifspec;\r
-\r
-/* Additional Prototypes for ALL interfaces */\r
-\r
-/* end of Additional Prototypes */\r
-\r
-#ifdef __cplusplus\r
-}\r
-#endif\r
-\r
-#endif\r
-\r
-\r
-\r
+
+
+/* this ALWAYS GENERATED file contains the definitions for the interfaces */
+
+
+ /* File created by MIDL compiler version 7.00.0499 */
+/* Compiler settings for audioclient.idl:
+ Oicf, W1, Zp8, env=Win32 (32b run)
+ protocol : dce , ms_ext, c_ext, robust
+ error checks: allocation ref bounds_check enum stub_data
+ VC __declspec() decoration level:
+ __declspec(uuid()), __declspec(selectany), __declspec(novtable)
+ DECLSPEC_UUID(), MIDL_INTERFACE()
+*/
+//@@MIDL_FILE_HEADING( )
+
+#pragma warning( disable: 4049 ) /* more than 64k source lines */
+
+
+/* verify that the <rpcndr.h> version is high enough to compile this file*/
+#ifndef __REQUIRED_RPCNDR_H_VERSION__
+#define __REQUIRED_RPCNDR_H_VERSION__ 500
+#endif
+
+/* verify that the <rpcsal.h> version is high enough to compile this file*/
+#ifndef __REQUIRED_RPCSAL_H_VERSION__
+#define __REQUIRED_RPCSAL_H_VERSION__ 100
+#endif
+
+#include "rpc.h"
+#include "rpcndr.h"
+
+#ifndef __RPCNDR_H_VERSION__
+#error this stub requires an updated version of <rpcndr.h>
+#endif // __RPCNDR_H_VERSION__
+
+#ifndef COM_NO_WINDOWS_H
+#include "windows.h"
+#include "ole2.h"
+#endif /*COM_NO_WINDOWS_H*/
+
+#ifndef __audioclient_h__
+#define __audioclient_h__
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#pragma once
+#endif
+
+/* Forward Declarations */
+
+#ifndef __IAudioClient_FWD_DEFINED__
+#define __IAudioClient_FWD_DEFINED__
+typedef interface IAudioClient IAudioClient;
+#endif /* __IAudioClient_FWD_DEFINED__ */
+
+
+#ifndef __IAudioRenderClient_FWD_DEFINED__
+#define __IAudioRenderClient_FWD_DEFINED__
+typedef interface IAudioRenderClient IAudioRenderClient;
+#endif /* __IAudioRenderClient_FWD_DEFINED__ */
+
+
+#ifndef __IAudioCaptureClient_FWD_DEFINED__
+#define __IAudioCaptureClient_FWD_DEFINED__
+typedef interface IAudioCaptureClient IAudioCaptureClient;
+#endif /* __IAudioCaptureClient_FWD_DEFINED__ */
+
+
+#ifndef __IAudioClock_FWD_DEFINED__
+#define __IAudioClock_FWD_DEFINED__
+typedef interface IAudioClock IAudioClock;
+#endif /* __IAudioClock_FWD_DEFINED__ */
+
+
+#ifndef __ISimpleAudioVolume_FWD_DEFINED__
+#define __ISimpleAudioVolume_FWD_DEFINED__
+typedef interface ISimpleAudioVolume ISimpleAudioVolume;
+#endif /* __ISimpleAudioVolume_FWD_DEFINED__ */
+
+
+#ifndef __IAudioStreamVolume_FWD_DEFINED__
+#define __IAudioStreamVolume_FWD_DEFINED__
+typedef interface IAudioStreamVolume IAudioStreamVolume;
+#endif /* __IAudioStreamVolume_FWD_DEFINED__ */
+
+
+#ifndef __IChannelAudioVolume_FWD_DEFINED__
+#define __IChannelAudioVolume_FWD_DEFINED__
+typedef interface IChannelAudioVolume IChannelAudioVolume;
+#endif /* __IChannelAudioVolume_FWD_DEFINED__ */
+
+
+/* header files for imported files */
+#include "wtypes.h"
+#include "unknwn.h"
+#include "AudioSessionTypes.h"
+
+#ifdef __cplusplus
+extern "C"{
+#endif
+
+
+/* interface __MIDL_itf_audioclient_0000_0000 */
+/* [local] */
+
+#if 0
+typedef /* [hidden][restricted] */ struct WAVEFORMATEX
+ {
+ WORD wFormatTag;
+ WORD nChannels;
+ DWORD nSamplesPerSec;
+ DWORD nAvgBytesPerSec;
+ WORD nBlockAlign;
+ WORD wBitsPerSample;
+ WORD cbSize;
+ } WAVEFORMATEX;
+
+#else
+#include <mmreg.h>
+#endif
+#if 0
+typedef /* [hidden][restricted] */ LONGLONG REFERENCE_TIME;
+
+#else
+#define _IKsControl_
+#include <ks.h>
+#include <ksmedia.h>
+#endif
+
+enum _AUDCLNT_BUFFERFLAGS
+ { AUDCLNT_BUFFERFLAGS_DATA_DISCONTINUITY = 0x1,
+ AUDCLNT_BUFFERFLAGS_SILENT = 0x2,
+ AUDCLNT_BUFFERFLAGS_TIMESTAMP_ERROR = 0x4
+ } ;
+
+
+extern RPC_IF_HANDLE __MIDL_itf_audioclient_0000_0000_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_audioclient_0000_0000_v0_0_s_ifspec;
+
+#ifndef __IAudioClient_INTERFACE_DEFINED__
+#define __IAudioClient_INTERFACE_DEFINED__
+
+/* interface IAudioClient */
+/* [local][unique][uuid][object] */
+
+
+EXTERN_C const IID IID_IAudioClient;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("1CB9AD4C-DBFA-4c32-B178-C2F568A703B2")
+ IAudioClient : public IUnknown
+ {
+ public:
+ virtual HRESULT STDMETHODCALLTYPE Initialize(
+ /* [in] */
+ __in AUDCLNT_SHAREMODE ShareMode,
+ /* [in] */
+ __in DWORD StreamFlags,
+ /* [in] */
+ __in REFERENCE_TIME hnsBufferDuration,
+ /* [in] */
+ __in REFERENCE_TIME hnsPeriodicity,
+ /* [in] */
+ __in const WAVEFORMATEX *pFormat,
+ /* [in] */
+ __in_opt LPCGUID AudioSessionGuid) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetBufferSize(
+ /* [out] */
+ __out UINT32 *pNumBufferFrames) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetStreamLatency(
+ /* [out] */
+ __out REFERENCE_TIME *phnsLatency) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetCurrentPadding(
+ /* [out] */
+ __out UINT32 *pNumPaddingFrames) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE IsFormatSupported(
+ /* [in] */
+ __in AUDCLNT_SHAREMODE ShareMode,
+ /* [in] */
+ __in const WAVEFORMATEX *pFormat,
+ /* [unique][out] */
+ __out_opt WAVEFORMATEX **ppClosestMatch) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetMixFormat(
+ /* [out] */
+ __out WAVEFORMATEX **ppDeviceFormat) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetDevicePeriod(
+ /* [out] */
+ __out_opt REFERENCE_TIME *phnsDefaultDevicePeriod,
+ /* [out] */
+ __out_opt REFERENCE_TIME *phnsMinimumDevicePeriod) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE Start( void) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE Stop( void) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE Reset( void) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE SetEventHandle(
+ /* [in] */ HANDLE eventHandle) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetService(
+ /* [in] */
+ __in REFIID riid,
+ /* [iid_is][out] */
+ __out void **ppv) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct IAudioClientVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IAudioClient * This,
+ /* [in] */ REFIID riid,
+ /* [iid_is][out] */
+ __RPC__deref_out void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IAudioClient * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IAudioClient * This);
+
+ HRESULT ( STDMETHODCALLTYPE *Initialize )(
+ IAudioClient * This,
+ /* [in] */
+ __in AUDCLNT_SHAREMODE ShareMode,
+ /* [in] */
+ __in DWORD StreamFlags,
+ /* [in] */
+ __in REFERENCE_TIME hnsBufferDuration,
+ /* [in] */
+ __in REFERENCE_TIME hnsPeriodicity,
+ /* [in] */
+ __in const WAVEFORMATEX *pFormat,
+ /* [in] */
+ __in_opt LPCGUID AudioSessionGuid);
+
+ HRESULT ( STDMETHODCALLTYPE *GetBufferSize )(
+ IAudioClient * This,
+ /* [out] */
+ __out UINT32 *pNumBufferFrames);
+
+ HRESULT ( STDMETHODCALLTYPE *GetStreamLatency )(
+ IAudioClient * This,
+ /* [out] */
+ __out REFERENCE_TIME *phnsLatency);
+
+ HRESULT ( STDMETHODCALLTYPE *GetCurrentPadding )(
+ IAudioClient * This,
+ /* [out] */
+ __out UINT32 *pNumPaddingFrames);
+
+ HRESULT ( STDMETHODCALLTYPE *IsFormatSupported )(
+ IAudioClient * This,
+ /* [in] */
+ __in AUDCLNT_SHAREMODE ShareMode,
+ /* [in] */
+ __in const WAVEFORMATEX *pFormat,
+ /* [unique][out] */
+ __out_opt WAVEFORMATEX **ppClosestMatch);
+
+ HRESULT ( STDMETHODCALLTYPE *GetMixFormat )(
+ IAudioClient * This,
+ /* [out] */
+ __out WAVEFORMATEX **ppDeviceFormat);
+
+ HRESULT ( STDMETHODCALLTYPE *GetDevicePeriod )(
+ IAudioClient * This,
+ /* [out] */
+ __out_opt REFERENCE_TIME *phnsDefaultDevicePeriod,
+ /* [out] */
+ __out_opt REFERENCE_TIME *phnsMinimumDevicePeriod);
+
+ HRESULT ( STDMETHODCALLTYPE *Start )(
+ IAudioClient * This);
+
+ HRESULT ( STDMETHODCALLTYPE *Stop )(
+ IAudioClient * This);
+
+ HRESULT ( STDMETHODCALLTYPE *Reset )(
+ IAudioClient * This);
+
+ HRESULT ( STDMETHODCALLTYPE *SetEventHandle )(
+ IAudioClient * This,
+ /* [in] */ HANDLE eventHandle);
+
+ HRESULT ( STDMETHODCALLTYPE *GetService )(
+ IAudioClient * This,
+ /* [in] */
+ __in REFIID riid,
+ /* [iid_is][out] */
+ __out void **ppv);
+
+ END_INTERFACE
+ } IAudioClientVtbl;
+
+ interface IAudioClient
+ {
+ CONST_VTBL struct IAudioClientVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IAudioClient_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IAudioClient_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IAudioClient_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IAudioClient_Initialize(This,ShareMode,StreamFlags,hnsBufferDuration,hnsPeriodicity,pFormat,AudioSessionGuid) \
+ ( (This)->lpVtbl -> Initialize(This,ShareMode,StreamFlags,hnsBufferDuration,hnsPeriodicity,pFormat,AudioSessionGuid) )
+
+#define IAudioClient_GetBufferSize(This,pNumBufferFrames) \
+ ( (This)->lpVtbl -> GetBufferSize(This,pNumBufferFrames) )
+
+#define IAudioClient_GetStreamLatency(This,phnsLatency) \
+ ( (This)->lpVtbl -> GetStreamLatency(This,phnsLatency) )
+
+#define IAudioClient_GetCurrentPadding(This,pNumPaddingFrames) \
+ ( (This)->lpVtbl -> GetCurrentPadding(This,pNumPaddingFrames) )
+
+#define IAudioClient_IsFormatSupported(This,ShareMode,pFormat,ppClosestMatch) \
+ ( (This)->lpVtbl -> IsFormatSupported(This,ShareMode,pFormat,ppClosestMatch) )
+
+#define IAudioClient_GetMixFormat(This,ppDeviceFormat) \
+ ( (This)->lpVtbl -> GetMixFormat(This,ppDeviceFormat) )
+
+#define IAudioClient_GetDevicePeriod(This,phnsDefaultDevicePeriod,phnsMinimumDevicePeriod) \
+ ( (This)->lpVtbl -> GetDevicePeriod(This,phnsDefaultDevicePeriod,phnsMinimumDevicePeriod) )
+
+#define IAudioClient_Start(This) \
+ ( (This)->lpVtbl -> Start(This) )
+
+#define IAudioClient_Stop(This) \
+ ( (This)->lpVtbl -> Stop(This) )
+
+#define IAudioClient_Reset(This) \
+ ( (This)->lpVtbl -> Reset(This) )
+
+#define IAudioClient_SetEventHandle(This,eventHandle) \
+ ( (This)->lpVtbl -> SetEventHandle(This,eventHandle) )
+
+#define IAudioClient_GetService(This,riid,ppv) \
+ ( (This)->lpVtbl -> GetService(This,riid,ppv) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IAudioClient_INTERFACE_DEFINED__ */
+
+
+#ifndef __IAudioRenderClient_INTERFACE_DEFINED__
+#define __IAudioRenderClient_INTERFACE_DEFINED__
+
+/* interface IAudioRenderClient */
+/* [local][unique][helpstring][uuid][object] */
+
+
+EXTERN_C const IID IID_IAudioRenderClient;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("F294ACFC-3146-4483-A7BF-ADDCA7C260E2")
+ IAudioRenderClient : public IUnknown
+ {
+ public:
+ virtual HRESULT STDMETHODCALLTYPE GetBuffer(
+ /* [in] */
+ __in UINT32 NumFramesRequested,
+ /* [out] */
+ __out BYTE **ppData) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE ReleaseBuffer(
+ /* [in] */
+ __in UINT32 NumFramesWritten,
+ /* [in] */
+ __in DWORD dwFlags) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct IAudioRenderClientVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IAudioRenderClient * This,
+ /* [in] */ REFIID riid,
+ /* [iid_is][out] */
+ __RPC__deref_out void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IAudioRenderClient * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IAudioRenderClient * This);
+
+ HRESULT ( STDMETHODCALLTYPE *GetBuffer )(
+ IAudioRenderClient * This,
+ /* [in] */
+ __in UINT32 NumFramesRequested,
+ /* [out] */
+ __out BYTE **ppData);
+
+ HRESULT ( STDMETHODCALLTYPE *ReleaseBuffer )(
+ IAudioRenderClient * This,
+ /* [in] */
+ __in UINT32 NumFramesWritten,
+ /* [in] */
+ __in DWORD dwFlags);
+
+ END_INTERFACE
+ } IAudioRenderClientVtbl;
+
+ interface IAudioRenderClient
+ {
+ CONST_VTBL struct IAudioRenderClientVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IAudioRenderClient_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IAudioRenderClient_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IAudioRenderClient_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IAudioRenderClient_GetBuffer(This,NumFramesRequested,ppData) \
+ ( (This)->lpVtbl -> GetBuffer(This,NumFramesRequested,ppData) )
+
+#define IAudioRenderClient_ReleaseBuffer(This,NumFramesWritten,dwFlags) \
+ ( (This)->lpVtbl -> ReleaseBuffer(This,NumFramesWritten,dwFlags) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IAudioRenderClient_INTERFACE_DEFINED__ */
+
+
+#ifndef __IAudioCaptureClient_INTERFACE_DEFINED__
+#define __IAudioCaptureClient_INTERFACE_DEFINED__
+
+/* interface IAudioCaptureClient */
+/* [local][unique][helpstring][uuid][object] */
+
+
+EXTERN_C const IID IID_IAudioCaptureClient;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("C8ADBD64-E71E-48a0-A4DE-185C395CD317")
+ IAudioCaptureClient : public IUnknown
+ {
+ public:
+ virtual HRESULT STDMETHODCALLTYPE GetBuffer(
+ /* [out] */
+ __out BYTE **ppData,
+ /* [out] */
+ __out UINT32 *pNumFramesToRead,
+ /* [out] */
+ __out DWORD *pdwFlags,
+ /* [unique][out] */
+ __out_opt UINT64 *pu64DevicePosition,
+ /* [unique][out] */
+ __out_opt UINT64 *pu64QPCPosition) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE ReleaseBuffer(
+ /* [in] */
+ __in UINT32 NumFramesRead) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetNextPacketSize(
+ /* [out] */
+ __out UINT32 *pNumFramesInNextPacket) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct IAudioCaptureClientVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IAudioCaptureClient * This,
+ /* [in] */ REFIID riid,
+ /* [iid_is][out] */
+ __RPC__deref_out void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IAudioCaptureClient * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IAudioCaptureClient * This);
+
+ HRESULT ( STDMETHODCALLTYPE *GetBuffer )(
+ IAudioCaptureClient * This,
+ /* [out] */
+ __out BYTE **ppData,
+ /* [out] */
+ __out UINT32 *pNumFramesToRead,
+ /* [out] */
+ __out DWORD *pdwFlags,
+ /* [unique][out] */
+ __out_opt UINT64 *pu64DevicePosition,
+ /* [unique][out] */
+ __out_opt UINT64 *pu64QPCPosition);
+
+ HRESULT ( STDMETHODCALLTYPE *ReleaseBuffer )(
+ IAudioCaptureClient * This,
+ /* [in] */
+ __in UINT32 NumFramesRead);
+
+ HRESULT ( STDMETHODCALLTYPE *GetNextPacketSize )(
+ IAudioCaptureClient * This,
+ /* [out] */
+ __out UINT32 *pNumFramesInNextPacket);
+
+ END_INTERFACE
+ } IAudioCaptureClientVtbl;
+
+ interface IAudioCaptureClient
+ {
+ CONST_VTBL struct IAudioCaptureClientVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IAudioCaptureClient_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IAudioCaptureClient_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IAudioCaptureClient_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IAudioCaptureClient_GetBuffer(This,ppData,pNumFramesToRead,pdwFlags,pu64DevicePosition,pu64QPCPosition) \
+ ( (This)->lpVtbl -> GetBuffer(This,ppData,pNumFramesToRead,pdwFlags,pu64DevicePosition,pu64QPCPosition) )
+
+#define IAudioCaptureClient_ReleaseBuffer(This,NumFramesRead) \
+ ( (This)->lpVtbl -> ReleaseBuffer(This,NumFramesRead) )
+
+#define IAudioCaptureClient_GetNextPacketSize(This,pNumFramesInNextPacket) \
+ ( (This)->lpVtbl -> GetNextPacketSize(This,pNumFramesInNextPacket) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IAudioCaptureClient_INTERFACE_DEFINED__ */
+
+
+/* interface __MIDL_itf_audioclient_0000_0003 */
+/* [local] */
+
+#define AUDIOCLOCK_CHARACTERISTIC_FIXED_FREQ 0x00000001
+
+
+extern RPC_IF_HANDLE __MIDL_itf_audioclient_0000_0003_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_audioclient_0000_0003_v0_0_s_ifspec;
+
+#ifndef __IAudioClock_INTERFACE_DEFINED__
+#define __IAudioClock_INTERFACE_DEFINED__
+
+/* interface IAudioClock */
+/* [local][unique][uuid][object] */
+
+
+EXTERN_C const IID IID_IAudioClock;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("CD63314F-3FBA-4a1b-812C-EF96358728E7")
+ IAudioClock : public IUnknown
+ {
+ public:
+ virtual HRESULT STDMETHODCALLTYPE GetFrequency(
+ /* [out] */
+ __out UINT64 *pu64Frequency) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetPosition(
+ /* [out] */
+ __out UINT64 *pu64Position,
+ /* [unique][out] */
+ __out_opt UINT64 *pu64QPCPosition) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetCharacteristics(
+ /* [out] */
+ __out DWORD *pdwCharacteristics) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct IAudioClockVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IAudioClock * This,
+ /* [in] */ REFIID riid,
+ /* [iid_is][out] */
+ __RPC__deref_out void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IAudioClock * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IAudioClock * This);
+
+ HRESULT ( STDMETHODCALLTYPE *GetFrequency )(
+ IAudioClock * This,
+ /* [out] */
+ __out UINT64 *pu64Frequency);
+
+ HRESULT ( STDMETHODCALLTYPE *GetPosition )(
+ IAudioClock * This,
+ /* [out] */
+ __out UINT64 *pu64Position,
+ /* [unique][out] */
+ __out_opt UINT64 *pu64QPCPosition);
+
+ HRESULT ( STDMETHODCALLTYPE *GetCharacteristics )(
+ IAudioClock * This,
+ /* [out] */
+ __out DWORD *pdwCharacteristics);
+
+ END_INTERFACE
+ } IAudioClockVtbl;
+
+ interface IAudioClock
+ {
+ CONST_VTBL struct IAudioClockVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IAudioClock_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IAudioClock_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IAudioClock_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IAudioClock_GetFrequency(This,pu64Frequency) \
+ ( (This)->lpVtbl -> GetFrequency(This,pu64Frequency) )
+
+#define IAudioClock_GetPosition(This,pu64Position,pu64QPCPosition) \
+ ( (This)->lpVtbl -> GetPosition(This,pu64Position,pu64QPCPosition) )
+
+#define IAudioClock_GetCharacteristics(This,pdwCharacteristics) \
+ ( (This)->lpVtbl -> GetCharacteristics(This,pdwCharacteristics) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IAudioClock_INTERFACE_DEFINED__ */
+
+
+#ifndef __ISimpleAudioVolume_INTERFACE_DEFINED__
+#define __ISimpleAudioVolume_INTERFACE_DEFINED__
+
+/* interface ISimpleAudioVolume */
+/* [local][unique][uuid][object] */
+
+
+EXTERN_C const IID IID_ISimpleAudioVolume;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("87CE5498-68D6-44E5-9215-6DA47EF883D8")
+ ISimpleAudioVolume : public IUnknown
+ {
+ public:
+ virtual HRESULT STDMETHODCALLTYPE SetMasterVolume(
+ /* [in] */
+ __in float fLevel,
+ /* [unique][in] */ LPCGUID EventContext) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetMasterVolume(
+ /* [out] */
+ __out float *pfLevel) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE SetMute(
+ /* [in] */
+ __in const BOOL bMute,
+ /* [unique][in] */ LPCGUID EventContext) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetMute(
+ /* [out] */
+ __out BOOL *pbMute) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct ISimpleAudioVolumeVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ ISimpleAudioVolume * This,
+ /* [in] */ REFIID riid,
+ /* [iid_is][out] */
+ __RPC__deref_out void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ ISimpleAudioVolume * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ ISimpleAudioVolume * This);
+
+ HRESULT ( STDMETHODCALLTYPE *SetMasterVolume )(
+ ISimpleAudioVolume * This,
+ /* [in] */
+ __in float fLevel,
+ /* [unique][in] */ LPCGUID EventContext);
+
+ HRESULT ( STDMETHODCALLTYPE *GetMasterVolume )(
+ ISimpleAudioVolume * This,
+ /* [out] */
+ __out float *pfLevel);
+
+ HRESULT ( STDMETHODCALLTYPE *SetMute )(
+ ISimpleAudioVolume * This,
+ /* [in] */
+ __in const BOOL bMute,
+ /* [unique][in] */ LPCGUID EventContext);
+
+ HRESULT ( STDMETHODCALLTYPE *GetMute )(
+ ISimpleAudioVolume * This,
+ /* [out] */
+ __out BOOL *pbMute);
+
+ END_INTERFACE
+ } ISimpleAudioVolumeVtbl;
+
+ interface ISimpleAudioVolume
+ {
+ CONST_VTBL struct ISimpleAudioVolumeVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define ISimpleAudioVolume_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define ISimpleAudioVolume_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define ISimpleAudioVolume_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define ISimpleAudioVolume_SetMasterVolume(This,fLevel,EventContext) \
+ ( (This)->lpVtbl -> SetMasterVolume(This,fLevel,EventContext) )
+
+#define ISimpleAudioVolume_GetMasterVolume(This,pfLevel) \
+ ( (This)->lpVtbl -> GetMasterVolume(This,pfLevel) )
+
+#define ISimpleAudioVolume_SetMute(This,bMute,EventContext) \
+ ( (This)->lpVtbl -> SetMute(This,bMute,EventContext) )
+
+#define ISimpleAudioVolume_GetMute(This,pbMute) \
+ ( (This)->lpVtbl -> GetMute(This,pbMute) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __ISimpleAudioVolume_INTERFACE_DEFINED__ */
+
+
+#ifndef __IAudioStreamVolume_INTERFACE_DEFINED__
+#define __IAudioStreamVolume_INTERFACE_DEFINED__
+
+/* interface IAudioStreamVolume */
+/* [local][unique][uuid][object] */
+
+
+EXTERN_C const IID IID_IAudioStreamVolume;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("93014887-242D-4068-8A15-CF5E93B90FE3")
+ IAudioStreamVolume : public IUnknown
+ {
+ public:
+ virtual HRESULT STDMETHODCALLTYPE GetChannelCount(
+ /* [out] */
+ __out UINT32 *pdwCount) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE SetChannelVolume(
+ /* [in] */
+ __in UINT32 dwIndex,
+ /* [in] */
+ __in const float fLevel) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetChannelVolume(
+ /* [in] */
+ __in UINT32 dwIndex,
+ /* [out] */
+ __out float *pfLevel) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE SetAllVolumes(
+ /* [in] */
+ __in UINT32 dwCount,
+ /* [size_is][in] */
+ __in_ecount(dwCount) const float *pfVolumes) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetAllVolumes(
+ /* [in] */
+ __in UINT32 dwCount,
+ /* [size_is][out] */
+ __out_ecount(dwCount) float *pfVolumes) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct IAudioStreamVolumeVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IAudioStreamVolume * This,
+ /* [in] */ REFIID riid,
+ /* [iid_is][out] */
+ __RPC__deref_out void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IAudioStreamVolume * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IAudioStreamVolume * This);
+
+ HRESULT ( STDMETHODCALLTYPE *GetChannelCount )(
+ IAudioStreamVolume * This,
+ /* [out] */
+ __out UINT32 *pdwCount);
+
+ HRESULT ( STDMETHODCALLTYPE *SetChannelVolume )(
+ IAudioStreamVolume * This,
+ /* [in] */
+ __in UINT32 dwIndex,
+ /* [in] */
+ __in const float fLevel);
+
+ HRESULT ( STDMETHODCALLTYPE *GetChannelVolume )(
+ IAudioStreamVolume * This,
+ /* [in] */
+ __in UINT32 dwIndex,
+ /* [out] */
+ __out float *pfLevel);
+
+ HRESULT ( STDMETHODCALLTYPE *SetAllVolumes )(
+ IAudioStreamVolume * This,
+ /* [in] */
+ __in UINT32 dwCount,
+ /* [size_is][in] */
+ __in_ecount(dwCount) const float *pfVolumes);
+
+ HRESULT ( STDMETHODCALLTYPE *GetAllVolumes )(
+ IAudioStreamVolume * This,
+ /* [in] */
+ __in UINT32 dwCount,
+ /* [size_is][out] */
+ __out_ecount(dwCount) float *pfVolumes);
+
+ END_INTERFACE
+ } IAudioStreamVolumeVtbl;
+
+ interface IAudioStreamVolume
+ {
+ CONST_VTBL struct IAudioStreamVolumeVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IAudioStreamVolume_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IAudioStreamVolume_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IAudioStreamVolume_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IAudioStreamVolume_GetChannelCount(This,pdwCount) \
+ ( (This)->lpVtbl -> GetChannelCount(This,pdwCount) )
+
+#define IAudioStreamVolume_SetChannelVolume(This,dwIndex,fLevel) \
+ ( (This)->lpVtbl -> SetChannelVolume(This,dwIndex,fLevel) )
+
+#define IAudioStreamVolume_GetChannelVolume(This,dwIndex,pfLevel) \
+ ( (This)->lpVtbl -> GetChannelVolume(This,dwIndex,pfLevel) )
+
+#define IAudioStreamVolume_SetAllVolumes(This,dwCount,pfVolumes) \
+ ( (This)->lpVtbl -> SetAllVolumes(This,dwCount,pfVolumes) )
+
+#define IAudioStreamVolume_GetAllVolumes(This,dwCount,pfVolumes) \
+ ( (This)->lpVtbl -> GetAllVolumes(This,dwCount,pfVolumes) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IAudioStreamVolume_INTERFACE_DEFINED__ */
+
+
+#ifndef __IChannelAudioVolume_INTERFACE_DEFINED__
+#define __IChannelAudioVolume_INTERFACE_DEFINED__
+
+/* interface IChannelAudioVolume */
+/* [local][unique][uuid][object] */
+
+
+EXTERN_C const IID IID_IChannelAudioVolume;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("1C158861-B533-4B30-B1CF-E853E51C59B8")
+ IChannelAudioVolume : public IUnknown
+ {
+ public:
+ virtual HRESULT STDMETHODCALLTYPE GetChannelCount(
+ /* [out] */
+ __out UINT32 *pdwCount) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE SetChannelVolume(
+ /* [in] */
+ __in UINT32 dwIndex,
+ /* [in] */
+ __in const float fLevel,
+ /* [unique][in] */ LPCGUID EventContext) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetChannelVolume(
+ /* [in] */
+ __in UINT32 dwIndex,
+ /* [out] */
+ __out float *pfLevel) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE SetAllVolumes(
+ /* [in] */
+ __in UINT32 dwCount,
+ /* [size_is][in] */
+ __in_ecount(dwCount) const float *pfVolumes,
+ /* [unique][in] */ LPCGUID EventContext) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetAllVolumes(
+ /* [in] */
+ __in UINT32 dwCount,
+ /* [size_is][out] */
+ __out_ecount(dwCount) float *pfVolumes) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct IChannelAudioVolumeVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IChannelAudioVolume * This,
+ /* [in] */ REFIID riid,
+ /* [iid_is][out] */
+ __RPC__deref_out void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IChannelAudioVolume * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IChannelAudioVolume * This);
+
+ HRESULT ( STDMETHODCALLTYPE *GetChannelCount )(
+ IChannelAudioVolume * This,
+ /* [out] */
+ __out UINT32 *pdwCount);
+
+ HRESULT ( STDMETHODCALLTYPE *SetChannelVolume )(
+ IChannelAudioVolume * This,
+ /* [in] */
+ __in UINT32 dwIndex,
+ /* [in] */
+ __in const float fLevel,
+ /* [unique][in] */ LPCGUID EventContext);
+
+ HRESULT ( STDMETHODCALLTYPE *GetChannelVolume )(
+ IChannelAudioVolume * This,
+ /* [in] */
+ __in UINT32 dwIndex,
+ /* [out] */
+ __out float *pfLevel);
+
+ HRESULT ( STDMETHODCALLTYPE *SetAllVolumes )(
+ IChannelAudioVolume * This,
+ /* [in] */
+ __in UINT32 dwCount,
+ /* [size_is][in] */
+ __in_ecount(dwCount) const float *pfVolumes,
+ /* [unique][in] */ LPCGUID EventContext);
+
+ HRESULT ( STDMETHODCALLTYPE *GetAllVolumes )(
+ IChannelAudioVolume * This,
+ /* [in] */
+ __in UINT32 dwCount,
+ /* [size_is][out] */
+ __out_ecount(dwCount) float *pfVolumes);
+
+ END_INTERFACE
+ } IChannelAudioVolumeVtbl;
+
+ interface IChannelAudioVolume
+ {
+ CONST_VTBL struct IChannelAudioVolumeVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IChannelAudioVolume_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IChannelAudioVolume_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IChannelAudioVolume_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IChannelAudioVolume_GetChannelCount(This,pdwCount) \
+ ( (This)->lpVtbl -> GetChannelCount(This,pdwCount) )
+
+#define IChannelAudioVolume_SetChannelVolume(This,dwIndex,fLevel,EventContext) \
+ ( (This)->lpVtbl -> SetChannelVolume(This,dwIndex,fLevel,EventContext) )
+
+#define IChannelAudioVolume_GetChannelVolume(This,dwIndex,pfLevel) \
+ ( (This)->lpVtbl -> GetChannelVolume(This,dwIndex,pfLevel) )
+
+#define IChannelAudioVolume_SetAllVolumes(This,dwCount,pfVolumes,EventContext) \
+ ( (This)->lpVtbl -> SetAllVolumes(This,dwCount,pfVolumes,EventContext) )
+
+#define IChannelAudioVolume_GetAllVolumes(This,dwCount,pfVolumes) \
+ ( (This)->lpVtbl -> GetAllVolumes(This,dwCount,pfVolumes) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IChannelAudioVolume_INTERFACE_DEFINED__ */
+
+
+/* interface __MIDL_itf_audioclient_0000_0007 */
+/* [local] */
+
+#define FACILITY_AUDCLNT 0x889
+#define AUDCLNT_ERR(n) MAKE_HRESULT(SEVERITY_ERROR, FACILITY_AUDCLNT, n)
+#define AUDCLNT_SUCCESS(n) MAKE_SCODE(SEVERITY_SUCCESS, FACILITY_AUDCLNT, n)
+#define AUDCLNT_E_NOT_INITIALIZED AUDCLNT_ERR(0x001)
+#define AUDCLNT_E_ALREADY_INITIALIZED AUDCLNT_ERR(0x002)
+#define AUDCLNT_E_WRONG_ENDPOINT_TYPE AUDCLNT_ERR(0x003)
+#define AUDCLNT_E_DEVICE_INVALIDATED AUDCLNT_ERR(0x004)
+#define AUDCLNT_E_NOT_STOPPED AUDCLNT_ERR(0x005)
+#define AUDCLNT_E_BUFFER_TOO_LARGE AUDCLNT_ERR(0x006)
+#define AUDCLNT_E_OUT_OF_ORDER AUDCLNT_ERR(0x007)
+#define AUDCLNT_E_UNSUPPORTED_FORMAT AUDCLNT_ERR(0x008)
+#define AUDCLNT_E_INVALID_SIZE AUDCLNT_ERR(0x009)
+#define AUDCLNT_E_DEVICE_IN_USE AUDCLNT_ERR(0x00a)
+#define AUDCLNT_E_BUFFER_OPERATION_PENDING AUDCLNT_ERR(0x00b)
+#define AUDCLNT_E_THREAD_NOT_REGISTERED AUDCLNT_ERR(0x00c)
+#define AUDCLNT_E_EXCLUSIVE_MODE_NOT_ALLOWED AUDCLNT_ERR(0x00e)
+#define AUDCLNT_E_ENDPOINT_CREATE_FAILED AUDCLNT_ERR(0x00f)
+#define AUDCLNT_E_SERVICE_NOT_RUNNING AUDCLNT_ERR(0x010)
+#define AUDCLNT_E_EVENTHANDLE_NOT_EXPECTED AUDCLNT_ERR(0x011)
+#define AUDCLNT_E_EXCLUSIVE_MODE_ONLY AUDCLNT_ERR(0x012)
+#define AUDCLNT_E_BUFDURATION_PERIOD_NOT_EQUAL AUDCLNT_ERR(0x013)
+#define AUDCLNT_E_EVENTHANDLE_NOT_SET AUDCLNT_ERR(0x014)
+#define AUDCLNT_E_INCORRECT_BUFFER_SIZE AUDCLNT_ERR(0x015)
+#define AUDCLNT_E_BUFFER_SIZE_ERROR AUDCLNT_ERR(0x016)
+#define AUDCLNT_E_CPUUSAGE_EXCEEDED AUDCLNT_ERR(0x017)
+#define AUDCLNT_S_BUFFER_EMPTY AUDCLNT_SUCCESS(0x001)
+#define AUDCLNT_S_THREAD_ALREADY_REGISTERED AUDCLNT_SUCCESS(0x002)
+#define AUDCLNT_S_POSITION_STALLED AUDCLNT_SUCCESS(0x003)
+
+
+extern RPC_IF_HANDLE __MIDL_itf_audioclient_0000_0007_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_audioclient_0000_0007_v0_0_s_ifspec;
+
+/* Additional Prototypes for ALL interfaces */
+
+/* end of Additional Prototypes */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
+
+
-\r
-\r
-/* this ALWAYS GENERATED file contains the definitions for the interfaces */\r
-\r
-\r
- /* File created by MIDL compiler version 7.00.0499 */\r
-/* Compiler settings for devicetopology.idl:\r
- Oicf, W1, Zp8, env=Win32 (32b run)\r
- protocol : dce , ms_ext, c_ext, robust\r
- error checks: allocation ref bounds_check enum stub_data \r
- VC __declspec() decoration level: \r
- __declspec(uuid()), __declspec(selectany), __declspec(novtable)\r
- DECLSPEC_UUID(), MIDL_INTERFACE()\r
-*/\r
-//@@MIDL_FILE_HEADING( )\r
-\r
-#pragma warning( disable: 4049 ) /* more than 64k source lines */\r
-\r
-\r
-/* verify that the <rpcndr.h> version is high enough to compile this file*/\r
-#ifndef __REQUIRED_RPCNDR_H_VERSION__\r
-#define __REQUIRED_RPCNDR_H_VERSION__ 500\r
-#endif\r
-\r
-/* verify that the <rpcsal.h> version is high enough to compile this file*/\r
-#ifndef __REQUIRED_RPCSAL_H_VERSION__\r
-#define __REQUIRED_RPCSAL_H_VERSION__ 100\r
-#endif\r
-\r
-#include "rpc.h"\r
-#include "rpcndr.h"\r
-\r
-#ifndef __RPCNDR_H_VERSION__\r
-#error this stub requires an updated version of <rpcndr.h>\r
-#endif // __RPCNDR_H_VERSION__\r
-\r
-#ifndef COM_NO_WINDOWS_H\r
-#include "windows.h"\r
-#include "ole2.h"\r
-#endif /*COM_NO_WINDOWS_H*/\r
-\r
-#ifndef __devicetopology_h__\r
-#define __devicetopology_h__\r
-\r
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)\r
-#pragma once\r
-#endif\r
-\r
-/* Forward Declarations */ \r
-\r
-#ifndef __IKsControl_FWD_DEFINED__\r
-#define __IKsControl_FWD_DEFINED__\r
-typedef interface IKsControl IKsControl;\r
-#endif /* __IKsControl_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __IPerChannelDbLevel_FWD_DEFINED__\r
-#define __IPerChannelDbLevel_FWD_DEFINED__\r
-typedef interface IPerChannelDbLevel IPerChannelDbLevel;\r
-#endif /* __IPerChannelDbLevel_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __IAudioVolumeLevel_FWD_DEFINED__\r
-#define __IAudioVolumeLevel_FWD_DEFINED__\r
-typedef interface IAudioVolumeLevel IAudioVolumeLevel;\r
-#endif /* __IAudioVolumeLevel_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __IAudioChannelConfig_FWD_DEFINED__\r
-#define __IAudioChannelConfig_FWD_DEFINED__\r
-typedef interface IAudioChannelConfig IAudioChannelConfig;\r
-#endif /* __IAudioChannelConfig_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __IAudioLoudness_FWD_DEFINED__\r
-#define __IAudioLoudness_FWD_DEFINED__\r
-typedef interface IAudioLoudness IAudioLoudness;\r
-#endif /* __IAudioLoudness_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __IAudioInputSelector_FWD_DEFINED__\r
-#define __IAudioInputSelector_FWD_DEFINED__\r
-typedef interface IAudioInputSelector IAudioInputSelector;\r
-#endif /* __IAudioInputSelector_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __IAudioOutputSelector_FWD_DEFINED__\r
-#define __IAudioOutputSelector_FWD_DEFINED__\r
-typedef interface IAudioOutputSelector IAudioOutputSelector;\r
-#endif /* __IAudioOutputSelector_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __IAudioMute_FWD_DEFINED__\r
-#define __IAudioMute_FWD_DEFINED__\r
-typedef interface IAudioMute IAudioMute;\r
-#endif /* __IAudioMute_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __IAudioBass_FWD_DEFINED__\r
-#define __IAudioBass_FWD_DEFINED__\r
-typedef interface IAudioBass IAudioBass;\r
-#endif /* __IAudioBass_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __IAudioMidrange_FWD_DEFINED__\r
-#define __IAudioMidrange_FWD_DEFINED__\r
-typedef interface IAudioMidrange IAudioMidrange;\r
-#endif /* __IAudioMidrange_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __IAudioTreble_FWD_DEFINED__\r
-#define __IAudioTreble_FWD_DEFINED__\r
-typedef interface IAudioTreble IAudioTreble;\r
-#endif /* __IAudioTreble_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __IAudioAutoGainControl_FWD_DEFINED__\r
-#define __IAudioAutoGainControl_FWD_DEFINED__\r
-typedef interface IAudioAutoGainControl IAudioAutoGainControl;\r
-#endif /* __IAudioAutoGainControl_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __IAudioPeakMeter_FWD_DEFINED__\r
-#define __IAudioPeakMeter_FWD_DEFINED__\r
-typedef interface IAudioPeakMeter IAudioPeakMeter;\r
-#endif /* __IAudioPeakMeter_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __IDeviceSpecificProperty_FWD_DEFINED__\r
-#define __IDeviceSpecificProperty_FWD_DEFINED__\r
-typedef interface IDeviceSpecificProperty IDeviceSpecificProperty;\r
-#endif /* __IDeviceSpecificProperty_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __IKsFormatSupport_FWD_DEFINED__\r
-#define __IKsFormatSupport_FWD_DEFINED__\r
-typedef interface IKsFormatSupport IKsFormatSupport;\r
-#endif /* __IKsFormatSupport_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __IKsJackDescription_FWD_DEFINED__\r
-#define __IKsJackDescription_FWD_DEFINED__\r
-typedef interface IKsJackDescription IKsJackDescription;\r
-#endif /* __IKsJackDescription_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __IPartsList_FWD_DEFINED__\r
-#define __IPartsList_FWD_DEFINED__\r
-typedef interface IPartsList IPartsList;\r
-#endif /* __IPartsList_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __IPart_FWD_DEFINED__\r
-#define __IPart_FWD_DEFINED__\r
-typedef interface IPart IPart;\r
-#endif /* __IPart_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __IConnector_FWD_DEFINED__\r
-#define __IConnector_FWD_DEFINED__\r
-typedef interface IConnector IConnector;\r
-#endif /* __IConnector_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __ISubunit_FWD_DEFINED__\r
-#define __ISubunit_FWD_DEFINED__\r
-typedef interface ISubunit ISubunit;\r
-#endif /* __ISubunit_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __IControlInterface_FWD_DEFINED__\r
-#define __IControlInterface_FWD_DEFINED__\r
-typedef interface IControlInterface IControlInterface;\r
-#endif /* __IControlInterface_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __IControlChangeNotify_FWD_DEFINED__\r
-#define __IControlChangeNotify_FWD_DEFINED__\r
-typedef interface IControlChangeNotify IControlChangeNotify;\r
-#endif /* __IControlChangeNotify_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __IDeviceTopology_FWD_DEFINED__\r
-#define __IDeviceTopology_FWD_DEFINED__\r
-typedef interface IDeviceTopology IDeviceTopology;\r
-#endif /* __IDeviceTopology_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __DeviceTopology_FWD_DEFINED__\r
-#define __DeviceTopology_FWD_DEFINED__\r
-\r
-#ifdef __cplusplus\r
-typedef class DeviceTopology DeviceTopology;\r
-#else\r
-typedef struct DeviceTopology DeviceTopology;\r
-#endif /* __cplusplus */\r
-\r
-#endif /* __DeviceTopology_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __IPartsList_FWD_DEFINED__\r
-#define __IPartsList_FWD_DEFINED__\r
-typedef interface IPartsList IPartsList;\r
-#endif /* __IPartsList_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __IPerChannelDbLevel_FWD_DEFINED__\r
-#define __IPerChannelDbLevel_FWD_DEFINED__\r
-typedef interface IPerChannelDbLevel IPerChannelDbLevel;\r
-#endif /* __IPerChannelDbLevel_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __IAudioVolumeLevel_FWD_DEFINED__\r
-#define __IAudioVolumeLevel_FWD_DEFINED__\r
-typedef interface IAudioVolumeLevel IAudioVolumeLevel;\r
-#endif /* __IAudioVolumeLevel_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __IAudioLoudness_FWD_DEFINED__\r
-#define __IAudioLoudness_FWD_DEFINED__\r
-typedef interface IAudioLoudness IAudioLoudness;\r
-#endif /* __IAudioLoudness_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __IAudioInputSelector_FWD_DEFINED__\r
-#define __IAudioInputSelector_FWD_DEFINED__\r
-typedef interface IAudioInputSelector IAudioInputSelector;\r
-#endif /* __IAudioInputSelector_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __IAudioMute_FWD_DEFINED__\r
-#define __IAudioMute_FWD_DEFINED__\r
-typedef interface IAudioMute IAudioMute;\r
-#endif /* __IAudioMute_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __IAudioBass_FWD_DEFINED__\r
-#define __IAudioBass_FWD_DEFINED__\r
-typedef interface IAudioBass IAudioBass;\r
-#endif /* __IAudioBass_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __IAudioMidrange_FWD_DEFINED__\r
-#define __IAudioMidrange_FWD_DEFINED__\r
-typedef interface IAudioMidrange IAudioMidrange;\r
-#endif /* __IAudioMidrange_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __IAudioTreble_FWD_DEFINED__\r
-#define __IAudioTreble_FWD_DEFINED__\r
-typedef interface IAudioTreble IAudioTreble;\r
-#endif /* __IAudioTreble_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __IAudioAutoGainControl_FWD_DEFINED__\r
-#define __IAudioAutoGainControl_FWD_DEFINED__\r
-typedef interface IAudioAutoGainControl IAudioAutoGainControl;\r
-#endif /* __IAudioAutoGainControl_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __IAudioOutputSelector_FWD_DEFINED__\r
-#define __IAudioOutputSelector_FWD_DEFINED__\r
-typedef interface IAudioOutputSelector IAudioOutputSelector;\r
-#endif /* __IAudioOutputSelector_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __IAudioPeakMeter_FWD_DEFINED__\r
-#define __IAudioPeakMeter_FWD_DEFINED__\r
-typedef interface IAudioPeakMeter IAudioPeakMeter;\r
-#endif /* __IAudioPeakMeter_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __IDeviceSpecificProperty_FWD_DEFINED__\r
-#define __IDeviceSpecificProperty_FWD_DEFINED__\r
-typedef interface IDeviceSpecificProperty IDeviceSpecificProperty;\r
-#endif /* __IDeviceSpecificProperty_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __IKsFormatSupport_FWD_DEFINED__\r
-#define __IKsFormatSupport_FWD_DEFINED__\r
-typedef interface IKsFormatSupport IKsFormatSupport;\r
-#endif /* __IKsFormatSupport_FWD_DEFINED__ */\r
-\r
-\r
-/* header files for imported files */\r
-#include "oaidl.h"\r
-#include "ocidl.h"\r
-#include "propidl.h"\r
-\r
-#ifdef __cplusplus\r
-extern "C"{\r
-#endif \r
-\r
-\r
-/* interface __MIDL_itf_devicetopology_0000_0000 */\r
-/* [local] */ \r
-\r
-#define E_NOTFOUND HRESULT_FROM_WIN32(ERROR_NOT_FOUND)\r
-//\r
-// Flag for clients of IControlChangeNotify::OnNotify to allow those clients to identify hardware initiated notifications\r
-//\r
-#define DEVTOPO_HARDWARE_INITIATED_EVENTCONTEXT 'draH'\r
-/* E2C2E9DE-09B1-4B04-84E5-07931225EE04 */\r
-DEFINE_GUID(EVENTCONTEXT_VOLUMESLIDER, 0xE2C2E9DE,0x09B1,0x4B04,0x84, 0xE5, 0x07, 0x93, 0x12, 0x25, 0xEE, 0x04);\r
-#define _IKsControl_\r
-#include "ks.h"\r
-#include "ksmedia.h"\r
-#ifndef _KS_\r
-typedef /* [public] */ struct __MIDL___MIDL_itf_devicetopology_0000_0000_0001\r
- {\r
- ULONG FormatSize;\r
- ULONG Flags;\r
- ULONG SampleSize;\r
- ULONG Reserved;\r
- GUID MajorFormat;\r
- GUID SubFormat;\r
- GUID Specifier;\r
- } KSDATAFORMAT;\r
-\r
-typedef struct __MIDL___MIDL_itf_devicetopology_0000_0000_0001 *PKSDATAFORMAT;\r
-\r
-typedef /* [public][public][public][public][public][public][public][public][public][public] */ struct __MIDL___MIDL_itf_devicetopology_0000_0000_0002\r
- {\r
- union \r
- {\r
- struct \r
- {\r
- GUID Set;\r
- ULONG Id;\r
- ULONG Flags;\r
- } ;\r
- LONGLONG Alignment;\r
- } ;\r
- } KSIDENTIFIER;\r
-\r
-typedef struct __MIDL___MIDL_itf_devicetopology_0000_0000_0002 *PKSIDENTIFIER;\r
-\r
-typedef /* [public][public][public][public] */ \r
-enum __MIDL___MIDL_itf_devicetopology_0000_0000_0005\r
- { ePcxChanMap_FL_FR = 0,\r
- ePcxChanMap_FC_LFE = ( ePcxChanMap_FL_FR + 1 ) ,\r
- ePcxChanMap_BL_BR = ( ePcxChanMap_FC_LFE + 1 ) ,\r
- ePcxChanMap_FLC_FRC = ( ePcxChanMap_BL_BR + 1 ) ,\r
- ePcxChanMap_SL_SR = ( ePcxChanMap_FLC_FRC + 1 ) ,\r
- ePcxChanMap_Unknown = ( ePcxChanMap_SL_SR + 1 ) \r
- } EChannelMapping;\r
-\r
-typedef /* [public][public][public][public] */ \r
-enum __MIDL___MIDL_itf_devicetopology_0000_0000_0006\r
- { eConnTypeUnknown = 0,\r
- eConnTypeEighth = ( eConnTypeUnknown + 1 ) ,\r
- eConnTypeQuarter = ( eConnTypeEighth + 1 ) ,\r
- eConnTypeAtapiInternal = ( eConnTypeQuarter + 1 ) ,\r
- eConnTypeRCA = ( eConnTypeAtapiInternal + 1 ) ,\r
- eConnTypeOptical = ( eConnTypeRCA + 1 ) ,\r
- eConnTypeOtherDigital = ( eConnTypeOptical + 1 ) ,\r
- eConnTypeOtherAnalog = ( eConnTypeOtherDigital + 1 ) ,\r
- eConnTypeMultichannelAnalogDIN = ( eConnTypeOtherAnalog + 1 ) ,\r
- eConnTypeXlrProfessional = ( eConnTypeMultichannelAnalogDIN + 1 ) ,\r
- eConnTypeRJ11Modem = ( eConnTypeXlrProfessional + 1 ) ,\r
- eConnTypeCombination = ( eConnTypeRJ11Modem + 1 ) \r
- } EPcxConnectionType;\r
-\r
-typedef /* [public][public][public][public] */ \r
-enum __MIDL___MIDL_itf_devicetopology_0000_0000_0007\r
- { eGeoLocRear = 0x1,\r
- eGeoLocFront = ( eGeoLocRear + 1 ) ,\r
- eGeoLocLeft = ( eGeoLocFront + 1 ) ,\r
- eGeoLocRight = ( eGeoLocLeft + 1 ) ,\r
- eGeoLocTop = ( eGeoLocRight + 1 ) ,\r
- eGeoLocBottom = ( eGeoLocTop + 1 ) ,\r
- eGeoLocRearOPanel = ( eGeoLocBottom + 1 ) ,\r
- eGeoLocRiser = ( eGeoLocRearOPanel + 1 ) ,\r
- eGeoLocInsideMobileLid = ( eGeoLocRiser + 1 ) ,\r
- eGeoLocDrivebay = ( eGeoLocInsideMobileLid + 1 ) ,\r
- eGeoLocHDMI = ( eGeoLocDrivebay + 1 ) ,\r
- eGeoLocOutsideMobileLid = ( eGeoLocHDMI + 1 ) ,\r
- eGeoLocATAPI = ( eGeoLocOutsideMobileLid + 1 ) ,\r
- eGeoLocReserved5 = ( eGeoLocATAPI + 1 ) ,\r
- eGeoLocReserved6 = ( eGeoLocReserved5 + 1 ) \r
- } EPcxGeoLocation;\r
-\r
-typedef /* [public][public][public][public] */ \r
-enum __MIDL___MIDL_itf_devicetopology_0000_0000_0008\r
- { eGenLocPrimaryBox = 0,\r
- eGenLocInternal = ( eGenLocPrimaryBox + 1 ) ,\r
- eGenLocSeperate = ( eGenLocInternal + 1 ) ,\r
- eGenLocOther = ( eGenLocSeperate + 1 ) \r
- } EPcxGenLocation;\r
-\r
-typedef /* [public][public][public][public] */ \r
-enum __MIDL___MIDL_itf_devicetopology_0000_0000_0009\r
- { ePortConnJack = 0,\r
- ePortConnIntegratedDevice = ( ePortConnJack + 1 ) ,\r
- ePortConnBothIntegratedAndJack = ( ePortConnIntegratedDevice + 1 ) ,\r
- ePortConnUnknown = ( ePortConnBothIntegratedAndJack + 1 ) \r
- } EPxcPortConnection;\r
-\r
-typedef /* [public][public] */ struct __MIDL___MIDL_itf_devicetopology_0000_0000_0010\r
- {\r
- EChannelMapping ChannelMapping;\r
- COLORREF Color;\r
- EPcxConnectionType ConnectionType;\r
- EPcxGeoLocation GeoLocation;\r
- EPcxGenLocation GenLocation;\r
- EPxcPortConnection PortConnection;\r
- BOOL IsConnected;\r
- } KSJACK_DESCRIPTION;\r
-\r
-typedef struct __MIDL___MIDL_itf_devicetopology_0000_0000_0010 *PKSJACK_DESCRIPTION;\r
-\r
-typedef KSIDENTIFIER KSPROPERTY;\r
-\r
-typedef KSIDENTIFIER *PKSPROPERTY;\r
-\r
-typedef KSIDENTIFIER KSMETHOD;\r
-\r
-typedef KSIDENTIFIER *PKSMETHOD;\r
-\r
-typedef KSIDENTIFIER KSEVENT;\r
-\r
-typedef KSIDENTIFIER *PKSEVENT;\r
-\r
-#endif\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-typedef /* [public][public] */ \r
-enum __MIDL___MIDL_itf_devicetopology_0000_0000_0011\r
- { In = 0,\r
- Out = ( In + 1 ) \r
- } DataFlow;\r
-\r
-typedef /* [public][public] */ \r
-enum __MIDL___MIDL_itf_devicetopology_0000_0000_0012\r
- { Connector = 0,\r
- Subunit = ( Connector + 1 ) \r
- } PartType;\r
-\r
-#define PARTTYPE_FLAG_CONNECTOR 0x00010000\r
-#define PARTTYPE_FLAG_SUBUNIT 0x00020000\r
-#define PARTTYPE_MASK 0x00030000\r
-#define PARTID_MASK 0x0000ffff\r
-typedef /* [public][public] */ \r
-enum __MIDL___MIDL_itf_devicetopology_0000_0000_0013\r
- { Unknown_Connector = 0,\r
- Physical_Internal = ( Unknown_Connector + 1 ) ,\r
- Physical_External = ( Physical_Internal + 1 ) ,\r
- Software_IO = ( Physical_External + 1 ) ,\r
- Software_Fixed = ( Software_IO + 1 ) ,\r
- Network = ( Software_Fixed + 1 ) \r
- } ConnectorType;\r
-\r
-\r
-\r
-extern RPC_IF_HANDLE __MIDL_itf_devicetopology_0000_0000_v0_0_c_ifspec;\r
-extern RPC_IF_HANDLE __MIDL_itf_devicetopology_0000_0000_v0_0_s_ifspec;\r
-\r
-#ifndef __IKsControl_INTERFACE_DEFINED__\r
-#define __IKsControl_INTERFACE_DEFINED__\r
-\r
-/* interface IKsControl */\r
-/* [unique][helpstring][nonextensible][uuid][local][object] */ \r
-\r
-\r
-EXTERN_C const IID IID_IKsControl;\r
-\r
-#if defined(__cplusplus) && !defined(CINTERFACE)\r
- \r
- MIDL_INTERFACE("28F54685-06FD-11D2-B27A-00A0C9223196")\r
- IKsControl : public IUnknown\r
- {\r
- public:\r
- virtual HRESULT STDMETHODCALLTYPE KsProperty( \r
- /* [in] */ PKSPROPERTY Property,\r
- /* [in] */ ULONG PropertyLength,\r
- /* [out][in] */ void *PropertyData,\r
- /* [in] */ ULONG DataLength,\r
- /* [out] */ ULONG *BytesReturned) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE KsMethod( \r
- /* [in] */ PKSMETHOD Method,\r
- /* [in] */ ULONG MethodLength,\r
- /* [out][in] */ void *MethodData,\r
- /* [in] */ ULONG DataLength,\r
- /* [out] */ ULONG *BytesReturned) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE KsEvent( \r
- /* [in] */ PKSEVENT Event,\r
- /* [in] */ ULONG EventLength,\r
- /* [out][in] */ void *EventData,\r
- /* [in] */ ULONG DataLength,\r
- /* [out] */ ULONG *BytesReturned) = 0;\r
- \r
- };\r
- \r
-#else /* C style interface */\r
-\r
- typedef struct IKsControlVtbl\r
- {\r
- BEGIN_INTERFACE\r
- \r
- HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r
- IKsControl * This,\r
- /* [in] */ REFIID riid,\r
- /* [iid_is][out] */ \r
- __RPC__deref_out void **ppvObject);\r
- \r
- ULONG ( STDMETHODCALLTYPE *AddRef )( \r
- IKsControl * This);\r
- \r
- ULONG ( STDMETHODCALLTYPE *Release )( \r
- IKsControl * This);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *KsProperty )( \r
- IKsControl * This,\r
- /* [in] */ PKSPROPERTY Property,\r
- /* [in] */ ULONG PropertyLength,\r
- /* [out][in] */ void *PropertyData,\r
- /* [in] */ ULONG DataLength,\r
- /* [out] */ ULONG *BytesReturned);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *KsMethod )( \r
- IKsControl * This,\r
- /* [in] */ PKSMETHOD Method,\r
- /* [in] */ ULONG MethodLength,\r
- /* [out][in] */ void *MethodData,\r
- /* [in] */ ULONG DataLength,\r
- /* [out] */ ULONG *BytesReturned);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *KsEvent )( \r
- IKsControl * This,\r
- /* [in] */ PKSEVENT Event,\r
- /* [in] */ ULONG EventLength,\r
- /* [out][in] */ void *EventData,\r
- /* [in] */ ULONG DataLength,\r
- /* [out] */ ULONG *BytesReturned);\r
- \r
- END_INTERFACE\r
- } IKsControlVtbl;\r
-\r
- interface IKsControl\r
- {\r
- CONST_VTBL struct IKsControlVtbl *lpVtbl;\r
- };\r
-\r
- \r
-\r
-#ifdef COBJMACROS\r
-\r
-\r
-#define IKsControl_QueryInterface(This,riid,ppvObject) \\r
- ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r
-\r
-#define IKsControl_AddRef(This) \\r
- ( (This)->lpVtbl -> AddRef(This) ) \r
-\r
-#define IKsControl_Release(This) \\r
- ( (This)->lpVtbl -> Release(This) ) \r
-\r
-\r
-#define IKsControl_KsProperty(This,Property,PropertyLength,PropertyData,DataLength,BytesReturned) \\r
- ( (This)->lpVtbl -> KsProperty(This,Property,PropertyLength,PropertyData,DataLength,BytesReturned) ) \r
-\r
-#define IKsControl_KsMethod(This,Method,MethodLength,MethodData,DataLength,BytesReturned) \\r
- ( (This)->lpVtbl -> KsMethod(This,Method,MethodLength,MethodData,DataLength,BytesReturned) ) \r
-\r
-#define IKsControl_KsEvent(This,Event,EventLength,EventData,DataLength,BytesReturned) \\r
- ( (This)->lpVtbl -> KsEvent(This,Event,EventLength,EventData,DataLength,BytesReturned) ) \r
-\r
-#endif /* COBJMACROS */\r
-\r
-\r
-#endif /* C style interface */\r
-\r
-\r
-\r
-\r
-#endif /* __IKsControl_INTERFACE_DEFINED__ */\r
-\r
-\r
-#ifndef __IPerChannelDbLevel_INTERFACE_DEFINED__\r
-#define __IPerChannelDbLevel_INTERFACE_DEFINED__\r
-\r
-/* interface IPerChannelDbLevel */\r
-/* [unique][helpstring][nonextensible][uuid][local][object] */ \r
-\r
-\r
-EXTERN_C const IID IID_IPerChannelDbLevel;\r
-\r
-#if defined(__cplusplus) && !defined(CINTERFACE)\r
- \r
- MIDL_INTERFACE("C2F8E001-F205-4BC9-99BC-C13B1E048CCB")\r
- IPerChannelDbLevel : public IUnknown\r
- {\r
- public:\r
- virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetChannelCount( \r
- /* [out] */ \r
- __out UINT *pcChannels) = 0;\r
- \r
- virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetLevelRange( \r
- /* [in] */ \r
- __in UINT nChannel,\r
- /* [out] */ \r
- __out float *pfMinLevelDB,\r
- /* [out] */ \r
- __out float *pfMaxLevelDB,\r
- /* [out] */ \r
- __out float *pfStepping) = 0;\r
- \r
- virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetLevel( \r
- /* [in] */ \r
- __in UINT nChannel,\r
- /* [out] */ \r
- __out float *pfLevelDB) = 0;\r
- \r
- virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE SetLevel( \r
- /* [in] */ \r
- __in UINT nChannel,\r
- /* [in] */ \r
- __in float fLevelDB,\r
- /* [unique][in] */ \r
- __in_opt LPCGUID pguidEventContext) = 0;\r
- \r
- virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE SetLevelUniform( \r
- /* [in] */ \r
- __in float fLevelDB,\r
- /* [unique][in] */ \r
- __in_opt LPCGUID pguidEventContext) = 0;\r
- \r
- virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE SetLevelAllChannels( \r
- /* [size_is][in] */ \r
- __in_ecount(cChannels) float aLevelsDB[ ],\r
- /* [in] */ \r
- __in ULONG cChannels,\r
- /* [unique][in] */ \r
- __in_opt LPCGUID pguidEventContext) = 0;\r
- \r
- };\r
- \r
-#else /* C style interface */\r
-\r
- typedef struct IPerChannelDbLevelVtbl\r
- {\r
- BEGIN_INTERFACE\r
- \r
- HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r
- IPerChannelDbLevel * This,\r
- /* [in] */ REFIID riid,\r
- /* [iid_is][out] */ \r
- __RPC__deref_out void **ppvObject);\r
- \r
- ULONG ( STDMETHODCALLTYPE *AddRef )( \r
- IPerChannelDbLevel * This);\r
- \r
- ULONG ( STDMETHODCALLTYPE *Release )( \r
- IPerChannelDbLevel * This);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetChannelCount )( \r
- IPerChannelDbLevel * This,\r
- /* [out] */ \r
- __out UINT *pcChannels);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetLevelRange )( \r
- IPerChannelDbLevel * This,\r
- /* [in] */ \r
- __in UINT nChannel,\r
- /* [out] */ \r
- __out float *pfMinLevelDB,\r
- /* [out] */ \r
- __out float *pfMaxLevelDB,\r
- /* [out] */ \r
- __out float *pfStepping);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetLevel )( \r
- IPerChannelDbLevel * This,\r
- /* [in] */ \r
- __in UINT nChannel,\r
- /* [out] */ \r
- __out float *pfLevelDB);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetLevel )( \r
- IPerChannelDbLevel * This,\r
- /* [in] */ \r
- __in UINT nChannel,\r
- /* [in] */ \r
- __in float fLevelDB,\r
- /* [unique][in] */ \r
- __in_opt LPCGUID pguidEventContext);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetLevelUniform )( \r
- IPerChannelDbLevel * This,\r
- /* [in] */ \r
- __in float fLevelDB,\r
- /* [unique][in] */ \r
- __in_opt LPCGUID pguidEventContext);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetLevelAllChannels )( \r
- IPerChannelDbLevel * This,\r
- /* [size_is][in] */ \r
- __in_ecount(cChannels) float aLevelsDB[ ],\r
- /* [in] */ \r
- __in ULONG cChannels,\r
- /* [unique][in] */ \r
- __in_opt LPCGUID pguidEventContext);\r
- \r
- END_INTERFACE\r
- } IPerChannelDbLevelVtbl;\r
-\r
- interface IPerChannelDbLevel\r
- {\r
- CONST_VTBL struct IPerChannelDbLevelVtbl *lpVtbl;\r
- };\r
-\r
- \r
-\r
-#ifdef COBJMACROS\r
-\r
-\r
-#define IPerChannelDbLevel_QueryInterface(This,riid,ppvObject) \\r
- ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r
-\r
-#define IPerChannelDbLevel_AddRef(This) \\r
- ( (This)->lpVtbl -> AddRef(This) ) \r
-\r
-#define IPerChannelDbLevel_Release(This) \\r
- ( (This)->lpVtbl -> Release(This) ) \r
-\r
-\r
-#define IPerChannelDbLevel_GetChannelCount(This,pcChannels) \\r
- ( (This)->lpVtbl -> GetChannelCount(This,pcChannels) ) \r
-\r
-#define IPerChannelDbLevel_GetLevelRange(This,nChannel,pfMinLevelDB,pfMaxLevelDB,pfStepping) \\r
- ( (This)->lpVtbl -> GetLevelRange(This,nChannel,pfMinLevelDB,pfMaxLevelDB,pfStepping) ) \r
-\r
-#define IPerChannelDbLevel_GetLevel(This,nChannel,pfLevelDB) \\r
- ( (This)->lpVtbl -> GetLevel(This,nChannel,pfLevelDB) ) \r
-\r
-#define IPerChannelDbLevel_SetLevel(This,nChannel,fLevelDB,pguidEventContext) \\r
- ( (This)->lpVtbl -> SetLevel(This,nChannel,fLevelDB,pguidEventContext) ) \r
-\r
-#define IPerChannelDbLevel_SetLevelUniform(This,fLevelDB,pguidEventContext) \\r
- ( (This)->lpVtbl -> SetLevelUniform(This,fLevelDB,pguidEventContext) ) \r
-\r
-#define IPerChannelDbLevel_SetLevelAllChannels(This,aLevelsDB,cChannels,pguidEventContext) \\r
- ( (This)->lpVtbl -> SetLevelAllChannels(This,aLevelsDB,cChannels,pguidEventContext) ) \r
-\r
-#endif /* COBJMACROS */\r
-\r
-\r
-#endif /* C style interface */\r
-\r
-\r
-\r
-\r
-#endif /* __IPerChannelDbLevel_INTERFACE_DEFINED__ */\r
-\r
-\r
-#ifndef __IAudioVolumeLevel_INTERFACE_DEFINED__\r
-#define __IAudioVolumeLevel_INTERFACE_DEFINED__\r
-\r
-/* interface IAudioVolumeLevel */\r
-/* [unique][helpstring][nonextensible][uuid][local][object] */ \r
-\r
-\r
-EXTERN_C const IID IID_IAudioVolumeLevel;\r
-\r
-#if defined(__cplusplus) && !defined(CINTERFACE)\r
- \r
- MIDL_INTERFACE("7FB7B48F-531D-44A2-BCB3-5AD5A134B3DC")\r
- IAudioVolumeLevel : public IPerChannelDbLevel\r
- {\r
- public:\r
- };\r
- \r
-#else /* C style interface */\r
-\r
- typedef struct IAudioVolumeLevelVtbl\r
- {\r
- BEGIN_INTERFACE\r
- \r
- HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r
- IAudioVolumeLevel * This,\r
- /* [in] */ REFIID riid,\r
- /* [iid_is][out] */ \r
- __RPC__deref_out void **ppvObject);\r
- \r
- ULONG ( STDMETHODCALLTYPE *AddRef )( \r
- IAudioVolumeLevel * This);\r
- \r
- ULONG ( STDMETHODCALLTYPE *Release )( \r
- IAudioVolumeLevel * This);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetChannelCount )( \r
- IAudioVolumeLevel * This,\r
- /* [out] */ \r
- __out UINT *pcChannels);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetLevelRange )( \r
- IAudioVolumeLevel * This,\r
- /* [in] */ \r
- __in UINT nChannel,\r
- /* [out] */ \r
- __out float *pfMinLevelDB,\r
- /* [out] */ \r
- __out float *pfMaxLevelDB,\r
- /* [out] */ \r
- __out float *pfStepping);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetLevel )( \r
- IAudioVolumeLevel * This,\r
- /* [in] */ \r
- __in UINT nChannel,\r
- /* [out] */ \r
- __out float *pfLevelDB);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetLevel )( \r
- IAudioVolumeLevel * This,\r
- /* [in] */ \r
- __in UINT nChannel,\r
- /* [in] */ \r
- __in float fLevelDB,\r
- /* [unique][in] */ \r
- __in_opt LPCGUID pguidEventContext);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetLevelUniform )( \r
- IAudioVolumeLevel * This,\r
- /* [in] */ \r
- __in float fLevelDB,\r
- /* [unique][in] */ \r
- __in_opt LPCGUID pguidEventContext);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetLevelAllChannels )( \r
- IAudioVolumeLevel * This,\r
- /* [size_is][in] */ \r
- __in_ecount(cChannels) float aLevelsDB[ ],\r
- /* [in] */ \r
- __in ULONG cChannels,\r
- /* [unique][in] */ \r
- __in_opt LPCGUID pguidEventContext);\r
- \r
- END_INTERFACE\r
- } IAudioVolumeLevelVtbl;\r
-\r
- interface IAudioVolumeLevel\r
- {\r
- CONST_VTBL struct IAudioVolumeLevelVtbl *lpVtbl;\r
- };\r
-\r
- \r
-\r
-#ifdef COBJMACROS\r
-\r
-\r
-#define IAudioVolumeLevel_QueryInterface(This,riid,ppvObject) \\r
- ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r
-\r
-#define IAudioVolumeLevel_AddRef(This) \\r
- ( (This)->lpVtbl -> AddRef(This) ) \r
-\r
-#define IAudioVolumeLevel_Release(This) \\r
- ( (This)->lpVtbl -> Release(This) ) \r
-\r
-\r
-#define IAudioVolumeLevel_GetChannelCount(This,pcChannels) \\r
- ( (This)->lpVtbl -> GetChannelCount(This,pcChannels) ) \r
-\r
-#define IAudioVolumeLevel_GetLevelRange(This,nChannel,pfMinLevelDB,pfMaxLevelDB,pfStepping) \\r
- ( (This)->lpVtbl -> GetLevelRange(This,nChannel,pfMinLevelDB,pfMaxLevelDB,pfStepping) ) \r
-\r
-#define IAudioVolumeLevel_GetLevel(This,nChannel,pfLevelDB) \\r
- ( (This)->lpVtbl -> GetLevel(This,nChannel,pfLevelDB) ) \r
-\r
-#define IAudioVolumeLevel_SetLevel(This,nChannel,fLevelDB,pguidEventContext) \\r
- ( (This)->lpVtbl -> SetLevel(This,nChannel,fLevelDB,pguidEventContext) ) \r
-\r
-#define IAudioVolumeLevel_SetLevelUniform(This,fLevelDB,pguidEventContext) \\r
- ( (This)->lpVtbl -> SetLevelUniform(This,fLevelDB,pguidEventContext) ) \r
-\r
-#define IAudioVolumeLevel_SetLevelAllChannels(This,aLevelsDB,cChannels,pguidEventContext) \\r
- ( (This)->lpVtbl -> SetLevelAllChannels(This,aLevelsDB,cChannels,pguidEventContext) ) \r
-\r
-\r
-#endif /* COBJMACROS */\r
-\r
-\r
-#endif /* C style interface */\r
-\r
-\r
-\r
-\r
-#endif /* __IAudioVolumeLevel_INTERFACE_DEFINED__ */\r
-\r
-\r
-#ifndef __IAudioChannelConfig_INTERFACE_DEFINED__\r
-#define __IAudioChannelConfig_INTERFACE_DEFINED__\r
-\r
-/* interface IAudioChannelConfig */\r
-/* [unique][helpstring][nonextensible][uuid][local][object] */ \r
-\r
-\r
-EXTERN_C const IID IID_IAudioChannelConfig;\r
-\r
-#if defined(__cplusplus) && !defined(CINTERFACE)\r
- \r
- MIDL_INTERFACE("BB11C46F-EC28-493C-B88A-5DB88062CE98")\r
- IAudioChannelConfig : public IUnknown\r
- {\r
- public:\r
- virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE SetChannelConfig( \r
- /* [in] */ DWORD dwConfig,\r
- /* [unique][in] */ \r
- __in_opt LPCGUID pguidEventContext) = 0;\r
- \r
- virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetChannelConfig( \r
- /* [retval][out] */ DWORD *pdwConfig) = 0;\r
- \r
- };\r
- \r
-#else /* C style interface */\r
-\r
- typedef struct IAudioChannelConfigVtbl\r
- {\r
- BEGIN_INTERFACE\r
- \r
- HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r
- IAudioChannelConfig * This,\r
- /* [in] */ REFIID riid,\r
- /* [iid_is][out] */ \r
- __RPC__deref_out void **ppvObject);\r
- \r
- ULONG ( STDMETHODCALLTYPE *AddRef )( \r
- IAudioChannelConfig * This);\r
- \r
- ULONG ( STDMETHODCALLTYPE *Release )( \r
- IAudioChannelConfig * This);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetChannelConfig )( \r
- IAudioChannelConfig * This,\r
- /* [in] */ DWORD dwConfig,\r
- /* [unique][in] */ \r
- __in_opt LPCGUID pguidEventContext);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetChannelConfig )( \r
- IAudioChannelConfig * This,\r
- /* [retval][out] */ DWORD *pdwConfig);\r
- \r
- END_INTERFACE\r
- } IAudioChannelConfigVtbl;\r
-\r
- interface IAudioChannelConfig\r
- {\r
- CONST_VTBL struct IAudioChannelConfigVtbl *lpVtbl;\r
- };\r
-\r
- \r
-\r
-#ifdef COBJMACROS\r
-\r
-\r
-#define IAudioChannelConfig_QueryInterface(This,riid,ppvObject) \\r
- ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r
-\r
-#define IAudioChannelConfig_AddRef(This) \\r
- ( (This)->lpVtbl -> AddRef(This) ) \r
-\r
-#define IAudioChannelConfig_Release(This) \\r
- ( (This)->lpVtbl -> Release(This) ) \r
-\r
-\r
-#define IAudioChannelConfig_SetChannelConfig(This,dwConfig,pguidEventContext) \\r
- ( (This)->lpVtbl -> SetChannelConfig(This,dwConfig,pguidEventContext) ) \r
-\r
-#define IAudioChannelConfig_GetChannelConfig(This,pdwConfig) \\r
- ( (This)->lpVtbl -> GetChannelConfig(This,pdwConfig) ) \r
-\r
-#endif /* COBJMACROS */\r
-\r
-\r
-#endif /* C style interface */\r
-\r
-\r
-\r
-\r
-#endif /* __IAudioChannelConfig_INTERFACE_DEFINED__ */\r
-\r
-\r
-#ifndef __IAudioLoudness_INTERFACE_DEFINED__\r
-#define __IAudioLoudness_INTERFACE_DEFINED__\r
-\r
-/* interface IAudioLoudness */\r
-/* [unique][helpstring][nonextensible][uuid][local][object] */ \r
-\r
-\r
-EXTERN_C const IID IID_IAudioLoudness;\r
-\r
-#if defined(__cplusplus) && !defined(CINTERFACE)\r
- \r
- MIDL_INTERFACE("7D8B1437-DD53-4350-9C1B-1EE2890BD938")\r
- IAudioLoudness : public IUnknown\r
- {\r
- public:\r
- virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetEnabled( \r
- /* [out] */ \r
- __out BOOL *pbEnabled) = 0;\r
- \r
- virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE SetEnabled( \r
- /* [in] */ \r
- __in BOOL bEnable,\r
- /* [unique][in] */ \r
- __in_opt LPCGUID pguidEventContext) = 0;\r
- \r
- };\r
- \r
-#else /* C style interface */\r
-\r
- typedef struct IAudioLoudnessVtbl\r
- {\r
- BEGIN_INTERFACE\r
- \r
- HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r
- IAudioLoudness * This,\r
- /* [in] */ REFIID riid,\r
- /* [iid_is][out] */ \r
- __RPC__deref_out void **ppvObject);\r
- \r
- ULONG ( STDMETHODCALLTYPE *AddRef )( \r
- IAudioLoudness * This);\r
- \r
- ULONG ( STDMETHODCALLTYPE *Release )( \r
- IAudioLoudness * This);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetEnabled )( \r
- IAudioLoudness * This,\r
- /* [out] */ \r
- __out BOOL *pbEnabled);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetEnabled )( \r
- IAudioLoudness * This,\r
- /* [in] */ \r
- __in BOOL bEnable,\r
- /* [unique][in] */ \r
- __in_opt LPCGUID pguidEventContext);\r
- \r
- END_INTERFACE\r
- } IAudioLoudnessVtbl;\r
-\r
- interface IAudioLoudness\r
- {\r
- CONST_VTBL struct IAudioLoudnessVtbl *lpVtbl;\r
- };\r
-\r
- \r
-\r
-#ifdef COBJMACROS\r
-\r
-\r
-#define IAudioLoudness_QueryInterface(This,riid,ppvObject) \\r
- ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r
-\r
-#define IAudioLoudness_AddRef(This) \\r
- ( (This)->lpVtbl -> AddRef(This) ) \r
-\r
-#define IAudioLoudness_Release(This) \\r
- ( (This)->lpVtbl -> Release(This) ) \r
-\r
-\r
-#define IAudioLoudness_GetEnabled(This,pbEnabled) \\r
- ( (This)->lpVtbl -> GetEnabled(This,pbEnabled) ) \r
-\r
-#define IAudioLoudness_SetEnabled(This,bEnable,pguidEventContext) \\r
- ( (This)->lpVtbl -> SetEnabled(This,bEnable,pguidEventContext) ) \r
-\r
-#endif /* COBJMACROS */\r
-\r
-\r
-#endif /* C style interface */\r
-\r
-\r
-\r
-\r
-#endif /* __IAudioLoudness_INTERFACE_DEFINED__ */\r
-\r
-\r
-#ifndef __IAudioInputSelector_INTERFACE_DEFINED__\r
-#define __IAudioInputSelector_INTERFACE_DEFINED__\r
-\r
-/* interface IAudioInputSelector */\r
-/* [unique][helpstring][nonextensible][uuid][local][object] */ \r
-\r
-\r
-EXTERN_C const IID IID_IAudioInputSelector;\r
-\r
-#if defined(__cplusplus) && !defined(CINTERFACE)\r
- \r
- MIDL_INTERFACE("4F03DC02-5E6E-4653-8F72-A030C123D598")\r
- IAudioInputSelector : public IUnknown\r
- {\r
- public:\r
- virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetSelection( \r
- /* [out] */ \r
- __out UINT *pnIdSelected) = 0;\r
- \r
- virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE SetSelection( \r
- /* [in] */ \r
- __in UINT nIdSelect,\r
- /* [unique][in] */ \r
- __in_opt LPCGUID pguidEventContext) = 0;\r
- \r
- };\r
- \r
-#else /* C style interface */\r
-\r
- typedef struct IAudioInputSelectorVtbl\r
- {\r
- BEGIN_INTERFACE\r
- \r
- HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r
- IAudioInputSelector * This,\r
- /* [in] */ REFIID riid,\r
- /* [iid_is][out] */ \r
- __RPC__deref_out void **ppvObject);\r
- \r
- ULONG ( STDMETHODCALLTYPE *AddRef )( \r
- IAudioInputSelector * This);\r
- \r
- ULONG ( STDMETHODCALLTYPE *Release )( \r
- IAudioInputSelector * This);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetSelection )( \r
- IAudioInputSelector * This,\r
- /* [out] */ \r
- __out UINT *pnIdSelected);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetSelection )( \r
- IAudioInputSelector * This,\r
- /* [in] */ \r
- __in UINT nIdSelect,\r
- /* [unique][in] */ \r
- __in_opt LPCGUID pguidEventContext);\r
- \r
- END_INTERFACE\r
- } IAudioInputSelectorVtbl;\r
-\r
- interface IAudioInputSelector\r
- {\r
- CONST_VTBL struct IAudioInputSelectorVtbl *lpVtbl;\r
- };\r
-\r
- \r
-\r
-#ifdef COBJMACROS\r
-\r
-\r
-#define IAudioInputSelector_QueryInterface(This,riid,ppvObject) \\r
- ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r
-\r
-#define IAudioInputSelector_AddRef(This) \\r
- ( (This)->lpVtbl -> AddRef(This) ) \r
-\r
-#define IAudioInputSelector_Release(This) \\r
- ( (This)->lpVtbl -> Release(This) ) \r
-\r
-\r
-#define IAudioInputSelector_GetSelection(This,pnIdSelected) \\r
- ( (This)->lpVtbl -> GetSelection(This,pnIdSelected) ) \r
-\r
-#define IAudioInputSelector_SetSelection(This,nIdSelect,pguidEventContext) \\r
- ( (This)->lpVtbl -> SetSelection(This,nIdSelect,pguidEventContext) ) \r
-\r
-#endif /* COBJMACROS */\r
-\r
-\r
-#endif /* C style interface */\r
-\r
-\r
-\r
-\r
-#endif /* __IAudioInputSelector_INTERFACE_DEFINED__ */\r
-\r
-\r
-#ifndef __IAudioOutputSelector_INTERFACE_DEFINED__\r
-#define __IAudioOutputSelector_INTERFACE_DEFINED__\r
-\r
-/* interface IAudioOutputSelector */\r
-/* [unique][helpstring][nonextensible][uuid][local][object] */ \r
-\r
-\r
-EXTERN_C const IID IID_IAudioOutputSelector;\r
-\r
-#if defined(__cplusplus) && !defined(CINTERFACE)\r
- \r
- MIDL_INTERFACE("BB515F69-94A7-429e-8B9C-271B3F11A3AB")\r
- IAudioOutputSelector : public IUnknown\r
- {\r
- public:\r
- virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetSelection( \r
- /* [out] */ \r
- __out UINT *pnIdSelected) = 0;\r
- \r
- virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE SetSelection( \r
- /* [in] */ \r
- __in UINT nIdSelect,\r
- /* [unique][in] */ \r
- __in_opt LPCGUID pguidEventContext) = 0;\r
- \r
- };\r
- \r
-#else /* C style interface */\r
-\r
- typedef struct IAudioOutputSelectorVtbl\r
- {\r
- BEGIN_INTERFACE\r
- \r
- HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r
- IAudioOutputSelector * This,\r
- /* [in] */ REFIID riid,\r
- /* [iid_is][out] */ \r
- __RPC__deref_out void **ppvObject);\r
- \r
- ULONG ( STDMETHODCALLTYPE *AddRef )( \r
- IAudioOutputSelector * This);\r
- \r
- ULONG ( STDMETHODCALLTYPE *Release )( \r
- IAudioOutputSelector * This);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetSelection )( \r
- IAudioOutputSelector * This,\r
- /* [out] */ \r
- __out UINT *pnIdSelected);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetSelection )( \r
- IAudioOutputSelector * This,\r
- /* [in] */ \r
- __in UINT nIdSelect,\r
- /* [unique][in] */ \r
- __in_opt LPCGUID pguidEventContext);\r
- \r
- END_INTERFACE\r
- } IAudioOutputSelectorVtbl;\r
-\r
- interface IAudioOutputSelector\r
- {\r
- CONST_VTBL struct IAudioOutputSelectorVtbl *lpVtbl;\r
- };\r
-\r
- \r
-\r
-#ifdef COBJMACROS\r
-\r
-\r
-#define IAudioOutputSelector_QueryInterface(This,riid,ppvObject) \\r
- ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r
-\r
-#define IAudioOutputSelector_AddRef(This) \\r
- ( (This)->lpVtbl -> AddRef(This) ) \r
-\r
-#define IAudioOutputSelector_Release(This) \\r
- ( (This)->lpVtbl -> Release(This) ) \r
-\r
-\r
-#define IAudioOutputSelector_GetSelection(This,pnIdSelected) \\r
- ( (This)->lpVtbl -> GetSelection(This,pnIdSelected) ) \r
-\r
-#define IAudioOutputSelector_SetSelection(This,nIdSelect,pguidEventContext) \\r
- ( (This)->lpVtbl -> SetSelection(This,nIdSelect,pguidEventContext) ) \r
-\r
-#endif /* COBJMACROS */\r
-\r
-\r
-#endif /* C style interface */\r
-\r
-\r
-\r
-\r
-#endif /* __IAudioOutputSelector_INTERFACE_DEFINED__ */\r
-\r
-\r
-#ifndef __IAudioMute_INTERFACE_DEFINED__\r
-#define __IAudioMute_INTERFACE_DEFINED__\r
-\r
-/* interface IAudioMute */\r
-/* [unique][helpstring][nonextensible][uuid][local][object] */ \r
-\r
-\r
-EXTERN_C const IID IID_IAudioMute;\r
-\r
-#if defined(__cplusplus) && !defined(CINTERFACE)\r
- \r
- MIDL_INTERFACE("DF45AEEA-B74A-4B6B-AFAD-2366B6AA012E")\r
- IAudioMute : public IUnknown\r
- {\r
- public:\r
- virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE SetMute( \r
- /* [in] */ \r
- __in BOOL bMuted,\r
- /* [unique][in] */ \r
- __in_opt LPCGUID pguidEventContext) = 0;\r
- \r
- virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetMute( \r
- /* [out] */ \r
- __out BOOL *pbMuted) = 0;\r
- \r
- };\r
- \r
-#else /* C style interface */\r
-\r
- typedef struct IAudioMuteVtbl\r
- {\r
- BEGIN_INTERFACE\r
- \r
- HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r
- IAudioMute * This,\r
- /* [in] */ REFIID riid,\r
- /* [iid_is][out] */ \r
- __RPC__deref_out void **ppvObject);\r
- \r
- ULONG ( STDMETHODCALLTYPE *AddRef )( \r
- IAudioMute * This);\r
- \r
- ULONG ( STDMETHODCALLTYPE *Release )( \r
- IAudioMute * This);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetMute )( \r
- IAudioMute * This,\r
- /* [in] */ \r
- __in BOOL bMuted,\r
- /* [unique][in] */ \r
- __in_opt LPCGUID pguidEventContext);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetMute )( \r
- IAudioMute * This,\r
- /* [out] */ \r
- __out BOOL *pbMuted);\r
- \r
- END_INTERFACE\r
- } IAudioMuteVtbl;\r
-\r
- interface IAudioMute\r
- {\r
- CONST_VTBL struct IAudioMuteVtbl *lpVtbl;\r
- };\r
-\r
- \r
-\r
-#ifdef COBJMACROS\r
-\r
-\r
-#define IAudioMute_QueryInterface(This,riid,ppvObject) \\r
- ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r
-\r
-#define IAudioMute_AddRef(This) \\r
- ( (This)->lpVtbl -> AddRef(This) ) \r
-\r
-#define IAudioMute_Release(This) \\r
- ( (This)->lpVtbl -> Release(This) ) \r
-\r
-\r
-#define IAudioMute_SetMute(This,bMuted,pguidEventContext) \\r
- ( (This)->lpVtbl -> SetMute(This,bMuted,pguidEventContext) ) \r
-\r
-#define IAudioMute_GetMute(This,pbMuted) \\r
- ( (This)->lpVtbl -> GetMute(This,pbMuted) ) \r
-\r
-#endif /* COBJMACROS */\r
-\r
-\r
-#endif /* C style interface */\r
-\r
-\r
-\r
-\r
-#endif /* __IAudioMute_INTERFACE_DEFINED__ */\r
-\r
-\r
-#ifndef __IAudioBass_INTERFACE_DEFINED__\r
-#define __IAudioBass_INTERFACE_DEFINED__\r
-\r
-/* interface IAudioBass */\r
-/* [unique][helpstring][nonextensible][uuid][local][object] */ \r
-\r
-\r
-EXTERN_C const IID IID_IAudioBass;\r
-\r
-#if defined(__cplusplus) && !defined(CINTERFACE)\r
- \r
- MIDL_INTERFACE("A2B1A1D9-4DB3-425D-A2B2-BD335CB3E2E5")\r
- IAudioBass : public IPerChannelDbLevel\r
- {\r
- public:\r
- };\r
- \r
-#else /* C style interface */\r
-\r
- typedef struct IAudioBassVtbl\r
- {\r
- BEGIN_INTERFACE\r
- \r
- HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r
- IAudioBass * This,\r
- /* [in] */ REFIID riid,\r
- /* [iid_is][out] */ \r
- __RPC__deref_out void **ppvObject);\r
- \r
- ULONG ( STDMETHODCALLTYPE *AddRef )( \r
- IAudioBass * This);\r
- \r
- ULONG ( STDMETHODCALLTYPE *Release )( \r
- IAudioBass * This);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetChannelCount )( \r
- IAudioBass * This,\r
- /* [out] */ \r
- __out UINT *pcChannels);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetLevelRange )( \r
- IAudioBass * This,\r
- /* [in] */ \r
- __in UINT nChannel,\r
- /* [out] */ \r
- __out float *pfMinLevelDB,\r
- /* [out] */ \r
- __out float *pfMaxLevelDB,\r
- /* [out] */ \r
- __out float *pfStepping);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetLevel )( \r
- IAudioBass * This,\r
- /* [in] */ \r
- __in UINT nChannel,\r
- /* [out] */ \r
- __out float *pfLevelDB);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetLevel )( \r
- IAudioBass * This,\r
- /* [in] */ \r
- __in UINT nChannel,\r
- /* [in] */ \r
- __in float fLevelDB,\r
- /* [unique][in] */ \r
- __in_opt LPCGUID pguidEventContext);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetLevelUniform )( \r
- IAudioBass * This,\r
- /* [in] */ \r
- __in float fLevelDB,\r
- /* [unique][in] */ \r
- __in_opt LPCGUID pguidEventContext);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetLevelAllChannels )( \r
- IAudioBass * This,\r
- /* [size_is][in] */ \r
- __in_ecount(cChannels) float aLevelsDB[ ],\r
- /* [in] */ \r
- __in ULONG cChannels,\r
- /* [unique][in] */ \r
- __in_opt LPCGUID pguidEventContext);\r
- \r
- END_INTERFACE\r
- } IAudioBassVtbl;\r
-\r
- interface IAudioBass\r
- {\r
- CONST_VTBL struct IAudioBassVtbl *lpVtbl;\r
- };\r
-\r
- \r
-\r
-#ifdef COBJMACROS\r
-\r
-\r
-#define IAudioBass_QueryInterface(This,riid,ppvObject) \\r
- ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r
-\r
-#define IAudioBass_AddRef(This) \\r
- ( (This)->lpVtbl -> AddRef(This) ) \r
-\r
-#define IAudioBass_Release(This) \\r
- ( (This)->lpVtbl -> Release(This) ) \r
-\r
-\r
-#define IAudioBass_GetChannelCount(This,pcChannels) \\r
- ( (This)->lpVtbl -> GetChannelCount(This,pcChannels) ) \r
-\r
-#define IAudioBass_GetLevelRange(This,nChannel,pfMinLevelDB,pfMaxLevelDB,pfStepping) \\r
- ( (This)->lpVtbl -> GetLevelRange(This,nChannel,pfMinLevelDB,pfMaxLevelDB,pfStepping) ) \r
-\r
-#define IAudioBass_GetLevel(This,nChannel,pfLevelDB) \\r
- ( (This)->lpVtbl -> GetLevel(This,nChannel,pfLevelDB) ) \r
-\r
-#define IAudioBass_SetLevel(This,nChannel,fLevelDB,pguidEventContext) \\r
- ( (This)->lpVtbl -> SetLevel(This,nChannel,fLevelDB,pguidEventContext) ) \r
-\r
-#define IAudioBass_SetLevelUniform(This,fLevelDB,pguidEventContext) \\r
- ( (This)->lpVtbl -> SetLevelUniform(This,fLevelDB,pguidEventContext) ) \r
-\r
-#define IAudioBass_SetLevelAllChannels(This,aLevelsDB,cChannels,pguidEventContext) \\r
- ( (This)->lpVtbl -> SetLevelAllChannels(This,aLevelsDB,cChannels,pguidEventContext) ) \r
-\r
-\r
-#endif /* COBJMACROS */\r
-\r
-\r
-#endif /* C style interface */\r
-\r
-\r
-\r
-\r
-#endif /* __IAudioBass_INTERFACE_DEFINED__ */\r
-\r
-\r
-#ifndef __IAudioMidrange_INTERFACE_DEFINED__\r
-#define __IAudioMidrange_INTERFACE_DEFINED__\r
-\r
-/* interface IAudioMidrange */\r
-/* [unique][helpstring][nonextensible][uuid][local][object] */ \r
-\r
-\r
-EXTERN_C const IID IID_IAudioMidrange;\r
-\r
-#if defined(__cplusplus) && !defined(CINTERFACE)\r
- \r
- MIDL_INTERFACE("5E54B6D7-B44B-40D9-9A9E-E691D9CE6EDF")\r
- IAudioMidrange : public IPerChannelDbLevel\r
- {\r
- public:\r
- };\r
- \r
-#else /* C style interface */\r
-\r
- typedef struct IAudioMidrangeVtbl\r
- {\r
- BEGIN_INTERFACE\r
- \r
- HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r
- IAudioMidrange * This,\r
- /* [in] */ REFIID riid,\r
- /* [iid_is][out] */ \r
- __RPC__deref_out void **ppvObject);\r
- \r
- ULONG ( STDMETHODCALLTYPE *AddRef )( \r
- IAudioMidrange * This);\r
- \r
- ULONG ( STDMETHODCALLTYPE *Release )( \r
- IAudioMidrange * This);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetChannelCount )( \r
- IAudioMidrange * This,\r
- /* [out] */ \r
- __out UINT *pcChannels);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetLevelRange )( \r
- IAudioMidrange * This,\r
- /* [in] */ \r
- __in UINT nChannel,\r
- /* [out] */ \r
- __out float *pfMinLevelDB,\r
- /* [out] */ \r
- __out float *pfMaxLevelDB,\r
- /* [out] */ \r
- __out float *pfStepping);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetLevel )( \r
- IAudioMidrange * This,\r
- /* [in] */ \r
- __in UINT nChannel,\r
- /* [out] */ \r
- __out float *pfLevelDB);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetLevel )( \r
- IAudioMidrange * This,\r
- /* [in] */ \r
- __in UINT nChannel,\r
- /* [in] */ \r
- __in float fLevelDB,\r
- /* [unique][in] */ \r
- __in_opt LPCGUID pguidEventContext);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetLevelUniform )( \r
- IAudioMidrange * This,\r
- /* [in] */ \r
- __in float fLevelDB,\r
- /* [unique][in] */ \r
- __in_opt LPCGUID pguidEventContext);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetLevelAllChannels )( \r
- IAudioMidrange * This,\r
- /* [size_is][in] */ \r
- __in_ecount(cChannels) float aLevelsDB[ ],\r
- /* [in] */ \r
- __in ULONG cChannels,\r
- /* [unique][in] */ \r
- __in_opt LPCGUID pguidEventContext);\r
- \r
- END_INTERFACE\r
- } IAudioMidrangeVtbl;\r
-\r
- interface IAudioMidrange\r
- {\r
- CONST_VTBL struct IAudioMidrangeVtbl *lpVtbl;\r
- };\r
-\r
- \r
-\r
-#ifdef COBJMACROS\r
-\r
-\r
-#define IAudioMidrange_QueryInterface(This,riid,ppvObject) \\r
- ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r
-\r
-#define IAudioMidrange_AddRef(This) \\r
- ( (This)->lpVtbl -> AddRef(This) ) \r
-\r
-#define IAudioMidrange_Release(This) \\r
- ( (This)->lpVtbl -> Release(This) ) \r
-\r
-\r
-#define IAudioMidrange_GetChannelCount(This,pcChannels) \\r
- ( (This)->lpVtbl -> GetChannelCount(This,pcChannels) ) \r
-\r
-#define IAudioMidrange_GetLevelRange(This,nChannel,pfMinLevelDB,pfMaxLevelDB,pfStepping) \\r
- ( (This)->lpVtbl -> GetLevelRange(This,nChannel,pfMinLevelDB,pfMaxLevelDB,pfStepping) ) \r
-\r
-#define IAudioMidrange_GetLevel(This,nChannel,pfLevelDB) \\r
- ( (This)->lpVtbl -> GetLevel(This,nChannel,pfLevelDB) ) \r
-\r
-#define IAudioMidrange_SetLevel(This,nChannel,fLevelDB,pguidEventContext) \\r
- ( (This)->lpVtbl -> SetLevel(This,nChannel,fLevelDB,pguidEventContext) ) \r
-\r
-#define IAudioMidrange_SetLevelUniform(This,fLevelDB,pguidEventContext) \\r
- ( (This)->lpVtbl -> SetLevelUniform(This,fLevelDB,pguidEventContext) ) \r
-\r
-#define IAudioMidrange_SetLevelAllChannels(This,aLevelsDB,cChannels,pguidEventContext) \\r
- ( (This)->lpVtbl -> SetLevelAllChannels(This,aLevelsDB,cChannels,pguidEventContext) ) \r
-\r
-\r
-#endif /* COBJMACROS */\r
-\r
-\r
-#endif /* C style interface */\r
-\r
-\r
-\r
-\r
-#endif /* __IAudioMidrange_INTERFACE_DEFINED__ */\r
-\r
-\r
-#ifndef __IAudioTreble_INTERFACE_DEFINED__\r
-#define __IAudioTreble_INTERFACE_DEFINED__\r
-\r
-/* interface IAudioTreble */\r
-/* [unique][helpstring][nonextensible][uuid][local][object] */ \r
-\r
-\r
-EXTERN_C const IID IID_IAudioTreble;\r
-\r
-#if defined(__cplusplus) && !defined(CINTERFACE)\r
- \r
- MIDL_INTERFACE("0A717812-694E-4907-B74B-BAFA5CFDCA7B")\r
- IAudioTreble : public IPerChannelDbLevel\r
- {\r
- public:\r
- };\r
- \r
-#else /* C style interface */\r
-\r
- typedef struct IAudioTrebleVtbl\r
- {\r
- BEGIN_INTERFACE\r
- \r
- HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r
- IAudioTreble * This,\r
- /* [in] */ REFIID riid,\r
- /* [iid_is][out] */ \r
- __RPC__deref_out void **ppvObject);\r
- \r
- ULONG ( STDMETHODCALLTYPE *AddRef )( \r
- IAudioTreble * This);\r
- \r
- ULONG ( STDMETHODCALLTYPE *Release )( \r
- IAudioTreble * This);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetChannelCount )( \r
- IAudioTreble * This,\r
- /* [out] */ \r
- __out UINT *pcChannels);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetLevelRange )( \r
- IAudioTreble * This,\r
- /* [in] */ \r
- __in UINT nChannel,\r
- /* [out] */ \r
- __out float *pfMinLevelDB,\r
- /* [out] */ \r
- __out float *pfMaxLevelDB,\r
- /* [out] */ \r
- __out float *pfStepping);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetLevel )( \r
- IAudioTreble * This,\r
- /* [in] */ \r
- __in UINT nChannel,\r
- /* [out] */ \r
- __out float *pfLevelDB);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetLevel )( \r
- IAudioTreble * This,\r
- /* [in] */ \r
- __in UINT nChannel,\r
- /* [in] */ \r
- __in float fLevelDB,\r
- /* [unique][in] */ \r
- __in_opt LPCGUID pguidEventContext);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetLevelUniform )( \r
- IAudioTreble * This,\r
- /* [in] */ \r
- __in float fLevelDB,\r
- /* [unique][in] */ \r
- __in_opt LPCGUID pguidEventContext);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetLevelAllChannels )( \r
- IAudioTreble * This,\r
- /* [size_is][in] */ \r
- __in_ecount(cChannels) float aLevelsDB[ ],\r
- /* [in] */ \r
- __in ULONG cChannels,\r
- /* [unique][in] */ \r
- __in_opt LPCGUID pguidEventContext);\r
- \r
- END_INTERFACE\r
- } IAudioTrebleVtbl;\r
-\r
- interface IAudioTreble\r
- {\r
- CONST_VTBL struct IAudioTrebleVtbl *lpVtbl;\r
- };\r
-\r
- \r
-\r
-#ifdef COBJMACROS\r
-\r
-\r
-#define IAudioTreble_QueryInterface(This,riid,ppvObject) \\r
- ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r
-\r
-#define IAudioTreble_AddRef(This) \\r
- ( (This)->lpVtbl -> AddRef(This) ) \r
-\r
-#define IAudioTreble_Release(This) \\r
- ( (This)->lpVtbl -> Release(This) ) \r
-\r
-\r
-#define IAudioTreble_GetChannelCount(This,pcChannels) \\r
- ( (This)->lpVtbl -> GetChannelCount(This,pcChannels) ) \r
-\r
-#define IAudioTreble_GetLevelRange(This,nChannel,pfMinLevelDB,pfMaxLevelDB,pfStepping) \\r
- ( (This)->lpVtbl -> GetLevelRange(This,nChannel,pfMinLevelDB,pfMaxLevelDB,pfStepping) ) \r
-\r
-#define IAudioTreble_GetLevel(This,nChannel,pfLevelDB) \\r
- ( (This)->lpVtbl -> GetLevel(This,nChannel,pfLevelDB) ) \r
-\r
-#define IAudioTreble_SetLevel(This,nChannel,fLevelDB,pguidEventContext) \\r
- ( (This)->lpVtbl -> SetLevel(This,nChannel,fLevelDB,pguidEventContext) ) \r
-\r
-#define IAudioTreble_SetLevelUniform(This,fLevelDB,pguidEventContext) \\r
- ( (This)->lpVtbl -> SetLevelUniform(This,fLevelDB,pguidEventContext) ) \r
-\r
-#define IAudioTreble_SetLevelAllChannels(This,aLevelsDB,cChannels,pguidEventContext) \\r
- ( (This)->lpVtbl -> SetLevelAllChannels(This,aLevelsDB,cChannels,pguidEventContext) ) \r
-\r
-\r
-#endif /* COBJMACROS */\r
-\r
-\r
-#endif /* C style interface */\r
-\r
-\r
-\r
-\r
-#endif /* __IAudioTreble_INTERFACE_DEFINED__ */\r
-\r
-\r
-#ifndef __IAudioAutoGainControl_INTERFACE_DEFINED__\r
-#define __IAudioAutoGainControl_INTERFACE_DEFINED__\r
-\r
-/* interface IAudioAutoGainControl */\r
-/* [unique][helpstring][nonextensible][uuid][local][object] */ \r
-\r
-\r
-EXTERN_C const IID IID_IAudioAutoGainControl;\r
-\r
-#if defined(__cplusplus) && !defined(CINTERFACE)\r
- \r
- MIDL_INTERFACE("85401FD4-6DE4-4b9d-9869-2D6753A82F3C")\r
- IAudioAutoGainControl : public IUnknown\r
- {\r
- public:\r
- virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetEnabled( \r
- /* [out] */ \r
- __out BOOL *pbEnabled) = 0;\r
- \r
- virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE SetEnabled( \r
- /* [in] */ \r
- __in BOOL bEnable,\r
- /* [unique][in] */ \r
- __in_opt LPCGUID pguidEventContext) = 0;\r
- \r
- };\r
- \r
-#else /* C style interface */\r
-\r
- typedef struct IAudioAutoGainControlVtbl\r
- {\r
- BEGIN_INTERFACE\r
- \r
- HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r
- IAudioAutoGainControl * This,\r
- /* [in] */ REFIID riid,\r
- /* [iid_is][out] */ \r
- __RPC__deref_out void **ppvObject);\r
- \r
- ULONG ( STDMETHODCALLTYPE *AddRef )( \r
- IAudioAutoGainControl * This);\r
- \r
- ULONG ( STDMETHODCALLTYPE *Release )( \r
- IAudioAutoGainControl * This);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetEnabled )( \r
- IAudioAutoGainControl * This,\r
- /* [out] */ \r
- __out BOOL *pbEnabled);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetEnabled )( \r
- IAudioAutoGainControl * This,\r
- /* [in] */ \r
- __in BOOL bEnable,\r
- /* [unique][in] */ \r
- __in_opt LPCGUID pguidEventContext);\r
- \r
- END_INTERFACE\r
- } IAudioAutoGainControlVtbl;\r
-\r
- interface IAudioAutoGainControl\r
- {\r
- CONST_VTBL struct IAudioAutoGainControlVtbl *lpVtbl;\r
- };\r
-\r
- \r
-\r
-#ifdef COBJMACROS\r
-\r
-\r
-#define IAudioAutoGainControl_QueryInterface(This,riid,ppvObject) \\r
- ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r
-\r
-#define IAudioAutoGainControl_AddRef(This) \\r
- ( (This)->lpVtbl -> AddRef(This) ) \r
-\r
-#define IAudioAutoGainControl_Release(This) \\r
- ( (This)->lpVtbl -> Release(This) ) \r
-\r
-\r
-#define IAudioAutoGainControl_GetEnabled(This,pbEnabled) \\r
- ( (This)->lpVtbl -> GetEnabled(This,pbEnabled) ) \r
-\r
-#define IAudioAutoGainControl_SetEnabled(This,bEnable,pguidEventContext) \\r
- ( (This)->lpVtbl -> SetEnabled(This,bEnable,pguidEventContext) ) \r
-\r
-#endif /* COBJMACROS */\r
-\r
-\r
-#endif /* C style interface */\r
-\r
-\r
-\r
-\r
-#endif /* __IAudioAutoGainControl_INTERFACE_DEFINED__ */\r
-\r
-\r
-#ifndef __IAudioPeakMeter_INTERFACE_DEFINED__\r
-#define __IAudioPeakMeter_INTERFACE_DEFINED__\r
-\r
-/* interface IAudioPeakMeter */\r
-/* [unique][helpstring][nonextensible][uuid][local][object] */ \r
-\r
-\r
-EXTERN_C const IID IID_IAudioPeakMeter;\r
-\r
-#if defined(__cplusplus) && !defined(CINTERFACE)\r
- \r
- MIDL_INTERFACE("DD79923C-0599-45e0-B8B6-C8DF7DB6E796")\r
- IAudioPeakMeter : public IUnknown\r
- {\r
- public:\r
- virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetChannelCount( \r
- /* [out] */ \r
- __out UINT *pcChannels) = 0;\r
- \r
- virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetLevel( \r
- /* [in] */ \r
- __in UINT nChannel,\r
- /* [out] */ \r
- __out float *pfLevel) = 0;\r
- \r
- };\r
- \r
-#else /* C style interface */\r
-\r
- typedef struct IAudioPeakMeterVtbl\r
- {\r
- BEGIN_INTERFACE\r
- \r
- HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r
- IAudioPeakMeter * This,\r
- /* [in] */ REFIID riid,\r
- /* [iid_is][out] */ \r
- __RPC__deref_out void **ppvObject);\r
- \r
- ULONG ( STDMETHODCALLTYPE *AddRef )( \r
- IAudioPeakMeter * This);\r
- \r
- ULONG ( STDMETHODCALLTYPE *Release )( \r
- IAudioPeakMeter * This);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetChannelCount )( \r
- IAudioPeakMeter * This,\r
- /* [out] */ \r
- __out UINT *pcChannels);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetLevel )( \r
- IAudioPeakMeter * This,\r
- /* [in] */ \r
- __in UINT nChannel,\r
- /* [out] */ \r
- __out float *pfLevel);\r
- \r
- END_INTERFACE\r
- } IAudioPeakMeterVtbl;\r
-\r
- interface IAudioPeakMeter\r
- {\r
- CONST_VTBL struct IAudioPeakMeterVtbl *lpVtbl;\r
- };\r
-\r
- \r
-\r
-#ifdef COBJMACROS\r
-\r
-\r
-#define IAudioPeakMeter_QueryInterface(This,riid,ppvObject) \\r
- ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r
-\r
-#define IAudioPeakMeter_AddRef(This) \\r
- ( (This)->lpVtbl -> AddRef(This) ) \r
-\r
-#define IAudioPeakMeter_Release(This) \\r
- ( (This)->lpVtbl -> Release(This) ) \r
-\r
-\r
-#define IAudioPeakMeter_GetChannelCount(This,pcChannels) \\r
- ( (This)->lpVtbl -> GetChannelCount(This,pcChannels) ) \r
-\r
-#define IAudioPeakMeter_GetLevel(This,nChannel,pfLevel) \\r
- ( (This)->lpVtbl -> GetLevel(This,nChannel,pfLevel) ) \r
-\r
-#endif /* COBJMACROS */\r
-\r
-\r
-#endif /* C style interface */\r
-\r
-\r
-\r
-\r
-#endif /* __IAudioPeakMeter_INTERFACE_DEFINED__ */\r
-\r
-\r
-#ifndef __IDeviceSpecificProperty_INTERFACE_DEFINED__\r
-#define __IDeviceSpecificProperty_INTERFACE_DEFINED__\r
-\r
-/* interface IDeviceSpecificProperty */\r
-/* [unique][helpstring][nonextensible][uuid][local][object] */ \r
-\r
-\r
-EXTERN_C const IID IID_IDeviceSpecificProperty;\r
-\r
-#if defined(__cplusplus) && !defined(CINTERFACE)\r
- \r
- MIDL_INTERFACE("3B22BCBF-2586-4af0-8583-205D391B807C")\r
- IDeviceSpecificProperty : public IUnknown\r
- {\r
- public:\r
- virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetType( \r
- /* [out] */ \r
- __deref_out VARTYPE *pVType) = 0;\r
- \r
- virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetValue( \r
- /* [out] */ \r
- __out void *pvValue,\r
- /* [out][in] */ \r
- __inout DWORD *pcbValue) = 0;\r
- \r
- virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE SetValue( \r
- /* [in] */ \r
- __in void *pvValue,\r
- /* [in] */ DWORD cbValue,\r
- /* [unique][in] */ \r
- __in_opt LPCGUID pguidEventContext) = 0;\r
- \r
- virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE Get4BRange( \r
- /* [out] */ \r
- __deref_out LONG *plMin,\r
- /* [out] */ \r
- __deref_out LONG *plMax,\r
- /* [out] */ \r
- __deref_out LONG *plStepping) = 0;\r
- \r
- };\r
- \r
-#else /* C style interface */\r
-\r
- typedef struct IDeviceSpecificPropertyVtbl\r
- {\r
- BEGIN_INTERFACE\r
- \r
- HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r
- IDeviceSpecificProperty * This,\r
- /* [in] */ REFIID riid,\r
- /* [iid_is][out] */ \r
- __RPC__deref_out void **ppvObject);\r
- \r
- ULONG ( STDMETHODCALLTYPE *AddRef )( \r
- IDeviceSpecificProperty * This);\r
- \r
- ULONG ( STDMETHODCALLTYPE *Release )( \r
- IDeviceSpecificProperty * This);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetType )( \r
- IDeviceSpecificProperty * This,\r
- /* [out] */ \r
- __deref_out VARTYPE *pVType);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetValue )( \r
- IDeviceSpecificProperty * This,\r
- /* [out] */ \r
- __out void *pvValue,\r
- /* [out][in] */ \r
- __inout DWORD *pcbValue);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetValue )( \r
- IDeviceSpecificProperty * This,\r
- /* [in] */ \r
- __in void *pvValue,\r
- /* [in] */ DWORD cbValue,\r
- /* [unique][in] */ \r
- __in_opt LPCGUID pguidEventContext);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *Get4BRange )( \r
- IDeviceSpecificProperty * This,\r
- /* [out] */ \r
- __deref_out LONG *plMin,\r
- /* [out] */ \r
- __deref_out LONG *plMax,\r
- /* [out] */ \r
- __deref_out LONG *plStepping);\r
- \r
- END_INTERFACE\r
- } IDeviceSpecificPropertyVtbl;\r
-\r
- interface IDeviceSpecificProperty\r
- {\r
- CONST_VTBL struct IDeviceSpecificPropertyVtbl *lpVtbl;\r
- };\r
-\r
- \r
-\r
-#ifdef COBJMACROS\r
-\r
-\r
-#define IDeviceSpecificProperty_QueryInterface(This,riid,ppvObject) \\r
- ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r
-\r
-#define IDeviceSpecificProperty_AddRef(This) \\r
- ( (This)->lpVtbl -> AddRef(This) ) \r
-\r
-#define IDeviceSpecificProperty_Release(This) \\r
- ( (This)->lpVtbl -> Release(This) ) \r
-\r
-\r
-#define IDeviceSpecificProperty_GetType(This,pVType) \\r
- ( (This)->lpVtbl -> GetType(This,pVType) ) \r
-\r
-#define IDeviceSpecificProperty_GetValue(This,pvValue,pcbValue) \\r
- ( (This)->lpVtbl -> GetValue(This,pvValue,pcbValue) ) \r
-\r
-#define IDeviceSpecificProperty_SetValue(This,pvValue,cbValue,pguidEventContext) \\r
- ( (This)->lpVtbl -> SetValue(This,pvValue,cbValue,pguidEventContext) ) \r
-\r
-#define IDeviceSpecificProperty_Get4BRange(This,plMin,plMax,plStepping) \\r
- ( (This)->lpVtbl -> Get4BRange(This,plMin,plMax,plStepping) ) \r
-\r
-#endif /* COBJMACROS */\r
-\r
-\r
-#endif /* C style interface */\r
-\r
-\r
-\r
-\r
-#endif /* __IDeviceSpecificProperty_INTERFACE_DEFINED__ */\r
-\r
-\r
-#ifndef __IKsFormatSupport_INTERFACE_DEFINED__\r
-#define __IKsFormatSupport_INTERFACE_DEFINED__\r
-\r
-/* interface IKsFormatSupport */\r
-/* [unique][helpstring][nonextensible][uuid][local][object] */ \r
-\r
-\r
-EXTERN_C const IID IID_IKsFormatSupport;\r
-\r
-#if defined(__cplusplus) && !defined(CINTERFACE)\r
- \r
- MIDL_INTERFACE("3CB4A69D-BB6F-4D2B-95B7-452D2C155DB5")\r
- IKsFormatSupport : public IUnknown\r
- {\r
- public:\r
- virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IsFormatSupported( \r
- /* [size_is][in] */ PKSDATAFORMAT pKsFormat,\r
- /* [in] */ \r
- __in DWORD cbFormat,\r
- /* [out] */ \r
- __out BOOL *pbSupported) = 0;\r
- \r
- virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetDevicePreferredFormat( \r
- /* [out] */ PKSDATAFORMAT *ppKsFormat) = 0;\r
- \r
- };\r
- \r
-#else /* C style interface */\r
-\r
- typedef struct IKsFormatSupportVtbl\r
- {\r
- BEGIN_INTERFACE\r
- \r
- HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r
- IKsFormatSupport * This,\r
- /* [in] */ REFIID riid,\r
- /* [iid_is][out] */ \r
- __RPC__deref_out void **ppvObject);\r
- \r
- ULONG ( STDMETHODCALLTYPE *AddRef )( \r
- IKsFormatSupport * This);\r
- \r
- ULONG ( STDMETHODCALLTYPE *Release )( \r
- IKsFormatSupport * This);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *IsFormatSupported )( \r
- IKsFormatSupport * This,\r
- /* [size_is][in] */ PKSDATAFORMAT pKsFormat,\r
- /* [in] */ \r
- __in DWORD cbFormat,\r
- /* [out] */ \r
- __out BOOL *pbSupported);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetDevicePreferredFormat )( \r
- IKsFormatSupport * This,\r
- /* [out] */ PKSDATAFORMAT *ppKsFormat);\r
- \r
- END_INTERFACE\r
- } IKsFormatSupportVtbl;\r
-\r
- interface IKsFormatSupport\r
- {\r
- CONST_VTBL struct IKsFormatSupportVtbl *lpVtbl;\r
- };\r
-\r
- \r
-\r
-#ifdef COBJMACROS\r
-\r
-\r
-#define IKsFormatSupport_QueryInterface(This,riid,ppvObject) \\r
- ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r
-\r
-#define IKsFormatSupport_AddRef(This) \\r
- ( (This)->lpVtbl -> AddRef(This) ) \r
-\r
-#define IKsFormatSupport_Release(This) \\r
- ( (This)->lpVtbl -> Release(This) ) \r
-\r
-\r
-#define IKsFormatSupport_IsFormatSupported(This,pKsFormat,cbFormat,pbSupported) \\r
- ( (This)->lpVtbl -> IsFormatSupported(This,pKsFormat,cbFormat,pbSupported) ) \r
-\r
-#define IKsFormatSupport_GetDevicePreferredFormat(This,ppKsFormat) \\r
- ( (This)->lpVtbl -> GetDevicePreferredFormat(This,ppKsFormat) ) \r
-\r
-#endif /* COBJMACROS */\r
-\r
-\r
-#endif /* C style interface */\r
-\r
-\r
-\r
-\r
-#endif /* __IKsFormatSupport_INTERFACE_DEFINED__ */\r
-\r
-\r
-#ifndef __IKsJackDescription_INTERFACE_DEFINED__\r
-#define __IKsJackDescription_INTERFACE_DEFINED__\r
-\r
-/* interface IKsJackDescription */\r
-/* [unique][helpstring][nonextensible][uuid][local][object] */ \r
-\r
-\r
-EXTERN_C const IID IID_IKsJackDescription;\r
-\r
-#if defined(__cplusplus) && !defined(CINTERFACE)\r
- \r
- MIDL_INTERFACE("4509F757-2D46-4637-8E62-CE7DB944F57B")\r
- IKsJackDescription : public IUnknown\r
- {\r
- public:\r
- virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetJackCount( \r
- /* [out] */ \r
- __out UINT *pcJacks) = 0;\r
- \r
- virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetJackDescription( \r
- /* [in] */ UINT nJack,\r
- /* [out] */ \r
- __out KSJACK_DESCRIPTION *pDescription) = 0;\r
- \r
- };\r
- \r
-#else /* C style interface */\r
-\r
- typedef struct IKsJackDescriptionVtbl\r
- {\r
- BEGIN_INTERFACE\r
- \r
- HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r
- IKsJackDescription * This,\r
- /* [in] */ REFIID riid,\r
- /* [iid_is][out] */ \r
- __RPC__deref_out void **ppvObject);\r
- \r
- ULONG ( STDMETHODCALLTYPE *AddRef )( \r
- IKsJackDescription * This);\r
- \r
- ULONG ( STDMETHODCALLTYPE *Release )( \r
- IKsJackDescription * This);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetJackCount )( \r
- IKsJackDescription * This,\r
- /* [out] */ \r
- __out UINT *pcJacks);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetJackDescription )( \r
- IKsJackDescription * This,\r
- /* [in] */ UINT nJack,\r
- /* [out] */ \r
- __out KSJACK_DESCRIPTION *pDescription);\r
- \r
- END_INTERFACE\r
- } IKsJackDescriptionVtbl;\r
-\r
- interface IKsJackDescription\r
- {\r
- CONST_VTBL struct IKsJackDescriptionVtbl *lpVtbl;\r
- };\r
-\r
- \r
-\r
-#ifdef COBJMACROS\r
-\r
-\r
-#define IKsJackDescription_QueryInterface(This,riid,ppvObject) \\r
- ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r
-\r
-#define IKsJackDescription_AddRef(This) \\r
- ( (This)->lpVtbl -> AddRef(This) ) \r
-\r
-#define IKsJackDescription_Release(This) \\r
- ( (This)->lpVtbl -> Release(This) ) \r
-\r
-\r
-#define IKsJackDescription_GetJackCount(This,pcJacks) \\r
- ( (This)->lpVtbl -> GetJackCount(This,pcJacks) ) \r
-\r
-#define IKsJackDescription_GetJackDescription(This,nJack,pDescription) \\r
- ( (This)->lpVtbl -> GetJackDescription(This,nJack,pDescription) ) \r
-\r
-#endif /* COBJMACROS */\r
-\r
-\r
-#endif /* C style interface */\r
-\r
-\r
-\r
-\r
-#endif /* __IKsJackDescription_INTERFACE_DEFINED__ */\r
-\r
-\r
-#ifndef __IPartsList_INTERFACE_DEFINED__\r
-#define __IPartsList_INTERFACE_DEFINED__\r
-\r
-/* interface IPartsList */\r
-/* [object][unique][helpstring][uuid][local] */ \r
-\r
-\r
-EXTERN_C const IID IID_IPartsList;\r
-\r
-#if defined(__cplusplus) && !defined(CINTERFACE)\r
- \r
- MIDL_INTERFACE("6DAA848C-5EB0-45CC-AEA5-998A2CDA1FFB")\r
- IPartsList : public IUnknown\r
- {\r
- public:\r
- virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetCount( \r
- /* [out] */ \r
- __out UINT *pCount) = 0;\r
- \r
- virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetPart( \r
- /* [in] */ \r
- __in UINT nIndex,\r
- /* [out] */ \r
- __out IPart **ppPart) = 0;\r
- \r
- };\r
- \r
-#else /* C style interface */\r
-\r
- typedef struct IPartsListVtbl\r
- {\r
- BEGIN_INTERFACE\r
- \r
- HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r
- IPartsList * This,\r
- /* [in] */ REFIID riid,\r
- /* [iid_is][out] */ \r
- __RPC__deref_out void **ppvObject);\r
- \r
- ULONG ( STDMETHODCALLTYPE *AddRef )( \r
- IPartsList * This);\r
- \r
- ULONG ( STDMETHODCALLTYPE *Release )( \r
- IPartsList * This);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetCount )( \r
- IPartsList * This,\r
- /* [out] */ \r
- __out UINT *pCount);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetPart )( \r
- IPartsList * This,\r
- /* [in] */ \r
- __in UINT nIndex,\r
- /* [out] */ \r
- __out IPart **ppPart);\r
- \r
- END_INTERFACE\r
- } IPartsListVtbl;\r
-\r
- interface IPartsList\r
- {\r
- CONST_VTBL struct IPartsListVtbl *lpVtbl;\r
- };\r
-\r
- \r
-\r
-#ifdef COBJMACROS\r
-\r
-\r
-#define IPartsList_QueryInterface(This,riid,ppvObject) \\r
- ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r
-\r
-#define IPartsList_AddRef(This) \\r
- ( (This)->lpVtbl -> AddRef(This) ) \r
-\r
-#define IPartsList_Release(This) \\r
- ( (This)->lpVtbl -> Release(This) ) \r
-\r
-\r
-#define IPartsList_GetCount(This,pCount) \\r
- ( (This)->lpVtbl -> GetCount(This,pCount) ) \r
-\r
-#define IPartsList_GetPart(This,nIndex,ppPart) \\r
- ( (This)->lpVtbl -> GetPart(This,nIndex,ppPart) ) \r
-\r
-#endif /* COBJMACROS */\r
-\r
-\r
-#endif /* C style interface */\r
-\r
-\r
-\r
-\r
-#endif /* __IPartsList_INTERFACE_DEFINED__ */\r
-\r
-\r
-#ifndef __IPart_INTERFACE_DEFINED__\r
-#define __IPart_INTERFACE_DEFINED__\r
-\r
-/* interface IPart */\r
-/* [object][unique][helpstring][uuid][local] */ \r
-\r
-\r
-EXTERN_C const IID IID_IPart;\r
-\r
-#if defined(__cplusplus) && !defined(CINTERFACE)\r
- \r
- MIDL_INTERFACE("AE2DE0E4-5BCA-4F2D-AA46-5D13F8FDB3A9")\r
- IPart : public IUnknown\r
- {\r
- public:\r
- virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetName( \r
- /* [out] */ \r
- __deref_out LPWSTR *ppwstrName) = 0;\r
- \r
- virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetLocalId( \r
- /* [out] */ \r
- __out UINT *pnId) = 0;\r
- \r
- virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetGlobalId( \r
- /* [out] */ \r
- __deref_out LPWSTR *ppwstrGlobalId) = 0;\r
- \r
- virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetPartType( \r
- /* [out] */ \r
- __out PartType *pPartType) = 0;\r
- \r
- virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetSubType( \r
- /* [out] */ GUID *pSubType) = 0;\r
- \r
- virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetControlInterfaceCount( \r
- /* [out] */ \r
- __out UINT *pCount) = 0;\r
- \r
- virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetControlInterface( \r
- /* [in] */ \r
- __in UINT nIndex,\r
- /* [out] */ \r
- __out IControlInterface **ppInterfaceDesc) = 0;\r
- \r
- virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE EnumPartsIncoming( \r
- /* [out] */ \r
- __out IPartsList **ppParts) = 0;\r
- \r
- virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE EnumPartsOutgoing( \r
- /* [out] */ \r
- __out IPartsList **ppParts) = 0;\r
- \r
- virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetTopologyObject( \r
- /* [out] */ \r
- __out IDeviceTopology **ppTopology) = 0;\r
- \r
- virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE Activate( \r
- /* [in] */ \r
- __in DWORD dwClsContext,\r
- /* [in] */ \r
- __in REFIID refiid,\r
- /* [iid_is][out] */ \r
- __out_opt void **ppvObject) = 0;\r
- \r
- virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE RegisterControlChangeCallback( \r
- /* [in] */ \r
- __in REFGUID riid,\r
- /* [in] */ \r
- __in IControlChangeNotify *pNotify) = 0;\r
- \r
- virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE UnregisterControlChangeCallback( \r
- /* [in] */ \r
- __in IControlChangeNotify *pNotify) = 0;\r
- \r
- };\r
- \r
-#else /* C style interface */\r
-\r
- typedef struct IPartVtbl\r
- {\r
- BEGIN_INTERFACE\r
- \r
- HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r
- IPart * This,\r
- /* [in] */ REFIID riid,\r
- /* [iid_is][out] */ \r
- __RPC__deref_out void **ppvObject);\r
- \r
- ULONG ( STDMETHODCALLTYPE *AddRef )( \r
- IPart * This);\r
- \r
- ULONG ( STDMETHODCALLTYPE *Release )( \r
- IPart * This);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetName )( \r
- IPart * This,\r
- /* [out] */ \r
- __deref_out LPWSTR *ppwstrName);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetLocalId )( \r
- IPart * This,\r
- /* [out] */ \r
- __out UINT *pnId);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetGlobalId )( \r
- IPart * This,\r
- /* [out] */ \r
- __deref_out LPWSTR *ppwstrGlobalId);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetPartType )( \r
- IPart * This,\r
- /* [out] */ \r
- __out PartType *pPartType);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetSubType )( \r
- IPart * This,\r
- /* [out] */ GUID *pSubType);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetControlInterfaceCount )( \r
- IPart * This,\r
- /* [out] */ \r
- __out UINT *pCount);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetControlInterface )( \r
- IPart * This,\r
- /* [in] */ \r
- __in UINT nIndex,\r
- /* [out] */ \r
- __out IControlInterface **ppInterfaceDesc);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *EnumPartsIncoming )( \r
- IPart * This,\r
- /* [out] */ \r
- __out IPartsList **ppParts);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *EnumPartsOutgoing )( \r
- IPart * This,\r
- /* [out] */ \r
- __out IPartsList **ppParts);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetTopologyObject )( \r
- IPart * This,\r
- /* [out] */ \r
- __out IDeviceTopology **ppTopology);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *Activate )( \r
- IPart * This,\r
- /* [in] */ \r
- __in DWORD dwClsContext,\r
- /* [in] */ \r
- __in REFIID refiid,\r
- /* [iid_is][out] */ \r
- __out_opt void **ppvObject);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *RegisterControlChangeCallback )( \r
- IPart * This,\r
- /* [in] */ \r
- __in REFGUID riid,\r
- /* [in] */ \r
- __in IControlChangeNotify *pNotify);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *UnregisterControlChangeCallback )( \r
- IPart * This,\r
- /* [in] */ \r
- __in IControlChangeNotify *pNotify);\r
- \r
- END_INTERFACE\r
- } IPartVtbl;\r
-\r
- interface IPart\r
- {\r
- CONST_VTBL struct IPartVtbl *lpVtbl;\r
- };\r
-\r
- \r
-\r
-#ifdef COBJMACROS\r
-\r
-\r
-#define IPart_QueryInterface(This,riid,ppvObject) \\r
- ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r
-\r
-#define IPart_AddRef(This) \\r
- ( (This)->lpVtbl -> AddRef(This) ) \r
-\r
-#define IPart_Release(This) \\r
- ( (This)->lpVtbl -> Release(This) ) \r
-\r
-\r
-#define IPart_GetName(This,ppwstrName) \\r
- ( (This)->lpVtbl -> GetName(This,ppwstrName) ) \r
-\r
-#define IPart_GetLocalId(This,pnId) \\r
- ( (This)->lpVtbl -> GetLocalId(This,pnId) ) \r
-\r
-#define IPart_GetGlobalId(This,ppwstrGlobalId) \\r
- ( (This)->lpVtbl -> GetGlobalId(This,ppwstrGlobalId) ) \r
-\r
-#define IPart_GetPartType(This,pPartType) \\r
- ( (This)->lpVtbl -> GetPartType(This,pPartType) ) \r
-\r
-#define IPart_GetSubType(This,pSubType) \\r
- ( (This)->lpVtbl -> GetSubType(This,pSubType) ) \r
-\r
-#define IPart_GetControlInterfaceCount(This,pCount) \\r
- ( (This)->lpVtbl -> GetControlInterfaceCount(This,pCount) ) \r
-\r
-#define IPart_GetControlInterface(This,nIndex,ppInterfaceDesc) \\r
- ( (This)->lpVtbl -> GetControlInterface(This,nIndex,ppInterfaceDesc) ) \r
-\r
-#define IPart_EnumPartsIncoming(This,ppParts) \\r
- ( (This)->lpVtbl -> EnumPartsIncoming(This,ppParts) ) \r
-\r
-#define IPart_EnumPartsOutgoing(This,ppParts) \\r
- ( (This)->lpVtbl -> EnumPartsOutgoing(This,ppParts) ) \r
-\r
-#define IPart_GetTopologyObject(This,ppTopology) \\r
- ( (This)->lpVtbl -> GetTopologyObject(This,ppTopology) ) \r
-\r
-#define IPart_Activate(This,dwClsContext,refiid,ppvObject) \\r
- ( (This)->lpVtbl -> Activate(This,dwClsContext,refiid,ppvObject) ) \r
-\r
-#define IPart_RegisterControlChangeCallback(This,riid,pNotify) \\r
- ( (This)->lpVtbl -> RegisterControlChangeCallback(This,riid,pNotify) ) \r
-\r
-#define IPart_UnregisterControlChangeCallback(This,pNotify) \\r
- ( (This)->lpVtbl -> UnregisterControlChangeCallback(This,pNotify) ) \r
-\r
-#endif /* COBJMACROS */\r
-\r
-\r
-#endif /* C style interface */\r
-\r
-\r
-\r
-\r
-#endif /* __IPart_INTERFACE_DEFINED__ */\r
-\r
-\r
-#ifndef __IConnector_INTERFACE_DEFINED__\r
-#define __IConnector_INTERFACE_DEFINED__\r
-\r
-/* interface IConnector */\r
-/* [object][unique][helpstring][uuid][local] */ \r
-\r
-\r
-EXTERN_C const IID IID_IConnector;\r
-\r
-#if defined(__cplusplus) && !defined(CINTERFACE)\r
- \r
- MIDL_INTERFACE("9c2c4058-23f5-41de-877a-df3af236a09e")\r
- IConnector : public IUnknown\r
- {\r
- public:\r
- virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetType( \r
- /* [out] */ \r
- __out ConnectorType *pType) = 0;\r
- \r
- virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetDataFlow( \r
- /* [out] */ \r
- __out DataFlow *pFlow) = 0;\r
- \r
- virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE ConnectTo( \r
- /* [in] */ \r
- __in IConnector *pConnectTo) = 0;\r
- \r
- virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE Disconnect( void) = 0;\r
- \r
- virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IsConnected( \r
- /* [out] */ \r
- __out BOOL *pbConnected) = 0;\r
- \r
- virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetConnectedTo( \r
- /* [out] */ \r
- __out IConnector **ppConTo) = 0;\r
- \r
- virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetConnectorIdConnectedTo( \r
- /* [out] */ \r
- __deref_out LPWSTR *ppwstrConnectorId) = 0;\r
- \r
- virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetDeviceIdConnectedTo( \r
- /* [out] */ \r
- __deref_out LPWSTR *ppwstrDeviceId) = 0;\r
- \r
- };\r
- \r
-#else /* C style interface */\r
-\r
- typedef struct IConnectorVtbl\r
- {\r
- BEGIN_INTERFACE\r
- \r
- HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r
- IConnector * This,\r
- /* [in] */ REFIID riid,\r
- /* [iid_is][out] */ \r
- __RPC__deref_out void **ppvObject);\r
- \r
- ULONG ( STDMETHODCALLTYPE *AddRef )( \r
- IConnector * This);\r
- \r
- ULONG ( STDMETHODCALLTYPE *Release )( \r
- IConnector * This);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetType )( \r
- IConnector * This,\r
- /* [out] */ \r
- __out ConnectorType *pType);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetDataFlow )( \r
- IConnector * This,\r
- /* [out] */ \r
- __out DataFlow *pFlow);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *ConnectTo )( \r
- IConnector * This,\r
- /* [in] */ \r
- __in IConnector *pConnectTo);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *Disconnect )( \r
- IConnector * This);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *IsConnected )( \r
- IConnector * This,\r
- /* [out] */ \r
- __out BOOL *pbConnected);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetConnectedTo )( \r
- IConnector * This,\r
- /* [out] */ \r
- __out IConnector **ppConTo);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetConnectorIdConnectedTo )( \r
- IConnector * This,\r
- /* [out] */ \r
- __deref_out LPWSTR *ppwstrConnectorId);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetDeviceIdConnectedTo )( \r
- IConnector * This,\r
- /* [out] */ \r
- __deref_out LPWSTR *ppwstrDeviceId);\r
- \r
- END_INTERFACE\r
- } IConnectorVtbl;\r
-\r
- interface IConnector\r
- {\r
- CONST_VTBL struct IConnectorVtbl *lpVtbl;\r
- };\r
-\r
- \r
-\r
-#ifdef COBJMACROS\r
-\r
-\r
-#define IConnector_QueryInterface(This,riid,ppvObject) \\r
- ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r
-\r
-#define IConnector_AddRef(This) \\r
- ( (This)->lpVtbl -> AddRef(This) ) \r
-\r
-#define IConnector_Release(This) \\r
- ( (This)->lpVtbl -> Release(This) ) \r
-\r
-\r
-#define IConnector_GetType(This,pType) \\r
- ( (This)->lpVtbl -> GetType(This,pType) ) \r
-\r
-#define IConnector_GetDataFlow(This,pFlow) \\r
- ( (This)->lpVtbl -> GetDataFlow(This,pFlow) ) \r
-\r
-#define IConnector_ConnectTo(This,pConnectTo) \\r
- ( (This)->lpVtbl -> ConnectTo(This,pConnectTo) ) \r
-\r
-#define IConnector_Disconnect(This) \\r
- ( (This)->lpVtbl -> Disconnect(This) ) \r
-\r
-#define IConnector_IsConnected(This,pbConnected) \\r
- ( (This)->lpVtbl -> IsConnected(This,pbConnected) ) \r
-\r
-#define IConnector_GetConnectedTo(This,ppConTo) \\r
- ( (This)->lpVtbl -> GetConnectedTo(This,ppConTo) ) \r
-\r
-#define IConnector_GetConnectorIdConnectedTo(This,ppwstrConnectorId) \\r
- ( (This)->lpVtbl -> GetConnectorIdConnectedTo(This,ppwstrConnectorId) ) \r
-\r
-#define IConnector_GetDeviceIdConnectedTo(This,ppwstrDeviceId) \\r
- ( (This)->lpVtbl -> GetDeviceIdConnectedTo(This,ppwstrDeviceId) ) \r
-\r
-#endif /* COBJMACROS */\r
-\r
-\r
-#endif /* C style interface */\r
-\r
-\r
-\r
-\r
-#endif /* __IConnector_INTERFACE_DEFINED__ */\r
-\r
-\r
-#ifndef __ISubunit_INTERFACE_DEFINED__\r
-#define __ISubunit_INTERFACE_DEFINED__\r
-\r
-/* interface ISubunit */\r
-/* [object][unique][helpstring][uuid][local] */ \r
-\r
-\r
-EXTERN_C const IID IID_ISubunit;\r
-\r
-#if defined(__cplusplus) && !defined(CINTERFACE)\r
- \r
- MIDL_INTERFACE("82149A85-DBA6-4487-86BB-EA8F7FEFCC71")\r
- ISubunit : public IUnknown\r
- {\r
- public:\r
- };\r
- \r
-#else /* C style interface */\r
-\r
- typedef struct ISubunitVtbl\r
- {\r
- BEGIN_INTERFACE\r
- \r
- HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r
- ISubunit * This,\r
- /* [in] */ REFIID riid,\r
- /* [iid_is][out] */ \r
- __RPC__deref_out void **ppvObject);\r
- \r
- ULONG ( STDMETHODCALLTYPE *AddRef )( \r
- ISubunit * This);\r
- \r
- ULONG ( STDMETHODCALLTYPE *Release )( \r
- ISubunit * This);\r
- \r
- END_INTERFACE\r
- } ISubunitVtbl;\r
-\r
- interface ISubunit\r
- {\r
- CONST_VTBL struct ISubunitVtbl *lpVtbl;\r
- };\r
-\r
- \r
-\r
-#ifdef COBJMACROS\r
-\r
-\r
-#define ISubunit_QueryInterface(This,riid,ppvObject) \\r
- ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r
-\r
-#define ISubunit_AddRef(This) \\r
- ( (This)->lpVtbl -> AddRef(This) ) \r
-\r
-#define ISubunit_Release(This) \\r
- ( (This)->lpVtbl -> Release(This) ) \r
-\r
-\r
-#endif /* COBJMACROS */\r
-\r
-\r
-#endif /* C style interface */\r
-\r
-\r
-\r
-\r
-#endif /* __ISubunit_INTERFACE_DEFINED__ */\r
-\r
-\r
-#ifndef __IControlInterface_INTERFACE_DEFINED__\r
-#define __IControlInterface_INTERFACE_DEFINED__\r
-\r
-/* interface IControlInterface */\r
-/* [object][unique][helpstring][uuid][local] */ \r
-\r
-\r
-EXTERN_C const IID IID_IControlInterface;\r
-\r
-#if defined(__cplusplus) && !defined(CINTERFACE)\r
- \r
- MIDL_INTERFACE("45d37c3f-5140-444a-ae24-400789f3cbf3")\r
- IControlInterface : public IUnknown\r
- {\r
- public:\r
- virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetName( \r
- /* [out] */ \r
- __deref_out LPWSTR *ppwstrName) = 0;\r
- \r
- virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetIID( \r
- /* [out] */ \r
- __out GUID *pIID) = 0;\r
- \r
- };\r
- \r
-#else /* C style interface */\r
-\r
- typedef struct IControlInterfaceVtbl\r
- {\r
- BEGIN_INTERFACE\r
- \r
- HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r
- IControlInterface * This,\r
- /* [in] */ REFIID riid,\r
- /* [iid_is][out] */ \r
- __RPC__deref_out void **ppvObject);\r
- \r
- ULONG ( STDMETHODCALLTYPE *AddRef )( \r
- IControlInterface * This);\r
- \r
- ULONG ( STDMETHODCALLTYPE *Release )( \r
- IControlInterface * This);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetName )( \r
- IControlInterface * This,\r
- /* [out] */ \r
- __deref_out LPWSTR *ppwstrName);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetIID )( \r
- IControlInterface * This,\r
- /* [out] */ \r
- __out GUID *pIID);\r
- \r
- END_INTERFACE\r
- } IControlInterfaceVtbl;\r
-\r
- interface IControlInterface\r
- {\r
- CONST_VTBL struct IControlInterfaceVtbl *lpVtbl;\r
- };\r
-\r
- \r
-\r
-#ifdef COBJMACROS\r
-\r
-\r
-#define IControlInterface_QueryInterface(This,riid,ppvObject) \\r
- ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r
-\r
-#define IControlInterface_AddRef(This) \\r
- ( (This)->lpVtbl -> AddRef(This) ) \r
-\r
-#define IControlInterface_Release(This) \\r
- ( (This)->lpVtbl -> Release(This) ) \r
-\r
-\r
-#define IControlInterface_GetName(This,ppwstrName) \\r
- ( (This)->lpVtbl -> GetName(This,ppwstrName) ) \r
-\r
-#define IControlInterface_GetIID(This,pIID) \\r
- ( (This)->lpVtbl -> GetIID(This,pIID) ) \r
-\r
-#endif /* COBJMACROS */\r
-\r
-\r
-#endif /* C style interface */\r
-\r
-\r
-\r
-\r
-#endif /* __IControlInterface_INTERFACE_DEFINED__ */\r
-\r
-\r
-#ifndef __IControlChangeNotify_INTERFACE_DEFINED__\r
-#define __IControlChangeNotify_INTERFACE_DEFINED__\r
-\r
-/* interface IControlChangeNotify */\r
-/* [unique][helpstring][nonextensible][uuid][local][object] */ \r
-\r
-\r
-EXTERN_C const IID IID_IControlChangeNotify;\r
-\r
-#if defined(__cplusplus) && !defined(CINTERFACE)\r
- \r
- MIDL_INTERFACE("A09513ED-C709-4d21-BD7B-5F34C47F3947")\r
- IControlChangeNotify : public IUnknown\r
- {\r
- public:\r
- virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE OnNotify( \r
- /* [in] */ \r
- __in DWORD dwSenderProcessId,\r
- /* [unique][in] */ \r
- __in_opt LPCGUID pguidEventContext) = 0;\r
- \r
- };\r
- \r
-#else /* C style interface */\r
-\r
- typedef struct IControlChangeNotifyVtbl\r
- {\r
- BEGIN_INTERFACE\r
- \r
- HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r
- IControlChangeNotify * This,\r
- /* [in] */ REFIID riid,\r
- /* [iid_is][out] */ \r
- __RPC__deref_out void **ppvObject);\r
- \r
- ULONG ( STDMETHODCALLTYPE *AddRef )( \r
- IControlChangeNotify * This);\r
- \r
- ULONG ( STDMETHODCALLTYPE *Release )( \r
- IControlChangeNotify * This);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *OnNotify )( \r
- IControlChangeNotify * This,\r
- /* [in] */ \r
- __in DWORD dwSenderProcessId,\r
- /* [unique][in] */ \r
- __in_opt LPCGUID pguidEventContext);\r
- \r
- END_INTERFACE\r
- } IControlChangeNotifyVtbl;\r
-\r
- interface IControlChangeNotify\r
- {\r
- CONST_VTBL struct IControlChangeNotifyVtbl *lpVtbl;\r
- };\r
-\r
- \r
-\r
-#ifdef COBJMACROS\r
-\r
-\r
-#define IControlChangeNotify_QueryInterface(This,riid,ppvObject) \\r
- ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r
-\r
-#define IControlChangeNotify_AddRef(This) \\r
- ( (This)->lpVtbl -> AddRef(This) ) \r
-\r
-#define IControlChangeNotify_Release(This) \\r
- ( (This)->lpVtbl -> Release(This) ) \r
-\r
-\r
-#define IControlChangeNotify_OnNotify(This,dwSenderProcessId,pguidEventContext) \\r
- ( (This)->lpVtbl -> OnNotify(This,dwSenderProcessId,pguidEventContext) ) \r
-\r
-#endif /* COBJMACROS */\r
-\r
-\r
-#endif /* C style interface */\r
-\r
-\r
-\r
-\r
-#endif /* __IControlChangeNotify_INTERFACE_DEFINED__ */\r
-\r
-\r
-#ifndef __IDeviceTopology_INTERFACE_DEFINED__\r
-#define __IDeviceTopology_INTERFACE_DEFINED__\r
-\r
-/* interface IDeviceTopology */\r
-/* [unique][helpstring][nonextensible][uuid][local][object] */ \r
-\r
-\r
-EXTERN_C const IID IID_IDeviceTopology;\r
-\r
-#if defined(__cplusplus) && !defined(CINTERFACE)\r
- \r
- MIDL_INTERFACE("2A07407E-6497-4A18-9787-32F79BD0D98F")\r
- IDeviceTopology : public IUnknown\r
- {\r
- public:\r
- virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetConnectorCount( \r
- /* [out] */ \r
- __out UINT *pCount) = 0;\r
- \r
- virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetConnector( \r
- /* [in] */ \r
- __in UINT nIndex,\r
- /* [out] */ \r
- __out IConnector **ppConnector) = 0;\r
- \r
- virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetSubunitCount( \r
- /* [out] */ \r
- __out UINT *pCount) = 0;\r
- \r
- virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetSubunit( \r
- /* [in] */ \r
- __in UINT nIndex,\r
- /* [out] */ \r
- __deref_out ISubunit **ppSubunit) = 0;\r
- \r
- virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetPartById( \r
- /* [in] */ \r
- __in UINT nId,\r
- /* [out] */ \r
- __deref_out IPart **ppPart) = 0;\r
- \r
- virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetDeviceId( \r
- /* [out] */ \r
- __deref_out LPWSTR *ppwstrDeviceId) = 0;\r
- \r
- virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetSignalPath( \r
- /* [in] */ \r
- __in IPart *pIPartFrom,\r
- /* [in] */ \r
- __in IPart *pIPartTo,\r
- /* [in] */ \r
- __in BOOL bRejectMixedPaths,\r
- /* [out] */ \r
- __deref_out IPartsList **ppParts) = 0;\r
- \r
- };\r
- \r
-#else /* C style interface */\r
-\r
- typedef struct IDeviceTopologyVtbl\r
- {\r
- BEGIN_INTERFACE\r
- \r
- HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r
- IDeviceTopology * This,\r
- /* [in] */ REFIID riid,\r
- /* [iid_is][out] */ \r
- __RPC__deref_out void **ppvObject);\r
- \r
- ULONG ( STDMETHODCALLTYPE *AddRef )( \r
- IDeviceTopology * This);\r
- \r
- ULONG ( STDMETHODCALLTYPE *Release )( \r
- IDeviceTopology * This);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetConnectorCount )( \r
- IDeviceTopology * This,\r
- /* [out] */ \r
- __out UINT *pCount);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetConnector )( \r
- IDeviceTopology * This,\r
- /* [in] */ \r
- __in UINT nIndex,\r
- /* [out] */ \r
- __out IConnector **ppConnector);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetSubunitCount )( \r
- IDeviceTopology * This,\r
- /* [out] */ \r
- __out UINT *pCount);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetSubunit )( \r
- IDeviceTopology * This,\r
- /* [in] */ \r
- __in UINT nIndex,\r
- /* [out] */ \r
- __deref_out ISubunit **ppSubunit);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetPartById )( \r
- IDeviceTopology * This,\r
- /* [in] */ \r
- __in UINT nId,\r
- /* [out] */ \r
- __deref_out IPart **ppPart);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetDeviceId )( \r
- IDeviceTopology * This,\r
- /* [out] */ \r
- __deref_out LPWSTR *ppwstrDeviceId);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetSignalPath )( \r
- IDeviceTopology * This,\r
- /* [in] */ \r
- __in IPart *pIPartFrom,\r
- /* [in] */ \r
- __in IPart *pIPartTo,\r
- /* [in] */ \r
- __in BOOL bRejectMixedPaths,\r
- /* [out] */ \r
- __deref_out IPartsList **ppParts);\r
- \r
- END_INTERFACE\r
- } IDeviceTopologyVtbl;\r
-\r
- interface IDeviceTopology\r
- {\r
- CONST_VTBL struct IDeviceTopologyVtbl *lpVtbl;\r
- };\r
-\r
- \r
-\r
-#ifdef COBJMACROS\r
-\r
-\r
-#define IDeviceTopology_QueryInterface(This,riid,ppvObject) \\r
- ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r
-\r
-#define IDeviceTopology_AddRef(This) \\r
- ( (This)->lpVtbl -> AddRef(This) ) \r
-\r
-#define IDeviceTopology_Release(This) \\r
- ( (This)->lpVtbl -> Release(This) ) \r
-\r
-\r
-#define IDeviceTopology_GetConnectorCount(This,pCount) \\r
- ( (This)->lpVtbl -> GetConnectorCount(This,pCount) ) \r
-\r
-#define IDeviceTopology_GetConnector(This,nIndex,ppConnector) \\r
- ( (This)->lpVtbl -> GetConnector(This,nIndex,ppConnector) ) \r
-\r
-#define IDeviceTopology_GetSubunitCount(This,pCount) \\r
- ( (This)->lpVtbl -> GetSubunitCount(This,pCount) ) \r
-\r
-#define IDeviceTopology_GetSubunit(This,nIndex,ppSubunit) \\r
- ( (This)->lpVtbl -> GetSubunit(This,nIndex,ppSubunit) ) \r
-\r
-#define IDeviceTopology_GetPartById(This,nId,ppPart) \\r
- ( (This)->lpVtbl -> GetPartById(This,nId,ppPart) ) \r
-\r
-#define IDeviceTopology_GetDeviceId(This,ppwstrDeviceId) \\r
- ( (This)->lpVtbl -> GetDeviceId(This,ppwstrDeviceId) ) \r
-\r
-#define IDeviceTopology_GetSignalPath(This,pIPartFrom,pIPartTo,bRejectMixedPaths,ppParts) \\r
- ( (This)->lpVtbl -> GetSignalPath(This,pIPartFrom,pIPartTo,bRejectMixedPaths,ppParts) ) \r
-\r
-#endif /* COBJMACROS */\r
-\r
-\r
-#endif /* C style interface */\r
-\r
-\r
-\r
-\r
-#endif /* __IDeviceTopology_INTERFACE_DEFINED__ */\r
-\r
-\r
-\r
-#ifndef __DevTopologyLib_LIBRARY_DEFINED__\r
-#define __DevTopologyLib_LIBRARY_DEFINED__\r
-\r
-/* library DevTopologyLib */\r
-/* [helpstring][version][uuid] */ \r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-EXTERN_C const IID LIBID_DevTopologyLib;\r
-\r
-EXTERN_C const CLSID CLSID_DeviceTopology;\r
-\r
-#ifdef __cplusplus\r
-\r
-class DECLSPEC_UUID("1DF639D0-5EC1-47AA-9379-828DC1AA8C59")\r
-DeviceTopology;\r
-#endif\r
-#endif /* __DevTopologyLib_LIBRARY_DEFINED__ */\r
-\r
-/* Additional Prototypes for ALL interfaces */\r
-\r
-/* end of Additional Prototypes */\r
-\r
-#ifdef __cplusplus\r
-}\r
-#endif\r
-\r
-#endif\r
-\r
-\r
-\r
+
+
+/* this ALWAYS GENERATED file contains the definitions for the interfaces */
+
+
+ /* File created by MIDL compiler version 7.00.0499 */
+/* Compiler settings for devicetopology.idl:
+ Oicf, W1, Zp8, env=Win32 (32b run)
+ protocol : dce , ms_ext, c_ext, robust
+ error checks: allocation ref bounds_check enum stub_data
+ VC __declspec() decoration level:
+ __declspec(uuid()), __declspec(selectany), __declspec(novtable)
+ DECLSPEC_UUID(), MIDL_INTERFACE()
+*/
+//@@MIDL_FILE_HEADING( )
+
+#pragma warning( disable: 4049 ) /* more than 64k source lines */
+
+
+/* verify that the <rpcndr.h> version is high enough to compile this file*/
+#ifndef __REQUIRED_RPCNDR_H_VERSION__
+#define __REQUIRED_RPCNDR_H_VERSION__ 500
+#endif
+
+/* verify that the <rpcsal.h> version is high enough to compile this file*/
+#ifndef __REQUIRED_RPCSAL_H_VERSION__
+#define __REQUIRED_RPCSAL_H_VERSION__ 100
+#endif
+
+#include "rpc.h"
+#include "rpcndr.h"
+
+#ifndef __RPCNDR_H_VERSION__
+#error this stub requires an updated version of <rpcndr.h>
+#endif // __RPCNDR_H_VERSION__
+
+#ifndef COM_NO_WINDOWS_H
+#include "windows.h"
+#include "ole2.h"
+#endif /*COM_NO_WINDOWS_H*/
+
+#ifndef __devicetopology_h__
+#define __devicetopology_h__
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#pragma once
+#endif
+
+/* Forward Declarations */
+
+#ifndef __IKsControl_FWD_DEFINED__
+#define __IKsControl_FWD_DEFINED__
+typedef interface IKsControl IKsControl;
+#endif /* __IKsControl_FWD_DEFINED__ */
+
+
+#ifndef __IPerChannelDbLevel_FWD_DEFINED__
+#define __IPerChannelDbLevel_FWD_DEFINED__
+typedef interface IPerChannelDbLevel IPerChannelDbLevel;
+#endif /* __IPerChannelDbLevel_FWD_DEFINED__ */
+
+
+#ifndef __IAudioVolumeLevel_FWD_DEFINED__
+#define __IAudioVolumeLevel_FWD_DEFINED__
+typedef interface IAudioVolumeLevel IAudioVolumeLevel;
+#endif /* __IAudioVolumeLevel_FWD_DEFINED__ */
+
+
+#ifndef __IAudioChannelConfig_FWD_DEFINED__
+#define __IAudioChannelConfig_FWD_DEFINED__
+typedef interface IAudioChannelConfig IAudioChannelConfig;
+#endif /* __IAudioChannelConfig_FWD_DEFINED__ */
+
+
+#ifndef __IAudioLoudness_FWD_DEFINED__
+#define __IAudioLoudness_FWD_DEFINED__
+typedef interface IAudioLoudness IAudioLoudness;
+#endif /* __IAudioLoudness_FWD_DEFINED__ */
+
+
+#ifndef __IAudioInputSelector_FWD_DEFINED__
+#define __IAudioInputSelector_FWD_DEFINED__
+typedef interface IAudioInputSelector IAudioInputSelector;
+#endif /* __IAudioInputSelector_FWD_DEFINED__ */
+
+
+#ifndef __IAudioOutputSelector_FWD_DEFINED__
+#define __IAudioOutputSelector_FWD_DEFINED__
+typedef interface IAudioOutputSelector IAudioOutputSelector;
+#endif /* __IAudioOutputSelector_FWD_DEFINED__ */
+
+
+#ifndef __IAudioMute_FWD_DEFINED__
+#define __IAudioMute_FWD_DEFINED__
+typedef interface IAudioMute IAudioMute;
+#endif /* __IAudioMute_FWD_DEFINED__ */
+
+
+#ifndef __IAudioBass_FWD_DEFINED__
+#define __IAudioBass_FWD_DEFINED__
+typedef interface IAudioBass IAudioBass;
+#endif /* __IAudioBass_FWD_DEFINED__ */
+
+
+#ifndef __IAudioMidrange_FWD_DEFINED__
+#define __IAudioMidrange_FWD_DEFINED__
+typedef interface IAudioMidrange IAudioMidrange;
+#endif /* __IAudioMidrange_FWD_DEFINED__ */
+
+
+#ifndef __IAudioTreble_FWD_DEFINED__
+#define __IAudioTreble_FWD_DEFINED__
+typedef interface IAudioTreble IAudioTreble;
+#endif /* __IAudioTreble_FWD_DEFINED__ */
+
+
+#ifndef __IAudioAutoGainControl_FWD_DEFINED__
+#define __IAudioAutoGainControl_FWD_DEFINED__
+typedef interface IAudioAutoGainControl IAudioAutoGainControl;
+#endif /* __IAudioAutoGainControl_FWD_DEFINED__ */
+
+
+#ifndef __IAudioPeakMeter_FWD_DEFINED__
+#define __IAudioPeakMeter_FWD_DEFINED__
+typedef interface IAudioPeakMeter IAudioPeakMeter;
+#endif /* __IAudioPeakMeter_FWD_DEFINED__ */
+
+
+#ifndef __IDeviceSpecificProperty_FWD_DEFINED__
+#define __IDeviceSpecificProperty_FWD_DEFINED__
+typedef interface IDeviceSpecificProperty IDeviceSpecificProperty;
+#endif /* __IDeviceSpecificProperty_FWD_DEFINED__ */
+
+
+#ifndef __IKsFormatSupport_FWD_DEFINED__
+#define __IKsFormatSupport_FWD_DEFINED__
+typedef interface IKsFormatSupport IKsFormatSupport;
+#endif /* __IKsFormatSupport_FWD_DEFINED__ */
+
+
+#ifndef __IKsJackDescription_FWD_DEFINED__
+#define __IKsJackDescription_FWD_DEFINED__
+typedef interface IKsJackDescription IKsJackDescription;
+#endif /* __IKsJackDescription_FWD_DEFINED__ */
+
+
+#ifndef __IPartsList_FWD_DEFINED__
+#define __IPartsList_FWD_DEFINED__
+typedef interface IPartsList IPartsList;
+#endif /* __IPartsList_FWD_DEFINED__ */
+
+
+#ifndef __IPart_FWD_DEFINED__
+#define __IPart_FWD_DEFINED__
+typedef interface IPart IPart;
+#endif /* __IPart_FWD_DEFINED__ */
+
+
+#ifndef __IConnector_FWD_DEFINED__
+#define __IConnector_FWD_DEFINED__
+typedef interface IConnector IConnector;
+#endif /* __IConnector_FWD_DEFINED__ */
+
+
+#ifndef __ISubunit_FWD_DEFINED__
+#define __ISubunit_FWD_DEFINED__
+typedef interface ISubunit ISubunit;
+#endif /* __ISubunit_FWD_DEFINED__ */
+
+
+#ifndef __IControlInterface_FWD_DEFINED__
+#define __IControlInterface_FWD_DEFINED__
+typedef interface IControlInterface IControlInterface;
+#endif /* __IControlInterface_FWD_DEFINED__ */
+
+
+#ifndef __IControlChangeNotify_FWD_DEFINED__
+#define __IControlChangeNotify_FWD_DEFINED__
+typedef interface IControlChangeNotify IControlChangeNotify;
+#endif /* __IControlChangeNotify_FWD_DEFINED__ */
+
+
+#ifndef __IDeviceTopology_FWD_DEFINED__
+#define __IDeviceTopology_FWD_DEFINED__
+typedef interface IDeviceTopology IDeviceTopology;
+#endif /* __IDeviceTopology_FWD_DEFINED__ */
+
+
+#ifndef __DeviceTopology_FWD_DEFINED__
+#define __DeviceTopology_FWD_DEFINED__
+
+#ifdef __cplusplus
+typedef class DeviceTopology DeviceTopology;
+#else
+typedef struct DeviceTopology DeviceTopology;
+#endif /* __cplusplus */
+
+#endif /* __DeviceTopology_FWD_DEFINED__ */
+
+
+#ifndef __IPartsList_FWD_DEFINED__
+#define __IPartsList_FWD_DEFINED__
+typedef interface IPartsList IPartsList;
+#endif /* __IPartsList_FWD_DEFINED__ */
+
+
+#ifndef __IPerChannelDbLevel_FWD_DEFINED__
+#define __IPerChannelDbLevel_FWD_DEFINED__
+typedef interface IPerChannelDbLevel IPerChannelDbLevel;
+#endif /* __IPerChannelDbLevel_FWD_DEFINED__ */
+
+
+#ifndef __IAudioVolumeLevel_FWD_DEFINED__
+#define __IAudioVolumeLevel_FWD_DEFINED__
+typedef interface IAudioVolumeLevel IAudioVolumeLevel;
+#endif /* __IAudioVolumeLevel_FWD_DEFINED__ */
+
+
+#ifndef __IAudioLoudness_FWD_DEFINED__
+#define __IAudioLoudness_FWD_DEFINED__
+typedef interface IAudioLoudness IAudioLoudness;
+#endif /* __IAudioLoudness_FWD_DEFINED__ */
+
+
+#ifndef __IAudioInputSelector_FWD_DEFINED__
+#define __IAudioInputSelector_FWD_DEFINED__
+typedef interface IAudioInputSelector IAudioInputSelector;
+#endif /* __IAudioInputSelector_FWD_DEFINED__ */
+
+
+#ifndef __IAudioMute_FWD_DEFINED__
+#define __IAudioMute_FWD_DEFINED__
+typedef interface IAudioMute IAudioMute;
+#endif /* __IAudioMute_FWD_DEFINED__ */
+
+
+#ifndef __IAudioBass_FWD_DEFINED__
+#define __IAudioBass_FWD_DEFINED__
+typedef interface IAudioBass IAudioBass;
+#endif /* __IAudioBass_FWD_DEFINED__ */
+
+
+#ifndef __IAudioMidrange_FWD_DEFINED__
+#define __IAudioMidrange_FWD_DEFINED__
+typedef interface IAudioMidrange IAudioMidrange;
+#endif /* __IAudioMidrange_FWD_DEFINED__ */
+
+
+#ifndef __IAudioTreble_FWD_DEFINED__
+#define __IAudioTreble_FWD_DEFINED__
+typedef interface IAudioTreble IAudioTreble;
+#endif /* __IAudioTreble_FWD_DEFINED__ */
+
+
+#ifndef __IAudioAutoGainControl_FWD_DEFINED__
+#define __IAudioAutoGainControl_FWD_DEFINED__
+typedef interface IAudioAutoGainControl IAudioAutoGainControl;
+#endif /* __IAudioAutoGainControl_FWD_DEFINED__ */
+
+
+#ifndef __IAudioOutputSelector_FWD_DEFINED__
+#define __IAudioOutputSelector_FWD_DEFINED__
+typedef interface IAudioOutputSelector IAudioOutputSelector;
+#endif /* __IAudioOutputSelector_FWD_DEFINED__ */
+
+
+#ifndef __IAudioPeakMeter_FWD_DEFINED__
+#define __IAudioPeakMeter_FWD_DEFINED__
+typedef interface IAudioPeakMeter IAudioPeakMeter;
+#endif /* __IAudioPeakMeter_FWD_DEFINED__ */
+
+
+#ifndef __IDeviceSpecificProperty_FWD_DEFINED__
+#define __IDeviceSpecificProperty_FWD_DEFINED__
+typedef interface IDeviceSpecificProperty IDeviceSpecificProperty;
+#endif /* __IDeviceSpecificProperty_FWD_DEFINED__ */
+
+
+#ifndef __IKsFormatSupport_FWD_DEFINED__
+#define __IKsFormatSupport_FWD_DEFINED__
+typedef interface IKsFormatSupport IKsFormatSupport;
+#endif /* __IKsFormatSupport_FWD_DEFINED__ */
+
+
+/* header files for imported files */
+#include "oaidl.h"
+#include "ocidl.h"
+#include "propidl.h"
+
+#ifdef __cplusplus
+extern "C"{
+#endif
+
+
+/* interface __MIDL_itf_devicetopology_0000_0000 */
+/* [local] */
+
+#define E_NOTFOUND HRESULT_FROM_WIN32(ERROR_NOT_FOUND)
+//
+// Flag for clients of IControlChangeNotify::OnNotify to allow those clients to identify hardware initiated notifications
+//
+#define DEVTOPO_HARDWARE_INITIATED_EVENTCONTEXT 'draH'
+/* E2C2E9DE-09B1-4B04-84E5-07931225EE04 */
+DEFINE_GUID(EVENTCONTEXT_VOLUMESLIDER, 0xE2C2E9DE,0x09B1,0x4B04,0x84, 0xE5, 0x07, 0x93, 0x12, 0x25, 0xEE, 0x04);
+#define _IKsControl_
+#include "ks.h"
+#include "ksmedia.h"
+#ifndef _KS_
+typedef /* [public] */ struct __MIDL___MIDL_itf_devicetopology_0000_0000_0001
+ {
+ ULONG FormatSize;
+ ULONG Flags;
+ ULONG SampleSize;
+ ULONG Reserved;
+ GUID MajorFormat;
+ GUID SubFormat;
+ GUID Specifier;
+ } KSDATAFORMAT;
+
+typedef struct __MIDL___MIDL_itf_devicetopology_0000_0000_0001 *PKSDATAFORMAT;
+
+typedef /* [public][public][public][public][public][public][public][public][public][public] */ struct __MIDL___MIDL_itf_devicetopology_0000_0000_0002
+ {
+ union
+ {
+ struct
+ {
+ GUID Set;
+ ULONG Id;
+ ULONG Flags;
+ } ;
+ LONGLONG Alignment;
+ } ;
+ } KSIDENTIFIER;
+
+typedef struct __MIDL___MIDL_itf_devicetopology_0000_0000_0002 *PKSIDENTIFIER;
+
+typedef /* [public][public][public][public] */
+enum __MIDL___MIDL_itf_devicetopology_0000_0000_0005
+ { ePcxChanMap_FL_FR = 0,
+ ePcxChanMap_FC_LFE = ( ePcxChanMap_FL_FR + 1 ) ,
+ ePcxChanMap_BL_BR = ( ePcxChanMap_FC_LFE + 1 ) ,
+ ePcxChanMap_FLC_FRC = ( ePcxChanMap_BL_BR + 1 ) ,
+ ePcxChanMap_SL_SR = ( ePcxChanMap_FLC_FRC + 1 ) ,
+ ePcxChanMap_Unknown = ( ePcxChanMap_SL_SR + 1 )
+ } EChannelMapping;
+
+typedef /* [public][public][public][public] */
+enum __MIDL___MIDL_itf_devicetopology_0000_0000_0006
+ { eConnTypeUnknown = 0,
+ eConnTypeEighth = ( eConnTypeUnknown + 1 ) ,
+ eConnTypeQuarter = ( eConnTypeEighth + 1 ) ,
+ eConnTypeAtapiInternal = ( eConnTypeQuarter + 1 ) ,
+ eConnTypeRCA = ( eConnTypeAtapiInternal + 1 ) ,
+ eConnTypeOptical = ( eConnTypeRCA + 1 ) ,
+ eConnTypeOtherDigital = ( eConnTypeOptical + 1 ) ,
+ eConnTypeOtherAnalog = ( eConnTypeOtherDigital + 1 ) ,
+ eConnTypeMultichannelAnalogDIN = ( eConnTypeOtherAnalog + 1 ) ,
+ eConnTypeXlrProfessional = ( eConnTypeMultichannelAnalogDIN + 1 ) ,
+ eConnTypeRJ11Modem = ( eConnTypeXlrProfessional + 1 ) ,
+ eConnTypeCombination = ( eConnTypeRJ11Modem + 1 )
+ } EPcxConnectionType;
+
+typedef /* [public][public][public][public] */
+enum __MIDL___MIDL_itf_devicetopology_0000_0000_0007
+ { eGeoLocRear = 0x1,
+ eGeoLocFront = ( eGeoLocRear + 1 ) ,
+ eGeoLocLeft = ( eGeoLocFront + 1 ) ,
+ eGeoLocRight = ( eGeoLocLeft + 1 ) ,
+ eGeoLocTop = ( eGeoLocRight + 1 ) ,
+ eGeoLocBottom = ( eGeoLocTop + 1 ) ,
+ eGeoLocRearOPanel = ( eGeoLocBottom + 1 ) ,
+ eGeoLocRiser = ( eGeoLocRearOPanel + 1 ) ,
+ eGeoLocInsideMobileLid = ( eGeoLocRiser + 1 ) ,
+ eGeoLocDrivebay = ( eGeoLocInsideMobileLid + 1 ) ,
+ eGeoLocHDMI = ( eGeoLocDrivebay + 1 ) ,
+ eGeoLocOutsideMobileLid = ( eGeoLocHDMI + 1 ) ,
+ eGeoLocATAPI = ( eGeoLocOutsideMobileLid + 1 ) ,
+ eGeoLocReserved5 = ( eGeoLocATAPI + 1 ) ,
+ eGeoLocReserved6 = ( eGeoLocReserved5 + 1 )
+ } EPcxGeoLocation;
+
+typedef /* [public][public][public][public] */
+enum __MIDL___MIDL_itf_devicetopology_0000_0000_0008
+ { eGenLocPrimaryBox = 0,
+ eGenLocInternal = ( eGenLocPrimaryBox + 1 ) ,
+ eGenLocSeperate = ( eGenLocInternal + 1 ) ,
+ eGenLocOther = ( eGenLocSeperate + 1 )
+ } EPcxGenLocation;
+
+typedef /* [public][public][public][public] */
+enum __MIDL___MIDL_itf_devicetopology_0000_0000_0009
+ { ePortConnJack = 0,
+ ePortConnIntegratedDevice = ( ePortConnJack + 1 ) ,
+ ePortConnBothIntegratedAndJack = ( ePortConnIntegratedDevice + 1 ) ,
+ ePortConnUnknown = ( ePortConnBothIntegratedAndJack + 1 )
+ } EPxcPortConnection;
+
+typedef /* [public][public] */ struct __MIDL___MIDL_itf_devicetopology_0000_0000_0010
+ {
+ EChannelMapping ChannelMapping;
+ COLORREF Color;
+ EPcxConnectionType ConnectionType;
+ EPcxGeoLocation GeoLocation;
+ EPcxGenLocation GenLocation;
+ EPxcPortConnection PortConnection;
+ BOOL IsConnected;
+ } KSJACK_DESCRIPTION;
+
+typedef struct __MIDL___MIDL_itf_devicetopology_0000_0000_0010 *PKSJACK_DESCRIPTION;
+
+typedef KSIDENTIFIER KSPROPERTY;
+
+typedef KSIDENTIFIER *PKSPROPERTY;
+
+typedef KSIDENTIFIER KSMETHOD;
+
+typedef KSIDENTIFIER *PKSMETHOD;
+
+typedef KSIDENTIFIER KSEVENT;
+
+typedef KSIDENTIFIER *PKSEVENT;
+
+#endif
+
+
+
+
+
+
+
+
+typedef /* [public][public] */
+enum __MIDL___MIDL_itf_devicetopology_0000_0000_0011
+ { In = 0,
+ Out = ( In + 1 )
+ } DataFlow;
+
+typedef /* [public][public] */
+enum __MIDL___MIDL_itf_devicetopology_0000_0000_0012
+ { Connector = 0,
+ Subunit = ( Connector + 1 )
+ } PartType;
+
+#define PARTTYPE_FLAG_CONNECTOR 0x00010000
+#define PARTTYPE_FLAG_SUBUNIT 0x00020000
+#define PARTTYPE_MASK 0x00030000
+#define PARTID_MASK 0x0000ffff
+typedef /* [public][public] */
+enum __MIDL___MIDL_itf_devicetopology_0000_0000_0013
+ { Unknown_Connector = 0,
+ Physical_Internal = ( Unknown_Connector + 1 ) ,
+ Physical_External = ( Physical_Internal + 1 ) ,
+ Software_IO = ( Physical_External + 1 ) ,
+ Software_Fixed = ( Software_IO + 1 ) ,
+ Network = ( Software_Fixed + 1 )
+ } ConnectorType;
+
+
+
+extern RPC_IF_HANDLE __MIDL_itf_devicetopology_0000_0000_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_devicetopology_0000_0000_v0_0_s_ifspec;
+
+#ifndef __IKsControl_INTERFACE_DEFINED__
+#define __IKsControl_INTERFACE_DEFINED__
+
+/* interface IKsControl */
+/* [unique][helpstring][nonextensible][uuid][local][object] */
+
+
+EXTERN_C const IID IID_IKsControl;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("28F54685-06FD-11D2-B27A-00A0C9223196")
+ IKsControl : public IUnknown
+ {
+ public:
+ virtual HRESULT STDMETHODCALLTYPE KsProperty(
+ /* [in] */ PKSPROPERTY Property,
+ /* [in] */ ULONG PropertyLength,
+ /* [out][in] */ void *PropertyData,
+ /* [in] */ ULONG DataLength,
+ /* [out] */ ULONG *BytesReturned) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE KsMethod(
+ /* [in] */ PKSMETHOD Method,
+ /* [in] */ ULONG MethodLength,
+ /* [out][in] */ void *MethodData,
+ /* [in] */ ULONG DataLength,
+ /* [out] */ ULONG *BytesReturned) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE KsEvent(
+ /* [in] */ PKSEVENT Event,
+ /* [in] */ ULONG EventLength,
+ /* [out][in] */ void *EventData,
+ /* [in] */ ULONG DataLength,
+ /* [out] */ ULONG *BytesReturned) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct IKsControlVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IKsControl * This,
+ /* [in] */ REFIID riid,
+ /* [iid_is][out] */
+ __RPC__deref_out void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IKsControl * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IKsControl * This);
+
+ HRESULT ( STDMETHODCALLTYPE *KsProperty )(
+ IKsControl * This,
+ /* [in] */ PKSPROPERTY Property,
+ /* [in] */ ULONG PropertyLength,
+ /* [out][in] */ void *PropertyData,
+ /* [in] */ ULONG DataLength,
+ /* [out] */ ULONG *BytesReturned);
+
+ HRESULT ( STDMETHODCALLTYPE *KsMethod )(
+ IKsControl * This,
+ /* [in] */ PKSMETHOD Method,
+ /* [in] */ ULONG MethodLength,
+ /* [out][in] */ void *MethodData,
+ /* [in] */ ULONG DataLength,
+ /* [out] */ ULONG *BytesReturned);
+
+ HRESULT ( STDMETHODCALLTYPE *KsEvent )(
+ IKsControl * This,
+ /* [in] */ PKSEVENT Event,
+ /* [in] */ ULONG EventLength,
+ /* [out][in] */ void *EventData,
+ /* [in] */ ULONG DataLength,
+ /* [out] */ ULONG *BytesReturned);
+
+ END_INTERFACE
+ } IKsControlVtbl;
+
+ interface IKsControl
+ {
+ CONST_VTBL struct IKsControlVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IKsControl_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IKsControl_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IKsControl_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IKsControl_KsProperty(This,Property,PropertyLength,PropertyData,DataLength,BytesReturned) \
+ ( (This)->lpVtbl -> KsProperty(This,Property,PropertyLength,PropertyData,DataLength,BytesReturned) )
+
+#define IKsControl_KsMethod(This,Method,MethodLength,MethodData,DataLength,BytesReturned) \
+ ( (This)->lpVtbl -> KsMethod(This,Method,MethodLength,MethodData,DataLength,BytesReturned) )
+
+#define IKsControl_KsEvent(This,Event,EventLength,EventData,DataLength,BytesReturned) \
+ ( (This)->lpVtbl -> KsEvent(This,Event,EventLength,EventData,DataLength,BytesReturned) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IKsControl_INTERFACE_DEFINED__ */
+
+
+#ifndef __IPerChannelDbLevel_INTERFACE_DEFINED__
+#define __IPerChannelDbLevel_INTERFACE_DEFINED__
+
+/* interface IPerChannelDbLevel */
+/* [unique][helpstring][nonextensible][uuid][local][object] */
+
+
+EXTERN_C const IID IID_IPerChannelDbLevel;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("C2F8E001-F205-4BC9-99BC-C13B1E048CCB")
+ IPerChannelDbLevel : public IUnknown
+ {
+ public:
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetChannelCount(
+ /* [out] */
+ __out UINT *pcChannels) = 0;
+
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetLevelRange(
+ /* [in] */
+ __in UINT nChannel,
+ /* [out] */
+ __out float *pfMinLevelDB,
+ /* [out] */
+ __out float *pfMaxLevelDB,
+ /* [out] */
+ __out float *pfStepping) = 0;
+
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetLevel(
+ /* [in] */
+ __in UINT nChannel,
+ /* [out] */
+ __out float *pfLevelDB) = 0;
+
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE SetLevel(
+ /* [in] */
+ __in UINT nChannel,
+ /* [in] */
+ __in float fLevelDB,
+ /* [unique][in] */
+ __in_opt LPCGUID pguidEventContext) = 0;
+
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE SetLevelUniform(
+ /* [in] */
+ __in float fLevelDB,
+ /* [unique][in] */
+ __in_opt LPCGUID pguidEventContext) = 0;
+
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE SetLevelAllChannels(
+ /* [size_is][in] */
+ __in_ecount(cChannels) float aLevelsDB[ ],
+ /* [in] */
+ __in ULONG cChannels,
+ /* [unique][in] */
+ __in_opt LPCGUID pguidEventContext) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct IPerChannelDbLevelVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IPerChannelDbLevel * This,
+ /* [in] */ REFIID riid,
+ /* [iid_is][out] */
+ __RPC__deref_out void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IPerChannelDbLevel * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IPerChannelDbLevel * This);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetChannelCount )(
+ IPerChannelDbLevel * This,
+ /* [out] */
+ __out UINT *pcChannels);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetLevelRange )(
+ IPerChannelDbLevel * This,
+ /* [in] */
+ __in UINT nChannel,
+ /* [out] */
+ __out float *pfMinLevelDB,
+ /* [out] */
+ __out float *pfMaxLevelDB,
+ /* [out] */
+ __out float *pfStepping);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetLevel )(
+ IPerChannelDbLevel * This,
+ /* [in] */
+ __in UINT nChannel,
+ /* [out] */
+ __out float *pfLevelDB);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetLevel )(
+ IPerChannelDbLevel * This,
+ /* [in] */
+ __in UINT nChannel,
+ /* [in] */
+ __in float fLevelDB,
+ /* [unique][in] */
+ __in_opt LPCGUID pguidEventContext);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetLevelUniform )(
+ IPerChannelDbLevel * This,
+ /* [in] */
+ __in float fLevelDB,
+ /* [unique][in] */
+ __in_opt LPCGUID pguidEventContext);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetLevelAllChannels )(
+ IPerChannelDbLevel * This,
+ /* [size_is][in] */
+ __in_ecount(cChannels) float aLevelsDB[ ],
+ /* [in] */
+ __in ULONG cChannels,
+ /* [unique][in] */
+ __in_opt LPCGUID pguidEventContext);
+
+ END_INTERFACE
+ } IPerChannelDbLevelVtbl;
+
+ interface IPerChannelDbLevel
+ {
+ CONST_VTBL struct IPerChannelDbLevelVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IPerChannelDbLevel_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IPerChannelDbLevel_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IPerChannelDbLevel_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IPerChannelDbLevel_GetChannelCount(This,pcChannels) \
+ ( (This)->lpVtbl -> GetChannelCount(This,pcChannels) )
+
+#define IPerChannelDbLevel_GetLevelRange(This,nChannel,pfMinLevelDB,pfMaxLevelDB,pfStepping) \
+ ( (This)->lpVtbl -> GetLevelRange(This,nChannel,pfMinLevelDB,pfMaxLevelDB,pfStepping) )
+
+#define IPerChannelDbLevel_GetLevel(This,nChannel,pfLevelDB) \
+ ( (This)->lpVtbl -> GetLevel(This,nChannel,pfLevelDB) )
+
+#define IPerChannelDbLevel_SetLevel(This,nChannel,fLevelDB,pguidEventContext) \
+ ( (This)->lpVtbl -> SetLevel(This,nChannel,fLevelDB,pguidEventContext) )
+
+#define IPerChannelDbLevel_SetLevelUniform(This,fLevelDB,pguidEventContext) \
+ ( (This)->lpVtbl -> SetLevelUniform(This,fLevelDB,pguidEventContext) )
+
+#define IPerChannelDbLevel_SetLevelAllChannels(This,aLevelsDB,cChannels,pguidEventContext) \
+ ( (This)->lpVtbl -> SetLevelAllChannels(This,aLevelsDB,cChannels,pguidEventContext) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IPerChannelDbLevel_INTERFACE_DEFINED__ */
+
+
+#ifndef __IAudioVolumeLevel_INTERFACE_DEFINED__
+#define __IAudioVolumeLevel_INTERFACE_DEFINED__
+
+/* interface IAudioVolumeLevel */
+/* [unique][helpstring][nonextensible][uuid][local][object] */
+
+
+EXTERN_C const IID IID_IAudioVolumeLevel;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("7FB7B48F-531D-44A2-BCB3-5AD5A134B3DC")
+ IAudioVolumeLevel : public IPerChannelDbLevel
+ {
+ public:
+ };
+
+#else /* C style interface */
+
+ typedef struct IAudioVolumeLevelVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IAudioVolumeLevel * This,
+ /* [in] */ REFIID riid,
+ /* [iid_is][out] */
+ __RPC__deref_out void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IAudioVolumeLevel * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IAudioVolumeLevel * This);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetChannelCount )(
+ IAudioVolumeLevel * This,
+ /* [out] */
+ __out UINT *pcChannels);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetLevelRange )(
+ IAudioVolumeLevel * This,
+ /* [in] */
+ __in UINT nChannel,
+ /* [out] */
+ __out float *pfMinLevelDB,
+ /* [out] */
+ __out float *pfMaxLevelDB,
+ /* [out] */
+ __out float *pfStepping);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetLevel )(
+ IAudioVolumeLevel * This,
+ /* [in] */
+ __in UINT nChannel,
+ /* [out] */
+ __out float *pfLevelDB);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetLevel )(
+ IAudioVolumeLevel * This,
+ /* [in] */
+ __in UINT nChannel,
+ /* [in] */
+ __in float fLevelDB,
+ /* [unique][in] */
+ __in_opt LPCGUID pguidEventContext);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetLevelUniform )(
+ IAudioVolumeLevel * This,
+ /* [in] */
+ __in float fLevelDB,
+ /* [unique][in] */
+ __in_opt LPCGUID pguidEventContext);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetLevelAllChannels )(
+ IAudioVolumeLevel * This,
+ /* [size_is][in] */
+ __in_ecount(cChannels) float aLevelsDB[ ],
+ /* [in] */
+ __in ULONG cChannels,
+ /* [unique][in] */
+ __in_opt LPCGUID pguidEventContext);
+
+ END_INTERFACE
+ } IAudioVolumeLevelVtbl;
+
+ interface IAudioVolumeLevel
+ {
+ CONST_VTBL struct IAudioVolumeLevelVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IAudioVolumeLevel_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IAudioVolumeLevel_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IAudioVolumeLevel_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IAudioVolumeLevel_GetChannelCount(This,pcChannels) \
+ ( (This)->lpVtbl -> GetChannelCount(This,pcChannels) )
+
+#define IAudioVolumeLevel_GetLevelRange(This,nChannel,pfMinLevelDB,pfMaxLevelDB,pfStepping) \
+ ( (This)->lpVtbl -> GetLevelRange(This,nChannel,pfMinLevelDB,pfMaxLevelDB,pfStepping) )
+
+#define IAudioVolumeLevel_GetLevel(This,nChannel,pfLevelDB) \
+ ( (This)->lpVtbl -> GetLevel(This,nChannel,pfLevelDB) )
+
+#define IAudioVolumeLevel_SetLevel(This,nChannel,fLevelDB,pguidEventContext) \
+ ( (This)->lpVtbl -> SetLevel(This,nChannel,fLevelDB,pguidEventContext) )
+
+#define IAudioVolumeLevel_SetLevelUniform(This,fLevelDB,pguidEventContext) \
+ ( (This)->lpVtbl -> SetLevelUniform(This,fLevelDB,pguidEventContext) )
+
+#define IAudioVolumeLevel_SetLevelAllChannels(This,aLevelsDB,cChannels,pguidEventContext) \
+ ( (This)->lpVtbl -> SetLevelAllChannels(This,aLevelsDB,cChannels,pguidEventContext) )
+
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IAudioVolumeLevel_INTERFACE_DEFINED__ */
+
+
+#ifndef __IAudioChannelConfig_INTERFACE_DEFINED__
+#define __IAudioChannelConfig_INTERFACE_DEFINED__
+
+/* interface IAudioChannelConfig */
+/* [unique][helpstring][nonextensible][uuid][local][object] */
+
+
+EXTERN_C const IID IID_IAudioChannelConfig;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("BB11C46F-EC28-493C-B88A-5DB88062CE98")
+ IAudioChannelConfig : public IUnknown
+ {
+ public:
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE SetChannelConfig(
+ /* [in] */ DWORD dwConfig,
+ /* [unique][in] */
+ __in_opt LPCGUID pguidEventContext) = 0;
+
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetChannelConfig(
+ /* [retval][out] */ DWORD *pdwConfig) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct IAudioChannelConfigVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IAudioChannelConfig * This,
+ /* [in] */ REFIID riid,
+ /* [iid_is][out] */
+ __RPC__deref_out void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IAudioChannelConfig * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IAudioChannelConfig * This);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetChannelConfig )(
+ IAudioChannelConfig * This,
+ /* [in] */ DWORD dwConfig,
+ /* [unique][in] */
+ __in_opt LPCGUID pguidEventContext);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetChannelConfig )(
+ IAudioChannelConfig * This,
+ /* [retval][out] */ DWORD *pdwConfig);
+
+ END_INTERFACE
+ } IAudioChannelConfigVtbl;
+
+ interface IAudioChannelConfig
+ {
+ CONST_VTBL struct IAudioChannelConfigVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IAudioChannelConfig_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IAudioChannelConfig_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IAudioChannelConfig_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IAudioChannelConfig_SetChannelConfig(This,dwConfig,pguidEventContext) \
+ ( (This)->lpVtbl -> SetChannelConfig(This,dwConfig,pguidEventContext) )
+
+#define IAudioChannelConfig_GetChannelConfig(This,pdwConfig) \
+ ( (This)->lpVtbl -> GetChannelConfig(This,pdwConfig) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IAudioChannelConfig_INTERFACE_DEFINED__ */
+
+
+#ifndef __IAudioLoudness_INTERFACE_DEFINED__
+#define __IAudioLoudness_INTERFACE_DEFINED__
+
+/* interface IAudioLoudness */
+/* [unique][helpstring][nonextensible][uuid][local][object] */
+
+
+EXTERN_C const IID IID_IAudioLoudness;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("7D8B1437-DD53-4350-9C1B-1EE2890BD938")
+ IAudioLoudness : public IUnknown
+ {
+ public:
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetEnabled(
+ /* [out] */
+ __out BOOL *pbEnabled) = 0;
+
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE SetEnabled(
+ /* [in] */
+ __in BOOL bEnable,
+ /* [unique][in] */
+ __in_opt LPCGUID pguidEventContext) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct IAudioLoudnessVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IAudioLoudness * This,
+ /* [in] */ REFIID riid,
+ /* [iid_is][out] */
+ __RPC__deref_out void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IAudioLoudness * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IAudioLoudness * This);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetEnabled )(
+ IAudioLoudness * This,
+ /* [out] */
+ __out BOOL *pbEnabled);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetEnabled )(
+ IAudioLoudness * This,
+ /* [in] */
+ __in BOOL bEnable,
+ /* [unique][in] */
+ __in_opt LPCGUID pguidEventContext);
+
+ END_INTERFACE
+ } IAudioLoudnessVtbl;
+
+ interface IAudioLoudness
+ {
+ CONST_VTBL struct IAudioLoudnessVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IAudioLoudness_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IAudioLoudness_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IAudioLoudness_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IAudioLoudness_GetEnabled(This,pbEnabled) \
+ ( (This)->lpVtbl -> GetEnabled(This,pbEnabled) )
+
+#define IAudioLoudness_SetEnabled(This,bEnable,pguidEventContext) \
+ ( (This)->lpVtbl -> SetEnabled(This,bEnable,pguidEventContext) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IAudioLoudness_INTERFACE_DEFINED__ */
+
+
+#ifndef __IAudioInputSelector_INTERFACE_DEFINED__
+#define __IAudioInputSelector_INTERFACE_DEFINED__
+
+/* interface IAudioInputSelector */
+/* [unique][helpstring][nonextensible][uuid][local][object] */
+
+
+EXTERN_C const IID IID_IAudioInputSelector;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("4F03DC02-5E6E-4653-8F72-A030C123D598")
+ IAudioInputSelector : public IUnknown
+ {
+ public:
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetSelection(
+ /* [out] */
+ __out UINT *pnIdSelected) = 0;
+
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE SetSelection(
+ /* [in] */
+ __in UINT nIdSelect,
+ /* [unique][in] */
+ __in_opt LPCGUID pguidEventContext) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct IAudioInputSelectorVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IAudioInputSelector * This,
+ /* [in] */ REFIID riid,
+ /* [iid_is][out] */
+ __RPC__deref_out void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IAudioInputSelector * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IAudioInputSelector * This);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetSelection )(
+ IAudioInputSelector * This,
+ /* [out] */
+ __out UINT *pnIdSelected);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetSelection )(
+ IAudioInputSelector * This,
+ /* [in] */
+ __in UINT nIdSelect,
+ /* [unique][in] */
+ __in_opt LPCGUID pguidEventContext);
+
+ END_INTERFACE
+ } IAudioInputSelectorVtbl;
+
+ interface IAudioInputSelector
+ {
+ CONST_VTBL struct IAudioInputSelectorVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IAudioInputSelector_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IAudioInputSelector_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IAudioInputSelector_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IAudioInputSelector_GetSelection(This,pnIdSelected) \
+ ( (This)->lpVtbl -> GetSelection(This,pnIdSelected) )
+
+#define IAudioInputSelector_SetSelection(This,nIdSelect,pguidEventContext) \
+ ( (This)->lpVtbl -> SetSelection(This,nIdSelect,pguidEventContext) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IAudioInputSelector_INTERFACE_DEFINED__ */
+
+
+#ifndef __IAudioOutputSelector_INTERFACE_DEFINED__
+#define __IAudioOutputSelector_INTERFACE_DEFINED__
+
+/* interface IAudioOutputSelector */
+/* [unique][helpstring][nonextensible][uuid][local][object] */
+
+
+EXTERN_C const IID IID_IAudioOutputSelector;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("BB515F69-94A7-429e-8B9C-271B3F11A3AB")
+ IAudioOutputSelector : public IUnknown
+ {
+ public:
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetSelection(
+ /* [out] */
+ __out UINT *pnIdSelected) = 0;
+
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE SetSelection(
+ /* [in] */
+ __in UINT nIdSelect,
+ /* [unique][in] */
+ __in_opt LPCGUID pguidEventContext) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct IAudioOutputSelectorVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IAudioOutputSelector * This,
+ /* [in] */ REFIID riid,
+ /* [iid_is][out] */
+ __RPC__deref_out void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IAudioOutputSelector * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IAudioOutputSelector * This);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetSelection )(
+ IAudioOutputSelector * This,
+ /* [out] */
+ __out UINT *pnIdSelected);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetSelection )(
+ IAudioOutputSelector * This,
+ /* [in] */
+ __in UINT nIdSelect,
+ /* [unique][in] */
+ __in_opt LPCGUID pguidEventContext);
+
+ END_INTERFACE
+ } IAudioOutputSelectorVtbl;
+
+ interface IAudioOutputSelector
+ {
+ CONST_VTBL struct IAudioOutputSelectorVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IAudioOutputSelector_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IAudioOutputSelector_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IAudioOutputSelector_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IAudioOutputSelector_GetSelection(This,pnIdSelected) \
+ ( (This)->lpVtbl -> GetSelection(This,pnIdSelected) )
+
+#define IAudioOutputSelector_SetSelection(This,nIdSelect,pguidEventContext) \
+ ( (This)->lpVtbl -> SetSelection(This,nIdSelect,pguidEventContext) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IAudioOutputSelector_INTERFACE_DEFINED__ */
+
+
+#ifndef __IAudioMute_INTERFACE_DEFINED__
+#define __IAudioMute_INTERFACE_DEFINED__
+
+/* interface IAudioMute */
+/* [unique][helpstring][nonextensible][uuid][local][object] */
+
+
+EXTERN_C const IID IID_IAudioMute;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("DF45AEEA-B74A-4B6B-AFAD-2366B6AA012E")
+ IAudioMute : public IUnknown
+ {
+ public:
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE SetMute(
+ /* [in] */
+ __in BOOL bMuted,
+ /* [unique][in] */
+ __in_opt LPCGUID pguidEventContext) = 0;
+
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetMute(
+ /* [out] */
+ __out BOOL *pbMuted) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct IAudioMuteVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IAudioMute * This,
+ /* [in] */ REFIID riid,
+ /* [iid_is][out] */
+ __RPC__deref_out void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IAudioMute * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IAudioMute * This);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetMute )(
+ IAudioMute * This,
+ /* [in] */
+ __in BOOL bMuted,
+ /* [unique][in] */
+ __in_opt LPCGUID pguidEventContext);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetMute )(
+ IAudioMute * This,
+ /* [out] */
+ __out BOOL *pbMuted);
+
+ END_INTERFACE
+ } IAudioMuteVtbl;
+
+ interface IAudioMute
+ {
+ CONST_VTBL struct IAudioMuteVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IAudioMute_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IAudioMute_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IAudioMute_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IAudioMute_SetMute(This,bMuted,pguidEventContext) \
+ ( (This)->lpVtbl -> SetMute(This,bMuted,pguidEventContext) )
+
+#define IAudioMute_GetMute(This,pbMuted) \
+ ( (This)->lpVtbl -> GetMute(This,pbMuted) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IAudioMute_INTERFACE_DEFINED__ */
+
+
+#ifndef __IAudioBass_INTERFACE_DEFINED__
+#define __IAudioBass_INTERFACE_DEFINED__
+
+/* interface IAudioBass */
+/* [unique][helpstring][nonextensible][uuid][local][object] */
+
+
+EXTERN_C const IID IID_IAudioBass;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("A2B1A1D9-4DB3-425D-A2B2-BD335CB3E2E5")
+ IAudioBass : public IPerChannelDbLevel
+ {
+ public:
+ };
+
+#else /* C style interface */
+
+ typedef struct IAudioBassVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IAudioBass * This,
+ /* [in] */ REFIID riid,
+ /* [iid_is][out] */
+ __RPC__deref_out void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IAudioBass * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IAudioBass * This);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetChannelCount )(
+ IAudioBass * This,
+ /* [out] */
+ __out UINT *pcChannels);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetLevelRange )(
+ IAudioBass * This,
+ /* [in] */
+ __in UINT nChannel,
+ /* [out] */
+ __out float *pfMinLevelDB,
+ /* [out] */
+ __out float *pfMaxLevelDB,
+ /* [out] */
+ __out float *pfStepping);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetLevel )(
+ IAudioBass * This,
+ /* [in] */
+ __in UINT nChannel,
+ /* [out] */
+ __out float *pfLevelDB);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetLevel )(
+ IAudioBass * This,
+ /* [in] */
+ __in UINT nChannel,
+ /* [in] */
+ __in float fLevelDB,
+ /* [unique][in] */
+ __in_opt LPCGUID pguidEventContext);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetLevelUniform )(
+ IAudioBass * This,
+ /* [in] */
+ __in float fLevelDB,
+ /* [unique][in] */
+ __in_opt LPCGUID pguidEventContext);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetLevelAllChannels )(
+ IAudioBass * This,
+ /* [size_is][in] */
+ __in_ecount(cChannels) float aLevelsDB[ ],
+ /* [in] */
+ __in ULONG cChannels,
+ /* [unique][in] */
+ __in_opt LPCGUID pguidEventContext);
+
+ END_INTERFACE
+ } IAudioBassVtbl;
+
+ interface IAudioBass
+ {
+ CONST_VTBL struct IAudioBassVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IAudioBass_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IAudioBass_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IAudioBass_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IAudioBass_GetChannelCount(This,pcChannels) \
+ ( (This)->lpVtbl -> GetChannelCount(This,pcChannels) )
+
+#define IAudioBass_GetLevelRange(This,nChannel,pfMinLevelDB,pfMaxLevelDB,pfStepping) \
+ ( (This)->lpVtbl -> GetLevelRange(This,nChannel,pfMinLevelDB,pfMaxLevelDB,pfStepping) )
+
+#define IAudioBass_GetLevel(This,nChannel,pfLevelDB) \
+ ( (This)->lpVtbl -> GetLevel(This,nChannel,pfLevelDB) )
+
+#define IAudioBass_SetLevel(This,nChannel,fLevelDB,pguidEventContext) \
+ ( (This)->lpVtbl -> SetLevel(This,nChannel,fLevelDB,pguidEventContext) )
+
+#define IAudioBass_SetLevelUniform(This,fLevelDB,pguidEventContext) \
+ ( (This)->lpVtbl -> SetLevelUniform(This,fLevelDB,pguidEventContext) )
+
+#define IAudioBass_SetLevelAllChannels(This,aLevelsDB,cChannels,pguidEventContext) \
+ ( (This)->lpVtbl -> SetLevelAllChannels(This,aLevelsDB,cChannels,pguidEventContext) )
+
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IAudioBass_INTERFACE_DEFINED__ */
+
+
+#ifndef __IAudioMidrange_INTERFACE_DEFINED__
+#define __IAudioMidrange_INTERFACE_DEFINED__
+
+/* interface IAudioMidrange */
+/* [unique][helpstring][nonextensible][uuid][local][object] */
+
+
+EXTERN_C const IID IID_IAudioMidrange;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("5E54B6D7-B44B-40D9-9A9E-E691D9CE6EDF")
+ IAudioMidrange : public IPerChannelDbLevel
+ {
+ public:
+ };
+
+#else /* C style interface */
+
+ typedef struct IAudioMidrangeVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IAudioMidrange * This,
+ /* [in] */ REFIID riid,
+ /* [iid_is][out] */
+ __RPC__deref_out void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IAudioMidrange * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IAudioMidrange * This);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetChannelCount )(
+ IAudioMidrange * This,
+ /* [out] */
+ __out UINT *pcChannels);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetLevelRange )(
+ IAudioMidrange * This,
+ /* [in] */
+ __in UINT nChannel,
+ /* [out] */
+ __out float *pfMinLevelDB,
+ /* [out] */
+ __out float *pfMaxLevelDB,
+ /* [out] */
+ __out float *pfStepping);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetLevel )(
+ IAudioMidrange * This,
+ /* [in] */
+ __in UINT nChannel,
+ /* [out] */
+ __out float *pfLevelDB);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetLevel )(
+ IAudioMidrange * This,
+ /* [in] */
+ __in UINT nChannel,
+ /* [in] */
+ __in float fLevelDB,
+ /* [unique][in] */
+ __in_opt LPCGUID pguidEventContext);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetLevelUniform )(
+ IAudioMidrange * This,
+ /* [in] */
+ __in float fLevelDB,
+ /* [unique][in] */
+ __in_opt LPCGUID pguidEventContext);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetLevelAllChannels )(
+ IAudioMidrange * This,
+ /* [size_is][in] */
+ __in_ecount(cChannels) float aLevelsDB[ ],
+ /* [in] */
+ __in ULONG cChannels,
+ /* [unique][in] */
+ __in_opt LPCGUID pguidEventContext);
+
+ END_INTERFACE
+ } IAudioMidrangeVtbl;
+
+ interface IAudioMidrange
+ {
+ CONST_VTBL struct IAudioMidrangeVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IAudioMidrange_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IAudioMidrange_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IAudioMidrange_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IAudioMidrange_GetChannelCount(This,pcChannels) \
+ ( (This)->lpVtbl -> GetChannelCount(This,pcChannels) )
+
+#define IAudioMidrange_GetLevelRange(This,nChannel,pfMinLevelDB,pfMaxLevelDB,pfStepping) \
+ ( (This)->lpVtbl -> GetLevelRange(This,nChannel,pfMinLevelDB,pfMaxLevelDB,pfStepping) )
+
+#define IAudioMidrange_GetLevel(This,nChannel,pfLevelDB) \
+ ( (This)->lpVtbl -> GetLevel(This,nChannel,pfLevelDB) )
+
+#define IAudioMidrange_SetLevel(This,nChannel,fLevelDB,pguidEventContext) \
+ ( (This)->lpVtbl -> SetLevel(This,nChannel,fLevelDB,pguidEventContext) )
+
+#define IAudioMidrange_SetLevelUniform(This,fLevelDB,pguidEventContext) \
+ ( (This)->lpVtbl -> SetLevelUniform(This,fLevelDB,pguidEventContext) )
+
+#define IAudioMidrange_SetLevelAllChannels(This,aLevelsDB,cChannels,pguidEventContext) \
+ ( (This)->lpVtbl -> SetLevelAllChannels(This,aLevelsDB,cChannels,pguidEventContext) )
+
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IAudioMidrange_INTERFACE_DEFINED__ */
+
+
+#ifndef __IAudioTreble_INTERFACE_DEFINED__
+#define __IAudioTreble_INTERFACE_DEFINED__
+
+/* interface IAudioTreble */
+/* [unique][helpstring][nonextensible][uuid][local][object] */
+
+
+EXTERN_C const IID IID_IAudioTreble;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("0A717812-694E-4907-B74B-BAFA5CFDCA7B")
+ IAudioTreble : public IPerChannelDbLevel
+ {
+ public:
+ };
+
+#else /* C style interface */
+
+ typedef struct IAudioTrebleVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IAudioTreble * This,
+ /* [in] */ REFIID riid,
+ /* [iid_is][out] */
+ __RPC__deref_out void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IAudioTreble * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IAudioTreble * This);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetChannelCount )(
+ IAudioTreble * This,
+ /* [out] */
+ __out UINT *pcChannels);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetLevelRange )(
+ IAudioTreble * This,
+ /* [in] */
+ __in UINT nChannel,
+ /* [out] */
+ __out float *pfMinLevelDB,
+ /* [out] */
+ __out float *pfMaxLevelDB,
+ /* [out] */
+ __out float *pfStepping);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetLevel )(
+ IAudioTreble * This,
+ /* [in] */
+ __in UINT nChannel,
+ /* [out] */
+ __out float *pfLevelDB);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetLevel )(
+ IAudioTreble * This,
+ /* [in] */
+ __in UINT nChannel,
+ /* [in] */
+ __in float fLevelDB,
+ /* [unique][in] */
+ __in_opt LPCGUID pguidEventContext);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetLevelUniform )(
+ IAudioTreble * This,
+ /* [in] */
+ __in float fLevelDB,
+ /* [unique][in] */
+ __in_opt LPCGUID pguidEventContext);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetLevelAllChannels )(
+ IAudioTreble * This,
+ /* [size_is][in] */
+ __in_ecount(cChannels) float aLevelsDB[ ],
+ /* [in] */
+ __in ULONG cChannels,
+ /* [unique][in] */
+ __in_opt LPCGUID pguidEventContext);
+
+ END_INTERFACE
+ } IAudioTrebleVtbl;
+
+ interface IAudioTreble
+ {
+ CONST_VTBL struct IAudioTrebleVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IAudioTreble_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IAudioTreble_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IAudioTreble_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IAudioTreble_GetChannelCount(This,pcChannels) \
+ ( (This)->lpVtbl -> GetChannelCount(This,pcChannels) )
+
+#define IAudioTreble_GetLevelRange(This,nChannel,pfMinLevelDB,pfMaxLevelDB,pfStepping) \
+ ( (This)->lpVtbl -> GetLevelRange(This,nChannel,pfMinLevelDB,pfMaxLevelDB,pfStepping) )
+
+#define IAudioTreble_GetLevel(This,nChannel,pfLevelDB) \
+ ( (This)->lpVtbl -> GetLevel(This,nChannel,pfLevelDB) )
+
+#define IAudioTreble_SetLevel(This,nChannel,fLevelDB,pguidEventContext) \
+ ( (This)->lpVtbl -> SetLevel(This,nChannel,fLevelDB,pguidEventContext) )
+
+#define IAudioTreble_SetLevelUniform(This,fLevelDB,pguidEventContext) \
+ ( (This)->lpVtbl -> SetLevelUniform(This,fLevelDB,pguidEventContext) )
+
+#define IAudioTreble_SetLevelAllChannels(This,aLevelsDB,cChannels,pguidEventContext) \
+ ( (This)->lpVtbl -> SetLevelAllChannels(This,aLevelsDB,cChannels,pguidEventContext) )
+
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IAudioTreble_INTERFACE_DEFINED__ */
+
+
+#ifndef __IAudioAutoGainControl_INTERFACE_DEFINED__
+#define __IAudioAutoGainControl_INTERFACE_DEFINED__
+
+/* interface IAudioAutoGainControl */
+/* [unique][helpstring][nonextensible][uuid][local][object] */
+
+
+EXTERN_C const IID IID_IAudioAutoGainControl;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("85401FD4-6DE4-4b9d-9869-2D6753A82F3C")
+ IAudioAutoGainControl : public IUnknown
+ {
+ public:
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetEnabled(
+ /* [out] */
+ __out BOOL *pbEnabled) = 0;
+
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE SetEnabled(
+ /* [in] */
+ __in BOOL bEnable,
+ /* [unique][in] */
+ __in_opt LPCGUID pguidEventContext) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct IAudioAutoGainControlVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IAudioAutoGainControl * This,
+ /* [in] */ REFIID riid,
+ /* [iid_is][out] */
+ __RPC__deref_out void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IAudioAutoGainControl * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IAudioAutoGainControl * This);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetEnabled )(
+ IAudioAutoGainControl * This,
+ /* [out] */
+ __out BOOL *pbEnabled);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetEnabled )(
+ IAudioAutoGainControl * This,
+ /* [in] */
+ __in BOOL bEnable,
+ /* [unique][in] */
+ __in_opt LPCGUID pguidEventContext);
+
+ END_INTERFACE
+ } IAudioAutoGainControlVtbl;
+
+ interface IAudioAutoGainControl
+ {
+ CONST_VTBL struct IAudioAutoGainControlVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IAudioAutoGainControl_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IAudioAutoGainControl_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IAudioAutoGainControl_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IAudioAutoGainControl_GetEnabled(This,pbEnabled) \
+ ( (This)->lpVtbl -> GetEnabled(This,pbEnabled) )
+
+#define IAudioAutoGainControl_SetEnabled(This,bEnable,pguidEventContext) \
+ ( (This)->lpVtbl -> SetEnabled(This,bEnable,pguidEventContext) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IAudioAutoGainControl_INTERFACE_DEFINED__ */
+
+
+#ifndef __IAudioPeakMeter_INTERFACE_DEFINED__
+#define __IAudioPeakMeter_INTERFACE_DEFINED__
+
+/* interface IAudioPeakMeter */
+/* [unique][helpstring][nonextensible][uuid][local][object] */
+
+
+EXTERN_C const IID IID_IAudioPeakMeter;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("DD79923C-0599-45e0-B8B6-C8DF7DB6E796")
+ IAudioPeakMeter : public IUnknown
+ {
+ public:
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetChannelCount(
+ /* [out] */
+ __out UINT *pcChannels) = 0;
+
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetLevel(
+ /* [in] */
+ __in UINT nChannel,
+ /* [out] */
+ __out float *pfLevel) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct IAudioPeakMeterVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IAudioPeakMeter * This,
+ /* [in] */ REFIID riid,
+ /* [iid_is][out] */
+ __RPC__deref_out void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IAudioPeakMeter * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IAudioPeakMeter * This);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetChannelCount )(
+ IAudioPeakMeter * This,
+ /* [out] */
+ __out UINT *pcChannels);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetLevel )(
+ IAudioPeakMeter * This,
+ /* [in] */
+ __in UINT nChannel,
+ /* [out] */
+ __out float *pfLevel);
+
+ END_INTERFACE
+ } IAudioPeakMeterVtbl;
+
+ interface IAudioPeakMeter
+ {
+ CONST_VTBL struct IAudioPeakMeterVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IAudioPeakMeter_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IAudioPeakMeter_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IAudioPeakMeter_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IAudioPeakMeter_GetChannelCount(This,pcChannels) \
+ ( (This)->lpVtbl -> GetChannelCount(This,pcChannels) )
+
+#define IAudioPeakMeter_GetLevel(This,nChannel,pfLevel) \
+ ( (This)->lpVtbl -> GetLevel(This,nChannel,pfLevel) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IAudioPeakMeter_INTERFACE_DEFINED__ */
+
+
+#ifndef __IDeviceSpecificProperty_INTERFACE_DEFINED__
+#define __IDeviceSpecificProperty_INTERFACE_DEFINED__
+
+/* interface IDeviceSpecificProperty */
+/* [unique][helpstring][nonextensible][uuid][local][object] */
+
+
+EXTERN_C const IID IID_IDeviceSpecificProperty;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("3B22BCBF-2586-4af0-8583-205D391B807C")
+ IDeviceSpecificProperty : public IUnknown
+ {
+ public:
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetType(
+ /* [out] */
+ __deref_out VARTYPE *pVType) = 0;
+
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetValue(
+ /* [out] */
+ __out void *pvValue,
+ /* [out][in] */
+ __inout DWORD *pcbValue) = 0;
+
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE SetValue(
+ /* [in] */
+ __in void *pvValue,
+ /* [in] */ DWORD cbValue,
+ /* [unique][in] */
+ __in_opt LPCGUID pguidEventContext) = 0;
+
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE Get4BRange(
+ /* [out] */
+ __deref_out LONG *plMin,
+ /* [out] */
+ __deref_out LONG *plMax,
+ /* [out] */
+ __deref_out LONG *plStepping) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct IDeviceSpecificPropertyVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IDeviceSpecificProperty * This,
+ /* [in] */ REFIID riid,
+ /* [iid_is][out] */
+ __RPC__deref_out void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IDeviceSpecificProperty * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IDeviceSpecificProperty * This);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetType )(
+ IDeviceSpecificProperty * This,
+ /* [out] */
+ __deref_out VARTYPE *pVType);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetValue )(
+ IDeviceSpecificProperty * This,
+ /* [out] */
+ __out void *pvValue,
+ /* [out][in] */
+ __inout DWORD *pcbValue);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetValue )(
+ IDeviceSpecificProperty * This,
+ /* [in] */
+ __in void *pvValue,
+ /* [in] */ DWORD cbValue,
+ /* [unique][in] */
+ __in_opt LPCGUID pguidEventContext);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *Get4BRange )(
+ IDeviceSpecificProperty * This,
+ /* [out] */
+ __deref_out LONG *plMin,
+ /* [out] */
+ __deref_out LONG *plMax,
+ /* [out] */
+ __deref_out LONG *plStepping);
+
+ END_INTERFACE
+ } IDeviceSpecificPropertyVtbl;
+
+ interface IDeviceSpecificProperty
+ {
+ CONST_VTBL struct IDeviceSpecificPropertyVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IDeviceSpecificProperty_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IDeviceSpecificProperty_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IDeviceSpecificProperty_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IDeviceSpecificProperty_GetType(This,pVType) \
+ ( (This)->lpVtbl -> GetType(This,pVType) )
+
+#define IDeviceSpecificProperty_GetValue(This,pvValue,pcbValue) \
+ ( (This)->lpVtbl -> GetValue(This,pvValue,pcbValue) )
+
+#define IDeviceSpecificProperty_SetValue(This,pvValue,cbValue,pguidEventContext) \
+ ( (This)->lpVtbl -> SetValue(This,pvValue,cbValue,pguidEventContext) )
+
+#define IDeviceSpecificProperty_Get4BRange(This,plMin,plMax,plStepping) \
+ ( (This)->lpVtbl -> Get4BRange(This,plMin,plMax,plStepping) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IDeviceSpecificProperty_INTERFACE_DEFINED__ */
+
+
+#ifndef __IKsFormatSupport_INTERFACE_DEFINED__
+#define __IKsFormatSupport_INTERFACE_DEFINED__
+
+/* interface IKsFormatSupport */
+/* [unique][helpstring][nonextensible][uuid][local][object] */
+
+
+EXTERN_C const IID IID_IKsFormatSupport;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("3CB4A69D-BB6F-4D2B-95B7-452D2C155DB5")
+ IKsFormatSupport : public IUnknown
+ {
+ public:
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IsFormatSupported(
+ /* [size_is][in] */ PKSDATAFORMAT pKsFormat,
+ /* [in] */
+ __in DWORD cbFormat,
+ /* [out] */
+ __out BOOL *pbSupported) = 0;
+
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetDevicePreferredFormat(
+ /* [out] */ PKSDATAFORMAT *ppKsFormat) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct IKsFormatSupportVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IKsFormatSupport * This,
+ /* [in] */ REFIID riid,
+ /* [iid_is][out] */
+ __RPC__deref_out void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IKsFormatSupport * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IKsFormatSupport * This);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *IsFormatSupported )(
+ IKsFormatSupport * This,
+ /* [size_is][in] */ PKSDATAFORMAT pKsFormat,
+ /* [in] */
+ __in DWORD cbFormat,
+ /* [out] */
+ __out BOOL *pbSupported);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetDevicePreferredFormat )(
+ IKsFormatSupport * This,
+ /* [out] */ PKSDATAFORMAT *ppKsFormat);
+
+ END_INTERFACE
+ } IKsFormatSupportVtbl;
+
+ interface IKsFormatSupport
+ {
+ CONST_VTBL struct IKsFormatSupportVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IKsFormatSupport_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IKsFormatSupport_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IKsFormatSupport_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IKsFormatSupport_IsFormatSupported(This,pKsFormat,cbFormat,pbSupported) \
+ ( (This)->lpVtbl -> IsFormatSupported(This,pKsFormat,cbFormat,pbSupported) )
+
+#define IKsFormatSupport_GetDevicePreferredFormat(This,ppKsFormat) \
+ ( (This)->lpVtbl -> GetDevicePreferredFormat(This,ppKsFormat) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IKsFormatSupport_INTERFACE_DEFINED__ */
+
+
+#ifndef __IKsJackDescription_INTERFACE_DEFINED__
+#define __IKsJackDescription_INTERFACE_DEFINED__
+
+/* interface IKsJackDescription */
+/* [unique][helpstring][nonextensible][uuid][local][object] */
+
+
+EXTERN_C const IID IID_IKsJackDescription;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("4509F757-2D46-4637-8E62-CE7DB944F57B")
+ IKsJackDescription : public IUnknown
+ {
+ public:
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetJackCount(
+ /* [out] */
+ __out UINT *pcJacks) = 0;
+
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetJackDescription(
+ /* [in] */ UINT nJack,
+ /* [out] */
+ __out KSJACK_DESCRIPTION *pDescription) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct IKsJackDescriptionVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IKsJackDescription * This,
+ /* [in] */ REFIID riid,
+ /* [iid_is][out] */
+ __RPC__deref_out void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IKsJackDescription * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IKsJackDescription * This);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetJackCount )(
+ IKsJackDescription * This,
+ /* [out] */
+ __out UINT *pcJacks);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetJackDescription )(
+ IKsJackDescription * This,
+ /* [in] */ UINT nJack,
+ /* [out] */
+ __out KSJACK_DESCRIPTION *pDescription);
+
+ END_INTERFACE
+ } IKsJackDescriptionVtbl;
+
+ interface IKsJackDescription
+ {
+ CONST_VTBL struct IKsJackDescriptionVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IKsJackDescription_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IKsJackDescription_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IKsJackDescription_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IKsJackDescription_GetJackCount(This,pcJacks) \
+ ( (This)->lpVtbl -> GetJackCount(This,pcJacks) )
+
+#define IKsJackDescription_GetJackDescription(This,nJack,pDescription) \
+ ( (This)->lpVtbl -> GetJackDescription(This,nJack,pDescription) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IKsJackDescription_INTERFACE_DEFINED__ */
+
+
+#ifndef __IPartsList_INTERFACE_DEFINED__
+#define __IPartsList_INTERFACE_DEFINED__
+
+/* interface IPartsList */
+/* [object][unique][helpstring][uuid][local] */
+
+
+EXTERN_C const IID IID_IPartsList;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("6DAA848C-5EB0-45CC-AEA5-998A2CDA1FFB")
+ IPartsList : public IUnknown
+ {
+ public:
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetCount(
+ /* [out] */
+ __out UINT *pCount) = 0;
+
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetPart(
+ /* [in] */
+ __in UINT nIndex,
+ /* [out] */
+ __out IPart **ppPart) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct IPartsListVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IPartsList * This,
+ /* [in] */ REFIID riid,
+ /* [iid_is][out] */
+ __RPC__deref_out void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IPartsList * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IPartsList * This);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetCount )(
+ IPartsList * This,
+ /* [out] */
+ __out UINT *pCount);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetPart )(
+ IPartsList * This,
+ /* [in] */
+ __in UINT nIndex,
+ /* [out] */
+ __out IPart **ppPart);
+
+ END_INTERFACE
+ } IPartsListVtbl;
+
+ interface IPartsList
+ {
+ CONST_VTBL struct IPartsListVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IPartsList_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IPartsList_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IPartsList_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IPartsList_GetCount(This,pCount) \
+ ( (This)->lpVtbl -> GetCount(This,pCount) )
+
+#define IPartsList_GetPart(This,nIndex,ppPart) \
+ ( (This)->lpVtbl -> GetPart(This,nIndex,ppPart) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IPartsList_INTERFACE_DEFINED__ */
+
+
+#ifndef __IPart_INTERFACE_DEFINED__
+#define __IPart_INTERFACE_DEFINED__
+
+/* interface IPart */
+/* [object][unique][helpstring][uuid][local] */
+
+
+EXTERN_C const IID IID_IPart;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("AE2DE0E4-5BCA-4F2D-AA46-5D13F8FDB3A9")
+ IPart : public IUnknown
+ {
+ public:
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetName(
+ /* [out] */
+ __deref_out LPWSTR *ppwstrName) = 0;
+
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetLocalId(
+ /* [out] */
+ __out UINT *pnId) = 0;
+
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetGlobalId(
+ /* [out] */
+ __deref_out LPWSTR *ppwstrGlobalId) = 0;
+
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetPartType(
+ /* [out] */
+ __out PartType *pPartType) = 0;
+
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetSubType(
+ /* [out] */ GUID *pSubType) = 0;
+
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetControlInterfaceCount(
+ /* [out] */
+ __out UINT *pCount) = 0;
+
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetControlInterface(
+ /* [in] */
+ __in UINT nIndex,
+ /* [out] */
+ __out IControlInterface **ppInterfaceDesc) = 0;
+
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE EnumPartsIncoming(
+ /* [out] */
+ __out IPartsList **ppParts) = 0;
+
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE EnumPartsOutgoing(
+ /* [out] */
+ __out IPartsList **ppParts) = 0;
+
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetTopologyObject(
+ /* [out] */
+ __out IDeviceTopology **ppTopology) = 0;
+
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE Activate(
+ /* [in] */
+ __in DWORD dwClsContext,
+ /* [in] */
+ __in REFIID refiid,
+ /* [iid_is][out] */
+ __out_opt void **ppvObject) = 0;
+
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE RegisterControlChangeCallback(
+ /* [in] */
+ __in REFGUID riid,
+ /* [in] */
+ __in IControlChangeNotify *pNotify) = 0;
+
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE UnregisterControlChangeCallback(
+ /* [in] */
+ __in IControlChangeNotify *pNotify) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct IPartVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IPart * This,
+ /* [in] */ REFIID riid,
+ /* [iid_is][out] */
+ __RPC__deref_out void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IPart * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IPart * This);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetName )(
+ IPart * This,
+ /* [out] */
+ __deref_out LPWSTR *ppwstrName);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetLocalId )(
+ IPart * This,
+ /* [out] */
+ __out UINT *pnId);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetGlobalId )(
+ IPart * This,
+ /* [out] */
+ __deref_out LPWSTR *ppwstrGlobalId);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetPartType )(
+ IPart * This,
+ /* [out] */
+ __out PartType *pPartType);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetSubType )(
+ IPart * This,
+ /* [out] */ GUID *pSubType);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetControlInterfaceCount )(
+ IPart * This,
+ /* [out] */
+ __out UINT *pCount);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetControlInterface )(
+ IPart * This,
+ /* [in] */
+ __in UINT nIndex,
+ /* [out] */
+ __out IControlInterface **ppInterfaceDesc);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *EnumPartsIncoming )(
+ IPart * This,
+ /* [out] */
+ __out IPartsList **ppParts);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *EnumPartsOutgoing )(
+ IPart * This,
+ /* [out] */
+ __out IPartsList **ppParts);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetTopologyObject )(
+ IPart * This,
+ /* [out] */
+ __out IDeviceTopology **ppTopology);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *Activate )(
+ IPart * This,
+ /* [in] */
+ __in DWORD dwClsContext,
+ /* [in] */
+ __in REFIID refiid,
+ /* [iid_is][out] */
+ __out_opt void **ppvObject);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *RegisterControlChangeCallback )(
+ IPart * This,
+ /* [in] */
+ __in REFGUID riid,
+ /* [in] */
+ __in IControlChangeNotify *pNotify);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *UnregisterControlChangeCallback )(
+ IPart * This,
+ /* [in] */
+ __in IControlChangeNotify *pNotify);
+
+ END_INTERFACE
+ } IPartVtbl;
+
+ interface IPart
+ {
+ CONST_VTBL struct IPartVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IPart_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IPart_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IPart_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IPart_GetName(This,ppwstrName) \
+ ( (This)->lpVtbl -> GetName(This,ppwstrName) )
+
+#define IPart_GetLocalId(This,pnId) \
+ ( (This)->lpVtbl -> GetLocalId(This,pnId) )
+
+#define IPart_GetGlobalId(This,ppwstrGlobalId) \
+ ( (This)->lpVtbl -> GetGlobalId(This,ppwstrGlobalId) )
+
+#define IPart_GetPartType(This,pPartType) \
+ ( (This)->lpVtbl -> GetPartType(This,pPartType) )
+
+#define IPart_GetSubType(This,pSubType) \
+ ( (This)->lpVtbl -> GetSubType(This,pSubType) )
+
+#define IPart_GetControlInterfaceCount(This,pCount) \
+ ( (This)->lpVtbl -> GetControlInterfaceCount(This,pCount) )
+
+#define IPart_GetControlInterface(This,nIndex,ppInterfaceDesc) \
+ ( (This)->lpVtbl -> GetControlInterface(This,nIndex,ppInterfaceDesc) )
+
+#define IPart_EnumPartsIncoming(This,ppParts) \
+ ( (This)->lpVtbl -> EnumPartsIncoming(This,ppParts) )
+
+#define IPart_EnumPartsOutgoing(This,ppParts) \
+ ( (This)->lpVtbl -> EnumPartsOutgoing(This,ppParts) )
+
+#define IPart_GetTopologyObject(This,ppTopology) \
+ ( (This)->lpVtbl -> GetTopologyObject(This,ppTopology) )
+
+#define IPart_Activate(This,dwClsContext,refiid,ppvObject) \
+ ( (This)->lpVtbl -> Activate(This,dwClsContext,refiid,ppvObject) )
+
+#define IPart_RegisterControlChangeCallback(This,riid,pNotify) \
+ ( (This)->lpVtbl -> RegisterControlChangeCallback(This,riid,pNotify) )
+
+#define IPart_UnregisterControlChangeCallback(This,pNotify) \
+ ( (This)->lpVtbl -> UnregisterControlChangeCallback(This,pNotify) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IPart_INTERFACE_DEFINED__ */
+
+
+#ifndef __IConnector_INTERFACE_DEFINED__
+#define __IConnector_INTERFACE_DEFINED__
+
+/* interface IConnector */
+/* [object][unique][helpstring][uuid][local] */
+
+
+EXTERN_C const IID IID_IConnector;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("9c2c4058-23f5-41de-877a-df3af236a09e")
+ IConnector : public IUnknown
+ {
+ public:
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetType(
+ /* [out] */
+ __out ConnectorType *pType) = 0;
+
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetDataFlow(
+ /* [out] */
+ __out DataFlow *pFlow) = 0;
+
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE ConnectTo(
+ /* [in] */
+ __in IConnector *pConnectTo) = 0;
+
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE Disconnect( void) = 0;
+
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IsConnected(
+ /* [out] */
+ __out BOOL *pbConnected) = 0;
+
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetConnectedTo(
+ /* [out] */
+ __out IConnector **ppConTo) = 0;
+
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetConnectorIdConnectedTo(
+ /* [out] */
+ __deref_out LPWSTR *ppwstrConnectorId) = 0;
+
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetDeviceIdConnectedTo(
+ /* [out] */
+ __deref_out LPWSTR *ppwstrDeviceId) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct IConnectorVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IConnector * This,
+ /* [in] */ REFIID riid,
+ /* [iid_is][out] */
+ __RPC__deref_out void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IConnector * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IConnector * This);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetType )(
+ IConnector * This,
+ /* [out] */
+ __out ConnectorType *pType);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetDataFlow )(
+ IConnector * This,
+ /* [out] */
+ __out DataFlow *pFlow);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *ConnectTo )(
+ IConnector * This,
+ /* [in] */
+ __in IConnector *pConnectTo);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *Disconnect )(
+ IConnector * This);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *IsConnected )(
+ IConnector * This,
+ /* [out] */
+ __out BOOL *pbConnected);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetConnectedTo )(
+ IConnector * This,
+ /* [out] */
+ __out IConnector **ppConTo);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetConnectorIdConnectedTo )(
+ IConnector * This,
+ /* [out] */
+ __deref_out LPWSTR *ppwstrConnectorId);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetDeviceIdConnectedTo )(
+ IConnector * This,
+ /* [out] */
+ __deref_out LPWSTR *ppwstrDeviceId);
+
+ END_INTERFACE
+ } IConnectorVtbl;
+
+ interface IConnector
+ {
+ CONST_VTBL struct IConnectorVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IConnector_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IConnector_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IConnector_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IConnector_GetType(This,pType) \
+ ( (This)->lpVtbl -> GetType(This,pType) )
+
+#define IConnector_GetDataFlow(This,pFlow) \
+ ( (This)->lpVtbl -> GetDataFlow(This,pFlow) )
+
+#define IConnector_ConnectTo(This,pConnectTo) \
+ ( (This)->lpVtbl -> ConnectTo(This,pConnectTo) )
+
+#define IConnector_Disconnect(This) \
+ ( (This)->lpVtbl -> Disconnect(This) )
+
+#define IConnector_IsConnected(This,pbConnected) \
+ ( (This)->lpVtbl -> IsConnected(This,pbConnected) )
+
+#define IConnector_GetConnectedTo(This,ppConTo) \
+ ( (This)->lpVtbl -> GetConnectedTo(This,ppConTo) )
+
+#define IConnector_GetConnectorIdConnectedTo(This,ppwstrConnectorId) \
+ ( (This)->lpVtbl -> GetConnectorIdConnectedTo(This,ppwstrConnectorId) )
+
+#define IConnector_GetDeviceIdConnectedTo(This,ppwstrDeviceId) \
+ ( (This)->lpVtbl -> GetDeviceIdConnectedTo(This,ppwstrDeviceId) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IConnector_INTERFACE_DEFINED__ */
+
+
+#ifndef __ISubunit_INTERFACE_DEFINED__
+#define __ISubunit_INTERFACE_DEFINED__
+
+/* interface ISubunit */
+/* [object][unique][helpstring][uuid][local] */
+
+
+EXTERN_C const IID IID_ISubunit;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("82149A85-DBA6-4487-86BB-EA8F7FEFCC71")
+ ISubunit : public IUnknown
+ {
+ public:
+ };
+
+#else /* C style interface */
+
+ typedef struct ISubunitVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ ISubunit * This,
+ /* [in] */ REFIID riid,
+ /* [iid_is][out] */
+ __RPC__deref_out void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ ISubunit * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ ISubunit * This);
+
+ END_INTERFACE
+ } ISubunitVtbl;
+
+ interface ISubunit
+ {
+ CONST_VTBL struct ISubunitVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define ISubunit_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define ISubunit_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define ISubunit_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __ISubunit_INTERFACE_DEFINED__ */
+
+
+#ifndef __IControlInterface_INTERFACE_DEFINED__
+#define __IControlInterface_INTERFACE_DEFINED__
+
+/* interface IControlInterface */
+/* [object][unique][helpstring][uuid][local] */
+
+
+EXTERN_C const IID IID_IControlInterface;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("45d37c3f-5140-444a-ae24-400789f3cbf3")
+ IControlInterface : public IUnknown
+ {
+ public:
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetName(
+ /* [out] */
+ __deref_out LPWSTR *ppwstrName) = 0;
+
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetIID(
+ /* [out] */
+ __out GUID *pIID) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct IControlInterfaceVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IControlInterface * This,
+ /* [in] */ REFIID riid,
+ /* [iid_is][out] */
+ __RPC__deref_out void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IControlInterface * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IControlInterface * This);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetName )(
+ IControlInterface * This,
+ /* [out] */
+ __deref_out LPWSTR *ppwstrName);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetIID )(
+ IControlInterface * This,
+ /* [out] */
+ __out GUID *pIID);
+
+ END_INTERFACE
+ } IControlInterfaceVtbl;
+
+ interface IControlInterface
+ {
+ CONST_VTBL struct IControlInterfaceVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IControlInterface_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IControlInterface_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IControlInterface_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IControlInterface_GetName(This,ppwstrName) \
+ ( (This)->lpVtbl -> GetName(This,ppwstrName) )
+
+#define IControlInterface_GetIID(This,pIID) \
+ ( (This)->lpVtbl -> GetIID(This,pIID) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IControlInterface_INTERFACE_DEFINED__ */
+
+
+#ifndef __IControlChangeNotify_INTERFACE_DEFINED__
+#define __IControlChangeNotify_INTERFACE_DEFINED__
+
+/* interface IControlChangeNotify */
+/* [unique][helpstring][nonextensible][uuid][local][object] */
+
+
+EXTERN_C const IID IID_IControlChangeNotify;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("A09513ED-C709-4d21-BD7B-5F34C47F3947")
+ IControlChangeNotify : public IUnknown
+ {
+ public:
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE OnNotify(
+ /* [in] */
+ __in DWORD dwSenderProcessId,
+ /* [unique][in] */
+ __in_opt LPCGUID pguidEventContext) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct IControlChangeNotifyVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IControlChangeNotify * This,
+ /* [in] */ REFIID riid,
+ /* [iid_is][out] */
+ __RPC__deref_out void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IControlChangeNotify * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IControlChangeNotify * This);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *OnNotify )(
+ IControlChangeNotify * This,
+ /* [in] */
+ __in DWORD dwSenderProcessId,
+ /* [unique][in] */
+ __in_opt LPCGUID pguidEventContext);
+
+ END_INTERFACE
+ } IControlChangeNotifyVtbl;
+
+ interface IControlChangeNotify
+ {
+ CONST_VTBL struct IControlChangeNotifyVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IControlChangeNotify_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IControlChangeNotify_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IControlChangeNotify_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IControlChangeNotify_OnNotify(This,dwSenderProcessId,pguidEventContext) \
+ ( (This)->lpVtbl -> OnNotify(This,dwSenderProcessId,pguidEventContext) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IControlChangeNotify_INTERFACE_DEFINED__ */
+
+
+#ifndef __IDeviceTopology_INTERFACE_DEFINED__
+#define __IDeviceTopology_INTERFACE_DEFINED__
+
+/* interface IDeviceTopology */
+/* [unique][helpstring][nonextensible][uuid][local][object] */
+
+
+EXTERN_C const IID IID_IDeviceTopology;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("2A07407E-6497-4A18-9787-32F79BD0D98F")
+ IDeviceTopology : public IUnknown
+ {
+ public:
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetConnectorCount(
+ /* [out] */
+ __out UINT *pCount) = 0;
+
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetConnector(
+ /* [in] */
+ __in UINT nIndex,
+ /* [out] */
+ __out IConnector **ppConnector) = 0;
+
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetSubunitCount(
+ /* [out] */
+ __out UINT *pCount) = 0;
+
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetSubunit(
+ /* [in] */
+ __in UINT nIndex,
+ /* [out] */
+ __deref_out ISubunit **ppSubunit) = 0;
+
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetPartById(
+ /* [in] */
+ __in UINT nId,
+ /* [out] */
+ __deref_out IPart **ppPart) = 0;
+
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetDeviceId(
+ /* [out] */
+ __deref_out LPWSTR *ppwstrDeviceId) = 0;
+
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetSignalPath(
+ /* [in] */
+ __in IPart *pIPartFrom,
+ /* [in] */
+ __in IPart *pIPartTo,
+ /* [in] */
+ __in BOOL bRejectMixedPaths,
+ /* [out] */
+ __deref_out IPartsList **ppParts) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct IDeviceTopologyVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IDeviceTopology * This,
+ /* [in] */ REFIID riid,
+ /* [iid_is][out] */
+ __RPC__deref_out void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IDeviceTopology * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IDeviceTopology * This);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetConnectorCount )(
+ IDeviceTopology * This,
+ /* [out] */
+ __out UINT *pCount);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetConnector )(
+ IDeviceTopology * This,
+ /* [in] */
+ __in UINT nIndex,
+ /* [out] */
+ __out IConnector **ppConnector);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetSubunitCount )(
+ IDeviceTopology * This,
+ /* [out] */
+ __out UINT *pCount);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetSubunit )(
+ IDeviceTopology * This,
+ /* [in] */
+ __in UINT nIndex,
+ /* [out] */
+ __deref_out ISubunit **ppSubunit);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetPartById )(
+ IDeviceTopology * This,
+ /* [in] */
+ __in UINT nId,
+ /* [out] */
+ __deref_out IPart **ppPart);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetDeviceId )(
+ IDeviceTopology * This,
+ /* [out] */
+ __deref_out LPWSTR *ppwstrDeviceId);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetSignalPath )(
+ IDeviceTopology * This,
+ /* [in] */
+ __in IPart *pIPartFrom,
+ /* [in] */
+ __in IPart *pIPartTo,
+ /* [in] */
+ __in BOOL bRejectMixedPaths,
+ /* [out] */
+ __deref_out IPartsList **ppParts);
+
+ END_INTERFACE
+ } IDeviceTopologyVtbl;
+
+ interface IDeviceTopology
+ {
+ CONST_VTBL struct IDeviceTopologyVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IDeviceTopology_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IDeviceTopology_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IDeviceTopology_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IDeviceTopology_GetConnectorCount(This,pCount) \
+ ( (This)->lpVtbl -> GetConnectorCount(This,pCount) )
+
+#define IDeviceTopology_GetConnector(This,nIndex,ppConnector) \
+ ( (This)->lpVtbl -> GetConnector(This,nIndex,ppConnector) )
+
+#define IDeviceTopology_GetSubunitCount(This,pCount) \
+ ( (This)->lpVtbl -> GetSubunitCount(This,pCount) )
+
+#define IDeviceTopology_GetSubunit(This,nIndex,ppSubunit) \
+ ( (This)->lpVtbl -> GetSubunit(This,nIndex,ppSubunit) )
+
+#define IDeviceTopology_GetPartById(This,nId,ppPart) \
+ ( (This)->lpVtbl -> GetPartById(This,nId,ppPart) )
+
+#define IDeviceTopology_GetDeviceId(This,ppwstrDeviceId) \
+ ( (This)->lpVtbl -> GetDeviceId(This,ppwstrDeviceId) )
+
+#define IDeviceTopology_GetSignalPath(This,pIPartFrom,pIPartTo,bRejectMixedPaths,ppParts) \
+ ( (This)->lpVtbl -> GetSignalPath(This,pIPartFrom,pIPartTo,bRejectMixedPaths,ppParts) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IDeviceTopology_INTERFACE_DEFINED__ */
+
+
+
+#ifndef __DevTopologyLib_LIBRARY_DEFINED__
+#define __DevTopologyLib_LIBRARY_DEFINED__
+
+/* library DevTopologyLib */
+/* [helpstring][version][uuid] */
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+EXTERN_C const IID LIBID_DevTopologyLib;
+
+EXTERN_C const CLSID CLSID_DeviceTopology;
+
+#ifdef __cplusplus
+
+class DECLSPEC_UUID("1DF639D0-5EC1-47AA-9379-828DC1AA8C59")
+DeviceTopology;
+#endif
+#endif /* __DevTopologyLib_LIBRARY_DEFINED__ */
+
+/* Additional Prototypes for ALL interfaces */
+
+/* end of Additional Prototypes */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
+
+
-\r
-\r
-/* this ALWAYS GENERATED file contains the definitions for the interfaces */\r
-\r
-\r
- /* File created by MIDL compiler version 7.00.0499 */\r
-/* Compiler settings for endpointvolume.idl:\r
- Oicf, W1, Zp8, env=Win32 (32b run)\r
- protocol : dce , ms_ext, c_ext, robust\r
- error checks: allocation ref bounds_check enum stub_data \r
- VC __declspec() decoration level: \r
- __declspec(uuid()), __declspec(selectany), __declspec(novtable)\r
- DECLSPEC_UUID(), MIDL_INTERFACE()\r
-*/\r
-//@@MIDL_FILE_HEADING( )\r
-\r
-#pragma warning( disable: 4049 ) /* more than 64k source lines */\r
-\r
-\r
-/* verify that the <rpcndr.h> version is high enough to compile this file*/\r
-#ifndef __REQUIRED_RPCNDR_H_VERSION__\r
-#define __REQUIRED_RPCNDR_H_VERSION__ 500\r
-#endif\r
-\r
-/* verify that the <rpcsal.h> version is high enough to compile this file*/\r
-#ifndef __REQUIRED_RPCSAL_H_VERSION__\r
-#define __REQUIRED_RPCSAL_H_VERSION__ 100\r
-#endif\r
-\r
-#include "rpc.h"\r
-#include "rpcndr.h"\r
-\r
-#ifndef __RPCNDR_H_VERSION__\r
-#error this stub requires an updated version of <rpcndr.h>\r
-#endif // __RPCNDR_H_VERSION__\r
-\r
-#ifndef COM_NO_WINDOWS_H\r
-#include "windows.h"\r
-#include "ole2.h"\r
-#endif /*COM_NO_WINDOWS_H*/\r
-\r
-#ifndef __endpointvolume_h__\r
-#define __endpointvolume_h__\r
-\r
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)\r
-#pragma once\r
-#endif\r
-\r
-/* Forward Declarations */ \r
-\r
-#ifndef __IAudioEndpointVolumeCallback_FWD_DEFINED__\r
-#define __IAudioEndpointVolumeCallback_FWD_DEFINED__\r
-typedef interface IAudioEndpointVolumeCallback IAudioEndpointVolumeCallback;\r
-#endif /* __IAudioEndpointVolumeCallback_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __IAudioEndpointVolume_FWD_DEFINED__\r
-#define __IAudioEndpointVolume_FWD_DEFINED__\r
-typedef interface IAudioEndpointVolume IAudioEndpointVolume;\r
-#endif /* __IAudioEndpointVolume_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __IAudioMeterInformation_FWD_DEFINED__\r
-#define __IAudioMeterInformation_FWD_DEFINED__\r
-typedef interface IAudioMeterInformation IAudioMeterInformation;\r
-#endif /* __IAudioMeterInformation_FWD_DEFINED__ */\r
-\r
-\r
-/* header files for imported files */\r
-#include "unknwn.h"\r
-#include "devicetopology.h"\r
-\r
-#ifdef __cplusplus\r
-extern "C"{\r
-#endif \r
-\r
-\r
-/* interface __MIDL_itf_endpointvolume_0000_0000 */\r
-/* [local] */ \r
-\r
-typedef struct AUDIO_VOLUME_NOTIFICATION_DATA\r
- {\r
- GUID guidEventContext;\r
- BOOL bMuted;\r
- float fMasterVolume;\r
- UINT nChannels;\r
- float afChannelVolumes[ 1 ];\r
- } AUDIO_VOLUME_NOTIFICATION_DATA;\r
-\r
-typedef struct AUDIO_VOLUME_NOTIFICATION_DATA *PAUDIO_VOLUME_NOTIFICATION_DATA;\r
-\r
-#define ENDPOINT_HARDWARE_SUPPORT_VOLUME 0x00000001\r
-#define ENDPOINT_HARDWARE_SUPPORT_MUTE 0x00000002\r
-#define ENDPOINT_HARDWARE_SUPPORT_METER 0x00000004\r
-\r
-\r
-extern RPC_IF_HANDLE __MIDL_itf_endpointvolume_0000_0000_v0_0_c_ifspec;\r
-extern RPC_IF_HANDLE __MIDL_itf_endpointvolume_0000_0000_v0_0_s_ifspec;\r
-\r
-#ifndef __IAudioEndpointVolumeCallback_INTERFACE_DEFINED__\r
-#define __IAudioEndpointVolumeCallback_INTERFACE_DEFINED__\r
-\r
-/* interface IAudioEndpointVolumeCallback */\r
-/* [unique][helpstring][nonextensible][uuid][local][object] */ \r
-\r
-\r
-EXTERN_C const IID IID_IAudioEndpointVolumeCallback;\r
-\r
-#if defined(__cplusplus) && !defined(CINTERFACE)\r
- \r
- MIDL_INTERFACE("657804FA-D6AD-4496-8A60-352752AF4F89")\r
- IAudioEndpointVolumeCallback : public IUnknown\r
- {\r
- public:\r
- virtual HRESULT STDMETHODCALLTYPE OnNotify( \r
- PAUDIO_VOLUME_NOTIFICATION_DATA pNotify) = 0;\r
- \r
- };\r
- \r
-#else /* C style interface */\r
-\r
- typedef struct IAudioEndpointVolumeCallbackVtbl\r
- {\r
- BEGIN_INTERFACE\r
- \r
- HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r
- IAudioEndpointVolumeCallback * This,\r
- /* [in] */ REFIID riid,\r
- /* [iid_is][out] */ \r
- __RPC__deref_out void **ppvObject);\r
- \r
- ULONG ( STDMETHODCALLTYPE *AddRef )( \r
- IAudioEndpointVolumeCallback * This);\r
- \r
- ULONG ( STDMETHODCALLTYPE *Release )( \r
- IAudioEndpointVolumeCallback * This);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *OnNotify )( \r
- IAudioEndpointVolumeCallback * This,\r
- PAUDIO_VOLUME_NOTIFICATION_DATA pNotify);\r
- \r
- END_INTERFACE\r
- } IAudioEndpointVolumeCallbackVtbl;\r
-\r
- interface IAudioEndpointVolumeCallback\r
- {\r
- CONST_VTBL struct IAudioEndpointVolumeCallbackVtbl *lpVtbl;\r
- };\r
-\r
- \r
-\r
-#ifdef COBJMACROS\r
-\r
-\r
-#define IAudioEndpointVolumeCallback_QueryInterface(This,riid,ppvObject) \\r
- ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r
-\r
-#define IAudioEndpointVolumeCallback_AddRef(This) \\r
- ( (This)->lpVtbl -> AddRef(This) ) \r
-\r
-#define IAudioEndpointVolumeCallback_Release(This) \\r
- ( (This)->lpVtbl -> Release(This) ) \r
-\r
-\r
-#define IAudioEndpointVolumeCallback_OnNotify(This,pNotify) \\r
- ( (This)->lpVtbl -> OnNotify(This,pNotify) ) \r
-\r
-#endif /* COBJMACROS */\r
-\r
-\r
-#endif /* C style interface */\r
-\r
-\r
-\r
-\r
-#endif /* __IAudioEndpointVolumeCallback_INTERFACE_DEFINED__ */\r
-\r
-\r
-#ifndef __IAudioEndpointVolume_INTERFACE_DEFINED__\r
-#define __IAudioEndpointVolume_INTERFACE_DEFINED__\r
-\r
-/* interface IAudioEndpointVolume */\r
-/* [unique][helpstring][nonextensible][uuid][local][object] */ \r
-\r
-\r
-EXTERN_C const IID IID_IAudioEndpointVolume;\r
-\r
-#if defined(__cplusplus) && !defined(CINTERFACE)\r
- \r
- MIDL_INTERFACE("5CDF2C82-841E-4546-9722-0CF74078229A")\r
- IAudioEndpointVolume : public IUnknown\r
- {\r
- public:\r
- virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE RegisterControlChangeNotify( \r
- /* [in] */ \r
- __in IAudioEndpointVolumeCallback *pNotify) = 0;\r
- \r
- virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE UnregisterControlChangeNotify( \r
- /* [in] */ \r
- __in IAudioEndpointVolumeCallback *pNotify) = 0;\r
- \r
- virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetChannelCount( \r
- /* [out] */ \r
- __out UINT *pnChannelCount) = 0;\r
- \r
- virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetMasterVolumeLevel( \r
- /* [in] */ \r
- __in float fLevelDB,\r
- /* [unique][in] */ LPCGUID pguidEventContext) = 0;\r
- \r
- virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetMasterVolumeLevelScalar( \r
- /* [in] */ \r
- __in float fLevel,\r
- /* [unique][in] */ LPCGUID pguidEventContext) = 0;\r
- \r
- virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetMasterVolumeLevel( \r
- /* [out] */ \r
- __out float *pfLevelDB) = 0;\r
- \r
- virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetMasterVolumeLevelScalar( \r
- /* [out] */ \r
- __out float *pfLevel) = 0;\r
- \r
- virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetChannelVolumeLevel( \r
- /* [in] */ \r
- __in UINT nChannel,\r
- float fLevelDB,\r
- /* [unique][in] */ LPCGUID pguidEventContext) = 0;\r
- \r
- virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetChannelVolumeLevelScalar( \r
- /* [in] */ \r
- __in UINT nChannel,\r
- float fLevel,\r
- /* [unique][in] */ LPCGUID pguidEventContext) = 0;\r
- \r
- virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetChannelVolumeLevel( \r
- /* [in] */ \r
- __in UINT nChannel,\r
- /* [out] */ \r
- __out float *pfLevelDB) = 0;\r
- \r
- virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetChannelVolumeLevelScalar( \r
- /* [in] */ \r
- __in UINT nChannel,\r
- /* [out] */ \r
- __out float *pfLevel) = 0;\r
- \r
- virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetMute( \r
- /* [in] */ \r
- __in BOOL bMute,\r
- /* [unique][in] */ LPCGUID pguidEventContext) = 0;\r
- \r
- virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetMute( \r
- /* [out] */ \r
- __out BOOL *pbMute) = 0;\r
- \r
- virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetVolumeStepInfo( \r
- /* [out] */ \r
- __out UINT *pnStep,\r
- /* [out] */ \r
- __out UINT *pnStepCount) = 0;\r
- \r
- virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE VolumeStepUp( \r
- /* [unique][in] */ LPCGUID pguidEventContext) = 0;\r
- \r
- virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE VolumeStepDown( \r
- /* [unique][in] */ LPCGUID pguidEventContext) = 0;\r
- \r
- virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE QueryHardwareSupport( \r
- /* [out] */ \r
- __out DWORD *pdwHardwareSupportMask) = 0;\r
- \r
- virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetVolumeRange( \r
- /* [out] */ \r
- __out float *pflVolumeMindB,\r
- /* [out] */ \r
- __out float *pflVolumeMaxdB,\r
- /* [out] */ \r
- __out float *pflVolumeIncrementdB) = 0;\r
- \r
- };\r
- \r
-#else /* C style interface */\r
-\r
- typedef struct IAudioEndpointVolumeVtbl\r
- {\r
- BEGIN_INTERFACE\r
- \r
- HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r
- IAudioEndpointVolume * This,\r
- /* [in] */ REFIID riid,\r
- /* [iid_is][out] */ \r
- __RPC__deref_out void **ppvObject);\r
- \r
- ULONG ( STDMETHODCALLTYPE *AddRef )( \r
- IAudioEndpointVolume * This);\r
- \r
- ULONG ( STDMETHODCALLTYPE *Release )( \r
- IAudioEndpointVolume * This);\r
- \r
- /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *RegisterControlChangeNotify )( \r
- IAudioEndpointVolume * This,\r
- /* [in] */ \r
- __in IAudioEndpointVolumeCallback *pNotify);\r
- \r
- /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *UnregisterControlChangeNotify )( \r
- IAudioEndpointVolume * This,\r
- /* [in] */ \r
- __in IAudioEndpointVolumeCallback *pNotify);\r
- \r
- /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetChannelCount )( \r
- IAudioEndpointVolume * This,\r
- /* [out] */ \r
- __out UINT *pnChannelCount);\r
- \r
- /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetMasterVolumeLevel )( \r
- IAudioEndpointVolume * This,\r
- /* [in] */ \r
- __in float fLevelDB,\r
- /* [unique][in] */ LPCGUID pguidEventContext);\r
- \r
- /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetMasterVolumeLevelScalar )( \r
- IAudioEndpointVolume * This,\r
- /* [in] */ \r
- __in float fLevel,\r
- /* [unique][in] */ LPCGUID pguidEventContext);\r
- \r
- /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetMasterVolumeLevel )( \r
- IAudioEndpointVolume * This,\r
- /* [out] */ \r
- __out float *pfLevelDB);\r
- \r
- /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetMasterVolumeLevelScalar )( \r
- IAudioEndpointVolume * This,\r
- /* [out] */ \r
- __out float *pfLevel);\r
- \r
- /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetChannelVolumeLevel )( \r
- IAudioEndpointVolume * This,\r
- /* [in] */ \r
- __in UINT nChannel,\r
- float fLevelDB,\r
- /* [unique][in] */ LPCGUID pguidEventContext);\r
- \r
- /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetChannelVolumeLevelScalar )( \r
- IAudioEndpointVolume * This,\r
- /* [in] */ \r
- __in UINT nChannel,\r
- float fLevel,\r
- /* [unique][in] */ LPCGUID pguidEventContext);\r
- \r
- /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetChannelVolumeLevel )( \r
- IAudioEndpointVolume * This,\r
- /* [in] */ \r
- __in UINT nChannel,\r
- /* [out] */ \r
- __out float *pfLevelDB);\r
- \r
- /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetChannelVolumeLevelScalar )( \r
- IAudioEndpointVolume * This,\r
- /* [in] */ \r
- __in UINT nChannel,\r
- /* [out] */ \r
- __out float *pfLevel);\r
- \r
- /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetMute )( \r
- IAudioEndpointVolume * This,\r
- /* [in] */ \r
- __in BOOL bMute,\r
- /* [unique][in] */ LPCGUID pguidEventContext);\r
- \r
- /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetMute )( \r
- IAudioEndpointVolume * This,\r
- /* [out] */ \r
- __out BOOL *pbMute);\r
- \r
- /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetVolumeStepInfo )( \r
- IAudioEndpointVolume * This,\r
- /* [out] */ \r
- __out UINT *pnStep,\r
- /* [out] */ \r
- __out UINT *pnStepCount);\r
- \r
- /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *VolumeStepUp )( \r
- IAudioEndpointVolume * This,\r
- /* [unique][in] */ LPCGUID pguidEventContext);\r
- \r
- /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *VolumeStepDown )( \r
- IAudioEndpointVolume * This,\r
- /* [unique][in] */ LPCGUID pguidEventContext);\r
- \r
- /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *QueryHardwareSupport )( \r
- IAudioEndpointVolume * This,\r
- /* [out] */ \r
- __out DWORD *pdwHardwareSupportMask);\r
- \r
- /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetVolumeRange )( \r
- IAudioEndpointVolume * This,\r
- /* [out] */ \r
- __out float *pflVolumeMindB,\r
- /* [out] */ \r
- __out float *pflVolumeMaxdB,\r
- /* [out] */ \r
- __out float *pflVolumeIncrementdB);\r
- \r
- END_INTERFACE\r
- } IAudioEndpointVolumeVtbl;\r
-\r
- interface IAudioEndpointVolume\r
- {\r
- CONST_VTBL struct IAudioEndpointVolumeVtbl *lpVtbl;\r
- };\r
-\r
- \r
-\r
-#ifdef COBJMACROS\r
-\r
-\r
-#define IAudioEndpointVolume_QueryInterface(This,riid,ppvObject) \\r
- ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r
-\r
-#define IAudioEndpointVolume_AddRef(This) \\r
- ( (This)->lpVtbl -> AddRef(This) ) \r
-\r
-#define IAudioEndpointVolume_Release(This) \\r
- ( (This)->lpVtbl -> Release(This) ) \r
-\r
-\r
-#define IAudioEndpointVolume_RegisterControlChangeNotify(This,pNotify) \\r
- ( (This)->lpVtbl -> RegisterControlChangeNotify(This,pNotify) ) \r
-\r
-#define IAudioEndpointVolume_UnregisterControlChangeNotify(This,pNotify) \\r
- ( (This)->lpVtbl -> UnregisterControlChangeNotify(This,pNotify) ) \r
-\r
-#define IAudioEndpointVolume_GetChannelCount(This,pnChannelCount) \\r
- ( (This)->lpVtbl -> GetChannelCount(This,pnChannelCount) ) \r
-\r
-#define IAudioEndpointVolume_SetMasterVolumeLevel(This,fLevelDB,pguidEventContext) \\r
- ( (This)->lpVtbl -> SetMasterVolumeLevel(This,fLevelDB,pguidEventContext) ) \r
-\r
-#define IAudioEndpointVolume_SetMasterVolumeLevelScalar(This,fLevel,pguidEventContext) \\r
- ( (This)->lpVtbl -> SetMasterVolumeLevelScalar(This,fLevel,pguidEventContext) ) \r
-\r
-#define IAudioEndpointVolume_GetMasterVolumeLevel(This,pfLevelDB) \\r
- ( (This)->lpVtbl -> GetMasterVolumeLevel(This,pfLevelDB) ) \r
-\r
-#define IAudioEndpointVolume_GetMasterVolumeLevelScalar(This,pfLevel) \\r
- ( (This)->lpVtbl -> GetMasterVolumeLevelScalar(This,pfLevel) ) \r
-\r
-#define IAudioEndpointVolume_SetChannelVolumeLevel(This,nChannel,fLevelDB,pguidEventContext) \\r
- ( (This)->lpVtbl -> SetChannelVolumeLevel(This,nChannel,fLevelDB,pguidEventContext) ) \r
-\r
-#define IAudioEndpointVolume_SetChannelVolumeLevelScalar(This,nChannel,fLevel,pguidEventContext) \\r
- ( (This)->lpVtbl -> SetChannelVolumeLevelScalar(This,nChannel,fLevel,pguidEventContext) ) \r
-\r
-#define IAudioEndpointVolume_GetChannelVolumeLevel(This,nChannel,pfLevelDB) \\r
- ( (This)->lpVtbl -> GetChannelVolumeLevel(This,nChannel,pfLevelDB) ) \r
-\r
-#define IAudioEndpointVolume_GetChannelVolumeLevelScalar(This,nChannel,pfLevel) \\r
- ( (This)->lpVtbl -> GetChannelVolumeLevelScalar(This,nChannel,pfLevel) ) \r
-\r
-#define IAudioEndpointVolume_SetMute(This,bMute,pguidEventContext) \\r
- ( (This)->lpVtbl -> SetMute(This,bMute,pguidEventContext) ) \r
-\r
-#define IAudioEndpointVolume_GetMute(This,pbMute) \\r
- ( (This)->lpVtbl -> GetMute(This,pbMute) ) \r
-\r
-#define IAudioEndpointVolume_GetVolumeStepInfo(This,pnStep,pnStepCount) \\r
- ( (This)->lpVtbl -> GetVolumeStepInfo(This,pnStep,pnStepCount) ) \r
-\r
-#define IAudioEndpointVolume_VolumeStepUp(This,pguidEventContext) \\r
- ( (This)->lpVtbl -> VolumeStepUp(This,pguidEventContext) ) \r
-\r
-#define IAudioEndpointVolume_VolumeStepDown(This,pguidEventContext) \\r
- ( (This)->lpVtbl -> VolumeStepDown(This,pguidEventContext) ) \r
-\r
-#define IAudioEndpointVolume_QueryHardwareSupport(This,pdwHardwareSupportMask) \\r
- ( (This)->lpVtbl -> QueryHardwareSupport(This,pdwHardwareSupportMask) ) \r
-\r
-#define IAudioEndpointVolume_GetVolumeRange(This,pflVolumeMindB,pflVolumeMaxdB,pflVolumeIncrementdB) \\r
- ( (This)->lpVtbl -> GetVolumeRange(This,pflVolumeMindB,pflVolumeMaxdB,pflVolumeIncrementdB) ) \r
-\r
-#endif /* COBJMACROS */\r
-\r
-\r
-#endif /* C style interface */\r
-\r
-\r
-\r
-\r
-#endif /* __IAudioEndpointVolume_INTERFACE_DEFINED__ */\r
-\r
-\r
-#ifndef __IAudioMeterInformation_INTERFACE_DEFINED__\r
-#define __IAudioMeterInformation_INTERFACE_DEFINED__\r
-\r
-/* interface IAudioMeterInformation */\r
-/* [unique][helpstring][nonextensible][uuid][local][object] */ \r
-\r
-\r
-EXTERN_C const IID IID_IAudioMeterInformation;\r
-\r
-#if defined(__cplusplus) && !defined(CINTERFACE)\r
- \r
- MIDL_INTERFACE("C02216F6-8C67-4B5B-9D00-D008E73E0064")\r
- IAudioMeterInformation : public IUnknown\r
- {\r
- public:\r
- virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetPeakValue( \r
- /* [out] */ float *pfPeak) = 0;\r
- \r
- virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetMeteringChannelCount( \r
- /* [out] */ \r
- __out UINT *pnChannelCount) = 0;\r
- \r
- virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetChannelsPeakValues( \r
- /* [in] */ UINT32 u32ChannelCount,\r
- /* [size_is][out] */ float *afPeakValues) = 0;\r
- \r
- virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE QueryHardwareSupport( \r
- /* [out] */ \r
- __out DWORD *pdwHardwareSupportMask) = 0;\r
- \r
- };\r
- \r
-#else /* C style interface */\r
-\r
- typedef struct IAudioMeterInformationVtbl\r
- {\r
- BEGIN_INTERFACE\r
- \r
- HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r
- IAudioMeterInformation * This,\r
- /* [in] */ REFIID riid,\r
- /* [iid_is][out] */ \r
- __RPC__deref_out void **ppvObject);\r
- \r
- ULONG ( STDMETHODCALLTYPE *AddRef )( \r
- IAudioMeterInformation * This);\r
- \r
- ULONG ( STDMETHODCALLTYPE *Release )( \r
- IAudioMeterInformation * This);\r
- \r
- /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetPeakValue )( \r
- IAudioMeterInformation * This,\r
- /* [out] */ float *pfPeak);\r
- \r
- /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetMeteringChannelCount )( \r
- IAudioMeterInformation * This,\r
- /* [out] */ \r
- __out UINT *pnChannelCount);\r
- \r
- /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetChannelsPeakValues )( \r
- IAudioMeterInformation * This,\r
- /* [in] */ UINT32 u32ChannelCount,\r
- /* [size_is][out] */ float *afPeakValues);\r
- \r
- /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *QueryHardwareSupport )( \r
- IAudioMeterInformation * This,\r
- /* [out] */ \r
- __out DWORD *pdwHardwareSupportMask);\r
- \r
- END_INTERFACE\r
- } IAudioMeterInformationVtbl;\r
-\r
- interface IAudioMeterInformation\r
- {\r
- CONST_VTBL struct IAudioMeterInformationVtbl *lpVtbl;\r
- };\r
-\r
- \r
-\r
-#ifdef COBJMACROS\r
-\r
-\r
-#define IAudioMeterInformation_QueryInterface(This,riid,ppvObject) \\r
- ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r
-\r
-#define IAudioMeterInformation_AddRef(This) \\r
- ( (This)->lpVtbl -> AddRef(This) ) \r
-\r
-#define IAudioMeterInformation_Release(This) \\r
- ( (This)->lpVtbl -> Release(This) ) \r
-\r
-\r
-#define IAudioMeterInformation_GetPeakValue(This,pfPeak) \\r
- ( (This)->lpVtbl -> GetPeakValue(This,pfPeak) ) \r
-\r
-#define IAudioMeterInformation_GetMeteringChannelCount(This,pnChannelCount) \\r
- ( (This)->lpVtbl -> GetMeteringChannelCount(This,pnChannelCount) ) \r
-\r
-#define IAudioMeterInformation_GetChannelsPeakValues(This,u32ChannelCount,afPeakValues) \\r
- ( (This)->lpVtbl -> GetChannelsPeakValues(This,u32ChannelCount,afPeakValues) ) \r
-\r
-#define IAudioMeterInformation_QueryHardwareSupport(This,pdwHardwareSupportMask) \\r
- ( (This)->lpVtbl -> QueryHardwareSupport(This,pdwHardwareSupportMask) ) \r
-\r
-#endif /* COBJMACROS */\r
-\r
-\r
-#endif /* C style interface */\r
-\r
-\r
-\r
-\r
-#endif /* __IAudioMeterInformation_INTERFACE_DEFINED__ */\r
-\r
-\r
-/* Additional Prototypes for ALL interfaces */\r
-\r
-/* end of Additional Prototypes */\r
-\r
-#ifdef __cplusplus\r
-}\r
-#endif\r
-\r
-#endif\r
-\r
-\r
-\r
+
+
+/* this ALWAYS GENERATED file contains the definitions for the interfaces */
+
+
+ /* File created by MIDL compiler version 7.00.0499 */
+/* Compiler settings for endpointvolume.idl:
+ Oicf, W1, Zp8, env=Win32 (32b run)
+ protocol : dce , ms_ext, c_ext, robust
+ error checks: allocation ref bounds_check enum stub_data
+ VC __declspec() decoration level:
+ __declspec(uuid()), __declspec(selectany), __declspec(novtable)
+ DECLSPEC_UUID(), MIDL_INTERFACE()
+*/
+//@@MIDL_FILE_HEADING( )
+
+#pragma warning( disable: 4049 ) /* more than 64k source lines */
+
+
+/* verify that the <rpcndr.h> version is high enough to compile this file*/
+#ifndef __REQUIRED_RPCNDR_H_VERSION__
+#define __REQUIRED_RPCNDR_H_VERSION__ 500
+#endif
+
+/* verify that the <rpcsal.h> version is high enough to compile this file*/
+#ifndef __REQUIRED_RPCSAL_H_VERSION__
+#define __REQUIRED_RPCSAL_H_VERSION__ 100
+#endif
+
+#include "rpc.h"
+#include "rpcndr.h"
+
+#ifndef __RPCNDR_H_VERSION__
+#error this stub requires an updated version of <rpcndr.h>
+#endif // __RPCNDR_H_VERSION__
+
+#ifndef COM_NO_WINDOWS_H
+#include "windows.h"
+#include "ole2.h"
+#endif /*COM_NO_WINDOWS_H*/
+
+#ifndef __endpointvolume_h__
+#define __endpointvolume_h__
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#pragma once
+#endif
+
+/* Forward Declarations */
+
+#ifndef __IAudioEndpointVolumeCallback_FWD_DEFINED__
+#define __IAudioEndpointVolumeCallback_FWD_DEFINED__
+typedef interface IAudioEndpointVolumeCallback IAudioEndpointVolumeCallback;
+#endif /* __IAudioEndpointVolumeCallback_FWD_DEFINED__ */
+
+
+#ifndef __IAudioEndpointVolume_FWD_DEFINED__
+#define __IAudioEndpointVolume_FWD_DEFINED__
+typedef interface IAudioEndpointVolume IAudioEndpointVolume;
+#endif /* __IAudioEndpointVolume_FWD_DEFINED__ */
+
+
+#ifndef __IAudioMeterInformation_FWD_DEFINED__
+#define __IAudioMeterInformation_FWD_DEFINED__
+typedef interface IAudioMeterInformation IAudioMeterInformation;
+#endif /* __IAudioMeterInformation_FWD_DEFINED__ */
+
+
+/* header files for imported files */
+#include "unknwn.h"
+#include "devicetopology.h"
+
+#ifdef __cplusplus
+extern "C"{
+#endif
+
+
+/* interface __MIDL_itf_endpointvolume_0000_0000 */
+/* [local] */
+
+typedef struct AUDIO_VOLUME_NOTIFICATION_DATA
+ {
+ GUID guidEventContext;
+ BOOL bMuted;
+ float fMasterVolume;
+ UINT nChannels;
+ float afChannelVolumes[ 1 ];
+ } AUDIO_VOLUME_NOTIFICATION_DATA;
+
+typedef struct AUDIO_VOLUME_NOTIFICATION_DATA *PAUDIO_VOLUME_NOTIFICATION_DATA;
+
+#define ENDPOINT_HARDWARE_SUPPORT_VOLUME 0x00000001
+#define ENDPOINT_HARDWARE_SUPPORT_MUTE 0x00000002
+#define ENDPOINT_HARDWARE_SUPPORT_METER 0x00000004
+
+
+extern RPC_IF_HANDLE __MIDL_itf_endpointvolume_0000_0000_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_endpointvolume_0000_0000_v0_0_s_ifspec;
+
+#ifndef __IAudioEndpointVolumeCallback_INTERFACE_DEFINED__
+#define __IAudioEndpointVolumeCallback_INTERFACE_DEFINED__
+
+/* interface IAudioEndpointVolumeCallback */
+/* [unique][helpstring][nonextensible][uuid][local][object] */
+
+
+EXTERN_C const IID IID_IAudioEndpointVolumeCallback;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("657804FA-D6AD-4496-8A60-352752AF4F89")
+ IAudioEndpointVolumeCallback : public IUnknown
+ {
+ public:
+ virtual HRESULT STDMETHODCALLTYPE OnNotify(
+ PAUDIO_VOLUME_NOTIFICATION_DATA pNotify) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct IAudioEndpointVolumeCallbackVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IAudioEndpointVolumeCallback * This,
+ /* [in] */ REFIID riid,
+ /* [iid_is][out] */
+ __RPC__deref_out void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IAudioEndpointVolumeCallback * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IAudioEndpointVolumeCallback * This);
+
+ HRESULT ( STDMETHODCALLTYPE *OnNotify )(
+ IAudioEndpointVolumeCallback * This,
+ PAUDIO_VOLUME_NOTIFICATION_DATA pNotify);
+
+ END_INTERFACE
+ } IAudioEndpointVolumeCallbackVtbl;
+
+ interface IAudioEndpointVolumeCallback
+ {
+ CONST_VTBL struct IAudioEndpointVolumeCallbackVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IAudioEndpointVolumeCallback_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IAudioEndpointVolumeCallback_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IAudioEndpointVolumeCallback_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IAudioEndpointVolumeCallback_OnNotify(This,pNotify) \
+ ( (This)->lpVtbl -> OnNotify(This,pNotify) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IAudioEndpointVolumeCallback_INTERFACE_DEFINED__ */
+
+
+#ifndef __IAudioEndpointVolume_INTERFACE_DEFINED__
+#define __IAudioEndpointVolume_INTERFACE_DEFINED__
+
+/* interface IAudioEndpointVolume */
+/* [unique][helpstring][nonextensible][uuid][local][object] */
+
+
+EXTERN_C const IID IID_IAudioEndpointVolume;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("5CDF2C82-841E-4546-9722-0CF74078229A")
+ IAudioEndpointVolume : public IUnknown
+ {
+ public:
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE RegisterControlChangeNotify(
+ /* [in] */
+ __in IAudioEndpointVolumeCallback *pNotify) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE UnregisterControlChangeNotify(
+ /* [in] */
+ __in IAudioEndpointVolumeCallback *pNotify) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetChannelCount(
+ /* [out] */
+ __out UINT *pnChannelCount) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetMasterVolumeLevel(
+ /* [in] */
+ __in float fLevelDB,
+ /* [unique][in] */ LPCGUID pguidEventContext) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetMasterVolumeLevelScalar(
+ /* [in] */
+ __in float fLevel,
+ /* [unique][in] */ LPCGUID pguidEventContext) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetMasterVolumeLevel(
+ /* [out] */
+ __out float *pfLevelDB) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetMasterVolumeLevelScalar(
+ /* [out] */
+ __out float *pfLevel) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetChannelVolumeLevel(
+ /* [in] */
+ __in UINT nChannel,
+ float fLevelDB,
+ /* [unique][in] */ LPCGUID pguidEventContext) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetChannelVolumeLevelScalar(
+ /* [in] */
+ __in UINT nChannel,
+ float fLevel,
+ /* [unique][in] */ LPCGUID pguidEventContext) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetChannelVolumeLevel(
+ /* [in] */
+ __in UINT nChannel,
+ /* [out] */
+ __out float *pfLevelDB) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetChannelVolumeLevelScalar(
+ /* [in] */
+ __in UINT nChannel,
+ /* [out] */
+ __out float *pfLevel) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetMute(
+ /* [in] */
+ __in BOOL bMute,
+ /* [unique][in] */ LPCGUID pguidEventContext) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetMute(
+ /* [out] */
+ __out BOOL *pbMute) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetVolumeStepInfo(
+ /* [out] */
+ __out UINT *pnStep,
+ /* [out] */
+ __out UINT *pnStepCount) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE VolumeStepUp(
+ /* [unique][in] */ LPCGUID pguidEventContext) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE VolumeStepDown(
+ /* [unique][in] */ LPCGUID pguidEventContext) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE QueryHardwareSupport(
+ /* [out] */
+ __out DWORD *pdwHardwareSupportMask) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetVolumeRange(
+ /* [out] */
+ __out float *pflVolumeMindB,
+ /* [out] */
+ __out float *pflVolumeMaxdB,
+ /* [out] */
+ __out float *pflVolumeIncrementdB) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct IAudioEndpointVolumeVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IAudioEndpointVolume * This,
+ /* [in] */ REFIID riid,
+ /* [iid_is][out] */
+ __RPC__deref_out void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IAudioEndpointVolume * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IAudioEndpointVolume * This);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *RegisterControlChangeNotify )(
+ IAudioEndpointVolume * This,
+ /* [in] */
+ __in IAudioEndpointVolumeCallback *pNotify);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *UnregisterControlChangeNotify )(
+ IAudioEndpointVolume * This,
+ /* [in] */
+ __in IAudioEndpointVolumeCallback *pNotify);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetChannelCount )(
+ IAudioEndpointVolume * This,
+ /* [out] */
+ __out UINT *pnChannelCount);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetMasterVolumeLevel )(
+ IAudioEndpointVolume * This,
+ /* [in] */
+ __in float fLevelDB,
+ /* [unique][in] */ LPCGUID pguidEventContext);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetMasterVolumeLevelScalar )(
+ IAudioEndpointVolume * This,
+ /* [in] */
+ __in float fLevel,
+ /* [unique][in] */ LPCGUID pguidEventContext);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetMasterVolumeLevel )(
+ IAudioEndpointVolume * This,
+ /* [out] */
+ __out float *pfLevelDB);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetMasterVolumeLevelScalar )(
+ IAudioEndpointVolume * This,
+ /* [out] */
+ __out float *pfLevel);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetChannelVolumeLevel )(
+ IAudioEndpointVolume * This,
+ /* [in] */
+ __in UINT nChannel,
+ float fLevelDB,
+ /* [unique][in] */ LPCGUID pguidEventContext);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetChannelVolumeLevelScalar )(
+ IAudioEndpointVolume * This,
+ /* [in] */
+ __in UINT nChannel,
+ float fLevel,
+ /* [unique][in] */ LPCGUID pguidEventContext);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetChannelVolumeLevel )(
+ IAudioEndpointVolume * This,
+ /* [in] */
+ __in UINT nChannel,
+ /* [out] */
+ __out float *pfLevelDB);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetChannelVolumeLevelScalar )(
+ IAudioEndpointVolume * This,
+ /* [in] */
+ __in UINT nChannel,
+ /* [out] */
+ __out float *pfLevel);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetMute )(
+ IAudioEndpointVolume * This,
+ /* [in] */
+ __in BOOL bMute,
+ /* [unique][in] */ LPCGUID pguidEventContext);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetMute )(
+ IAudioEndpointVolume * This,
+ /* [out] */
+ __out BOOL *pbMute);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetVolumeStepInfo )(
+ IAudioEndpointVolume * This,
+ /* [out] */
+ __out UINT *pnStep,
+ /* [out] */
+ __out UINT *pnStepCount);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *VolumeStepUp )(
+ IAudioEndpointVolume * This,
+ /* [unique][in] */ LPCGUID pguidEventContext);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *VolumeStepDown )(
+ IAudioEndpointVolume * This,
+ /* [unique][in] */ LPCGUID pguidEventContext);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *QueryHardwareSupport )(
+ IAudioEndpointVolume * This,
+ /* [out] */
+ __out DWORD *pdwHardwareSupportMask);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetVolumeRange )(
+ IAudioEndpointVolume * This,
+ /* [out] */
+ __out float *pflVolumeMindB,
+ /* [out] */
+ __out float *pflVolumeMaxdB,
+ /* [out] */
+ __out float *pflVolumeIncrementdB);
+
+ END_INTERFACE
+ } IAudioEndpointVolumeVtbl;
+
+ interface IAudioEndpointVolume
+ {
+ CONST_VTBL struct IAudioEndpointVolumeVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IAudioEndpointVolume_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IAudioEndpointVolume_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IAudioEndpointVolume_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IAudioEndpointVolume_RegisterControlChangeNotify(This,pNotify) \
+ ( (This)->lpVtbl -> RegisterControlChangeNotify(This,pNotify) )
+
+#define IAudioEndpointVolume_UnregisterControlChangeNotify(This,pNotify) \
+ ( (This)->lpVtbl -> UnregisterControlChangeNotify(This,pNotify) )
+
+#define IAudioEndpointVolume_GetChannelCount(This,pnChannelCount) \
+ ( (This)->lpVtbl -> GetChannelCount(This,pnChannelCount) )
+
+#define IAudioEndpointVolume_SetMasterVolumeLevel(This,fLevelDB,pguidEventContext) \
+ ( (This)->lpVtbl -> SetMasterVolumeLevel(This,fLevelDB,pguidEventContext) )
+
+#define IAudioEndpointVolume_SetMasterVolumeLevelScalar(This,fLevel,pguidEventContext) \
+ ( (This)->lpVtbl -> SetMasterVolumeLevelScalar(This,fLevel,pguidEventContext) )
+
+#define IAudioEndpointVolume_GetMasterVolumeLevel(This,pfLevelDB) \
+ ( (This)->lpVtbl -> GetMasterVolumeLevel(This,pfLevelDB) )
+
+#define IAudioEndpointVolume_GetMasterVolumeLevelScalar(This,pfLevel) \
+ ( (This)->lpVtbl -> GetMasterVolumeLevelScalar(This,pfLevel) )
+
+#define IAudioEndpointVolume_SetChannelVolumeLevel(This,nChannel,fLevelDB,pguidEventContext) \
+ ( (This)->lpVtbl -> SetChannelVolumeLevel(This,nChannel,fLevelDB,pguidEventContext) )
+
+#define IAudioEndpointVolume_SetChannelVolumeLevelScalar(This,nChannel,fLevel,pguidEventContext) \
+ ( (This)->lpVtbl -> SetChannelVolumeLevelScalar(This,nChannel,fLevel,pguidEventContext) )
+
+#define IAudioEndpointVolume_GetChannelVolumeLevel(This,nChannel,pfLevelDB) \
+ ( (This)->lpVtbl -> GetChannelVolumeLevel(This,nChannel,pfLevelDB) )
+
+#define IAudioEndpointVolume_GetChannelVolumeLevelScalar(This,nChannel,pfLevel) \
+ ( (This)->lpVtbl -> GetChannelVolumeLevelScalar(This,nChannel,pfLevel) )
+
+#define IAudioEndpointVolume_SetMute(This,bMute,pguidEventContext) \
+ ( (This)->lpVtbl -> SetMute(This,bMute,pguidEventContext) )
+
+#define IAudioEndpointVolume_GetMute(This,pbMute) \
+ ( (This)->lpVtbl -> GetMute(This,pbMute) )
+
+#define IAudioEndpointVolume_GetVolumeStepInfo(This,pnStep,pnStepCount) \
+ ( (This)->lpVtbl -> GetVolumeStepInfo(This,pnStep,pnStepCount) )
+
+#define IAudioEndpointVolume_VolumeStepUp(This,pguidEventContext) \
+ ( (This)->lpVtbl -> VolumeStepUp(This,pguidEventContext) )
+
+#define IAudioEndpointVolume_VolumeStepDown(This,pguidEventContext) \
+ ( (This)->lpVtbl -> VolumeStepDown(This,pguidEventContext) )
+
+#define IAudioEndpointVolume_QueryHardwareSupport(This,pdwHardwareSupportMask) \
+ ( (This)->lpVtbl -> QueryHardwareSupport(This,pdwHardwareSupportMask) )
+
+#define IAudioEndpointVolume_GetVolumeRange(This,pflVolumeMindB,pflVolumeMaxdB,pflVolumeIncrementdB) \
+ ( (This)->lpVtbl -> GetVolumeRange(This,pflVolumeMindB,pflVolumeMaxdB,pflVolumeIncrementdB) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IAudioEndpointVolume_INTERFACE_DEFINED__ */
+
+
+#ifndef __IAudioMeterInformation_INTERFACE_DEFINED__
+#define __IAudioMeterInformation_INTERFACE_DEFINED__
+
+/* interface IAudioMeterInformation */
+/* [unique][helpstring][nonextensible][uuid][local][object] */
+
+
+EXTERN_C const IID IID_IAudioMeterInformation;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("C02216F6-8C67-4B5B-9D00-D008E73E0064")
+ IAudioMeterInformation : public IUnknown
+ {
+ public:
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetPeakValue(
+ /* [out] */ float *pfPeak) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetMeteringChannelCount(
+ /* [out] */
+ __out UINT *pnChannelCount) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetChannelsPeakValues(
+ /* [in] */ UINT32 u32ChannelCount,
+ /* [size_is][out] */ float *afPeakValues) = 0;
+
+ virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE QueryHardwareSupport(
+ /* [out] */
+ __out DWORD *pdwHardwareSupportMask) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct IAudioMeterInformationVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IAudioMeterInformation * This,
+ /* [in] */ REFIID riid,
+ /* [iid_is][out] */
+ __RPC__deref_out void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IAudioMeterInformation * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IAudioMeterInformation * This);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetPeakValue )(
+ IAudioMeterInformation * This,
+ /* [out] */ float *pfPeak);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetMeteringChannelCount )(
+ IAudioMeterInformation * This,
+ /* [out] */
+ __out UINT *pnChannelCount);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetChannelsPeakValues )(
+ IAudioMeterInformation * This,
+ /* [in] */ UINT32 u32ChannelCount,
+ /* [size_is][out] */ float *afPeakValues);
+
+ /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *QueryHardwareSupport )(
+ IAudioMeterInformation * This,
+ /* [out] */
+ __out DWORD *pdwHardwareSupportMask);
+
+ END_INTERFACE
+ } IAudioMeterInformationVtbl;
+
+ interface IAudioMeterInformation
+ {
+ CONST_VTBL struct IAudioMeterInformationVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IAudioMeterInformation_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IAudioMeterInformation_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IAudioMeterInformation_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IAudioMeterInformation_GetPeakValue(This,pfPeak) \
+ ( (This)->lpVtbl -> GetPeakValue(This,pfPeak) )
+
+#define IAudioMeterInformation_GetMeteringChannelCount(This,pnChannelCount) \
+ ( (This)->lpVtbl -> GetMeteringChannelCount(This,pnChannelCount) )
+
+#define IAudioMeterInformation_GetChannelsPeakValues(This,u32ChannelCount,afPeakValues) \
+ ( (This)->lpVtbl -> GetChannelsPeakValues(This,u32ChannelCount,afPeakValues) )
+
+#define IAudioMeterInformation_QueryHardwareSupport(This,pdwHardwareSupportMask) \
+ ( (This)->lpVtbl -> QueryHardwareSupport(This,pdwHardwareSupportMask) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IAudioMeterInformation_INTERFACE_DEFINED__ */
+
+
+/* Additional Prototypes for ALL interfaces */
+
+/* end of Additional Prototypes */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
+
+
-#pragma once\r
-\r
-#if __GNUC__ >=3\r
-#pragma GCC system_header\r
-#endif\r
-\r
-#ifndef DEFINE_API_PKEY\r
-#include <propkey.h>\r
-#endif\r
-\r
-#include <FunctionDiscoveryKeys_devpkey.h>\r
-\r
-// FMTID_FD = {904b03a2-471d-423c-a584-f3483238a146}\r
-DEFINE_GUID(FMTID_FD, 0x904b03a2, 0x471d, 0x423c, 0xa5, 0x84, 0xf3, 0x48, 0x32, 0x38, 0xa1, 0x46);\r
-DEFINE_API_PKEY(PKEY_FD_Visibility, VisibilityFlags, 0x904b03a2, 0x471d, 0x423c, 0xa5, 0x84, 0xf3, 0x48, 0x32, 0x38, 0xa1, 0x46, 0x00000001); // VT_UINT\r
-#define FD_Visibility_Default 0\r
-#define FD_Visibility_Hidden 1\r
-\r
-// FMTID_Device = {78C34FC8-104A-4aca-9EA4-524D52996E57}\r
-DEFINE_GUID(FMTID_Device, 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57);\r
-\r
-DEFINE_API_PKEY(PKEY_Device_NotPresent, DeviceNotPresent , 0x904b03a2, 0x471d, 0x423c, 0xa5, 0x84, 0xf3, 0x48, 0x32, 0x38, 0xa1, 0x46, 0x00000002); // VT_UINT\r
-DEFINE_API_PKEY(PKEY_Device_QueueSize, DeviceQueueSize , 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 0x00000024); // VT_UI4\r
-DEFINE_API_PKEY(PKEY_Device_Status, DeviceStatus , 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 0x00000025); // VT_LPWSTR\r
-DEFINE_API_PKEY(PKEY_Device_Comment, DeviceComment , 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 0x00000026); // VT_LPWSTR\r
-DEFINE_API_PKEY(PKEY_Device_Model, DeviceModel , 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 0x00000027); // VT_LPWSTR\r
-\r
-// Name: System.Device.BIOSVersion -- PKEY_Device_BIOSVersion\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR) Legacy code may treat this as VT_BSTR.\r
-// FormatID: EAEE7F1D-6A33-44D1-9441-5F46DEF23198, 9\r
-DEFINE_PROPERTYKEY(PKEY_Device_BIOSVersion, 0xEAEE7F1D, 0x6A33, 0x44D1, 0x94, 0x41, 0x5F, 0x46, 0xDE, 0xF2, 0x31, 0x98, 9);\r
-\r
-DEFINE_API_PKEY(PKEY_Write_Time, WriteTime , 0xf53b7e1c, 0x77e0, 0x4450, 0x8c, 0x5f, 0xa7, 0x6c, 0xc7, 0xfd, 0xe0, 0x58, 0x00000100); // VT_FILETIME\r
-\r
-#ifdef FD_XP\r
-DEFINE_API_PKEY(PKEY_Device_InstanceId, DeviceInstanceId , 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 0x00000100); // VT_LPWSTR\r
-#endif\r
-DEFINE_API_PKEY(PKEY_Device_Interface, DeviceInterface , 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 0x00000101); // VT_CLSID\r
-\r
-DEFINE_API_PKEY(PKEY_ExposedIIDs, ExposedIIDs , 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 0x00003002); // VT_VECTOR | VT_CLSID\r
-DEFINE_API_PKEY(PKEY_ExposedCLSIDs, ExposedCLSIDs , 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 0x00003003); // VT_VECTOR | VT_CLSID\r
-DEFINE_API_PKEY(PKEY_InstanceValidatorClsid,InstanceValidator , 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 0x00003004); // VT_CLSID\r
-\r
-// FMTID_WSD = {92506491-FF95-4724-A05A-5B81885A7C92}\r
-DEFINE_GUID(FMTID_WSD, 0x92506491, 0xFF95, 0x4724, 0xA0, 0x5A, 0x5B, 0x81, 0x88, 0x5A, 0x7C, 0x92);\r
-\r
-DEFINE_API_PKEY(PKEY_WSD_AddressURI, WSD_AddressURI, 0x92506491, 0xFF95, 0x4724, 0xA0, 0x5A, 0x5B, 0x81, 0x88, 0x5A, 0x7C, 0x92, 0x00001000); // VT_LPWSTR\r
-DEFINE_API_PKEY(PKEY_WSD_Types, WSD_Types, 0x92506491, 0xFF95, 0x4724, 0xA0, 0x5A, 0x5B, 0x81, 0x88, 0x5A, 0x7C, 0x92, 0x00001001); // VT_LPWSTR\r
-DEFINE_API_PKEY(PKEY_WSD_Scopes, WSD_Scopes, 0x92506491, 0xFF95, 0x4724, 0xA0, 0x5A, 0x5B, 0x81, 0x88, 0x5A, 0x7C, 0x92, 0x00001002); // VT_LPWSTR\r
-DEFINE_API_PKEY(PKEY_WSD_MetadataVersion, WSD_MetadataVersion, 0x92506491, 0xFF95, 0x4724, 0xA0, 0x5A, 0x5B, 0x81, 0x88, 0x5A, 0x7C, 0x92, 0x00001003); //VT_UI8\r
-DEFINE_API_PKEY(PKEY_WSD_AppSeqInstanceID, WSD_AppSeqInstanceID, 0x92506491, 0xFF95, 0x4724, 0xA0, 0x5A, 0x5B, 0x81, 0x88, 0x5A, 0x7C, 0x92, 0x00001004); // VT_UI8\r
-DEFINE_API_PKEY(PKEY_WSD_AppSeqSessionID, WSD_AppSeqSessionID, 0x92506491, 0xFF95, 0x4724, 0xA0, 0x5A, 0x5B, 0x81, 0x88, 0x5A, 0x7C, 0x92, 0x00001005); // VT_LPWSTR\r
-DEFINE_API_PKEY(PKEY_WSD_AppSeqMessageNumber, WSD_AppSeqMessageNumber, 0x92506491, 0xFF95, 0x4724, 0xA0, 0x5A, 0x5B, 0x81, 0x88, 0x5A, 0x7C, 0x92, 0x00001006); // VT_UI8\r
-DEFINE_API_PKEY(PKEY_WSD_XAddrs, WSD_XAddrs, 0x92506491, 0xFF95, 0x4724, 0xA0, 0x5A, 0x5B, 0x81, 0x88, 0x5A, 0x7C, 0x92, 0x00002000); // VT_LPWSTR or VT_VECTOR | VT_LPWSTR\r
-\r
-DEFINE_API_PKEY(PKEY_WSD_MetadataClean, WSD_MetadataClean, 0x92506491, 0xFF95, 0x4724, 0xA0, 0x5A, 0x5B, 0x81, 0x88, 0x5A, 0x7C, 0x92, 0x00000001); // VT_BOOL\r
-DEFINE_API_PKEY(PKEY_WSD_ServiceInfo, WSD_ServiceInfo, 0x92506491, 0xFF95, 0x4724, 0xA0, 0x5A, 0x5B, 0x81, 0x88, 0x5A, 0x7C, 0x92, 0x00000002); // VT_VECTOR|VT_VARIANT (variants are VT_UNKNOWN)\r
-\r
-DEFINE_API_PKEY(PKEY_PUBSVCS_TYPE, PUBSVCS_TYPE, 0xF1B88AD3, 0x109C, 0x4FD2, 0xBA, 0x3F, 0x53, 0x5A, 0x76, 0x5F, 0x82, 0xF4, 0x00005001); // VT_LPWSTR\r
-DEFINE_API_PKEY(PKEY_PUBSVCS_SCOPE, PUBSVCS_SCOPE, 0x2AE2B567, 0xEECB, 0x4A3E, 0xB7, 0x53, 0x54, 0xC7, 0x25, 0x49, 0x43, 0x66, 0x00005002); // VT_LPWSTR | VT_VECTOR\r
-DEFINE_API_PKEY(PKEY_PUBSVCS_METADATA, PUBSVCS_METADATA, 0x63C6D5B8, 0xF73A, 0x4ACA, 0x96, 0x7E, 0x0C, 0xC7, 0x87, 0xE0, 0xB5, 0x59, 0x00005003); // VT_LPWSTR\r
-DEFINE_API_PKEY(PKEY_PUBSVCS_METADATA_VERSION, PUBSVCS_METADATA_VERSION, 0xC0C96C15, 0x1823, 0x4E5B, 0x93, 0x48, 0xE8, 0x25, 0x19, 0x92, 0x3F, 0x04, 0x00005004); // VT_UI8\r
-DEFINE_API_PKEY(PKEY_PUBSVCS_NETWORK_PROFILES_ALLOWED, PUBSVCS_NETWORK_PROFILES_ALLOWED, 0x63C6D5B8, 0xF73A, 0x4ACA, 0x96, 0x7E, 0x0C, 0xC7, 0x87, 0xE0, 0xB5, 0x59, 0x00005005); // VT_VECTOR | VT_LPWSTR\r
-DEFINE_API_PKEY(PKEY_PUBSVCS_NETWORK_PROFILES_DENIED, PUBSVCS_NETWORK_PROFILES_DENIED, 0x63C6D5B8, 0xF73A, 0x4ACA, 0x96, 0x7E, 0x0C, 0xC7, 0x87, 0xE0, 0xB5, 0x59, 0x00005006); // VT_VECTOR | VT_LPWSTR\r
-DEFINE_API_PKEY(PKEY_PUBSVCS_NETWORK_PROFILES_DEFAULT, PUBSVCS_NETWORK_PROFILES_DEFAULT, 0x63C6D5B8, 0xF73A, 0x4ACA, 0x96, 0x7E, 0x0C, 0xC7, 0x87, 0xE0, 0xB5, 0x59, 0x00005007); // VT_BOOL\r
-\r
-// FMTID_PNPX = {656A3BB3-ECC0-43FD-8477-4AE0404A96CD}\r
-DEFINE_GUID(FMTID_PNPX, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD);\r
- // from Discovery messages\r
-DEFINE_PROPERTYKEY(PKEY_PNPX_GlobalIdentity, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00001000); // VT_LPWSTR\r
-DEFINE_PROPERTYKEY(PKEY_PNPX_Types, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00001001); // VT_LPWSTR | VT_VECTOR\r
-DEFINE_PROPERTYKEY(PKEY_PNPX_Scopes, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00001002); // VT_LPWSTR | VT_VECTOR\r
-DEFINE_PROPERTYKEY(PKEY_PNPX_XAddrs, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00001003); // VT_LPWSTR | VT_VECTOR\r
-DEFINE_PROPERTYKEY(PKEY_PNPX_MetadataVersion, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00001004); // VT_UI8\r
-DEFINE_PROPERTYKEY(PKEY_PNPX_ID, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00001005); // VT_LPWSTR\r
-DEFINE_PROPERTYKEY(PKEY_PNPX_RootProxy, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00001006); // VT_BOOL\r
-\r
- // for Directed Discovery\r
-DEFINE_PROPERTYKEY(PKEY_PNPX_RemoteAddress, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00001006); // VT_LPWSTR\r
-\r
- // from ThisModel metadata\r
-DEFINE_PROPERTYKEY(PKEY_PNPX_Manufacturer, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00002000); // VT_LPWSTR (localizable)\r
-DEFINE_PROPERTYKEY(PKEY_PNPX_ManufacturerUrl, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00002001); // VT_LPWSTR\r
-DEFINE_PROPERTYKEY(PKEY_PNPX_ModelName, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00002002); // VT_LPWSTR (localizable)\r
-DEFINE_PROPERTYKEY(PKEY_PNPX_ModelNumber, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00002003); // VT_LPWSTR\r
-DEFINE_PROPERTYKEY(PKEY_PNPX_ModelUrl, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00002004); // VT_LPWSTR\r
-DEFINE_PROPERTYKEY(PKEY_PNPX_Upc, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00002005); // VT_LPWSTR\r
-DEFINE_PROPERTYKEY(PKEY_PNPX_PresentationUrl, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00002006); // VT_LPWSTR\r
- // from ThisDevice metadata\r
-DEFINE_PROPERTYKEY(PKEY_PNPX_FriendlyName, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00003000); // VT_LPWSTR (localizable)\r
-DEFINE_PROPERTYKEY(PKEY_PNPX_FirmwareVersion, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00003001); // VT_LPWSTR\r
-DEFINE_PROPERTYKEY(PKEY_PNPX_SerialNumber, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00003002); // VT_LPWSTR\r
-DEFINE_PROPERTYKEY(PKEY_PNPX_DeviceCategory, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00003004); // VT_LPWSTR | VT_VECTOR\r
- // DeviceCategory values\r
-#define PNPX_DEVICECATEGORY_COMPUTER L"Computers"\r
-#define PNPX_DEVICECATEGORY_INPUTDEVICE L"Input"\r
-#define PNPX_DEVICECATEGORY_PRINTER L"Printers"\r
-#define PNPX_DEVICECATEGORY_SCANNER L"Scanners"\r
-#define PNPX_DEVICECATEGORY_FAX L"FAX"\r
-#define PNPX_DEVICECATEGORY_MFP L"MFP"\r
-#define PNPX_DEVICECATEGORY_CAMERA L"Cameras"\r
-#define PNPX_DEVICECATEGORY_STORAGE L"Storage"\r
-#define PNPX_DEVICECATEGORY_NETWORK_INFRASTRUCTURE L"NetworkInfrastructure"\r
-#define PNPX_DEVICECATEGORY_DISPLAYS L"Displays"\r
-#define PNPX_DEVICECATEGORY_MULTIMEDIA_DEVICE L"MediaDevices"\r
-#define PNPX_DEVICECATEGORY_GAMING_DEVICE L"Gaming"\r
-#define PNPX_DEVICECATEGORY_TELEPHONE L"Phones"\r
-#define PNPX_DEVICECATEGORY_HOME_AUTOMATION_SYSTEM L"HomeAutomation"\r
-#define PNPX_DEVICECATEGORY_HOME_SECURITY_SYSTEM L"HomeSecurity"\r
-#define PNPX_DEVICECATEGORY_OTHER L"Other"\r
-DEFINE_PROPERTYKEY(PKEY_PNPX_DeviceCategory_Desc, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00003005); // VT_LPWSTR | VT_VECTOR\r
-\r
-DEFINE_PROPERTYKEY(PKEY_PNPX_PhysicalAddress, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00003006); // VT_UI1 | VT_VECTOR\r
-DEFINE_PROPERTYKEY(PKEY_PNPX_NetworkInterfaceLuid, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00003007); // VT_UI8\r
-DEFINE_PROPERTYKEY(PKEY_PNPX_NetworkInterfaceGuid, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00003008); // VT_LPWSTR\r
-DEFINE_PROPERTYKEY(PKEY_PNPX_IpAddress, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00003009); // VT_LPWSTR | VT_VECTOR\r
- // from Relationship metadata\r
-DEFINE_PROPERTYKEY(PKEY_PNPX_ServiceAddress, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00004000); // VT_LPWSTR | VT_VECTOR\r
-DEFINE_PROPERTYKEY(PKEY_PNPX_ServiceId, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00004001); // VT_LPWSTR\r
-DEFINE_PROPERTYKEY(PKEY_PNPX_ServiceTypes, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00004002); // VT_LPWSTR | VT_VECTOR\r
- // Association DB PKEYs\r
-DEFINE_API_PKEY(PKEY_PNPX_Devnode, PnPXDevNode, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00000001); // VT_BOOL\r
-DEFINE_API_PKEY(PKEY_PNPX_AssociationState, AssociationState, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00000002); // VT_UINT\r
-DEFINE_API_PKEY(PKEY_PNPX_AssociatedInstanceId, AssociatedInstanceId, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00000003); // VT_LPWSTR\r
- // for Computer Discovery\r
-DEFINE_PROPERTYKEY(PKEY_PNPX_DomainName, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00005000); // VT_LPWSTR\r
-// Use PKEY_ComputerName (propkey.h) DEFINE_PROPERTYKEY(PKEY_PNPX_MachineName, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00005001); // VT_LPWSTR\r
-DEFINE_PROPERTYKEY(PKEY_PNPX_ShareName, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00005002); // VT_LPWSTR\r
-\r
- // SSDP Provider custom properties\r
-DEFINE_PROPERTYKEY(PKEY_SSDP_AltLocationInfo, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00006000); // VT_LPWSTR\r
-DEFINE_PROPERTYKEY(PKEY_SSDP_DevLifeTime, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00006001); // VT_UI4\r
-DEFINE_PROPERTYKEY(PKEY_SSDP_NetworkInterface, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00006002); // VT_BOOL\r
-\r
-// FMTID_PNPXDynamicProperty = {4FC5077E-B686-44BE-93E3-86CAFE368CCD}\r
-DEFINE_GUID(FMTID_PNPXDynamicProperty, 0x4FC5077E, 0xB686, 0x44BE, 0x93, 0xE3, 0x86, 0xCA, 0xFE, 0x36, 0x8C, 0xCD);\r
-\r
-DEFINE_PROPERTYKEY(PKEY_PNPX_Installable, 0x4FC5077E, 0xB686, 0x44BE, 0x93, 0xE3, 0x86, 0xCA, 0xFE, 0x36, 0x8C, 0xCD, 0x00000001); // VT_BOOL\r
-DEFINE_PROPERTYKEY(PKEY_PNPX_Associated, 0x4FC5077E, 0xB686, 0x44BE, 0x93, 0xE3, 0x86, 0xCA, 0xFE, 0x36, 0x8C, 0xCD, 0x00000002); // VT_BOOL\r
-// PKEY_PNPX_Installed to be deprecated in Longhorn Server timeframe\r
-// this PKEY really represents Associated state\r
-#define PKEY_PNPX_Installed PKEY_PNPX_Associated // Deprecated! Please use PKEY_PNPX_Associated\r
-DEFINE_PROPERTYKEY(PKEY_PNPX_CompatibleTypes, 0x4FC5077E, 0xB686, 0x44BE, 0x93, 0xE3, 0x86, 0xCA, 0xFE, 0x36, 0x8C, 0xCD, 0x00000003); // VT_LPWSTR | VT_VECTOR\r
-\r
- // WNET Provider properties\r
-DEFINE_PROPERTYKEY(PKEY_WNET_Scope, 0xdebda43a, 0x37b3, 0x4383, 0x91, 0xE7, 0x44, 0x98, 0xda, 0x29, 0x95, 0xab, 0x00000001); // VT_UINT\r
-DEFINE_PROPERTYKEY(PKEY_WNET_Type, 0xdebda43a, 0x37b3, 0x4383, 0x91, 0xE7, 0x44, 0x98, 0xda, 0x29, 0x95, 0xab, 0x00000002); // VT_UINT\r
-DEFINE_PROPERTYKEY(PKEY_WNET_DisplayType, 0xdebda43a, 0x37b3, 0x4383, 0x91, 0xE7, 0x44, 0x98, 0xda, 0x29, 0x95, 0xab, 0x00000003); // VT_UINT\r
-DEFINE_PROPERTYKEY(PKEY_WNET_Usage, 0xdebda43a, 0x37b3, 0x4383, 0x91, 0xE7, 0x44, 0x98, 0xda, 0x29, 0x95, 0xab, 0x00000004); // VT_UINT\r
-DEFINE_PROPERTYKEY(PKEY_WNET_LocalName, 0xdebda43a, 0x37b3, 0x4383, 0x91, 0xE7, 0x44, 0x98, 0xda, 0x29, 0x95, 0xab, 0x00000005); // VT_LPWSTR\r
-DEFINE_PROPERTYKEY(PKEY_WNET_RemoteName, 0xdebda43a, 0x37b3, 0x4383, 0x91, 0xE7, 0x44, 0x98, 0xda, 0x29, 0x95, 0xab, 0x00000006); // VT_LPWSTR\r
-DEFINE_PROPERTYKEY(PKEY_WNET_Comment, 0xdebda43a, 0x37b3, 0x4383, 0x91, 0xE7, 0x44, 0x98, 0xda, 0x29, 0x95, 0xab, 0x00000007); // VT_LPWSTR\r
-DEFINE_PROPERTYKEY(PKEY_WNET_Provider, 0xdebda43a, 0x37b3, 0x4383, 0x91, 0xE7, 0x44, 0x98, 0xda, 0x29, 0x95, 0xab, 0x00000008); // VT_LPWSTR\r
-\r
-\r
- // WCN Provider properties\r
-\r
-DEFINE_PROPERTYKEY(PKEY_WCN_Version, 0x88190b80, 0x4684, 0x11da, 0xa2, 0x6a, 0x00, 0x02, 0xb3, 0x98, 0x8e, 0x81, 0x00000001); // VT_UI1\r
-DEFINE_PROPERTYKEY(PKEY_WCN_RequestType, 0x88190b81, 0x4684, 0x11da, 0xa2, 0x6a, 0x00, 0x02, 0xb3, 0x98, 0x8e, 0x81, 0x00000002); // VT_INT\r
-DEFINE_PROPERTYKEY(PKEY_WCN_AuthType, 0x88190b82, 0x4684, 0x11da, 0xa2, 0x6a, 0x00, 0x02, 0xb3, 0x98, 0x8e, 0x81, 0x00000003); // VT_INT\r
-DEFINE_PROPERTYKEY(PKEY_WCN_EncryptType, 0x88190b83, 0x4684, 0x11da, 0xa2, 0x6a, 0x00, 0x02, 0xb3, 0x98, 0x8e, 0x81, 0x00000004); // VT_INT\r
-DEFINE_PROPERTYKEY(PKEY_WCN_ConnType, 0x88190b84, 0x4684, 0x11da, 0xa2, 0x6a, 0x00, 0x02, 0xb3, 0x98, 0x8e, 0x81, 0x00000005); // VT_INT\r
-DEFINE_PROPERTYKEY(PKEY_WCN_ConfigMethods, 0x88190b85, 0x4684, 0x11da, 0xa2, 0x6a, 0x00, 0x02, 0xb3, 0x98, 0x8e, 0x81, 0x00000006); // VT_INT\r
-// map WCN DeviceType to PKEY_PNPX_DeviceCategory\r
-//DEFINE_PROPERTYKEY(PKEY_WCN_DeviceType, 0x88190b86, 0x4684, 0x11da, 0xa2, 0x6a, 0x00, 0x02, 0xb3, 0x98, 0x8e, 0x81, 0x00000007); // VT_INT\r
-DEFINE_PROPERTYKEY(PKEY_WCN_RfBand, 0x88190b87, 0x4684, 0x11da, 0xa2, 0x6a, 0x00, 0x02, 0xb3, 0x98, 0x8e, 0x81, 0x00000008); // VT_INT\r
-DEFINE_PROPERTYKEY(PKEY_WCN_AssocState, 0x88190b88, 0x4684, 0x11da, 0xa2, 0x6a, 0x00, 0x02, 0xb3, 0x98, 0x8e, 0x81, 0x00000009); // VT_INT\r
-DEFINE_PROPERTYKEY(PKEY_WCN_ConfigError, 0x88190b89, 0x4684, 0x11da, 0xa2, 0x6a, 0x00, 0x02, 0xb3, 0x98, 0x8e, 0x81, 0x0000000a); // VT_INT\r
-DEFINE_PROPERTYKEY(PKEY_WCN_ConfigState, 0x88190b89, 0x4684, 0x11da, 0xa2, 0x6a, 0x00, 0x02, 0xb3, 0x98, 0x8e, 0x81, 0x0000000b); // VT_UI1\r
-DEFINE_PROPERTYKEY(PKEY_WCN_DevicePasswordId, 0x88190b89, 0x4684, 0x11da, 0xa2, 0x6a, 0x00, 0x02, 0xb3, 0x98, 0x8e, 0x81, 0x0000000c); // VT_INT\r
-DEFINE_PROPERTYKEY(PKEY_WCN_OSVersion, 0x88190b89, 0x4684, 0x11da, 0xa2, 0x6a, 0x00, 0x02, 0xb3, 0x98, 0x8e, 0x81, 0x0000000d); // VT_UINT\r
-DEFINE_PROPERTYKEY(PKEY_WCN_VendorExtension, 0x88190b8a, 0x4684, 0x11da, 0xa2, 0x6a, 0x00, 0x02, 0xb3, 0x98, 0x8e, 0x81, 0x0000000e); // VT_UI1 | VT_VECTOR\r
-DEFINE_PROPERTYKEY(PKEY_WCN_RegistrarType, 0x88190b8b, 0x4684, 0x11da, 0xa2, 0x6a, 0x00, 0x02, 0xb3, 0x98, 0x8e, 0x81, 0x0000000f); // VT_INT\r
-\r
-//-----------------------------------------------------------------------------\r
-// DriverPackage properties\r
-\r
-#define PKEY_DriverPackage_Model PKEY_DrvPkg_Model\r
-#define PKEY_DriverPackage_VendorWebSite PKEY_DrvPkg_VendorWebSite\r
-#define PKEY_DriverPackage_DetailedDescription PKEY_DrvPkg_DetailedDescription\r
-#define PKEY_DriverPackage_DocumentationLink PKEY_DrvPkg_DocumentationLink\r
-#define PKEY_DriverPackage_Icon PKEY_DrvPkg_Icon\r
-#define PKEY_DriverPackage_BrandingIcon PKEY_DrvPkg_BrandingIcon\r
-\r
-//-----------------------------------------------------------------------------\r
-// Hardware properties\r
-\r
-DEFINE_PROPERTYKEY(PKEY_Hardware_Devinst, 0x5EAF3EF2, 0xE0CA, 0x4598, 0xBF, 0x06, 0x71, 0xED, 0x1D, 0x9D, 0xD9, 0x53, 4097);\r
-\r
-// Name: System.Hardware.DisplayAttribute -- PKEY_Hardware_DisplayAttribute\r
-// Type: Unspecified -- VT_NULL\r
-// FormatID: 5EAF3EF2-E0CA-4598-BF06-71ED1D9DD953, 5\r
-DEFINE_PROPERTYKEY(PKEY_Hardware_DisplayAttribute, 0x5EAF3EF2, 0xE0CA, 0x4598, 0xBF, 0x06, 0x71, 0xED, 0x1D, 0x9D, 0xD9, 0x53, 5);\r
-\r
-// Name: System.Hardware.DriverDate -- PKEY_Hardware_DriverDate\r
-// Type: Unspecified -- VT_NULL\r
-// FormatID: 5EAF3EF2-E0CA-4598-BF06-71ED1D9DD953, 11\r
-DEFINE_PROPERTYKEY(PKEY_Hardware_DriverDate, 0x5EAF3EF2, 0xE0CA, 0x4598, 0xBF, 0x06, 0x71, 0xED, 0x1D, 0x9D, 0xD9, 0x53, 11);\r
-\r
-// Name: System.Hardware.DriverProvider -- PKEY_Hardware_DriverProvider\r
-// Type: Unspecified -- VT_NULL\r
-// FormatID: 5EAF3EF2-E0CA-4598-BF06-71ED1D9DD953, 10\r
-DEFINE_PROPERTYKEY(PKEY_Hardware_DriverProvider, 0x5EAF3EF2, 0xE0CA, 0x4598, 0xBF, 0x06, 0x71, 0xED, 0x1D, 0x9D, 0xD9, 0x53, 10);\r
-\r
-// Name: System.Hardware.DriverVersion -- PKEY_Hardware_DriverVersion\r
-// Type: Unspecified -- VT_NULL\r
-// FormatID: 5EAF3EF2-E0CA-4598-BF06-71ED1D9DD953, 9\r
-DEFINE_PROPERTYKEY(PKEY_Hardware_DriverVersion, 0x5EAF3EF2, 0xE0CA, 0x4598, 0xBF, 0x06, 0x71, 0xED, 0x1D, 0x9D, 0xD9, 0x53, 9);\r
-\r
-// Name: System.Hardware.Function -- PKEY_Hardware_Function\r
-// Type: Unspecified -- VT_NULL\r
-// FormatID: 5EAF3EF2-E0CA-4598-BF06-71ED1D9DD953, 4099\r
-DEFINE_PROPERTYKEY(PKEY_Hardware_Function, 0x5EAF3EF2, 0xE0CA, 0x4598, 0xBF, 0x06, 0x71, 0xED, 0x1D, 0x9D, 0xD9, 0x53, 4099);\r
-\r
-// Name: System.Hardware.Icon -- PKEY_Hardware_Icon\r
-// Type: Unspecified -- VT_NULL\r
-// FormatID: 5EAF3EF2-E0CA-4598-BF06-71ED1D9DD953, 3\r
-DEFINE_PROPERTYKEY(PKEY_Hardware_Icon, 0x5EAF3EF2, 0xE0CA, 0x4598, 0xBF, 0x06, 0x71, 0xED, 0x1D, 0x9D, 0xD9, 0x53, 3);\r
-\r
-// Name: System.Hardware.Image -- PKEY_Hardware_Image\r
-// Type: Unspecified -- VT_NULL\r
-// FormatID: 5EAF3EF2-E0CA-4598-BF06-71ED1D9DD953, 4098\r
-DEFINE_PROPERTYKEY(PKEY_Hardware_Image, 0x5EAF3EF2, 0xE0CA, 0x4598, 0xBF, 0x06, 0x71, 0xED, 0x1D, 0x9D, 0xD9, 0x53, 4098);\r
-\r
-// Name: System.Hardware.Manufacturer -- PKEY_Hardware_Manufacturer\r
-// Type: Unspecified -- VT_NULL\r
-// FormatID: 5EAF3EF2-E0CA-4598-BF06-71ED1D9DD953, 6\r
-DEFINE_PROPERTYKEY(PKEY_Hardware_Manufacturer, 0x5EAF3EF2, 0xE0CA, 0x4598, 0xBF, 0x06, 0x71, 0xED, 0x1D, 0x9D, 0xD9, 0x53, 6);\r
-\r
-// Name: System.Hardware.Model -- PKEY_Hardware_Model\r
-// Type: Unspecified -- VT_NULL\r
-// FormatID: 5EAF3EF2-E0CA-4598-BF06-71ED1D9DD953, 7\r
-DEFINE_PROPERTYKEY(PKEY_Hardware_Model, 0x5EAF3EF2, 0xE0CA, 0x4598, 0xBF, 0x06, 0x71, 0xED, 0x1D, 0x9D, 0xD9, 0x53, 7);\r
-\r
-// Name: System.Hardware.Name -- PKEY_Hardware_Name\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 5EAF3EF2-E0CA-4598-BF06-71ED1D9DD953, 2\r
-DEFINE_PROPERTYKEY(PKEY_Hardware_Name, 0x5EAF3EF2, 0xE0CA, 0x4598, 0xBF, 0x06, 0x71, 0xED, 0x1D, 0x9D, 0xD9, 0x53, 2);\r
-\r
-// Name: System.Hardware.SerialNumber -- PKEY_Hardware_SerialNumber\r
-// Type: Unspecified -- VT_NULL\r
-// FormatID: 5EAF3EF2-E0CA-4598-BF06-71ED1D9DD953, 8\r
-DEFINE_PROPERTYKEY(PKEY_Hardware_SerialNumber, 0x5EAF3EF2, 0xE0CA, 0x4598, 0xBF, 0x06, 0x71, 0xED, 0x1D, 0x9D, 0xD9, 0x53, 8);\r
-\r
-// Name: System.Hardware.ShellAttributes -- PKEY_Hardware_ShellAttributes\r
-// Type: Unspecified -- VT_NULL\r
-// FormatID: 5EAF3EF2-E0CA-4598-BF06-71ED1D9DD953, 4100\r
-DEFINE_PROPERTYKEY(PKEY_Hardware_ShellAttributes, 0x5EAF3EF2, 0xE0CA, 0x4598, 0xBF, 0x06, 0x71, 0xED, 0x1D, 0x9D, 0xD9, 0x53, 4100);\r
-\r
-// Name: System.Hardware.Status -- PKEY_Hardware_Status\r
-// Type: Unspecified -- VT_NULL\r
-// FormatID: 5EAF3EF2-E0CA-4598-BF06-71ED1D9DD953, 4096\r
-DEFINE_PROPERTYKEY(PKEY_Hardware_Status, 0x5EAF3EF2, 0xE0CA, 0x4598, 0xBF, 0x06, 0x71, 0xED, 0x1D, 0x9D, 0xD9, 0x53, 4096);\r
-\r
-\r
+#pragma once
+
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
+#ifndef DEFINE_API_PKEY
+#include <propkey.h>
+#endif
+
+#include <FunctionDiscoveryKeys_devpkey.h>
+
+// FMTID_FD = {904b03a2-471d-423c-a584-f3483238a146}
+DEFINE_GUID(FMTID_FD, 0x904b03a2, 0x471d, 0x423c, 0xa5, 0x84, 0xf3, 0x48, 0x32, 0x38, 0xa1, 0x46);
+DEFINE_API_PKEY(PKEY_FD_Visibility, VisibilityFlags, 0x904b03a2, 0x471d, 0x423c, 0xa5, 0x84, 0xf3, 0x48, 0x32, 0x38, 0xa1, 0x46, 0x00000001); // VT_UINT
+#define FD_Visibility_Default 0
+#define FD_Visibility_Hidden 1
+
+// FMTID_Device = {78C34FC8-104A-4aca-9EA4-524D52996E57}
+DEFINE_GUID(FMTID_Device, 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57);
+
+DEFINE_API_PKEY(PKEY_Device_NotPresent, DeviceNotPresent , 0x904b03a2, 0x471d, 0x423c, 0xa5, 0x84, 0xf3, 0x48, 0x32, 0x38, 0xa1, 0x46, 0x00000002); // VT_UINT
+DEFINE_API_PKEY(PKEY_Device_QueueSize, DeviceQueueSize , 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 0x00000024); // VT_UI4
+DEFINE_API_PKEY(PKEY_Device_Status, DeviceStatus , 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 0x00000025); // VT_LPWSTR
+DEFINE_API_PKEY(PKEY_Device_Comment, DeviceComment , 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 0x00000026); // VT_LPWSTR
+DEFINE_API_PKEY(PKEY_Device_Model, DeviceModel , 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 0x00000027); // VT_LPWSTR
+
+// Name: System.Device.BIOSVersion -- PKEY_Device_BIOSVersion
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR) Legacy code may treat this as VT_BSTR.
+// FormatID: EAEE7F1D-6A33-44D1-9441-5F46DEF23198, 9
+DEFINE_PROPERTYKEY(PKEY_Device_BIOSVersion, 0xEAEE7F1D, 0x6A33, 0x44D1, 0x94, 0x41, 0x5F, 0x46, 0xDE, 0xF2, 0x31, 0x98, 9);
+
+DEFINE_API_PKEY(PKEY_Write_Time, WriteTime , 0xf53b7e1c, 0x77e0, 0x4450, 0x8c, 0x5f, 0xa7, 0x6c, 0xc7, 0xfd, 0xe0, 0x58, 0x00000100); // VT_FILETIME
+
+#ifdef FD_XP
+DEFINE_API_PKEY(PKEY_Device_InstanceId, DeviceInstanceId , 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 0x00000100); // VT_LPWSTR
+#endif
+DEFINE_API_PKEY(PKEY_Device_Interface, DeviceInterface , 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 0x00000101); // VT_CLSID
+
+DEFINE_API_PKEY(PKEY_ExposedIIDs, ExposedIIDs , 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 0x00003002); // VT_VECTOR | VT_CLSID
+DEFINE_API_PKEY(PKEY_ExposedCLSIDs, ExposedCLSIDs , 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 0x00003003); // VT_VECTOR | VT_CLSID
+DEFINE_API_PKEY(PKEY_InstanceValidatorClsid,InstanceValidator , 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 0x00003004); // VT_CLSID
+
+// FMTID_WSD = {92506491-FF95-4724-A05A-5B81885A7C92}
+DEFINE_GUID(FMTID_WSD, 0x92506491, 0xFF95, 0x4724, 0xA0, 0x5A, 0x5B, 0x81, 0x88, 0x5A, 0x7C, 0x92);
+
+DEFINE_API_PKEY(PKEY_WSD_AddressURI, WSD_AddressURI, 0x92506491, 0xFF95, 0x4724, 0xA0, 0x5A, 0x5B, 0x81, 0x88, 0x5A, 0x7C, 0x92, 0x00001000); // VT_LPWSTR
+DEFINE_API_PKEY(PKEY_WSD_Types, WSD_Types, 0x92506491, 0xFF95, 0x4724, 0xA0, 0x5A, 0x5B, 0x81, 0x88, 0x5A, 0x7C, 0x92, 0x00001001); // VT_LPWSTR
+DEFINE_API_PKEY(PKEY_WSD_Scopes, WSD_Scopes, 0x92506491, 0xFF95, 0x4724, 0xA0, 0x5A, 0x5B, 0x81, 0x88, 0x5A, 0x7C, 0x92, 0x00001002); // VT_LPWSTR
+DEFINE_API_PKEY(PKEY_WSD_MetadataVersion, WSD_MetadataVersion, 0x92506491, 0xFF95, 0x4724, 0xA0, 0x5A, 0x5B, 0x81, 0x88, 0x5A, 0x7C, 0x92, 0x00001003); //VT_UI8
+DEFINE_API_PKEY(PKEY_WSD_AppSeqInstanceID, WSD_AppSeqInstanceID, 0x92506491, 0xFF95, 0x4724, 0xA0, 0x5A, 0x5B, 0x81, 0x88, 0x5A, 0x7C, 0x92, 0x00001004); // VT_UI8
+DEFINE_API_PKEY(PKEY_WSD_AppSeqSessionID, WSD_AppSeqSessionID, 0x92506491, 0xFF95, 0x4724, 0xA0, 0x5A, 0x5B, 0x81, 0x88, 0x5A, 0x7C, 0x92, 0x00001005); // VT_LPWSTR
+DEFINE_API_PKEY(PKEY_WSD_AppSeqMessageNumber, WSD_AppSeqMessageNumber, 0x92506491, 0xFF95, 0x4724, 0xA0, 0x5A, 0x5B, 0x81, 0x88, 0x5A, 0x7C, 0x92, 0x00001006); // VT_UI8
+DEFINE_API_PKEY(PKEY_WSD_XAddrs, WSD_XAddrs, 0x92506491, 0xFF95, 0x4724, 0xA0, 0x5A, 0x5B, 0x81, 0x88, 0x5A, 0x7C, 0x92, 0x00002000); // VT_LPWSTR or VT_VECTOR | VT_LPWSTR
+
+DEFINE_API_PKEY(PKEY_WSD_MetadataClean, WSD_MetadataClean, 0x92506491, 0xFF95, 0x4724, 0xA0, 0x5A, 0x5B, 0x81, 0x88, 0x5A, 0x7C, 0x92, 0x00000001); // VT_BOOL
+DEFINE_API_PKEY(PKEY_WSD_ServiceInfo, WSD_ServiceInfo, 0x92506491, 0xFF95, 0x4724, 0xA0, 0x5A, 0x5B, 0x81, 0x88, 0x5A, 0x7C, 0x92, 0x00000002); // VT_VECTOR|VT_VARIANT (variants are VT_UNKNOWN)
+
+DEFINE_API_PKEY(PKEY_PUBSVCS_TYPE, PUBSVCS_TYPE, 0xF1B88AD3, 0x109C, 0x4FD2, 0xBA, 0x3F, 0x53, 0x5A, 0x76, 0x5F, 0x82, 0xF4, 0x00005001); // VT_LPWSTR
+DEFINE_API_PKEY(PKEY_PUBSVCS_SCOPE, PUBSVCS_SCOPE, 0x2AE2B567, 0xEECB, 0x4A3E, 0xB7, 0x53, 0x54, 0xC7, 0x25, 0x49, 0x43, 0x66, 0x00005002); // VT_LPWSTR | VT_VECTOR
+DEFINE_API_PKEY(PKEY_PUBSVCS_METADATA, PUBSVCS_METADATA, 0x63C6D5B8, 0xF73A, 0x4ACA, 0x96, 0x7E, 0x0C, 0xC7, 0x87, 0xE0, 0xB5, 0x59, 0x00005003); // VT_LPWSTR
+DEFINE_API_PKEY(PKEY_PUBSVCS_METADATA_VERSION, PUBSVCS_METADATA_VERSION, 0xC0C96C15, 0x1823, 0x4E5B, 0x93, 0x48, 0xE8, 0x25, 0x19, 0x92, 0x3F, 0x04, 0x00005004); // VT_UI8
+DEFINE_API_PKEY(PKEY_PUBSVCS_NETWORK_PROFILES_ALLOWED, PUBSVCS_NETWORK_PROFILES_ALLOWED, 0x63C6D5B8, 0xF73A, 0x4ACA, 0x96, 0x7E, 0x0C, 0xC7, 0x87, 0xE0, 0xB5, 0x59, 0x00005005); // VT_VECTOR | VT_LPWSTR
+DEFINE_API_PKEY(PKEY_PUBSVCS_NETWORK_PROFILES_DENIED, PUBSVCS_NETWORK_PROFILES_DENIED, 0x63C6D5B8, 0xF73A, 0x4ACA, 0x96, 0x7E, 0x0C, 0xC7, 0x87, 0xE0, 0xB5, 0x59, 0x00005006); // VT_VECTOR | VT_LPWSTR
+DEFINE_API_PKEY(PKEY_PUBSVCS_NETWORK_PROFILES_DEFAULT, PUBSVCS_NETWORK_PROFILES_DEFAULT, 0x63C6D5B8, 0xF73A, 0x4ACA, 0x96, 0x7E, 0x0C, 0xC7, 0x87, 0xE0, 0xB5, 0x59, 0x00005007); // VT_BOOL
+
+// FMTID_PNPX = {656A3BB3-ECC0-43FD-8477-4AE0404A96CD}
+DEFINE_GUID(FMTID_PNPX, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD);
+ // from Discovery messages
+DEFINE_PROPERTYKEY(PKEY_PNPX_GlobalIdentity, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00001000); // VT_LPWSTR
+DEFINE_PROPERTYKEY(PKEY_PNPX_Types, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00001001); // VT_LPWSTR | VT_VECTOR
+DEFINE_PROPERTYKEY(PKEY_PNPX_Scopes, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00001002); // VT_LPWSTR | VT_VECTOR
+DEFINE_PROPERTYKEY(PKEY_PNPX_XAddrs, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00001003); // VT_LPWSTR | VT_VECTOR
+DEFINE_PROPERTYKEY(PKEY_PNPX_MetadataVersion, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00001004); // VT_UI8
+DEFINE_PROPERTYKEY(PKEY_PNPX_ID, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00001005); // VT_LPWSTR
+DEFINE_PROPERTYKEY(PKEY_PNPX_RootProxy, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00001006); // VT_BOOL
+
+ // for Directed Discovery
+DEFINE_PROPERTYKEY(PKEY_PNPX_RemoteAddress, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00001006); // VT_LPWSTR
+
+ // from ThisModel metadata
+DEFINE_PROPERTYKEY(PKEY_PNPX_Manufacturer, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00002000); // VT_LPWSTR (localizable)
+DEFINE_PROPERTYKEY(PKEY_PNPX_ManufacturerUrl, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00002001); // VT_LPWSTR
+DEFINE_PROPERTYKEY(PKEY_PNPX_ModelName, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00002002); // VT_LPWSTR (localizable)
+DEFINE_PROPERTYKEY(PKEY_PNPX_ModelNumber, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00002003); // VT_LPWSTR
+DEFINE_PROPERTYKEY(PKEY_PNPX_ModelUrl, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00002004); // VT_LPWSTR
+DEFINE_PROPERTYKEY(PKEY_PNPX_Upc, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00002005); // VT_LPWSTR
+DEFINE_PROPERTYKEY(PKEY_PNPX_PresentationUrl, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00002006); // VT_LPWSTR
+ // from ThisDevice metadata
+DEFINE_PROPERTYKEY(PKEY_PNPX_FriendlyName, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00003000); // VT_LPWSTR (localizable)
+DEFINE_PROPERTYKEY(PKEY_PNPX_FirmwareVersion, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00003001); // VT_LPWSTR
+DEFINE_PROPERTYKEY(PKEY_PNPX_SerialNumber, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00003002); // VT_LPWSTR
+DEFINE_PROPERTYKEY(PKEY_PNPX_DeviceCategory, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00003004); // VT_LPWSTR | VT_VECTOR
+ // DeviceCategory values
+#define PNPX_DEVICECATEGORY_COMPUTER L"Computers"
+#define PNPX_DEVICECATEGORY_INPUTDEVICE L"Input"
+#define PNPX_DEVICECATEGORY_PRINTER L"Printers"
+#define PNPX_DEVICECATEGORY_SCANNER L"Scanners"
+#define PNPX_DEVICECATEGORY_FAX L"FAX"
+#define PNPX_DEVICECATEGORY_MFP L"MFP"
+#define PNPX_DEVICECATEGORY_CAMERA L"Cameras"
+#define PNPX_DEVICECATEGORY_STORAGE L"Storage"
+#define PNPX_DEVICECATEGORY_NETWORK_INFRASTRUCTURE L"NetworkInfrastructure"
+#define PNPX_DEVICECATEGORY_DISPLAYS L"Displays"
+#define PNPX_DEVICECATEGORY_MULTIMEDIA_DEVICE L"MediaDevices"
+#define PNPX_DEVICECATEGORY_GAMING_DEVICE L"Gaming"
+#define PNPX_DEVICECATEGORY_TELEPHONE L"Phones"
+#define PNPX_DEVICECATEGORY_HOME_AUTOMATION_SYSTEM L"HomeAutomation"
+#define PNPX_DEVICECATEGORY_HOME_SECURITY_SYSTEM L"HomeSecurity"
+#define PNPX_DEVICECATEGORY_OTHER L"Other"
+DEFINE_PROPERTYKEY(PKEY_PNPX_DeviceCategory_Desc, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00003005); // VT_LPWSTR | VT_VECTOR
+
+DEFINE_PROPERTYKEY(PKEY_PNPX_PhysicalAddress, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00003006); // VT_UI1 | VT_VECTOR
+DEFINE_PROPERTYKEY(PKEY_PNPX_NetworkInterfaceLuid, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00003007); // VT_UI8
+DEFINE_PROPERTYKEY(PKEY_PNPX_NetworkInterfaceGuid, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00003008); // VT_LPWSTR
+DEFINE_PROPERTYKEY(PKEY_PNPX_IpAddress, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00003009); // VT_LPWSTR | VT_VECTOR
+ // from Relationship metadata
+DEFINE_PROPERTYKEY(PKEY_PNPX_ServiceAddress, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00004000); // VT_LPWSTR | VT_VECTOR
+DEFINE_PROPERTYKEY(PKEY_PNPX_ServiceId, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00004001); // VT_LPWSTR
+DEFINE_PROPERTYKEY(PKEY_PNPX_ServiceTypes, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00004002); // VT_LPWSTR | VT_VECTOR
+ // Association DB PKEYs
+DEFINE_API_PKEY(PKEY_PNPX_Devnode, PnPXDevNode, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00000001); // VT_BOOL
+DEFINE_API_PKEY(PKEY_PNPX_AssociationState, AssociationState, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00000002); // VT_UINT
+DEFINE_API_PKEY(PKEY_PNPX_AssociatedInstanceId, AssociatedInstanceId, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00000003); // VT_LPWSTR
+ // for Computer Discovery
+DEFINE_PROPERTYKEY(PKEY_PNPX_DomainName, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00005000); // VT_LPWSTR
+// Use PKEY_ComputerName (propkey.h) DEFINE_PROPERTYKEY(PKEY_PNPX_MachineName, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00005001); // VT_LPWSTR
+DEFINE_PROPERTYKEY(PKEY_PNPX_ShareName, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00005002); // VT_LPWSTR
+
+ // SSDP Provider custom properties
+DEFINE_PROPERTYKEY(PKEY_SSDP_AltLocationInfo, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00006000); // VT_LPWSTR
+DEFINE_PROPERTYKEY(PKEY_SSDP_DevLifeTime, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00006001); // VT_UI4
+DEFINE_PROPERTYKEY(PKEY_SSDP_NetworkInterface, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00006002); // VT_BOOL
+
+// FMTID_PNPXDynamicProperty = {4FC5077E-B686-44BE-93E3-86CAFE368CCD}
+DEFINE_GUID(FMTID_PNPXDynamicProperty, 0x4FC5077E, 0xB686, 0x44BE, 0x93, 0xE3, 0x86, 0xCA, 0xFE, 0x36, 0x8C, 0xCD);
+
+DEFINE_PROPERTYKEY(PKEY_PNPX_Installable, 0x4FC5077E, 0xB686, 0x44BE, 0x93, 0xE3, 0x86, 0xCA, 0xFE, 0x36, 0x8C, 0xCD, 0x00000001); // VT_BOOL
+DEFINE_PROPERTYKEY(PKEY_PNPX_Associated, 0x4FC5077E, 0xB686, 0x44BE, 0x93, 0xE3, 0x86, 0xCA, 0xFE, 0x36, 0x8C, 0xCD, 0x00000002); // VT_BOOL
+// PKEY_PNPX_Installed to be deprecated in Longhorn Server timeframe
+// this PKEY really represents Associated state
+#define PKEY_PNPX_Installed PKEY_PNPX_Associated // Deprecated! Please use PKEY_PNPX_Associated
+DEFINE_PROPERTYKEY(PKEY_PNPX_CompatibleTypes, 0x4FC5077E, 0xB686, 0x44BE, 0x93, 0xE3, 0x86, 0xCA, 0xFE, 0x36, 0x8C, 0xCD, 0x00000003); // VT_LPWSTR | VT_VECTOR
+
+ // WNET Provider properties
+DEFINE_PROPERTYKEY(PKEY_WNET_Scope, 0xdebda43a, 0x37b3, 0x4383, 0x91, 0xE7, 0x44, 0x98, 0xda, 0x29, 0x95, 0xab, 0x00000001); // VT_UINT
+DEFINE_PROPERTYKEY(PKEY_WNET_Type, 0xdebda43a, 0x37b3, 0x4383, 0x91, 0xE7, 0x44, 0x98, 0xda, 0x29, 0x95, 0xab, 0x00000002); // VT_UINT
+DEFINE_PROPERTYKEY(PKEY_WNET_DisplayType, 0xdebda43a, 0x37b3, 0x4383, 0x91, 0xE7, 0x44, 0x98, 0xda, 0x29, 0x95, 0xab, 0x00000003); // VT_UINT
+DEFINE_PROPERTYKEY(PKEY_WNET_Usage, 0xdebda43a, 0x37b3, 0x4383, 0x91, 0xE7, 0x44, 0x98, 0xda, 0x29, 0x95, 0xab, 0x00000004); // VT_UINT
+DEFINE_PROPERTYKEY(PKEY_WNET_LocalName, 0xdebda43a, 0x37b3, 0x4383, 0x91, 0xE7, 0x44, 0x98, 0xda, 0x29, 0x95, 0xab, 0x00000005); // VT_LPWSTR
+DEFINE_PROPERTYKEY(PKEY_WNET_RemoteName, 0xdebda43a, 0x37b3, 0x4383, 0x91, 0xE7, 0x44, 0x98, 0xda, 0x29, 0x95, 0xab, 0x00000006); // VT_LPWSTR
+DEFINE_PROPERTYKEY(PKEY_WNET_Comment, 0xdebda43a, 0x37b3, 0x4383, 0x91, 0xE7, 0x44, 0x98, 0xda, 0x29, 0x95, 0xab, 0x00000007); // VT_LPWSTR
+DEFINE_PROPERTYKEY(PKEY_WNET_Provider, 0xdebda43a, 0x37b3, 0x4383, 0x91, 0xE7, 0x44, 0x98, 0xda, 0x29, 0x95, 0xab, 0x00000008); // VT_LPWSTR
+
+
+ // WCN Provider properties
+
+DEFINE_PROPERTYKEY(PKEY_WCN_Version, 0x88190b80, 0x4684, 0x11da, 0xa2, 0x6a, 0x00, 0x02, 0xb3, 0x98, 0x8e, 0x81, 0x00000001); // VT_UI1
+DEFINE_PROPERTYKEY(PKEY_WCN_RequestType, 0x88190b81, 0x4684, 0x11da, 0xa2, 0x6a, 0x00, 0x02, 0xb3, 0x98, 0x8e, 0x81, 0x00000002); // VT_INT
+DEFINE_PROPERTYKEY(PKEY_WCN_AuthType, 0x88190b82, 0x4684, 0x11da, 0xa2, 0x6a, 0x00, 0x02, 0xb3, 0x98, 0x8e, 0x81, 0x00000003); // VT_INT
+DEFINE_PROPERTYKEY(PKEY_WCN_EncryptType, 0x88190b83, 0x4684, 0x11da, 0xa2, 0x6a, 0x00, 0x02, 0xb3, 0x98, 0x8e, 0x81, 0x00000004); // VT_INT
+DEFINE_PROPERTYKEY(PKEY_WCN_ConnType, 0x88190b84, 0x4684, 0x11da, 0xa2, 0x6a, 0x00, 0x02, 0xb3, 0x98, 0x8e, 0x81, 0x00000005); // VT_INT
+DEFINE_PROPERTYKEY(PKEY_WCN_ConfigMethods, 0x88190b85, 0x4684, 0x11da, 0xa2, 0x6a, 0x00, 0x02, 0xb3, 0x98, 0x8e, 0x81, 0x00000006); // VT_INT
+// map WCN DeviceType to PKEY_PNPX_DeviceCategory
+//DEFINE_PROPERTYKEY(PKEY_WCN_DeviceType, 0x88190b86, 0x4684, 0x11da, 0xa2, 0x6a, 0x00, 0x02, 0xb3, 0x98, 0x8e, 0x81, 0x00000007); // VT_INT
+DEFINE_PROPERTYKEY(PKEY_WCN_RfBand, 0x88190b87, 0x4684, 0x11da, 0xa2, 0x6a, 0x00, 0x02, 0xb3, 0x98, 0x8e, 0x81, 0x00000008); // VT_INT
+DEFINE_PROPERTYKEY(PKEY_WCN_AssocState, 0x88190b88, 0x4684, 0x11da, 0xa2, 0x6a, 0x00, 0x02, 0xb3, 0x98, 0x8e, 0x81, 0x00000009); // VT_INT
+DEFINE_PROPERTYKEY(PKEY_WCN_ConfigError, 0x88190b89, 0x4684, 0x11da, 0xa2, 0x6a, 0x00, 0x02, 0xb3, 0x98, 0x8e, 0x81, 0x0000000a); // VT_INT
+DEFINE_PROPERTYKEY(PKEY_WCN_ConfigState, 0x88190b89, 0x4684, 0x11da, 0xa2, 0x6a, 0x00, 0x02, 0xb3, 0x98, 0x8e, 0x81, 0x0000000b); // VT_UI1
+DEFINE_PROPERTYKEY(PKEY_WCN_DevicePasswordId, 0x88190b89, 0x4684, 0x11da, 0xa2, 0x6a, 0x00, 0x02, 0xb3, 0x98, 0x8e, 0x81, 0x0000000c); // VT_INT
+DEFINE_PROPERTYKEY(PKEY_WCN_OSVersion, 0x88190b89, 0x4684, 0x11da, 0xa2, 0x6a, 0x00, 0x02, 0xb3, 0x98, 0x8e, 0x81, 0x0000000d); // VT_UINT
+DEFINE_PROPERTYKEY(PKEY_WCN_VendorExtension, 0x88190b8a, 0x4684, 0x11da, 0xa2, 0x6a, 0x00, 0x02, 0xb3, 0x98, 0x8e, 0x81, 0x0000000e); // VT_UI1 | VT_VECTOR
+DEFINE_PROPERTYKEY(PKEY_WCN_RegistrarType, 0x88190b8b, 0x4684, 0x11da, 0xa2, 0x6a, 0x00, 0x02, 0xb3, 0x98, 0x8e, 0x81, 0x0000000f); // VT_INT
+
+//-----------------------------------------------------------------------------
+// DriverPackage properties
+
+#define PKEY_DriverPackage_Model PKEY_DrvPkg_Model
+#define PKEY_DriverPackage_VendorWebSite PKEY_DrvPkg_VendorWebSite
+#define PKEY_DriverPackage_DetailedDescription PKEY_DrvPkg_DetailedDescription
+#define PKEY_DriverPackage_DocumentationLink PKEY_DrvPkg_DocumentationLink
+#define PKEY_DriverPackage_Icon PKEY_DrvPkg_Icon
+#define PKEY_DriverPackage_BrandingIcon PKEY_DrvPkg_BrandingIcon
+
+//-----------------------------------------------------------------------------
+// Hardware properties
+
+DEFINE_PROPERTYKEY(PKEY_Hardware_Devinst, 0x5EAF3EF2, 0xE0CA, 0x4598, 0xBF, 0x06, 0x71, 0xED, 0x1D, 0x9D, 0xD9, 0x53, 4097);
+
+// Name: System.Hardware.DisplayAttribute -- PKEY_Hardware_DisplayAttribute
+// Type: Unspecified -- VT_NULL
+// FormatID: 5EAF3EF2-E0CA-4598-BF06-71ED1D9DD953, 5
+DEFINE_PROPERTYKEY(PKEY_Hardware_DisplayAttribute, 0x5EAF3EF2, 0xE0CA, 0x4598, 0xBF, 0x06, 0x71, 0xED, 0x1D, 0x9D, 0xD9, 0x53, 5);
+
+// Name: System.Hardware.DriverDate -- PKEY_Hardware_DriverDate
+// Type: Unspecified -- VT_NULL
+// FormatID: 5EAF3EF2-E0CA-4598-BF06-71ED1D9DD953, 11
+DEFINE_PROPERTYKEY(PKEY_Hardware_DriverDate, 0x5EAF3EF2, 0xE0CA, 0x4598, 0xBF, 0x06, 0x71, 0xED, 0x1D, 0x9D, 0xD9, 0x53, 11);
+
+// Name: System.Hardware.DriverProvider -- PKEY_Hardware_DriverProvider
+// Type: Unspecified -- VT_NULL
+// FormatID: 5EAF3EF2-E0CA-4598-BF06-71ED1D9DD953, 10
+DEFINE_PROPERTYKEY(PKEY_Hardware_DriverProvider, 0x5EAF3EF2, 0xE0CA, 0x4598, 0xBF, 0x06, 0x71, 0xED, 0x1D, 0x9D, 0xD9, 0x53, 10);
+
+// Name: System.Hardware.DriverVersion -- PKEY_Hardware_DriverVersion
+// Type: Unspecified -- VT_NULL
+// FormatID: 5EAF3EF2-E0CA-4598-BF06-71ED1D9DD953, 9
+DEFINE_PROPERTYKEY(PKEY_Hardware_DriverVersion, 0x5EAF3EF2, 0xE0CA, 0x4598, 0xBF, 0x06, 0x71, 0xED, 0x1D, 0x9D, 0xD9, 0x53, 9);
+
+// Name: System.Hardware.Function -- PKEY_Hardware_Function
+// Type: Unspecified -- VT_NULL
+// FormatID: 5EAF3EF2-E0CA-4598-BF06-71ED1D9DD953, 4099
+DEFINE_PROPERTYKEY(PKEY_Hardware_Function, 0x5EAF3EF2, 0xE0CA, 0x4598, 0xBF, 0x06, 0x71, 0xED, 0x1D, 0x9D, 0xD9, 0x53, 4099);
+
+// Name: System.Hardware.Icon -- PKEY_Hardware_Icon
+// Type: Unspecified -- VT_NULL
+// FormatID: 5EAF3EF2-E0CA-4598-BF06-71ED1D9DD953, 3
+DEFINE_PROPERTYKEY(PKEY_Hardware_Icon, 0x5EAF3EF2, 0xE0CA, 0x4598, 0xBF, 0x06, 0x71, 0xED, 0x1D, 0x9D, 0xD9, 0x53, 3);
+
+// Name: System.Hardware.Image -- PKEY_Hardware_Image
+// Type: Unspecified -- VT_NULL
+// FormatID: 5EAF3EF2-E0CA-4598-BF06-71ED1D9DD953, 4098
+DEFINE_PROPERTYKEY(PKEY_Hardware_Image, 0x5EAF3EF2, 0xE0CA, 0x4598, 0xBF, 0x06, 0x71, 0xED, 0x1D, 0x9D, 0xD9, 0x53, 4098);
+
+// Name: System.Hardware.Manufacturer -- PKEY_Hardware_Manufacturer
+// Type: Unspecified -- VT_NULL
+// FormatID: 5EAF3EF2-E0CA-4598-BF06-71ED1D9DD953, 6
+DEFINE_PROPERTYKEY(PKEY_Hardware_Manufacturer, 0x5EAF3EF2, 0xE0CA, 0x4598, 0xBF, 0x06, 0x71, 0xED, 0x1D, 0x9D, 0xD9, 0x53, 6);
+
+// Name: System.Hardware.Model -- PKEY_Hardware_Model
+// Type: Unspecified -- VT_NULL
+// FormatID: 5EAF3EF2-E0CA-4598-BF06-71ED1D9DD953, 7
+DEFINE_PROPERTYKEY(PKEY_Hardware_Model, 0x5EAF3EF2, 0xE0CA, 0x4598, 0xBF, 0x06, 0x71, 0xED, 0x1D, 0x9D, 0xD9, 0x53, 7);
+
+// Name: System.Hardware.Name -- PKEY_Hardware_Name
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 5EAF3EF2-E0CA-4598-BF06-71ED1D9DD953, 2
+DEFINE_PROPERTYKEY(PKEY_Hardware_Name, 0x5EAF3EF2, 0xE0CA, 0x4598, 0xBF, 0x06, 0x71, 0xED, 0x1D, 0x9D, 0xD9, 0x53, 2);
+
+// Name: System.Hardware.SerialNumber -- PKEY_Hardware_SerialNumber
+// Type: Unspecified -- VT_NULL
+// FormatID: 5EAF3EF2-E0CA-4598-BF06-71ED1D9DD953, 8
+DEFINE_PROPERTYKEY(PKEY_Hardware_SerialNumber, 0x5EAF3EF2, 0xE0CA, 0x4598, 0xBF, 0x06, 0x71, 0xED, 0x1D, 0x9D, 0xD9, 0x53, 8);
+
+// Name: System.Hardware.ShellAttributes -- PKEY_Hardware_ShellAttributes
+// Type: Unspecified -- VT_NULL
+// FormatID: 5EAF3EF2-E0CA-4598-BF06-71ED1D9DD953, 4100
+DEFINE_PROPERTYKEY(PKEY_Hardware_ShellAttributes, 0x5EAF3EF2, 0xE0CA, 0x4598, 0xBF, 0x06, 0x71, 0xED, 0x1D, 0x9D, 0xD9, 0x53, 4100);
+
+// Name: System.Hardware.Status -- PKEY_Hardware_Status
+// Type: Unspecified -- VT_NULL
+// FormatID: 5EAF3EF2-E0CA-4598-BF06-71ED1D9DD953, 4096
+DEFINE_PROPERTYKEY(PKEY_Hardware_Status, 0x5EAF3EF2, 0xE0CA, 0x4598, 0xBF, 0x06, 0x71, 0xED, 0x1D, 0x9D, 0xD9, 0x53, 4096);
+
+
DEFINE_GUIDSTRUCT("6994AD05-93EF-11D0-A3CC-00A0C9223196",KSCATEGORY_VIDEO);
#define KSCATEGORY_VIDEO DEFINE_GUIDNAMED(KSCATEGORY_VIDEO)
-/* Added for Vista and later */\r
-#define STATIC_KSCATEGORY_REALTIME \\r
- 0xEB115FFCL, 0x10C8, 0x4964, 0x83, 0x1D, 0x6D, 0xCB, 0x02, 0xE6, 0xF2, 0x3F\r
-DEFINE_GUIDSTRUCT("EB115FFC-10C8-4964-831D-6DCB02E6F23F", KSCATEGORY_REALTIME);\r
-#define KSCATEGORY_REALTIME DEFINE_GUIDNAMED(KSCATEGORY_REALTIME)\r
+/* Added for Vista and later */
+#define STATIC_KSCATEGORY_REALTIME \
+ 0xEB115FFCL, 0x10C8, 0x4964, 0x83, 0x1D, 0x6D, 0xCB, 0x02, 0xE6, 0xF2, 0x3F
+DEFINE_GUIDSTRUCT("EB115FFC-10C8-4964-831D-6DCB02E6F23F", KSCATEGORY_REALTIME);
+#define KSCATEGORY_REALTIME DEFINE_GUIDNAMED(KSCATEGORY_REALTIME)
#define STATIC_KSCATEGORY_TEXT \
0x6994AD06L,0x93EF,0x11D0,0xA3,0xCC,0x00,0xA0,0xC9,0x22,0x31,0x96
-\r
-\r
-/* this ALWAYS GENERATED file contains the definitions for the interfaces */\r
-\r
-\r
- /* File created by MIDL compiler version 7.00.0499 */\r
-/* Compiler settings for mmdeviceapi.idl:\r
- Oicf, W1, Zp8, env=Win32 (32b run)\r
- protocol : dce , ms_ext, c_ext, robust\r
- error checks: allocation ref bounds_check enum stub_data \r
- VC __declspec() decoration level: \r
- __declspec(uuid()), __declspec(selectany), __declspec(novtable)\r
- DECLSPEC_UUID(), MIDL_INTERFACE()\r
-*/\r
-//@@MIDL_FILE_HEADING( )\r
-\r
-#pragma warning( disable: 4049 ) /* more than 64k source lines */\r
-\r
-\r
-/* verify that the <rpcndr.h> version is high enough to compile this file*/\r
-#ifndef __REQUIRED_RPCNDR_H_VERSION__\r
-#define __REQUIRED_RPCNDR_H_VERSION__ 500\r
-#endif\r
-\r
-/* verify that the <rpcsal.h> version is high enough to compile this file*/\r
-#ifndef __REQUIRED_RPCSAL_H_VERSION__\r
-#define __REQUIRED_RPCSAL_H_VERSION__ 100\r
-#endif\r
-\r
-#include "rpc.h"\r
-#include "rpcndr.h"\r
-\r
-#ifndef __RPCNDR_H_VERSION__\r
-#error this stub requires an updated version of <rpcndr.h>\r
-#endif // __RPCNDR_H_VERSION__\r
-\r
-#ifndef COM_NO_WINDOWS_H\r
-#include "windows.h"\r
-#include "ole2.h"\r
-#endif /*COM_NO_WINDOWS_H*/\r
-\r
-#ifndef __mmdeviceapi_h__\r
-#define __mmdeviceapi_h__\r
-\r
-#if __GNUC__ >=3\r
-#pragma GCC system_header\r
-#endif\r
-\r
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)\r
-#pragma once\r
-#endif\r
-\r
-/* Forward Declarations */ \r
-\r
-#ifndef __IMMNotificationClient_FWD_DEFINED__\r
-#define __IMMNotificationClient_FWD_DEFINED__\r
-typedef interface IMMNotificationClient IMMNotificationClient;\r
-#endif /* __IMMNotificationClient_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __IMMDevice_FWD_DEFINED__\r
-#define __IMMDevice_FWD_DEFINED__\r
-typedef interface IMMDevice IMMDevice;\r
-#endif /* __IMMDevice_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __IMMDeviceCollection_FWD_DEFINED__\r
-#define __IMMDeviceCollection_FWD_DEFINED__\r
-typedef interface IMMDeviceCollection IMMDeviceCollection;\r
-#endif /* __IMMDeviceCollection_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __IMMEndpoint_FWD_DEFINED__\r
-#define __IMMEndpoint_FWD_DEFINED__\r
-typedef interface IMMEndpoint IMMEndpoint;\r
-#endif /* __IMMEndpoint_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __IMMDeviceEnumerator_FWD_DEFINED__\r
-#define __IMMDeviceEnumerator_FWD_DEFINED__\r
-typedef interface IMMDeviceEnumerator IMMDeviceEnumerator;\r
-#endif /* __IMMDeviceEnumerator_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __IMMDeviceActivator_FWD_DEFINED__\r
-#define __IMMDeviceActivator_FWD_DEFINED__\r
-typedef interface IMMDeviceActivator IMMDeviceActivator;\r
-#endif /* __IMMDeviceActivator_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __MMDeviceEnumerator_FWD_DEFINED__\r
-#define __MMDeviceEnumerator_FWD_DEFINED__\r
-\r
-#ifdef __cplusplus\r
-typedef class MMDeviceEnumerator MMDeviceEnumerator;\r
-#else\r
-typedef struct MMDeviceEnumerator MMDeviceEnumerator;\r
-#endif /* __cplusplus */\r
-\r
-#endif /* __MMDeviceEnumerator_FWD_DEFINED__ */\r
-\r
-\r
-/* header files for imported files */\r
-#include "unknwn.h"\r
-#include "propsys.h"\r
-\r
-#ifdef __cplusplus\r
-extern "C"{\r
-#endif \r
-\r
-\r
-/* interface __MIDL_itf_mmdeviceapi_0000_0000 */\r
-/* [local] */ \r
-\r
-#define E_NOTFOUND HRESULT_FROM_WIN32(ERROR_NOT_FOUND)\r
-#define E_UNSUPPORTED_TYPE HRESULT_FROM_WIN32(ERROR_UNSUPPORTED_TYPE)\r
-#define DEVICE_STATE_ACTIVE 0x00000001\r
-#define DEVICE_STATE_DISABLED 0x00000002\r
-#define DEVICE_STATE_NOTPRESENT 0x00000004\r
-#define DEVICE_STATE_UNPLUGGED 0x00000008\r
-#define DEVICE_STATEMASK_ALL 0x0000000f\r
-#ifdef DEFINE_PROPERTYKEY\r
-#undef DEFINE_PROPERTYKEY\r
-#endif\r
-#ifdef INITGUID\r
-#define DEFINE_PROPERTYKEY(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8, pid) EXTERN_C const PROPERTYKEY name = { { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }, pid }\r
-#else\r
-#define DEFINE_PROPERTYKEY(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8, pid) EXTERN_C const PROPERTYKEY name\r
-#endif // INITGUID\r
-DEFINE_PROPERTYKEY(PKEY_AudioEndpoint_FormFactor, 0x1da5d803, 0xd492, 0x4edd, 0x8c, 0x23, 0xe0, 0xc0, 0xff, 0xee, 0x7f, 0x0e, 0); \r
-DEFINE_PROPERTYKEY(PKEY_AudioEndpoint_ControlPanelPageProvider, 0x1da5d803, 0xd492, 0x4edd, 0x8c, 0x23, 0xe0, 0xc0, 0xff, 0xee, 0x7f, 0x0e, 1); \r
-DEFINE_PROPERTYKEY(PKEY_AudioEndpoint_Association, 0x1da5d803, 0xd492, 0x4edd, 0x8c, 0x23, 0xe0, 0xc0, 0xff, 0xee, 0x7f, 0x0e, 2);\r
-DEFINE_PROPERTYKEY(PKEY_AudioEndpoint_PhysicalSpeakers, 0x1da5d803, 0xd492, 0x4edd, 0x8c, 0x23, 0xe0, 0xc0, 0xff, 0xee, 0x7f, 0x0e, 3);\r
-DEFINE_PROPERTYKEY(PKEY_AudioEndpoint_GUID, 0x1da5d803, 0xd492, 0x4edd, 0x8c, 0x23, 0xe0, 0xc0, 0xff, 0xee, 0x7f, 0x0e, 4);\r
-DEFINE_PROPERTYKEY(PKEY_AudioEndpoint_Disable_SysFx, 0x1da5d803, 0xd492, 0x4edd, 0x8c, 0x23, 0xe0, 0xc0, 0xff, 0xee, 0x7f, 0x0e, 5);\r
-#define ENDPOINT_SYSFX_ENABLED 0x00000000 // System Effects are enabled.\r
-#define ENDPOINT_SYSFX_DISABLED 0x00000001 // System Effects are disabled.\r
-DEFINE_PROPERTYKEY(PKEY_AudioEndpoint_FullRangeSpeakers, 0x1da5d803, 0xd492, 0x4edd, 0x8c, 0x23, 0xe0, 0xc0, 0xff, 0xee, 0x7f, 0x0e, 6);\r
-DEFINE_PROPERTYKEY(PKEY_AudioEngine_DeviceFormat, 0xf19f064d, 0x82c, 0x4e27, 0xbc, 0x73, 0x68, 0x82, 0xa1, 0xbb, 0x8e, 0x4c, 0); \r
-typedef struct tagDIRECTX_AUDIO_ACTIVATION_PARAMS\r
- {\r
- DWORD cbDirectXAudioActivationParams;\r
- GUID guidAudioSession;\r
- DWORD dwAudioStreamFlags;\r
- } DIRECTX_AUDIO_ACTIVATION_PARAMS;\r
-\r
-typedef struct tagDIRECTX_AUDIO_ACTIVATION_PARAMS *PDIRECTX_AUDIO_ACTIVATION_PARAMS;\r
-\r
-typedef /* [public][public][public][public][public] */ \r
-enum __MIDL___MIDL_itf_mmdeviceapi_0000_0000_0001\r
- { eRender = 0,\r
- eCapture = ( eRender + 1 ) ,\r
- eAll = ( eCapture + 1 ) ,\r
- EDataFlow_enum_count = ( eAll + 1 ) \r
- } EDataFlow;\r
-\r
-typedef /* [public][public][public] */ \r
-enum __MIDL___MIDL_itf_mmdeviceapi_0000_0000_0002\r
- { eConsole = 0,\r
- eMultimedia = ( eConsole + 1 ) ,\r
- eCommunications = ( eMultimedia + 1 ) ,\r
- ERole_enum_count = ( eCommunications + 1 ) \r
- } ERole;\r
-\r
-typedef /* [public] */ \r
-enum __MIDL___MIDL_itf_mmdeviceapi_0000_0000_0003\r
- { RemoteNetworkDevice = 0,\r
- Speakers = ( RemoteNetworkDevice + 1 ) ,\r
- LineLevel = ( Speakers + 1 ) ,\r
- Headphones = ( LineLevel + 1 ) ,\r
- Microphone = ( Headphones + 1 ) ,\r
- Headset = ( Microphone + 1 ) ,\r
- Handset = ( Headset + 1 ) ,\r
- UnknownDigitalPassthrough = ( Handset + 1 ) ,\r
- SPDIF = ( UnknownDigitalPassthrough + 1 ) ,\r
- HDMI = ( SPDIF + 1 ) ,\r
- UnknownFormFactor = ( HDMI + 1 ) \r
- } EndpointFormFactor;\r
-\r
-\r
-\r
-extern RPC_IF_HANDLE __MIDL_itf_mmdeviceapi_0000_0000_v0_0_c_ifspec;\r
-extern RPC_IF_HANDLE __MIDL_itf_mmdeviceapi_0000_0000_v0_0_s_ifspec;\r
-\r
-#ifndef __IMMNotificationClient_INTERFACE_DEFINED__\r
-#define __IMMNotificationClient_INTERFACE_DEFINED__\r
-\r
-/* interface IMMNotificationClient */\r
-/* [unique][helpstring][nonextensible][uuid][local][object] */ \r
-\r
-\r
-EXTERN_C const IID IID_IMMNotificationClient;\r
-\r
-#if defined(__cplusplus) && !defined(CINTERFACE)\r
- \r
- MIDL_INTERFACE("7991EEC9-7E89-4D85-8390-6C703CEC60C0")\r
- IMMNotificationClient : public IUnknown\r
- {\r
- public:\r
- virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE OnDeviceStateChanged( \r
- /* [in] */ \r
- __in LPCWSTR pwstrDeviceId,\r
- /* [in] */ \r
- __in DWORD dwNewState) = 0;\r
- \r
- virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE OnDeviceAdded( \r
- /* [in] */ \r
- __in LPCWSTR pwstrDeviceId) = 0;\r
- \r
- virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE OnDeviceRemoved( \r
- /* [in] */ \r
- __in LPCWSTR pwstrDeviceId) = 0;\r
- \r
- virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE OnDefaultDeviceChanged( \r
- /* [in] */ \r
- __in EDataFlow flow,\r
- /* [in] */ \r
- __in ERole role,\r
- /* [in] */ \r
- __in LPCWSTR pwstrDefaultDeviceId) = 0;\r
- \r
- virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE OnPropertyValueChanged( \r
- /* [in] */ \r
- __in LPCWSTR pwstrDeviceId,\r
- /* [in] */ \r
- __in const PROPERTYKEY key) = 0;\r
- \r
- };\r
- \r
-#else /* C style interface */\r
-\r
- typedef struct IMMNotificationClientVtbl\r
- {\r
- BEGIN_INTERFACE\r
- \r
- HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r
- IMMNotificationClient * This,\r
- /* [in] */ REFIID riid,\r
- /* [iid_is][out] */ \r
- __RPC__deref_out void **ppvObject);\r
- \r
- ULONG ( STDMETHODCALLTYPE *AddRef )( \r
- IMMNotificationClient * This);\r
- \r
- ULONG ( STDMETHODCALLTYPE *Release )( \r
- IMMNotificationClient * This);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *OnDeviceStateChanged )( \r
- IMMNotificationClient * This,\r
- /* [in] */ \r
- __in LPCWSTR pwstrDeviceId,\r
- /* [in] */ \r
- __in DWORD dwNewState);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *OnDeviceAdded )( \r
- IMMNotificationClient * This,\r
- /* [in] */ \r
- __in LPCWSTR pwstrDeviceId);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *OnDeviceRemoved )( \r
- IMMNotificationClient * This,\r
- /* [in] */ \r
- __in LPCWSTR pwstrDeviceId);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *OnDefaultDeviceChanged )( \r
- IMMNotificationClient * This,\r
- /* [in] */ \r
- __in EDataFlow flow,\r
- /* [in] */ \r
- __in ERole role,\r
- /* [in] */ \r
- __in LPCWSTR pwstrDefaultDeviceId);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *OnPropertyValueChanged )( \r
- IMMNotificationClient * This,\r
- /* [in] */ \r
- __in LPCWSTR pwstrDeviceId,\r
- /* [in] */ \r
- __in const PROPERTYKEY key);\r
- \r
- END_INTERFACE\r
- } IMMNotificationClientVtbl;\r
-\r
- interface IMMNotificationClient\r
- {\r
- CONST_VTBL struct IMMNotificationClientVtbl *lpVtbl;\r
- };\r
-\r
- \r
-\r
-#ifdef COBJMACROS\r
-\r
-\r
-#define IMMNotificationClient_QueryInterface(This,riid,ppvObject) \\r
- ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r
-\r
-#define IMMNotificationClient_AddRef(This) \\r
- ( (This)->lpVtbl -> AddRef(This) ) \r
-\r
-#define IMMNotificationClient_Release(This) \\r
- ( (This)->lpVtbl -> Release(This) ) \r
-\r
-\r
-#define IMMNotificationClient_OnDeviceStateChanged(This,pwstrDeviceId,dwNewState) \\r
- ( (This)->lpVtbl -> OnDeviceStateChanged(This,pwstrDeviceId,dwNewState) ) \r
-\r
-#define IMMNotificationClient_OnDeviceAdded(This,pwstrDeviceId) \\r
- ( (This)->lpVtbl -> OnDeviceAdded(This,pwstrDeviceId) ) \r
-\r
-#define IMMNotificationClient_OnDeviceRemoved(This,pwstrDeviceId) \\r
- ( (This)->lpVtbl -> OnDeviceRemoved(This,pwstrDeviceId) ) \r
-\r
-#define IMMNotificationClient_OnDefaultDeviceChanged(This,flow,role,pwstrDefaultDeviceId) \\r
- ( (This)->lpVtbl -> OnDefaultDeviceChanged(This,flow,role,pwstrDefaultDeviceId) ) \r
-\r
-#define IMMNotificationClient_OnPropertyValueChanged(This,pwstrDeviceId,key) \\r
- ( (This)->lpVtbl -> OnPropertyValueChanged(This,pwstrDeviceId,key) ) \r
-\r
-#endif /* COBJMACROS */\r
-\r
-\r
-#endif /* C style interface */\r
-\r
-\r
-\r
-\r
-#endif /* __IMMNotificationClient_INTERFACE_DEFINED__ */\r
-\r
-\r
-#ifndef __IMMDevice_INTERFACE_DEFINED__\r
-#define __IMMDevice_INTERFACE_DEFINED__\r
-\r
-/* interface IMMDevice */\r
-/* [unique][helpstring][nonextensible][uuid][local][object] */ \r
-\r
-\r
-EXTERN_C const IID IID_IMMDevice;\r
-\r
-#if defined(__cplusplus) && !defined(CINTERFACE)\r
- \r
- MIDL_INTERFACE("D666063F-1587-4E43-81F1-B948E807363F")\r
- IMMDevice : public IUnknown\r
- {\r
- public:\r
- virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE Activate( \r
- /* [in] */ \r
- __in REFIID iid,\r
- /* [in] */ \r
- __in DWORD dwClsCtx,\r
- /* [unique][in] */ \r
- __in_opt PROPVARIANT *pActivationParams,\r
- /* [iid_is][out] */ \r
- __out void **ppInterface) = 0;\r
- \r
- virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE OpenPropertyStore( \r
- /* [in] */ \r
- __in DWORD stgmAccess,\r
- /* [out] */ \r
- __out IPropertyStore **ppProperties) = 0;\r
- \r
- virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetId( \r
- /* [out] */ \r
- __deref_out LPWSTR *ppstrId) = 0;\r
- \r
- virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetState( \r
- /* [out] */ \r
- __out DWORD *pdwState) = 0;\r
- \r
- };\r
- \r
-#else /* C style interface */\r
-\r
- typedef struct IMMDeviceVtbl\r
- {\r
- BEGIN_INTERFACE\r
- \r
- HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r
- IMMDevice * This,\r
- /* [in] */ REFIID riid,\r
- /* [iid_is][out] */ \r
- __RPC__deref_out void **ppvObject);\r
- \r
- ULONG ( STDMETHODCALLTYPE *AddRef )( \r
- IMMDevice * This);\r
- \r
- ULONG ( STDMETHODCALLTYPE *Release )( \r
- IMMDevice * This);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *Activate )( \r
- IMMDevice * This,\r
- /* [in] */ \r
- __in REFIID iid,\r
- /* [in] */ \r
- __in DWORD dwClsCtx,\r
- /* [unique][in] */ \r
- __in_opt PROPVARIANT *pActivationParams,\r
- /* [iid_is][out] */ \r
- __out void **ppInterface);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *OpenPropertyStore )( \r
- IMMDevice * This,\r
- /* [in] */ \r
- __in DWORD stgmAccess,\r
- /* [out] */ \r
- __out IPropertyStore **ppProperties);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetId )( \r
- IMMDevice * This,\r
- /* [out] */ \r
- __deref_out LPWSTR *ppstrId);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetState )( \r
- IMMDevice * This,\r
- /* [out] */ \r
- __out DWORD *pdwState);\r
- \r
- END_INTERFACE\r
- } IMMDeviceVtbl;\r
-\r
- interface IMMDevice\r
- {\r
- CONST_VTBL struct IMMDeviceVtbl *lpVtbl;\r
- };\r
-\r
- \r
-\r
-#ifdef COBJMACROS\r
-\r
-\r
-#define IMMDevice_QueryInterface(This,riid,ppvObject) \\r
- ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r
-\r
-#define IMMDevice_AddRef(This) \\r
- ( (This)->lpVtbl -> AddRef(This) ) \r
-\r
-#define IMMDevice_Release(This) \\r
- ( (This)->lpVtbl -> Release(This) ) \r
-\r
-\r
-#define IMMDevice_Activate(This,iid,dwClsCtx,pActivationParams,ppInterface) \\r
- ( (This)->lpVtbl -> Activate(This,iid,dwClsCtx,pActivationParams,ppInterface) ) \r
-\r
-#define IMMDevice_OpenPropertyStore(This,stgmAccess,ppProperties) \\r
- ( (This)->lpVtbl -> OpenPropertyStore(This,stgmAccess,ppProperties) ) \r
-\r
-#define IMMDevice_GetId(This,ppstrId) \\r
- ( (This)->lpVtbl -> GetId(This,ppstrId) ) \r
-\r
-#define IMMDevice_GetState(This,pdwState) \\r
- ( (This)->lpVtbl -> GetState(This,pdwState) ) \r
-\r
-#endif /* COBJMACROS */\r
-\r
-\r
-#endif /* C style interface */\r
-\r
-\r
-\r
-\r
-#endif /* __IMMDevice_INTERFACE_DEFINED__ */\r
-\r
-\r
-#ifndef __IMMDeviceCollection_INTERFACE_DEFINED__\r
-#define __IMMDeviceCollection_INTERFACE_DEFINED__\r
-\r
-/* interface IMMDeviceCollection */\r
-/* [unique][helpstring][nonextensible][uuid][local][object] */ \r
-\r
-\r
-EXTERN_C const IID IID_IMMDeviceCollection;\r
-\r
-#if defined(__cplusplus) && !defined(CINTERFACE)\r
- \r
- MIDL_INTERFACE("0BD7A1BE-7A1A-44DB-8397-CC5392387B5E")\r
- IMMDeviceCollection : public IUnknown\r
- {\r
- public:\r
- virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetCount( \r
- /* [out] */ \r
- __out UINT *pcDevices) = 0;\r
- \r
- virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE Item( \r
- /* [in] */ \r
- __in UINT nDevice,\r
- /* [out] */ \r
- __out IMMDevice **ppDevice) = 0;\r
- \r
- };\r
- \r
-#else /* C style interface */\r
-\r
- typedef struct IMMDeviceCollectionVtbl\r
- {\r
- BEGIN_INTERFACE\r
- \r
- HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r
- IMMDeviceCollection * This,\r
- /* [in] */ REFIID riid,\r
- /* [iid_is][out] */ \r
- __RPC__deref_out void **ppvObject);\r
- \r
- ULONG ( STDMETHODCALLTYPE *AddRef )( \r
- IMMDeviceCollection * This);\r
- \r
- ULONG ( STDMETHODCALLTYPE *Release )( \r
- IMMDeviceCollection * This);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetCount )( \r
- IMMDeviceCollection * This,\r
- /* [out] */ \r
- __out UINT *pcDevices);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *Item )( \r
- IMMDeviceCollection * This,\r
- /* [in] */ \r
- __in UINT nDevice,\r
- /* [out] */ \r
- __out IMMDevice **ppDevice);\r
- \r
- END_INTERFACE\r
- } IMMDeviceCollectionVtbl;\r
-\r
- interface IMMDeviceCollection\r
- {\r
- CONST_VTBL struct IMMDeviceCollectionVtbl *lpVtbl;\r
- };\r
-\r
- \r
-\r
-#ifdef COBJMACROS\r
-\r
-\r
-#define IMMDeviceCollection_QueryInterface(This,riid,ppvObject) \\r
- ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r
-\r
-#define IMMDeviceCollection_AddRef(This) \\r
- ( (This)->lpVtbl -> AddRef(This) ) \r
-\r
-#define IMMDeviceCollection_Release(This) \\r
- ( (This)->lpVtbl -> Release(This) ) \r
-\r
-\r
-#define IMMDeviceCollection_GetCount(This,pcDevices) \\r
- ( (This)->lpVtbl -> GetCount(This,pcDevices) ) \r
-\r
-#define IMMDeviceCollection_Item(This,nDevice,ppDevice) \\r
- ( (This)->lpVtbl -> Item(This,nDevice,ppDevice) ) \r
-\r
-#endif /* COBJMACROS */\r
-\r
-\r
-#endif /* C style interface */\r
-\r
-\r
-\r
-\r
-#endif /* __IMMDeviceCollection_INTERFACE_DEFINED__ */\r
-\r
-\r
-#ifndef __IMMEndpoint_INTERFACE_DEFINED__\r
-#define __IMMEndpoint_INTERFACE_DEFINED__\r
-\r
-/* interface IMMEndpoint */\r
-/* [unique][helpstring][nonextensible][uuid][local][object] */ \r
-\r
-\r
-EXTERN_C const IID IID_IMMEndpoint;\r
-\r
-#if defined(__cplusplus) && !defined(CINTERFACE)\r
- \r
- MIDL_INTERFACE("1BE09788-6894-4089-8586-9A2A6C265AC5")\r
- IMMEndpoint : public IUnknown\r
- {\r
- public:\r
- virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetDataFlow( \r
- /* [out] */ \r
- __out EDataFlow *pDataFlow) = 0;\r
- \r
- };\r
- \r
-#else /* C style interface */\r
-\r
- typedef struct IMMEndpointVtbl\r
- {\r
- BEGIN_INTERFACE\r
- \r
- HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r
- IMMEndpoint * This,\r
- /* [in] */ REFIID riid,\r
- /* [iid_is][out] */ \r
- __RPC__deref_out void **ppvObject);\r
- \r
- ULONG ( STDMETHODCALLTYPE *AddRef )( \r
- IMMEndpoint * This);\r
- \r
- ULONG ( STDMETHODCALLTYPE *Release )( \r
- IMMEndpoint * This);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetDataFlow )( \r
- IMMEndpoint * This,\r
- /* [out] */ \r
- __out EDataFlow *pDataFlow);\r
- \r
- END_INTERFACE\r
- } IMMEndpointVtbl;\r
-\r
- interface IMMEndpoint\r
- {\r
- CONST_VTBL struct IMMEndpointVtbl *lpVtbl;\r
- };\r
-\r
- \r
-\r
-#ifdef COBJMACROS\r
-\r
-\r
-#define IMMEndpoint_QueryInterface(This,riid,ppvObject) \\r
- ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r
-\r
-#define IMMEndpoint_AddRef(This) \\r
- ( (This)->lpVtbl -> AddRef(This) ) \r
-\r
-#define IMMEndpoint_Release(This) \\r
- ( (This)->lpVtbl -> Release(This) ) \r
-\r
-\r
-#define IMMEndpoint_GetDataFlow(This,pDataFlow) \\r
- ( (This)->lpVtbl -> GetDataFlow(This,pDataFlow) ) \r
-\r
-#endif /* COBJMACROS */\r
-\r
-\r
-#endif /* C style interface */\r
-\r
-\r
-\r
-\r
-#endif /* __IMMEndpoint_INTERFACE_DEFINED__ */\r
-\r
-\r
-#ifndef __IMMDeviceEnumerator_INTERFACE_DEFINED__\r
-#define __IMMDeviceEnumerator_INTERFACE_DEFINED__\r
-\r
-/* interface IMMDeviceEnumerator */\r
-/* [unique][helpstring][nonextensible][uuid][local][object] */ \r
-\r
-\r
-EXTERN_C const IID IID_IMMDeviceEnumerator;\r
-\r
-#if defined(__cplusplus) && !defined(CINTERFACE)\r
- \r
- MIDL_INTERFACE("A95664D2-9614-4F35-A746-DE8DB63617E6")\r
- IMMDeviceEnumerator : public IUnknown\r
- {\r
- public:\r
- virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE EnumAudioEndpoints( \r
- /* [in] */ \r
- __in EDataFlow dataFlow,\r
- /* [in] */ \r
- __in DWORD dwStateMask,\r
- /* [out] */ \r
- __out IMMDeviceCollection **ppDevices) = 0;\r
- \r
- virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetDefaultAudioEndpoint( \r
- /* [in] */ \r
- __in EDataFlow dataFlow,\r
- /* [in] */ \r
- __in ERole role,\r
- /* [out] */ \r
- __out IMMDevice **ppEndpoint) = 0;\r
- \r
- virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetDevice( \r
- /* */ \r
- __in LPCWSTR pwstrId,\r
- /* [out] */ \r
- __out IMMDevice **ppDevice) = 0;\r
- \r
- virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE RegisterEndpointNotificationCallback( \r
- /* [in] */ \r
- __in IMMNotificationClient *pClient) = 0;\r
- \r
- virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE UnregisterEndpointNotificationCallback( \r
- /* [in] */ \r
- __in IMMNotificationClient *pClient) = 0;\r
- \r
- };\r
- \r
-#else /* C style interface */\r
-\r
- typedef struct IMMDeviceEnumeratorVtbl\r
- {\r
- BEGIN_INTERFACE\r
- \r
- HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r
- IMMDeviceEnumerator * This,\r
- /* [in] */ REFIID riid,\r
- /* [iid_is][out] */ \r
- __RPC__deref_out void **ppvObject);\r
- \r
- ULONG ( STDMETHODCALLTYPE *AddRef )( \r
- IMMDeviceEnumerator * This);\r
- \r
- ULONG ( STDMETHODCALLTYPE *Release )( \r
- IMMDeviceEnumerator * This);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *EnumAudioEndpoints )( \r
- IMMDeviceEnumerator * This,\r
- /* [in] */ \r
- __in EDataFlow dataFlow,\r
- /* [in] */ \r
- __in DWORD dwStateMask,\r
- /* [out] */ \r
- __out IMMDeviceCollection **ppDevices);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetDefaultAudioEndpoint )( \r
- IMMDeviceEnumerator * This,\r
- /* [in] */ \r
- __in EDataFlow dataFlow,\r
- /* [in] */ \r
- __in ERole role,\r
- /* [out] */ \r
- __out IMMDevice **ppEndpoint);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetDevice )( \r
- IMMDeviceEnumerator * This,\r
- /* */ \r
- __in LPCWSTR pwstrId,\r
- /* [out] */ \r
- __out IMMDevice **ppDevice);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *RegisterEndpointNotificationCallback )( \r
- IMMDeviceEnumerator * This,\r
- /* [in] */ \r
- __in IMMNotificationClient *pClient);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *UnregisterEndpointNotificationCallback )( \r
- IMMDeviceEnumerator * This,\r
- /* [in] */ \r
- __in IMMNotificationClient *pClient);\r
- \r
- END_INTERFACE\r
- } IMMDeviceEnumeratorVtbl;\r
-\r
- interface IMMDeviceEnumerator\r
- {\r
- CONST_VTBL struct IMMDeviceEnumeratorVtbl *lpVtbl;\r
- };\r
-\r
- \r
-\r
-#ifdef COBJMACROS\r
-\r
-\r
-#define IMMDeviceEnumerator_QueryInterface(This,riid,ppvObject) \\r
- ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r
-\r
-#define IMMDeviceEnumerator_AddRef(This) \\r
- ( (This)->lpVtbl -> AddRef(This) ) \r
-\r
-#define IMMDeviceEnumerator_Release(This) \\r
- ( (This)->lpVtbl -> Release(This) ) \r
-\r
-\r
-#define IMMDeviceEnumerator_EnumAudioEndpoints(This,dataFlow,dwStateMask,ppDevices) \\r
- ( (This)->lpVtbl -> EnumAudioEndpoints(This,dataFlow,dwStateMask,ppDevices) ) \r
-\r
-#define IMMDeviceEnumerator_GetDefaultAudioEndpoint(This,dataFlow,role,ppEndpoint) \\r
- ( (This)->lpVtbl -> GetDefaultAudioEndpoint(This,dataFlow,role,ppEndpoint) ) \r
-\r
-#define IMMDeviceEnumerator_GetDevice(This,pwstrId,ppDevice) \\r
- ( (This)->lpVtbl -> GetDevice(This,pwstrId,ppDevice) ) \r
-\r
-#define IMMDeviceEnumerator_RegisterEndpointNotificationCallback(This,pClient) \\r
- ( (This)->lpVtbl -> RegisterEndpointNotificationCallback(This,pClient) ) \r
-\r
-#define IMMDeviceEnumerator_UnregisterEndpointNotificationCallback(This,pClient) \\r
- ( (This)->lpVtbl -> UnregisterEndpointNotificationCallback(This,pClient) ) \r
-\r
-#endif /* COBJMACROS */\r
-\r
-\r
-#endif /* C style interface */\r
-\r
-\r
-\r
-\r
-#endif /* __IMMDeviceEnumerator_INTERFACE_DEFINED__ */\r
-\r
-\r
-#ifndef __IMMDeviceActivator_INTERFACE_DEFINED__\r
-#define __IMMDeviceActivator_INTERFACE_DEFINED__\r
-\r
-/* interface IMMDeviceActivator */\r
-/* [unique][helpstring][nonextensible][uuid][local][object] */ \r
-\r
-\r
-EXTERN_C const IID IID_IMMDeviceActivator;\r
-\r
-#if defined(__cplusplus) && !defined(CINTERFACE)\r
- \r
- MIDL_INTERFACE("3B0D0EA4-D0A9-4B0E-935B-09516746FAC0")\r
- IMMDeviceActivator : public IUnknown\r
- {\r
- public:\r
- virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE Activate( \r
- /* [in] */ \r
- __in REFIID iid,\r
- /* [in] */ \r
- __in IMMDevice *pDevice,\r
- /* [in] */ \r
- __in_opt PROPVARIANT *pActivationParams,\r
- /* [iid_is][out] */ \r
- __out void **ppInterface) = 0;\r
- \r
- };\r
- \r
-#else /* C style interface */\r
-\r
- typedef struct IMMDeviceActivatorVtbl\r
- {\r
- BEGIN_INTERFACE\r
- \r
- HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r
- IMMDeviceActivator * This,\r
- /* [in] */ REFIID riid,\r
- /* [iid_is][out] */ \r
- __RPC__deref_out void **ppvObject);\r
- \r
- ULONG ( STDMETHODCALLTYPE *AddRef )( \r
- IMMDeviceActivator * This);\r
- \r
- ULONG ( STDMETHODCALLTYPE *Release )( \r
- IMMDeviceActivator * This);\r
- \r
- /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *Activate )( \r
- IMMDeviceActivator * This,\r
- /* [in] */ \r
- __in REFIID iid,\r
- /* [in] */ \r
- __in IMMDevice *pDevice,\r
- /* [in] */ \r
- __in_opt PROPVARIANT *pActivationParams,\r
- /* [iid_is][out] */ \r
- __out void **ppInterface);\r
- \r
- END_INTERFACE\r
- } IMMDeviceActivatorVtbl;\r
-\r
- interface IMMDeviceActivator\r
- {\r
- CONST_VTBL struct IMMDeviceActivatorVtbl *lpVtbl;\r
- };\r
-\r
- \r
-\r
-#ifdef COBJMACROS\r
-\r
-\r
-#define IMMDeviceActivator_QueryInterface(This,riid,ppvObject) \\r
- ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r
-\r
-#define IMMDeviceActivator_AddRef(This) \\r
- ( (This)->lpVtbl -> AddRef(This) ) \r
-\r
-#define IMMDeviceActivator_Release(This) \\r
- ( (This)->lpVtbl -> Release(This) ) \r
-\r
-\r
-#define IMMDeviceActivator_Activate(This,iid,pDevice,pActivationParams,ppInterface) \\r
- ( (This)->lpVtbl -> Activate(This,iid,pDevice,pActivationParams,ppInterface) ) \r
-\r
-#endif /* COBJMACROS */\r
-\r
-\r
-#endif /* C style interface */\r
-\r
-\r
-\r
-\r
-#endif /* __IMMDeviceActivator_INTERFACE_DEFINED__ */\r
-\r
-\r
-/* interface __MIDL_itf_mmdeviceapi_0000_0006 */\r
-/* [local] */ \r
-\r
-typedef /* [public] */ struct __MIDL___MIDL_itf_mmdeviceapi_0000_0006_0001\r
- {\r
- LPARAM AddPageParam;\r
- IMMDevice *pEndpoint;\r
- IMMDevice *pPnpInterface;\r
- IMMDevice *pPnpDevnode;\r
- } AudioExtensionParams;\r
-\r
-\r
-\r
-extern RPC_IF_HANDLE __MIDL_itf_mmdeviceapi_0000_0006_v0_0_c_ifspec;\r
-extern RPC_IF_HANDLE __MIDL_itf_mmdeviceapi_0000_0006_v0_0_s_ifspec;\r
-\r
-\r
-#ifndef __MMDeviceAPILib_LIBRARY_DEFINED__\r
-#define __MMDeviceAPILib_LIBRARY_DEFINED__\r
-\r
-/* library MMDeviceAPILib */\r
-/* [helpstring][version][uuid] */ \r
-\r
-\r
-EXTERN_C const IID LIBID_MMDeviceAPILib;\r
-\r
-EXTERN_C const CLSID CLSID_MMDeviceEnumerator;\r
-\r
-#ifdef __cplusplus\r
-\r
-class DECLSPEC_UUID("BCDE0395-E52F-467C-8E3D-C4579291692E")\r
-MMDeviceEnumerator;\r
-#endif\r
-#endif /* __MMDeviceAPILib_LIBRARY_DEFINED__ */\r
-\r
-/* Additional Prototypes for ALL interfaces */\r
-\r
-/* end of Additional Prototypes */\r
-\r
-#ifdef __cplusplus\r
-}\r
-#endif\r
-\r
-#endif\r
-\r
-\r
-\r
+
+
+/* this ALWAYS GENERATED file contains the definitions for the interfaces */
+
+
+ /* File created by MIDL compiler version 7.00.0499 */
+/* Compiler settings for mmdeviceapi.idl:
+ Oicf, W1, Zp8, env=Win32 (32b run)
+ protocol : dce , ms_ext, c_ext, robust
+ error checks: allocation ref bounds_check enum stub_data
+ VC __declspec() decoration level:
+ __declspec(uuid()), __declspec(selectany), __declspec(novtable)
+ DECLSPEC_UUID(), MIDL_INTERFACE()
+*/
+//@@MIDL_FILE_HEADING( )
+
+#pragma warning( disable: 4049 ) /* more than 64k source lines */
+
+
+/* verify that the <rpcndr.h> version is high enough to compile this file*/
+#ifndef __REQUIRED_RPCNDR_H_VERSION__
+#define __REQUIRED_RPCNDR_H_VERSION__ 500
+#endif
+
+/* verify that the <rpcsal.h> version is high enough to compile this file*/
+#ifndef __REQUIRED_RPCSAL_H_VERSION__
+#define __REQUIRED_RPCSAL_H_VERSION__ 100
+#endif
+
+#include "rpc.h"
+#include "rpcndr.h"
+
+#ifndef __RPCNDR_H_VERSION__
+#error this stub requires an updated version of <rpcndr.h>
+#endif // __RPCNDR_H_VERSION__
+
+#ifndef COM_NO_WINDOWS_H
+#include "windows.h"
+#include "ole2.h"
+#endif /*COM_NO_WINDOWS_H*/
+
+#ifndef __mmdeviceapi_h__
+#define __mmdeviceapi_h__
+
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#pragma once
+#endif
+
+/* Forward Declarations */
+
+#ifndef __IMMNotificationClient_FWD_DEFINED__
+#define __IMMNotificationClient_FWD_DEFINED__
+typedef interface IMMNotificationClient IMMNotificationClient;
+#endif /* __IMMNotificationClient_FWD_DEFINED__ */
+
+
+#ifndef __IMMDevice_FWD_DEFINED__
+#define __IMMDevice_FWD_DEFINED__
+typedef interface IMMDevice IMMDevice;
+#endif /* __IMMDevice_FWD_DEFINED__ */
+
+
+#ifndef __IMMDeviceCollection_FWD_DEFINED__
+#define __IMMDeviceCollection_FWD_DEFINED__
+typedef interface IMMDeviceCollection IMMDeviceCollection;
+#endif /* __IMMDeviceCollection_FWD_DEFINED__ */
+
+
+#ifndef __IMMEndpoint_FWD_DEFINED__
+#define __IMMEndpoint_FWD_DEFINED__
+typedef interface IMMEndpoint IMMEndpoint;
+#endif /* __IMMEndpoint_FWD_DEFINED__ */
+
+
+#ifndef __IMMDeviceEnumerator_FWD_DEFINED__
+#define __IMMDeviceEnumerator_FWD_DEFINED__
+typedef interface IMMDeviceEnumerator IMMDeviceEnumerator;
+#endif /* __IMMDeviceEnumerator_FWD_DEFINED__ */
+
+
+#ifndef __IMMDeviceActivator_FWD_DEFINED__
+#define __IMMDeviceActivator_FWD_DEFINED__
+typedef interface IMMDeviceActivator IMMDeviceActivator;
+#endif /* __IMMDeviceActivator_FWD_DEFINED__ */
+
+
+#ifndef __MMDeviceEnumerator_FWD_DEFINED__
+#define __MMDeviceEnumerator_FWD_DEFINED__
+
+#ifdef __cplusplus
+typedef class MMDeviceEnumerator MMDeviceEnumerator;
+#else
+typedef struct MMDeviceEnumerator MMDeviceEnumerator;
+#endif /* __cplusplus */
+
+#endif /* __MMDeviceEnumerator_FWD_DEFINED__ */
+
+
+/* header files for imported files */
+#include "unknwn.h"
+#include "propsys.h"
+
+#ifdef __cplusplus
+extern "C"{
+#endif
+
+
+/* interface __MIDL_itf_mmdeviceapi_0000_0000 */
+/* [local] */
+
+#define E_NOTFOUND HRESULT_FROM_WIN32(ERROR_NOT_FOUND)
+#define E_UNSUPPORTED_TYPE HRESULT_FROM_WIN32(ERROR_UNSUPPORTED_TYPE)
+#define DEVICE_STATE_ACTIVE 0x00000001
+#define DEVICE_STATE_DISABLED 0x00000002
+#define DEVICE_STATE_NOTPRESENT 0x00000004
+#define DEVICE_STATE_UNPLUGGED 0x00000008
+#define DEVICE_STATEMASK_ALL 0x0000000f
+#ifdef DEFINE_PROPERTYKEY
+#undef DEFINE_PROPERTYKEY
+#endif
+#ifdef INITGUID
+#define DEFINE_PROPERTYKEY(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8, pid) EXTERN_C const PROPERTYKEY name = { { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }, pid }
+#else
+#define DEFINE_PROPERTYKEY(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8, pid) EXTERN_C const PROPERTYKEY name
+#endif // INITGUID
+DEFINE_PROPERTYKEY(PKEY_AudioEndpoint_FormFactor, 0x1da5d803, 0xd492, 0x4edd, 0x8c, 0x23, 0xe0, 0xc0, 0xff, 0xee, 0x7f, 0x0e, 0);
+DEFINE_PROPERTYKEY(PKEY_AudioEndpoint_ControlPanelPageProvider, 0x1da5d803, 0xd492, 0x4edd, 0x8c, 0x23, 0xe0, 0xc0, 0xff, 0xee, 0x7f, 0x0e, 1);
+DEFINE_PROPERTYKEY(PKEY_AudioEndpoint_Association, 0x1da5d803, 0xd492, 0x4edd, 0x8c, 0x23, 0xe0, 0xc0, 0xff, 0xee, 0x7f, 0x0e, 2);
+DEFINE_PROPERTYKEY(PKEY_AudioEndpoint_PhysicalSpeakers, 0x1da5d803, 0xd492, 0x4edd, 0x8c, 0x23, 0xe0, 0xc0, 0xff, 0xee, 0x7f, 0x0e, 3);
+DEFINE_PROPERTYKEY(PKEY_AudioEndpoint_GUID, 0x1da5d803, 0xd492, 0x4edd, 0x8c, 0x23, 0xe0, 0xc0, 0xff, 0xee, 0x7f, 0x0e, 4);
+DEFINE_PROPERTYKEY(PKEY_AudioEndpoint_Disable_SysFx, 0x1da5d803, 0xd492, 0x4edd, 0x8c, 0x23, 0xe0, 0xc0, 0xff, 0xee, 0x7f, 0x0e, 5);
+#define ENDPOINT_SYSFX_ENABLED 0x00000000 // System Effects are enabled.
+#define ENDPOINT_SYSFX_DISABLED 0x00000001 // System Effects are disabled.
+DEFINE_PROPERTYKEY(PKEY_AudioEndpoint_FullRangeSpeakers, 0x1da5d803, 0xd492, 0x4edd, 0x8c, 0x23, 0xe0, 0xc0, 0xff, 0xee, 0x7f, 0x0e, 6);
+DEFINE_PROPERTYKEY(PKEY_AudioEngine_DeviceFormat, 0xf19f064d, 0x82c, 0x4e27, 0xbc, 0x73, 0x68, 0x82, 0xa1, 0xbb, 0x8e, 0x4c, 0);
+typedef struct tagDIRECTX_AUDIO_ACTIVATION_PARAMS
+ {
+ DWORD cbDirectXAudioActivationParams;
+ GUID guidAudioSession;
+ DWORD dwAudioStreamFlags;
+ } DIRECTX_AUDIO_ACTIVATION_PARAMS;
+
+typedef struct tagDIRECTX_AUDIO_ACTIVATION_PARAMS *PDIRECTX_AUDIO_ACTIVATION_PARAMS;
+
+typedef /* [public][public][public][public][public] */
+enum __MIDL___MIDL_itf_mmdeviceapi_0000_0000_0001
+ { eRender = 0,
+ eCapture = ( eRender + 1 ) ,
+ eAll = ( eCapture + 1 ) ,
+ EDataFlow_enum_count = ( eAll + 1 )
+ } EDataFlow;
+
+typedef /* [public][public][public] */
+enum __MIDL___MIDL_itf_mmdeviceapi_0000_0000_0002
+ { eConsole = 0,
+ eMultimedia = ( eConsole + 1 ) ,
+ eCommunications = ( eMultimedia + 1 ) ,
+ ERole_enum_count = ( eCommunications + 1 )
+ } ERole;
+
+typedef /* [public] */
+enum __MIDL___MIDL_itf_mmdeviceapi_0000_0000_0003
+ { RemoteNetworkDevice = 0,
+ Speakers = ( RemoteNetworkDevice + 1 ) ,
+ LineLevel = ( Speakers + 1 ) ,
+ Headphones = ( LineLevel + 1 ) ,
+ Microphone = ( Headphones + 1 ) ,
+ Headset = ( Microphone + 1 ) ,
+ Handset = ( Headset + 1 ) ,
+ UnknownDigitalPassthrough = ( Handset + 1 ) ,
+ SPDIF = ( UnknownDigitalPassthrough + 1 ) ,
+ HDMI = ( SPDIF + 1 ) ,
+ UnknownFormFactor = ( HDMI + 1 )
+ } EndpointFormFactor;
+
+
+
+extern RPC_IF_HANDLE __MIDL_itf_mmdeviceapi_0000_0000_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_mmdeviceapi_0000_0000_v0_0_s_ifspec;
+
+#ifndef __IMMNotificationClient_INTERFACE_DEFINED__
+#define __IMMNotificationClient_INTERFACE_DEFINED__
+
+/* interface IMMNotificationClient */
+/* [unique][helpstring][nonextensible][uuid][local][object] */
+
+
+EXTERN_C const IID IID_IMMNotificationClient;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("7991EEC9-7E89-4D85-8390-6C703CEC60C0")
+ IMMNotificationClient : public IUnknown
+ {
+ public:
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE OnDeviceStateChanged(
+ /* [in] */
+ __in LPCWSTR pwstrDeviceId,
+ /* [in] */
+ __in DWORD dwNewState) = 0;
+
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE OnDeviceAdded(
+ /* [in] */
+ __in LPCWSTR pwstrDeviceId) = 0;
+
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE OnDeviceRemoved(
+ /* [in] */
+ __in LPCWSTR pwstrDeviceId) = 0;
+
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE OnDefaultDeviceChanged(
+ /* [in] */
+ __in EDataFlow flow,
+ /* [in] */
+ __in ERole role,
+ /* [in] */
+ __in LPCWSTR pwstrDefaultDeviceId) = 0;
+
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE OnPropertyValueChanged(
+ /* [in] */
+ __in LPCWSTR pwstrDeviceId,
+ /* [in] */
+ __in const PROPERTYKEY key) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct IMMNotificationClientVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IMMNotificationClient * This,
+ /* [in] */ REFIID riid,
+ /* [iid_is][out] */
+ __RPC__deref_out void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IMMNotificationClient * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IMMNotificationClient * This);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *OnDeviceStateChanged )(
+ IMMNotificationClient * This,
+ /* [in] */
+ __in LPCWSTR pwstrDeviceId,
+ /* [in] */
+ __in DWORD dwNewState);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *OnDeviceAdded )(
+ IMMNotificationClient * This,
+ /* [in] */
+ __in LPCWSTR pwstrDeviceId);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *OnDeviceRemoved )(
+ IMMNotificationClient * This,
+ /* [in] */
+ __in LPCWSTR pwstrDeviceId);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *OnDefaultDeviceChanged )(
+ IMMNotificationClient * This,
+ /* [in] */
+ __in EDataFlow flow,
+ /* [in] */
+ __in ERole role,
+ /* [in] */
+ __in LPCWSTR pwstrDefaultDeviceId);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *OnPropertyValueChanged )(
+ IMMNotificationClient * This,
+ /* [in] */
+ __in LPCWSTR pwstrDeviceId,
+ /* [in] */
+ __in const PROPERTYKEY key);
+
+ END_INTERFACE
+ } IMMNotificationClientVtbl;
+
+ interface IMMNotificationClient
+ {
+ CONST_VTBL struct IMMNotificationClientVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IMMNotificationClient_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IMMNotificationClient_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IMMNotificationClient_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IMMNotificationClient_OnDeviceStateChanged(This,pwstrDeviceId,dwNewState) \
+ ( (This)->lpVtbl -> OnDeviceStateChanged(This,pwstrDeviceId,dwNewState) )
+
+#define IMMNotificationClient_OnDeviceAdded(This,pwstrDeviceId) \
+ ( (This)->lpVtbl -> OnDeviceAdded(This,pwstrDeviceId) )
+
+#define IMMNotificationClient_OnDeviceRemoved(This,pwstrDeviceId) \
+ ( (This)->lpVtbl -> OnDeviceRemoved(This,pwstrDeviceId) )
+
+#define IMMNotificationClient_OnDefaultDeviceChanged(This,flow,role,pwstrDefaultDeviceId) \
+ ( (This)->lpVtbl -> OnDefaultDeviceChanged(This,flow,role,pwstrDefaultDeviceId) )
+
+#define IMMNotificationClient_OnPropertyValueChanged(This,pwstrDeviceId,key) \
+ ( (This)->lpVtbl -> OnPropertyValueChanged(This,pwstrDeviceId,key) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IMMNotificationClient_INTERFACE_DEFINED__ */
+
+
+#ifndef __IMMDevice_INTERFACE_DEFINED__
+#define __IMMDevice_INTERFACE_DEFINED__
+
+/* interface IMMDevice */
+/* [unique][helpstring][nonextensible][uuid][local][object] */
+
+
+EXTERN_C const IID IID_IMMDevice;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("D666063F-1587-4E43-81F1-B948E807363F")
+ IMMDevice : public IUnknown
+ {
+ public:
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE Activate(
+ /* [in] */
+ __in REFIID iid,
+ /* [in] */
+ __in DWORD dwClsCtx,
+ /* [unique][in] */
+ __in_opt PROPVARIANT *pActivationParams,
+ /* [iid_is][out] */
+ __out void **ppInterface) = 0;
+
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE OpenPropertyStore(
+ /* [in] */
+ __in DWORD stgmAccess,
+ /* [out] */
+ __out IPropertyStore **ppProperties) = 0;
+
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetId(
+ /* [out] */
+ __deref_out LPWSTR *ppstrId) = 0;
+
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetState(
+ /* [out] */
+ __out DWORD *pdwState) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct IMMDeviceVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IMMDevice * This,
+ /* [in] */ REFIID riid,
+ /* [iid_is][out] */
+ __RPC__deref_out void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IMMDevice * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IMMDevice * This);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *Activate )(
+ IMMDevice * This,
+ /* [in] */
+ __in REFIID iid,
+ /* [in] */
+ __in DWORD dwClsCtx,
+ /* [unique][in] */
+ __in_opt PROPVARIANT *pActivationParams,
+ /* [iid_is][out] */
+ __out void **ppInterface);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *OpenPropertyStore )(
+ IMMDevice * This,
+ /* [in] */
+ __in DWORD stgmAccess,
+ /* [out] */
+ __out IPropertyStore **ppProperties);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetId )(
+ IMMDevice * This,
+ /* [out] */
+ __deref_out LPWSTR *ppstrId);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetState )(
+ IMMDevice * This,
+ /* [out] */
+ __out DWORD *pdwState);
+
+ END_INTERFACE
+ } IMMDeviceVtbl;
+
+ interface IMMDevice
+ {
+ CONST_VTBL struct IMMDeviceVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IMMDevice_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IMMDevice_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IMMDevice_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IMMDevice_Activate(This,iid,dwClsCtx,pActivationParams,ppInterface) \
+ ( (This)->lpVtbl -> Activate(This,iid,dwClsCtx,pActivationParams,ppInterface) )
+
+#define IMMDevice_OpenPropertyStore(This,stgmAccess,ppProperties) \
+ ( (This)->lpVtbl -> OpenPropertyStore(This,stgmAccess,ppProperties) )
+
+#define IMMDevice_GetId(This,ppstrId) \
+ ( (This)->lpVtbl -> GetId(This,ppstrId) )
+
+#define IMMDevice_GetState(This,pdwState) \
+ ( (This)->lpVtbl -> GetState(This,pdwState) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IMMDevice_INTERFACE_DEFINED__ */
+
+
+#ifndef __IMMDeviceCollection_INTERFACE_DEFINED__
+#define __IMMDeviceCollection_INTERFACE_DEFINED__
+
+/* interface IMMDeviceCollection */
+/* [unique][helpstring][nonextensible][uuid][local][object] */
+
+
+EXTERN_C const IID IID_IMMDeviceCollection;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("0BD7A1BE-7A1A-44DB-8397-CC5392387B5E")
+ IMMDeviceCollection : public IUnknown
+ {
+ public:
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetCount(
+ /* [out] */
+ __out UINT *pcDevices) = 0;
+
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE Item(
+ /* [in] */
+ __in UINT nDevice,
+ /* [out] */
+ __out IMMDevice **ppDevice) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct IMMDeviceCollectionVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IMMDeviceCollection * This,
+ /* [in] */ REFIID riid,
+ /* [iid_is][out] */
+ __RPC__deref_out void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IMMDeviceCollection * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IMMDeviceCollection * This);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetCount )(
+ IMMDeviceCollection * This,
+ /* [out] */
+ __out UINT *pcDevices);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *Item )(
+ IMMDeviceCollection * This,
+ /* [in] */
+ __in UINT nDevice,
+ /* [out] */
+ __out IMMDevice **ppDevice);
+
+ END_INTERFACE
+ } IMMDeviceCollectionVtbl;
+
+ interface IMMDeviceCollection
+ {
+ CONST_VTBL struct IMMDeviceCollectionVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IMMDeviceCollection_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IMMDeviceCollection_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IMMDeviceCollection_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IMMDeviceCollection_GetCount(This,pcDevices) \
+ ( (This)->lpVtbl -> GetCount(This,pcDevices) )
+
+#define IMMDeviceCollection_Item(This,nDevice,ppDevice) \
+ ( (This)->lpVtbl -> Item(This,nDevice,ppDevice) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IMMDeviceCollection_INTERFACE_DEFINED__ */
+
+
+#ifndef __IMMEndpoint_INTERFACE_DEFINED__
+#define __IMMEndpoint_INTERFACE_DEFINED__
+
+/* interface IMMEndpoint */
+/* [unique][helpstring][nonextensible][uuid][local][object] */
+
+
+EXTERN_C const IID IID_IMMEndpoint;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("1BE09788-6894-4089-8586-9A2A6C265AC5")
+ IMMEndpoint : public IUnknown
+ {
+ public:
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetDataFlow(
+ /* [out] */
+ __out EDataFlow *pDataFlow) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct IMMEndpointVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IMMEndpoint * This,
+ /* [in] */ REFIID riid,
+ /* [iid_is][out] */
+ __RPC__deref_out void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IMMEndpoint * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IMMEndpoint * This);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetDataFlow )(
+ IMMEndpoint * This,
+ /* [out] */
+ __out EDataFlow *pDataFlow);
+
+ END_INTERFACE
+ } IMMEndpointVtbl;
+
+ interface IMMEndpoint
+ {
+ CONST_VTBL struct IMMEndpointVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IMMEndpoint_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IMMEndpoint_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IMMEndpoint_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IMMEndpoint_GetDataFlow(This,pDataFlow) \
+ ( (This)->lpVtbl -> GetDataFlow(This,pDataFlow) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IMMEndpoint_INTERFACE_DEFINED__ */
+
+
+#ifndef __IMMDeviceEnumerator_INTERFACE_DEFINED__
+#define __IMMDeviceEnumerator_INTERFACE_DEFINED__
+
+/* interface IMMDeviceEnumerator */
+/* [unique][helpstring][nonextensible][uuid][local][object] */
+
+
+EXTERN_C const IID IID_IMMDeviceEnumerator;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("A95664D2-9614-4F35-A746-DE8DB63617E6")
+ IMMDeviceEnumerator : public IUnknown
+ {
+ public:
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE EnumAudioEndpoints(
+ /* [in] */
+ __in EDataFlow dataFlow,
+ /* [in] */
+ __in DWORD dwStateMask,
+ /* [out] */
+ __out IMMDeviceCollection **ppDevices) = 0;
+
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetDefaultAudioEndpoint(
+ /* [in] */
+ __in EDataFlow dataFlow,
+ /* [in] */
+ __in ERole role,
+ /* [out] */
+ __out IMMDevice **ppEndpoint) = 0;
+
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetDevice(
+ /* */
+ __in LPCWSTR pwstrId,
+ /* [out] */
+ __out IMMDevice **ppDevice) = 0;
+
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE RegisterEndpointNotificationCallback(
+ /* [in] */
+ __in IMMNotificationClient *pClient) = 0;
+
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE UnregisterEndpointNotificationCallback(
+ /* [in] */
+ __in IMMNotificationClient *pClient) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct IMMDeviceEnumeratorVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IMMDeviceEnumerator * This,
+ /* [in] */ REFIID riid,
+ /* [iid_is][out] */
+ __RPC__deref_out void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IMMDeviceEnumerator * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IMMDeviceEnumerator * This);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *EnumAudioEndpoints )(
+ IMMDeviceEnumerator * This,
+ /* [in] */
+ __in EDataFlow dataFlow,
+ /* [in] */
+ __in DWORD dwStateMask,
+ /* [out] */
+ __out IMMDeviceCollection **ppDevices);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetDefaultAudioEndpoint )(
+ IMMDeviceEnumerator * This,
+ /* [in] */
+ __in EDataFlow dataFlow,
+ /* [in] */
+ __in ERole role,
+ /* [out] */
+ __out IMMDevice **ppEndpoint);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetDevice )(
+ IMMDeviceEnumerator * This,
+ /* */
+ __in LPCWSTR pwstrId,
+ /* [out] */
+ __out IMMDevice **ppDevice);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *RegisterEndpointNotificationCallback )(
+ IMMDeviceEnumerator * This,
+ /* [in] */
+ __in IMMNotificationClient *pClient);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *UnregisterEndpointNotificationCallback )(
+ IMMDeviceEnumerator * This,
+ /* [in] */
+ __in IMMNotificationClient *pClient);
+
+ END_INTERFACE
+ } IMMDeviceEnumeratorVtbl;
+
+ interface IMMDeviceEnumerator
+ {
+ CONST_VTBL struct IMMDeviceEnumeratorVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IMMDeviceEnumerator_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IMMDeviceEnumerator_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IMMDeviceEnumerator_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IMMDeviceEnumerator_EnumAudioEndpoints(This,dataFlow,dwStateMask,ppDevices) \
+ ( (This)->lpVtbl -> EnumAudioEndpoints(This,dataFlow,dwStateMask,ppDevices) )
+
+#define IMMDeviceEnumerator_GetDefaultAudioEndpoint(This,dataFlow,role,ppEndpoint) \
+ ( (This)->lpVtbl -> GetDefaultAudioEndpoint(This,dataFlow,role,ppEndpoint) )
+
+#define IMMDeviceEnumerator_GetDevice(This,pwstrId,ppDevice) \
+ ( (This)->lpVtbl -> GetDevice(This,pwstrId,ppDevice) )
+
+#define IMMDeviceEnumerator_RegisterEndpointNotificationCallback(This,pClient) \
+ ( (This)->lpVtbl -> RegisterEndpointNotificationCallback(This,pClient) )
+
+#define IMMDeviceEnumerator_UnregisterEndpointNotificationCallback(This,pClient) \
+ ( (This)->lpVtbl -> UnregisterEndpointNotificationCallback(This,pClient) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IMMDeviceEnumerator_INTERFACE_DEFINED__ */
+
+
+#ifndef __IMMDeviceActivator_INTERFACE_DEFINED__
+#define __IMMDeviceActivator_INTERFACE_DEFINED__
+
+/* interface IMMDeviceActivator */
+/* [unique][helpstring][nonextensible][uuid][local][object] */
+
+
+EXTERN_C const IID IID_IMMDeviceActivator;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("3B0D0EA4-D0A9-4B0E-935B-09516746FAC0")
+ IMMDeviceActivator : public IUnknown
+ {
+ public:
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE Activate(
+ /* [in] */
+ __in REFIID iid,
+ /* [in] */
+ __in IMMDevice *pDevice,
+ /* [in] */
+ __in_opt PROPVARIANT *pActivationParams,
+ /* [iid_is][out] */
+ __out void **ppInterface) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct IMMDeviceActivatorVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IMMDeviceActivator * This,
+ /* [in] */ REFIID riid,
+ /* [iid_is][out] */
+ __RPC__deref_out void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IMMDeviceActivator * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IMMDeviceActivator * This);
+
+ /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *Activate )(
+ IMMDeviceActivator * This,
+ /* [in] */
+ __in REFIID iid,
+ /* [in] */
+ __in IMMDevice *pDevice,
+ /* [in] */
+ __in_opt PROPVARIANT *pActivationParams,
+ /* [iid_is][out] */
+ __out void **ppInterface);
+
+ END_INTERFACE
+ } IMMDeviceActivatorVtbl;
+
+ interface IMMDeviceActivator
+ {
+ CONST_VTBL struct IMMDeviceActivatorVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IMMDeviceActivator_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IMMDeviceActivator_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IMMDeviceActivator_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IMMDeviceActivator_Activate(This,iid,pDevice,pActivationParams,ppInterface) \
+ ( (This)->lpVtbl -> Activate(This,iid,pDevice,pActivationParams,ppInterface) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IMMDeviceActivator_INTERFACE_DEFINED__ */
+
+
+/* interface __MIDL_itf_mmdeviceapi_0000_0006 */
+/* [local] */
+
+typedef /* [public] */ struct __MIDL___MIDL_itf_mmdeviceapi_0000_0006_0001
+ {
+ LPARAM AddPageParam;
+ IMMDevice *pEndpoint;
+ IMMDevice *pPnpInterface;
+ IMMDevice *pPnpDevnode;
+ } AudioExtensionParams;
+
+
+
+extern RPC_IF_HANDLE __MIDL_itf_mmdeviceapi_0000_0006_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_mmdeviceapi_0000_0006_v0_0_s_ifspec;
+
+
+#ifndef __MMDeviceAPILib_LIBRARY_DEFINED__
+#define __MMDeviceAPILib_LIBRARY_DEFINED__
+
+/* library MMDeviceAPILib */
+/* [helpstring][version][uuid] */
+
+
+EXTERN_C const IID LIBID_MMDeviceAPILib;
+
+EXTERN_C const CLSID CLSID_MMDeviceEnumerator;
+
+#ifdef __cplusplus
+
+class DECLSPEC_UUID("BCDE0395-E52F-467C-8E3D-C4579291692E")
+MMDeviceEnumerator;
+#endif
+#endif /* __MMDeviceAPILib_LIBRARY_DEFINED__ */
+
+/* Additional Prototypes for ALL interfaces */
+
+/* end of Additional Prototypes */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
+
+
-\r
-\r
-/* this ALWAYS GENERATED file contains the definitions for the interfaces */\r
-\r
-\r
- /* File created by MIDL compiler version 7.00.0499 */\r
-/* Compiler settings for propidl.idl:\r
- Oicf, W1, Zp8, env=Win32 (32b run)\r
- protocol : dce , ms_ext, c_ext, robust\r
- error checks: allocation ref bounds_check enum stub_data\r
- VC __declspec() decoration level:\r
- __declspec(uuid()), __declspec(selectany), __declspec(novtable)\r
- DECLSPEC_UUID(), MIDL_INTERFACE()\r
-*/\r
-//@@MIDL_FILE_HEADING( )\r
-\r
-#pragma warning( disable: 4049 ) /* more than 64k source lines */\r
-\r
-\r
-/* verify that the <rpcndr.h> version is high enough to compile this file*/\r
-#ifndef __REQUIRED_RPCNDR_H_VERSION__\r
-#define __REQUIRED_RPCNDR_H_VERSION__ 500\r
-#endif\r
-\r
-/* verify that the <rpcsal.h> version is high enough to compile this file*/\r
-#ifndef __REQUIRED_RPCSAL_H_VERSION__\r
-#define __REQUIRED_RPCSAL_H_VERSION__ 100\r
-#endif\r
-\r
-#include "rpc.h"\r
-#include "rpcndr.h"\r
-\r
-#ifndef __RPCNDR_H_VERSION__\r
-#error this stub requires an updated version of <rpcndr.h>\r
-#endif // __RPCNDR_H_VERSION__\r
-\r
-#ifndef COM_NO_WINDOWS_H\r
-#include "windows.h"\r
-#include "ole2.h"\r
-#endif /*COM_NO_WINDOWS_H*/\r
-\r
-#ifndef __propidl_h__\r
-#define __propidl_h__\r
-\r
-#if __GNUC__ >=3\r
-#pragma GCC system_header\r
-#endif\r
-\r
-#define interface struct\r
-#include "sal.h"\r
-#include "rpcsal.h"\r
-\r
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)\r
-#pragma once\r
-#endif\r
-\r
-/* Forward Declarations */\r
-\r
-#ifndef __IPropertyStorage_FWD_DEFINED__\r
-#define __IPropertyStorage_FWD_DEFINED__\r
-typedef interface IPropertyStorage IPropertyStorage;\r
-#endif /* __IPropertyStorage_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __IPropertySetStorage_FWD_DEFINED__\r
-#define __IPropertySetStorage_FWD_DEFINED__\r
-typedef interface IPropertySetStorage IPropertySetStorage;\r
-#endif /* __IPropertySetStorage_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __IEnumSTATPROPSTG_FWD_DEFINED__\r
-#define __IEnumSTATPROPSTG_FWD_DEFINED__\r
-typedef interface IEnumSTATPROPSTG IEnumSTATPROPSTG;\r
-#endif /* __IEnumSTATPROPSTG_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __IEnumSTATPROPSETSTG_FWD_DEFINED__\r
-#define __IEnumSTATPROPSETSTG_FWD_DEFINED__\r
-typedef interface IEnumSTATPROPSETSTG IEnumSTATPROPSETSTG;\r
-#endif /* __IEnumSTATPROPSETSTG_FWD_DEFINED__ */\r
-\r
-\r
-/* header files for imported files */\r
-#include "objidl.h"\r
-#include "oaidl.h"\r
-\r
-#ifdef __cplusplus\r
-extern "C"{\r
-#endif\r
-\r
-\r
-/* interface __MIDL_itf_propidl_0000_0000 */\r
-/* [local] */\r
-\r
-//+-------------------------------------------------------------------------\r
-//\r
-// Microsoft Windows\r
-// Copyright (c) Microsoft Corporation. All rights reserved.\r
-//\r
-//--------------------------------------------------------------------------\r
-#if ( _MSC_VER >= 800 )\r
-#if _MSC_VER >= 1200\r
-#pragma warning(push)\r
-#endif\r
-#pragma warning(disable:4201) /* Nameless struct/union */\r
-#pragma warning(disable:4237) /* obsolete member named 'bool' */\r
-#endif\r
-#if ( _MSC_VER >= 1020 )\r
-#pragma once\r
-#endif\r
-\r
-\r
-\r
-typedef struct tagVersionedStream\r
- {\r
- GUID guidVersion;\r
- IStream *pStream;\r
- } VERSIONEDSTREAM;\r
-\r
-typedef struct tagVersionedStream *LPVERSIONEDSTREAM;\r
-\r
-\r
-// Flags for IPropertySetStorage::Create\r
-#define PROPSETFLAG_DEFAULT ( 0 )\r
-\r
-#define PROPSETFLAG_NONSIMPLE ( 1 )\r
-\r
-#define PROPSETFLAG_ANSI ( 2 )\r
-\r
-// (This flag is only supported on StgCreatePropStg & StgOpenPropStg\r
-#define PROPSETFLAG_UNBUFFERED ( 4 )\r
-\r
-// (This flag causes a version-1 property set to be created\r
-#define PROPSETFLAG_CASE_SENSITIVE ( 8 )\r
-\r
-\r
-// Flags for the reservied PID_BEHAVIOR property\r
-#define PROPSET_BEHAVIOR_CASE_SENSITIVE ( 1 )\r
-\r
-#ifdef MIDL_PASS\r
-// This is the PROPVARIANT definition for marshaling.\r
-typedef struct tag_inner_PROPVARIANT PROPVARIANT;\r
-\r
-#else\r
-// This is the standard C layout of the PROPVARIANT.\r
-typedef struct tagPROPVARIANT PROPVARIANT;\r
-#endif\r
-typedef struct tagCAC\r
- {\r
- ULONG cElems;\r
- CHAR *pElems;\r
- } CAC;\r
-#ifdef WIN64\r
-typedef struct tagCAUB\r
- {\r
- ULONG cElems;\r
- UCHAR *pElems;\r
- } CAUB;\r
-\r
-typedef struct tagCAI\r
- {\r
- ULONG cElems;\r
- SHORT *pElems;\r
- } CAI;\r
-\r
-typedef struct tagCAUI\r
- {\r
- ULONG cElems;\r
- USHORT *pElems;\r
- } CAUI;\r
-\r
-typedef struct tagCAL\r
- {\r
- ULONG cElems;\r
- LONG *pElems;\r
- } CAL;\r
-\r
-typedef struct tagCAUL\r
- {\r
- ULONG cElems;\r
- ULONG *pElems;\r
- } CAUL;\r
-\r
-typedef struct tagCAFLT\r
- {\r
- ULONG cElems;\r
- FLOAT *pElems;\r
- } CAFLT;\r
-\r
-typedef struct tagCADBL\r
- {\r
- ULONG cElems;\r
- DOUBLE *pElems;\r
- } CADBL;\r
-\r
-typedef struct tagCACY\r
- {\r
- ULONG cElems;\r
- CY *pElems;\r
- } CACY;\r
-\r
-typedef struct tagCADATE\r
- {\r
- ULONG cElems;\r
- DATE *pElems;\r
- } CADATE;\r
-\r
-typedef struct tagCABSTR\r
- {\r
- ULONG cElems;\r
- BSTR *pElems;\r
- } CABSTR;\r
-\r
-typedef struct tagCABSTRBLOB\r
- {\r
- ULONG cElems;\r
- BSTRBLOB *pElems;\r
- } CABSTRBLOB;\r
-\r
-typedef struct tagCABOOL\r
- {\r
- ULONG cElems;\r
- VARIANT_BOOL *pElems;\r
- } CABOOL;\r
-\r
-typedef struct tagCASCODE\r
- {\r
- ULONG cElems;\r
- SCODE *pElems;\r
- } CASCODE;\r
-\r
-typedef struct tagCAPROPVARIANT\r
- {\r
- ULONG cElems;\r
- PROPVARIANT *pElems;\r
- } CAPROPVARIANT;\r
-\r
-typedef struct tagCAH\r
- {\r
- ULONG cElems;\r
- LARGE_INTEGER *pElems;\r
- } CAH;\r
-\r
-typedef struct tagCAUH\r
- {\r
- ULONG cElems;\r
- ULARGE_INTEGER *pElems;\r
- } CAUH;\r
-\r
-typedef struct tagCALPSTR\r
- {\r
- ULONG cElems;\r
- LPSTR *pElems;\r
- } CALPSTR;\r
-\r
-typedef struct tagCALPWSTR\r
- {\r
- ULONG cElems;\r
- LPWSTR *pElems;\r
- } CALPWSTR;\r
-\r
-typedef struct tagCAFILETIME\r
- {\r
- ULONG cElems;\r
- FILETIME *pElems;\r
- } CAFILETIME;\r
-\r
-typedef struct tagCACLIPDATA\r
- {\r
- ULONG cElems;\r
- CLIPDATA *pElems;\r
- } CACLIPDATA;\r
-\r
-typedef struct tagCACLSID\r
- {\r
- ULONG cElems;\r
- CLSID *pElems;\r
- } CACLSID;\r
-#endif\r
-#ifdef MIDL_PASS\r
-// This is the PROPVARIANT padding layout for marshaling.\r
-typedef BYTE PROPVAR_PAD1;\r
-\r
-typedef BYTE PROPVAR_PAD2;\r
-\r
-typedef ULONG PROPVAR_PAD3;\r
-\r
-#else\r
-// This is the standard C layout of the structure.\r
-typedef WORD PROPVAR_PAD1;\r
-typedef WORD PROPVAR_PAD2;\r
-typedef WORD PROPVAR_PAD3;\r
-#define tag_inner_PROPVARIANT\r
-#endif\r
-#ifdef WIN64\r
-#ifndef MIDL_PASS\r
-struct tagPROPVARIANT {\r
- union {\r
-#endif\r
-struct tag_inner_PROPVARIANT\r
- {\r
- VARTYPE vt;\r
- PROPVAR_PAD1 wReserved1;\r
- PROPVAR_PAD2 wReserved2;\r
- PROPVAR_PAD3 wReserved3;\r
- /* [switch_type] */ union\r
- {\r
- /* Empty union arm */\r
- CHAR cVal;\r
- UCHAR bVal;\r
- SHORT iVal;\r
- USHORT uiVal;\r
- LONG lVal;\r
- ULONG ulVal;\r
- INT intVal;\r
- UINT uintVal;\r
- LARGE_INTEGER hVal;\r
- ULARGE_INTEGER uhVal;\r
- FLOAT fltVal;\r
- DOUBLE dblVal;\r
- VARIANT_BOOL boolVal;\r
- //_VARIANT_BOOL bool;\r
- SCODE scode;\r
- CY cyVal;\r
- DATE date;\r
- FILETIME filetime;\r
- CLSID *puuid;\r
- CLIPDATA *pclipdata;\r
- BSTR bstrVal;\r
- BSTRBLOB bstrblobVal;\r
- BLOB blob;\r
- LPSTR pszVal;\r
- LPWSTR pwszVal;\r
- IUnknown *punkVal;\r
- IDispatch *pdispVal;\r
- IStream *pStream;\r
- IStorage *pStorage;\r
- LPVERSIONEDSTREAM pVersionedStream;\r
- LPSAFEARRAY parray;\r
- CAC cac;\r
- CAUB caub;\r
- CAI cai;\r
- CAUI caui;\r
- CAL cal;\r
- CAUL caul;\r
- CAH cah;\r
- CAUH cauh;\r
- CAFLT caflt;\r
- CADBL cadbl;\r
- CABOOL cabool;\r
- CASCODE cascode;\r
- CACY cacy;\r
- CADATE cadate;\r
- CAFILETIME cafiletime;\r
- CACLSID cauuid;\r
- CACLIPDATA caclipdata;\r
- CABSTR cabstr;\r
- CABSTRBLOB cabstrblob;\r
- CALPSTR calpstr;\r
- CALPWSTR calpwstr;\r
- CAPROPVARIANT capropvar;\r
- CHAR *pcVal;\r
- UCHAR *pbVal;\r
- SHORT *piVal;\r
- USHORT *puiVal;\r
- LONG *plVal;\r
- ULONG *pulVal;\r
- INT *pintVal;\r
- UINT *puintVal;\r
- FLOAT *pfltVal;\r
- DOUBLE *pdblVal;\r
- VARIANT_BOOL *pboolVal;\r
- DECIMAL *pdecVal;\r
- SCODE *pscode;\r
- CY *pcyVal;\r
- DATE *pdate;\r
- BSTR *pbstrVal;\r
- IUnknown **ppunkVal;\r
- IDispatch **ppdispVal;\r
- LPSAFEARRAY *pparray;\r
- PROPVARIANT *pvarVal;\r
- } ;\r
- } ;\r
-#ifndef MIDL_PASS\r
- DECIMAL decVal;\r
- };\r
-};\r
-#endif\r
-#endif\r
-#ifdef MIDL_PASS\r
-// This is the LPPROPVARIANT definition for marshaling.\r
-typedef struct tag_inner_PROPVARIANT *LPPROPVARIANT;\r
-\r
-typedef const PROPVARIANT *REFPROPVARIANT;\r
-\r
-#else\r
-\r
-// This is the standard C layout of the PROPVARIANT.\r
-#ifdef WIN64\r
-typedef struct tagPROPVARIANT * LPPROPVARIANT;\r
-#endif\r
-\r
-#ifndef _REFPROPVARIANT_DEFINED\r
-#define _REFPROPVARIANT_DEFINED\r
-#ifdef __cplusplus\r
-#define REFPROPVARIANT const PROPVARIANT &\r
-#else\r
-#define REFPROPVARIANT const PROPVARIANT * __MIDL_CONST\r
-#endif\r
-#endif\r
-\r
-#endif // MIDL_PASS\r
-\r
-// Reserved global Property IDs\r
-#define PID_DICTIONARY ( 0 )\r
-\r
-#define PID_CODEPAGE ( 0x1 )\r
-\r
-#define PID_FIRST_USABLE ( 0x2 )\r
-\r
-#define PID_FIRST_NAME_DEFAULT ( 0xfff )\r
-\r
-#define PID_LOCALE ( 0x80000000 )\r
-\r
-#define PID_MODIFY_TIME ( 0x80000001 )\r
-\r
-#define PID_SECURITY ( 0x80000002 )\r
-\r
-#define PID_BEHAVIOR ( 0x80000003 )\r
-\r
-#define PID_ILLEGAL ( 0xffffffff )\r
-\r
-// Range which is read-only to downlevel implementations\r
-#define PID_MIN_READONLY ( 0x80000000 )\r
-\r
-#define PID_MAX_READONLY ( 0xbfffffff )\r
-\r
-// Property IDs for the DiscardableInformation Property Set\r
-\r
-#define PIDDI_THUMBNAIL 0x00000002L // VT_BLOB\r
-\r
-// Property IDs for the SummaryInformation Property Set\r
-\r
-#define PIDSI_TITLE 0x00000002L // VT_LPSTR\r
-#define PIDSI_SUBJECT 0x00000003L // VT_LPSTR\r
-#define PIDSI_AUTHOR 0x00000004L // VT_LPSTR\r
-#define PIDSI_KEYWORDS 0x00000005L // VT_LPSTR\r
-#define PIDSI_COMMENTS 0x00000006L // VT_LPSTR\r
-#define PIDSI_TEMPLATE 0x00000007L // VT_LPSTR\r
-#define PIDSI_LASTAUTHOR 0x00000008L // VT_LPSTR\r
-#define PIDSI_REVNUMBER 0x00000009L // VT_LPSTR\r
-#define PIDSI_EDITTIME 0x0000000aL // VT_FILETIME (UTC)\r
-#define PIDSI_LASTPRINTED 0x0000000bL // VT_FILETIME (UTC)\r
-#define PIDSI_CREATE_DTM 0x0000000cL // VT_FILETIME (UTC)\r
-#define PIDSI_LASTSAVE_DTM 0x0000000dL // VT_FILETIME (UTC)\r
-#define PIDSI_PAGECOUNT 0x0000000eL // VT_I4\r
-#define PIDSI_WORDCOUNT 0x0000000fL // VT_I4\r
-#define PIDSI_CHARCOUNT 0x00000010L // VT_I4\r
-#define PIDSI_THUMBNAIL 0x00000011L // VT_CF\r
-#define PIDSI_APPNAME 0x00000012L // VT_LPSTR\r
-#define PIDSI_DOC_SECURITY 0x00000013L // VT_I4\r
-\r
-// Property IDs for the DocSummaryInformation Property Set\r
-\r
-#define PIDDSI_CATEGORY 0x00000002 // VT_LPSTR\r
-#define PIDDSI_PRESFORMAT 0x00000003 // VT_LPSTR\r
-#define PIDDSI_BYTECOUNT 0x00000004 // VT_I4\r
-#define PIDDSI_LINECOUNT 0x00000005 // VT_I4\r
-#define PIDDSI_PARCOUNT 0x00000006 // VT_I4\r
-#define PIDDSI_SLIDECOUNT 0x00000007 // VT_I4\r
-#define PIDDSI_NOTECOUNT 0x00000008 // VT_I4\r
-#define PIDDSI_HIDDENCOUNT 0x00000009 // VT_I4\r
-#define PIDDSI_MMCLIPCOUNT 0x0000000A // VT_I4\r
-#define PIDDSI_SCALE 0x0000000B // VT_BOOL\r
-#define PIDDSI_HEADINGPAIR 0x0000000C // VT_VARIANT | VT_VECTOR\r
-#define PIDDSI_DOCPARTS 0x0000000D // VT_LPSTR | VT_VECTOR\r
-#define PIDDSI_MANAGER 0x0000000E // VT_LPSTR\r
-#define PIDDSI_COMPANY 0x0000000F // VT_LPSTR\r
-#define PIDDSI_LINKSDIRTY 0x00000010 // VT_BOOL\r
-\r
-\r
-// FMTID_MediaFileSummaryInfo - Property IDs\r
-\r
-#define PIDMSI_EDITOR 0x00000002L // VT_LPWSTR\r
-#define PIDMSI_SUPPLIER 0x00000003L // VT_LPWSTR\r
-#define PIDMSI_SOURCE 0x00000004L // VT_LPWSTR\r
-#define PIDMSI_SEQUENCE_NO 0x00000005L // VT_LPWSTR\r
-#define PIDMSI_PROJECT 0x00000006L // VT_LPWSTR\r
-#define PIDMSI_STATUS 0x00000007L // VT_UI4\r
-#define PIDMSI_OWNER 0x00000008L // VT_LPWSTR\r
-#define PIDMSI_RATING 0x00000009L // VT_LPWSTR\r
-#define PIDMSI_PRODUCTION 0x0000000AL // VT_FILETIME (UTC)\r
-#define PIDMSI_COPYRIGHT 0x0000000BL // VT_LPWSTR\r
-\r
-// PIDMSI_STATUS value definitions\r
-\r
-enum PIDMSI_STATUS_VALUE\r
- { PIDMSI_STATUS_NORMAL = 0,\r
- PIDMSI_STATUS_NEW = ( PIDMSI_STATUS_NORMAL + 1 ) ,\r
- PIDMSI_STATUS_PRELIM = ( PIDMSI_STATUS_NEW + 1 ) ,\r
- PIDMSI_STATUS_DRAFT = ( PIDMSI_STATUS_PRELIM + 1 ) ,\r
- PIDMSI_STATUS_INPROGRESS = ( PIDMSI_STATUS_DRAFT + 1 ) ,\r
- PIDMSI_STATUS_EDIT = ( PIDMSI_STATUS_INPROGRESS + 1 ) ,\r
- PIDMSI_STATUS_REVIEW = ( PIDMSI_STATUS_EDIT + 1 ) ,\r
- PIDMSI_STATUS_PROOF = ( PIDMSI_STATUS_REVIEW + 1 ) ,\r
- PIDMSI_STATUS_FINAL = ( PIDMSI_STATUS_PROOF + 1 ) ,\r
- PIDMSI_STATUS_OTHER = 0x7fff\r
- } ;\r
-#define PRSPEC_INVALID ( 0xffffffff )\r
-\r
-#define PRSPEC_LPWSTR ( 0 )\r
-\r
-#define PRSPEC_PROPID ( 1 )\r
-\r
-#ifdef WIN64\r
-typedef struct tagPROPSPEC\r
- {\r
- ULONG ulKind;\r
- /* [switch_type] */ union\r
- {\r
- PROPID propid;\r
- LPOLESTR lpwstr;\r
- /* Empty union arm */\r
- } ;\r
- } PROPSPEC;\r
-\r
-typedef struct tagSTATPROPSTG\r
- {\r
- LPOLESTR lpwstrName;\r
- PROPID propid;\r
- VARTYPE vt;\r
- } STATPROPSTG;\r
-#endif\r
-\r
-// Macros for parsing the OS Version of the Property Set Header\r
-#define PROPSETHDR_OSVER_KIND(dwOSVer) HIWORD( (dwOSVer) )\r
-#define PROPSETHDR_OSVER_MAJOR(dwOSVer) LOBYTE(LOWORD( (dwOSVer) ))\r
-#define PROPSETHDR_OSVER_MINOR(dwOSVer) HIBYTE(LOWORD( (dwOSVer) ))\r
-#define PROPSETHDR_OSVERSION_UNKNOWN 0xFFFFFFFF\r
-#ifdef WIN64\r
-typedef struct tagSTATPROPSETSTG\r
- {\r
- FMTID fmtid;\r
- CLSID clsid;\r
- DWORD grfFlags;\r
- FILETIME mtime;\r
- FILETIME ctime;\r
- FILETIME atime;\r
- DWORD dwOSVersion;\r
- } STATPROPSETSTG;\r
-#endif\r
-\r
-\r
-extern RPC_IF_HANDLE __MIDL_itf_propidl_0000_0000_v0_0_c_ifspec;\r
-extern RPC_IF_HANDLE __MIDL_itf_propidl_0000_0000_v0_0_s_ifspec;\r
-\r
-#ifndef __IPropertyStorage_INTERFACE_DEFINED__\r
-#define __IPropertyStorage_INTERFACE_DEFINED__\r
-\r
-/* interface IPropertyStorage */\r
-/* [unique][uuid][object] */\r
-\r
-\r
-EXTERN_C const IID IID_IPropertyStorage;\r
-\r
-#if defined(__cplusplus) && !defined(CINTERFACE)\r
-\r
- MIDL_INTERFACE("00000138-0000-0000-C000-000000000046")\r
- IPropertyStorage : public IUnknown\r
- {\r
- public:\r
- virtual HRESULT STDMETHODCALLTYPE ReadMultiple(\r
- /* [in] */ ULONG cpspec,\r
- /* [size_is][in] */ __RPC__in_ecount_full(cpspec) const PROPSPEC rgpspec[ ],\r
- /* [size_is][out] */ __RPC__out_ecount_full(cpspec) PROPVARIANT rgpropvar[ ]) = 0;\r
-\r
- virtual HRESULT STDMETHODCALLTYPE WriteMultiple(\r
- /* [in] */ ULONG cpspec,\r
- /* [size_is][in] */ __RPC__in_ecount_full(cpspec) const PROPSPEC rgpspec[ ],\r
- /* [size_is][in] */ __RPC__in_ecount_full(cpspec) const PROPVARIANT rgpropvar[ ],\r
- /* [in] */ PROPID propidNameFirst) = 0;\r
-\r
- virtual HRESULT STDMETHODCALLTYPE DeleteMultiple(\r
- /* [in] */ ULONG cpspec,\r
- /* [size_is][in] */ __RPC__in_ecount_full(cpspec) const PROPSPEC rgpspec[ ]) = 0;\r
-\r
- virtual HRESULT STDMETHODCALLTYPE ReadPropertyNames(\r
- /* [in] */ ULONG cpropid,\r
- /* [size_is][in] */ __RPC__in_ecount_full(cpropid) const PROPID rgpropid[ ],\r
- /* [size_is][out] */ __RPC__out_ecount_full(cpropid) LPOLESTR rglpwstrName[ ]) = 0;\r
-\r
- virtual HRESULT STDMETHODCALLTYPE WritePropertyNames(\r
- /* [in] */ ULONG cpropid,\r
- /* [size_is][in] */ __RPC__in_ecount_full(cpropid) const PROPID rgpropid[ ],\r
- /* [size_is][in] */ __RPC__in_ecount_full(cpropid) const LPOLESTR rglpwstrName[ ]) = 0;\r
-\r
- virtual HRESULT STDMETHODCALLTYPE DeletePropertyNames(\r
- /* [in] */ ULONG cpropid,\r
- /* [size_is][in] */ __RPC__in_ecount_full(cpropid) const PROPID rgpropid[ ]) = 0;\r
-\r
- virtual HRESULT STDMETHODCALLTYPE Commit(\r
- /* [in] */ DWORD grfCommitFlags) = 0;\r
-\r
- virtual HRESULT STDMETHODCALLTYPE Revert( void) = 0;\r
-\r
- virtual HRESULT STDMETHODCALLTYPE Enum(\r
- /* [out] */ __RPC__deref_out_opt IEnumSTATPROPSTG **ppenum) = 0;\r
-\r
- virtual HRESULT STDMETHODCALLTYPE SetTimes(\r
- /* [in] */ __RPC__in const FILETIME *pctime,\r
- /* [in] */ __RPC__in const FILETIME *patime,\r
- /* [in] */ __RPC__in const FILETIME *pmtime) = 0;\r
-\r
- virtual HRESULT STDMETHODCALLTYPE SetClass(\r
- /* [in] */ __RPC__in REFCLSID clsid) = 0;\r
-\r
- virtual HRESULT STDMETHODCALLTYPE Stat(\r
- /* [out] */ __RPC__out STATPROPSETSTG *pstatpsstg) = 0;\r
-\r
- };\r
-\r
-#else /* C style interface */\r
-\r
-// typedef struct IPropertyStorageVtbl\r
-// {\r
-// BEGIN_INTERFACE\r
-//\r
-// HRESULT ( STDMETHODCALLTYPE *QueryInterface )(\r
-// IPropertyStorage * This,\r
-// /* [in] */ __RPC__in REFIID riid,\r
-// /* [iid_is][out] */\r
-// __RPC__deref_out void **ppvObject);\r
-//\r
-// ULONG ( STDMETHODCALLTYPE *AddRef )(\r
-// IPropertyStorage * This);\r
-//\r
-// ULONG ( STDMETHODCALLTYPE *Release )(\r
-// IPropertyStorage * This);\r
-//\r
-// HRESULT ( STDMETHODCALLTYPE *ReadMultiple )(\r
-// IPropertyStorage * This,\r
-// /* [in] */ ULONG cpspec,\r
-// /* [size_is][in] */ __RPC__in_ecount_full(cpspec) const PROPSPEC rgpspec[ ],\r
-// /* [size_is][out] */ __RPC__out_ecount_full(cpspec) PROPVARIANT rgpropvar[ ]);\r
-//\r
-// HRESULT ( STDMETHODCALLTYPE *WriteMultiple )(\r
-// IPropertyStorage * This,\r
-// /* [in] */ ULONG cpspec,\r
-// /* [size_is][in] */ __RPC__in_ecount_full(cpspec) const PROPSPEC rgpspec[ ],\r
-// /* [size_is][in] */ __RPC__in_ecount_full(cpspec) const PROPVARIANT rgpropvar[ ],\r
-// /* [in] */ PROPID propidNameFirst);\r
-//\r
-// HRESULT ( STDMETHODCALLTYPE *DeleteMultiple )(\r
-// IPropertyStorage * This,\r
-// /* [in] */ ULONG cpspec,\r
-// /* [size_is][in] */ __RPC__in_ecount_full(cpspec) const PROPSPEC rgpspec[ ]);\r
-//\r
-// HRESULT ( STDMETHODCALLTYPE *ReadPropertyNames )(\r
-// IPropertyStorage * This,\r
-// /* [in] */ ULONG cpropid,\r
-// /* [size_is][in] */ __RPC__in_ecount_full(cpropid) const PROPID rgpropid[ ],\r
-// /* [size_is][out] */ __RPC__out_ecount_full(cpropid) LPOLESTR rglpwstrName[ ]);\r
-//\r
-// HRESULT ( STDMETHODCALLTYPE *WritePropertyNames )(\r
-// IPropertyStorage * This,\r
-// /* [in] */ ULONG cpropid,\r
-// /* [size_is][in] */ __RPC__in_ecount_full(cpropid) const PROPID rgpropid[ ],\r
-// /* [size_is][in] */ __RPC__in_ecount_full(cpropid) const LPOLESTR rglpwstrName[ ]);\r
-//\r
-// HRESULT ( STDMETHODCALLTYPE *DeletePropertyNames )(\r
-// IPropertyStorage * This,\r
-// /* [in] */ ULONG cpropid,\r
-// /* [size_is][in] */ __RPC__in_ecount_full(cpropid) const PROPID rgpropid[ ]);\r
-//\r
-// HRESULT ( STDMETHODCALLTYPE *Commit )(\r
-// IPropertyStorage * This,\r
-// /* [in] */ DWORD grfCommitFlags);\r
-//\r
-// HRESULT ( STDMETHODCALLTYPE *Revert )(\r
-// IPropertyStorage * This);\r
-//\r
-// HRESULT ( STDMETHODCALLTYPE *Enum )(\r
-// IPropertyStorage * This,\r
-// /* [out] */ __RPC__deref_out_opt IEnumSTATPROPSTG **ppenum);\r
-//\r
-// HRESULT ( STDMETHODCALLTYPE *SetTimes )(\r
-// IPropertyStorage * This,\r
-// /* [in] */ __RPC__in const FILETIME *pctime,\r
-// /* [in] */ __RPC__in const FILETIME *patime,\r
-// /* [in] */ __RPC__in const FILETIME *pmtime);\r
-//\r
-// HRESULT ( STDMETHODCALLTYPE *SetClass )(\r
-// IPropertyStorage * This,\r
-// /* [in] */ __RPC__in REFCLSID clsid);\r
-//\r
-// HRESULT ( STDMETHODCALLTYPE *Stat )(\r
-// IPropertyStorage * This,\r
-// /* [out] */ __RPC__out STATPROPSETSTG *pstatpsstg);\r
-//\r
-// END_INTERFACE\r
-// } IPropertyStorageVtbl;\r
-//\r
-// interface IPropertyStorage\r
-// {\r
-// CONST_VTBL struct IPropertyStorageVtbl *lpVtbl;\r
-// };\r
-\r
-\r
-\r
-#ifdef COBJMACROS\r
-\r
-\r
-#define IPropertyStorage_QueryInterface(This,riid,ppvObject) \\r
- ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )\r
-\r
-#define IPropertyStorage_AddRef(This) \\r
- ( (This)->lpVtbl -> AddRef(This) )\r
-\r
-#define IPropertyStorage_Release(This) \\r
- ( (This)->lpVtbl -> Release(This) )\r
-\r
-\r
-#define IPropertyStorage_ReadMultiple(This,cpspec,rgpspec,rgpropvar) \\r
- ( (This)->lpVtbl -> ReadMultiple(This,cpspec,rgpspec,rgpropvar) )\r
-\r
-#define IPropertyStorage_WriteMultiple(This,cpspec,rgpspec,rgpropvar,propidNameFirst) \\r
- ( (This)->lpVtbl -> WriteMultiple(This,cpspec,rgpspec,rgpropvar,propidNameFirst) )\r
-\r
-#define IPropertyStorage_DeleteMultiple(This,cpspec,rgpspec) \\r
- ( (This)->lpVtbl -> DeleteMultiple(This,cpspec,rgpspec) )\r
-\r
-#define IPropertyStorage_ReadPropertyNames(This,cpropid,rgpropid,rglpwstrName) \\r
- ( (This)->lpVtbl -> ReadPropertyNames(This,cpropid,rgpropid,rglpwstrName) )\r
-\r
-#define IPropertyStorage_WritePropertyNames(This,cpropid,rgpropid,rglpwstrName) \\r
- ( (This)->lpVtbl -> WritePropertyNames(This,cpropid,rgpropid,rglpwstrName) )\r
-\r
-#define IPropertyStorage_DeletePropertyNames(This,cpropid,rgpropid) \\r
- ( (This)->lpVtbl -> DeletePropertyNames(This,cpropid,rgpropid) )\r
-\r
-#define IPropertyStorage_Commit(This,grfCommitFlags) \\r
- ( (This)->lpVtbl -> Commit(This,grfCommitFlags) )\r
-\r
-#define IPropertyStorage_Revert(This) \\r
- ( (This)->lpVtbl -> Revert(This) )\r
-\r
-#define IPropertyStorage_Enum(This,ppenum) \\r
- ( (This)->lpVtbl -> Enum(This,ppenum) )\r
-\r
-#define IPropertyStorage_SetTimes(This,pctime,patime,pmtime) \\r
- ( (This)->lpVtbl -> SetTimes(This,pctime,patime,pmtime) )\r
-\r
-#define IPropertyStorage_SetClass(This,clsid) \\r
- ( (This)->lpVtbl -> SetClass(This,clsid) )\r
-\r
-#define IPropertyStorage_Stat(This,pstatpsstg) \\r
- ( (This)->lpVtbl -> Stat(This,pstatpsstg) )\r
-\r
-#endif /* COBJMACROS */\r
-\r
-\r
-#endif /* C style interface */\r
-\r
-\r
-\r
-\r
-#endif /* __IPropertyStorage_INTERFACE_DEFINED__ */\r
-\r
-\r
-#ifndef __IPropertySetStorage_INTERFACE_DEFINED__\r
-#define __IPropertySetStorage_INTERFACE_DEFINED__\r
-\r
-/* interface IPropertySetStorage */\r
-/* [unique][uuid][object] */\r
-\r
-typedef /* [unique] */ __RPC_unique_pointer IPropertySetStorage *LPPROPERTYSETSTORAGE;\r
-\r
-\r
-EXTERN_C const IID IID_IPropertySetStorage;\r
-\r
-#if defined(__cplusplus) && !defined(CINTERFACE)\r
-\r
- MIDL_INTERFACE("0000013A-0000-0000-C000-000000000046")\r
- IPropertySetStorage : public IUnknown\r
- {\r
- public:\r
- virtual HRESULT STDMETHODCALLTYPE Create(\r
- /* [in] */ __RPC__in REFFMTID rfmtid,\r
- /* [unique][in] */ __RPC__in_opt const CLSID *pclsid,\r
- /* [in] */ DWORD grfFlags,\r
- /* [in] */ DWORD grfMode,\r
- /* [out] */ __RPC__deref_out_opt IPropertyStorage **ppprstg) = 0;\r
-\r
- virtual HRESULT STDMETHODCALLTYPE Open(\r
- /* [in] */ __RPC__in REFFMTID rfmtid,\r
- /* [in] */ DWORD grfMode,\r
- /* [out] */ __RPC__deref_out_opt IPropertyStorage **ppprstg) = 0;\r
-\r
- virtual HRESULT STDMETHODCALLTYPE Delete(\r
- /* [in] */ __RPC__in REFFMTID rfmtid) = 0;\r
-\r
- virtual HRESULT STDMETHODCALLTYPE Enum(\r
- /* [out] */ __RPC__deref_out_opt IEnumSTATPROPSETSTG **ppenum) = 0;\r
-\r
- };\r
-\r
-#else /* C style interface */\r
-\r
-// typedef struct IPropertySetStorageVtbl\r
-// {\r
-// BEGIN_INTERFACE\r
-//\r
-// HRESULT ( STDMETHODCALLTYPE *QueryInterface )(\r
-// IPropertySetStorage * This,\r
-// /* [in] */ __RPC__in REFIID riid,\r
-// /* [iid_is][out] */\r
-// __RPC__deref_out void **ppvObject);\r
-//\r
-// ULONG ( STDMETHODCALLTYPE *AddRef )(\r
-// IPropertySetStorage * This);\r
-//\r
-// ULONG ( STDMETHODCALLTYPE *Release )(\r
-// IPropertySetStorage * This);\r
-//\r
-// HRESULT ( STDMETHODCALLTYPE *Create )(\r
-// IPropertySetStorage * This,\r
-// /* [in] */ __RPC__in REFFMTID rfmtid,\r
-// /* [unique][in] */ __RPC__in_opt const CLSID *pclsid,\r
-// /* [in] */ DWORD grfFlags,\r
-// /* [in] */ DWORD grfMode,\r
-// /* [out] */ __RPC__deref_out_opt IPropertyStorage **ppprstg);\r
-//\r
-// HRESULT ( STDMETHODCALLTYPE *Open )(\r
-// IPropertySetStorage * This,\r
-// /* [in] */ __RPC__in REFFMTID rfmtid,\r
-// /* [in] */ DWORD grfMode,\r
-// /* [out] */ __RPC__deref_out_opt IPropertyStorage **ppprstg);\r
-//\r
-// HRESULT ( STDMETHODCALLTYPE *Delete )(\r
-// IPropertySetStorage * This,\r
-// /* [in] */ __RPC__in REFFMTID rfmtid);\r
-//\r
-// HRESULT ( STDMETHODCALLTYPE *Enum )(\r
-// IPropertySetStorage * This,\r
-// /* [out] */ __RPC__deref_out_opt IEnumSTATPROPSETSTG **ppenum);\r
-//\r
-// END_INTERFACE\r
-// } IPropertySetStorageVtbl;\r
-//\r
-// interface IPropertySetStorage\r
-// {\r
-// CONST_VTBL struct IPropertySetStorageVtbl *lpVtbl;\r
-// };\r
-\r
-\r
-\r
-#ifdef COBJMACROS\r
-\r
-\r
-#define IPropertySetStorage_QueryInterface(This,riid,ppvObject) \\r
- ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )\r
-\r
-#define IPropertySetStorage_AddRef(This) \\r
- ( (This)->lpVtbl -> AddRef(This) )\r
-\r
-#define IPropertySetStorage_Release(This) \\r
- ( (This)->lpVtbl -> Release(This) )\r
-\r
-\r
-#define IPropertySetStorage_Create(This,rfmtid,pclsid,grfFlags,grfMode,ppprstg) \\r
- ( (This)->lpVtbl -> Create(This,rfmtid,pclsid,grfFlags,grfMode,ppprstg) )\r
-\r
-#define IPropertySetStorage_Open(This,rfmtid,grfMode,ppprstg) \\r
- ( (This)->lpVtbl -> Open(This,rfmtid,grfMode,ppprstg) )\r
-\r
-#define IPropertySetStorage_Delete(This,rfmtid) \\r
- ( (This)->lpVtbl -> Delete(This,rfmtid) )\r
-\r
-#define IPropertySetStorage_Enum(This,ppenum) \\r
- ( (This)->lpVtbl -> Enum(This,ppenum) )\r
-\r
-#endif /* COBJMACROS */\r
-\r
-\r
-#endif /* C style interface */\r
-\r
-\r
-\r
-\r
-#endif /* __IPropertySetStorage_INTERFACE_DEFINED__ */\r
-\r
-\r
-#ifndef __IEnumSTATPROPSTG_INTERFACE_DEFINED__\r
-#define __IEnumSTATPROPSTG_INTERFACE_DEFINED__\r
-\r
-/* interface IEnumSTATPROPSTG */\r
-/* [unique][uuid][object] */\r
-\r
-//typedef /* [unique] */ __RPC_unique_pointer IEnumSTATPROPSTG *LPENUMSTATPROPSTG;\r
-\r
-\r
-EXTERN_C const IID IID_IEnumSTATPROPSTG;\r
-\r
-#if defined(__cplusplus) && !defined(CINTERFACE)\r
-\r
- MIDL_INTERFACE("00000139-0000-0000-C000-000000000046")\r
- IEnumSTATPROPSTG : public IUnknown\r
- {\r
- public:\r
- virtual /* [local] */ HRESULT STDMETHODCALLTYPE Next(\r
- /* [in] */ ULONG celt,\r
- /* [length_is][size_is][out] */ STATPROPSTG *rgelt,\r
- /* [out] */ ULONG *pceltFetched) = 0;\r
-\r
- virtual HRESULT STDMETHODCALLTYPE Skip(\r
- /* [in] */ ULONG celt) = 0;\r
-\r
- virtual HRESULT STDMETHODCALLTYPE Reset( void) = 0;\r
-\r
- virtual HRESULT STDMETHODCALLTYPE Clone(\r
- /* [out] */ __RPC__deref_out_opt IEnumSTATPROPSTG **ppenum) = 0;\r
-\r
- };\r
-\r
-#else /* C style interface */\r
-\r
-// typedef struct IEnumSTATPROPSTGVtbl\r
-// {\r
-// BEGIN_INTERFACE\r
-//\r
-// HRESULT ( STDMETHODCALLTYPE *QueryInterface )(\r
-// IEnumSTATPROPSTG * This,\r
-// /* [in] */ __RPC__in REFIID riid,\r
-// /* [iid_is][out] */\r
-// __RPC__deref_out void **ppvObject);\r
-//\r
-// ULONG ( STDMETHODCALLTYPE *AddRef )(\r
-// IEnumSTATPROPSTG * This);\r
-//\r
-// ULONG ( STDMETHODCALLTYPE *Release )(\r
-// IEnumSTATPROPSTG * This);\r
-//\r
-// /* [local] */ HRESULT ( STDMETHODCALLTYPE *Next )(\r
-// IEnumSTATPROPSTG * This,\r
-// /* [in] */ ULONG celt,\r
-// /* [length_is][size_is][out] */ STATPROPSTG *rgelt,\r
-// /* [out] */ ULONG *pceltFetched);\r
-//\r
-// HRESULT ( STDMETHODCALLTYPE *Skip )(\r
-// IEnumSTATPROPSTG * This,\r
-// /* [in] */ ULONG celt);\r
-//\r
-// HRESULT ( STDMETHODCALLTYPE *Reset )(\r
-// IEnumSTATPROPSTG * This);\r
-//\r
-// HRESULT ( STDMETHODCALLTYPE *Clone )(\r
-// IEnumSTATPROPSTG * This,\r
-// /* [out] */ __RPC__deref_out_opt IEnumSTATPROPSTG **ppenum);\r
-//\r
-// END_INTERFACE\r
-// } IEnumSTATPROPSTGVtbl;\r
-//\r
-// interface IEnumSTATPROPSTG\r
-// {\r
-// CONST_VTBL struct IEnumSTATPROPSTGVtbl *lpVtbl;\r
-// };\r
-\r
-\r
-\r
-#ifdef COBJMACROS\r
-\r
-\r
-#define IEnumSTATPROPSTG_QueryInterface(This,riid,ppvObject) \\r
- ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )\r
-\r
-#define IEnumSTATPROPSTG_AddRef(This) \\r
- ( (This)->lpVtbl -> AddRef(This) )\r
-\r
-#define IEnumSTATPROPSTG_Release(This) \\r
- ( (This)->lpVtbl -> Release(This) )\r
-\r
-\r
-#define IEnumSTATPROPSTG_Next(This,celt,rgelt,pceltFetched) \\r
- ( (This)->lpVtbl -> Next(This,celt,rgelt,pceltFetched) )\r
-\r
-#define IEnumSTATPROPSTG_Skip(This,celt) \\r
- ( (This)->lpVtbl -> Skip(This,celt) )\r
-\r
-#define IEnumSTATPROPSTG_Reset(This) \\r
- ( (This)->lpVtbl -> Reset(This) )\r
-\r
-#define IEnumSTATPROPSTG_Clone(This,ppenum) \\r
- ( (This)->lpVtbl -> Clone(This,ppenum) )\r
-\r
-#endif /* COBJMACROS */\r
-\r
-\r
-#endif /* C style interface */\r
-\r
-\r
-\r
-/* [call_as] */ HRESULT STDMETHODCALLTYPE IEnumSTATPROPSTG_RemoteNext_Proxy(\r
- IEnumSTATPROPSTG * This,\r
- /* [in] */ ULONG celt,\r
- /* [length_is][size_is][out] */ __RPC__out_ecount_part(celt, *pceltFetched) STATPROPSTG *rgelt,\r
- /* [out] */ __RPC__out ULONG *pceltFetched);\r
-\r
-\r
-void __RPC_STUB IEnumSTATPROPSTG_RemoteNext_Stub(\r
- IRpcStubBuffer *This,\r
- IRpcChannelBuffer *_pRpcChannelBuffer,\r
- PRPC_MESSAGE _pRpcMessage,\r
- DWORD *_pdwStubPhase);\r
-\r
-\r
-\r
-#endif /* __IEnumSTATPROPSTG_INTERFACE_DEFINED__ */\r
-\r
-\r
-#ifndef __IEnumSTATPROPSETSTG_INTERFACE_DEFINED__\r
-#define __IEnumSTATPROPSETSTG_INTERFACE_DEFINED__\r
-\r
-/* interface IEnumSTATPROPSETSTG */\r
-/* [unique][uuid][object] */\r
-\r
-typedef /* [unique] */ __RPC_unique_pointer IEnumSTATPROPSETSTG *LPENUMSTATPROPSETSTG;\r
-\r
-\r
-EXTERN_C const IID IID_IEnumSTATPROPSETSTG;\r
-\r
-#if defined(__cplusplus) && !defined(CINTERFACE)\r
-\r
- MIDL_INTERFACE("0000013B-0000-0000-C000-000000000046")\r
- IEnumSTATPROPSETSTG : public IUnknown\r
- {\r
- public:\r
- virtual /* [local] */ HRESULT STDMETHODCALLTYPE Next(\r
- /* [in] */ ULONG celt,\r
- /* [length_is][size_is][out] */ STATPROPSETSTG *rgelt,\r
- /* [out] */ ULONG *pceltFetched) = 0;\r
-\r
- virtual HRESULT STDMETHODCALLTYPE Skip(\r
- /* [in] */ ULONG celt) = 0;\r
-\r
- virtual HRESULT STDMETHODCALLTYPE Reset( void) = 0;\r
-\r
- virtual HRESULT STDMETHODCALLTYPE Clone(\r
- /* [out] */ __RPC__deref_out_opt IEnumSTATPROPSETSTG **ppenum) = 0;\r
-\r
- };\r
-\r
-#else /* C style interface */\r
-\r
-// typedef struct IEnumSTATPROPSETSTGVtbl\r
-// {\r
-// BEGIN_INTERFACE\r
-//\r
-// HRESULT ( STDMETHODCALLTYPE *QueryInterface )(\r
-// IEnumSTATPROPSETSTG * This,\r
-// /* [in] */ __RPC__in REFIID riid,\r
-// /* [iid_is][out] */\r
-// __RPC__deref_out void **ppvObject);\r
-//\r
-// ULONG ( STDMETHODCALLTYPE *AddRef )(\r
-// IEnumSTATPROPSETSTG * This);\r
-//\r
-// ULONG ( STDMETHODCALLTYPE *Release )(\r
-// IEnumSTATPROPSETSTG * This);\r
-//\r
-// /* [local] */ HRESULT ( STDMETHODCALLTYPE *Next )(\r
-// IEnumSTATPROPSETSTG * This,\r
-// /* [in] */ ULONG celt,\r
-// /* [length_is][size_is][out] */ STATPROPSETSTG *rgelt,\r
-// /* [out] */ ULONG *pceltFetched);\r
-//\r
-// HRESULT ( STDMETHODCALLTYPE *Skip )(\r
-// IEnumSTATPROPSETSTG * This,\r
-// /* [in] */ ULONG celt);\r
-//\r
-// HRESULT ( STDMETHODCALLTYPE *Reset )(\r
-// IEnumSTATPROPSETSTG * This);\r
-//\r
-// HRESULT ( STDMETHODCALLTYPE *Clone )(\r
-// IEnumSTATPROPSETSTG * This,\r
-// /* [out] */ __RPC__deref_out_opt IEnumSTATPROPSETSTG **ppenum);\r
-//\r
-// END_INTERFACE\r
-// } IEnumSTATPROPSETSTGVtbl;\r
-//\r
-// interface IEnumSTATPROPSETSTG\r
-// {\r
-// CONST_VTBL struct IEnumSTATPROPSETSTGVtbl *lpVtbl;\r
-// };\r
-\r
-\r
-\r
-#ifdef COBJMACROS\r
-\r
-\r
-#define IEnumSTATPROPSETSTG_QueryInterface(This,riid,ppvObject) \\r
- ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )\r
-\r
-#define IEnumSTATPROPSETSTG_AddRef(This) \\r
- ( (This)->lpVtbl -> AddRef(This) )\r
-\r
-#define IEnumSTATPROPSETSTG_Release(This) \\r
- ( (This)->lpVtbl -> Release(This) )\r
-\r
-\r
-#define IEnumSTATPROPSETSTG_Next(This,celt,rgelt,pceltFetched) \\r
- ( (This)->lpVtbl -> Next(This,celt,rgelt,pceltFetched) )\r
-\r
-#define IEnumSTATPROPSETSTG_Skip(This,celt) \\r
- ( (This)->lpVtbl -> Skip(This,celt) )\r
-\r
-#define IEnumSTATPROPSETSTG_Reset(This) \\r
- ( (This)->lpVtbl -> Reset(This) )\r
-\r
-#define IEnumSTATPROPSETSTG_Clone(This,ppenum) \\r
- ( (This)->lpVtbl -> Clone(This,ppenum) )\r
-\r
-#endif /* COBJMACROS */\r
-\r
-\r
-#endif /* C style interface */\r
-\r
-\r
-\r
-/* [call_as] */ HRESULT STDMETHODCALLTYPE IEnumSTATPROPSETSTG_RemoteNext_Proxy(\r
- IEnumSTATPROPSETSTG * This,\r
- /* [in] */ ULONG celt,\r
- /* [length_is][size_is][out] */ __RPC__out_ecount_part(celt, *pceltFetched) STATPROPSETSTG *rgelt,\r
- /* [out] */ __RPC__out ULONG *pceltFetched);\r
-\r
-\r
-void __RPC_STUB IEnumSTATPROPSETSTG_RemoteNext_Stub(\r
- IRpcStubBuffer *This,\r
- IRpcChannelBuffer *_pRpcChannelBuffer,\r
- PRPC_MESSAGE _pRpcMessage,\r
- DWORD *_pdwStubPhase);\r
-\r
-\r
-\r
-#endif /* __IEnumSTATPROPSETSTG_INTERFACE_DEFINED__ */\r
-\r
-\r
-/* interface __MIDL_itf_propidl_0000_0004 */\r
-/* [local] */\r
-\r
-typedef /* [unique] */ __RPC_unique_pointer IPropertyStorage *LPPROPERTYSTORAGE;\r
-\r
-WINOLEAPI PropVariantCopy ( PROPVARIANT * pvarDest, const PROPVARIANT * pvarSrc );\r
-WINOLEAPI PropVariantClear ( PROPVARIANT * pvar );\r
-WINOLEAPI FreePropVariantArray ( ULONG cVariants, PROPVARIANT * rgvars );\r
-\r
-#define _PROPVARIANTINIT_DEFINED_\r
-# ifdef __cplusplus\r
-inline void PropVariantInit ( PROPVARIANT * pvar )\r
-{\r
- memset ( pvar, 0, sizeof(PROPVARIANT) );\r
-}\r
-# else\r
-# define PropVariantInit(pvar) memset ( (pvar), 0, sizeof(PROPVARIANT) )\r
-# endif\r
-\r
-\r
-#ifndef _STGCREATEPROPSTG_DEFINED_\r
-WINOLEAPI StgCreatePropStg( IUnknown* pUnk, REFFMTID fmtid, const CLSID *pclsid, DWORD grfFlags, DWORD dwReserved, IPropertyStorage **ppPropStg );\r
-WINOLEAPI StgOpenPropStg( IUnknown* pUnk, REFFMTID fmtid, DWORD grfFlags, DWORD dwReserved, IPropertyStorage **ppPropStg );\r
-WINOLEAPI StgCreatePropSetStg( IStorage *pStorage, DWORD dwReserved, IPropertySetStorage **ppPropSetStg);\r
-\r
-#define CCH_MAX_PROPSTG_NAME 31\r
-__checkReturn WINOLEAPI FmtIdToPropStgName( const FMTID *pfmtid, __out_ecount(CCH_MAX_PROPSTG_NAME+1) LPOLESTR oszName );\r
-WINOLEAPI PropStgNameToFmtId( __in __nullterminated const LPOLESTR oszName, FMTID *pfmtid );\r
-#endif\r
-#ifndef _SERIALIZEDPROPERTYVALUE_DEFINED_\r
-#define _SERIALIZEDPROPERTYVALUE_DEFINED_\r
-typedef struct tagSERIALIZEDPROPERTYVALUE // prop\r
-{\r
- DWORD dwType;\r
- BYTE rgb[1];\r
-} SERIALIZEDPROPERTYVALUE;\r
-#endif\r
-\r
-EXTERN_C SERIALIZEDPROPERTYVALUE* __stdcall\r
-StgConvertVariantToProperty(\r
- __in const PROPVARIANT* pvar,\r
- USHORT CodePage,\r
- __out_bcount_opt(*pcb) SERIALIZEDPROPERTYVALUE* pprop,\r
- __inout ULONG* pcb,\r
- PROPID pid,\r
- __reserved BOOLEAN fReserved,\r
- __out_opt ULONG* pcIndirect);\r
-\r
-#ifdef __cplusplus\r
-class PMemoryAllocator;\r
-\r
-EXTERN_C BOOLEAN __stdcall\r
-StgConvertPropertyToVariant(\r
- __in const SERIALIZEDPROPERTYVALUE* pprop,\r
- USHORT CodePage,\r
- __out PROPVARIANT* pvar,\r
- __in PMemoryAllocator* pma);\r
-#endif\r
-#if _MSC_VER >= 1200\r
-#pragma warning(pop)\r
-#else\r
-#pragma warning(default:4201) /* Nameless struct/union */\r
-#pragma warning(default:4237) /* keywords bool, true, false, etc.. */\r
-#endif\r
-\r
-\r
-extern RPC_IF_HANDLE __MIDL_itf_propidl_0000_0004_v0_0_c_ifspec;\r
-extern RPC_IF_HANDLE __MIDL_itf_propidl_0000_0004_v0_0_s_ifspec;\r
-\r
-/* Additional Prototypes for ALL interfaces */\r
-\r
-unsigned long __RPC_USER BSTR_UserSize( unsigned long *, unsigned long , BSTR * );\r
-unsigned char * __RPC_USER BSTR_UserMarshal( unsigned long *, unsigned char *, BSTR * );\r
-unsigned char * __RPC_USER BSTR_UserUnmarshal(unsigned long *, unsigned char *, BSTR * );\r
-void __RPC_USER BSTR_UserFree( unsigned long *, BSTR * );\r
-\r
-unsigned long __RPC_USER LPSAFEARRAY_UserSize( unsigned long *, unsigned long , LPSAFEARRAY * );\r
-unsigned char * __RPC_USER LPSAFEARRAY_UserMarshal( unsigned long *, unsigned char *, LPSAFEARRAY * );\r
-unsigned char * __RPC_USER LPSAFEARRAY_UserUnmarshal(unsigned long *, unsigned char *, LPSAFEARRAY * );\r
-void __RPC_USER LPSAFEARRAY_UserFree( unsigned long *, LPSAFEARRAY * );\r
-\r
-unsigned long __RPC_USER BSTR_UserSize64( unsigned long *, unsigned long , BSTR * );\r
-unsigned char * __RPC_USER BSTR_UserMarshal64( unsigned long *, unsigned char *, BSTR * );\r
-unsigned char * __RPC_USER BSTR_UserUnmarshal64(unsigned long *, unsigned char *, BSTR * );\r
-void __RPC_USER BSTR_UserFree64( unsigned long *, BSTR * );\r
-\r
-unsigned long __RPC_USER LPSAFEARRAY_UserSize64( unsigned long *, unsigned long , LPSAFEARRAY * );\r
-unsigned char * __RPC_USER LPSAFEARRAY_UserMarshal64( unsigned long *, unsigned char *, LPSAFEARRAY * );\r
-unsigned char * __RPC_USER LPSAFEARRAY_UserUnmarshal64(unsigned long *, unsigned char *, LPSAFEARRAY * );\r
-void __RPC_USER LPSAFEARRAY_UserFree64( unsigned long *, LPSAFEARRAY * );\r
-\r
-/* [local] */ HRESULT STDMETHODCALLTYPE IEnumSTATPROPSTG_Next_Proxy(\r
- IEnumSTATPROPSTG * This,\r
- /* [in] */ ULONG celt,\r
- /* [length_is][size_is][out] */ STATPROPSTG *rgelt,\r
- /* [out] */ ULONG *pceltFetched);\r
-\r
-\r
-/* [call_as] */ HRESULT STDMETHODCALLTYPE IEnumSTATPROPSTG_Next_Stub(\r
- IEnumSTATPROPSTG * This,\r
- /* [in] */ ULONG celt,\r
- /* [length_is][size_is][out] */ __RPC__out_ecount_part(celt, *pceltFetched) STATPROPSTG *rgelt,\r
- /* [out] */ __RPC__out ULONG *pceltFetched);\r
-\r
-/* [local] */ HRESULT STDMETHODCALLTYPE IEnumSTATPROPSETSTG_Next_Proxy(\r
- IEnumSTATPROPSETSTG * This,\r
- /* [in] */ ULONG celt,\r
- /* [length_is][size_is][out] */ STATPROPSETSTG *rgelt,\r
- /* [out] */ ULONG *pceltFetched);\r
-\r
-\r
-/* [call_as] */ HRESULT STDMETHODCALLTYPE IEnumSTATPROPSETSTG_Next_Stub(\r
- IEnumSTATPROPSETSTG * This,\r
- /* [in] */ ULONG celt,\r
- /* [length_is][size_is][out] */ __RPC__out_ecount_part(celt, *pceltFetched) STATPROPSETSTG *rgelt,\r
- /* [out] */ __RPC__out ULONG *pceltFetched);\r
-\r
-\r
-\r
-/* end of Additional Prototypes */\r
-\r
-#ifdef __cplusplus\r
-}\r
-#endif\r
-\r
-#endif\r
-\r
-\r
-\r
+
+
+/* this ALWAYS GENERATED file contains the definitions for the interfaces */
+
+
+ /* File created by MIDL compiler version 7.00.0499 */
+/* Compiler settings for propidl.idl:
+ Oicf, W1, Zp8, env=Win32 (32b run)
+ protocol : dce , ms_ext, c_ext, robust
+ error checks: allocation ref bounds_check enum stub_data
+ VC __declspec() decoration level:
+ __declspec(uuid()), __declspec(selectany), __declspec(novtable)
+ DECLSPEC_UUID(), MIDL_INTERFACE()
+*/
+//@@MIDL_FILE_HEADING( )
+
+#pragma warning( disable: 4049 ) /* more than 64k source lines */
+
+
+/* verify that the <rpcndr.h> version is high enough to compile this file*/
+#ifndef __REQUIRED_RPCNDR_H_VERSION__
+#define __REQUIRED_RPCNDR_H_VERSION__ 500
+#endif
+
+/* verify that the <rpcsal.h> version is high enough to compile this file*/
+#ifndef __REQUIRED_RPCSAL_H_VERSION__
+#define __REQUIRED_RPCSAL_H_VERSION__ 100
+#endif
+
+#include "rpc.h"
+#include "rpcndr.h"
+
+#ifndef __RPCNDR_H_VERSION__
+#error this stub requires an updated version of <rpcndr.h>
+#endif // __RPCNDR_H_VERSION__
+
+#ifndef COM_NO_WINDOWS_H
+#include "windows.h"
+#include "ole2.h"
+#endif /*COM_NO_WINDOWS_H*/
+
+#ifndef __propidl_h__
+#define __propidl_h__
+
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
+#define interface struct
+#include "sal.h"
+#include "rpcsal.h"
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#pragma once
+#endif
+
+/* Forward Declarations */
+
+#ifndef __IPropertyStorage_FWD_DEFINED__
+#define __IPropertyStorage_FWD_DEFINED__
+typedef interface IPropertyStorage IPropertyStorage;
+#endif /* __IPropertyStorage_FWD_DEFINED__ */
+
+
+#ifndef __IPropertySetStorage_FWD_DEFINED__
+#define __IPropertySetStorage_FWD_DEFINED__
+typedef interface IPropertySetStorage IPropertySetStorage;
+#endif /* __IPropertySetStorage_FWD_DEFINED__ */
+
+
+#ifndef __IEnumSTATPROPSTG_FWD_DEFINED__
+#define __IEnumSTATPROPSTG_FWD_DEFINED__
+typedef interface IEnumSTATPROPSTG IEnumSTATPROPSTG;
+#endif /* __IEnumSTATPROPSTG_FWD_DEFINED__ */
+
+
+#ifndef __IEnumSTATPROPSETSTG_FWD_DEFINED__
+#define __IEnumSTATPROPSETSTG_FWD_DEFINED__
+typedef interface IEnumSTATPROPSETSTG IEnumSTATPROPSETSTG;
+#endif /* __IEnumSTATPROPSETSTG_FWD_DEFINED__ */
+
+
+/* header files for imported files */
+#include "objidl.h"
+#include "oaidl.h"
+
+#ifdef __cplusplus
+extern "C"{
+#endif
+
+
+/* interface __MIDL_itf_propidl_0000_0000 */
+/* [local] */
+
+//+-------------------------------------------------------------------------
+//
+// Microsoft Windows
+// Copyright (c) Microsoft Corporation. All rights reserved.
+//
+//--------------------------------------------------------------------------
+#if ( _MSC_VER >= 800 )
+#if _MSC_VER >= 1200
+#pragma warning(push)
+#endif
+#pragma warning(disable:4201) /* Nameless struct/union */
+#pragma warning(disable:4237) /* obsolete member named 'bool' */
+#endif
+#if ( _MSC_VER >= 1020 )
+#pragma once
+#endif
+
+
+
+typedef struct tagVersionedStream
+ {
+ GUID guidVersion;
+ IStream *pStream;
+ } VERSIONEDSTREAM;
+
+typedef struct tagVersionedStream *LPVERSIONEDSTREAM;
+
+
+// Flags for IPropertySetStorage::Create
+#define PROPSETFLAG_DEFAULT ( 0 )
+
+#define PROPSETFLAG_NONSIMPLE ( 1 )
+
+#define PROPSETFLAG_ANSI ( 2 )
+
+// (This flag is only supported on StgCreatePropStg & StgOpenPropStg
+#define PROPSETFLAG_UNBUFFERED ( 4 )
+
+// (This flag causes a version-1 property set to be created
+#define PROPSETFLAG_CASE_SENSITIVE ( 8 )
+
+
+// Flags for the reservied PID_BEHAVIOR property
+#define PROPSET_BEHAVIOR_CASE_SENSITIVE ( 1 )
+
+#ifdef MIDL_PASS
+// This is the PROPVARIANT definition for marshaling.
+typedef struct tag_inner_PROPVARIANT PROPVARIANT;
+
+#else
+// This is the standard C layout of the PROPVARIANT.
+typedef struct tagPROPVARIANT PROPVARIANT;
+#endif
+typedef struct tagCAC
+ {
+ ULONG cElems;
+ CHAR *pElems;
+ } CAC;
+#ifdef WIN64
+typedef struct tagCAUB
+ {
+ ULONG cElems;
+ UCHAR *pElems;
+ } CAUB;
+
+typedef struct tagCAI
+ {
+ ULONG cElems;
+ SHORT *pElems;
+ } CAI;
+
+typedef struct tagCAUI
+ {
+ ULONG cElems;
+ USHORT *pElems;
+ } CAUI;
+
+typedef struct tagCAL
+ {
+ ULONG cElems;
+ LONG *pElems;
+ } CAL;
+
+typedef struct tagCAUL
+ {
+ ULONG cElems;
+ ULONG *pElems;
+ } CAUL;
+
+typedef struct tagCAFLT
+ {
+ ULONG cElems;
+ FLOAT *pElems;
+ } CAFLT;
+
+typedef struct tagCADBL
+ {
+ ULONG cElems;
+ DOUBLE *pElems;
+ } CADBL;
+
+typedef struct tagCACY
+ {
+ ULONG cElems;
+ CY *pElems;
+ } CACY;
+
+typedef struct tagCADATE
+ {
+ ULONG cElems;
+ DATE *pElems;
+ } CADATE;
+
+typedef struct tagCABSTR
+ {
+ ULONG cElems;
+ BSTR *pElems;
+ } CABSTR;
+
+typedef struct tagCABSTRBLOB
+ {
+ ULONG cElems;
+ BSTRBLOB *pElems;
+ } CABSTRBLOB;
+
+typedef struct tagCABOOL
+ {
+ ULONG cElems;
+ VARIANT_BOOL *pElems;
+ } CABOOL;
+
+typedef struct tagCASCODE
+ {
+ ULONG cElems;
+ SCODE *pElems;
+ } CASCODE;
+
+typedef struct tagCAPROPVARIANT
+ {
+ ULONG cElems;
+ PROPVARIANT *pElems;
+ } CAPROPVARIANT;
+
+typedef struct tagCAH
+ {
+ ULONG cElems;
+ LARGE_INTEGER *pElems;
+ } CAH;
+
+typedef struct tagCAUH
+ {
+ ULONG cElems;
+ ULARGE_INTEGER *pElems;
+ } CAUH;
+
+typedef struct tagCALPSTR
+ {
+ ULONG cElems;
+ LPSTR *pElems;
+ } CALPSTR;
+
+typedef struct tagCALPWSTR
+ {
+ ULONG cElems;
+ LPWSTR *pElems;
+ } CALPWSTR;
+
+typedef struct tagCAFILETIME
+ {
+ ULONG cElems;
+ FILETIME *pElems;
+ } CAFILETIME;
+
+typedef struct tagCACLIPDATA
+ {
+ ULONG cElems;
+ CLIPDATA *pElems;
+ } CACLIPDATA;
+
+typedef struct tagCACLSID
+ {
+ ULONG cElems;
+ CLSID *pElems;
+ } CACLSID;
+#endif
+#ifdef MIDL_PASS
+// This is the PROPVARIANT padding layout for marshaling.
+typedef BYTE PROPVAR_PAD1;
+
+typedef BYTE PROPVAR_PAD2;
+
+typedef ULONG PROPVAR_PAD3;
+
+#else
+// This is the standard C layout of the structure.
+typedef WORD PROPVAR_PAD1;
+typedef WORD PROPVAR_PAD2;
+typedef WORD PROPVAR_PAD3;
+#define tag_inner_PROPVARIANT
+#endif
+#ifdef WIN64
+#ifndef MIDL_PASS
+struct tagPROPVARIANT {
+ union {
+#endif
+struct tag_inner_PROPVARIANT
+ {
+ VARTYPE vt;
+ PROPVAR_PAD1 wReserved1;
+ PROPVAR_PAD2 wReserved2;
+ PROPVAR_PAD3 wReserved3;
+ /* [switch_type] */ union
+ {
+ /* Empty union arm */
+ CHAR cVal;
+ UCHAR bVal;
+ SHORT iVal;
+ USHORT uiVal;
+ LONG lVal;
+ ULONG ulVal;
+ INT intVal;
+ UINT uintVal;
+ LARGE_INTEGER hVal;
+ ULARGE_INTEGER uhVal;
+ FLOAT fltVal;
+ DOUBLE dblVal;
+ VARIANT_BOOL boolVal;
+ //_VARIANT_BOOL bool;
+ SCODE scode;
+ CY cyVal;
+ DATE date;
+ FILETIME filetime;
+ CLSID *puuid;
+ CLIPDATA *pclipdata;
+ BSTR bstrVal;
+ BSTRBLOB bstrblobVal;
+ BLOB blob;
+ LPSTR pszVal;
+ LPWSTR pwszVal;
+ IUnknown *punkVal;
+ IDispatch *pdispVal;
+ IStream *pStream;
+ IStorage *pStorage;
+ LPVERSIONEDSTREAM pVersionedStream;
+ LPSAFEARRAY parray;
+ CAC cac;
+ CAUB caub;
+ CAI cai;
+ CAUI caui;
+ CAL cal;
+ CAUL caul;
+ CAH cah;
+ CAUH cauh;
+ CAFLT caflt;
+ CADBL cadbl;
+ CABOOL cabool;
+ CASCODE cascode;
+ CACY cacy;
+ CADATE cadate;
+ CAFILETIME cafiletime;
+ CACLSID cauuid;
+ CACLIPDATA caclipdata;
+ CABSTR cabstr;
+ CABSTRBLOB cabstrblob;
+ CALPSTR calpstr;
+ CALPWSTR calpwstr;
+ CAPROPVARIANT capropvar;
+ CHAR *pcVal;
+ UCHAR *pbVal;
+ SHORT *piVal;
+ USHORT *puiVal;
+ LONG *plVal;
+ ULONG *pulVal;
+ INT *pintVal;
+ UINT *puintVal;
+ FLOAT *pfltVal;
+ DOUBLE *pdblVal;
+ VARIANT_BOOL *pboolVal;
+ DECIMAL *pdecVal;
+ SCODE *pscode;
+ CY *pcyVal;
+ DATE *pdate;
+ BSTR *pbstrVal;
+ IUnknown **ppunkVal;
+ IDispatch **ppdispVal;
+ LPSAFEARRAY *pparray;
+ PROPVARIANT *pvarVal;
+ } ;
+ } ;
+#ifndef MIDL_PASS
+ DECIMAL decVal;
+ };
+};
+#endif
+#endif
+#ifdef MIDL_PASS
+// This is the LPPROPVARIANT definition for marshaling.
+typedef struct tag_inner_PROPVARIANT *LPPROPVARIANT;
+
+typedef const PROPVARIANT *REFPROPVARIANT;
+
+#else
+
+// This is the standard C layout of the PROPVARIANT.
+#ifdef WIN64
+typedef struct tagPROPVARIANT * LPPROPVARIANT;
+#endif
+
+#ifndef _REFPROPVARIANT_DEFINED
+#define _REFPROPVARIANT_DEFINED
+#ifdef __cplusplus
+#define REFPROPVARIANT const PROPVARIANT &
+#else
+#define REFPROPVARIANT const PROPVARIANT * __MIDL_CONST
+#endif
+#endif
+
+#endif // MIDL_PASS
+
+// Reserved global Property IDs
+#define PID_DICTIONARY ( 0 )
+
+#define PID_CODEPAGE ( 0x1 )
+
+#define PID_FIRST_USABLE ( 0x2 )
+
+#define PID_FIRST_NAME_DEFAULT ( 0xfff )
+
+#define PID_LOCALE ( 0x80000000 )
+
+#define PID_MODIFY_TIME ( 0x80000001 )
+
+#define PID_SECURITY ( 0x80000002 )
+
+#define PID_BEHAVIOR ( 0x80000003 )
+
+#define PID_ILLEGAL ( 0xffffffff )
+
+// Range which is read-only to downlevel implementations
+#define PID_MIN_READONLY ( 0x80000000 )
+
+#define PID_MAX_READONLY ( 0xbfffffff )
+
+// Property IDs for the DiscardableInformation Property Set
+
+#define PIDDI_THUMBNAIL 0x00000002L // VT_BLOB
+
+// Property IDs for the SummaryInformation Property Set
+
+#define PIDSI_TITLE 0x00000002L // VT_LPSTR
+#define PIDSI_SUBJECT 0x00000003L // VT_LPSTR
+#define PIDSI_AUTHOR 0x00000004L // VT_LPSTR
+#define PIDSI_KEYWORDS 0x00000005L // VT_LPSTR
+#define PIDSI_COMMENTS 0x00000006L // VT_LPSTR
+#define PIDSI_TEMPLATE 0x00000007L // VT_LPSTR
+#define PIDSI_LASTAUTHOR 0x00000008L // VT_LPSTR
+#define PIDSI_REVNUMBER 0x00000009L // VT_LPSTR
+#define PIDSI_EDITTIME 0x0000000aL // VT_FILETIME (UTC)
+#define PIDSI_LASTPRINTED 0x0000000bL // VT_FILETIME (UTC)
+#define PIDSI_CREATE_DTM 0x0000000cL // VT_FILETIME (UTC)
+#define PIDSI_LASTSAVE_DTM 0x0000000dL // VT_FILETIME (UTC)
+#define PIDSI_PAGECOUNT 0x0000000eL // VT_I4
+#define PIDSI_WORDCOUNT 0x0000000fL // VT_I4
+#define PIDSI_CHARCOUNT 0x00000010L // VT_I4
+#define PIDSI_THUMBNAIL 0x00000011L // VT_CF
+#define PIDSI_APPNAME 0x00000012L // VT_LPSTR
+#define PIDSI_DOC_SECURITY 0x00000013L // VT_I4
+
+// Property IDs for the DocSummaryInformation Property Set
+
+#define PIDDSI_CATEGORY 0x00000002 // VT_LPSTR
+#define PIDDSI_PRESFORMAT 0x00000003 // VT_LPSTR
+#define PIDDSI_BYTECOUNT 0x00000004 // VT_I4
+#define PIDDSI_LINECOUNT 0x00000005 // VT_I4
+#define PIDDSI_PARCOUNT 0x00000006 // VT_I4
+#define PIDDSI_SLIDECOUNT 0x00000007 // VT_I4
+#define PIDDSI_NOTECOUNT 0x00000008 // VT_I4
+#define PIDDSI_HIDDENCOUNT 0x00000009 // VT_I4
+#define PIDDSI_MMCLIPCOUNT 0x0000000A // VT_I4
+#define PIDDSI_SCALE 0x0000000B // VT_BOOL
+#define PIDDSI_HEADINGPAIR 0x0000000C // VT_VARIANT | VT_VECTOR
+#define PIDDSI_DOCPARTS 0x0000000D // VT_LPSTR | VT_VECTOR
+#define PIDDSI_MANAGER 0x0000000E // VT_LPSTR
+#define PIDDSI_COMPANY 0x0000000F // VT_LPSTR
+#define PIDDSI_LINKSDIRTY 0x00000010 // VT_BOOL
+
+
+// FMTID_MediaFileSummaryInfo - Property IDs
+
+#define PIDMSI_EDITOR 0x00000002L // VT_LPWSTR
+#define PIDMSI_SUPPLIER 0x00000003L // VT_LPWSTR
+#define PIDMSI_SOURCE 0x00000004L // VT_LPWSTR
+#define PIDMSI_SEQUENCE_NO 0x00000005L // VT_LPWSTR
+#define PIDMSI_PROJECT 0x00000006L // VT_LPWSTR
+#define PIDMSI_STATUS 0x00000007L // VT_UI4
+#define PIDMSI_OWNER 0x00000008L // VT_LPWSTR
+#define PIDMSI_RATING 0x00000009L // VT_LPWSTR
+#define PIDMSI_PRODUCTION 0x0000000AL // VT_FILETIME (UTC)
+#define PIDMSI_COPYRIGHT 0x0000000BL // VT_LPWSTR
+
+// PIDMSI_STATUS value definitions
+
+enum PIDMSI_STATUS_VALUE
+ { PIDMSI_STATUS_NORMAL = 0,
+ PIDMSI_STATUS_NEW = ( PIDMSI_STATUS_NORMAL + 1 ) ,
+ PIDMSI_STATUS_PRELIM = ( PIDMSI_STATUS_NEW + 1 ) ,
+ PIDMSI_STATUS_DRAFT = ( PIDMSI_STATUS_PRELIM + 1 ) ,
+ PIDMSI_STATUS_INPROGRESS = ( PIDMSI_STATUS_DRAFT + 1 ) ,
+ PIDMSI_STATUS_EDIT = ( PIDMSI_STATUS_INPROGRESS + 1 ) ,
+ PIDMSI_STATUS_REVIEW = ( PIDMSI_STATUS_EDIT + 1 ) ,
+ PIDMSI_STATUS_PROOF = ( PIDMSI_STATUS_REVIEW + 1 ) ,
+ PIDMSI_STATUS_FINAL = ( PIDMSI_STATUS_PROOF + 1 ) ,
+ PIDMSI_STATUS_OTHER = 0x7fff
+ } ;
+#define PRSPEC_INVALID ( 0xffffffff )
+
+#define PRSPEC_LPWSTR ( 0 )
+
+#define PRSPEC_PROPID ( 1 )
+
+#ifdef WIN64
+typedef struct tagPROPSPEC
+ {
+ ULONG ulKind;
+ /* [switch_type] */ union
+ {
+ PROPID propid;
+ LPOLESTR lpwstr;
+ /* Empty union arm */
+ } ;
+ } PROPSPEC;
+
+typedef struct tagSTATPROPSTG
+ {
+ LPOLESTR lpwstrName;
+ PROPID propid;
+ VARTYPE vt;
+ } STATPROPSTG;
+#endif
+
+// Macros for parsing the OS Version of the Property Set Header
+#define PROPSETHDR_OSVER_KIND(dwOSVer) HIWORD( (dwOSVer) )
+#define PROPSETHDR_OSVER_MAJOR(dwOSVer) LOBYTE(LOWORD( (dwOSVer) ))
+#define PROPSETHDR_OSVER_MINOR(dwOSVer) HIBYTE(LOWORD( (dwOSVer) ))
+#define PROPSETHDR_OSVERSION_UNKNOWN 0xFFFFFFFF
+#ifdef WIN64
+typedef struct tagSTATPROPSETSTG
+ {
+ FMTID fmtid;
+ CLSID clsid;
+ DWORD grfFlags;
+ FILETIME mtime;
+ FILETIME ctime;
+ FILETIME atime;
+ DWORD dwOSVersion;
+ } STATPROPSETSTG;
+#endif
+
+
+extern RPC_IF_HANDLE __MIDL_itf_propidl_0000_0000_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_propidl_0000_0000_v0_0_s_ifspec;
+
+#ifndef __IPropertyStorage_INTERFACE_DEFINED__
+#define __IPropertyStorage_INTERFACE_DEFINED__
+
+/* interface IPropertyStorage */
+/* [unique][uuid][object] */
+
+
+EXTERN_C const IID IID_IPropertyStorage;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("00000138-0000-0000-C000-000000000046")
+ IPropertyStorage : public IUnknown
+ {
+ public:
+ virtual HRESULT STDMETHODCALLTYPE ReadMultiple(
+ /* [in] */ ULONG cpspec,
+ /* [size_is][in] */ __RPC__in_ecount_full(cpspec) const PROPSPEC rgpspec[ ],
+ /* [size_is][out] */ __RPC__out_ecount_full(cpspec) PROPVARIANT rgpropvar[ ]) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE WriteMultiple(
+ /* [in] */ ULONG cpspec,
+ /* [size_is][in] */ __RPC__in_ecount_full(cpspec) const PROPSPEC rgpspec[ ],
+ /* [size_is][in] */ __RPC__in_ecount_full(cpspec) const PROPVARIANT rgpropvar[ ],
+ /* [in] */ PROPID propidNameFirst) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE DeleteMultiple(
+ /* [in] */ ULONG cpspec,
+ /* [size_is][in] */ __RPC__in_ecount_full(cpspec) const PROPSPEC rgpspec[ ]) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE ReadPropertyNames(
+ /* [in] */ ULONG cpropid,
+ /* [size_is][in] */ __RPC__in_ecount_full(cpropid) const PROPID rgpropid[ ],
+ /* [size_is][out] */ __RPC__out_ecount_full(cpropid) LPOLESTR rglpwstrName[ ]) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE WritePropertyNames(
+ /* [in] */ ULONG cpropid,
+ /* [size_is][in] */ __RPC__in_ecount_full(cpropid) const PROPID rgpropid[ ],
+ /* [size_is][in] */ __RPC__in_ecount_full(cpropid) const LPOLESTR rglpwstrName[ ]) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE DeletePropertyNames(
+ /* [in] */ ULONG cpropid,
+ /* [size_is][in] */ __RPC__in_ecount_full(cpropid) const PROPID rgpropid[ ]) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE Commit(
+ /* [in] */ DWORD grfCommitFlags) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE Revert( void) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE Enum(
+ /* [out] */ __RPC__deref_out_opt IEnumSTATPROPSTG **ppenum) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE SetTimes(
+ /* [in] */ __RPC__in const FILETIME *pctime,
+ /* [in] */ __RPC__in const FILETIME *patime,
+ /* [in] */ __RPC__in const FILETIME *pmtime) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE SetClass(
+ /* [in] */ __RPC__in REFCLSID clsid) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE Stat(
+ /* [out] */ __RPC__out STATPROPSETSTG *pstatpsstg) = 0;
+
+ };
+
+#else /* C style interface */
+
+// typedef struct IPropertyStorageVtbl
+// {
+// BEGIN_INTERFACE
+//
+// HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+// IPropertyStorage * This,
+// /* [in] */ __RPC__in REFIID riid,
+// /* [iid_is][out] */
+// __RPC__deref_out void **ppvObject);
+//
+// ULONG ( STDMETHODCALLTYPE *AddRef )(
+// IPropertyStorage * This);
+//
+// ULONG ( STDMETHODCALLTYPE *Release )(
+// IPropertyStorage * This);
+//
+// HRESULT ( STDMETHODCALLTYPE *ReadMultiple )(
+// IPropertyStorage * This,
+// /* [in] */ ULONG cpspec,
+// /* [size_is][in] */ __RPC__in_ecount_full(cpspec) const PROPSPEC rgpspec[ ],
+// /* [size_is][out] */ __RPC__out_ecount_full(cpspec) PROPVARIANT rgpropvar[ ]);
+//
+// HRESULT ( STDMETHODCALLTYPE *WriteMultiple )(
+// IPropertyStorage * This,
+// /* [in] */ ULONG cpspec,
+// /* [size_is][in] */ __RPC__in_ecount_full(cpspec) const PROPSPEC rgpspec[ ],
+// /* [size_is][in] */ __RPC__in_ecount_full(cpspec) const PROPVARIANT rgpropvar[ ],
+// /* [in] */ PROPID propidNameFirst);
+//
+// HRESULT ( STDMETHODCALLTYPE *DeleteMultiple )(
+// IPropertyStorage * This,
+// /* [in] */ ULONG cpspec,
+// /* [size_is][in] */ __RPC__in_ecount_full(cpspec) const PROPSPEC rgpspec[ ]);
+//
+// HRESULT ( STDMETHODCALLTYPE *ReadPropertyNames )(
+// IPropertyStorage * This,
+// /* [in] */ ULONG cpropid,
+// /* [size_is][in] */ __RPC__in_ecount_full(cpropid) const PROPID rgpropid[ ],
+// /* [size_is][out] */ __RPC__out_ecount_full(cpropid) LPOLESTR rglpwstrName[ ]);
+//
+// HRESULT ( STDMETHODCALLTYPE *WritePropertyNames )(
+// IPropertyStorage * This,
+// /* [in] */ ULONG cpropid,
+// /* [size_is][in] */ __RPC__in_ecount_full(cpropid) const PROPID rgpropid[ ],
+// /* [size_is][in] */ __RPC__in_ecount_full(cpropid) const LPOLESTR rglpwstrName[ ]);
+//
+// HRESULT ( STDMETHODCALLTYPE *DeletePropertyNames )(
+// IPropertyStorage * This,
+// /* [in] */ ULONG cpropid,
+// /* [size_is][in] */ __RPC__in_ecount_full(cpropid) const PROPID rgpropid[ ]);
+//
+// HRESULT ( STDMETHODCALLTYPE *Commit )(
+// IPropertyStorage * This,
+// /* [in] */ DWORD grfCommitFlags);
+//
+// HRESULT ( STDMETHODCALLTYPE *Revert )(
+// IPropertyStorage * This);
+//
+// HRESULT ( STDMETHODCALLTYPE *Enum )(
+// IPropertyStorage * This,
+// /* [out] */ __RPC__deref_out_opt IEnumSTATPROPSTG **ppenum);
+//
+// HRESULT ( STDMETHODCALLTYPE *SetTimes )(
+// IPropertyStorage * This,
+// /* [in] */ __RPC__in const FILETIME *pctime,
+// /* [in] */ __RPC__in const FILETIME *patime,
+// /* [in] */ __RPC__in const FILETIME *pmtime);
+//
+// HRESULT ( STDMETHODCALLTYPE *SetClass )(
+// IPropertyStorage * This,
+// /* [in] */ __RPC__in REFCLSID clsid);
+//
+// HRESULT ( STDMETHODCALLTYPE *Stat )(
+// IPropertyStorage * This,
+// /* [out] */ __RPC__out STATPROPSETSTG *pstatpsstg);
+//
+// END_INTERFACE
+// } IPropertyStorageVtbl;
+//
+// interface IPropertyStorage
+// {
+// CONST_VTBL struct IPropertyStorageVtbl *lpVtbl;
+// };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IPropertyStorage_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IPropertyStorage_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IPropertyStorage_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IPropertyStorage_ReadMultiple(This,cpspec,rgpspec,rgpropvar) \
+ ( (This)->lpVtbl -> ReadMultiple(This,cpspec,rgpspec,rgpropvar) )
+
+#define IPropertyStorage_WriteMultiple(This,cpspec,rgpspec,rgpropvar,propidNameFirst) \
+ ( (This)->lpVtbl -> WriteMultiple(This,cpspec,rgpspec,rgpropvar,propidNameFirst) )
+
+#define IPropertyStorage_DeleteMultiple(This,cpspec,rgpspec) \
+ ( (This)->lpVtbl -> DeleteMultiple(This,cpspec,rgpspec) )
+
+#define IPropertyStorage_ReadPropertyNames(This,cpropid,rgpropid,rglpwstrName) \
+ ( (This)->lpVtbl -> ReadPropertyNames(This,cpropid,rgpropid,rglpwstrName) )
+
+#define IPropertyStorage_WritePropertyNames(This,cpropid,rgpropid,rglpwstrName) \
+ ( (This)->lpVtbl -> WritePropertyNames(This,cpropid,rgpropid,rglpwstrName) )
+
+#define IPropertyStorage_DeletePropertyNames(This,cpropid,rgpropid) \
+ ( (This)->lpVtbl -> DeletePropertyNames(This,cpropid,rgpropid) )
+
+#define IPropertyStorage_Commit(This,grfCommitFlags) \
+ ( (This)->lpVtbl -> Commit(This,grfCommitFlags) )
+
+#define IPropertyStorage_Revert(This) \
+ ( (This)->lpVtbl -> Revert(This) )
+
+#define IPropertyStorage_Enum(This,ppenum) \
+ ( (This)->lpVtbl -> Enum(This,ppenum) )
+
+#define IPropertyStorage_SetTimes(This,pctime,patime,pmtime) \
+ ( (This)->lpVtbl -> SetTimes(This,pctime,patime,pmtime) )
+
+#define IPropertyStorage_SetClass(This,clsid) \
+ ( (This)->lpVtbl -> SetClass(This,clsid) )
+
+#define IPropertyStorage_Stat(This,pstatpsstg) \
+ ( (This)->lpVtbl -> Stat(This,pstatpsstg) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IPropertyStorage_INTERFACE_DEFINED__ */
+
+
+#ifndef __IPropertySetStorage_INTERFACE_DEFINED__
+#define __IPropertySetStorage_INTERFACE_DEFINED__
+
+/* interface IPropertySetStorage */
+/* [unique][uuid][object] */
+
+typedef /* [unique] */ __RPC_unique_pointer IPropertySetStorage *LPPROPERTYSETSTORAGE;
+
+
+EXTERN_C const IID IID_IPropertySetStorage;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("0000013A-0000-0000-C000-000000000046")
+ IPropertySetStorage : public IUnknown
+ {
+ public:
+ virtual HRESULT STDMETHODCALLTYPE Create(
+ /* [in] */ __RPC__in REFFMTID rfmtid,
+ /* [unique][in] */ __RPC__in_opt const CLSID *pclsid,
+ /* [in] */ DWORD grfFlags,
+ /* [in] */ DWORD grfMode,
+ /* [out] */ __RPC__deref_out_opt IPropertyStorage **ppprstg) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE Open(
+ /* [in] */ __RPC__in REFFMTID rfmtid,
+ /* [in] */ DWORD grfMode,
+ /* [out] */ __RPC__deref_out_opt IPropertyStorage **ppprstg) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE Delete(
+ /* [in] */ __RPC__in REFFMTID rfmtid) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE Enum(
+ /* [out] */ __RPC__deref_out_opt IEnumSTATPROPSETSTG **ppenum) = 0;
+
+ };
+
+#else /* C style interface */
+
+// typedef struct IPropertySetStorageVtbl
+// {
+// BEGIN_INTERFACE
+//
+// HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+// IPropertySetStorage * This,
+// /* [in] */ __RPC__in REFIID riid,
+// /* [iid_is][out] */
+// __RPC__deref_out void **ppvObject);
+//
+// ULONG ( STDMETHODCALLTYPE *AddRef )(
+// IPropertySetStorage * This);
+//
+// ULONG ( STDMETHODCALLTYPE *Release )(
+// IPropertySetStorage * This);
+//
+// HRESULT ( STDMETHODCALLTYPE *Create )(
+// IPropertySetStorage * This,
+// /* [in] */ __RPC__in REFFMTID rfmtid,
+// /* [unique][in] */ __RPC__in_opt const CLSID *pclsid,
+// /* [in] */ DWORD grfFlags,
+// /* [in] */ DWORD grfMode,
+// /* [out] */ __RPC__deref_out_opt IPropertyStorage **ppprstg);
+//
+// HRESULT ( STDMETHODCALLTYPE *Open )(
+// IPropertySetStorage * This,
+// /* [in] */ __RPC__in REFFMTID rfmtid,
+// /* [in] */ DWORD grfMode,
+// /* [out] */ __RPC__deref_out_opt IPropertyStorage **ppprstg);
+//
+// HRESULT ( STDMETHODCALLTYPE *Delete )(
+// IPropertySetStorage * This,
+// /* [in] */ __RPC__in REFFMTID rfmtid);
+//
+// HRESULT ( STDMETHODCALLTYPE *Enum )(
+// IPropertySetStorage * This,
+// /* [out] */ __RPC__deref_out_opt IEnumSTATPROPSETSTG **ppenum);
+//
+// END_INTERFACE
+// } IPropertySetStorageVtbl;
+//
+// interface IPropertySetStorage
+// {
+// CONST_VTBL struct IPropertySetStorageVtbl *lpVtbl;
+// };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IPropertySetStorage_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IPropertySetStorage_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IPropertySetStorage_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IPropertySetStorage_Create(This,rfmtid,pclsid,grfFlags,grfMode,ppprstg) \
+ ( (This)->lpVtbl -> Create(This,rfmtid,pclsid,grfFlags,grfMode,ppprstg) )
+
+#define IPropertySetStorage_Open(This,rfmtid,grfMode,ppprstg) \
+ ( (This)->lpVtbl -> Open(This,rfmtid,grfMode,ppprstg) )
+
+#define IPropertySetStorage_Delete(This,rfmtid) \
+ ( (This)->lpVtbl -> Delete(This,rfmtid) )
+
+#define IPropertySetStorage_Enum(This,ppenum) \
+ ( (This)->lpVtbl -> Enum(This,ppenum) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IPropertySetStorage_INTERFACE_DEFINED__ */
+
+
+#ifndef __IEnumSTATPROPSTG_INTERFACE_DEFINED__
+#define __IEnumSTATPROPSTG_INTERFACE_DEFINED__
+
+/* interface IEnumSTATPROPSTG */
+/* [unique][uuid][object] */
+
+//typedef /* [unique] */ __RPC_unique_pointer IEnumSTATPROPSTG *LPENUMSTATPROPSTG;
+
+
+EXTERN_C const IID IID_IEnumSTATPROPSTG;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("00000139-0000-0000-C000-000000000046")
+ IEnumSTATPROPSTG : public IUnknown
+ {
+ public:
+ virtual /* [local] */ HRESULT STDMETHODCALLTYPE Next(
+ /* [in] */ ULONG celt,
+ /* [length_is][size_is][out] */ STATPROPSTG *rgelt,
+ /* [out] */ ULONG *pceltFetched) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE Skip(
+ /* [in] */ ULONG celt) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE Reset( void) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE Clone(
+ /* [out] */ __RPC__deref_out_opt IEnumSTATPROPSTG **ppenum) = 0;
+
+ };
+
+#else /* C style interface */
+
+// typedef struct IEnumSTATPROPSTGVtbl
+// {
+// BEGIN_INTERFACE
+//
+// HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+// IEnumSTATPROPSTG * This,
+// /* [in] */ __RPC__in REFIID riid,
+// /* [iid_is][out] */
+// __RPC__deref_out void **ppvObject);
+//
+// ULONG ( STDMETHODCALLTYPE *AddRef )(
+// IEnumSTATPROPSTG * This);
+//
+// ULONG ( STDMETHODCALLTYPE *Release )(
+// IEnumSTATPROPSTG * This);
+//
+// /* [local] */ HRESULT ( STDMETHODCALLTYPE *Next )(
+// IEnumSTATPROPSTG * This,
+// /* [in] */ ULONG celt,
+// /* [length_is][size_is][out] */ STATPROPSTG *rgelt,
+// /* [out] */ ULONG *pceltFetched);
+//
+// HRESULT ( STDMETHODCALLTYPE *Skip )(
+// IEnumSTATPROPSTG * This,
+// /* [in] */ ULONG celt);
+//
+// HRESULT ( STDMETHODCALLTYPE *Reset )(
+// IEnumSTATPROPSTG * This);
+//
+// HRESULT ( STDMETHODCALLTYPE *Clone )(
+// IEnumSTATPROPSTG * This,
+// /* [out] */ __RPC__deref_out_opt IEnumSTATPROPSTG **ppenum);
+//
+// END_INTERFACE
+// } IEnumSTATPROPSTGVtbl;
+//
+// interface IEnumSTATPROPSTG
+// {
+// CONST_VTBL struct IEnumSTATPROPSTGVtbl *lpVtbl;
+// };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IEnumSTATPROPSTG_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IEnumSTATPROPSTG_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IEnumSTATPROPSTG_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IEnumSTATPROPSTG_Next(This,celt,rgelt,pceltFetched) \
+ ( (This)->lpVtbl -> Next(This,celt,rgelt,pceltFetched) )
+
+#define IEnumSTATPROPSTG_Skip(This,celt) \
+ ( (This)->lpVtbl -> Skip(This,celt) )
+
+#define IEnumSTATPROPSTG_Reset(This) \
+ ( (This)->lpVtbl -> Reset(This) )
+
+#define IEnumSTATPROPSTG_Clone(This,ppenum) \
+ ( (This)->lpVtbl -> Clone(This,ppenum) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+/* [call_as] */ HRESULT STDMETHODCALLTYPE IEnumSTATPROPSTG_RemoteNext_Proxy(
+ IEnumSTATPROPSTG * This,
+ /* [in] */ ULONG celt,
+ /* [length_is][size_is][out] */ __RPC__out_ecount_part(celt, *pceltFetched) STATPROPSTG *rgelt,
+ /* [out] */ __RPC__out ULONG *pceltFetched);
+
+
+void __RPC_STUB IEnumSTATPROPSTG_RemoteNext_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+
+#endif /* __IEnumSTATPROPSTG_INTERFACE_DEFINED__ */
+
+
+#ifndef __IEnumSTATPROPSETSTG_INTERFACE_DEFINED__
+#define __IEnumSTATPROPSETSTG_INTERFACE_DEFINED__
+
+/* interface IEnumSTATPROPSETSTG */
+/* [unique][uuid][object] */
+
+typedef /* [unique] */ __RPC_unique_pointer IEnumSTATPROPSETSTG *LPENUMSTATPROPSETSTG;
+
+
+EXTERN_C const IID IID_IEnumSTATPROPSETSTG;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("0000013B-0000-0000-C000-000000000046")
+ IEnumSTATPROPSETSTG : public IUnknown
+ {
+ public:
+ virtual /* [local] */ HRESULT STDMETHODCALLTYPE Next(
+ /* [in] */ ULONG celt,
+ /* [length_is][size_is][out] */ STATPROPSETSTG *rgelt,
+ /* [out] */ ULONG *pceltFetched) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE Skip(
+ /* [in] */ ULONG celt) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE Reset( void) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE Clone(
+ /* [out] */ __RPC__deref_out_opt IEnumSTATPROPSETSTG **ppenum) = 0;
+
+ };
+
+#else /* C style interface */
+
+// typedef struct IEnumSTATPROPSETSTGVtbl
+// {
+// BEGIN_INTERFACE
+//
+// HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+// IEnumSTATPROPSETSTG * This,
+// /* [in] */ __RPC__in REFIID riid,
+// /* [iid_is][out] */
+// __RPC__deref_out void **ppvObject);
+//
+// ULONG ( STDMETHODCALLTYPE *AddRef )(
+// IEnumSTATPROPSETSTG * This);
+//
+// ULONG ( STDMETHODCALLTYPE *Release )(
+// IEnumSTATPROPSETSTG * This);
+//
+// /* [local] */ HRESULT ( STDMETHODCALLTYPE *Next )(
+// IEnumSTATPROPSETSTG * This,
+// /* [in] */ ULONG celt,
+// /* [length_is][size_is][out] */ STATPROPSETSTG *rgelt,
+// /* [out] */ ULONG *pceltFetched);
+//
+// HRESULT ( STDMETHODCALLTYPE *Skip )(
+// IEnumSTATPROPSETSTG * This,
+// /* [in] */ ULONG celt);
+//
+// HRESULT ( STDMETHODCALLTYPE *Reset )(
+// IEnumSTATPROPSETSTG * This);
+//
+// HRESULT ( STDMETHODCALLTYPE *Clone )(
+// IEnumSTATPROPSETSTG * This,
+// /* [out] */ __RPC__deref_out_opt IEnumSTATPROPSETSTG **ppenum);
+//
+// END_INTERFACE
+// } IEnumSTATPROPSETSTGVtbl;
+//
+// interface IEnumSTATPROPSETSTG
+// {
+// CONST_VTBL struct IEnumSTATPROPSETSTGVtbl *lpVtbl;
+// };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IEnumSTATPROPSETSTG_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IEnumSTATPROPSETSTG_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IEnumSTATPROPSETSTG_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IEnumSTATPROPSETSTG_Next(This,celt,rgelt,pceltFetched) \
+ ( (This)->lpVtbl -> Next(This,celt,rgelt,pceltFetched) )
+
+#define IEnumSTATPROPSETSTG_Skip(This,celt) \
+ ( (This)->lpVtbl -> Skip(This,celt) )
+
+#define IEnumSTATPROPSETSTG_Reset(This) \
+ ( (This)->lpVtbl -> Reset(This) )
+
+#define IEnumSTATPROPSETSTG_Clone(This,ppenum) \
+ ( (This)->lpVtbl -> Clone(This,ppenum) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+/* [call_as] */ HRESULT STDMETHODCALLTYPE IEnumSTATPROPSETSTG_RemoteNext_Proxy(
+ IEnumSTATPROPSETSTG * This,
+ /* [in] */ ULONG celt,
+ /* [length_is][size_is][out] */ __RPC__out_ecount_part(celt, *pceltFetched) STATPROPSETSTG *rgelt,
+ /* [out] */ __RPC__out ULONG *pceltFetched);
+
+
+void __RPC_STUB IEnumSTATPROPSETSTG_RemoteNext_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+
+#endif /* __IEnumSTATPROPSETSTG_INTERFACE_DEFINED__ */
+
+
+/* interface __MIDL_itf_propidl_0000_0004 */
+/* [local] */
+
+typedef /* [unique] */ __RPC_unique_pointer IPropertyStorage *LPPROPERTYSTORAGE;
+
+WINOLEAPI PropVariantCopy ( PROPVARIANT * pvarDest, const PROPVARIANT * pvarSrc );
+WINOLEAPI PropVariantClear ( PROPVARIANT * pvar );
+WINOLEAPI FreePropVariantArray ( ULONG cVariants, PROPVARIANT * rgvars );
+
+#define _PROPVARIANTINIT_DEFINED_
+# ifdef __cplusplus
+inline void PropVariantInit ( PROPVARIANT * pvar )
+{
+ memset ( pvar, 0, sizeof(PROPVARIANT) );
+}
+# else
+# define PropVariantInit(pvar) memset ( (pvar), 0, sizeof(PROPVARIANT) )
+# endif
+
+
+#ifndef _STGCREATEPROPSTG_DEFINED_
+WINOLEAPI StgCreatePropStg( IUnknown* pUnk, REFFMTID fmtid, const CLSID *pclsid, DWORD grfFlags, DWORD dwReserved, IPropertyStorage **ppPropStg );
+WINOLEAPI StgOpenPropStg( IUnknown* pUnk, REFFMTID fmtid, DWORD grfFlags, DWORD dwReserved, IPropertyStorage **ppPropStg );
+WINOLEAPI StgCreatePropSetStg( IStorage *pStorage, DWORD dwReserved, IPropertySetStorage **ppPropSetStg);
+
+#define CCH_MAX_PROPSTG_NAME 31
+__checkReturn WINOLEAPI FmtIdToPropStgName( const FMTID *pfmtid, __out_ecount(CCH_MAX_PROPSTG_NAME+1) LPOLESTR oszName );
+WINOLEAPI PropStgNameToFmtId( __in __nullterminated const LPOLESTR oszName, FMTID *pfmtid );
+#endif
+#ifndef _SERIALIZEDPROPERTYVALUE_DEFINED_
+#define _SERIALIZEDPROPERTYVALUE_DEFINED_
+typedef struct tagSERIALIZEDPROPERTYVALUE // prop
+{
+ DWORD dwType;
+ BYTE rgb[1];
+} SERIALIZEDPROPERTYVALUE;
+#endif
+
+EXTERN_C SERIALIZEDPROPERTYVALUE* __stdcall
+StgConvertVariantToProperty(
+ __in const PROPVARIANT* pvar,
+ USHORT CodePage,
+ __out_bcount_opt(*pcb) SERIALIZEDPROPERTYVALUE* pprop,
+ __inout ULONG* pcb,
+ PROPID pid,
+ __reserved BOOLEAN fReserved,
+ __out_opt ULONG* pcIndirect);
+
+#ifdef __cplusplus
+class PMemoryAllocator;
+
+EXTERN_C BOOLEAN __stdcall
+StgConvertPropertyToVariant(
+ __in const SERIALIZEDPROPERTYVALUE* pprop,
+ USHORT CodePage,
+ __out PROPVARIANT* pvar,
+ __in PMemoryAllocator* pma);
+#endif
+#if _MSC_VER >= 1200
+#pragma warning(pop)
+#else
+#pragma warning(default:4201) /* Nameless struct/union */
+#pragma warning(default:4237) /* keywords bool, true, false, etc.. */
+#endif
+
+
+extern RPC_IF_HANDLE __MIDL_itf_propidl_0000_0004_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_propidl_0000_0004_v0_0_s_ifspec;
+
+/* Additional Prototypes for ALL interfaces */
+
+unsigned long __RPC_USER BSTR_UserSize( unsigned long *, unsigned long , BSTR * );
+unsigned char * __RPC_USER BSTR_UserMarshal( unsigned long *, unsigned char *, BSTR * );
+unsigned char * __RPC_USER BSTR_UserUnmarshal(unsigned long *, unsigned char *, BSTR * );
+void __RPC_USER BSTR_UserFree( unsigned long *, BSTR * );
+
+unsigned long __RPC_USER LPSAFEARRAY_UserSize( unsigned long *, unsigned long , LPSAFEARRAY * );
+unsigned char * __RPC_USER LPSAFEARRAY_UserMarshal( unsigned long *, unsigned char *, LPSAFEARRAY * );
+unsigned char * __RPC_USER LPSAFEARRAY_UserUnmarshal(unsigned long *, unsigned char *, LPSAFEARRAY * );
+void __RPC_USER LPSAFEARRAY_UserFree( unsigned long *, LPSAFEARRAY * );
+
+unsigned long __RPC_USER BSTR_UserSize64( unsigned long *, unsigned long , BSTR * );
+unsigned char * __RPC_USER BSTR_UserMarshal64( unsigned long *, unsigned char *, BSTR * );
+unsigned char * __RPC_USER BSTR_UserUnmarshal64(unsigned long *, unsigned char *, BSTR * );
+void __RPC_USER BSTR_UserFree64( unsigned long *, BSTR * );
+
+unsigned long __RPC_USER LPSAFEARRAY_UserSize64( unsigned long *, unsigned long , LPSAFEARRAY * );
+unsigned char * __RPC_USER LPSAFEARRAY_UserMarshal64( unsigned long *, unsigned char *, LPSAFEARRAY * );
+unsigned char * __RPC_USER LPSAFEARRAY_UserUnmarshal64(unsigned long *, unsigned char *, LPSAFEARRAY * );
+void __RPC_USER LPSAFEARRAY_UserFree64( unsigned long *, LPSAFEARRAY * );
+
+/* [local] */ HRESULT STDMETHODCALLTYPE IEnumSTATPROPSTG_Next_Proxy(
+ IEnumSTATPROPSTG * This,
+ /* [in] */ ULONG celt,
+ /* [length_is][size_is][out] */ STATPROPSTG *rgelt,
+ /* [out] */ ULONG *pceltFetched);
+
+
+/* [call_as] */ HRESULT STDMETHODCALLTYPE IEnumSTATPROPSTG_Next_Stub(
+ IEnumSTATPROPSTG * This,
+ /* [in] */ ULONG celt,
+ /* [length_is][size_is][out] */ __RPC__out_ecount_part(celt, *pceltFetched) STATPROPSTG *rgelt,
+ /* [out] */ __RPC__out ULONG *pceltFetched);
+
+/* [local] */ HRESULT STDMETHODCALLTYPE IEnumSTATPROPSETSTG_Next_Proxy(
+ IEnumSTATPROPSETSTG * This,
+ /* [in] */ ULONG celt,
+ /* [length_is][size_is][out] */ STATPROPSETSTG *rgelt,
+ /* [out] */ ULONG *pceltFetched);
+
+
+/* [call_as] */ HRESULT STDMETHODCALLTYPE IEnumSTATPROPSETSTG_Next_Stub(
+ IEnumSTATPROPSETSTG * This,
+ /* [in] */ ULONG celt,
+ /* [length_is][size_is][out] */ __RPC__out_ecount_part(celt, *pceltFetched) STATPROPSETSTG *rgelt,
+ /* [out] */ __RPC__out ULONG *pceltFetched);
+
+
+
+/* end of Additional Prototypes */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
+
+
-//===========================================================================\r
-//\r
-// Copyright (c) Microsoft Corporation. All rights reserved.\r
-//\r
-//===========================================================================\r
-\r
-\r
-#ifndef _INC_PROPKEY\r
-#define _INC_PROPKEY\r
-\r
-#ifndef DEFINE_API_PKEY\r
-#define DEFINE_API_PKEY(name, managed_name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8, pid) \\r
- DEFINE_PROPERTYKEY(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8, pid)\r
-#endif\r
-\r
-#include <propkeydef.h>\r
-\r
-#ifndef _WIN32_IE\r
-#define _WIN32_IE 0x0501\r
-#else\r
-#if (_WIN32_IE < 0x0400) && defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0500)\r
-#error _WIN32_IE setting conflicts with _WIN32_WINNT setting\r
-#endif\r
-#endif\r
-\r
- \r
-//-----------------------------------------------------------------------------\r
-// Audio properties\r
-\r
-// Name: System.Audio.ChannelCount -- PKEY_Audio_ChannelCount\r
-// Type: UInt32 -- VT_UI4\r
-// FormatID: (FMTID_AudioSummaryInformation) 64440490-4C8B-11D1-8B70-080036B11A03, 7 (PIDASI_CHANNEL_COUNT)\r
-//\r
-// Indicates the channel count for the audio file. Values: 1 (mono), 2 (stereo).\r
-DEFINE_PROPERTYKEY(PKEY_Audio_ChannelCount, 0x64440490, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 7);\r
-\r
-// Possible discrete values for PKEY_Audio_ChannelCount are:\r
-#define AUDIO_CHANNELCOUNT_MONO 1ul\r
-#define AUDIO_CHANNELCOUNT_STEREO 2ul\r
-\r
-// Name: System.Audio.Compression -- PKEY_Audio_Compression\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: (FMTID_AudioSummaryInformation) 64440490-4C8B-11D1-8B70-080036B11A03, 10 (PIDASI_COMPRESSION)\r
-//\r
-// \r
-DEFINE_PROPERTYKEY(PKEY_Audio_Compression, 0x64440490, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 10);\r
-\r
-// Name: System.Audio.EncodingBitrate -- PKEY_Audio_EncodingBitrate\r
-// Type: UInt32 -- VT_UI4\r
-// FormatID: (FMTID_AudioSummaryInformation) 64440490-4C8B-11D1-8B70-080036B11A03, 4 (PIDASI_AVG_DATA_RATE)\r
-//\r
-// Indicates the average data rate in Hz for the audio file in "bits per second".\r
-DEFINE_PROPERTYKEY(PKEY_Audio_EncodingBitrate, 0x64440490, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 4);\r
-\r
-// Name: System.Audio.Format -- PKEY_Audio_Format\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR) Legacy code may treat this as VT_BSTR.\r
-// FormatID: (FMTID_AudioSummaryInformation) 64440490-4C8B-11D1-8B70-080036B11A03, 2 (PIDASI_FORMAT)\r
-//\r
-// Indicates the format of the audio file.\r
-DEFINE_PROPERTYKEY(PKEY_Audio_Format, 0x64440490, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 2);\r
-\r
-// Name: System.Audio.IsVariableBitRate -- PKEY_Audio_IsVariableBitRate\r
-// Type: Boolean -- VT_BOOL\r
-// FormatID: E6822FEE-8C17-4D62-823C-8E9CFCBD1D5C, 100\r
-DEFINE_PROPERTYKEY(PKEY_Audio_IsVariableBitRate, 0xE6822FEE, 0x8C17, 0x4D62, 0x82, 0x3C, 0x8E, 0x9C, 0xFC, 0xBD, 0x1D, 0x5C, 100);\r
-\r
-// Name: System.Audio.PeakValue -- PKEY_Audio_PeakValue\r
-// Type: UInt32 -- VT_UI4\r
-// FormatID: 2579E5D0-1116-4084-BD9A-9B4F7CB4DF5E, 100\r
-DEFINE_PROPERTYKEY(PKEY_Audio_PeakValue, 0x2579E5D0, 0x1116, 0x4084, 0xBD, 0x9A, 0x9B, 0x4F, 0x7C, 0xB4, 0xDF, 0x5E, 100);\r
-\r
-// Name: System.Audio.SampleRate -- PKEY_Audio_SampleRate\r
-// Type: UInt32 -- VT_UI4\r
-// FormatID: (FMTID_AudioSummaryInformation) 64440490-4C8B-11D1-8B70-080036B11A03, 5 (PIDASI_SAMPLE_RATE)\r
-//\r
-// Indicates the audio sample rate for the audio file in "samples per second".\r
-DEFINE_PROPERTYKEY(PKEY_Audio_SampleRate, 0x64440490, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 5);\r
-\r
-// Name: System.Audio.SampleSize -- PKEY_Audio_SampleSize\r
-// Type: UInt32 -- VT_UI4\r
-// FormatID: (FMTID_AudioSummaryInformation) 64440490-4C8B-11D1-8B70-080036B11A03, 6 (PIDASI_SAMPLE_SIZE)\r
-//\r
-// Indicates the audio sample size for the audio file in "bits per sample".\r
-DEFINE_PROPERTYKEY(PKEY_Audio_SampleSize, 0x64440490, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 6);\r
-\r
-// Name: System.Audio.StreamName -- PKEY_Audio_StreamName\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: (FMTID_AudioSummaryInformation) 64440490-4C8B-11D1-8B70-080036B11A03, 9 (PIDASI_STREAM_NAME)\r
-//\r
-// \r
-DEFINE_PROPERTYKEY(PKEY_Audio_StreamName, 0x64440490, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 9);\r
-\r
-// Name: System.Audio.StreamNumber -- PKEY_Audio_StreamNumber\r
-// Type: UInt16 -- VT_UI2\r
-// FormatID: (FMTID_AudioSummaryInformation) 64440490-4C8B-11D1-8B70-080036B11A03, 8 (PIDASI_STREAM_NUMBER)\r
-//\r
-// \r
-DEFINE_PROPERTYKEY(PKEY_Audio_StreamNumber, 0x64440490, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 8);\r
-\r
- \r
- \r
-//-----------------------------------------------------------------------------\r
-// Calendar properties\r
-\r
-// Name: System.Calendar.Duration -- PKEY_Calendar_Duration\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 293CA35A-09AA-4DD2-B180-1FE245728A52, 100\r
-//\r
-// The duration as specified in a string.\r
-DEFINE_PROPERTYKEY(PKEY_Calendar_Duration, 0x293CA35A, 0x09AA, 0x4DD2, 0xB1, 0x80, 0x1F, 0xE2, 0x45, 0x72, 0x8A, 0x52, 100);\r
-\r
-// Name: System.Calendar.IsOnline -- PKEY_Calendar_IsOnline\r
-// Type: Boolean -- VT_BOOL\r
-// FormatID: BFEE9149-E3E2-49A7-A862-C05988145CEC, 100\r
-//\r
-// Identifies if the event is an online event.\r
-DEFINE_PROPERTYKEY(PKEY_Calendar_IsOnline, 0xBFEE9149, 0xE3E2, 0x49A7, 0xA8, 0x62, 0xC0, 0x59, 0x88, 0x14, 0x5C, 0xEC, 100);\r
-\r
-// Name: System.Calendar.IsRecurring -- PKEY_Calendar_IsRecurring\r
-// Type: Boolean -- VT_BOOL\r
-// FormatID: 315B9C8D-80A9-4EF9-AE16-8E746DA51D70, 100\r
-DEFINE_PROPERTYKEY(PKEY_Calendar_IsRecurring, 0x315B9C8D, 0x80A9, 0x4EF9, 0xAE, 0x16, 0x8E, 0x74, 0x6D, 0xA5, 0x1D, 0x70, 100);\r
-\r
-// Name: System.Calendar.Location -- PKEY_Calendar_Location\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: F6272D18-CECC-40B1-B26A-3911717AA7BD, 100\r
-DEFINE_PROPERTYKEY(PKEY_Calendar_Location, 0xF6272D18, 0xCECC, 0x40B1, 0xB2, 0x6A, 0x39, 0x11, 0x71, 0x7A, 0xA7, 0xBD, 100);\r
-\r
-// Name: System.Calendar.OptionalAttendeeAddresses -- PKEY_Calendar_OptionalAttendeeAddresses\r
-// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR)\r
-// FormatID: D55BAE5A-3892-417A-A649-C6AC5AAAEAB3, 100\r
-DEFINE_PROPERTYKEY(PKEY_Calendar_OptionalAttendeeAddresses, 0xD55BAE5A, 0x3892, 0x417A, 0xA6, 0x49, 0xC6, 0xAC, 0x5A, 0xAA, 0xEA, 0xB3, 100);\r
-\r
-// Name: System.Calendar.OptionalAttendeeNames -- PKEY_Calendar_OptionalAttendeeNames\r
-// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR)\r
-// FormatID: 09429607-582D-437F-84C3-DE93A2B24C3C, 100\r
-DEFINE_PROPERTYKEY(PKEY_Calendar_OptionalAttendeeNames, 0x09429607, 0x582D, 0x437F, 0x84, 0xC3, 0xDE, 0x93, 0xA2, 0xB2, 0x4C, 0x3C, 100);\r
-\r
-// Name: System.Calendar.OrganizerAddress -- PKEY_Calendar_OrganizerAddress\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 744C8242-4DF5-456C-AB9E-014EFB9021E3, 100\r
-//\r
-// Address of the organizer organizing the event.\r
-DEFINE_PROPERTYKEY(PKEY_Calendar_OrganizerAddress, 0x744C8242, 0x4DF5, 0x456C, 0xAB, 0x9E, 0x01, 0x4E, 0xFB, 0x90, 0x21, 0xE3, 100);\r
-\r
-// Name: System.Calendar.OrganizerName -- PKEY_Calendar_OrganizerName\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: AAA660F9-9865-458E-B484-01BC7FE3973E, 100\r
-//\r
-// Name of the organizer organizing the event.\r
-DEFINE_PROPERTYKEY(PKEY_Calendar_OrganizerName, 0xAAA660F9, 0x9865, 0x458E, 0xB4, 0x84, 0x01, 0xBC, 0x7F, 0xE3, 0x97, 0x3E, 100);\r
-\r
-// Name: System.Calendar.ReminderTime -- PKEY_Calendar_ReminderTime\r
-// Type: DateTime -- VT_FILETIME (For variants: VT_DATE)\r
-// FormatID: 72FC5BA4-24F9-4011-9F3F-ADD27AFAD818, 100\r
-DEFINE_PROPERTYKEY(PKEY_Calendar_ReminderTime, 0x72FC5BA4, 0x24F9, 0x4011, 0x9F, 0x3F, 0xAD, 0xD2, 0x7A, 0xFA, 0xD8, 0x18, 100);\r
-\r
-// Name: System.Calendar.RequiredAttendeeAddresses -- PKEY_Calendar_RequiredAttendeeAddresses\r
-// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR)\r
-// FormatID: 0BA7D6C3-568D-4159-AB91-781A91FB71E5, 100\r
-DEFINE_PROPERTYKEY(PKEY_Calendar_RequiredAttendeeAddresses, 0x0BA7D6C3, 0x568D, 0x4159, 0xAB, 0x91, 0x78, 0x1A, 0x91, 0xFB, 0x71, 0xE5, 100);\r
-\r
-// Name: System.Calendar.RequiredAttendeeNames -- PKEY_Calendar_RequiredAttendeeNames\r
-// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR)\r
-// FormatID: B33AF30B-F552-4584-936C-CB93E5CDA29F, 100\r
-DEFINE_PROPERTYKEY(PKEY_Calendar_RequiredAttendeeNames, 0xB33AF30B, 0xF552, 0x4584, 0x93, 0x6C, 0xCB, 0x93, 0xE5, 0xCD, 0xA2, 0x9F, 100);\r
-\r
-// Name: System.Calendar.Resources -- PKEY_Calendar_Resources\r
-// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR)\r
-// FormatID: 00F58A38-C54B-4C40-8696-97235980EAE1, 100\r
-DEFINE_PROPERTYKEY(PKEY_Calendar_Resources, 0x00F58A38, 0xC54B, 0x4C40, 0x86, 0x96, 0x97, 0x23, 0x59, 0x80, 0xEA, 0xE1, 100);\r
-\r
-// Name: System.Calendar.ShowTimeAs -- PKEY_Calendar_ShowTimeAs\r
-// Type: UInt16 -- VT_UI2\r
-// FormatID: 5BF396D4-5EB2-466F-BDE9-2FB3F2361D6E, 100\r
-//\r
-// \r
-DEFINE_PROPERTYKEY(PKEY_Calendar_ShowTimeAs, 0x5BF396D4, 0x5EB2, 0x466F, 0xBD, 0xE9, 0x2F, 0xB3, 0xF2, 0x36, 0x1D, 0x6E, 100);\r
-\r
-// Possible discrete values for PKEY_Calendar_ShowTimeAs are:\r
-#define CALENDAR_SHOWTIMEAS_FREE 0u\r
-#define CALENDAR_SHOWTIMEAS_TENTATIVE 1u\r
-#define CALENDAR_SHOWTIMEAS_BUSY 2u\r
-#define CALENDAR_SHOWTIMEAS_OOF 3u\r
-\r
-// Name: System.Calendar.ShowTimeAsText -- PKEY_Calendar_ShowTimeAsText\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 53DA57CF-62C0-45C4-81DE-7610BCEFD7F5, 100\r
-// \r
-// This is the user-friendly form of System.Calendar.ShowTimeAs. Not intended to be parsed \r
-// programmatically.\r
-DEFINE_PROPERTYKEY(PKEY_Calendar_ShowTimeAsText, 0x53DA57CF, 0x62C0, 0x45C4, 0x81, 0xDE, 0x76, 0x10, 0xBC, 0xEF, 0xD7, 0xF5, 100);\r
- \r
-//-----------------------------------------------------------------------------\r
-// Communication properties\r
-\r
-\r
-\r
-// Name: System.Communication.AccountName -- PKEY_Communication_AccountName\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD, 9\r
-//\r
-// Account Name\r
-DEFINE_PROPERTYKEY(PKEY_Communication_AccountName, 0xE3E0584C, 0xB788, 0x4A5A, 0xBB, 0x20, 0x7F, 0x5A, 0x44, 0xC9, 0xAC, 0xDD, 9);\r
-\r
-// Name: System.Communication.Suffix -- PKEY_Communication_Suffix\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 807B653A-9E91-43EF-8F97-11CE04EE20C5, 100\r
-DEFINE_PROPERTYKEY(PKEY_Communication_Suffix, 0x807B653A, 0x9E91, 0x43EF, 0x8F, 0x97, 0x11, 0xCE, 0x04, 0xEE, 0x20, 0xC5, 100);\r
-\r
-// Name: System.Communication.TaskStatus -- PKEY_Communication_TaskStatus\r
-// Type: UInt16 -- VT_UI2\r
-// FormatID: BE1A72C6-9A1D-46B7-AFE7-AFAF8CEF4999, 100\r
-DEFINE_PROPERTYKEY(PKEY_Communication_TaskStatus, 0xBE1A72C6, 0x9A1D, 0x46B7, 0xAF, 0xE7, 0xAF, 0xAF, 0x8C, 0xEF, 0x49, 0x99, 100);\r
-\r
-// Possible discrete values for PKEY_Communication_TaskStatus are:\r
-#define TASKSTATUS_NOTSTARTED 0u\r
-#define TASKSTATUS_INPROGRESS 1u\r
-#define TASKSTATUS_COMPLETE 2u\r
-#define TASKSTATUS_WAITING 3u\r
-#define TASKSTATUS_DEFERRED 4u\r
-\r
-// Name: System.Communication.TaskStatusText -- PKEY_Communication_TaskStatusText\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: A6744477-C237-475B-A075-54F34498292A, 100\r
-// \r
-// This is the user-friendly form of System.Communication.TaskStatus. Not intended to be parsed \r
-// programmatically.\r
-DEFINE_PROPERTYKEY(PKEY_Communication_TaskStatusText, 0xA6744477, 0xC237, 0x475B, 0xA0, 0x75, 0x54, 0xF3, 0x44, 0x98, 0x29, 0x2A, 100);\r
- \r
-//-----------------------------------------------------------------------------\r
-// Computer properties\r
-\r
-\r
-\r
-// Name: System.Computer.DecoratedFreeSpace -- PKEY_Computer_DecoratedFreeSpace\r
-// Type: Multivalue UInt64 -- VT_VECTOR | VT_UI8 (For variants: VT_ARRAY | VT_UI8)\r
-// FormatID: (FMTID_Volume) 9B174B35-40FF-11D2-A27E-00C04FC30871, 7 (Filesystem Volume Properties)\r
-//\r
-// Free space and total space: "%s free of %s"\r
-DEFINE_PROPERTYKEY(PKEY_Computer_DecoratedFreeSpace, 0x9B174B35, 0x40FF, 0x11D2, 0xA2, 0x7E, 0x00, 0xC0, 0x4F, 0xC3, 0x08, 0x71, 7);\r
- \r
-//-----------------------------------------------------------------------------\r
-// Contact properties\r
-\r
-\r
-\r
-// Name: System.Contact.Anniversary -- PKEY_Contact_Anniversary\r
-// Type: DateTime -- VT_FILETIME (For variants: VT_DATE)\r
-// FormatID: 9AD5BADB-CEA7-4470-A03D-B84E51B9949E, 100\r
-DEFINE_PROPERTYKEY(PKEY_Contact_Anniversary, 0x9AD5BADB, 0xCEA7, 0x4470, 0xA0, 0x3D, 0xB8, 0x4E, 0x51, 0xB9, 0x94, 0x9E, 100);\r
-\r
-// Name: System.Contact.AssistantName -- PKEY_Contact_AssistantName\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: CD102C9C-5540-4A88-A6F6-64E4981C8CD1, 100\r
-DEFINE_PROPERTYKEY(PKEY_Contact_AssistantName, 0xCD102C9C, 0x5540, 0x4A88, 0xA6, 0xF6, 0x64, 0xE4, 0x98, 0x1C, 0x8C, 0xD1, 100);\r
-\r
-// Name: System.Contact.AssistantTelephone -- PKEY_Contact_AssistantTelephone\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 9A93244D-A7AD-4FF8-9B99-45EE4CC09AF6, 100\r
-DEFINE_PROPERTYKEY(PKEY_Contact_AssistantTelephone, 0x9A93244D, 0xA7AD, 0x4FF8, 0x9B, 0x99, 0x45, 0xEE, 0x4C, 0xC0, 0x9A, 0xF6, 100);\r
-\r
-// Name: System.Contact.Birthday -- PKEY_Contact_Birthday\r
-// Type: DateTime -- VT_FILETIME (For variants: VT_DATE)\r
-// FormatID: 176DC63C-2688-4E89-8143-A347800F25E9, 47\r
-DEFINE_PROPERTYKEY(PKEY_Contact_Birthday, 0x176DC63C, 0x2688, 0x4E89, 0x81, 0x43, 0xA3, 0x47, 0x80, 0x0F, 0x25, 0xE9, 47);\r
-\r
-// Name: System.Contact.BusinessAddress -- PKEY_Contact_BusinessAddress\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 730FB6DD-CF7C-426B-A03F-BD166CC9EE24, 100\r
-DEFINE_PROPERTYKEY(PKEY_Contact_BusinessAddress, 0x730FB6DD, 0xCF7C, 0x426B, 0xA0, 0x3F, 0xBD, 0x16, 0x6C, 0xC9, 0xEE, 0x24, 100);\r
-\r
-// Name: System.Contact.BusinessAddressCity -- PKEY_Contact_BusinessAddressCity\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 402B5934-EC5A-48C3-93E6-85E86A2D934E, 100\r
-DEFINE_PROPERTYKEY(PKEY_Contact_BusinessAddressCity, 0x402B5934, 0xEC5A, 0x48C3, 0x93, 0xE6, 0x85, 0xE8, 0x6A, 0x2D, 0x93, 0x4E, 100);\r
-\r
-// Name: System.Contact.BusinessAddressCountry -- PKEY_Contact_BusinessAddressCountry\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: B0B87314-FCF6-4FEB-8DFF-A50DA6AF561C, 100\r
-DEFINE_PROPERTYKEY(PKEY_Contact_BusinessAddressCountry, 0xB0B87314, 0xFCF6, 0x4FEB, 0x8D, 0xFF, 0xA5, 0x0D, 0xA6, 0xAF, 0x56, 0x1C, 100);\r
-\r
-// Name: System.Contact.BusinessAddressPostalCode -- PKEY_Contact_BusinessAddressPostalCode\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: E1D4A09E-D758-4CD1-B6EC-34A8B5A73F80, 100\r
-DEFINE_PROPERTYKEY(PKEY_Contact_BusinessAddressPostalCode, 0xE1D4A09E, 0xD758, 0x4CD1, 0xB6, 0xEC, 0x34, 0xA8, 0xB5, 0xA7, 0x3F, 0x80, 100);\r
-\r
-// Name: System.Contact.BusinessAddressPostOfficeBox -- PKEY_Contact_BusinessAddressPostOfficeBox\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: BC4E71CE-17F9-48D5-BEE9-021DF0EA5409, 100\r
-DEFINE_PROPERTYKEY(PKEY_Contact_BusinessAddressPostOfficeBox, 0xBC4E71CE, 0x17F9, 0x48D5, 0xBE, 0xE9, 0x02, 0x1D, 0xF0, 0xEA, 0x54, 0x09, 100);\r
-\r
-// Name: System.Contact.BusinessAddressState -- PKEY_Contact_BusinessAddressState\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 446F787F-10C4-41CB-A6C4-4D0343551597, 100\r
-DEFINE_PROPERTYKEY(PKEY_Contact_BusinessAddressState, 0x446F787F, 0x10C4, 0x41CB, 0xA6, 0xC4, 0x4D, 0x03, 0x43, 0x55, 0x15, 0x97, 100);\r
-\r
-// Name: System.Contact.BusinessAddressStreet -- PKEY_Contact_BusinessAddressStreet\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: DDD1460F-C0BF-4553-8CE4-10433C908FB0, 100\r
-DEFINE_PROPERTYKEY(PKEY_Contact_BusinessAddressStreet, 0xDDD1460F, 0xC0BF, 0x4553, 0x8C, 0xE4, 0x10, 0x43, 0x3C, 0x90, 0x8F, 0xB0, 100);\r
-\r
-// Name: System.Contact.BusinessFaxNumber -- PKEY_Contact_BusinessFaxNumber\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 91EFF6F3-2E27-42CA-933E-7C999FBE310B, 100\r
-//\r
-// Business fax number of the contact.\r
-DEFINE_PROPERTYKEY(PKEY_Contact_BusinessFaxNumber, 0x91EFF6F3, 0x2E27, 0x42CA, 0x93, 0x3E, 0x7C, 0x99, 0x9F, 0xBE, 0x31, 0x0B, 100);\r
-\r
-// Name: System.Contact.BusinessHomePage -- PKEY_Contact_BusinessHomePage\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 56310920-2491-4919-99CE-EADB06FAFDB2, 100\r
-DEFINE_PROPERTYKEY(PKEY_Contact_BusinessHomePage, 0x56310920, 0x2491, 0x4919, 0x99, 0xCE, 0xEA, 0xDB, 0x06, 0xFA, 0xFD, 0xB2, 100);\r
-\r
-// Name: System.Contact.BusinessTelephone -- PKEY_Contact_BusinessTelephone\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 6A15E5A0-0A1E-4CD7-BB8C-D2F1B0C929BC, 100\r
-DEFINE_PROPERTYKEY(PKEY_Contact_BusinessTelephone, 0x6A15E5A0, 0x0A1E, 0x4CD7, 0xBB, 0x8C, 0xD2, 0xF1, 0xB0, 0xC9, 0x29, 0xBC, 100);\r
-\r
-// Name: System.Contact.CallbackTelephone -- PKEY_Contact_CallbackTelephone\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: BF53D1C3-49E0-4F7F-8567-5A821D8AC542, 100\r
-DEFINE_PROPERTYKEY(PKEY_Contact_CallbackTelephone, 0xBF53D1C3, 0x49E0, 0x4F7F, 0x85, 0x67, 0x5A, 0x82, 0x1D, 0x8A, 0xC5, 0x42, 100);\r
-\r
-// Name: System.Contact.CarTelephone -- PKEY_Contact_CarTelephone\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 8FDC6DEA-B929-412B-BA90-397A257465FE, 100\r
-DEFINE_PROPERTYKEY(PKEY_Contact_CarTelephone, 0x8FDC6DEA, 0xB929, 0x412B, 0xBA, 0x90, 0x39, 0x7A, 0x25, 0x74, 0x65, 0xFE, 100);\r
-\r
-// Name: System.Contact.Children -- PKEY_Contact_Children\r
-// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR)\r
-// FormatID: D4729704-8EF1-43EF-9024-2BD381187FD5, 100\r
-DEFINE_PROPERTYKEY(PKEY_Contact_Children, 0xD4729704, 0x8EF1, 0x43EF, 0x90, 0x24, 0x2B, 0xD3, 0x81, 0x18, 0x7F, 0xD5, 100);\r
-\r
-// Name: System.Contact.CompanyMainTelephone -- PKEY_Contact_CompanyMainTelephone\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 8589E481-6040-473D-B171-7FA89C2708ED, 100\r
-DEFINE_PROPERTYKEY(PKEY_Contact_CompanyMainTelephone, 0x8589E481, 0x6040, 0x473D, 0xB1, 0x71, 0x7F, 0xA8, 0x9C, 0x27, 0x08, 0xED, 100);\r
-\r
-// Name: System.Contact.Department -- PKEY_Contact_Department\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: FC9F7306-FF8F-4D49-9FB6-3FFE5C0951EC, 100\r
-DEFINE_PROPERTYKEY(PKEY_Contact_Department, 0xFC9F7306, 0xFF8F, 0x4D49, 0x9F, 0xB6, 0x3F, 0xFE, 0x5C, 0x09, 0x51, 0xEC, 100);\r
-\r
-// Name: System.Contact.EmailAddress -- PKEY_Contact_EmailAddress\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: F8FA7FA3-D12B-4785-8A4E-691A94F7A3E7, 100\r
-DEFINE_PROPERTYKEY(PKEY_Contact_EmailAddress, 0xF8FA7FA3, 0xD12B, 0x4785, 0x8A, 0x4E, 0x69, 0x1A, 0x94, 0xF7, 0xA3, 0xE7, 100);\r
-\r
-// Name: System.Contact.EmailAddress2 -- PKEY_Contact_EmailAddress2\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 38965063-EDC8-4268-8491-B7723172CF29, 100\r
-DEFINE_PROPERTYKEY(PKEY_Contact_EmailAddress2, 0x38965063, 0xEDC8, 0x4268, 0x84, 0x91, 0xB7, 0x72, 0x31, 0x72, 0xCF, 0x29, 100);\r
-\r
-// Name: System.Contact.EmailAddress3 -- PKEY_Contact_EmailAddress3\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 644D37B4-E1B3-4BAD-B099-7E7C04966ACA, 100\r
-DEFINE_PROPERTYKEY(PKEY_Contact_EmailAddress3, 0x644D37B4, 0xE1B3, 0x4BAD, 0xB0, 0x99, 0x7E, 0x7C, 0x04, 0x96, 0x6A, 0xCA, 100);\r
-\r
-// Name: System.Contact.EmailAddresses -- PKEY_Contact_EmailAddresses\r
-// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR)\r
-// FormatID: 84D8F337-981D-44B3-9615-C7596DBA17E3, 100\r
-DEFINE_PROPERTYKEY(PKEY_Contact_EmailAddresses, 0x84D8F337, 0x981D, 0x44B3, 0x96, 0x15, 0xC7, 0x59, 0x6D, 0xBA, 0x17, 0xE3, 100);\r
-\r
-// Name: System.Contact.EmailName -- PKEY_Contact_EmailName\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: CC6F4F24-6083-4BD4-8754-674D0DE87AB8, 100\r
-DEFINE_PROPERTYKEY(PKEY_Contact_EmailName, 0xCC6F4F24, 0x6083, 0x4BD4, 0x87, 0x54, 0x67, 0x4D, 0x0D, 0xE8, 0x7A, 0xB8, 100);\r
-\r
-// Name: System.Contact.FileAsName -- PKEY_Contact_FileAsName\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: F1A24AA7-9CA7-40F6-89EC-97DEF9FFE8DB, 100\r
-DEFINE_PROPERTYKEY(PKEY_Contact_FileAsName, 0xF1A24AA7, 0x9CA7, 0x40F6, 0x89, 0xEC, 0x97, 0xDE, 0xF9, 0xFF, 0xE8, 0xDB, 100);\r
-\r
-// Name: System.Contact.FirstName -- PKEY_Contact_FirstName\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 14977844-6B49-4AAD-A714-A4513BF60460, 100\r
-DEFINE_PROPERTYKEY(PKEY_Contact_FirstName, 0x14977844, 0x6B49, 0x4AAD, 0xA7, 0x14, 0xA4, 0x51, 0x3B, 0xF6, 0x04, 0x60, 100);\r
-\r
-// Name: System.Contact.FullName -- PKEY_Contact_FullName\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 635E9051-50A5-4BA2-B9DB-4ED056C77296, 100\r
-DEFINE_PROPERTYKEY(PKEY_Contact_FullName, 0x635E9051, 0x50A5, 0x4BA2, 0xB9, 0xDB, 0x4E, 0xD0, 0x56, 0xC7, 0x72, 0x96, 100);\r
-\r
-// Name: System.Contact.Gender -- PKEY_Contact_Gender\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 3C8CEE58-D4F0-4CF9-B756-4E5D24447BCD, 100\r
-DEFINE_PROPERTYKEY(PKEY_Contact_Gender, 0x3C8CEE58, 0xD4F0, 0x4CF9, 0xB7, 0x56, 0x4E, 0x5D, 0x24, 0x44, 0x7B, 0xCD, 100);\r
-\r
-// Name: System.Contact.Hobbies -- PKEY_Contact_Hobbies\r
-// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR)\r
-// FormatID: 5DC2253F-5E11-4ADF-9CFE-910DD01E3E70, 100\r
-DEFINE_PROPERTYKEY(PKEY_Contact_Hobbies, 0x5DC2253F, 0x5E11, 0x4ADF, 0x9C, 0xFE, 0x91, 0x0D, 0xD0, 0x1E, 0x3E, 0x70, 100);\r
-\r
-// Name: System.Contact.HomeAddress -- PKEY_Contact_HomeAddress\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 98F98354-617A-46B8-8560-5B1B64BF1F89, 100\r
-DEFINE_PROPERTYKEY(PKEY_Contact_HomeAddress, 0x98F98354, 0x617A, 0x46B8, 0x85, 0x60, 0x5B, 0x1B, 0x64, 0xBF, 0x1F, 0x89, 100);\r
-\r
-// Name: System.Contact.HomeAddressCity -- PKEY_Contact_HomeAddressCity\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 176DC63C-2688-4E89-8143-A347800F25E9, 65\r
-DEFINE_PROPERTYKEY(PKEY_Contact_HomeAddressCity, 0x176DC63C, 0x2688, 0x4E89, 0x81, 0x43, 0xA3, 0x47, 0x80, 0x0F, 0x25, 0xE9, 65);\r
-\r
-// Name: System.Contact.HomeAddressCountry -- PKEY_Contact_HomeAddressCountry\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 08A65AA1-F4C9-43DD-9DDF-A33D8E7EAD85, 100\r
-DEFINE_PROPERTYKEY(PKEY_Contact_HomeAddressCountry, 0x08A65AA1, 0xF4C9, 0x43DD, 0x9D, 0xDF, 0xA3, 0x3D, 0x8E, 0x7E, 0xAD, 0x85, 100);\r
-\r
-// Name: System.Contact.HomeAddressPostalCode -- PKEY_Contact_HomeAddressPostalCode\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 8AFCC170-8A46-4B53-9EEE-90BAE7151E62, 100\r
-DEFINE_PROPERTYKEY(PKEY_Contact_HomeAddressPostalCode, 0x8AFCC170, 0x8A46, 0x4B53, 0x9E, 0xEE, 0x90, 0xBA, 0xE7, 0x15, 0x1E, 0x62, 100);\r
-\r
-// Name: System.Contact.HomeAddressPostOfficeBox -- PKEY_Contact_HomeAddressPostOfficeBox\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 7B9F6399-0A3F-4B12-89BD-4ADC51C918AF, 100\r
-DEFINE_PROPERTYKEY(PKEY_Contact_HomeAddressPostOfficeBox, 0x7B9F6399, 0x0A3F, 0x4B12, 0x89, 0xBD, 0x4A, 0xDC, 0x51, 0xC9, 0x18, 0xAF, 100);\r
-\r
-// Name: System.Contact.HomeAddressState -- PKEY_Contact_HomeAddressState\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: C89A23D0-7D6D-4EB8-87D4-776A82D493E5, 100\r
-DEFINE_PROPERTYKEY(PKEY_Contact_HomeAddressState, 0xC89A23D0, 0x7D6D, 0x4EB8, 0x87, 0xD4, 0x77, 0x6A, 0x82, 0xD4, 0x93, 0xE5, 100);\r
-\r
-// Name: System.Contact.HomeAddressStreet -- PKEY_Contact_HomeAddressStreet\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 0ADEF160-DB3F-4308-9A21-06237B16FA2A, 100\r
-DEFINE_PROPERTYKEY(PKEY_Contact_HomeAddressStreet, 0x0ADEF160, 0xDB3F, 0x4308, 0x9A, 0x21, 0x06, 0x23, 0x7B, 0x16, 0xFA, 0x2A, 100);\r
-\r
-// Name: System.Contact.HomeFaxNumber -- PKEY_Contact_HomeFaxNumber\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 660E04D6-81AB-4977-A09F-82313113AB26, 100\r
-DEFINE_PROPERTYKEY(PKEY_Contact_HomeFaxNumber, 0x660E04D6, 0x81AB, 0x4977, 0xA0, 0x9F, 0x82, 0x31, 0x31, 0x13, 0xAB, 0x26, 100);\r
-\r
-// Name: System.Contact.HomeTelephone -- PKEY_Contact_HomeTelephone\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 176DC63C-2688-4E89-8143-A347800F25E9, 20\r
-DEFINE_PROPERTYKEY(PKEY_Contact_HomeTelephone, 0x176DC63C, 0x2688, 0x4E89, 0x81, 0x43, 0xA3, 0x47, 0x80, 0x0F, 0x25, 0xE9, 20);\r
-\r
-// Name: System.Contact.IMAddress -- PKEY_Contact_IMAddress\r
-// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR)\r
-// FormatID: D68DBD8A-3374-4B81-9972-3EC30682DB3D, 100\r
-DEFINE_PROPERTYKEY(PKEY_Contact_IMAddress, 0xD68DBD8A, 0x3374, 0x4B81, 0x99, 0x72, 0x3E, 0xC3, 0x06, 0x82, 0xDB, 0x3D, 100);\r
-\r
-// Name: System.Contact.Initials -- PKEY_Contact_Initials\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: F3D8F40D-50CB-44A2-9718-40CB9119495D, 100\r
-DEFINE_PROPERTYKEY(PKEY_Contact_Initials, 0xF3D8F40D, 0x50CB, 0x44A2, 0x97, 0x18, 0x40, 0xCB, 0x91, 0x19, 0x49, 0x5D, 100);\r
-\r
-// Name: System.Contact.JA.CompanyNamePhonetic -- PKEY_Contact_JA_CompanyNamePhonetic\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 897B3694-FE9E-43E6-8066-260F590C0100, 2\r
-// \r
-// \r
-DEFINE_PROPERTYKEY(PKEY_Contact_JA_CompanyNamePhonetic, 0x897B3694, 0xFE9E, 0x43E6, 0x80, 0x66, 0x26, 0x0F, 0x59, 0x0C, 0x01, 0x00, 2);\r
-\r
-// Name: System.Contact.JA.FirstNamePhonetic -- PKEY_Contact_JA_FirstNamePhonetic\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 897B3694-FE9E-43E6-8066-260F590C0100, 3\r
-// \r
-// \r
-DEFINE_PROPERTYKEY(PKEY_Contact_JA_FirstNamePhonetic, 0x897B3694, 0xFE9E, 0x43E6, 0x80, 0x66, 0x26, 0x0F, 0x59, 0x0C, 0x01, 0x00, 3);\r
-\r
-// Name: System.Contact.JA.LastNamePhonetic -- PKEY_Contact_JA_LastNamePhonetic\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 897B3694-FE9E-43E6-8066-260F590C0100, 4\r
-// \r
-// \r
-DEFINE_PROPERTYKEY(PKEY_Contact_JA_LastNamePhonetic, 0x897B3694, 0xFE9E, 0x43E6, 0x80, 0x66, 0x26, 0x0F, 0x59, 0x0C, 0x01, 0x00, 4);\r
-\r
-// Name: System.Contact.JobTitle -- PKEY_Contact_JobTitle\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 176DC63C-2688-4E89-8143-A347800F25E9, 6\r
-DEFINE_PROPERTYKEY(PKEY_Contact_JobTitle, 0x176DC63C, 0x2688, 0x4E89, 0x81, 0x43, 0xA3, 0x47, 0x80, 0x0F, 0x25, 0xE9, 6);\r
-\r
-// Name: System.Contact.Label -- PKEY_Contact_Label\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 97B0AD89-DF49-49CC-834E-660974FD755B, 100\r
-DEFINE_PROPERTYKEY(PKEY_Contact_Label, 0x97B0AD89, 0xDF49, 0x49CC, 0x83, 0x4E, 0x66, 0x09, 0x74, 0xFD, 0x75, 0x5B, 100);\r
-\r
-// Name: System.Contact.LastName -- PKEY_Contact_LastName\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 8F367200-C270-457C-B1D4-E07C5BCD90C7, 100\r
-DEFINE_PROPERTYKEY(PKEY_Contact_LastName, 0x8F367200, 0xC270, 0x457C, 0xB1, 0xD4, 0xE0, 0x7C, 0x5B, 0xCD, 0x90, 0xC7, 100);\r
-\r
-// Name: System.Contact.MailingAddress -- PKEY_Contact_MailingAddress\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: C0AC206A-827E-4650-95AE-77E2BB74FCC9, 100\r
-DEFINE_PROPERTYKEY(PKEY_Contact_MailingAddress, 0xC0AC206A, 0x827E, 0x4650, 0x95, 0xAE, 0x77, 0xE2, 0xBB, 0x74, 0xFC, 0xC9, 100);\r
-\r
-// Name: System.Contact.MiddleName -- PKEY_Contact_MiddleName\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 176DC63C-2688-4E89-8143-A347800F25E9, 71\r
-DEFINE_PROPERTYKEY(PKEY_Contact_MiddleName, 0x176DC63C, 0x2688, 0x4E89, 0x81, 0x43, 0xA3, 0x47, 0x80, 0x0F, 0x25, 0xE9, 71);\r
-\r
-// Name: System.Contact.MobileTelephone -- PKEY_Contact_MobileTelephone\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 176DC63C-2688-4E89-8143-A347800F25E9, 35\r
-DEFINE_PROPERTYKEY(PKEY_Contact_MobileTelephone, 0x176DC63C, 0x2688, 0x4E89, 0x81, 0x43, 0xA3, 0x47, 0x80, 0x0F, 0x25, 0xE9, 35);\r
-\r
-// Name: System.Contact.NickName -- PKEY_Contact_NickName\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 176DC63C-2688-4E89-8143-A347800F25E9, 74\r
-DEFINE_PROPERTYKEY(PKEY_Contact_NickName, 0x176DC63C, 0x2688, 0x4E89, 0x81, 0x43, 0xA3, 0x47, 0x80, 0x0F, 0x25, 0xE9, 74);\r
-\r
-// Name: System.Contact.OfficeLocation -- PKEY_Contact_OfficeLocation\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 176DC63C-2688-4E89-8143-A347800F25E9, 7\r
-DEFINE_PROPERTYKEY(PKEY_Contact_OfficeLocation, 0x176DC63C, 0x2688, 0x4E89, 0x81, 0x43, 0xA3, 0x47, 0x80, 0x0F, 0x25, 0xE9, 7);\r
-\r
-// Name: System.Contact.OtherAddress -- PKEY_Contact_OtherAddress\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 508161FA-313B-43D5-83A1-C1ACCF68622C, 100\r
-DEFINE_PROPERTYKEY(PKEY_Contact_OtherAddress, 0x508161FA, 0x313B, 0x43D5, 0x83, 0xA1, 0xC1, 0xAC, 0xCF, 0x68, 0x62, 0x2C, 100);\r
-\r
-// Name: System.Contact.OtherAddressCity -- PKEY_Contact_OtherAddressCity\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 6E682923-7F7B-4F0C-A337-CFCA296687BF, 100\r
-DEFINE_PROPERTYKEY(PKEY_Contact_OtherAddressCity, 0x6E682923, 0x7F7B, 0x4F0C, 0xA3, 0x37, 0xCF, 0xCA, 0x29, 0x66, 0x87, 0xBF, 100);\r
-\r
-// Name: System.Contact.OtherAddressCountry -- PKEY_Contact_OtherAddressCountry\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 8F167568-0AAE-4322-8ED9-6055B7B0E398, 100\r
-DEFINE_PROPERTYKEY(PKEY_Contact_OtherAddressCountry, 0x8F167568, 0x0AAE, 0x4322, 0x8E, 0xD9, 0x60, 0x55, 0xB7, 0xB0, 0xE3, 0x98, 100);\r
-\r
-// Name: System.Contact.OtherAddressPostalCode -- PKEY_Contact_OtherAddressPostalCode\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 95C656C1-2ABF-4148-9ED3-9EC602E3B7CD, 100\r
-DEFINE_PROPERTYKEY(PKEY_Contact_OtherAddressPostalCode, 0x95C656C1, 0x2ABF, 0x4148, 0x9E, 0xD3, 0x9E, 0xC6, 0x02, 0xE3, 0xB7, 0xCD, 100);\r
-\r
-// Name: System.Contact.OtherAddressPostOfficeBox -- PKEY_Contact_OtherAddressPostOfficeBox\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 8B26EA41-058F-43F6-AECC-4035681CE977, 100\r
-DEFINE_PROPERTYKEY(PKEY_Contact_OtherAddressPostOfficeBox, 0x8B26EA41, 0x058F, 0x43F6, 0xAE, 0xCC, 0x40, 0x35, 0x68, 0x1C, 0xE9, 0x77, 100);\r
-\r
-// Name: System.Contact.OtherAddressState -- PKEY_Contact_OtherAddressState\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 71B377D6-E570-425F-A170-809FAE73E54E, 100\r
-DEFINE_PROPERTYKEY(PKEY_Contact_OtherAddressState, 0x71B377D6, 0xE570, 0x425F, 0xA1, 0x70, 0x80, 0x9F, 0xAE, 0x73, 0xE5, 0x4E, 100);\r
-\r
-// Name: System.Contact.OtherAddressStreet -- PKEY_Contact_OtherAddressStreet\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: FF962609-B7D6-4999-862D-95180D529AEA, 100\r
-DEFINE_PROPERTYKEY(PKEY_Contact_OtherAddressStreet, 0xFF962609, 0xB7D6, 0x4999, 0x86, 0x2D, 0x95, 0x18, 0x0D, 0x52, 0x9A, 0xEA, 100);\r
-\r
-// Name: System.Contact.PagerTelephone -- PKEY_Contact_PagerTelephone\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: D6304E01-F8F5-4F45-8B15-D024A6296789, 100\r
-DEFINE_PROPERTYKEY(PKEY_Contact_PagerTelephone, 0xD6304E01, 0xF8F5, 0x4F45, 0x8B, 0x15, 0xD0, 0x24, 0xA6, 0x29, 0x67, 0x89, 100);\r
-\r
-// Name: System.Contact.PersonalTitle -- PKEY_Contact_PersonalTitle\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 176DC63C-2688-4E89-8143-A347800F25E9, 69\r
-DEFINE_PROPERTYKEY(PKEY_Contact_PersonalTitle, 0x176DC63C, 0x2688, 0x4E89, 0x81, 0x43, 0xA3, 0x47, 0x80, 0x0F, 0x25, 0xE9, 69);\r
-\r
-// Name: System.Contact.PrimaryAddressCity -- PKEY_Contact_PrimaryAddressCity\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: C8EA94F0-A9E3-4969-A94B-9C62A95324E0, 100\r
-DEFINE_PROPERTYKEY(PKEY_Contact_PrimaryAddressCity, 0xC8EA94F0, 0xA9E3, 0x4969, 0xA9, 0x4B, 0x9C, 0x62, 0xA9, 0x53, 0x24, 0xE0, 100);\r
-\r
-// Name: System.Contact.PrimaryAddressCountry -- PKEY_Contact_PrimaryAddressCountry\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: E53D799D-0F3F-466E-B2FF-74634A3CB7A4, 100\r
-DEFINE_PROPERTYKEY(PKEY_Contact_PrimaryAddressCountry, 0xE53D799D, 0x0F3F, 0x466E, 0xB2, 0xFF, 0x74, 0x63, 0x4A, 0x3C, 0xB7, 0xA4, 100);\r
-\r
-// Name: System.Contact.PrimaryAddressPostalCode -- PKEY_Contact_PrimaryAddressPostalCode\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 18BBD425-ECFD-46EF-B612-7B4A6034EDA0, 100\r
-DEFINE_PROPERTYKEY(PKEY_Contact_PrimaryAddressPostalCode, 0x18BBD425, 0xECFD, 0x46EF, 0xB6, 0x12, 0x7B, 0x4A, 0x60, 0x34, 0xED, 0xA0, 100);\r
-\r
-// Name: System.Contact.PrimaryAddressPostOfficeBox -- PKEY_Contact_PrimaryAddressPostOfficeBox\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: DE5EF3C7-46E1-484E-9999-62C5308394C1, 100\r
-DEFINE_PROPERTYKEY(PKEY_Contact_PrimaryAddressPostOfficeBox, 0xDE5EF3C7, 0x46E1, 0x484E, 0x99, 0x99, 0x62, 0xC5, 0x30, 0x83, 0x94, 0xC1, 100);\r
-\r
-// Name: System.Contact.PrimaryAddressState -- PKEY_Contact_PrimaryAddressState\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: F1176DFE-7138-4640-8B4C-AE375DC70A6D, 100\r
-DEFINE_PROPERTYKEY(PKEY_Contact_PrimaryAddressState, 0xF1176DFE, 0x7138, 0x4640, 0x8B, 0x4C, 0xAE, 0x37, 0x5D, 0xC7, 0x0A, 0x6D, 100);\r
-\r
-// Name: System.Contact.PrimaryAddressStreet -- PKEY_Contact_PrimaryAddressStreet\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 63C25B20-96BE-488F-8788-C09C407AD812, 100\r
-DEFINE_PROPERTYKEY(PKEY_Contact_PrimaryAddressStreet, 0x63C25B20, 0x96BE, 0x488F, 0x87, 0x88, 0xC0, 0x9C, 0x40, 0x7A, 0xD8, 0x12, 100);\r
-\r
-// Name: System.Contact.PrimaryEmailAddress -- PKEY_Contact_PrimaryEmailAddress\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 176DC63C-2688-4E89-8143-A347800F25E9, 48\r
-DEFINE_PROPERTYKEY(PKEY_Contact_PrimaryEmailAddress, 0x176DC63C, 0x2688, 0x4E89, 0x81, 0x43, 0xA3, 0x47, 0x80, 0x0F, 0x25, 0xE9, 48);\r
-\r
-// Name: System.Contact.PrimaryTelephone -- PKEY_Contact_PrimaryTelephone\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 176DC63C-2688-4E89-8143-A347800F25E9, 25\r
-DEFINE_PROPERTYKEY(PKEY_Contact_PrimaryTelephone, 0x176DC63C, 0x2688, 0x4E89, 0x81, 0x43, 0xA3, 0x47, 0x80, 0x0F, 0x25, 0xE9, 25);\r
-\r
-// Name: System.Contact.Profession -- PKEY_Contact_Profession\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 7268AF55-1CE4-4F6E-A41F-B6E4EF10E4A9, 100\r
-DEFINE_PROPERTYKEY(PKEY_Contact_Profession, 0x7268AF55, 0x1CE4, 0x4F6E, 0xA4, 0x1F, 0xB6, 0xE4, 0xEF, 0x10, 0xE4, 0xA9, 100);\r
-\r
-// Name: System.Contact.SpouseName -- PKEY_Contact_SpouseName\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 9D2408B6-3167-422B-82B0-F583B7A7CFE3, 100\r
-DEFINE_PROPERTYKEY(PKEY_Contact_SpouseName, 0x9D2408B6, 0x3167, 0x422B, 0x82, 0xB0, 0xF5, 0x83, 0xB7, 0xA7, 0xCF, 0xE3, 100);\r
-\r
-// Name: System.Contact.Suffix -- PKEY_Contact_Suffix\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 176DC63C-2688-4E89-8143-A347800F25E9, 73\r
-DEFINE_PROPERTYKEY(PKEY_Contact_Suffix, 0x176DC63C, 0x2688, 0x4E89, 0x81, 0x43, 0xA3, 0x47, 0x80, 0x0F, 0x25, 0xE9, 73);\r
-\r
-// Name: System.Contact.TelexNumber -- PKEY_Contact_TelexNumber\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: C554493C-C1F7-40C1-A76C-EF8C0614003E, 100\r
-DEFINE_PROPERTYKEY(PKEY_Contact_TelexNumber, 0xC554493C, 0xC1F7, 0x40C1, 0xA7, 0x6C, 0xEF, 0x8C, 0x06, 0x14, 0x00, 0x3E, 100);\r
-\r
-// Name: System.Contact.TTYTDDTelephone -- PKEY_Contact_TTYTDDTelephone\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: AAF16BAC-2B55-45E6-9F6D-415EB94910DF, 100\r
-DEFINE_PROPERTYKEY(PKEY_Contact_TTYTDDTelephone, 0xAAF16BAC, 0x2B55, 0x45E6, 0x9F, 0x6D, 0x41, 0x5E, 0xB9, 0x49, 0x10, 0xDF, 100);\r
-\r
-// Name: System.Contact.WebPage -- PKEY_Contact_WebPage\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD, 18\r
-DEFINE_PROPERTYKEY(PKEY_Contact_WebPage, 0xE3E0584C, 0xB788, 0x4A5A, 0xBB, 0x20, 0x7F, 0x5A, 0x44, 0xC9, 0xAC, 0xDD, 18);\r
- \r
-//-----------------------------------------------------------------------------\r
-// Core properties\r
-\r
-\r
-\r
-// Name: System.AcquisitionID -- PKEY_AcquisitionID\r
-// Type: Int32 -- VT_I4\r
-// FormatID: 65A98875-3C80-40AB-ABBC-EFDAF77DBEE2, 100\r
-//\r
-// Hash to determine acquisition session.\r
-DEFINE_PROPERTYKEY(PKEY_AcquisitionID, 0x65A98875, 0x3C80, 0x40AB, 0xAB, 0xBC, 0xEF, 0xDA, 0xF7, 0x7D, 0xBE, 0xE2, 100);\r
-\r
-// Name: System.ApplicationName -- PKEY_ApplicationName\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR) Legacy code may treat this as VT_LPSTR.\r
-// FormatID: (FMTID_SummaryInformation) F29F85E0-4FF9-1068-AB91-08002B27B3D9, 18 (PIDSI_APPNAME)\r
-//\r
-// \r
-DEFINE_PROPERTYKEY(PKEY_ApplicationName, 0xF29F85E0, 0x4FF9, 0x1068, 0xAB, 0x91, 0x08, 0x00, 0x2B, 0x27, 0xB3, 0xD9, 18);\r
-\r
-// Name: System.Author -- PKEY_Author\r
-// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) Legacy code may treat this as VT_LPSTR.\r
-// FormatID: (FMTID_SummaryInformation) F29F85E0-4FF9-1068-AB91-08002B27B3D9, 4 (PIDSI_AUTHOR)\r
-//\r
-// \r
-DEFINE_PROPERTYKEY(PKEY_Author, 0xF29F85E0, 0x4FF9, 0x1068, 0xAB, 0x91, 0x08, 0x00, 0x2B, 0x27, 0xB3, 0xD9, 4);\r
-\r
-// Name: System.Capacity -- PKEY_Capacity\r
-// Type: UInt64 -- VT_UI8\r
-// FormatID: (FMTID_Volume) 9B174B35-40FF-11D2-A27E-00C04FC30871, 3 (PID_VOLUME_CAPACITY) (Filesystem Volume Properties)\r
-//\r
-// The amount of total space in bytes.\r
-DEFINE_PROPERTYKEY(PKEY_Capacity, 0x9B174B35, 0x40FF, 0x11D2, 0xA2, 0x7E, 0x00, 0xC0, 0x4F, 0xC3, 0x08, 0x71, 3);\r
-\r
-// Name: System.Category -- PKEY_Category\r
-// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR)\r
-// FormatID: (FMTID_DocumentSummaryInformation) D5CDD502-2E9C-101B-9397-08002B2CF9AE, 2 (PIDDSI_CATEGORY)\r
-//\r
-// Legacy code treats this as VT_LPSTR.\r
-DEFINE_PROPERTYKEY(PKEY_Category, 0xD5CDD502, 0x2E9C, 0x101B, 0x93, 0x97, 0x08, 0x00, 0x2B, 0x2C, 0xF9, 0xAE, 2);\r
-\r
-// Name: System.Comment -- PKEY_Comment\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR) Legacy code may treat this as VT_LPSTR.\r
-// FormatID: (FMTID_SummaryInformation) F29F85E0-4FF9-1068-AB91-08002B27B3D9, 6 (PIDSI_COMMENTS)\r
-//\r
-// Comments.\r
-DEFINE_PROPERTYKEY(PKEY_Comment, 0xF29F85E0, 0x4FF9, 0x1068, 0xAB, 0x91, 0x08, 0x00, 0x2B, 0x27, 0xB3, 0xD9, 6);\r
-\r
-// Name: System.Company -- PKEY_Company\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: (FMTID_DocumentSummaryInformation) D5CDD502-2E9C-101B-9397-08002B2CF9AE, 15 (PIDDSI_COMPANY)\r
-//\r
-// The company or publisher.\r
-DEFINE_PROPERTYKEY(PKEY_Company, 0xD5CDD502, 0x2E9C, 0x101B, 0x93, 0x97, 0x08, 0x00, 0x2B, 0x2C, 0xF9, 0xAE, 15);\r
-\r
-// Name: System.ComputerName -- PKEY_ComputerName\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: (FMTID_ShellDetails) 28636AA6-953D-11D2-B5D6-00C04FD918D0, 5 (PID_COMPUTERNAME)\r
-//\r
-// \r
-DEFINE_PROPERTYKEY(PKEY_ComputerName, 0x28636AA6, 0x953D, 0x11D2, 0xB5, 0xD6, 0x00, 0xC0, 0x4F, 0xD9, 0x18, 0xD0, 5);\r
-\r
-// Name: System.ContainedItems -- PKEY_ContainedItems\r
-// Type: Multivalue Guid -- VT_VECTOR | VT_CLSID (For variants: VT_ARRAY | VT_CLSID)\r
-// FormatID: (FMTID_ShellDetails) 28636AA6-953D-11D2-B5D6-00C04FD918D0, 29\r
-// \r
-// The list of type of items, this item contains. For example, this item contains urls, attachments etc.\r
-// This is represented as a vector array of GUIDs where each GUID represents certain type.\r
-DEFINE_PROPERTYKEY(PKEY_ContainedItems, 0x28636AA6, 0x953D, 0x11D2, 0xB5, 0xD6, 0x00, 0xC0, 0x4F, 0xD9, 0x18, 0xD0, 29);\r
-\r
-// Name: System.ContentStatus -- PKEY_ContentStatus\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: (FMTID_DocumentSummaryInformation) D5CDD502-2E9C-101B-9397-08002B2CF9AE, 27\r
-DEFINE_PROPERTYKEY(PKEY_ContentStatus, 0xD5CDD502, 0x2E9C, 0x101B, 0x93, 0x97, 0x08, 0x00, 0x2B, 0x2C, 0xF9, 0xAE, 27);\r
-\r
-// Name: System.ContentType -- PKEY_ContentType\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: (FMTID_DocumentSummaryInformation) D5CDD502-2E9C-101B-9397-08002B2CF9AE, 26\r
-DEFINE_PROPERTYKEY(PKEY_ContentType, 0xD5CDD502, 0x2E9C, 0x101B, 0x93, 0x97, 0x08, 0x00, 0x2B, 0x2C, 0xF9, 0xAE, 26);\r
-\r
-// Name: System.Copyright -- PKEY_Copyright\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 11 (PIDMSI_COPYRIGHT)\r
-//\r
-// \r
-DEFINE_PROPERTYKEY(PKEY_Copyright, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 11);\r
-\r
-// Name: System.DateAccessed -- PKEY_DateAccessed\r
-// Type: DateTime -- VT_FILETIME (For variants: VT_DATE)\r
-// FormatID: (FMTID_Storage) B725F130-47EF-101A-A5F1-02608C9EEBAC, 16 (PID_STG_ACCESSTIME)\r
-//\r
-// The time of the last access to the item. The Indexing Service friendly name is 'access'.\r
-DEFINE_PROPERTYKEY(PKEY_DateAccessed, 0xB725F130, 0x47EF, 0x101A, 0xA5, 0xF1, 0x02, 0x60, 0x8C, 0x9E, 0xEB, 0xAC, 16);\r
-\r
-// Name: System.DateAcquired -- PKEY_DateAcquired\r
-// Type: DateTime -- VT_FILETIME (For variants: VT_DATE)\r
-// FormatID: 2CBAA8F5-D81F-47CA-B17A-F8D822300131, 100\r
-// \r
-// The time the file entered the system via acquisition. This is not the same as System.DateImported.\r
-// Examples are when pictures are acquired from a camera, or when music is purchased online.\r
-DEFINE_PROPERTYKEY(PKEY_DateAcquired, 0x2CBAA8F5, 0xD81F, 0x47CA, 0xB1, 0x7A, 0xF8, 0xD8, 0x22, 0x30, 0x01, 0x31, 100);\r
-\r
-// Name: System.DateArchived -- PKEY_DateArchived\r
-// Type: DateTime -- VT_FILETIME (For variants: VT_DATE)\r
-// FormatID: 43F8D7B7-A444-4F87-9383-52271C9B915C, 100\r
-DEFINE_PROPERTYKEY(PKEY_DateArchived, 0x43F8D7B7, 0xA444, 0x4F87, 0x93, 0x83, 0x52, 0x27, 0x1C, 0x9B, 0x91, 0x5C, 100);\r
-\r
-// Name: System.DateCompleted -- PKEY_DateCompleted\r
-// Type: DateTime -- VT_FILETIME (For variants: VT_DATE)\r
-// FormatID: 72FAB781-ACDA-43E5-B155-B2434F85E678, 100\r
-DEFINE_PROPERTYKEY(PKEY_DateCompleted, 0x72FAB781, 0xACDA, 0x43E5, 0xB1, 0x55, 0xB2, 0x43, 0x4F, 0x85, 0xE6, 0x78, 100);\r
-\r
-// Name: System.DateCreated -- PKEY_DateCreated\r
-// Type: DateTime -- VT_FILETIME (For variants: VT_DATE)\r
-// FormatID: (FMTID_Storage) B725F130-47EF-101A-A5F1-02608C9EEBAC, 15 (PID_STG_CREATETIME)\r
-//\r
-// The date and time the item was created. The Indexing Service friendly name is 'create'.\r
-DEFINE_PROPERTYKEY(PKEY_DateCreated, 0xB725F130, 0x47EF, 0x101A, 0xA5, 0xF1, 0x02, 0x60, 0x8C, 0x9E, 0xEB, 0xAC, 15);\r
-\r
-// Name: System.DateImported -- PKEY_DateImported\r
-// Type: DateTime -- VT_FILETIME (For variants: VT_DATE)\r
-// FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 18258\r
-//\r
-// The time the file is imported into a separate database. This is not the same as System.DateAcquired. (Eg, 2003:05:22 13:55:04)\r
-DEFINE_PROPERTYKEY(PKEY_DateImported, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 18258);\r
-\r
-// Name: System.DateModified -- PKEY_DateModified\r
-// Type: DateTime -- VT_FILETIME (For variants: VT_DATE)\r
-// FormatID: (FMTID_Storage) B725F130-47EF-101A-A5F1-02608C9EEBAC, 14 (PID_STG_WRITETIME)\r
-//\r
-// The date and time of the last write to the item. The Indexing Service friendly name is 'write'.\r
-DEFINE_PROPERTYKEY(PKEY_DateModified, 0xB725F130, 0x47EF, 0x101A, 0xA5, 0xF1, 0x02, 0x60, 0x8C, 0x9E, 0xEB, 0xAC, 14);\r
-\r
-// Name: System.DueDate -- PKEY_DueDate\r
-// Type: DateTime -- VT_FILETIME (For variants: VT_DATE)\r
-// FormatID: 3F8472B5-E0AF-4DB2-8071-C53FE76AE7CE, 100\r
-DEFINE_PROPERTYKEY(PKEY_DueDate, 0x3F8472B5, 0xE0AF, 0x4DB2, 0x80, 0x71, 0xC5, 0x3F, 0xE7, 0x6A, 0xE7, 0xCE, 100);\r
-\r
-// Name: System.EndDate -- PKEY_EndDate\r
-// Type: DateTime -- VT_FILETIME (For variants: VT_DATE)\r
-// FormatID: C75FAA05-96FD-49E7-9CB4-9F601082D553, 100\r
-DEFINE_PROPERTYKEY(PKEY_EndDate, 0xC75FAA05, 0x96FD, 0x49E7, 0x9C, 0xB4, 0x9F, 0x60, 0x10, 0x82, 0xD5, 0x53, 100);\r
-\r
-// Name: System.FileAllocationSize -- PKEY_FileAllocationSize\r
-// Type: UInt64 -- VT_UI8\r
-// FormatID: (FMTID_Storage) B725F130-47EF-101A-A5F1-02608C9EEBAC, 18 (PID_STG_ALLOCSIZE)\r
-//\r
-// \r
-DEFINE_PROPERTYKEY(PKEY_FileAllocationSize, 0xB725F130, 0x47EF, 0x101A, 0xA5, 0xF1, 0x02, 0x60, 0x8C, 0x9E, 0xEB, 0xAC, 18);\r
-\r
-// Name: System.FileAttributes -- PKEY_FileAttributes\r
-// Type: UInt32 -- VT_UI4\r
-// FormatID: (FMTID_Storage) B725F130-47EF-101A-A5F1-02608C9EEBAC, 13 (PID_STG_ATTRIBUTES)\r
-// \r
-// This is the WIN32_FIND_DATA dwFileAttributes for the file-based item.\r
-DEFINE_PROPERTYKEY(PKEY_FileAttributes, 0xB725F130, 0x47EF, 0x101A, 0xA5, 0xF1, 0x02, 0x60, 0x8C, 0x9E, 0xEB, 0xAC, 13);\r
-\r
-// Name: System.FileCount -- PKEY_FileCount\r
-// Type: UInt64 -- VT_UI8\r
-// FormatID: (FMTID_ShellDetails) 28636AA6-953D-11D2-B5D6-00C04FD918D0, 12\r
-//\r
-// \r
-DEFINE_PROPERTYKEY(PKEY_FileCount, 0x28636AA6, 0x953D, 0x11D2, 0xB5, 0xD6, 0x00, 0xC0, 0x4F, 0xD9, 0x18, 0xD0, 12);\r
-\r
-// Name: System.FileDescription -- PKEY_FileDescription\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: (PSFMTID_VERSION) 0CEF7D53-FA64-11D1-A203-0000F81FEDEE, 3 (PIDVSI_FileDescription)\r
-// \r
-// This is a user-friendly description of the file.\r
-DEFINE_PROPERTYKEY(PKEY_FileDescription, 0x0CEF7D53, 0xFA64, 0x11D1, 0xA2, 0x03, 0x00, 0x00, 0xF8, 0x1F, 0xED, 0xEE, 3);\r
-\r
-// Name: System.FileExtension -- PKEY_FileExtension\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: E4F10A3C-49E6-405D-8288-A23BD4EEAA6C, 100\r
-// \r
-// This is the file extension of the file based item, including the leading period. \r
-// \r
-// If System.FileName is VT_EMPTY, then this property should be too. Otherwise, it should be derived\r
-// appropriately by the data source from System.FileName. If System.FileName does not have a file \r
-// extension, this value should be VT_EMPTY.\r
-// \r
-// To obtain the type of any item (including an item that is not a file), use System.ItemType.\r
-// \r
-// Example values:\r
-// \r
-// If the path is... The property value is...\r
-// ----------------- ------------------------\r
-// "c:\foo\bar\hello.txt" ".txt"\r
-// "\\server\share\mydir\goodnews.doc" ".doc"\r
-// "\\server\share\numbers.xls" ".xls"\r
-// "\\server\share\folder" VT_EMPTY\r
-// "c:\foo\MyFolder" VT_EMPTY\r
-// [desktop] VT_EMPTY\r
-DEFINE_PROPERTYKEY(PKEY_FileExtension, 0xE4F10A3C, 0x49E6, 0x405D, 0x82, 0x88, 0xA2, 0x3B, 0xD4, 0xEE, 0xAA, 0x6C, 100);\r
-\r
-// Name: System.FileFRN -- PKEY_FileFRN\r
-// Type: UInt64 -- VT_UI8\r
-// FormatID: (FMTID_Storage) B725F130-47EF-101A-A5F1-02608C9EEBAC, 21 (PID_STG_FRN)\r
-// \r
-// This is the unique file ID, also known as the File Reference Number. For a given file, this is the same value\r
-// as is found in the structure variable FILE_ID_BOTH_DIR_INFO.FileId, via GetFileInformationByHandleEx().\r
-DEFINE_PROPERTYKEY(PKEY_FileFRN, 0xB725F130, 0x47EF, 0x101A, 0xA5, 0xF1, 0x02, 0x60, 0x8C, 0x9E, 0xEB, 0xAC, 21);\r
-\r
-// Name: System.FileName -- PKEY_FileName\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 41CF5AE0-F75A-4806-BD87-59C7D9248EB9, 100\r
-// \r
-// This is the file name (including extension) of the file.\r
-// \r
-// It is possible that the item might not exist on a filesystem (ie, it may not be opened \r
-// using CreateFile). Nonetheless, if the item is represented as a file from the logical sense \r
-// (and its name follows standard Win32 file-naming syntax), then the data source should emit this property.\r
-// \r
-// If an item is not a file, then the value for this property is VT_EMPTY. See \r
-// System.ItemNameDisplay.\r
-// \r
-// This has the same value as System.ParsingName for items that are provided by the Shell's file folder.\r
-// \r
-// Example values:\r
-// \r
-// If the path is... The property value is...\r
-// ----------------- ------------------------\r
-// "c:\foo\bar\hello.txt" "hello.txt"\r
-// "\\server\share\mydir\goodnews.doc" "goodnews.doc"\r
-// "\\server\share\numbers.xls" "numbers.xls"\r
-// "c:\foo\MyFolder" "MyFolder"\r
-// (email message) VT_EMPTY\r
-// (song on portable device) "song.wma"\r
-DEFINE_PROPERTYKEY(PKEY_FileName, 0x41CF5AE0, 0xF75A, 0x4806, 0xBD, 0x87, 0x59, 0xC7, 0xD9, 0x24, 0x8E, 0xB9, 100);\r
-\r
-// Name: System.FileOwner -- PKEY_FileOwner\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: (FMTID_Misc) 9B174B34-40FF-11D2-A27E-00C04FC30871, 4 (PID_MISC_OWNER)\r
-// \r
-// This is the owner of the file, according to the file system.\r
-DEFINE_PROPERTYKEY(PKEY_FileOwner, 0x9B174B34, 0x40FF, 0x11D2, 0xA2, 0x7E, 0x00, 0xC0, 0x4F, 0xC3, 0x08, 0x71, 4);\r
-\r
-// Name: System.FileVersion -- PKEY_FileVersion\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: (PSFMTID_VERSION) 0CEF7D53-FA64-11D1-A203-0000F81FEDEE, 4 (PIDVSI_FileVersion)\r
-//\r
-// \r
-DEFINE_PROPERTYKEY(PKEY_FileVersion, 0x0CEF7D53, 0xFA64, 0x11D1, 0xA2, 0x03, 0x00, 0x00, 0xF8, 0x1F, 0xED, 0xEE, 4);\r
-\r
-// Name: System.FindData -- PKEY_FindData\r
-// Type: Buffer -- VT_VECTOR | VT_UI1 (For variants: VT_ARRAY | VT_UI1)\r
-// FormatID: (FMTID_ShellDetails) 28636AA6-953D-11D2-B5D6-00C04FD918D0, 0 (PID_FINDDATA)\r
-//\r
-// WIN32_FIND_DATAW in buffer of bytes.\r
-DEFINE_PROPERTYKEY(PKEY_FindData, 0x28636AA6, 0x953D, 0x11D2, 0xB5, 0xD6, 0x00, 0xC0, 0x4F, 0xD9, 0x18, 0xD0, 0);\r
-\r
-// Name: System.FlagColor -- PKEY_FlagColor\r
-// Type: UInt16 -- VT_UI2\r
-// FormatID: 67DF94DE-0CA7-4D6F-B792-053A3E4F03CF, 100\r
-//\r
-// \r
-DEFINE_PROPERTYKEY(PKEY_FlagColor, 0x67DF94DE, 0x0CA7, 0x4D6F, 0xB7, 0x92, 0x05, 0x3A, 0x3E, 0x4F, 0x03, 0xCF, 100);\r
-\r
-// Possible discrete values for PKEY_FlagColor are:\r
-#define FLAGCOLOR_PURPLE 1u\r
-#define FLAGCOLOR_ORANGE 2u\r
-#define FLAGCOLOR_GREEN 3u\r
-#define FLAGCOLOR_YELLOW 4u\r
-#define FLAGCOLOR_BLUE 5u\r
-#define FLAGCOLOR_RED 6u\r
-\r
-// Name: System.FlagColorText -- PKEY_FlagColorText\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 45EAE747-8E2A-40AE-8CBF-CA52ABA6152A, 100\r
-// \r
-// This is the user-friendly form of System.FlagColor. Not intended to be parsed \r
-// programmatically.\r
-DEFINE_PROPERTYKEY(PKEY_FlagColorText, 0x45EAE747, 0x8E2A, 0x40AE, 0x8C, 0xBF, 0xCA, 0x52, 0xAB, 0xA6, 0x15, 0x2A, 100);\r
-\r
-// Name: System.FlagStatus -- PKEY_FlagStatus\r
-// Type: Int32 -- VT_I4\r
-// FormatID: E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD, 12\r
-//\r
-// Status of Flag. Values: (0=none 1=white 2=Red). cdoPR_FLAG_STATUS\r
-DEFINE_PROPERTYKEY(PKEY_FlagStatus, 0xE3E0584C, 0xB788, 0x4A5A, 0xBB, 0x20, 0x7F, 0x5A, 0x44, 0xC9, 0xAC, 0xDD, 12);\r
-\r
-// Possible discrete values for PKEY_FlagStatus are:\r
-#define FLAGSTATUS_NOTFLAGGED 0l\r
-#define FLAGSTATUS_COMPLETED 1l\r
-#define FLAGSTATUS_FOLLOWUP 2l\r
-\r
-// Name: System.FlagStatusText -- PKEY_FlagStatusText\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: DC54FD2E-189D-4871-AA01-08C2F57A4ABC, 100\r
-// \r
-// This is the user-friendly form of System.FlagStatus. Not intended to be parsed \r
-// programmatically.\r
-DEFINE_PROPERTYKEY(PKEY_FlagStatusText, 0xDC54FD2E, 0x189D, 0x4871, 0xAA, 0x01, 0x08, 0xC2, 0xF5, 0x7A, 0x4A, 0xBC, 100);\r
-\r
-// Name: System.FreeSpace -- PKEY_FreeSpace\r
-// Type: UInt64 -- VT_UI8\r
-// FormatID: (FMTID_Volume) 9B174B35-40FF-11D2-A27E-00C04FC30871, 2 (PID_VOLUME_FREE) (Filesystem Volume Properties)\r
-//\r
-// The amount of free space in bytes.\r
-DEFINE_PROPERTYKEY(PKEY_FreeSpace, 0x9B174B35, 0x40FF, 0x11D2, 0xA2, 0x7E, 0x00, 0xC0, 0x4F, 0xC3, 0x08, 0x71, 2);\r
-\r
-// Name: System.Identity -- PKEY_Identity\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: A26F4AFC-7346-4299-BE47-EB1AE613139F, 100\r
-DEFINE_PROPERTYKEY(PKEY_Identity, 0xA26F4AFC, 0x7346, 0x4299, 0xBE, 0x47, 0xEB, 0x1A, 0xE6, 0x13, 0x13, 0x9F, 100);\r
-\r
-// Name: System.Importance -- PKEY_Importance\r
-// Type: Int32 -- VT_I4\r
-// FormatID: E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD, 11\r
-DEFINE_PROPERTYKEY(PKEY_Importance, 0xE3E0584C, 0xB788, 0x4A5A, 0xBB, 0x20, 0x7F, 0x5A, 0x44, 0xC9, 0xAC, 0xDD, 11);\r
-\r
-// Possible range of values for PKEY_Importance are:\r
-#define IMPORTANCE_LOW_MIN 0l\r
-#define IMPORTANCE_LOW_SET 1l\r
-#define IMPORTANCE_LOW_MAX 1l\r
-\r
-#define IMPORTANCE_NORMAL_MIN 2l\r
-#define IMPORTANCE_NORMAL_SET 3l\r
-#define IMPORTANCE_NORMAL_MAX 4l\r
-\r
-#define IMPORTANCE_HIGH_MIN 5l\r
-#define IMPORTANCE_HIGH_SET 5l\r
-#define IMPORTANCE_HIGH_MAX 5l\r
-\r
-\r
-// Name: System.ImportanceText -- PKEY_ImportanceText\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: A3B29791-7713-4E1D-BB40-17DB85F01831, 100\r
-// \r
-// This is the user-friendly form of System.Importance. Not intended to be parsed \r
-// programmatically.\r
-DEFINE_PROPERTYKEY(PKEY_ImportanceText, 0xA3B29791, 0x7713, 0x4E1D, 0xBB, 0x40, 0x17, 0xDB, 0x85, 0xF0, 0x18, 0x31, 100);\r
-\r
-// Name: System.IsAttachment -- PKEY_IsAttachment\r
-// Type: Boolean -- VT_BOOL\r
-// FormatID: F23F425C-71A1-4FA8-922F-678EA4A60408, 100\r
-//\r
-// Identifies if this item is an attachment.\r
-DEFINE_PROPERTYKEY(PKEY_IsAttachment, 0xF23F425C, 0x71A1, 0x4FA8, 0x92, 0x2F, 0x67, 0x8E, 0xA4, 0xA6, 0x04, 0x08, 100);\r
-\r
-// Name: System.IsDeleted -- PKEY_IsDeleted\r
-// Type: Boolean -- VT_BOOL\r
-// FormatID: 5CDA5FC8-33EE-4FF3-9094-AE7BD8868C4D, 100\r
-DEFINE_PROPERTYKEY(PKEY_IsDeleted, 0x5CDA5FC8, 0x33EE, 0x4FF3, 0x90, 0x94, 0xAE, 0x7B, 0xD8, 0x86, 0x8C, 0x4D, 100);\r
-\r
-// Name: System.IsFlagged -- PKEY_IsFlagged\r
-// Type: Boolean -- VT_BOOL\r
-// FormatID: 5DA84765-E3FF-4278-86B0-A27967FBDD03, 100\r
-DEFINE_PROPERTYKEY(PKEY_IsFlagged, 0x5DA84765, 0xE3FF, 0x4278, 0x86, 0xB0, 0xA2, 0x79, 0x67, 0xFB, 0xDD, 0x03, 100);\r
-\r
-// Name: System.IsFlaggedComplete -- PKEY_IsFlaggedComplete\r
-// Type: Boolean -- VT_BOOL\r
-// FormatID: A6F360D2-55F9-48DE-B909-620E090A647C, 100\r
-DEFINE_PROPERTYKEY(PKEY_IsFlaggedComplete, 0xA6F360D2, 0x55F9, 0x48DE, 0xB9, 0x09, 0x62, 0x0E, 0x09, 0x0A, 0x64, 0x7C, 100);\r
-\r
-// Name: System.IsIncomplete -- PKEY_IsIncomplete\r
-// Type: Boolean -- VT_BOOL\r
-// FormatID: 346C8BD1-2E6A-4C45-89A4-61B78E8E700F, 100\r
-//\r
-// Identifies if the message was not completely received for some error condition.\r
-DEFINE_PROPERTYKEY(PKEY_IsIncomplete, 0x346C8BD1, 0x2E6A, 0x4C45, 0x89, 0xA4, 0x61, 0xB7, 0x8E, 0x8E, 0x70, 0x0F, 100);\r
-\r
-// Name: System.IsRead -- PKEY_IsRead\r
-// Type: Boolean -- VT_BOOL\r
-// FormatID: E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD, 10\r
-//\r
-// Has the item been read?\r
-DEFINE_PROPERTYKEY(PKEY_IsRead, 0xE3E0584C, 0xB788, 0x4A5A, 0xBB, 0x20, 0x7F, 0x5A, 0x44, 0xC9, 0xAC, 0xDD, 10);\r
-\r
-// Name: System.IsSendToTarget -- PKEY_IsSendToTarget\r
-// Type: Boolean -- VT_BOOL\r
-// FormatID: (FMTID_ShellDetails) 28636AA6-953D-11D2-B5D6-00C04FD918D0, 33\r
-//\r
-// Provided by certain shell folders. Return TRUE if the folder is a valid Send To target.\r
-DEFINE_PROPERTYKEY(PKEY_IsSendToTarget, 0x28636AA6, 0x953D, 0x11D2, 0xB5, 0xD6, 0x00, 0xC0, 0x4F, 0xD9, 0x18, 0xD0, 33);\r
-\r
-// Name: System.IsShared -- PKEY_IsShared\r
-// Type: Boolean -- VT_BOOL\r
-// FormatID: EF884C5B-2BFE-41BB-AAE5-76EEDF4F9902, 100\r
-//\r
-// Is this item shared?\r
-DEFINE_PROPERTYKEY(PKEY_IsShared, 0xEF884C5B, 0x2BFE, 0x41BB, 0xAA, 0xE5, 0x76, 0xEE, 0xDF, 0x4F, 0x99, 0x02, 100);\r
-\r
-// Name: System.ItemAuthors -- PKEY_ItemAuthors\r
-// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR)\r
-// FormatID: D0A04F0A-462A-48A4-BB2F-3706E88DBD7D, 100\r
-// \r
-// This is the generic list of authors associated with an item. \r
-// \r
-// For example, the artist name for a track is the item author.\r
-DEFINE_PROPERTYKEY(PKEY_ItemAuthors, 0xD0A04F0A, 0x462A, 0x48A4, 0xBB, 0x2F, 0x37, 0x06, 0xE8, 0x8D, 0xBD, 0x7D, 100);\r
-\r
-// Name: System.ItemDate -- PKEY_ItemDate\r
-// Type: DateTime -- VT_FILETIME (For variants: VT_DATE)\r
-// FormatID: F7DB74B4-4287-4103-AFBA-F1B13DCD75CF, 100\r
-// \r
-// This is the main date for an item. The date of interest. \r
-// \r
-// For example, for photos this maps to System.Photo.DateTaken.\r
-DEFINE_PROPERTYKEY(PKEY_ItemDate, 0xF7DB74B4, 0x4287, 0x4103, 0xAF, 0xBA, 0xF1, 0xB1, 0x3D, 0xCD, 0x75, 0xCF, 100);\r
-\r
-// Name: System.ItemFolderNameDisplay -- PKEY_ItemFolderNameDisplay\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: (FMTID_Storage) B725F130-47EF-101A-A5F1-02608C9EEBAC, 2 (PID_STG_DIRECTORY)\r
-// \r
-// This is the user-friendly display name of the parent folder of an item.\r
-// \r
-// If System.ItemFolderPathDisplay is VT_EMPTY, then this property should be too. Otherwise, it \r
-// should be derived appropriately by the data source from System.ItemFolderPathDisplay.\r
-// \r
-// Example values:\r
-// \r
-// If the path is... The property value is...\r
-// ----------------- ------------------------\r
-// "c:\foo\bar\hello.txt" "bar"\r
-// "\\server\share\mydir\goodnews.doc" "mydir"\r
-// "\\server\share\numbers.xls" "share"\r
-// "c:\foo\MyFolder" "foo"\r
-// "/Mailbox Account/Inbox/'Re: Hello!'" "Inbox"\r
-DEFINE_PROPERTYKEY(PKEY_ItemFolderNameDisplay, 0xB725F130, 0x47EF, 0x101A, 0xA5, 0xF1, 0x02, 0x60, 0x8C, 0x9E, 0xEB, 0xAC, 2);\r
-\r
-// Name: System.ItemFolderPathDisplay -- PKEY_ItemFolderPathDisplay\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD, 6\r
-// \r
-// This is the user-friendly display path of the parent folder of an item.\r
-// \r
-// If System.ItemPathDisplay is VT_EMPTY, then this property should be too. Otherwise, it should \r
-// be derived appropriately by the data source from System.ItemPathDisplay.\r
-// \r
-// Example values:\r
-// \r
-// If the path is... The property value is...\r
-// ----------------- ------------------------\r
-// "c:\foo\bar\hello.txt" "c:\foo\bar"\r
-// "\\server\share\mydir\goodnews.doc" "\\server\share\mydir"\r
-// "\\server\share\numbers.xls" "\\server\share"\r
-// "c:\foo\MyFolder" "c:\foo"\r
-// "/Mailbox Account/Inbox/'Re: Hello!'" "/Mailbox Account/Inbox"\r
-DEFINE_PROPERTYKEY(PKEY_ItemFolderPathDisplay, 0xE3E0584C, 0xB788, 0x4A5A, 0xBB, 0x20, 0x7F, 0x5A, 0x44, 0xC9, 0xAC, 0xDD, 6);\r
-\r
-// Name: System.ItemFolderPathDisplayNarrow -- PKEY_ItemFolderPathDisplayNarrow\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: DABD30ED-0043-4789-A7F8-D013A4736622, 100\r
-// \r
-// This is the user-friendly display path of the parent folder of an item. The format of the string\r
-// should be tailored such that the folder name comes first, to optimize for a narrow viewing column.\r
-// \r
-// If the folder is a file folder, the value includes localized names if they are present.\r
-// \r
-// If System.ItemFolderPathDisplay is VT_EMPTY, then this property should be too. Otherwise, it should\r
-// be derived appropriately by the data source from System.ItemFolderPathDisplay.\r
-// \r
-// Example values:\r
-// \r
-// If the path is... The property value is...\r
-// ----------------- ------------------------\r
-// "c:\foo\bar\hello.txt" "bar (c:\foo)"\r
-// "\\server\share\mydir\goodnews.doc" "mydir (\\server\share)"\r
-// "\\server\share\numbers.xls" "share (\\server)"\r
-// "c:\foo\MyFolder" "foo (c:\)"\r
-// "/Mailbox Account/Inbox/'Re: Hello!'" "Inbox (/Mailbox Account)"\r
-DEFINE_PROPERTYKEY(PKEY_ItemFolderPathDisplayNarrow, 0xDABD30ED, 0x0043, 0x4789, 0xA7, 0xF8, 0xD0, 0x13, 0xA4, 0x73, 0x66, 0x22, 100);\r
-\r
-// Name: System.ItemName -- PKEY_ItemName\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 6B8DA074-3B5C-43BC-886F-0A2CDCE00B6F, 100\r
-// \r
-// This is the base-name of the System.ItemNameDisplay.\r
-// \r
-// If the item is a file this property\r
-// includes the extension in all cases, and will be localized if a localized name is available.\r
-// \r
-// If the item is a message, then the value of this property does not include the forwarding or\r
-// reply prefixes (see System.ItemNamePrefix).\r
-DEFINE_PROPERTYKEY(PKEY_ItemName, 0x6B8DA074, 0x3B5C, 0x43BC, 0x88, 0x6F, 0x0A, 0x2C, 0xDC, 0xE0, 0x0B, 0x6F, 100);\r
-\r
-// Name: System.ItemNameDisplay -- PKEY_ItemNameDisplay\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: (FMTID_Storage) B725F130-47EF-101A-A5F1-02608C9EEBAC, 10 (PID_STG_NAME)\r
-// \r
-// This is the display name in "most complete" form. This is the best effort unique representation\r
-// of the name of an item that makes sense for end users to read. It is the concatentation of\r
-// System.ItemNamePrefix and System.ItemName.\r
-// \r
-// If the item is a file this property\r
-// includes the extension in all cases, and will be localized if a localized name is available.\r
-// \r
-// There are acceptable cases when System.FileName is not VT_EMPTY, yet the value of this property \r
-// is completely different. Email messages are a key example. If the item is an email message, \r
-// the item name is likely the subject. In that case, the value must be the concatenation of the\r
-// System.ItemNamePrefix and System.ItemName. Since the value of System.ItemNamePrefix excludes\r
-// any trailing whitespace, the concatenation must include a whitespace when generating System.ItemNameDisplay.\r
-// \r
-// Note that this property is not guaranteed to be unique, but the idea is to promote the most likely\r
-// candidate that can be unique and also makes sense for end users. For example, for documents, you\r
-// might think about using System.Title as the System.ItemNameDisplay, but in practice the title of\r
-// the documents may not be useful or unique enough to be of value as the sole System.ItemNameDisplay. \r
-// Instead, providing the value of System.FileName as the value of System.ItemNameDisplay is a better\r
-// candidate. In Windows Mail, the emails are stored in the file system as .eml files and the \r
-// System.FileName for those files are not human-friendly as they contain GUIDs. In this example, \r
-// promoting System.Subject as System.ItemNameDisplay makes more sense.\r
-// \r
-// Compatibility notes:\r
-// \r
-// Shell folder implementations on Vista: use PKEY_ItemNameDisplay for the name column when\r
-// you want Explorer to call ISF::GetDisplayNameOf(SHGDN_NORMAL) to get the value of the name. Use\r
-// another PKEY (like PKEY_ItemName) when you want Explorer to call either the folder's property store or\r
-// ISF2::GetDetailsEx in order to get the value of the name.\r
-// \r
-// Shell folder implementations on XP: the first column needs to be the name column, and Explorer\r
-// will call ISF::GetDisplayNameOf to get the value of the name. The PKEY/SCID does not matter.\r
-// \r
-// Example values:\r
-// \r
-// File: "hello.txt"\r
-// Message: "Re: Let's talk about Tom's argyle socks!"\r
-// Device folder: "song.wma"\r
-// Folder: "Documents"\r
-DEFINE_PROPERTYKEY(PKEY_ItemNameDisplay, 0xB725F130, 0x47EF, 0x101A, 0xA5, 0xF1, 0x02, 0x60, 0x8C, 0x9E, 0xEB, 0xAC, 10);\r
-\r
-// Name: System.ItemNamePrefix -- PKEY_ItemNamePrefix\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: D7313FF1-A77A-401C-8C99-3DBDD68ADD36, 100\r
-// \r
-// This is the prefix of an item, used for email messages.\r
-// where the subject begins with "Re:" which is the prefix.\r
-// \r
-// If the item is a file, then the value of this property is VT_EMPTY.\r
-// \r
-// If the item is a message, then the value of this property is the forwarding or reply \r
-// prefixes (including delimiting colon, but no whitespace), or VT_EMPTY if there is no prefix.\r
-// \r
-// Example values:\r
-// \r
-// System.ItemNamePrefix System.ItemName System.ItemNameDisplay\r
-// --------------------- ------------------- ----------------------\r
-// VT_EMPTY "Great day" "Great day"\r
-// "Re:" "Great day" "Re: Great day"\r
-// "Fwd: " "Monthly budget" "Fwd: Monthly budget"\r
-// VT_EMPTY "accounts.xls" "accounts.xls"\r
-DEFINE_PROPERTYKEY(PKEY_ItemNamePrefix, 0xD7313FF1, 0xA77A, 0x401C, 0x8C, 0x99, 0x3D, 0xBD, 0xD6, 0x8A, 0xDD, 0x36, 100);\r
-\r
-// Name: System.ItemParticipants -- PKEY_ItemParticipants\r
-// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR)\r
-// FormatID: D4D0AA16-9948-41A4-AA85-D97FF9646993, 100\r
-// \r
-// This is the generic list of people associated with an item and who contributed \r
-// to the item. \r
-// \r
-// For example, this is the combination of people in the To list, Cc list and \r
-// sender of an email message.\r
-DEFINE_PROPERTYKEY(PKEY_ItemParticipants, 0xD4D0AA16, 0x9948, 0x41A4, 0xAA, 0x85, 0xD9, 0x7F, 0xF9, 0x64, 0x69, 0x93, 100);\r
-\r
-// Name: System.ItemPathDisplay -- PKEY_ItemPathDisplay\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD, 7\r
-// \r
-// This is the user-friendly display path to the item.\r
-// \r
-// If the item is a file or folder this property\r
-// includes the extension in all cases, and will be localized if a localized name is available.\r
-// \r
-// For other items,this is the user-friendly equivalent, assuming the item exists in hierarchical storage.\r
-// \r
-// Unlike System.ItemUrl, this property value does not include the URL scheme.\r
-// \r
-// To parse an item path, use System.ItemUrl or System.ParsingPath. To reference shell \r
-// namespace items using shell APIs, use System.ParsingPath.\r
-// \r
-// Example values:\r
-// \r
-// If the path is... The property value is...\r
-// ----------------- ------------------------\r
-// "c:\foo\bar\hello.txt" "c:\foo\bar\hello.txt"\r
-// "\\server\share\mydir\goodnews.doc" "\\server\share\mydir\goodnews.doc"\r
-// "\\server\share\numbers.xls" "\\server\share\numbers.xls"\r
-// "c:\foo\MyFolder" "c:\foo\MyFolder"\r
-// "/Mailbox Account/Inbox/'Re: Hello!'" "/Mailbox Account/Inbox/'Re: Hello!'"\r
-DEFINE_PROPERTYKEY(PKEY_ItemPathDisplay, 0xE3E0584C, 0xB788, 0x4A5A, 0xBB, 0x20, 0x7F, 0x5A, 0x44, 0xC9, 0xAC, 0xDD, 7);\r
-\r
-// Name: System.ItemPathDisplayNarrow -- PKEY_ItemPathDisplayNarrow\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: (FMTID_ShellDetails) 28636AA6-953D-11D2-B5D6-00C04FD918D0, 8\r
-// \r
-// This is the user-friendly display path to the item. The format of the string should be \r
-// tailored such that the name comes first, to optimize for a narrow viewing column.\r
-// \r
-// If the item is a file, the value excludes the file extension, and includes localized names if they are present.\r
-// If the item is a message, the value includes the System.ItemNamePrefix.\r
-// \r
-// To parse an item path, use System.ItemUrl or System.ParsingPath.\r
-// \r
-// Example values:\r
-// \r
-// If the path is... The property value is...\r
-// ----------------- ------------------------\r
-// "c:\foo\bar\hello.txt" "hello (c:\foo\bar)"\r
-// "\\server\share\mydir\goodnews.doc" "goodnews (\\server\share\mydir)"\r
-// "\\server\share\folder" "folder (\\server\share)"\r
-// "c:\foo\MyFolder" "MyFolder (c:\foo)"\r
-// "/Mailbox Account/Inbox/'Re: Hello!'" "Re: Hello! (/Mailbox Account/Inbox)"\r
-DEFINE_PROPERTYKEY(PKEY_ItemPathDisplayNarrow, 0x28636AA6, 0x953D, 0x11D2, 0xB5, 0xD6, 0x00, 0xC0, 0x4F, 0xD9, 0x18, 0xD0, 8);\r
-\r
-// Name: System.ItemType -- PKEY_ItemType\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: (FMTID_ShellDetails) 28636AA6-953D-11D2-B5D6-00C04FD918D0, 11\r
-// \r
-// This is the canonical type of the item and is intended to be programmatically\r
-// parsed.\r
-// \r
-// If there is no canonical type, the value is VT_EMPTY.\r
-// \r
-// If the item is a file (ie, System.FileName is not VT_EMPTY), the value is the same as\r
-// System.FileExtension.\r
-// \r
-// Use System.ItemTypeText when you want to display the type to end users in a view. (If\r
-// the item is a file, passing the System.ItemType value to PSFormatForDisplay will\r
-// result in the same value as System.ItemTypeText.)\r
-// \r
-// Example values:\r
-// \r
-// If the path is... The property value is...\r
-// ----------------- ------------------------\r
-// "c:\foo\bar\hello.txt" ".txt"\r
-// "\\server\share\mydir\goodnews.doc" ".doc"\r
-// "\\server\share\folder" "Directory"\r
-// "c:\foo\MyFolder" "Directory"\r
-// [desktop] "Folder"\r
-// "/Mailbox Account/Inbox/'Re: Hello!'" "MAPI/IPM.Message"\r
-DEFINE_PROPERTYKEY(PKEY_ItemType, 0x28636AA6, 0x953D, 0x11D2, 0xB5, 0xD6, 0x00, 0xC0, 0x4F, 0xD9, 0x18, 0xD0, 11);\r
-\r
-// Name: System.ItemTypeText -- PKEY_ItemTypeText\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: (FMTID_Storage) B725F130-47EF-101A-A5F1-02608C9EEBAC, 4 (PID_STG_STORAGETYPE)\r
-// \r
-// This is the user friendly type name of the item. This is not intended to be\r
-// programmatically parsed.\r
-// \r
-// If System.ItemType is VT_EMPTY, the value of this property is also VT_EMPTY.\r
-// \r
-// If the item is a file, the value of this property is the same as if you passed the \r
-// file's System.ItemType value to PSFormatForDisplay.\r
-// \r
-// This property should not be confused with System.Kind, where System.Kind is a high-level\r
-// user friendly kind name. For example, for a document, System.Kind = "Document" and \r
-// System.Item.Type = ".doc" and System.Item.TypeText = "Microsoft Word Document"\r
-// \r
-// Example values:\r
-// \r
-// If the path is... The property value is...\r
-// ----------------- ------------------------\r
-// "c:\foo\bar\hello.txt" "Text File"\r
-// "\\server\share\mydir\goodnews.doc" "Microsoft Word Document"\r
-// "\\server\share\folder" "File Folder"\r
-// "c:\foo\MyFolder" "File Folder"\r
-// "/Mailbox Account/Inbox/'Re: Hello!'" "Outlook E-Mail Message"\r
-DEFINE_PROPERTYKEY(PKEY_ItemTypeText, 0xB725F130, 0x47EF, 0x101A, 0xA5, 0xF1, 0x02, 0x60, 0x8C, 0x9E, 0xEB, 0xAC, 4);\r
-\r
-// Name: System.ItemUrl -- PKEY_ItemUrl\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: (FMTID_Query) 49691C90-7E17-101A-A91C-08002B2ECDA9, 9 (PROPID_QUERY_VIRTUALPATH)\r
-// \r
-// This always represents a well formed URL that points to the item. \r
-// \r
-// To reference shell namespace items using shell APIs, use System.ParsingPath.\r
-// \r
-// Example values:\r
-// \r
-// Files: "file:///c:/foo/bar/hello.txt"\r
-// "csc://{GUID}/..."\r
-// Messages: "mapi://..."\r
-DEFINE_PROPERTYKEY(PKEY_ItemUrl, 0x49691C90, 0x7E17, 0x101A, 0xA9, 0x1C, 0x08, 0x00, 0x2B, 0x2E, 0xCD, 0xA9, 9);\r
-\r
-// Name: System.Keywords -- PKEY_Keywords\r
-// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) Legacy code may treat this as VT_LPSTR.\r
-// FormatID: (FMTID_SummaryInformation) F29F85E0-4FF9-1068-AB91-08002B27B3D9, 5 (PIDSI_KEYWORDS)\r
-//\r
-// The keywords for the item. Also referred to as tags.\r
-DEFINE_PROPERTYKEY(PKEY_Keywords, 0xF29F85E0, 0x4FF9, 0x1068, 0xAB, 0x91, 0x08, 0x00, 0x2B, 0x27, 0xB3, 0xD9, 5);\r
-\r
-// Name: System.Kind -- PKEY_Kind\r
-// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR)\r
-// FormatID: 1E3EE840-BC2B-476C-8237-2ACD1A839B22, 3\r
-// \r
-// System.Kind is used to map extensions to various .Search folders.\r
-// Extensions are mapped to Kinds at HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Explorer\KindMap\r
-// The list of kinds is not extensible.\r
-DEFINE_PROPERTYKEY(PKEY_Kind, 0x1E3EE840, 0xBC2B, 0x476C, 0x82, 0x37, 0x2A, 0xCD, 0x1A, 0x83, 0x9B, 0x22, 3);\r
-\r
-// Possible discrete values for PKEY_Kind are:\r
-#define KIND_CALENDAR L"calendar"\r
-#define KIND_COMMUNICATION L"communication"\r
-#define KIND_CONTACT L"contact"\r
-#define KIND_DOCUMENT L"document"\r
-#define KIND_EMAIL L"email"\r
-#define KIND_FEED L"feed"\r
-#define KIND_FOLDER L"folder"\r
-#define KIND_GAME L"game"\r
-#define KIND_INSTANTMESSAGE L"instantmessage"\r
-#define KIND_JOURNAL L"journal"\r
-#define KIND_LINK L"link"\r
-#define KIND_MOVIE L"movie"\r
-#define KIND_MUSIC L"music"\r
-#define KIND_NOTE L"note"\r
-#define KIND_PICTURE L"picture"\r
-#define KIND_PROGRAM L"program"\r
-#define KIND_RECORDEDTV L"recordedtv"\r
-#define KIND_SEARCHFOLDER L"searchfolder"\r
-#define KIND_TASK L"task"\r
-#define KIND_VIDEO L"video"\r
-#define KIND_WEBHISTORY L"webhistory"\r
-\r
-// Name: System.KindText -- PKEY_KindText\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: F04BEF95-C585-4197-A2B7-DF46FDC9EE6D, 100\r
-// \r
-// This is the user-friendly form of System.Kind. Not intended to be parsed \r
-// programmatically.\r
-DEFINE_PROPERTYKEY(PKEY_KindText, 0xF04BEF95, 0xC585, 0x4197, 0xA2, 0xB7, 0xDF, 0x46, 0xFD, 0xC9, 0xEE, 0x6D, 100);\r
-\r
-// Name: System.Language -- PKEY_Language\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: (FMTID_DocumentSummaryInformation) D5CDD502-2E9C-101B-9397-08002B2CF9AE, 28\r
-//\r
-// \r
-DEFINE_PROPERTYKEY(PKEY_Language, 0xD5CDD502, 0x2E9C, 0x101B, 0x93, 0x97, 0x08, 0x00, 0x2B, 0x2C, 0xF9, 0xAE, 28);\r
-\r
-// Name: System.MileageInformation -- PKEY_MileageInformation\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: FDF84370-031A-4ADD-9E91-0D775F1C6605, 100\r
-DEFINE_PROPERTYKEY(PKEY_MileageInformation, 0xFDF84370, 0x031A, 0x4ADD, 0x9E, 0x91, 0x0D, 0x77, 0x5F, 0x1C, 0x66, 0x05, 100);\r
-\r
-// Name: System.MIMEType -- PKEY_MIMEType\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 0B63E350-9CCC-11D0-BCDB-00805FCCCE04, 5\r
-//\r
-// The MIME type. Eg, for EML files: 'message/rfc822'.\r
-DEFINE_PROPERTYKEY(PKEY_MIMEType, 0x0B63E350, 0x9CCC, 0x11D0, 0xBC, 0xDB, 0x00, 0x80, 0x5F, 0xCC, 0xCE, 0x04, 5);\r
-\r
-// Name: System.Null -- PKEY_Null\r
-// Type: Null -- VT_NULL\r
-// FormatID: 00000000-0000-0000-0000-000000000000, 0\r
-DEFINE_PROPERTYKEY(PKEY_Null, 0x00000000, 0x0000, 0x0000, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0);\r
-\r
-// Name: System.OfflineAvailability -- PKEY_OfflineAvailability\r
-// Type: UInt32 -- VT_UI4\r
-// FormatID: A94688B6-7D9F-4570-A648-E3DFC0AB2B3F, 100\r
-DEFINE_PROPERTYKEY(PKEY_OfflineAvailability, 0xA94688B6, 0x7D9F, 0x4570, 0xA6, 0x48, 0xE3, 0xDF, 0xC0, 0xAB, 0x2B, 0x3F, 100);\r
-\r
-// Possible discrete values for PKEY_OfflineAvailability are:\r
-#define OFFLINEAVAILABILITY_NOT_AVAILABLE 0ul\r
-#define OFFLINEAVAILABILITY_AVAILABLE 1ul\r
-#define OFFLINEAVAILABILITY_ALWAYS_AVAILABLE 2ul\r
-\r
-// Name: System.OfflineStatus -- PKEY_OfflineStatus\r
-// Type: UInt32 -- VT_UI4\r
-// FormatID: 6D24888F-4718-4BDA-AFED-EA0FB4386CD8, 100\r
-DEFINE_PROPERTYKEY(PKEY_OfflineStatus, 0x6D24888F, 0x4718, 0x4BDA, 0xAF, 0xED, 0xEA, 0x0F, 0xB4, 0x38, 0x6C, 0xD8, 100);\r
-\r
-// Possible discrete values for PKEY_OfflineStatus are:\r
-#define OFFLINESTATUS_ONLINE 0ul\r
-#define OFFLINESTATUS_OFFLINE 1ul\r
-#define OFFLINESTATUS_OFFLINE_FORCED 2ul\r
-#define OFFLINESTATUS_OFFLINE_SLOW 3ul\r
-#define OFFLINESTATUS_OFFLINE_ERROR 4ul\r
-#define OFFLINESTATUS_OFFLINE_ITEM_VERSION_CONFLICT 5ul\r
-#define OFFLINESTATUS_OFFLINE_SUSPENDED 6ul\r
-\r
-// Name: System.OriginalFileName -- PKEY_OriginalFileName\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: (PSFMTID_VERSION) 0CEF7D53-FA64-11D1-A203-0000F81FEDEE, 6\r
-// \r
-// \r
-DEFINE_PROPERTYKEY(PKEY_OriginalFileName, 0x0CEF7D53, 0xFA64, 0x11D1, 0xA2, 0x03, 0x00, 0x00, 0xF8, 0x1F, 0xED, 0xEE, 6);\r
-\r
-// Name: System.ParentalRating -- PKEY_ParentalRating\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 21 (PIDMSI_PARENTAL_RATING)\r
-//\r
-// \r
-DEFINE_PROPERTYKEY(PKEY_ParentalRating, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 21);\r
-\r
-// Name: System.ParentalRatingReason -- PKEY_ParentalRatingReason\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 10984E0A-F9F2-4321-B7EF-BAF195AF4319, 100\r
-DEFINE_PROPERTYKEY(PKEY_ParentalRatingReason, 0x10984E0A, 0xF9F2, 0x4321, 0xB7, 0xEF, 0xBA, 0xF1, 0x95, 0xAF, 0x43, 0x19, 100);\r
-\r
-// Name: System.ParentalRatingsOrganization -- PKEY_ParentalRatingsOrganization\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: A7FE0840-1344-46F0-8D37-52ED712A4BF9, 100\r
-DEFINE_PROPERTYKEY(PKEY_ParentalRatingsOrganization, 0xA7FE0840, 0x1344, 0x46F0, 0x8D, 0x37, 0x52, 0xED, 0x71, 0x2A, 0x4B, 0xF9, 100);\r
-\r
-// Name: System.ParsingBindContext -- PKEY_ParsingBindContext\r
-// Type: Any -- VT_NULL Legacy code may treat this as VT_UNKNOWN.\r
-// FormatID: DFB9A04D-362F-4CA3-B30B-0254B17B5B84, 100\r
-// \r
-// used to get the IBindCtx for an item for parsing\r
-DEFINE_PROPERTYKEY(PKEY_ParsingBindContext, 0xDFB9A04D, 0x362F, 0x4CA3, 0xB3, 0x0B, 0x02, 0x54, 0xB1, 0x7B, 0x5B, 0x84, 100);\r
-\r
-// Name: System.ParsingName -- PKEY_ParsingName\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: (FMTID_ShellDetails) 28636AA6-953D-11D2-B5D6-00C04FD918D0, 24\r
-// \r
-// The shell namespace name of an item relative to a parent folder. This name may be passed to \r
-// IShellFolder::ParseDisplayName() of the parent shell folder.\r
-DEFINE_PROPERTYKEY(PKEY_ParsingName, 0x28636AA6, 0x953D, 0x11D2, 0xB5, 0xD6, 0x00, 0xC0, 0x4F, 0xD9, 0x18, 0xD0, 24);\r
-\r
-// Name: System.ParsingPath -- PKEY_ParsingPath\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: (FMTID_ShellDetails) 28636AA6-953D-11D2-B5D6-00C04FD918D0, 30\r
-// \r
-// This is the shell namespace path to the item. This path may be passed to \r
-// SHParseDisplayName to parse the path to the correct shell folder.\r
-// \r
-// If the item is a file, the value is identical to System.ItemPathDisplay.\r
-// \r
-// If the item cannot be accessed through the shell namespace, this value is VT_EMPTY.\r
-DEFINE_PROPERTYKEY(PKEY_ParsingPath, 0x28636AA6, 0x953D, 0x11D2, 0xB5, 0xD6, 0x00, 0xC0, 0x4F, 0xD9, 0x18, 0xD0, 30);\r
-\r
-// Name: System.PerceivedType -- PKEY_PerceivedType\r
-// Type: Int32 -- VT_I4\r
-// FormatID: (FMTID_ShellDetails) 28636AA6-953D-11D2-B5D6-00C04FD918D0, 9\r
-//\r
-// The perceived type of a shell item, based upon its canonical type.\r
-DEFINE_PROPERTYKEY(PKEY_PerceivedType, 0x28636AA6, 0x953D, 0x11D2, 0xB5, 0xD6, 0x00, 0xC0, 0x4F, 0xD9, 0x18, 0xD0, 9);\r
-\r
-// For the enumerated values of PKEY_PerceivedType, see the PERCEIVED_TYPE_* values in shtypes.idl.\r
-\r
-// Name: System.PercentFull -- PKEY_PercentFull\r
-// Type: UInt32 -- VT_UI4\r
-// FormatID: (FMTID_Volume) 9B174B35-40FF-11D2-A27E-00C04FC30871, 5 (Filesystem Volume Properties)\r
-//\r
-// The amount filled as a percentage, multiplied by 100 (ie, the valid range is 0 through 100).\r
-DEFINE_PROPERTYKEY(PKEY_PercentFull, 0x9B174B35, 0x40FF, 0x11D2, 0xA2, 0x7E, 0x00, 0xC0, 0x4F, 0xC3, 0x08, 0x71, 5);\r
-\r
-// Name: System.Priority -- PKEY_Priority\r
-// Type: UInt16 -- VT_UI2\r
-// FormatID: 9C1FCF74-2D97-41BA-B4AE-CB2E3661A6E4, 5\r
-//\r
-// \r
-DEFINE_PROPERTYKEY(PKEY_Priority, 0x9C1FCF74, 0x2D97, 0x41BA, 0xB4, 0xAE, 0xCB, 0x2E, 0x36, 0x61, 0xA6, 0xE4, 5);\r
-\r
-// Possible discrete values for PKEY_Priority are:\r
-#define PRIORITY_PROP_LOW 0u\r
-#define PRIORITY_PROP_NORMAL 1u\r
-#define PRIORITY_PROP_HIGH 2u\r
-\r
-// Name: System.PriorityText -- PKEY_PriorityText\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: D98BE98B-B86B-4095-BF52-9D23B2E0A752, 100\r
-// \r
-// This is the user-friendly form of System.Priority. Not intended to be parsed \r
-// programmatically.\r
-DEFINE_PROPERTYKEY(PKEY_PriorityText, 0xD98BE98B, 0xB86B, 0x4095, 0xBF, 0x52, 0x9D, 0x23, 0xB2, 0xE0, 0xA7, 0x52, 100);\r
-\r
-// Name: System.Project -- PKEY_Project\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 39A7F922-477C-48DE-8BC8-B28441E342E3, 100\r
-DEFINE_PROPERTYKEY(PKEY_Project, 0x39A7F922, 0x477C, 0x48DE, 0x8B, 0xC8, 0xB2, 0x84, 0x41, 0xE3, 0x42, 0xE3, 100);\r
-\r
-// Name: System.ProviderItemID -- PKEY_ProviderItemID\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: F21D9941-81F0-471A-ADEE-4E74B49217ED, 100\r
-// \r
-// \r
-DEFINE_PROPERTYKEY(PKEY_ProviderItemID, 0xF21D9941, 0x81F0, 0x471A, 0xAD, 0xEE, 0x4E, 0x74, 0xB4, 0x92, 0x17, 0xED, 100);\r
-\r
-// Name: System.Rating -- PKEY_Rating\r
-// Type: UInt32 -- VT_UI4\r
-// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 9 (PIDMSI_RATING)\r
-// \r
-// Indicates the users preference rating of an item on a scale of 0-99 (0 = unrated, 1-12 = One Star, \r
-// 13-37 = Two Stars, 38-62 = Three Stars, 63-87 = Four Stars, 88-99 = Five Stars).\r
-DEFINE_PROPERTYKEY(PKEY_Rating, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 9);\r
-\r
-// Use the following constants to convert between visual stars and the ratings value:\r
-#define RATING_UNRATED_MIN 0ul\r
-#define RATING_UNRATED_SET 0ul\r
-#define RATING_UNRATED_MAX 0ul\r
-\r
-#define RATING_ONE_STAR_MIN 1ul\r
-#define RATING_ONE_STAR_SET 1ul\r
-#define RATING_ONE_STAR_MAX 12ul\r
-\r
-#define RATING_TWO_STARS_MIN 13ul\r
-#define RATING_TWO_STARS_SET 25ul\r
-#define RATING_TWO_STARS_MAX 37ul\r
-\r
-#define RATING_THREE_STARS_MIN 38ul\r
-#define RATING_THREE_STARS_SET 50ul\r
-#define RATING_THREE_STARS_MAX 62ul\r
-\r
-#define RATING_FOUR_STARS_MIN 63ul\r
-#define RATING_FOUR_STARS_SET 75ul\r
-#define RATING_FOUR_STARS_MAX 87ul\r
-\r
-#define RATING_FIVE_STARS_MIN 88ul\r
-#define RATING_FIVE_STARS_SET 99ul\r
-#define RATING_FIVE_STARS_MAX 99ul\r
-\r
-\r
-// Name: System.RatingText -- PKEY_RatingText\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 90197CA7-FD8F-4E8C-9DA3-B57E1E609295, 100\r
-// \r
-// This is the user-friendly form of System.Rating. Not intended to be parsed \r
-// programmatically.\r
-DEFINE_PROPERTYKEY(PKEY_RatingText, 0x90197CA7, 0xFD8F, 0x4E8C, 0x9D, 0xA3, 0xB5, 0x7E, 0x1E, 0x60, 0x92, 0x95, 100);\r
-\r
-// Name: System.Sensitivity -- PKEY_Sensitivity\r
-// Type: UInt16 -- VT_UI2\r
-// FormatID: F8D3F6AC-4874-42CB-BE59-AB454B30716A, 100\r
-//\r
-// \r
-DEFINE_PROPERTYKEY(PKEY_Sensitivity, 0xF8D3F6AC, 0x4874, 0x42CB, 0xBE, 0x59, 0xAB, 0x45, 0x4B, 0x30, 0x71, 0x6A, 100);\r
-\r
-// Possible discrete values for PKEY_Sensitivity are:\r
-#define SENSITIVITY_PROP_NORMAL 0u\r
-#define SENSITIVITY_PROP_PERSONAL 1u\r
-#define SENSITIVITY_PROP_PRIVATE 2u\r
-#define SENSITIVITY_PROP_CONFIDENTIAL 3u\r
-\r
-// Name: System.SensitivityText -- PKEY_SensitivityText\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: D0C7F054-3F72-4725-8527-129A577CB269, 100\r
-// \r
-// This is the user-friendly form of System.Sensitivity. Not intended to be parsed \r
-// programmatically.\r
-DEFINE_PROPERTYKEY(PKEY_SensitivityText, 0xD0C7F054, 0x3F72, 0x4725, 0x85, 0x27, 0x12, 0x9A, 0x57, 0x7C, 0xB2, 0x69, 100);\r
-\r
-// Name: System.SFGAOFlags -- PKEY_SFGAOFlags\r
-// Type: UInt32 -- VT_UI4\r
-// FormatID: (FMTID_ShellDetails) 28636AA6-953D-11D2-B5D6-00C04FD918D0, 25\r
-//\r
-// IShellFolder::GetAttributesOf flags, with SFGAO_PKEYSFGAOMASK attributes masked out.\r
-DEFINE_PROPERTYKEY(PKEY_SFGAOFlags, 0x28636AA6, 0x953D, 0x11D2, 0xB5, 0xD6, 0x00, 0xC0, 0x4F, 0xD9, 0x18, 0xD0, 25);\r
-\r
-// Name: System.SharedWith -- PKEY_SharedWith\r
-// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR)\r
-// FormatID: EF884C5B-2BFE-41BB-AAE5-76EEDF4F9902, 200\r
-//\r
-// Who is the item shared with?\r
-DEFINE_PROPERTYKEY(PKEY_SharedWith, 0xEF884C5B, 0x2BFE, 0x41BB, 0xAA, 0xE5, 0x76, 0xEE, 0xDF, 0x4F, 0x99, 0x02, 200);\r
-\r
-// Name: System.ShareUserRating -- PKEY_ShareUserRating\r
-// Type: UInt32 -- VT_UI4\r
-// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 12 (PIDMSI_SHARE_USER_RATING)\r
-//\r
-// \r
-DEFINE_PROPERTYKEY(PKEY_ShareUserRating, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 12);\r
-\r
-// Name: System.Shell.OmitFromView -- PKEY_Shell_OmitFromView\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: DE35258C-C695-4CBC-B982-38B0AD24CED0, 2\r
-// \r
-// Set this to a string value of 'True' to omit this item from shell views\r
-DEFINE_PROPERTYKEY(PKEY_Shell_OmitFromView, 0xDE35258C, 0xC695, 0x4CBC, 0xB9, 0x82, 0x38, 0xB0, 0xAD, 0x24, 0xCE, 0xD0, 2);\r
-\r
-// Name: System.SimpleRating -- PKEY_SimpleRating\r
-// Type: UInt32 -- VT_UI4\r
-// FormatID: A09F084E-AD41-489F-8076-AA5BE3082BCA, 100\r
-// \r
-// Indicates the users preference rating of an item on a scale of 0-5 (0=unrated, 1=One Star, 2=Two Stars, 3=Three Stars,\r
-// 4=Four Stars, 5=Five Stars)\r
-DEFINE_PROPERTYKEY(PKEY_SimpleRating, 0xA09F084E, 0xAD41, 0x489F, 0x80, 0x76, 0xAA, 0x5B, 0xE3, 0x08, 0x2B, 0xCA, 100);\r
-\r
-// Name: System.Size -- PKEY_Size\r
-// Type: UInt64 -- VT_UI8\r
-// FormatID: (FMTID_Storage) B725F130-47EF-101A-A5F1-02608C9EEBAC, 12 (PID_STG_SIZE)\r
-//\r
-// \r
-DEFINE_PROPERTYKEY(PKEY_Size, 0xB725F130, 0x47EF, 0x101A, 0xA5, 0xF1, 0x02, 0x60, 0x8C, 0x9E, 0xEB, 0xAC, 12);\r
-\r
-// Name: System.SoftwareUsed -- PKEY_SoftwareUsed\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 305\r
-//\r
-// PropertyTagSoftwareUsed\r
-DEFINE_PROPERTYKEY(PKEY_SoftwareUsed, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 305);\r
-\r
-// Name: System.SourceItem -- PKEY_SourceItem\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 668CDFA5-7A1B-4323-AE4B-E527393A1D81, 100\r
-DEFINE_PROPERTYKEY(PKEY_SourceItem, 0x668CDFA5, 0x7A1B, 0x4323, 0xAE, 0x4B, 0xE5, 0x27, 0x39, 0x3A, 0x1D, 0x81, 100);\r
-\r
-// Name: System.StartDate -- PKEY_StartDate\r
-// Type: DateTime -- VT_FILETIME (For variants: VT_DATE)\r
-// FormatID: 48FD6EC8-8A12-4CDF-A03E-4EC5A511EDDE, 100\r
-DEFINE_PROPERTYKEY(PKEY_StartDate, 0x48FD6EC8, 0x8A12, 0x4CDF, 0xA0, 0x3E, 0x4E, 0xC5, 0xA5, 0x11, 0xED, 0xDE, 100);\r
-\r
-// Name: System.Status -- PKEY_Status\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: (FMTID_IntSite) 000214A1-0000-0000-C000-000000000046, 9\r
-DEFINE_PROPERTYKEY(PKEY_Status, 0x000214A1, 0x0000, 0x0000, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 9);\r
-\r
-// Name: System.Subject -- PKEY_Subject\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: (FMTID_SummaryInformation) F29F85E0-4FF9-1068-AB91-08002B27B3D9, 3 (PIDSI_SUBJECT)\r
-//\r
-// \r
-DEFINE_PROPERTYKEY(PKEY_Subject, 0xF29F85E0, 0x4FF9, 0x1068, 0xAB, 0x91, 0x08, 0x00, 0x2B, 0x27, 0xB3, 0xD9, 3);\r
-\r
-// Name: System.Thumbnail -- PKEY_Thumbnail\r
-// Type: Clipboard -- VT_CF\r
-// FormatID: (FMTID_SummaryInformation) F29F85E0-4FF9-1068-AB91-08002B27B3D9, 17 (PIDSI_THUMBNAIL)\r
-//\r
-// A data that represents the thumbnail in VT_CF format.\r
-DEFINE_PROPERTYKEY(PKEY_Thumbnail, 0xF29F85E0, 0x4FF9, 0x1068, 0xAB, 0x91, 0x08, 0x00, 0x2B, 0x27, 0xB3, 0xD9, 17);\r
-\r
-// Name: System.ThumbnailCacheId -- PKEY_ThumbnailCacheId\r
-// Type: UInt64 -- VT_UI8\r
-// FormatID: 446D16B1-8DAD-4870-A748-402EA43D788C, 100\r
-// \r
-// Unique value that can be used as a key to cache thumbnails. The value changes when the name, volume, or data modified \r
-// of an item changes.\r
-DEFINE_PROPERTYKEY(PKEY_ThumbnailCacheId, 0x446D16B1, 0x8DAD, 0x4870, 0xA7, 0x48, 0x40, 0x2E, 0xA4, 0x3D, 0x78, 0x8C, 100);\r
-\r
-// Name: System.ThumbnailStream -- PKEY_ThumbnailStream\r
-// Type: Stream -- VT_STREAM\r
-// FormatID: (FMTID_SummaryInformation) F29F85E0-4FF9-1068-AB91-08002B27B3D9, 27\r
-//\r
-// Data that represents the thumbnail in VT_STREAM format that GDI+/WindowsCodecs supports (jpg, png, etc).\r
-DEFINE_PROPERTYKEY(PKEY_ThumbnailStream, 0xF29F85E0, 0x4FF9, 0x1068, 0xAB, 0x91, 0x08, 0x00, 0x2B, 0x27, 0xB3, 0xD9, 27);\r
-\r
-// Name: System.Title -- PKEY_Title\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR) Legacy code may treat this as VT_LPSTR.\r
-// FormatID: (FMTID_SummaryInformation) F29F85E0-4FF9-1068-AB91-08002B27B3D9, 2 (PIDSI_TITLE)\r
-//\r
-// Title of item.\r
-DEFINE_PROPERTYKEY(PKEY_Title, 0xF29F85E0, 0x4FF9, 0x1068, 0xAB, 0x91, 0x08, 0x00, 0x2B, 0x27, 0xB3, 0xD9, 2);\r
-\r
-// Name: System.TotalFileSize -- PKEY_TotalFileSize\r
-// Type: UInt64 -- VT_UI8\r
-// FormatID: (FMTID_ShellDetails) 28636AA6-953D-11D2-B5D6-00C04FD918D0, 14\r
-//\r
-// \r
-DEFINE_PROPERTYKEY(PKEY_TotalFileSize, 0x28636AA6, 0x953D, 0x11D2, 0xB5, 0xD6, 0x00, 0xC0, 0x4F, 0xD9, 0x18, 0xD0, 14);\r
-\r
-// Name: System.Trademarks -- PKEY_Trademarks\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: (PSFMTID_VERSION) 0CEF7D53-FA64-11D1-A203-0000F81FEDEE, 9 (PIDVSI_Trademarks)\r
-//\r
-// \r
-DEFINE_PROPERTYKEY(PKEY_Trademarks, 0x0CEF7D53, 0xFA64, 0x11D1, 0xA2, 0x03, 0x00, 0x00, 0xF8, 0x1F, 0xED, 0xEE, 9);\r
- \r
-//-----------------------------------------------------------------------------\r
-// Document properties\r
-\r
-\r
-\r
-// Name: System.Document.ByteCount -- PKEY_Document_ByteCount\r
-// Type: Int32 -- VT_I4\r
-// FormatID: (FMTID_DocumentSummaryInformation) D5CDD502-2E9C-101B-9397-08002B2CF9AE, 4 (PIDDSI_BYTECOUNT)\r
-//\r
-// \r
-DEFINE_PROPERTYKEY(PKEY_Document_ByteCount, 0xD5CDD502, 0x2E9C, 0x101B, 0x93, 0x97, 0x08, 0x00, 0x2B, 0x2C, 0xF9, 0xAE, 4);\r
-\r
-// Name: System.Document.CharacterCount -- PKEY_Document_CharacterCount\r
-// Type: Int32 -- VT_I4\r
-// FormatID: (FMTID_SummaryInformation) F29F85E0-4FF9-1068-AB91-08002B27B3D9, 16 (PIDSI_CHARCOUNT)\r
-//\r
-// \r
-DEFINE_PROPERTYKEY(PKEY_Document_CharacterCount, 0xF29F85E0, 0x4FF9, 0x1068, 0xAB, 0x91, 0x08, 0x00, 0x2B, 0x27, 0xB3, 0xD9, 16);\r
-\r
-// Name: System.Document.ClientID -- PKEY_Document_ClientID\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 276D7BB0-5B34-4FB0-AA4B-158ED12A1809, 100\r
-DEFINE_PROPERTYKEY(PKEY_Document_ClientID, 0x276D7BB0, 0x5B34, 0x4FB0, 0xAA, 0x4B, 0x15, 0x8E, 0xD1, 0x2A, 0x18, 0x09, 100);\r
-\r
-// Name: System.Document.Contributor -- PKEY_Document_Contributor\r
-// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR)\r
-// FormatID: F334115E-DA1B-4509-9B3D-119504DC7ABB, 100\r
-DEFINE_PROPERTYKEY(PKEY_Document_Contributor, 0xF334115E, 0xDA1B, 0x4509, 0x9B, 0x3D, 0x11, 0x95, 0x04, 0xDC, 0x7A, 0xBB, 100);\r
-\r
-// Name: System.Document.DateCreated -- PKEY_Document_DateCreated\r
-// Type: DateTime -- VT_FILETIME (For variants: VT_DATE)\r
-// FormatID: (FMTID_SummaryInformation) F29F85E0-4FF9-1068-AB91-08002B27B3D9, 12 (PIDSI_CREATE_DTM)\r
-// \r
-// This property is stored in the document, not obtained from the file system.\r
-DEFINE_PROPERTYKEY(PKEY_Document_DateCreated, 0xF29F85E0, 0x4FF9, 0x1068, 0xAB, 0x91, 0x08, 0x00, 0x2B, 0x27, 0xB3, 0xD9, 12);\r
-\r
-// Name: System.Document.DatePrinted -- PKEY_Document_DatePrinted\r
-// Type: DateTime -- VT_FILETIME (For variants: VT_DATE)\r
-// FormatID: (FMTID_SummaryInformation) F29F85E0-4FF9-1068-AB91-08002B27B3D9, 11 (PIDSI_LASTPRINTED)\r
-//\r
-// Legacy name: "DocLastPrinted".\r
-DEFINE_PROPERTYKEY(PKEY_Document_DatePrinted, 0xF29F85E0, 0x4FF9, 0x1068, 0xAB, 0x91, 0x08, 0x00, 0x2B, 0x27, 0xB3, 0xD9, 11);\r
-\r
-// Name: System.Document.DateSaved -- PKEY_Document_DateSaved\r
-// Type: DateTime -- VT_FILETIME (For variants: VT_DATE)\r
-// FormatID: (FMTID_SummaryInformation) F29F85E0-4FF9-1068-AB91-08002B27B3D9, 13 (PIDSI_LASTSAVE_DTM)\r
-//\r
-// Legacy name: "DocLastSavedTm".\r
-DEFINE_PROPERTYKEY(PKEY_Document_DateSaved, 0xF29F85E0, 0x4FF9, 0x1068, 0xAB, 0x91, 0x08, 0x00, 0x2B, 0x27, 0xB3, 0xD9, 13);\r
-\r
-// Name: System.Document.Division -- PKEY_Document_Division\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 1E005EE6-BF27-428B-B01C-79676ACD2870, 100\r
-DEFINE_PROPERTYKEY(PKEY_Document_Division, 0x1E005EE6, 0xBF27, 0x428B, 0xB0, 0x1C, 0x79, 0x67, 0x6A, 0xCD, 0x28, 0x70, 100);\r
-\r
-// Name: System.Document.DocumentID -- PKEY_Document_DocumentID\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: E08805C8-E395-40DF-80D2-54F0D6C43154, 100\r
-DEFINE_PROPERTYKEY(PKEY_Document_DocumentID, 0xE08805C8, 0xE395, 0x40DF, 0x80, 0xD2, 0x54, 0xF0, 0xD6, 0xC4, 0x31, 0x54, 100);\r
-\r
-// Name: System.Document.HiddenSlideCount -- PKEY_Document_HiddenSlideCount\r
-// Type: Int32 -- VT_I4\r
-// FormatID: (FMTID_DocumentSummaryInformation) D5CDD502-2E9C-101B-9397-08002B2CF9AE, 9 (PIDDSI_HIDDENCOUNT)\r
-//\r
-// \r
-DEFINE_PROPERTYKEY(PKEY_Document_HiddenSlideCount, 0xD5CDD502, 0x2E9C, 0x101B, 0x93, 0x97, 0x08, 0x00, 0x2B, 0x2C, 0xF9, 0xAE, 9);\r
-\r
-// Name: System.Document.LastAuthor -- PKEY_Document_LastAuthor\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: (FMTID_SummaryInformation) F29F85E0-4FF9-1068-AB91-08002B27B3D9, 8 (PIDSI_LASTAUTHOR)\r
-//\r
-// \r
-DEFINE_PROPERTYKEY(PKEY_Document_LastAuthor, 0xF29F85E0, 0x4FF9, 0x1068, 0xAB, 0x91, 0x08, 0x00, 0x2B, 0x27, 0xB3, 0xD9, 8);\r
-\r
-// Name: System.Document.LineCount -- PKEY_Document_LineCount\r
-// Type: Int32 -- VT_I4\r
-// FormatID: (FMTID_DocumentSummaryInformation) D5CDD502-2E9C-101B-9397-08002B2CF9AE, 5 (PIDDSI_LINECOUNT)\r
-//\r
-// \r
-DEFINE_PROPERTYKEY(PKEY_Document_LineCount, 0xD5CDD502, 0x2E9C, 0x101B, 0x93, 0x97, 0x08, 0x00, 0x2B, 0x2C, 0xF9, 0xAE, 5);\r
-\r
-// Name: System.Document.Manager -- PKEY_Document_Manager\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: (FMTID_DocumentSummaryInformation) D5CDD502-2E9C-101B-9397-08002B2CF9AE, 14 (PIDDSI_MANAGER)\r
-//\r
-// \r
-DEFINE_PROPERTYKEY(PKEY_Document_Manager, 0xD5CDD502, 0x2E9C, 0x101B, 0x93, 0x97, 0x08, 0x00, 0x2B, 0x2C, 0xF9, 0xAE, 14);\r
-\r
-// Name: System.Document.MultimediaClipCount -- PKEY_Document_MultimediaClipCount\r
-// Type: Int32 -- VT_I4\r
-// FormatID: (FMTID_DocumentSummaryInformation) D5CDD502-2E9C-101B-9397-08002B2CF9AE, 10 (PIDDSI_MMCLIPCOUNT)\r
-//\r
-// \r
-DEFINE_PROPERTYKEY(PKEY_Document_MultimediaClipCount, 0xD5CDD502, 0x2E9C, 0x101B, 0x93, 0x97, 0x08, 0x00, 0x2B, 0x2C, 0xF9, 0xAE, 10);\r
-\r
-// Name: System.Document.NoteCount -- PKEY_Document_NoteCount\r
-// Type: Int32 -- VT_I4\r
-// FormatID: (FMTID_DocumentSummaryInformation) D5CDD502-2E9C-101B-9397-08002B2CF9AE, 8 (PIDDSI_NOTECOUNT)\r
-//\r
-// \r
-DEFINE_PROPERTYKEY(PKEY_Document_NoteCount, 0xD5CDD502, 0x2E9C, 0x101B, 0x93, 0x97, 0x08, 0x00, 0x2B, 0x2C, 0xF9, 0xAE, 8);\r
-\r
-// Name: System.Document.PageCount -- PKEY_Document_PageCount\r
-// Type: Int32 -- VT_I4\r
-// FormatID: (FMTID_SummaryInformation) F29F85E0-4FF9-1068-AB91-08002B27B3D9, 14 (PIDSI_PAGECOUNT)\r
-//\r
-// \r
-DEFINE_PROPERTYKEY(PKEY_Document_PageCount, 0xF29F85E0, 0x4FF9, 0x1068, 0xAB, 0x91, 0x08, 0x00, 0x2B, 0x27, 0xB3, 0xD9, 14);\r
-\r
-// Name: System.Document.ParagraphCount -- PKEY_Document_ParagraphCount\r
-// Type: Int32 -- VT_I4\r
-// FormatID: (FMTID_DocumentSummaryInformation) D5CDD502-2E9C-101B-9397-08002B2CF9AE, 6 (PIDDSI_PARCOUNT)\r
-//\r
-// \r
-DEFINE_PROPERTYKEY(PKEY_Document_ParagraphCount, 0xD5CDD502, 0x2E9C, 0x101B, 0x93, 0x97, 0x08, 0x00, 0x2B, 0x2C, 0xF9, 0xAE, 6);\r
-\r
-// Name: System.Document.PresentationFormat -- PKEY_Document_PresentationFormat\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: (FMTID_DocumentSummaryInformation) D5CDD502-2E9C-101B-9397-08002B2CF9AE, 3 (PIDDSI_PRESFORMAT)\r
-//\r
-// \r
-DEFINE_PROPERTYKEY(PKEY_Document_PresentationFormat, 0xD5CDD502, 0x2E9C, 0x101B, 0x93, 0x97, 0x08, 0x00, 0x2B, 0x2C, 0xF9, 0xAE, 3);\r
-\r
-// Name: System.Document.RevisionNumber -- PKEY_Document_RevisionNumber\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: (FMTID_SummaryInformation) F29F85E0-4FF9-1068-AB91-08002B27B3D9, 9 (PIDSI_REVNUMBER)\r
-//\r
-// \r
-DEFINE_PROPERTYKEY(PKEY_Document_RevisionNumber, 0xF29F85E0, 0x4FF9, 0x1068, 0xAB, 0x91, 0x08, 0x00, 0x2B, 0x27, 0xB3, 0xD9, 9);\r
-\r
-// Name: System.Document.Security -- PKEY_Document_Security\r
-// Type: Int32 -- VT_I4\r
-// FormatID: (FMTID_SummaryInformation) F29F85E0-4FF9-1068-AB91-08002B27B3D9, 19\r
-//\r
-// Access control information, from SummaryInfo propset\r
-DEFINE_PROPERTYKEY(PKEY_Document_Security, 0xF29F85E0, 0x4FF9, 0x1068, 0xAB, 0x91, 0x08, 0x00, 0x2B, 0x27, 0xB3, 0xD9, 19);\r
-\r
-// Name: System.Document.SlideCount -- PKEY_Document_SlideCount\r
-// Type: Int32 -- VT_I4\r
-// FormatID: (FMTID_DocumentSummaryInformation) D5CDD502-2E9C-101B-9397-08002B2CF9AE, 7 (PIDDSI_SLIDECOUNT)\r
-//\r
-// \r
-DEFINE_PROPERTYKEY(PKEY_Document_SlideCount, 0xD5CDD502, 0x2E9C, 0x101B, 0x93, 0x97, 0x08, 0x00, 0x2B, 0x2C, 0xF9, 0xAE, 7);\r
-\r
-// Name: System.Document.Template -- PKEY_Document_Template\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: (FMTID_SummaryInformation) F29F85E0-4FF9-1068-AB91-08002B27B3D9, 7 (PIDSI_TEMPLATE)\r
-//\r
-// \r
-DEFINE_PROPERTYKEY(PKEY_Document_Template, 0xF29F85E0, 0x4FF9, 0x1068, 0xAB, 0x91, 0x08, 0x00, 0x2B, 0x27, 0xB3, 0xD9, 7);\r
-\r
-// Name: System.Document.TotalEditingTime -- PKEY_Document_TotalEditingTime\r
-// Type: UInt64 -- VT_UI8\r
-// FormatID: (FMTID_SummaryInformation) F29F85E0-4FF9-1068-AB91-08002B27B3D9, 10 (PIDSI_EDITTIME)\r
-//\r
-// 100ns units, not milliseconds. VT_FILETIME for IPropertySetStorage handlers (legacy)\r
-DEFINE_PROPERTYKEY(PKEY_Document_TotalEditingTime, 0xF29F85E0, 0x4FF9, 0x1068, 0xAB, 0x91, 0x08, 0x00, 0x2B, 0x27, 0xB3, 0xD9, 10);\r
-\r
-// Name: System.Document.Version -- PKEY_Document_Version\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: (FMTID_DocumentSummaryInformation) D5CDD502-2E9C-101B-9397-08002B2CF9AE, 29\r
-DEFINE_PROPERTYKEY(PKEY_Document_Version, 0xD5CDD502, 0x2E9C, 0x101B, 0x93, 0x97, 0x08, 0x00, 0x2B, 0x2C, 0xF9, 0xAE, 29);\r
-\r
-// Name: System.Document.WordCount -- PKEY_Document_WordCount\r
-// Type: Int32 -- VT_I4\r
-// FormatID: (FMTID_SummaryInformation) F29F85E0-4FF9-1068-AB91-08002B27B3D9, 15 (PIDSI_WORDCOUNT)\r
-//\r
-// \r
-DEFINE_PROPERTYKEY(PKEY_Document_WordCount, 0xF29F85E0, 0x4FF9, 0x1068, 0xAB, 0x91, 0x08, 0x00, 0x2B, 0x27, 0xB3, 0xD9, 15);\r
-\r
- \r
- \r
-//-----------------------------------------------------------------------------\r
-// DRM properties\r
-\r
-// Name: System.DRM.DatePlayExpires -- PKEY_DRM_DatePlayExpires\r
-// Type: DateTime -- VT_FILETIME (For variants: VT_DATE)\r
-// FormatID: (FMTID_DRM) AEAC19E4-89AE-4508-B9B7-BB867ABEE2ED, 6 (PIDDRSI_PLAYEXPIRES)\r
-//\r
-// Indicates when play expires for digital rights management.\r
-DEFINE_PROPERTYKEY(PKEY_DRM_DatePlayExpires, 0xAEAC19E4, 0x89AE, 0x4508, 0xB9, 0xB7, 0xBB, 0x86, 0x7A, 0xBE, 0xE2, 0xED, 6);\r
-\r
-// Name: System.DRM.DatePlayStarts -- PKEY_DRM_DatePlayStarts\r
-// Type: DateTime -- VT_FILETIME (For variants: VT_DATE)\r
-// FormatID: (FMTID_DRM) AEAC19E4-89AE-4508-B9B7-BB867ABEE2ED, 5 (PIDDRSI_PLAYSTARTS)\r
-//\r
-// Indicates when play starts for digital rights management.\r
-DEFINE_PROPERTYKEY(PKEY_DRM_DatePlayStarts, 0xAEAC19E4, 0x89AE, 0x4508, 0xB9, 0xB7, 0xBB, 0x86, 0x7A, 0xBE, 0xE2, 0xED, 5);\r
-\r
-// Name: System.DRM.Description -- PKEY_DRM_Description\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: (FMTID_DRM) AEAC19E4-89AE-4508-B9B7-BB867ABEE2ED, 3 (PIDDRSI_DESCRIPTION)\r
-//\r
-// Displays the description for digital rights management.\r
-DEFINE_PROPERTYKEY(PKEY_DRM_Description, 0xAEAC19E4, 0x89AE, 0x4508, 0xB9, 0xB7, 0xBB, 0x86, 0x7A, 0xBE, 0xE2, 0xED, 3);\r
-\r
-// Name: System.DRM.IsProtected -- PKEY_DRM_IsProtected\r
-// Type: Boolean -- VT_BOOL\r
-// FormatID: (FMTID_DRM) AEAC19E4-89AE-4508-B9B7-BB867ABEE2ED, 2 (PIDDRSI_PROTECTED)\r
-//\r
-// \r
-DEFINE_PROPERTYKEY(PKEY_DRM_IsProtected, 0xAEAC19E4, 0x89AE, 0x4508, 0xB9, 0xB7, 0xBB, 0x86, 0x7A, 0xBE, 0xE2, 0xED, 2);\r
-\r
-// Name: System.DRM.PlayCount -- PKEY_DRM_PlayCount\r
-// Type: UInt32 -- VT_UI4\r
-// FormatID: (FMTID_DRM) AEAC19E4-89AE-4508-B9B7-BB867ABEE2ED, 4 (PIDDRSI_PLAYCOUNT)\r
-//\r
-// Indicates the play count for digital rights management.\r
-DEFINE_PROPERTYKEY(PKEY_DRM_PlayCount, 0xAEAC19E4, 0x89AE, 0x4508, 0xB9, 0xB7, 0xBB, 0x86, 0x7A, 0xBE, 0xE2, 0xED, 4);\r
- \r
-//-----------------------------------------------------------------------------\r
-// GPS properties\r
-\r
-// Name: System.GPS.Altitude -- PKEY_GPS_Altitude\r
-// Type: Double -- VT_R8\r
-// FormatID: 827EDB4F-5B73-44A7-891D-FDFFABEA35CA, 100\r
-// \r
-// Indicates the altitude based on the reference in PKEY_GPS_AltitudeRef. Calculated from PKEY_GPS_AltitudeNumerator and \r
-// PKEY_GPS_AltitudeDenominator\r
-DEFINE_PROPERTYKEY(PKEY_GPS_Altitude, 0x827EDB4F, 0x5B73, 0x44A7, 0x89, 0x1D, 0xFD, 0xFF, 0xAB, 0xEA, 0x35, 0xCA, 100);\r
-\r
-// Name: System.GPS.AltitudeDenominator -- PKEY_GPS_AltitudeDenominator\r
-// Type: UInt32 -- VT_UI4\r
-// FormatID: 78342DCB-E358-4145-AE9A-6BFE4E0F9F51, 100\r
-//\r
-// Denominator of PKEY_GPS_Altitude\r
-DEFINE_PROPERTYKEY(PKEY_GPS_AltitudeDenominator, 0x78342DCB, 0xE358, 0x4145, 0xAE, 0x9A, 0x6B, 0xFE, 0x4E, 0x0F, 0x9F, 0x51, 100);\r
-\r
-// Name: System.GPS.AltitudeNumerator -- PKEY_GPS_AltitudeNumerator\r
-// Type: UInt32 -- VT_UI4\r
-// FormatID: 2DAD1EB7-816D-40D3-9EC3-C9773BE2AADE, 100\r
-//\r
-// Numerator of PKEY_GPS_Altitude\r
-DEFINE_PROPERTYKEY(PKEY_GPS_AltitudeNumerator, 0x2DAD1EB7, 0x816D, 0x40D3, 0x9E, 0xC3, 0xC9, 0x77, 0x3B, 0xE2, 0xAA, 0xDE, 100);\r
-\r
-// Name: System.GPS.AltitudeRef -- PKEY_GPS_AltitudeRef\r
-// Type: Byte -- VT_UI1\r
-// FormatID: 46AC629D-75EA-4515-867F-6DC4321C5844, 100\r
-//\r
-// Indicates the reference for the altitude property. (eg: above sea level, below sea level, absolute value)\r
-DEFINE_PROPERTYKEY(PKEY_GPS_AltitudeRef, 0x46AC629D, 0x75EA, 0x4515, 0x86, 0x7F, 0x6D, 0xC4, 0x32, 0x1C, 0x58, 0x44, 100);\r
-\r
-// Name: System.GPS.AreaInformation -- PKEY_GPS_AreaInformation\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 972E333E-AC7E-49F1-8ADF-A70D07A9BCAB, 100\r
-//\r
-// Represents the name of the GPS area\r
-DEFINE_PROPERTYKEY(PKEY_GPS_AreaInformation, 0x972E333E, 0xAC7E, 0x49F1, 0x8A, 0xDF, 0xA7, 0x0D, 0x07, 0xA9, 0xBC, 0xAB, 100);\r
-\r
-// Name: System.GPS.Date -- PKEY_GPS_Date\r
-// Type: DateTime -- VT_FILETIME (For variants: VT_DATE)\r
-// FormatID: 3602C812-0F3B-45F0-85AD-603468D69423, 100\r
-//\r
-// Date and time of the GPS record\r
-DEFINE_PROPERTYKEY(PKEY_GPS_Date, 0x3602C812, 0x0F3B, 0x45F0, 0x85, 0xAD, 0x60, 0x34, 0x68, 0xD6, 0x94, 0x23, 100);\r
-\r
-// Name: System.GPS.DestBearing -- PKEY_GPS_DestBearing\r
-// Type: Double -- VT_R8\r
-// FormatID: C66D4B3C-E888-47CC-B99F-9DCA3EE34DEA, 100\r
-// \r
-// Indicates the bearing to the destination point. Calculated from PKEY_GPS_DestBearingNumerator and \r
-// PKEY_GPS_DestBearingDenominator.\r
-DEFINE_PROPERTYKEY(PKEY_GPS_DestBearing, 0xC66D4B3C, 0xE888, 0x47CC, 0xB9, 0x9F, 0x9D, 0xCA, 0x3E, 0xE3, 0x4D, 0xEA, 100);\r
-\r
-// Name: System.GPS.DestBearingDenominator -- PKEY_GPS_DestBearingDenominator\r
-// Type: UInt32 -- VT_UI4\r
-// FormatID: 7ABCF4F8-7C3F-4988-AC91-8D2C2E97ECA5, 100\r
-//\r
-// Denominator of PKEY_GPS_DestBearing\r
-DEFINE_PROPERTYKEY(PKEY_GPS_DestBearingDenominator, 0x7ABCF4F8, 0x7C3F, 0x4988, 0xAC, 0x91, 0x8D, 0x2C, 0x2E, 0x97, 0xEC, 0xA5, 100);\r
-\r
-// Name: System.GPS.DestBearingNumerator -- PKEY_GPS_DestBearingNumerator\r
-// Type: UInt32 -- VT_UI4\r
-// FormatID: BA3B1DA9-86EE-4B5D-A2A4-A271A429F0CF, 100\r
-//\r
-// Numerator of PKEY_GPS_DestBearing\r
-DEFINE_PROPERTYKEY(PKEY_GPS_DestBearingNumerator, 0xBA3B1DA9, 0x86EE, 0x4B5D, 0xA2, 0xA4, 0xA2, 0x71, 0xA4, 0x29, 0xF0, 0xCF, 100);\r
-\r
-// Name: System.GPS.DestBearingRef -- PKEY_GPS_DestBearingRef\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 9AB84393-2A0F-4B75-BB22-7279786977CB, 100\r
-//\r
-// Indicates the reference used for the giving the bearing to the destination point. (eg: true direction, magnetic direction)\r
-DEFINE_PROPERTYKEY(PKEY_GPS_DestBearingRef, 0x9AB84393, 0x2A0F, 0x4B75, 0xBB, 0x22, 0x72, 0x79, 0x78, 0x69, 0x77, 0xCB, 100);\r
-\r
-// Name: System.GPS.DestDistance -- PKEY_GPS_DestDistance\r
-// Type: Double -- VT_R8\r
-// FormatID: A93EAE04-6804-4F24-AC81-09B266452118, 100\r
-// \r
-// Indicates the distance to the destination point. Calculated from PKEY_GPS_DestDistanceNumerator and \r
-// PKEY_GPS_DestDistanceDenominator.\r
-DEFINE_PROPERTYKEY(PKEY_GPS_DestDistance, 0xA93EAE04, 0x6804, 0x4F24, 0xAC, 0x81, 0x09, 0xB2, 0x66, 0x45, 0x21, 0x18, 100);\r
-\r
-// Name: System.GPS.DestDistanceDenominator -- PKEY_GPS_DestDistanceDenominator\r
-// Type: UInt32 -- VT_UI4\r
-// FormatID: 9BC2C99B-AC71-4127-9D1C-2596D0D7DCB7, 100\r
-//\r
-// Denominator of PKEY_GPS_DestDistance\r
-DEFINE_PROPERTYKEY(PKEY_GPS_DestDistanceDenominator, 0x9BC2C99B, 0xAC71, 0x4127, 0x9D, 0x1C, 0x25, 0x96, 0xD0, 0xD7, 0xDC, 0xB7, 100);\r
-\r
-// Name: System.GPS.DestDistanceNumerator -- PKEY_GPS_DestDistanceNumerator\r
-// Type: UInt32 -- VT_UI4\r
-// FormatID: 2BDA47DA-08C6-4FE1-80BC-A72FC517C5D0, 100\r
-//\r
-// Numerator of PKEY_GPS_DestDistance\r
-DEFINE_PROPERTYKEY(PKEY_GPS_DestDistanceNumerator, 0x2BDA47DA, 0x08C6, 0x4FE1, 0x80, 0xBC, 0xA7, 0x2F, 0xC5, 0x17, 0xC5, 0xD0, 100);\r
-\r
-// Name: System.GPS.DestDistanceRef -- PKEY_GPS_DestDistanceRef\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: ED4DF2D3-8695-450B-856F-F5C1C53ACB66, 100\r
-//\r
-// Indicates the unit used to express the distance to the destination. (eg: kilometers, miles, knots)\r
-DEFINE_PROPERTYKEY(PKEY_GPS_DestDistanceRef, 0xED4DF2D3, 0x8695, 0x450B, 0x85, 0x6F, 0xF5, 0xC1, 0xC5, 0x3A, 0xCB, 0x66, 100);\r
-\r
-// Name: System.GPS.DestLatitude -- PKEY_GPS_DestLatitude\r
-// Type: Multivalue Double -- VT_VECTOR | VT_R8 (For variants: VT_ARRAY | VT_R8)\r
-// FormatID: 9D1D7CC5-5C39-451C-86B3-928E2D18CC47, 100\r
-// \r
-// Indicates the latitude of the destination point. This is an array of three values. Index 0 is the degrees, index 1 \r
-// is the minutes, index 2 is the seconds. Each is calculated from the values in PKEY_GPS_DestLatitudeNumerator and \r
-// PKEY_GPS_DestLatitudeDenominator.\r
-DEFINE_PROPERTYKEY(PKEY_GPS_DestLatitude, 0x9D1D7CC5, 0x5C39, 0x451C, 0x86, 0xB3, 0x92, 0x8E, 0x2D, 0x18, 0xCC, 0x47, 100);\r
-\r
-// Name: System.GPS.DestLatitudeDenominator -- PKEY_GPS_DestLatitudeDenominator\r
-// Type: Multivalue UInt32 -- VT_VECTOR | VT_UI4 (For variants: VT_ARRAY | VT_UI4)\r
-// FormatID: 3A372292-7FCA-49A7-99D5-E47BB2D4E7AB, 100\r
-//\r
-// Denominator of PKEY_GPS_DestLatitude\r
-DEFINE_PROPERTYKEY(PKEY_GPS_DestLatitudeDenominator, 0x3A372292, 0x7FCA, 0x49A7, 0x99, 0xD5, 0xE4, 0x7B, 0xB2, 0xD4, 0xE7, 0xAB, 100);\r
-\r
-// Name: System.GPS.DestLatitudeNumerator -- PKEY_GPS_DestLatitudeNumerator\r
-// Type: Multivalue UInt32 -- VT_VECTOR | VT_UI4 (For variants: VT_ARRAY | VT_UI4)\r
-// FormatID: ECF4B6F6-D5A6-433C-BB92-4076650FC890, 100\r
-//\r
-// Numerator of PKEY_GPS_DestLatitude\r
-DEFINE_PROPERTYKEY(PKEY_GPS_DestLatitudeNumerator, 0xECF4B6F6, 0xD5A6, 0x433C, 0xBB, 0x92, 0x40, 0x76, 0x65, 0x0F, 0xC8, 0x90, 100);\r
-\r
-// Name: System.GPS.DestLatitudeRef -- PKEY_GPS_DestLatitudeRef\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: CEA820B9-CE61-4885-A128-005D9087C192, 100\r
-//\r
-// Indicates whether the latitude destination point is north or south latitude\r
-DEFINE_PROPERTYKEY(PKEY_GPS_DestLatitudeRef, 0xCEA820B9, 0xCE61, 0x4885, 0xA1, 0x28, 0x00, 0x5D, 0x90, 0x87, 0xC1, 0x92, 100);\r
-\r
-// Name: System.GPS.DestLongitude -- PKEY_GPS_DestLongitude\r
-// Type: Multivalue Double -- VT_VECTOR | VT_R8 (For variants: VT_ARRAY | VT_R8)\r
-// FormatID: 47A96261-CB4C-4807-8AD3-40B9D9DBC6BC, 100\r
-// \r
-// Indicates the latitude of the destination point. This is an array of three values. Index 0 is the degrees, index 1 \r
-// is the minutes, index 2 is the seconds. Each is calculated from the values in PKEY_GPS_DestLongitudeNumerator and \r
-// PKEY_GPS_DestLongitudeDenominator.\r
-DEFINE_PROPERTYKEY(PKEY_GPS_DestLongitude, 0x47A96261, 0xCB4C, 0x4807, 0x8A, 0xD3, 0x40, 0xB9, 0xD9, 0xDB, 0xC6, 0xBC, 100);\r
-\r
-// Name: System.GPS.DestLongitudeDenominator -- PKEY_GPS_DestLongitudeDenominator\r
-// Type: Multivalue UInt32 -- VT_VECTOR | VT_UI4 (For variants: VT_ARRAY | VT_UI4)\r
-// FormatID: 425D69E5-48AD-4900-8D80-6EB6B8D0AC86, 100\r
-//\r
-// Denominator of PKEY_GPS_DestLongitude\r
-DEFINE_PROPERTYKEY(PKEY_GPS_DestLongitudeDenominator, 0x425D69E5, 0x48AD, 0x4900, 0x8D, 0x80, 0x6E, 0xB6, 0xB8, 0xD0, 0xAC, 0x86, 100);\r
-\r
-// Name: System.GPS.DestLongitudeNumerator -- PKEY_GPS_DestLongitudeNumerator\r
-// Type: Multivalue UInt32 -- VT_VECTOR | VT_UI4 (For variants: VT_ARRAY | VT_UI4)\r
-// FormatID: A3250282-FB6D-48D5-9A89-DBCACE75CCCF, 100\r
-//\r
-// Numerator of PKEY_GPS_DestLongitude\r
-DEFINE_PROPERTYKEY(PKEY_GPS_DestLongitudeNumerator, 0xA3250282, 0xFB6D, 0x48D5, 0x9A, 0x89, 0xDB, 0xCA, 0xCE, 0x75, 0xCC, 0xCF, 100);\r
-\r
-// Name: System.GPS.DestLongitudeRef -- PKEY_GPS_DestLongitudeRef\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 182C1EA6-7C1C-4083-AB4B-AC6C9F4ED128, 100\r
-//\r
-// Indicates whether the longitude destination point is east or west longitude\r
-DEFINE_PROPERTYKEY(PKEY_GPS_DestLongitudeRef, 0x182C1EA6, 0x7C1C, 0x4083, 0xAB, 0x4B, 0xAC, 0x6C, 0x9F, 0x4E, 0xD1, 0x28, 100);\r
-\r
-// Name: System.GPS.Differential -- PKEY_GPS_Differential\r
-// Type: UInt16 -- VT_UI2\r
-// FormatID: AAF4EE25-BD3B-4DD7-BFC4-47F77BB00F6D, 100\r
-//\r
-// Indicates whether differential correction was applied to the GPS receiver\r
-DEFINE_PROPERTYKEY(PKEY_GPS_Differential, 0xAAF4EE25, 0xBD3B, 0x4DD7, 0xBF, 0xC4, 0x47, 0xF7, 0x7B, 0xB0, 0x0F, 0x6D, 100);\r
-\r
-// Name: System.GPS.DOP -- PKEY_GPS_DOP\r
-// Type: Double -- VT_R8\r
-// FormatID: 0CF8FB02-1837-42F1-A697-A7017AA289B9, 100\r
-//\r
-// Indicates the GPS DOP (data degree of precision). Calculated from PKEY_GPS_DOPNumerator and PKEY_GPS_DOPDenominator\r
-DEFINE_PROPERTYKEY(PKEY_GPS_DOP, 0x0CF8FB02, 0x1837, 0x42F1, 0xA6, 0x97, 0xA7, 0x01, 0x7A, 0xA2, 0x89, 0xB9, 100);\r
-\r
-// Name: System.GPS.DOPDenominator -- PKEY_GPS_DOPDenominator\r
-// Type: UInt32 -- VT_UI4\r
-// FormatID: A0BE94C5-50BA-487B-BD35-0654BE8881ED, 100\r
-//\r
-// Denominator of PKEY_GPS_DOP\r
-DEFINE_PROPERTYKEY(PKEY_GPS_DOPDenominator, 0xA0BE94C5, 0x50BA, 0x487B, 0xBD, 0x35, 0x06, 0x54, 0xBE, 0x88, 0x81, 0xED, 100);\r
-\r
-// Name: System.GPS.DOPNumerator -- PKEY_GPS_DOPNumerator\r
-// Type: UInt32 -- VT_UI4\r
-// FormatID: 47166B16-364F-4AA0-9F31-E2AB3DF449C3, 100\r
-//\r
-// Numerator of PKEY_GPS_DOP\r
-DEFINE_PROPERTYKEY(PKEY_GPS_DOPNumerator, 0x47166B16, 0x364F, 0x4AA0, 0x9F, 0x31, 0xE2, 0xAB, 0x3D, 0xF4, 0x49, 0xC3, 100);\r
-\r
-// Name: System.GPS.ImgDirection -- PKEY_GPS_ImgDirection\r
-// Type: Double -- VT_R8\r
-// FormatID: 16473C91-D017-4ED9-BA4D-B6BAA55DBCF8, 100\r
-// \r
-// Indicates direction of the image when it was captured. Calculated from PKEY_GPS_ImgDirectionNumerator and \r
-// PKEY_GPS_ImgDirectionDenominator.\r
-DEFINE_PROPERTYKEY(PKEY_GPS_ImgDirection, 0x16473C91, 0xD017, 0x4ED9, 0xBA, 0x4D, 0xB6, 0xBA, 0xA5, 0x5D, 0xBC, 0xF8, 100);\r
-\r
-// Name: System.GPS.ImgDirectionDenominator -- PKEY_GPS_ImgDirectionDenominator\r
-// Type: UInt32 -- VT_UI4\r
-// FormatID: 10B24595-41A2-4E20-93C2-5761C1395F32, 100\r
-//\r
-// Denominator of PKEY_GPS_ImgDirection\r
-DEFINE_PROPERTYKEY(PKEY_GPS_ImgDirectionDenominator, 0x10B24595, 0x41A2, 0x4E20, 0x93, 0xC2, 0x57, 0x61, 0xC1, 0x39, 0x5F, 0x32, 100);\r
-\r
-// Name: System.GPS.ImgDirectionNumerator -- PKEY_GPS_ImgDirectionNumerator\r
-// Type: UInt32 -- VT_UI4\r
-// FormatID: DC5877C7-225F-45F7-BAC7-E81334B6130A, 100\r
-//\r
-// Numerator of PKEY_GPS_ImgDirection\r
-DEFINE_PROPERTYKEY(PKEY_GPS_ImgDirectionNumerator, 0xDC5877C7, 0x225F, 0x45F7, 0xBA, 0xC7, 0xE8, 0x13, 0x34, 0xB6, 0x13, 0x0A, 100);\r
-\r
-// Name: System.GPS.ImgDirectionRef -- PKEY_GPS_ImgDirectionRef\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: A4AAA5B7-1AD0-445F-811A-0F8F6E67F6B5, 100\r
-//\r
-// Indicates reference for giving the direction of the image when it was captured. (eg: true direction, magnetic direction)\r
-DEFINE_PROPERTYKEY(PKEY_GPS_ImgDirectionRef, 0xA4AAA5B7, 0x1AD0, 0x445F, 0x81, 0x1A, 0x0F, 0x8F, 0x6E, 0x67, 0xF6, 0xB5, 100);\r
-\r
-// Name: System.GPS.Latitude -- PKEY_GPS_Latitude\r
-// Type: Multivalue Double -- VT_VECTOR | VT_R8 (For variants: VT_ARRAY | VT_R8)\r
-// FormatID: 8727CFFF-4868-4EC6-AD5B-81B98521D1AB, 100\r
-// \r
-// Indicates the latitude. This is an array of three values. Index 0 is the degrees, index 1 is the minutes, index 2 \r
-// is the seconds. Each is calculated from the values in PKEY_GPS_LatitudeNumerator and PKEY_GPS_LatitudeDenominator.\r
-DEFINE_PROPERTYKEY(PKEY_GPS_Latitude, 0x8727CFFF, 0x4868, 0x4EC6, 0xAD, 0x5B, 0x81, 0xB9, 0x85, 0x21, 0xD1, 0xAB, 100);\r
-\r
-// Name: System.GPS.LatitudeDenominator -- PKEY_GPS_LatitudeDenominator\r
-// Type: Multivalue UInt32 -- VT_VECTOR | VT_UI4 (For variants: VT_ARRAY | VT_UI4)\r
-// FormatID: 16E634EE-2BFF-497B-BD8A-4341AD39EEB9, 100\r
-//\r
-// Denominator of PKEY_GPS_Latitude\r
-DEFINE_PROPERTYKEY(PKEY_GPS_LatitudeDenominator, 0x16E634EE, 0x2BFF, 0x497B, 0xBD, 0x8A, 0x43, 0x41, 0xAD, 0x39, 0xEE, 0xB9, 100);\r
-\r
-// Name: System.GPS.LatitudeNumerator -- PKEY_GPS_LatitudeNumerator\r
-// Type: Multivalue UInt32 -- VT_VECTOR | VT_UI4 (For variants: VT_ARRAY | VT_UI4)\r
-// FormatID: 7DDAAAD1-CCC8-41AE-B750-B2CB8031AEA2, 100\r
-//\r
-// Numerator of PKEY_GPS_Latitude\r
-DEFINE_PROPERTYKEY(PKEY_GPS_LatitudeNumerator, 0x7DDAAAD1, 0xCCC8, 0x41AE, 0xB7, 0x50, 0xB2, 0xCB, 0x80, 0x31, 0xAE, 0xA2, 100);\r
-\r
-// Name: System.GPS.LatitudeRef -- PKEY_GPS_LatitudeRef\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 029C0252-5B86-46C7-ACA0-2769FFC8E3D4, 100\r
-//\r
-// Indicates whether latitude is north or south latitude \r
-DEFINE_PROPERTYKEY(PKEY_GPS_LatitudeRef, 0x029C0252, 0x5B86, 0x46C7, 0xAC, 0xA0, 0x27, 0x69, 0xFF, 0xC8, 0xE3, 0xD4, 100);\r
-\r
-// Name: System.GPS.Longitude -- PKEY_GPS_Longitude\r
-// Type: Multivalue Double -- VT_VECTOR | VT_R8 (For variants: VT_ARRAY | VT_R8)\r
-// FormatID: C4C4DBB2-B593-466B-BBDA-D03D27D5E43A, 100\r
-// \r
-// Indicates the longitude. This is an array of three values. Index 0 is the degrees, index 1 is the minutes, index 2 \r
-// is the seconds. Each is calculated from the values in PKEY_GPS_LongitudeNumerator and PKEY_GPS_LongitudeDenominator.\r
-DEFINE_PROPERTYKEY(PKEY_GPS_Longitude, 0xC4C4DBB2, 0xB593, 0x466B, 0xBB, 0xDA, 0xD0, 0x3D, 0x27, 0xD5, 0xE4, 0x3A, 100);\r
-\r
-// Name: System.GPS.LongitudeDenominator -- PKEY_GPS_LongitudeDenominator\r
-// Type: Multivalue UInt32 -- VT_VECTOR | VT_UI4 (For variants: VT_ARRAY | VT_UI4)\r
-// FormatID: BE6E176C-4534-4D2C-ACE5-31DEDAC1606B, 100\r
-//\r
-// Denominator of PKEY_GPS_Longitude\r
-DEFINE_PROPERTYKEY(PKEY_GPS_LongitudeDenominator, 0xBE6E176C, 0x4534, 0x4D2C, 0xAC, 0xE5, 0x31, 0xDE, 0xDA, 0xC1, 0x60, 0x6B, 100);\r
-\r
-// Name: System.GPS.LongitudeNumerator -- PKEY_GPS_LongitudeNumerator\r
-// Type: Multivalue UInt32 -- VT_VECTOR | VT_UI4 (For variants: VT_ARRAY | VT_UI4)\r
-// FormatID: 02B0F689-A914-4E45-821D-1DDA452ED2C4, 100\r
-//\r
-// Numerator of PKEY_GPS_Longitude\r
-DEFINE_PROPERTYKEY(PKEY_GPS_LongitudeNumerator, 0x02B0F689, 0xA914, 0x4E45, 0x82, 0x1D, 0x1D, 0xDA, 0x45, 0x2E, 0xD2, 0xC4, 100);\r
-\r
-// Name: System.GPS.LongitudeRef -- PKEY_GPS_LongitudeRef\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 33DCF22B-28D5-464C-8035-1EE9EFD25278, 100\r
-//\r
-// Indicates whether longitude is east or west longitude\r
-DEFINE_PROPERTYKEY(PKEY_GPS_LongitudeRef, 0x33DCF22B, 0x28D5, 0x464C, 0x80, 0x35, 0x1E, 0xE9, 0xEF, 0xD2, 0x52, 0x78, 100);\r
-\r
-// Name: System.GPS.MapDatum -- PKEY_GPS_MapDatum\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 2CA2DAE6-EDDC-407D-BEF1-773942ABFA95, 100\r
-//\r
-// Indicates the geodetic survey data used by the GPS receiver\r
-DEFINE_PROPERTYKEY(PKEY_GPS_MapDatum, 0x2CA2DAE6, 0xEDDC, 0x407D, 0xBE, 0xF1, 0x77, 0x39, 0x42, 0xAB, 0xFA, 0x95, 100);\r
-\r
-// Name: System.GPS.MeasureMode -- PKEY_GPS_MeasureMode\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: A015ED5D-AAEA-4D58-8A86-3C586920EA0B, 100\r
-//\r
-// Indicates the GPS measurement mode. (eg: 2-dimensional, 3-dimensional)\r
-DEFINE_PROPERTYKEY(PKEY_GPS_MeasureMode, 0xA015ED5D, 0xAAEA, 0x4D58, 0x8A, 0x86, 0x3C, 0x58, 0x69, 0x20, 0xEA, 0x0B, 100);\r
-\r
-// Name: System.GPS.ProcessingMethod -- PKEY_GPS_ProcessingMethod\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 59D49E61-840F-4AA9-A939-E2099B7F6399, 100\r
-//\r
-// Indicates the name of the method used for location finding\r
-DEFINE_PROPERTYKEY(PKEY_GPS_ProcessingMethod, 0x59D49E61, 0x840F, 0x4AA9, 0xA9, 0x39, 0xE2, 0x09, 0x9B, 0x7F, 0x63, 0x99, 100);\r
-\r
-// Name: System.GPS.Satellites -- PKEY_GPS_Satellites\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 467EE575-1F25-4557-AD4E-B8B58B0D9C15, 100\r
-//\r
-// Indicates the GPS satellites used for measurements\r
-DEFINE_PROPERTYKEY(PKEY_GPS_Satellites, 0x467EE575, 0x1F25, 0x4557, 0xAD, 0x4E, 0xB8, 0xB5, 0x8B, 0x0D, 0x9C, 0x15, 100);\r
-\r
-// Name: System.GPS.Speed -- PKEY_GPS_Speed\r
-// Type: Double -- VT_R8\r
-// FormatID: DA5D0862-6E76-4E1B-BABD-70021BD25494, 100\r
-// \r
-// Indicates the speed of the GPS receiver movement. Calculated from PKEY_GPS_SpeedNumerator and \r
-// PKEY_GPS_SpeedDenominator.\r
-DEFINE_PROPERTYKEY(PKEY_GPS_Speed, 0xDA5D0862, 0x6E76, 0x4E1B, 0xBA, 0xBD, 0x70, 0x02, 0x1B, 0xD2, 0x54, 0x94, 100);\r
-\r
-// Name: System.GPS.SpeedDenominator -- PKEY_GPS_SpeedDenominator\r
-// Type: UInt32 -- VT_UI4\r
-// FormatID: 7D122D5A-AE5E-4335-8841-D71E7CE72F53, 100\r
-//\r
-// Denominator of PKEY_GPS_Speed\r
-DEFINE_PROPERTYKEY(PKEY_GPS_SpeedDenominator, 0x7D122D5A, 0xAE5E, 0x4335, 0x88, 0x41, 0xD7, 0x1E, 0x7C, 0xE7, 0x2F, 0x53, 100);\r
-\r
-// Name: System.GPS.SpeedNumerator -- PKEY_GPS_SpeedNumerator\r
-// Type: UInt32 -- VT_UI4\r
-// FormatID: ACC9CE3D-C213-4942-8B48-6D0820F21C6D, 100\r
-//\r
-// Numerator of PKEY_GPS_Speed\r
-DEFINE_PROPERTYKEY(PKEY_GPS_SpeedNumerator, 0xACC9CE3D, 0xC213, 0x4942, 0x8B, 0x48, 0x6D, 0x08, 0x20, 0xF2, 0x1C, 0x6D, 100);\r
-\r
-// Name: System.GPS.SpeedRef -- PKEY_GPS_SpeedRef\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: ECF7F4C9-544F-4D6D-9D98-8AD79ADAF453, 100\r
-// \r
-// Indicates the unit used to express the speed of the GPS receiver movement. (eg: kilometers per hour, \r
-// miles per hour, knots).\r
-DEFINE_PROPERTYKEY(PKEY_GPS_SpeedRef, 0xECF7F4C9, 0x544F, 0x4D6D, 0x9D, 0x98, 0x8A, 0xD7, 0x9A, 0xDA, 0xF4, 0x53, 100);\r
-\r
-// Name: System.GPS.Status -- PKEY_GPS_Status\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 125491F4-818F-46B2-91B5-D537753617B2, 100\r
-// \r
-// Indicates the status of the GPS receiver when the image was recorded. (eg: measurement in progress, \r
-// measurement interoperability).\r
-DEFINE_PROPERTYKEY(PKEY_GPS_Status, 0x125491F4, 0x818F, 0x46B2, 0x91, 0xB5, 0xD5, 0x37, 0x75, 0x36, 0x17, 0xB2, 100);\r
-\r
-// Name: System.GPS.Track -- PKEY_GPS_Track\r
-// Type: Double -- VT_R8\r
-// FormatID: 76C09943-7C33-49E3-9E7E-CDBA872CFADA, 100\r
-// \r
-// Indicates the direction of the GPS receiver movement. Calculated from PKEY_GPS_TrackNumerator and \r
-// PKEY_GPS_TrackDenominator.\r
-DEFINE_PROPERTYKEY(PKEY_GPS_Track, 0x76C09943, 0x7C33, 0x49E3, 0x9E, 0x7E, 0xCD, 0xBA, 0x87, 0x2C, 0xFA, 0xDA, 100);\r
-\r
-// Name: System.GPS.TrackDenominator -- PKEY_GPS_TrackDenominator\r
-// Type: UInt32 -- VT_UI4\r
-// FormatID: C8D1920C-01F6-40C0-AC86-2F3A4AD00770, 100\r
-//\r
-// Denominator of PKEY_GPS_Track\r
-DEFINE_PROPERTYKEY(PKEY_GPS_TrackDenominator, 0xC8D1920C, 0x01F6, 0x40C0, 0xAC, 0x86, 0x2F, 0x3A, 0x4A, 0xD0, 0x07, 0x70, 100);\r
-\r
-// Name: System.GPS.TrackNumerator -- PKEY_GPS_TrackNumerator\r
-// Type: UInt32 -- VT_UI4\r
-// FormatID: 702926F4-44A6-43E1-AE71-45627116893B, 100\r
-//\r
-// Numerator of PKEY_GPS_Track\r
-DEFINE_PROPERTYKEY(PKEY_GPS_TrackNumerator, 0x702926F4, 0x44A6, 0x43E1, 0xAE, 0x71, 0x45, 0x62, 0x71, 0x16, 0x89, 0x3B, 100);\r
-\r
-// Name: System.GPS.TrackRef -- PKEY_GPS_TrackRef\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 35DBE6FE-44C3-4400-AAAE-D2C799C407E8, 100\r
-//\r
-// Indicates reference for the direction of the GPS receiver movement. (eg: true direction, magnetic direction)\r
-DEFINE_PROPERTYKEY(PKEY_GPS_TrackRef, 0x35DBE6FE, 0x44C3, 0x4400, 0xAA, 0xAE, 0xD2, 0xC7, 0x99, 0xC4, 0x07, 0xE8, 100);\r
-\r
-// Name: System.GPS.VersionID -- PKEY_GPS_VersionID\r
-// Type: Buffer -- VT_VECTOR | VT_UI1 (For variants: VT_ARRAY | VT_UI1)\r
-// FormatID: 22704DA4-C6B2-4A99-8E56-F16DF8C92599, 100\r
-//\r
-// Indicates the version of the GPS information\r
-DEFINE_PROPERTYKEY(PKEY_GPS_VersionID, 0x22704DA4, 0xC6B2, 0x4A99, 0x8E, 0x56, 0xF1, 0x6D, 0xF8, 0xC9, 0x25, 0x99, 100);\r
- \r
-//-----------------------------------------------------------------------------\r
-// Image properties\r
-\r
-\r
-\r
-// Name: System.Image.BitDepth -- PKEY_Image_BitDepth\r
-// Type: UInt32 -- VT_UI4\r
-// FormatID: (PSGUID_IMAGESUMMARYINFORMATION) 6444048F-4C8B-11D1-8B70-080036B11A03, 7 (PIDISI_BITDEPTH)\r
-//\r
-// \r
-DEFINE_PROPERTYKEY(PKEY_Image_BitDepth, 0x6444048F, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 7);\r
-\r
-// Name: System.Image.ColorSpace -- PKEY_Image_ColorSpace\r
-// Type: UInt16 -- VT_UI2\r
-// FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 40961\r
-//\r
-// PropertyTagExifColorSpace\r
-DEFINE_PROPERTYKEY(PKEY_Image_ColorSpace, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 40961);\r
-\r
-// Possible discrete values for PKEY_Image_ColorSpace are:\r
-#define IMAGE_COLORSPACE_SRGB 1u\r
-#define IMAGE_COLORSPACE_UNCALIBRATED 0xFFFFu\r
-\r
-// Name: System.Image.CompressedBitsPerPixel -- PKEY_Image_CompressedBitsPerPixel\r
-// Type: Double -- VT_R8\r
-// FormatID: 364B6FA9-37AB-482A-BE2B-AE02F60D4318, 100\r
-//\r
-// Calculated from PKEY_Image_CompressedBitsPerPixelNumerator and PKEY_Image_CompressedBitsPerPixelDenominator.\r
-DEFINE_PROPERTYKEY(PKEY_Image_CompressedBitsPerPixel, 0x364B6FA9, 0x37AB, 0x482A, 0xBE, 0x2B, 0xAE, 0x02, 0xF6, 0x0D, 0x43, 0x18, 100);\r
-\r
-// Name: System.Image.CompressedBitsPerPixelDenominator -- PKEY_Image_CompressedBitsPerPixelDenominator\r
-// Type: UInt32 -- VT_UI4\r
-// FormatID: 1F8844E1-24AD-4508-9DFD-5326A415CE02, 100\r
-//\r
-// Denominator of PKEY_Image_CompressedBitsPerPixel.\r
-DEFINE_PROPERTYKEY(PKEY_Image_CompressedBitsPerPixelDenominator, 0x1F8844E1, 0x24AD, 0x4508, 0x9D, 0xFD, 0x53, 0x26, 0xA4, 0x15, 0xCE, 0x02, 100);\r
-\r
-// Name: System.Image.CompressedBitsPerPixelNumerator -- PKEY_Image_CompressedBitsPerPixelNumerator\r
-// Type: UInt32 -- VT_UI4\r
-// FormatID: D21A7148-D32C-4624-8900-277210F79C0F, 100\r
-//\r
-// Numerator of PKEY_Image_CompressedBitsPerPixel.\r
-DEFINE_PROPERTYKEY(PKEY_Image_CompressedBitsPerPixelNumerator, 0xD21A7148, 0xD32C, 0x4624, 0x89, 0x00, 0x27, 0x72, 0x10, 0xF7, 0x9C, 0x0F, 100);\r
-\r
-// Name: System.Image.Compression -- PKEY_Image_Compression\r
-// Type: UInt16 -- VT_UI2\r
-// FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 259\r
-//\r
-// Indicates the image compression level. PropertyTagCompression.\r
-DEFINE_PROPERTYKEY(PKEY_Image_Compression, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 259);\r
-\r
-// Possible discrete values for PKEY_Image_Compression are:\r
-#define IMAGE_COMPRESSION_UNCOMPRESSED 1u\r
-#define IMAGE_COMPRESSION_CCITT_T3 2u\r
-#define IMAGE_COMPRESSION_CCITT_T4 3u\r
-#define IMAGE_COMPRESSION_CCITT_T6 4u\r
-#define IMAGE_COMPRESSION_LZW 5u\r
-#define IMAGE_COMPRESSION_JPEG 6u\r
-#define IMAGE_COMPRESSION_PACKBITS 32773u\r
-\r
-// Name: System.Image.CompressionText -- PKEY_Image_CompressionText\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 3F08E66F-2F44-4BB9-A682-AC35D2562322, 100\r
-// \r
-// This is the user-friendly form of System.Image.Compression. Not intended to be parsed \r
-// programmatically.\r
-DEFINE_PROPERTYKEY(PKEY_Image_CompressionText, 0x3F08E66F, 0x2F44, 0x4BB9, 0xA6, 0x82, 0xAC, 0x35, 0xD2, 0x56, 0x23, 0x22, 100);\r
-\r
-// Name: System.Image.Dimensions -- PKEY_Image_Dimensions\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: (PSGUID_IMAGESUMMARYINFORMATION) 6444048F-4C8B-11D1-8B70-080036B11A03, 13 (PIDISI_DIMENSIONS)\r
-//\r
-// Indicates the dimensions of the image.\r
-DEFINE_PROPERTYKEY(PKEY_Image_Dimensions, 0x6444048F, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 13);\r
-\r
-// Name: System.Image.HorizontalResolution -- PKEY_Image_HorizontalResolution\r
-// Type: Double -- VT_R8\r
-// FormatID: (PSGUID_IMAGESUMMARYINFORMATION) 6444048F-4C8B-11D1-8B70-080036B11A03, 5 (PIDISI_RESOLUTIONX)\r
-//\r
-// \r
-DEFINE_PROPERTYKEY(PKEY_Image_HorizontalResolution, 0x6444048F, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 5);\r
-\r
-// Name: System.Image.HorizontalSize -- PKEY_Image_HorizontalSize\r
-// Type: UInt32 -- VT_UI4\r
-// FormatID: (PSGUID_IMAGESUMMARYINFORMATION) 6444048F-4C8B-11D1-8B70-080036B11A03, 3 (PIDISI_CX)\r
-//\r
-// \r
-DEFINE_PROPERTYKEY(PKEY_Image_HorizontalSize, 0x6444048F, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 3);\r
-\r
-// Name: System.Image.ImageID -- PKEY_Image_ImageID\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 10DABE05-32AA-4C29-BF1A-63E2D220587F, 100\r
-DEFINE_PROPERTYKEY(PKEY_Image_ImageID, 0x10DABE05, 0x32AA, 0x4C29, 0xBF, 0x1A, 0x63, 0xE2, 0xD2, 0x20, 0x58, 0x7F, 100);\r
-\r
-// Name: System.Image.ResolutionUnit -- PKEY_Image_ResolutionUnit\r
-// Type: Int16 -- VT_I2\r
-// FormatID: 19B51FA6-1F92-4A5C-AB48-7DF0ABD67444, 100\r
-DEFINE_PROPERTYKEY(PKEY_Image_ResolutionUnit, 0x19B51FA6, 0x1F92, 0x4A5C, 0xAB, 0x48, 0x7D, 0xF0, 0xAB, 0xD6, 0x74, 0x44, 100);\r
-\r
-// Name: System.Image.VerticalResolution -- PKEY_Image_VerticalResolution\r
-// Type: Double -- VT_R8\r
-// FormatID: (PSGUID_IMAGESUMMARYINFORMATION) 6444048F-4C8B-11D1-8B70-080036B11A03, 6 (PIDISI_RESOLUTIONY)\r
-//\r
-// \r
-DEFINE_PROPERTYKEY(PKEY_Image_VerticalResolution, 0x6444048F, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 6);\r
-\r
-// Name: System.Image.VerticalSize -- PKEY_Image_VerticalSize\r
-// Type: UInt32 -- VT_UI4\r
-// FormatID: (PSGUID_IMAGESUMMARYINFORMATION) 6444048F-4C8B-11D1-8B70-080036B11A03, 4 (PIDISI_CY)\r
-//\r
-// \r
-DEFINE_PROPERTYKEY(PKEY_Image_VerticalSize, 0x6444048F, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 4);\r
-\r
- \r
- \r
-//-----------------------------------------------------------------------------\r
-// Journal properties\r
-\r
-// Name: System.Journal.Contacts -- PKEY_Journal_Contacts\r
-// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR)\r
-// FormatID: DEA7C82C-1D89-4A66-9427-A4E3DEBABCB1, 100\r
-DEFINE_PROPERTYKEY(PKEY_Journal_Contacts, 0xDEA7C82C, 0x1D89, 0x4A66, 0x94, 0x27, 0xA4, 0xE3, 0xDE, 0xBA, 0xBC, 0xB1, 100);\r
-\r
-// Name: System.Journal.EntryType -- PKEY_Journal_EntryType\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 95BEB1FC-326D-4644-B396-CD3ED90E6DDF, 100\r
-DEFINE_PROPERTYKEY(PKEY_Journal_EntryType, 0x95BEB1FC, 0x326D, 0x4644, 0xB3, 0x96, 0xCD, 0x3E, 0xD9, 0x0E, 0x6D, 0xDF, 100);\r
- \r
-//-----------------------------------------------------------------------------\r
-// Link properties\r
-\r
-\r
-\r
-// Name: System.Link.Comment -- PKEY_Link_Comment\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: (PSGUID_LINK) B9B4B3FC-2B51-4A42-B5D8-324146AFCF25, 5\r
-DEFINE_PROPERTYKEY(PKEY_Link_Comment, 0xB9B4B3FC, 0x2B51, 0x4A42, 0xB5, 0xD8, 0x32, 0x41, 0x46, 0xAF, 0xCF, 0x25, 5);\r
-\r
-// Name: System.Link.DateVisited -- PKEY_Link_DateVisited\r
-// Type: DateTime -- VT_FILETIME (For variants: VT_DATE)\r
-// FormatID: 5CBF2787-48CF-4208-B90E-EE5E5D420294, 23 (PKEYs relating to URLs. Used by IE History.)\r
-DEFINE_PROPERTYKEY(PKEY_Link_DateVisited, 0x5CBF2787, 0x48CF, 0x4208, 0xB9, 0x0E, 0xEE, 0x5E, 0x5D, 0x42, 0x02, 0x94, 23);\r
-\r
-// Name: System.Link.Description -- PKEY_Link_Description\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 5CBF2787-48CF-4208-B90E-EE5E5D420294, 21 (PKEYs relating to URLs. Used by IE History.)\r
-DEFINE_PROPERTYKEY(PKEY_Link_Description, 0x5CBF2787, 0x48CF, 0x4208, 0xB9, 0x0E, 0xEE, 0x5E, 0x5D, 0x42, 0x02, 0x94, 21);\r
-\r
-// Name: System.Link.Status -- PKEY_Link_Status\r
-// Type: Int32 -- VT_I4\r
-// FormatID: (PSGUID_LINK) B9B4B3FC-2B51-4A42-B5D8-324146AFCF25, 3 (PID_LINK_TARGET_TYPE)\r
-//\r
-// \r
-DEFINE_PROPERTYKEY(PKEY_Link_Status, 0xB9B4B3FC, 0x2B51, 0x4A42, 0xB5, 0xD8, 0x32, 0x41, 0x46, 0xAF, 0xCF, 0x25, 3);\r
-\r
-// Possible discrete values for PKEY_Link_Status are:\r
-#define LINK_STATUS_RESOLVED 1l\r
-#define LINK_STATUS_BROKEN 2l\r
-\r
-// Name: System.Link.TargetExtension -- PKEY_Link_TargetExtension\r
-// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR)\r
-// FormatID: 7A7D76F4-B630-4BD7-95FF-37CC51A975C9, 2\r
-//\r
-// The file extension of the link target. See System.File.Extension\r
-DEFINE_PROPERTYKEY(PKEY_Link_TargetExtension, 0x7A7D76F4, 0xB630, 0x4BD7, 0x95, 0xFF, 0x37, 0xCC, 0x51, 0xA9, 0x75, 0xC9, 2);\r
-\r
-// Name: System.Link.TargetParsingPath -- PKEY_Link_TargetParsingPath\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: (PSGUID_LINK) B9B4B3FC-2B51-4A42-B5D8-324146AFCF25, 2 (PID_LINK_TARGET)\r
-// \r
-// This is the shell namespace path to the target of the link item. This path may be passed to \r
-// SHParseDisplayName to parse the path to the correct shell folder.\r
-// \r
-// If the target item is a file, the value is identical to System.ItemPathDisplay.\r
-// \r
-// If the target item cannot be accessed through the shell namespace, this value is VT_EMPTY.\r
-DEFINE_PROPERTYKEY(PKEY_Link_TargetParsingPath, 0xB9B4B3FC, 0x2B51, 0x4A42, 0xB5, 0xD8, 0x32, 0x41, 0x46, 0xAF, 0xCF, 0x25, 2);\r
-\r
-// Name: System.Link.TargetSFGAOFlags -- PKEY_Link_TargetSFGAOFlags\r
-// Type: UInt32 -- VT_UI4\r
-// FormatID: (PSGUID_LINK) B9B4B3FC-2B51-4A42-B5D8-324146AFCF25, 8\r
-// \r
-// IShellFolder::GetAttributesOf flags for the target of a link, with SFGAO_PKEYSFGAOMASK \r
-// attributes masked out.\r
-DEFINE_PROPERTYKEY(PKEY_Link_TargetSFGAOFlags, 0xB9B4B3FC, 0x2B51, 0x4A42, 0xB5, 0xD8, 0x32, 0x41, 0x46, 0xAF, 0xCF, 0x25, 8);\r
- \r
-//-----------------------------------------------------------------------------\r
-// Media properties\r
-\r
-\r
-\r
-// Name: System.Media.AuthorUrl -- PKEY_Media_AuthorUrl\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 32 (PIDMSI_AUTHOR_URL)\r
-//\r
-// \r
-DEFINE_PROPERTYKEY(PKEY_Media_AuthorUrl, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 32);\r
-\r
-// Name: System.Media.AverageLevel -- PKEY_Media_AverageLevel\r
-// Type: UInt32 -- VT_UI4\r
-// FormatID: 09EDD5B6-B301-43C5-9990-D00302EFFD46, 100\r
-DEFINE_PROPERTYKEY(PKEY_Media_AverageLevel, 0x09EDD5B6, 0xB301, 0x43C5, 0x99, 0x90, 0xD0, 0x03, 0x02, 0xEF, 0xFD, 0x46, 100);\r
-\r
-// Name: System.Media.ClassPrimaryID -- PKEY_Media_ClassPrimaryID\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 13 (PIDMSI_CLASS_PRIMARY_ID)\r
-//\r
-// \r
-DEFINE_PROPERTYKEY(PKEY_Media_ClassPrimaryID, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 13);\r
-\r
-// Name: System.Media.ClassSecondaryID -- PKEY_Media_ClassSecondaryID\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 14 (PIDMSI_CLASS_SECONDARY_ID)\r
-//\r
-// \r
-DEFINE_PROPERTYKEY(PKEY_Media_ClassSecondaryID, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 14);\r
-\r
-// Name: System.Media.CollectionGroupID -- PKEY_Media_CollectionGroupID\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 24 (PIDMSI_COLLECTION_GROUP_ID)\r
-//\r
-// \r
-DEFINE_PROPERTYKEY(PKEY_Media_CollectionGroupID, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 24);\r
-\r
-// Name: System.Media.CollectionID -- PKEY_Media_CollectionID\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 25 (PIDMSI_COLLECTION_ID)\r
-//\r
-// \r
-DEFINE_PROPERTYKEY(PKEY_Media_CollectionID, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 25);\r
-\r
-// Name: System.Media.ContentDistributor -- PKEY_Media_ContentDistributor\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 18 (PIDMSI_CONTENTDISTRIBUTOR)\r
-//\r
-// \r
-DEFINE_PROPERTYKEY(PKEY_Media_ContentDistributor, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 18);\r
-\r
-// Name: System.Media.ContentID -- PKEY_Media_ContentID\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 26 (PIDMSI_CONTENT_ID)\r
-//\r
-// \r
-DEFINE_PROPERTYKEY(PKEY_Media_ContentID, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 26);\r
-\r
-// Name: System.Media.CreatorApplication -- PKEY_Media_CreatorApplication\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 27 (PIDMSI_TOOL_NAME)\r
-//\r
-// \r
-DEFINE_PROPERTYKEY(PKEY_Media_CreatorApplication, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 27);\r
-\r
-// Name: System.Media.CreatorApplicationVersion -- PKEY_Media_CreatorApplicationVersion\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 28 (PIDMSI_TOOL_VERSION)\r
-//\r
-// \r
-DEFINE_PROPERTYKEY(PKEY_Media_CreatorApplicationVersion, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 28);\r
-\r
-// Name: System.Media.DateEncoded -- PKEY_Media_DateEncoded\r
-// Type: DateTime -- VT_FILETIME (For variants: VT_DATE)\r
-// FormatID: 2E4B640D-5019-46D8-8881-55414CC5CAA0, 100\r
-//\r
-// DateTime is in UTC (in the doc, not file system).\r
-DEFINE_PROPERTYKEY(PKEY_Media_DateEncoded, 0x2E4B640D, 0x5019, 0x46D8, 0x88, 0x81, 0x55, 0x41, 0x4C, 0xC5, 0xCA, 0xA0, 100);\r
-\r
-// Name: System.Media.DateReleased -- PKEY_Media_DateReleased\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: DE41CC29-6971-4290-B472-F59F2E2F31E2, 100\r
-DEFINE_PROPERTYKEY(PKEY_Media_DateReleased, 0xDE41CC29, 0x6971, 0x4290, 0xB4, 0x72, 0xF5, 0x9F, 0x2E, 0x2F, 0x31, 0xE2, 100);\r
-\r
-// Name: System.Media.Duration -- PKEY_Media_Duration\r
-// Type: UInt64 -- VT_UI8\r
-// FormatID: (FMTID_AudioSummaryInformation) 64440490-4C8B-11D1-8B70-080036B11A03, 3 (PIDASI_TIMELENGTH)\r
-//\r
-// 100ns units, not milliseconds\r
-DEFINE_PROPERTYKEY(PKEY_Media_Duration, 0x64440490, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 3);\r
-\r
-// Name: System.Media.DVDID -- PKEY_Media_DVDID\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 15 (PIDMSI_DVDID)\r
-//\r
-// \r
-DEFINE_PROPERTYKEY(PKEY_Media_DVDID, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 15);\r
-\r
-// Name: System.Media.EncodedBy -- PKEY_Media_EncodedBy\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 36 (PIDMSI_ENCODED_BY)\r
-//\r
-// \r
-DEFINE_PROPERTYKEY(PKEY_Media_EncodedBy, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 36);\r
-\r
-// Name: System.Media.EncodingSettings -- PKEY_Media_EncodingSettings\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 37 (PIDMSI_ENCODING_SETTINGS)\r
-//\r
-// \r
-DEFINE_PROPERTYKEY(PKEY_Media_EncodingSettings, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 37);\r
-\r
-// Name: System.Media.FrameCount -- PKEY_Media_FrameCount\r
-// Type: UInt32 -- VT_UI4\r
-// FormatID: (PSGUID_IMAGESUMMARYINFORMATION) 6444048F-4C8B-11D1-8B70-080036B11A03, 12 (PIDISI_FRAMECOUNT)\r
-//\r
-// Indicates the frame count for the image.\r
-DEFINE_PROPERTYKEY(PKEY_Media_FrameCount, 0x6444048F, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 12);\r
-\r
-// Name: System.Media.MCDI -- PKEY_Media_MCDI\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 16 (PIDMSI_MCDI)\r
-//\r
-// \r
-DEFINE_PROPERTYKEY(PKEY_Media_MCDI, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 16);\r
-\r
-// Name: System.Media.MetadataContentProvider -- PKEY_Media_MetadataContentProvider\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 17 (PIDMSI_PROVIDER)\r
-//\r
-// \r
-DEFINE_PROPERTYKEY(PKEY_Media_MetadataContentProvider, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 17);\r
-\r
-// Name: System.Media.Producer -- PKEY_Media_Producer\r
-// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR)\r
-// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 22 (PIDMSI_PRODUCER)\r
-//\r
-// \r
-DEFINE_PROPERTYKEY(PKEY_Media_Producer, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 22);\r
-\r
-// Name: System.Media.PromotionUrl -- PKEY_Media_PromotionUrl\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 33 (PIDMSI_PROMOTION_URL)\r
-//\r
-// \r
-DEFINE_PROPERTYKEY(PKEY_Media_PromotionUrl, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 33);\r
-\r
-// Name: System.Media.ProtectionType -- PKEY_Media_ProtectionType\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 38\r
-// \r
-// If media is protected, how is it protected?\r
-DEFINE_PROPERTYKEY(PKEY_Media_ProtectionType, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 38);\r
-\r
-// Name: System.Media.ProviderRating -- PKEY_Media_ProviderRating\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 39\r
-// \r
-// Rating (0 - 99) supplied by metadata provider\r
-DEFINE_PROPERTYKEY(PKEY_Media_ProviderRating, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 39);\r
-\r
-// Name: System.Media.ProviderStyle -- PKEY_Media_ProviderStyle\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 40\r
-// \r
-// Style of music or video, supplied by metadata provider\r
-DEFINE_PROPERTYKEY(PKEY_Media_ProviderStyle, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 40);\r
-\r
-// Name: System.Media.Publisher -- PKEY_Media_Publisher\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 30 (PIDMSI_PUBLISHER)\r
-//\r
-// \r
-DEFINE_PROPERTYKEY(PKEY_Media_Publisher, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 30);\r
-\r
-// Name: System.Media.SubscriptionContentId -- PKEY_Media_SubscriptionContentId\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 9AEBAE7A-9644-487D-A92C-657585ED751A, 100\r
-DEFINE_PROPERTYKEY(PKEY_Media_SubscriptionContentId, 0x9AEBAE7A, 0x9644, 0x487D, 0xA9, 0x2C, 0x65, 0x75, 0x85, 0xED, 0x75, 0x1A, 100);\r
-\r
-// Name: System.Media.SubTitle -- PKEY_Media_SubTitle\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: (FMTID_MUSIC) 56A3372E-CE9C-11D2-9F0E-006097C686F6, 38 (PIDSI_MUSIC_SUB_TITLE)\r
-//\r
-// \r
-DEFINE_PROPERTYKEY(PKEY_Media_SubTitle, 0x56A3372E, 0xCE9C, 0x11D2, 0x9F, 0x0E, 0x00, 0x60, 0x97, 0xC6, 0x86, 0xF6, 38);\r
-\r
-// Name: System.Media.UniqueFileIdentifier -- PKEY_Media_UniqueFileIdentifier\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 35 (PIDMSI_UNIQUE_FILE_IDENTIFIER)\r
-//\r
-// \r
-DEFINE_PROPERTYKEY(PKEY_Media_UniqueFileIdentifier, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 35);\r
-\r
-// Name: System.Media.UserNoAutoInfo -- PKEY_Media_UserNoAutoInfo\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 41\r
-// \r
-// If true, do NOT alter this file's metadata. Set by user.\r
-DEFINE_PROPERTYKEY(PKEY_Media_UserNoAutoInfo, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 41);\r
-\r
-// Name: System.Media.UserWebUrl -- PKEY_Media_UserWebUrl\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 34 (PIDMSI_USER_WEB_URL)\r
-//\r
-// \r
-DEFINE_PROPERTYKEY(PKEY_Media_UserWebUrl, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 34);\r
-\r
-// Name: System.Media.Writer -- PKEY_Media_Writer\r
-// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR)\r
-// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 23 (PIDMSI_WRITER)\r
-//\r
-// \r
-DEFINE_PROPERTYKEY(PKEY_Media_Writer, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 23);\r
-\r
-// Name: System.Media.Year -- PKEY_Media_Year\r
-// Type: UInt32 -- VT_UI4\r
-// FormatID: (FMTID_MUSIC) 56A3372E-CE9C-11D2-9F0E-006097C686F6, 5 (PIDSI_MUSIC_YEAR)\r
-//\r
-// \r
-DEFINE_PROPERTYKEY(PKEY_Media_Year, 0x56A3372E, 0xCE9C, 0x11D2, 0x9F, 0x0E, 0x00, 0x60, 0x97, 0xC6, 0x86, 0xF6, 5);\r
- \r
-//-----------------------------------------------------------------------------\r
-// Message properties\r
-\r
-\r
-\r
-// Name: System.Message.AttachmentContents -- PKEY_Message_AttachmentContents\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 3143BF7C-80A8-4854-8880-E2E40189BDD0, 100\r
-DEFINE_PROPERTYKEY(PKEY_Message_AttachmentContents, 0x3143BF7C, 0x80A8, 0x4854, 0x88, 0x80, 0xE2, 0xE4, 0x01, 0x89, 0xBD, 0xD0, 100);\r
-\r
-// Name: System.Message.AttachmentNames -- PKEY_Message_AttachmentNames\r
-// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR)\r
-// FormatID: E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD, 21\r
-//\r
-// The names of the attachments in a message\r
-DEFINE_PROPERTYKEY(PKEY_Message_AttachmentNames, 0xE3E0584C, 0xB788, 0x4A5A, 0xBB, 0x20, 0x7F, 0x5A, 0x44, 0xC9, 0xAC, 0xDD, 21);\r
-\r
-// Name: System.Message.BccAddress -- PKEY_Message_BccAddress\r
-// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR)\r
-// FormatID: E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD, 2\r
-//\r
-// Addresses in Bcc: field\r
-DEFINE_PROPERTYKEY(PKEY_Message_BccAddress, 0xE3E0584C, 0xB788, 0x4A5A, 0xBB, 0x20, 0x7F, 0x5A, 0x44, 0xC9, 0xAC, 0xDD, 2);\r
-\r
-// Name: System.Message.BccName -- PKEY_Message_BccName\r
-// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR)\r
-// FormatID: E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD, 3\r
-//\r
-// person names in Bcc: field\r
-DEFINE_PROPERTYKEY(PKEY_Message_BccName, 0xE3E0584C, 0xB788, 0x4A5A, 0xBB, 0x20, 0x7F, 0x5A, 0x44, 0xC9, 0xAC, 0xDD, 3);\r
-\r
-// Name: System.Message.CcAddress -- PKEY_Message_CcAddress\r
-// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR)\r
-// FormatID: E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD, 4\r
-//\r
-// Addresses in Cc: field\r
-DEFINE_PROPERTYKEY(PKEY_Message_CcAddress, 0xE3E0584C, 0xB788, 0x4A5A, 0xBB, 0x20, 0x7F, 0x5A, 0x44, 0xC9, 0xAC, 0xDD, 4);\r
-\r
-// Name: System.Message.CcName -- PKEY_Message_CcName\r
-// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR)\r
-// FormatID: E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD, 5\r
-//\r
-// person names in Cc: field\r
-DEFINE_PROPERTYKEY(PKEY_Message_CcName, 0xE3E0584C, 0xB788, 0x4A5A, 0xBB, 0x20, 0x7F, 0x5A, 0x44, 0xC9, 0xAC, 0xDD, 5);\r
-\r
-// Name: System.Message.ConversationID -- PKEY_Message_ConversationID\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: DC8F80BD-AF1E-4289-85B6-3DFC1B493992, 100\r
-DEFINE_PROPERTYKEY(PKEY_Message_ConversationID, 0xDC8F80BD, 0xAF1E, 0x4289, 0x85, 0xB6, 0x3D, 0xFC, 0x1B, 0x49, 0x39, 0x92, 100);\r
-\r
-// Name: System.Message.ConversationIndex -- PKEY_Message_ConversationIndex\r
-// Type: Buffer -- VT_VECTOR | VT_UI1 (For variants: VT_ARRAY | VT_UI1)\r
-// FormatID: DC8F80BD-AF1E-4289-85B6-3DFC1B493992, 101\r
-// \r
-// \r
-DEFINE_PROPERTYKEY(PKEY_Message_ConversationIndex, 0xDC8F80BD, 0xAF1E, 0x4289, 0x85, 0xB6, 0x3D, 0xFC, 0x1B, 0x49, 0x39, 0x92, 101);\r
-\r
-// Name: System.Message.DateReceived -- PKEY_Message_DateReceived\r
-// Type: DateTime -- VT_FILETIME (For variants: VT_DATE)\r
-// FormatID: E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD, 20\r
-//\r
-// Date and Time communication was received\r
-DEFINE_PROPERTYKEY(PKEY_Message_DateReceived, 0xE3E0584C, 0xB788, 0x4A5A, 0xBB, 0x20, 0x7F, 0x5A, 0x44, 0xC9, 0xAC, 0xDD, 20);\r
-\r
-// Name: System.Message.DateSent -- PKEY_Message_DateSent\r
-// Type: DateTime -- VT_FILETIME (For variants: VT_DATE)\r
-// FormatID: E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD, 19\r
-//\r
-// Date and Time communication was sent\r
-DEFINE_PROPERTYKEY(PKEY_Message_DateSent, 0xE3E0584C, 0xB788, 0x4A5A, 0xBB, 0x20, 0x7F, 0x5A, 0x44, 0xC9, 0xAC, 0xDD, 19);\r
-\r
-// Name: System.Message.FromAddress -- PKEY_Message_FromAddress\r
-// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR)\r
-// FormatID: E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD, 13\r
-DEFINE_PROPERTYKEY(PKEY_Message_FromAddress, 0xE3E0584C, 0xB788, 0x4A5A, 0xBB, 0x20, 0x7F, 0x5A, 0x44, 0xC9, 0xAC, 0xDD, 13);\r
-\r
-// Name: System.Message.FromName -- PKEY_Message_FromName\r
-// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR)\r
-// FormatID: E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD, 14\r
-//\r
-// Address in from field as person name\r
-DEFINE_PROPERTYKEY(PKEY_Message_FromName, 0xE3E0584C, 0xB788, 0x4A5A, 0xBB, 0x20, 0x7F, 0x5A, 0x44, 0xC9, 0xAC, 0xDD, 14);\r
-\r
-// Name: System.Message.HasAttachments -- PKEY_Message_HasAttachments\r
-// Type: Boolean -- VT_BOOL\r
-// FormatID: 9C1FCF74-2D97-41BA-B4AE-CB2E3661A6E4, 8\r
-//\r
-// \r
-DEFINE_PROPERTYKEY(PKEY_Message_HasAttachments, 0x9C1FCF74, 0x2D97, 0x41BA, 0xB4, 0xAE, 0xCB, 0x2E, 0x36, 0x61, 0xA6, 0xE4, 8);\r
-\r
-// Name: System.Message.IsFwdOrReply -- PKEY_Message_IsFwdOrReply\r
-// Type: Int32 -- VT_I4\r
-// FormatID: 9A9BC088-4F6D-469E-9919-E705412040F9, 100\r
-DEFINE_PROPERTYKEY(PKEY_Message_IsFwdOrReply, 0x9A9BC088, 0x4F6D, 0x469E, 0x99, 0x19, 0xE7, 0x05, 0x41, 0x20, 0x40, 0xF9, 100);\r
-\r
-// Name: System.Message.MessageClass -- PKEY_Message_MessageClass\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: CD9ED458-08CE-418F-A70E-F912C7BB9C5C, 103\r
-// \r
-// What type of outlook msg this is (meeting, task, mail, etc.)\r
-DEFINE_PROPERTYKEY(PKEY_Message_MessageClass, 0xCD9ED458, 0x08CE, 0x418F, 0xA7, 0x0E, 0xF9, 0x12, 0xC7, 0xBB, 0x9C, 0x5C, 103);\r
-\r
-// Name: System.Message.SenderAddress -- PKEY_Message_SenderAddress\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 0BE1C8E7-1981-4676-AE14-FDD78F05A6E7, 100\r
-DEFINE_PROPERTYKEY(PKEY_Message_SenderAddress, 0x0BE1C8E7, 0x1981, 0x4676, 0xAE, 0x14, 0xFD, 0xD7, 0x8F, 0x05, 0xA6, 0xE7, 100);\r
-\r
-// Name: System.Message.SenderName -- PKEY_Message_SenderName\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 0DA41CFA-D224-4A18-AE2F-596158DB4B3A, 100\r
-DEFINE_PROPERTYKEY(PKEY_Message_SenderName, 0x0DA41CFA, 0xD224, 0x4A18, 0xAE, 0x2F, 0x59, 0x61, 0x58, 0xDB, 0x4B, 0x3A, 100);\r
-\r
-// Name: System.Message.Store -- PKEY_Message_Store\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD, 15\r
-//\r
-// The store (aka protocol handler) FILE, MAIL, OUTLOOKEXPRESS\r
-DEFINE_PROPERTYKEY(PKEY_Message_Store, 0xE3E0584C, 0xB788, 0x4A5A, 0xBB, 0x20, 0x7F, 0x5A, 0x44, 0xC9, 0xAC, 0xDD, 15);\r
-\r
-// Name: System.Message.ToAddress -- PKEY_Message_ToAddress\r
-// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR)\r
-// FormatID: E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD, 16\r
-//\r
-// Addresses in To: field\r
-DEFINE_PROPERTYKEY(PKEY_Message_ToAddress, 0xE3E0584C, 0xB788, 0x4A5A, 0xBB, 0x20, 0x7F, 0x5A, 0x44, 0xC9, 0xAC, 0xDD, 16);\r
-\r
-// Name: System.Message.ToDoTitle -- PKEY_Message_ToDoTitle\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: BCCC8A3C-8CEF-42E5-9B1C-C69079398BC7, 100\r
-DEFINE_PROPERTYKEY(PKEY_Message_ToDoTitle, 0xBCCC8A3C, 0x8CEF, 0x42E5, 0x9B, 0x1C, 0xC6, 0x90, 0x79, 0x39, 0x8B, 0xC7, 100);\r
-\r
-// Name: System.Message.ToName -- PKEY_Message_ToName\r
-// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR)\r
-// FormatID: E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD, 17\r
-//\r
-// Person names in To: field\r
-DEFINE_PROPERTYKEY(PKEY_Message_ToName, 0xE3E0584C, 0xB788, 0x4A5A, 0xBB, 0x20, 0x7F, 0x5A, 0x44, 0xC9, 0xAC, 0xDD, 17);\r
- \r
-//-----------------------------------------------------------------------------\r
-// Music properties\r
-\r
-// Name: System.Music.AlbumArtist -- PKEY_Music_AlbumArtist\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: (FMTID_MUSIC) 56A3372E-CE9C-11D2-9F0E-006097C686F6, 13 (PIDSI_MUSIC_ALBUM_ARTIST)\r
-//\r
-// \r
-DEFINE_PROPERTYKEY(PKEY_Music_AlbumArtist, 0x56A3372E, 0xCE9C, 0x11D2, 0x9F, 0x0E, 0x00, 0x60, 0x97, 0xC6, 0x86, 0xF6, 13);\r
-\r
-// Name: System.Music.AlbumTitle -- PKEY_Music_AlbumTitle\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: (FMTID_MUSIC) 56A3372E-CE9C-11D2-9F0E-006097C686F6, 4 (PIDSI_MUSIC_ALBUM)\r
-//\r
-// \r
-DEFINE_PROPERTYKEY(PKEY_Music_AlbumTitle, 0x56A3372E, 0xCE9C, 0x11D2, 0x9F, 0x0E, 0x00, 0x60, 0x97, 0xC6, 0x86, 0xF6, 4);\r
-\r
-// Name: System.Music.Artist -- PKEY_Music_Artist\r
-// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR)\r
-// FormatID: (FMTID_MUSIC) 56A3372E-CE9C-11D2-9F0E-006097C686F6, 2 (PIDSI_MUSIC_ARTIST)\r
-//\r
-// \r
-DEFINE_PROPERTYKEY(PKEY_Music_Artist, 0x56A3372E, 0xCE9C, 0x11D2, 0x9F, 0x0E, 0x00, 0x60, 0x97, 0xC6, 0x86, 0xF6, 2);\r
-\r
-// Name: System.Music.BeatsPerMinute -- PKEY_Music_BeatsPerMinute\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: (FMTID_MUSIC) 56A3372E-CE9C-11D2-9F0E-006097C686F6, 35 (PIDSI_MUSIC_BEATS_PER_MINUTE)\r
-//\r
-// \r
-DEFINE_PROPERTYKEY(PKEY_Music_BeatsPerMinute, 0x56A3372E, 0xCE9C, 0x11D2, 0x9F, 0x0E, 0x00, 0x60, 0x97, 0xC6, 0x86, 0xF6, 35);\r
-\r
-// Name: System.Music.Composer -- PKEY_Music_Composer\r
-// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR)\r
-// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 19 (PIDMSI_COMPOSER)\r
-//\r
-// \r
-DEFINE_PROPERTYKEY(PKEY_Music_Composer, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 19);\r
-\r
-// Name: System.Music.Conductor -- PKEY_Music_Conductor\r
-// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR)\r
-// FormatID: (FMTID_MUSIC) 56A3372E-CE9C-11D2-9F0E-006097C686F6, 36 (PIDSI_MUSIC_CONDUCTOR)\r
-//\r
-// \r
-DEFINE_PROPERTYKEY(PKEY_Music_Conductor, 0x56A3372E, 0xCE9C, 0x11D2, 0x9F, 0x0E, 0x00, 0x60, 0x97, 0xC6, 0x86, 0xF6, 36);\r
-\r
-// Name: System.Music.ContentGroupDescription -- PKEY_Music_ContentGroupDescription\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: (FMTID_MUSIC) 56A3372E-CE9C-11D2-9F0E-006097C686F6, 33 (PIDSI_MUSIC_CONTENT_GROUP_DESCRIPTION)\r
-//\r
-// \r
-DEFINE_PROPERTYKEY(PKEY_Music_ContentGroupDescription, 0x56A3372E, 0xCE9C, 0x11D2, 0x9F, 0x0E, 0x00, 0x60, 0x97, 0xC6, 0x86, 0xF6, 33);\r
-\r
-// Name: System.Music.Genre -- PKEY_Music_Genre\r
-// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR)\r
-// FormatID: (FMTID_MUSIC) 56A3372E-CE9C-11D2-9F0E-006097C686F6, 11 (PIDSI_MUSIC_GENRE)\r
-//\r
-// \r
-DEFINE_PROPERTYKEY(PKEY_Music_Genre, 0x56A3372E, 0xCE9C, 0x11D2, 0x9F, 0x0E, 0x00, 0x60, 0x97, 0xC6, 0x86, 0xF6, 11);\r
-\r
-// Name: System.Music.InitialKey -- PKEY_Music_InitialKey\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: (FMTID_MUSIC) 56A3372E-CE9C-11D2-9F0E-006097C686F6, 34 (PIDSI_MUSIC_INITIAL_KEY)\r
-//\r
-// \r
-DEFINE_PROPERTYKEY(PKEY_Music_InitialKey, 0x56A3372E, 0xCE9C, 0x11D2, 0x9F, 0x0E, 0x00, 0x60, 0x97, 0xC6, 0x86, 0xF6, 34);\r
-\r
-// Name: System.Music.Lyrics -- PKEY_Music_Lyrics\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: (FMTID_MUSIC) 56A3372E-CE9C-11D2-9F0E-006097C686F6, 12 (PIDSI_MUSIC_LYRICS)\r
-//\r
-// \r
-DEFINE_PROPERTYKEY(PKEY_Music_Lyrics, 0x56A3372E, 0xCE9C, 0x11D2, 0x9F, 0x0E, 0x00, 0x60, 0x97, 0xC6, 0x86, 0xF6, 12);\r
-\r
-// Name: System.Music.Mood -- PKEY_Music_Mood\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: (FMTID_MUSIC) 56A3372E-CE9C-11D2-9F0E-006097C686F6, 39 (PIDSI_MUSIC_MOOD)\r
-//\r
-// \r
-DEFINE_PROPERTYKEY(PKEY_Music_Mood, 0x56A3372E, 0xCE9C, 0x11D2, 0x9F, 0x0E, 0x00, 0x60, 0x97, 0xC6, 0x86, 0xF6, 39);\r
-\r
-// Name: System.Music.PartOfSet -- PKEY_Music_PartOfSet\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: (FMTID_MUSIC) 56A3372E-CE9C-11D2-9F0E-006097C686F6, 37 (PIDSI_MUSIC_PART_OF_SET)\r
-//\r
-// \r
-DEFINE_PROPERTYKEY(PKEY_Music_PartOfSet, 0x56A3372E, 0xCE9C, 0x11D2, 0x9F, 0x0E, 0x00, 0x60, 0x97, 0xC6, 0x86, 0xF6, 37);\r
-\r
-// Name: System.Music.Period -- PKEY_Music_Period\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 31 (PIDMSI_PERIOD)\r
-//\r
-// \r
-DEFINE_PROPERTYKEY(PKEY_Music_Period, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 31);\r
-\r
-// Name: System.Music.SynchronizedLyrics -- PKEY_Music_SynchronizedLyrics\r
-// Type: Blob -- VT_BLOB\r
-// FormatID: 6B223B6A-162E-4AA9-B39F-05D678FC6D77, 100\r
-DEFINE_PROPERTYKEY(PKEY_Music_SynchronizedLyrics, 0x6B223B6A, 0x162E, 0x4AA9, 0xB3, 0x9F, 0x05, 0xD6, 0x78, 0xFC, 0x6D, 0x77, 100);\r
-\r
-// Name: System.Music.TrackNumber -- PKEY_Music_TrackNumber\r
-// Type: UInt32 -- VT_UI4\r
-// FormatID: (FMTID_MUSIC) 56A3372E-CE9C-11D2-9F0E-006097C686F6, 7 (PIDSI_MUSIC_TRACK)\r
-//\r
-// \r
-DEFINE_PROPERTYKEY(PKEY_Music_TrackNumber, 0x56A3372E, 0xCE9C, 0x11D2, 0x9F, 0x0E, 0x00, 0x60, 0x97, 0xC6, 0x86, 0xF6, 7);\r
-\r
- \r
- \r
-//-----------------------------------------------------------------------------\r
-// Note properties\r
-\r
-// Name: System.Note.Color -- PKEY_Note_Color\r
-// Type: UInt16 -- VT_UI2\r
-// FormatID: 4776CAFA-BCE4-4CB1-A23E-265E76D8EB11, 100\r
-DEFINE_PROPERTYKEY(PKEY_Note_Color, 0x4776CAFA, 0xBCE4, 0x4CB1, 0xA2, 0x3E, 0x26, 0x5E, 0x76, 0xD8, 0xEB, 0x11, 100);\r
-\r
-// Possible discrete values for PKEY_Note_Color are:\r
-#define NOTE_COLOR_BLUE 0u\r
-#define NOTE_COLOR_GREEN 1u\r
-#define NOTE_COLOR_PINK 2u\r
-#define NOTE_COLOR_YELLOW 3u\r
-#define NOTE_COLOR_WHITE 4u\r
-#define NOTE_COLOR_LIGHTGREEN 5u\r
-\r
-// Name: System.Note.ColorText -- PKEY_Note_ColorText\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 46B4E8DE-CDB2-440D-885C-1658EB65B914, 100\r
-// \r
-// This is the user-friendly form of System.Note.Color. Not intended to be parsed \r
-// programmatically.\r
-DEFINE_PROPERTYKEY(PKEY_Note_ColorText, 0x46B4E8DE, 0xCDB2, 0x440D, 0x88, 0x5C, 0x16, 0x58, 0xEB, 0x65, 0xB9, 0x14, 100);\r
- \r
-//-----------------------------------------------------------------------------\r
-// Photo properties\r
-\r
-\r
-\r
-// Name: System.Photo.Aperture -- PKEY_Photo_Aperture\r
-// Type: Double -- VT_R8\r
-// FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 37378\r
-//\r
-// PropertyTagExifAperture. Calculated from PKEY_Photo_ApertureNumerator and PKEY_Photo_ApertureDenominator\r
-DEFINE_PROPERTYKEY(PKEY_Photo_Aperture, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 37378);\r
-\r
-// Name: System.Photo.ApertureDenominator -- PKEY_Photo_ApertureDenominator\r
-// Type: UInt32 -- VT_UI4\r
-// FormatID: E1A9A38B-6685-46BD-875E-570DC7AD7320, 100\r
-//\r
-// Denominator of PKEY_Photo_Aperture\r
-DEFINE_PROPERTYKEY(PKEY_Photo_ApertureDenominator, 0xE1A9A38B, 0x6685, 0x46BD, 0x87, 0x5E, 0x57, 0x0D, 0xC7, 0xAD, 0x73, 0x20, 100);\r
-\r
-// Name: System.Photo.ApertureNumerator -- PKEY_Photo_ApertureNumerator\r
-// Type: UInt32 -- VT_UI4\r
-// FormatID: 0337ECEC-39FB-4581-A0BD-4C4CC51E9914, 100\r
-//\r
-// Numerator of PKEY_Photo_Aperture\r
-DEFINE_PROPERTYKEY(PKEY_Photo_ApertureNumerator, 0x0337ECEC, 0x39FB, 0x4581, 0xA0, 0xBD, 0x4C, 0x4C, 0xC5, 0x1E, 0x99, 0x14, 100);\r
-\r
-// Name: System.Photo.Brightness -- PKEY_Photo_Brightness\r
-// Type: Double -- VT_R8\r
-// FormatID: 1A701BF6-478C-4361-83AB-3701BB053C58, 100 (PropertyTagExifBrightness)\r
-// \r
-// This is the brightness of the photo.\r
-// \r
-// Calculated from PKEY_Photo_BrightnessNumerator and PKEY_Photo_BrightnessDenominator.\r
-// \r
-// The units are "APEX", normally in the range of -99.99 to 99.99. If the numerator of \r
-// the recorded value is FFFFFFFF.H, "Unknown" should be indicated.\r
-DEFINE_PROPERTYKEY(PKEY_Photo_Brightness, 0x1A701BF6, 0x478C, 0x4361, 0x83, 0xAB, 0x37, 0x01, 0xBB, 0x05, 0x3C, 0x58, 100);\r
-\r
-// Name: System.Photo.BrightnessDenominator -- PKEY_Photo_BrightnessDenominator\r
-// Type: UInt32 -- VT_UI4\r
-// FormatID: 6EBE6946-2321-440A-90F0-C043EFD32476, 100\r
-//\r
-// Denominator of PKEY_Photo_Brightness\r
-DEFINE_PROPERTYKEY(PKEY_Photo_BrightnessDenominator, 0x6EBE6946, 0x2321, 0x440A, 0x90, 0xF0, 0xC0, 0x43, 0xEF, 0xD3, 0x24, 0x76, 100);\r
-\r
-// Name: System.Photo.BrightnessNumerator -- PKEY_Photo_BrightnessNumerator\r
-// Type: UInt32 -- VT_UI4\r
-// FormatID: 9E7D118F-B314-45A0-8CFB-D654B917C9E9, 100\r
-//\r
-// Numerator of PKEY_Photo_Brightness\r
-DEFINE_PROPERTYKEY(PKEY_Photo_BrightnessNumerator, 0x9E7D118F, 0xB314, 0x45A0, 0x8C, 0xFB, 0xD6, 0x54, 0xB9, 0x17, 0xC9, 0xE9, 100);\r
-\r
-// Name: System.Photo.CameraManufacturer -- PKEY_Photo_CameraManufacturer\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 271 (PropertyTagEquipMake)\r
-//\r
-// \r
-DEFINE_PROPERTYKEY(PKEY_Photo_CameraManufacturer, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 271);\r
-\r
-// Name: System.Photo.CameraModel -- PKEY_Photo_CameraModel\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 272 (PropertyTagEquipModel)\r
-//\r
-// \r
-DEFINE_PROPERTYKEY(PKEY_Photo_CameraModel, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 272);\r
-\r
-// Name: System.Photo.CameraSerialNumber -- PKEY_Photo_CameraSerialNumber\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 273\r
-//\r
-// Serial number of camera that produced this photo\r
-DEFINE_PROPERTYKEY(PKEY_Photo_CameraSerialNumber, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 273);\r
-\r
-// Name: System.Photo.Contrast -- PKEY_Photo_Contrast\r
-// Type: UInt32 -- VT_UI4\r
-// FormatID: 2A785BA9-8D23-4DED-82E6-60A350C86A10, 100\r
-// \r
-// This indicates the direction of contrast processing applied by the camera \r
-// when the image was shot.\r
-DEFINE_PROPERTYKEY(PKEY_Photo_Contrast, 0x2A785BA9, 0x8D23, 0x4DED, 0x82, 0xE6, 0x60, 0xA3, 0x50, 0xC8, 0x6A, 0x10, 100);\r
-\r
-// Possible discrete values for PKEY_Photo_Contrast are:\r
-#define PHOTO_CONTRAST_NORMAL 0ul\r
-#define PHOTO_CONTRAST_SOFT 1ul\r
-#define PHOTO_CONTRAST_HARD 2ul\r
-\r
-// Name: System.Photo.ContrastText -- PKEY_Photo_ContrastText\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 59DDE9F2-5253-40EA-9A8B-479E96C6249A, 100\r
-// \r
-// This is the user-friendly form of System.Photo.Contrast. Not intended to be parsed \r
-// programmatically.\r
-DEFINE_PROPERTYKEY(PKEY_Photo_ContrastText, 0x59DDE9F2, 0x5253, 0x40EA, 0x9A, 0x8B, 0x47, 0x9E, 0x96, 0xC6, 0x24, 0x9A, 100);\r
-\r
-// Name: System.Photo.DateTaken -- PKEY_Photo_DateTaken\r
-// Type: DateTime -- VT_FILETIME (For variants: VT_DATE)\r
-// FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 36867\r
-//\r
-// PropertyTagExifDTOrig\r
-DEFINE_PROPERTYKEY(PKEY_Photo_DateTaken, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 36867);\r
-\r
-// Name: System.Photo.DigitalZoom -- PKEY_Photo_DigitalZoom\r
-// Type: Double -- VT_R8\r
-// FormatID: F85BF840-A925-4BC2-B0C4-8E36B598679E, 100\r
-//\r
-// PropertyTagExifDigitalZoom. Calculated from PKEY_Photo_DigitalZoomNumerator and PKEY_Photo_DigitalZoomDenominator\r
-DEFINE_PROPERTYKEY(PKEY_Photo_DigitalZoom, 0xF85BF840, 0xA925, 0x4BC2, 0xB0, 0xC4, 0x8E, 0x36, 0xB5, 0x98, 0x67, 0x9E, 100);\r
-\r
-// Name: System.Photo.DigitalZoomDenominator -- PKEY_Photo_DigitalZoomDenominator\r
-// Type: UInt32 -- VT_UI4\r
-// FormatID: 745BAF0E-E5C1-4CFB-8A1B-D031A0A52393, 100\r
-//\r
-// Denominator of PKEY_Photo_DigitalZoom\r
-DEFINE_PROPERTYKEY(PKEY_Photo_DigitalZoomDenominator, 0x745BAF0E, 0xE5C1, 0x4CFB, 0x8A, 0x1B, 0xD0, 0x31, 0xA0, 0xA5, 0x23, 0x93, 100);\r
-\r
-// Name: System.Photo.DigitalZoomNumerator -- PKEY_Photo_DigitalZoomNumerator\r
-// Type: UInt32 -- VT_UI4\r
-// FormatID: 16CBB924-6500-473B-A5BE-F1599BCBE413, 100\r
-//\r
-// Numerator of PKEY_Photo_DigitalZoom\r
-DEFINE_PROPERTYKEY(PKEY_Photo_DigitalZoomNumerator, 0x16CBB924, 0x6500, 0x473B, 0xA5, 0xBE, 0xF1, 0x59, 0x9B, 0xCB, 0xE4, 0x13, 100);\r
-\r
-// Name: System.Photo.Event -- PKEY_Photo_Event\r
-// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR)\r
-// FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 18248\r
-//\r
-// The event at which the photo was taken\r
-DEFINE_PROPERTYKEY(PKEY_Photo_Event, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 18248);\r
-\r
-// Name: System.Photo.EXIFVersion -- PKEY_Photo_EXIFVersion\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: D35F743A-EB2E-47F2-A286-844132CB1427, 100\r
-//\r
-// The EXIF version.\r
-DEFINE_PROPERTYKEY(PKEY_Photo_EXIFVersion, 0xD35F743A, 0xEB2E, 0x47F2, 0xA2, 0x86, 0x84, 0x41, 0x32, 0xCB, 0x14, 0x27, 100);\r
-\r
-// Name: System.Photo.ExposureBias -- PKEY_Photo_ExposureBias\r
-// Type: Double -- VT_R8\r
-// FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 37380\r
-//\r
-// PropertyTagExifExposureBias. Calculated from PKEY_Photo_ExposureBiasNumerator and PKEY_Photo_ExposureBiasDenominator\r
-DEFINE_PROPERTYKEY(PKEY_Photo_ExposureBias, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 37380);\r
-\r
-// Name: System.Photo.ExposureBiasDenominator -- PKEY_Photo_ExposureBiasDenominator\r
-// Type: Int32 -- VT_I4\r
-// FormatID: AB205E50-04B7-461C-A18C-2F233836E627, 100\r
-//\r
-// Denominator of PKEY_Photo_ExposureBias\r
-DEFINE_PROPERTYKEY(PKEY_Photo_ExposureBiasDenominator, 0xAB205E50, 0x04B7, 0x461C, 0xA1, 0x8C, 0x2F, 0x23, 0x38, 0x36, 0xE6, 0x27, 100);\r
-\r
-// Name: System.Photo.ExposureBiasNumerator -- PKEY_Photo_ExposureBiasNumerator\r
-// Type: Int32 -- VT_I4\r
-// FormatID: 738BF284-1D87-420B-92CF-5834BF6EF9ED, 100\r
-//\r
-// Numerator of PKEY_Photo_ExposureBias\r
-DEFINE_PROPERTYKEY(PKEY_Photo_ExposureBiasNumerator, 0x738BF284, 0x1D87, 0x420B, 0x92, 0xCF, 0x58, 0x34, 0xBF, 0x6E, 0xF9, 0xED, 100);\r
-\r
-// Name: System.Photo.ExposureIndex -- PKEY_Photo_ExposureIndex\r
-// Type: Double -- VT_R8\r
-// FormatID: 967B5AF8-995A-46ED-9E11-35B3C5B9782D, 100\r
-//\r
-// PropertyTagExifExposureIndex. Calculated from PKEY_Photo_ExposureIndexNumerator and PKEY_Photo_ExposureIndexDenominator\r
-DEFINE_PROPERTYKEY(PKEY_Photo_ExposureIndex, 0x967B5AF8, 0x995A, 0x46ED, 0x9E, 0x11, 0x35, 0xB3, 0xC5, 0xB9, 0x78, 0x2D, 100);\r
-\r
-// Name: System.Photo.ExposureIndexDenominator -- PKEY_Photo_ExposureIndexDenominator\r
-// Type: UInt32 -- VT_UI4\r
-// FormatID: 93112F89-C28B-492F-8A9D-4BE2062CEE8A, 100\r
-//\r
-// Denominator of PKEY_Photo_ExposureIndex\r
-DEFINE_PROPERTYKEY(PKEY_Photo_ExposureIndexDenominator, 0x93112F89, 0xC28B, 0x492F, 0x8A, 0x9D, 0x4B, 0xE2, 0x06, 0x2C, 0xEE, 0x8A, 100);\r
-\r
-// Name: System.Photo.ExposureIndexNumerator -- PKEY_Photo_ExposureIndexNumerator\r
-// Type: UInt32 -- VT_UI4\r
-// FormatID: CDEDCF30-8919-44DF-8F4C-4EB2FFDB8D89, 100\r
-//\r
-// Numerator of PKEY_Photo_ExposureIndex\r
-DEFINE_PROPERTYKEY(PKEY_Photo_ExposureIndexNumerator, 0xCDEDCF30, 0x8919, 0x44DF, 0x8F, 0x4C, 0x4E, 0xB2, 0xFF, 0xDB, 0x8D, 0x89, 100);\r
-\r
-// Name: System.Photo.ExposureProgram -- PKEY_Photo_ExposureProgram\r
-// Type: UInt32 -- VT_UI4\r
-// FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 34850 (PropertyTagExifExposureProg)\r
-//\r
-// \r
-DEFINE_PROPERTYKEY(PKEY_Photo_ExposureProgram, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 34850);\r
-\r
-// Possible discrete values for PKEY_Photo_ExposureProgram are:\r
-#define PHOTO_EXPOSUREPROGRAM_UNKNOWN 0ul\r
-#define PHOTO_EXPOSUREPROGRAM_MANUAL 1ul\r
-#define PHOTO_EXPOSUREPROGRAM_NORMAL 2ul\r
-#define PHOTO_EXPOSUREPROGRAM_APERTURE 3ul\r
-#define PHOTO_EXPOSUREPROGRAM_SHUTTER 4ul\r
-#define PHOTO_EXPOSUREPROGRAM_CREATIVE 5ul\r
-#define PHOTO_EXPOSUREPROGRAM_ACTION 6ul\r
-#define PHOTO_EXPOSUREPROGRAM_PORTRAIT 7ul\r
-#define PHOTO_EXPOSUREPROGRAM_LANDSCAPE 8ul\r
-\r
-// Name: System.Photo.ExposureProgramText -- PKEY_Photo_ExposureProgramText\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: FEC690B7-5F30-4646-AE47-4CAAFBA884A3, 100\r
-// \r
-// This is the user-friendly form of System.Photo.ExposureProgram. Not intended to be parsed \r
-// programmatically.\r
-DEFINE_PROPERTYKEY(PKEY_Photo_ExposureProgramText, 0xFEC690B7, 0x5F30, 0x4646, 0xAE, 0x47, 0x4C, 0xAA, 0xFB, 0xA8, 0x84, 0xA3, 100);\r
-\r
-// Name: System.Photo.ExposureTime -- PKEY_Photo_ExposureTime\r
-// Type: Double -- VT_R8\r
-// FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 33434\r
-//\r
-// PropertyTagExifExposureTime. Calculated from PKEY_Photo_ExposureTimeNumerator and PKEY_Photo_ExposureTimeDenominator\r
-DEFINE_PROPERTYKEY(PKEY_Photo_ExposureTime, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 33434);\r
-\r
-// Name: System.Photo.ExposureTimeDenominator -- PKEY_Photo_ExposureTimeDenominator\r
-// Type: UInt32 -- VT_UI4\r
-// FormatID: 55E98597-AD16-42E0-B624-21599A199838, 100\r
-//\r
-// Denominator of PKEY_Photo_ExposureTime\r
-DEFINE_PROPERTYKEY(PKEY_Photo_ExposureTimeDenominator, 0x55E98597, 0xAD16, 0x42E0, 0xB6, 0x24, 0x21, 0x59, 0x9A, 0x19, 0x98, 0x38, 100);\r
-\r
-// Name: System.Photo.ExposureTimeNumerator -- PKEY_Photo_ExposureTimeNumerator\r
-// Type: UInt32 -- VT_UI4\r
-// FormatID: 257E44E2-9031-4323-AC38-85C552871B2E, 100\r
-//\r
-// Numerator of PKEY_Photo_ExposureTime\r
-DEFINE_PROPERTYKEY(PKEY_Photo_ExposureTimeNumerator, 0x257E44E2, 0x9031, 0x4323, 0xAC, 0x38, 0x85, 0xC5, 0x52, 0x87, 0x1B, 0x2E, 100);\r
-\r
-// Name: System.Photo.Flash -- PKEY_Photo_Flash\r
-// Type: Byte -- VT_UI1\r
-// FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 37385\r
-//\r
-// PropertyTagExifFlash\r
-DEFINE_PROPERTYKEY(PKEY_Photo_Flash, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 37385);\r
-\r
-// Possible discrete values for PKEY_Photo_Flash are:\r
-#define PHOTO_FLASH_NONE 0\r
-#define PHOTO_FLASH_FLASH 1\r
-#define PHOTO_FLASH_WITHOUTSTROBE 5\r
-#define PHOTO_FLASH_WITHSTROBE 7\r
-\r
-// Name: System.Photo.FlashEnergy -- PKEY_Photo_FlashEnergy\r
-// Type: Double -- VT_R8\r
-// FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 41483\r
-//\r
-// PropertyTagExifFlashEnergy. Calculated from PKEY_Photo_FlashEnergyNumerator and PKEY_Photo_FlashEnergyDenominator\r
-DEFINE_PROPERTYKEY(PKEY_Photo_FlashEnergy, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 41483);\r
-\r
-// Name: System.Photo.FlashEnergyDenominator -- PKEY_Photo_FlashEnergyDenominator\r
-// Type: UInt32 -- VT_UI4\r
-// FormatID: D7B61C70-6323-49CD-A5FC-C84277162C97, 100\r
-//\r
-// Denominator of PKEY_Photo_FlashEnergy\r
-DEFINE_PROPERTYKEY(PKEY_Photo_FlashEnergyDenominator, 0xD7B61C70, 0x6323, 0x49CD, 0xA5, 0xFC, 0xC8, 0x42, 0x77, 0x16, 0x2C, 0x97, 100);\r
-\r
-// Name: System.Photo.FlashEnergyNumerator -- PKEY_Photo_FlashEnergyNumerator\r
-// Type: UInt32 -- VT_UI4\r
-// FormatID: FCAD3D3D-0858-400F-AAA3-2F66CCE2A6BC, 100\r
-//\r
-// Numerator of PKEY_Photo_FlashEnergy\r
-DEFINE_PROPERTYKEY(PKEY_Photo_FlashEnergyNumerator, 0xFCAD3D3D, 0x0858, 0x400F, 0xAA, 0xA3, 0x2F, 0x66, 0xCC, 0xE2, 0xA6, 0xBC, 100);\r
-\r
-// Name: System.Photo.FlashManufacturer -- PKEY_Photo_FlashManufacturer\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: AABAF6C9-E0C5-4719-8585-57B103E584FE, 100\r
-DEFINE_PROPERTYKEY(PKEY_Photo_FlashManufacturer, 0xAABAF6C9, 0xE0C5, 0x4719, 0x85, 0x85, 0x57, 0xB1, 0x03, 0xE5, 0x84, 0xFE, 100);\r
-\r
-// Name: System.Photo.FlashModel -- PKEY_Photo_FlashModel\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: FE83BB35-4D1A-42E2-916B-06F3E1AF719E, 100\r
-DEFINE_PROPERTYKEY(PKEY_Photo_FlashModel, 0xFE83BB35, 0x4D1A, 0x42E2, 0x91, 0x6B, 0x06, 0xF3, 0xE1, 0xAF, 0x71, 0x9E, 100);\r
-\r
-// Name: System.Photo.FlashText -- PKEY_Photo_FlashText\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 6B8B68F6-200B-47EA-8D25-D8050F57339F, 100\r
-// \r
-// This is the user-friendly form of System.Photo.Flash. Not intended to be parsed \r
-// programmatically.\r
-DEFINE_PROPERTYKEY(PKEY_Photo_FlashText, 0x6B8B68F6, 0x200B, 0x47EA, 0x8D, 0x25, 0xD8, 0x05, 0x0F, 0x57, 0x33, 0x9F, 100);\r
-\r
-// Name: System.Photo.FNumber -- PKEY_Photo_FNumber\r
-// Type: Double -- VT_R8\r
-// FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 33437\r
-//\r
-// PropertyTagExifFNumber. Calculated from PKEY_Photo_FNumberNumerator and PKEY_Photo_FNumberDenominator\r
-DEFINE_PROPERTYKEY(PKEY_Photo_FNumber, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 33437);\r
-\r
-// Name: System.Photo.FNumberDenominator -- PKEY_Photo_FNumberDenominator\r
-// Type: UInt32 -- VT_UI4\r
-// FormatID: E92A2496-223B-4463-A4E3-30EABBA79D80, 100\r
-//\r
-// Denominator of PKEY_Photo_FNumber\r
-DEFINE_PROPERTYKEY(PKEY_Photo_FNumberDenominator, 0xE92A2496, 0x223B, 0x4463, 0xA4, 0xE3, 0x30, 0xEA, 0xBB, 0xA7, 0x9D, 0x80, 100);\r
-\r
-// Name: System.Photo.FNumberNumerator -- PKEY_Photo_FNumberNumerator\r
-// Type: UInt32 -- VT_UI4\r
-// FormatID: 1B97738A-FDFC-462F-9D93-1957E08BE90C, 100\r
-//\r
-// Numerator of PKEY_Photo_FNumber\r
-DEFINE_PROPERTYKEY(PKEY_Photo_FNumberNumerator, 0x1B97738A, 0xFDFC, 0x462F, 0x9D, 0x93, 0x19, 0x57, 0xE0, 0x8B, 0xE9, 0x0C, 100);\r
-\r
-// Name: System.Photo.FocalLength -- PKEY_Photo_FocalLength\r
-// Type: Double -- VT_R8\r
-// FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 37386\r
-//\r
-// PropertyTagExifFocalLength. Calculated from PKEY_Photo_FocalLengthNumerator and PKEY_Photo_FocalLengthDenominator\r
-DEFINE_PROPERTYKEY(PKEY_Photo_FocalLength, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 37386);\r
-\r
-// Name: System.Photo.FocalLengthDenominator -- PKEY_Photo_FocalLengthDenominator\r
-// Type: UInt32 -- VT_UI4\r
-// FormatID: 305BC615-DCA1-44A5-9FD4-10C0BA79412E, 100\r
-//\r
-// Denominator of PKEY_Photo_FocalLength\r
-DEFINE_PROPERTYKEY(PKEY_Photo_FocalLengthDenominator, 0x305BC615, 0xDCA1, 0x44A5, 0x9F, 0xD4, 0x10, 0xC0, 0xBA, 0x79, 0x41, 0x2E, 100);\r
-\r
-// Name: System.Photo.FocalLengthInFilm -- PKEY_Photo_FocalLengthInFilm\r
-// Type: UInt16 -- VT_UI2\r
-// FormatID: A0E74609-B84D-4F49-B860-462BD9971F98, 100\r
-DEFINE_PROPERTYKEY(PKEY_Photo_FocalLengthInFilm, 0xA0E74609, 0xB84D, 0x4F49, 0xB8, 0x60, 0x46, 0x2B, 0xD9, 0x97, 0x1F, 0x98, 100);\r
-\r
-// Name: System.Photo.FocalLengthNumerator -- PKEY_Photo_FocalLengthNumerator\r
-// Type: UInt32 -- VT_UI4\r
-// FormatID: 776B6B3B-1E3D-4B0C-9A0E-8FBAF2A8492A, 100\r
-//\r
-// Numerator of PKEY_Photo_FocalLength\r
-DEFINE_PROPERTYKEY(PKEY_Photo_FocalLengthNumerator, 0x776B6B3B, 0x1E3D, 0x4B0C, 0x9A, 0x0E, 0x8F, 0xBA, 0xF2, 0xA8, 0x49, 0x2A, 100);\r
-\r
-// Name: System.Photo.FocalPlaneXResolution -- PKEY_Photo_FocalPlaneXResolution\r
-// Type: Double -- VT_R8\r
-// FormatID: CFC08D97-C6F7-4484-89DD-EBEF4356FE76, 100\r
-// \r
-// PropertyTagExifFocalXRes. Calculated from PKEY_Photo_FocalPlaneXResolutionNumerator and \r
-// PKEY_Photo_FocalPlaneXResolutionDenominator.\r
-DEFINE_PROPERTYKEY(PKEY_Photo_FocalPlaneXResolution, 0xCFC08D97, 0xC6F7, 0x4484, 0x89, 0xDD, 0xEB, 0xEF, 0x43, 0x56, 0xFE, 0x76, 100);\r
-\r
-// Name: System.Photo.FocalPlaneXResolutionDenominator -- PKEY_Photo_FocalPlaneXResolutionDenominator\r
-// Type: UInt32 -- VT_UI4\r
-// FormatID: 0933F3F5-4786-4F46-A8E8-D64DD37FA521, 100\r
-//\r
-// Denominator of PKEY_Photo_FocalPlaneXResolution\r
-DEFINE_PROPERTYKEY(PKEY_Photo_FocalPlaneXResolutionDenominator, 0x0933F3F5, 0x4786, 0x4F46, 0xA8, 0xE8, 0xD6, 0x4D, 0xD3, 0x7F, 0xA5, 0x21, 100);\r
-\r
-// Name: System.Photo.FocalPlaneXResolutionNumerator -- PKEY_Photo_FocalPlaneXResolutionNumerator\r
-// Type: UInt32 -- VT_UI4\r
-// FormatID: DCCB10AF-B4E2-4B88-95F9-031B4D5AB490, 100\r
-//\r
-// Numerator of PKEY_Photo_FocalPlaneXResolution\r
-DEFINE_PROPERTYKEY(PKEY_Photo_FocalPlaneXResolutionNumerator, 0xDCCB10AF, 0xB4E2, 0x4B88, 0x95, 0xF9, 0x03, 0x1B, 0x4D, 0x5A, 0xB4, 0x90, 100);\r
-\r
-// Name: System.Photo.FocalPlaneYResolution -- PKEY_Photo_FocalPlaneYResolution\r
-// Type: Double -- VT_R8\r
-// FormatID: 4FFFE4D0-914F-4AC4-8D6F-C9C61DE169B1, 100\r
-// \r
-// PropertyTagExifFocalYRes. Calculated from PKEY_Photo_FocalPlaneYResolutionNumerator and \r
-// PKEY_Photo_FocalPlaneYResolutionDenominator.\r
-DEFINE_PROPERTYKEY(PKEY_Photo_FocalPlaneYResolution, 0x4FFFE4D0, 0x914F, 0x4AC4, 0x8D, 0x6F, 0xC9, 0xC6, 0x1D, 0xE1, 0x69, 0xB1, 100);\r
-\r
-// Name: System.Photo.FocalPlaneYResolutionDenominator -- PKEY_Photo_FocalPlaneYResolutionDenominator\r
-// Type: UInt32 -- VT_UI4\r
-// FormatID: 1D6179A6-A876-4031-B013-3347B2B64DC8, 100\r
-//\r
-// Denominator of PKEY_Photo_FocalPlaneYResolution\r
-DEFINE_PROPERTYKEY(PKEY_Photo_FocalPlaneYResolutionDenominator, 0x1D6179A6, 0xA876, 0x4031, 0xB0, 0x13, 0x33, 0x47, 0xB2, 0xB6, 0x4D, 0xC8, 100);\r
-\r
-// Name: System.Photo.FocalPlaneYResolutionNumerator -- PKEY_Photo_FocalPlaneYResolutionNumerator\r
-// Type: UInt32 -- VT_UI4\r
-// FormatID: A2E541C5-4440-4BA8-867E-75CFC06828CD, 100\r
-//\r
-// Numerator of PKEY_Photo_FocalPlaneYResolution\r
-DEFINE_PROPERTYKEY(PKEY_Photo_FocalPlaneYResolutionNumerator, 0xA2E541C5, 0x4440, 0x4BA8, 0x86, 0x7E, 0x75, 0xCF, 0xC0, 0x68, 0x28, 0xCD, 100);\r
-\r
-// Name: System.Photo.GainControl -- PKEY_Photo_GainControl\r
-// Type: Double -- VT_R8\r
-// FormatID: FA304789-00C7-4D80-904A-1E4DCC7265AA, 100 (PropertyTagExifGainControl)\r
-// \r
-// This indicates the degree of overall image gain adjustment.\r
-// \r
-// Calculated from PKEY_Photo_GainControlNumerator and PKEY_Photo_GainControlDenominator.\r
-DEFINE_PROPERTYKEY(PKEY_Photo_GainControl, 0xFA304789, 0x00C7, 0x4D80, 0x90, 0x4A, 0x1E, 0x4D, 0xCC, 0x72, 0x65, 0xAA, 100);\r
-\r
-// Possible discrete values for PKEY_Photo_GainControl are:\r
-#define PHOTO_GAINCONTROL_NONE 0.0\r
-#define PHOTO_GAINCONTROL_LOWGAINUP 1.0\r
-#define PHOTO_GAINCONTROL_HIGHGAINUP 2.0\r
-#define PHOTO_GAINCONTROL_LOWGAINDOWN 3.0\r
-#define PHOTO_GAINCONTROL_HIGHGAINDOWN 4.0\r
-\r
-// Name: System.Photo.GainControlDenominator -- PKEY_Photo_GainControlDenominator\r
-// Type: UInt32 -- VT_UI4\r
-// FormatID: 42864DFD-9DA4-4F77-BDED-4AAD7B256735, 100\r
-//\r
-// Denominator of PKEY_Photo_GainControl\r
-DEFINE_PROPERTYKEY(PKEY_Photo_GainControlDenominator, 0x42864DFD, 0x9DA4, 0x4F77, 0xBD, 0xED, 0x4A, 0xAD, 0x7B, 0x25, 0x67, 0x35, 100);\r
-\r
-// Name: System.Photo.GainControlNumerator -- PKEY_Photo_GainControlNumerator\r
-// Type: UInt32 -- VT_UI4\r
-// FormatID: 8E8ECF7C-B7B8-4EB8-A63F-0EE715C96F9E, 100\r
-//\r
-// Numerator of PKEY_Photo_GainControl\r
-DEFINE_PROPERTYKEY(PKEY_Photo_GainControlNumerator, 0x8E8ECF7C, 0xB7B8, 0x4EB8, 0xA6, 0x3F, 0x0E, 0xE7, 0x15, 0xC9, 0x6F, 0x9E, 100);\r
-\r
-// Name: System.Photo.GainControlText -- PKEY_Photo_GainControlText\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: C06238B2-0BF9-4279-A723-25856715CB9D, 100\r
-// \r
-// This is the user-friendly form of System.Photo.GainControl. Not intended to be parsed \r
-// programmatically.\r
-DEFINE_PROPERTYKEY(PKEY_Photo_GainControlText, 0xC06238B2, 0x0BF9, 0x4279, 0xA7, 0x23, 0x25, 0x85, 0x67, 0x15, 0xCB, 0x9D, 100);\r
-\r
-// Name: System.Photo.ISOSpeed -- PKEY_Photo_ISOSpeed\r
-// Type: UInt16 -- VT_UI2\r
-// FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 34855\r
-//\r
-// PropertyTagExifISOSpeed\r
-DEFINE_PROPERTYKEY(PKEY_Photo_ISOSpeed, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 34855);\r
-\r
-// Name: System.Photo.LensManufacturer -- PKEY_Photo_LensManufacturer\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: E6DDCAF7-29C5-4F0A-9A68-D19412EC7090, 100\r
-DEFINE_PROPERTYKEY(PKEY_Photo_LensManufacturer, 0xE6DDCAF7, 0x29C5, 0x4F0A, 0x9A, 0x68, 0xD1, 0x94, 0x12, 0xEC, 0x70, 0x90, 100);\r
-\r
-// Name: System.Photo.LensModel -- PKEY_Photo_LensModel\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: E1277516-2B5F-4869-89B1-2E585BD38B7A, 100\r
-DEFINE_PROPERTYKEY(PKEY_Photo_LensModel, 0xE1277516, 0x2B5F, 0x4869, 0x89, 0xB1, 0x2E, 0x58, 0x5B, 0xD3, 0x8B, 0x7A, 100);\r
-\r
-// Name: System.Photo.LightSource -- PKEY_Photo_LightSource\r
-// Type: UInt32 -- VT_UI4\r
-// FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 37384\r
-//\r
-// PropertyTagExifLightSource\r
-DEFINE_PROPERTYKEY(PKEY_Photo_LightSource, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 37384);\r
-\r
-// Possible discrete values for PKEY_Photo_LightSource are:\r
-#define PHOTO_LIGHTSOURCE_UNKNOWN 0ul\r
-#define PHOTO_LIGHTSOURCE_DAYLIGHT 1ul\r
-#define PHOTO_LIGHTSOURCE_FLUORESCENT 2ul\r
-#define PHOTO_LIGHTSOURCE_TUNGSTEN 3ul\r
-#define PHOTO_LIGHTSOURCE_STANDARD_A 17ul\r
-#define PHOTO_LIGHTSOURCE_STANDARD_B 18ul\r
-#define PHOTO_LIGHTSOURCE_STANDARD_C 19ul\r
-#define PHOTO_LIGHTSOURCE_D55 20ul\r
-#define PHOTO_LIGHTSOURCE_D65 21ul\r
-#define PHOTO_LIGHTSOURCE_D75 22ul\r
-\r
-// Name: System.Photo.MakerNote -- PKEY_Photo_MakerNote\r
-// Type: Buffer -- VT_VECTOR | VT_UI1 (For variants: VT_ARRAY | VT_UI1)\r
-// FormatID: FA303353-B659-4052-85E9-BCAC79549B84, 100\r
-DEFINE_PROPERTYKEY(PKEY_Photo_MakerNote, 0xFA303353, 0xB659, 0x4052, 0x85, 0xE9, 0xBC, 0xAC, 0x79, 0x54, 0x9B, 0x84, 100);\r
-\r
-// Name: System.Photo.MakerNoteOffset -- PKEY_Photo_MakerNoteOffset\r
-// Type: UInt64 -- VT_UI8\r
-// FormatID: 813F4124-34E6-4D17-AB3E-6B1F3C2247A1, 100\r
-DEFINE_PROPERTYKEY(PKEY_Photo_MakerNoteOffset, 0x813F4124, 0x34E6, 0x4D17, 0xAB, 0x3E, 0x6B, 0x1F, 0x3C, 0x22, 0x47, 0xA1, 100);\r
-\r
-// Name: System.Photo.MaxAperture -- PKEY_Photo_MaxAperture\r
-// Type: Double -- VT_R8\r
-// FormatID: 08F6D7C2-E3F2-44FC-AF1E-5AA5C81A2D3E, 100\r
-//\r
-// Calculated from PKEY_Photo_MaxApertureNumerator and PKEY_Photo_MaxApertureDenominator\r
-DEFINE_PROPERTYKEY(PKEY_Photo_MaxAperture, 0x08F6D7C2, 0xE3F2, 0x44FC, 0xAF, 0x1E, 0x5A, 0xA5, 0xC8, 0x1A, 0x2D, 0x3E, 100);\r
-\r
-// Name: System.Photo.MaxApertureDenominator -- PKEY_Photo_MaxApertureDenominator\r
-// Type: UInt32 -- VT_UI4\r
-// FormatID: C77724D4-601F-46C5-9B89-C53F93BCEB77, 100\r
-//\r
-// Denominator of PKEY_Photo_MaxAperture\r
-DEFINE_PROPERTYKEY(PKEY_Photo_MaxApertureDenominator, 0xC77724D4, 0x601F, 0x46C5, 0x9B, 0x89, 0xC5, 0x3F, 0x93, 0xBC, 0xEB, 0x77, 100);\r
-\r
-// Name: System.Photo.MaxApertureNumerator -- PKEY_Photo_MaxApertureNumerator\r
-// Type: UInt32 -- VT_UI4\r
-// FormatID: C107E191-A459-44C5-9AE6-B952AD4B906D, 100\r
-//\r
-// Numerator of PKEY_Photo_MaxAperture\r
-DEFINE_PROPERTYKEY(PKEY_Photo_MaxApertureNumerator, 0xC107E191, 0xA459, 0x44C5, 0x9A, 0xE6, 0xB9, 0x52, 0xAD, 0x4B, 0x90, 0x6D, 100);\r
-\r
-// Name: System.Photo.MeteringMode -- PKEY_Photo_MeteringMode\r
-// Type: UInt16 -- VT_UI2\r
-// FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 37383\r
-//\r
-// PropertyTagExifMeteringMode\r
-DEFINE_PROPERTYKEY(PKEY_Photo_MeteringMode, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 37383);\r
-\r
-// Possible discrete values for PKEY_Photo_MeteringMode are:\r
-#define PHOTO_METERINGMODE_UNKNOWN 0u\r
-#define PHOTO_METERINGMODE_AVERAGE 1u\r
-#define PHOTO_METERINGMODE_CENTER 2u\r
-#define PHOTO_METERINGMODE_SPOT 3u\r
-#define PHOTO_METERINGMODE_MULTISPOT 4u\r
-#define PHOTO_METERINGMODE_PATTERN 5u\r
-#define PHOTO_METERINGMODE_PARTIAL 6u\r
-\r
-// Name: System.Photo.MeteringModeText -- PKEY_Photo_MeteringModeText\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: F628FD8C-7BA8-465A-A65B-C5AA79263A9E, 100\r
-// \r
-// This is the user-friendly form of System.Photo.MeteringMode. Not intended to be parsed \r
-// programmatically.\r
-DEFINE_PROPERTYKEY(PKEY_Photo_MeteringModeText, 0xF628FD8C, 0x7BA8, 0x465A, 0xA6, 0x5B, 0xC5, 0xAA, 0x79, 0x26, 0x3A, 0x9E, 100);\r
-\r
-// Name: System.Photo.Orientation -- PKEY_Photo_Orientation\r
-// Type: UInt16 -- VT_UI2\r
-// FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 274 (PropertyTagOrientation)\r
-// \r
-// This is the image orientation viewed in terms of rows and columns.\r
-DEFINE_PROPERTYKEY(PKEY_Photo_Orientation, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 274);\r
-\r
-// Possible discrete values for PKEY_Photo_Orientation are:\r
-#define PHOTO_ORIENTATION_NORMAL 1u\r
-#define PHOTO_ORIENTATION_FLIPHORIZONTAL 2u\r
-#define PHOTO_ORIENTATION_ROTATE180 3u\r
-#define PHOTO_ORIENTATION_FLIPVERTICAL 4u\r
-#define PHOTO_ORIENTATION_TRANSPOSE 5u\r
-#define PHOTO_ORIENTATION_ROTATE270 6u\r
-#define PHOTO_ORIENTATION_TRANSVERSE 7u\r
-#define PHOTO_ORIENTATION_ROTATE90 8u\r
-\r
-// Name: System.Photo.OrientationText -- PKEY_Photo_OrientationText\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: A9EA193C-C511-498A-A06B-58E2776DCC28, 100\r
-// \r
-// This is the user-friendly form of System.Photo.Orientation. Not intended to be parsed \r
-// programmatically.\r
-DEFINE_PROPERTYKEY(PKEY_Photo_OrientationText, 0xA9EA193C, 0xC511, 0x498A, 0xA0, 0x6B, 0x58, 0xE2, 0x77, 0x6D, 0xCC, 0x28, 100);\r
-\r
-// Name: System.Photo.PhotometricInterpretation -- PKEY_Photo_PhotometricInterpretation\r
-// Type: UInt16 -- VT_UI2\r
-// FormatID: 341796F1-1DF9-4B1C-A564-91BDEFA43877, 100\r
-// \r
-// This is the pixel composition. In JPEG compressed data, a JPEG marker is used \r
-// instead of this property.\r
-DEFINE_PROPERTYKEY(PKEY_Photo_PhotometricInterpretation, 0x341796F1, 0x1DF9, 0x4B1C, 0xA5, 0x64, 0x91, 0xBD, 0xEF, 0xA4, 0x38, 0x77, 100);\r
-\r
-// Possible discrete values for PKEY_Photo_PhotometricInterpretation are:\r
-#define PHOTO_PHOTOMETRIC_RGB 2u\r
-#define PHOTO_PHOTOMETRIC_YCBCR 6u\r
-\r
-// Name: System.Photo.PhotometricInterpretationText -- PKEY_Photo_PhotometricInterpretationText\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 821437D6-9EAB-4765-A589-3B1CBBD22A61, 100\r
-// \r
-// This is the user-friendly form of System.Photo.PhotometricInterpretation. Not intended to be parsed \r
-// programmatically.\r
-DEFINE_PROPERTYKEY(PKEY_Photo_PhotometricInterpretationText, 0x821437D6, 0x9EAB, 0x4765, 0xA5, 0x89, 0x3B, 0x1C, 0xBB, 0xD2, 0x2A, 0x61, 100);\r
-\r
-// Name: System.Photo.ProgramMode -- PKEY_Photo_ProgramMode\r
-// Type: UInt32 -- VT_UI4\r
-// FormatID: 6D217F6D-3F6A-4825-B470-5F03CA2FBE9B, 100\r
-// \r
-// This is the class of the program used by the camera to set exposure when the \r
-// picture is taken.\r
-DEFINE_PROPERTYKEY(PKEY_Photo_ProgramMode, 0x6D217F6D, 0x3F6A, 0x4825, 0xB4, 0x70, 0x5F, 0x03, 0xCA, 0x2F, 0xBE, 0x9B, 100);\r
-\r
-// Possible discrete values for PKEY_Photo_ProgramMode are:\r
-#define PHOTO_PROGRAMMODE_NOTDEFINED 0ul\r
-#define PHOTO_PROGRAMMODE_MANUAL 1ul\r
-#define PHOTO_PROGRAMMODE_NORMAL 2ul\r
-#define PHOTO_PROGRAMMODE_APERTURE 3ul\r
-#define PHOTO_PROGRAMMODE_SHUTTER 4ul\r
-#define PHOTO_PROGRAMMODE_CREATIVE 5ul\r
-#define PHOTO_PROGRAMMODE_ACTION 6ul\r
-#define PHOTO_PROGRAMMODE_PORTRAIT 7ul\r
-#define PHOTO_PROGRAMMODE_LANDSCAPE 8ul\r
-\r
-// Name: System.Photo.ProgramModeText -- PKEY_Photo_ProgramModeText\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 7FE3AA27-2648-42F3-89B0-454E5CB150C3, 100\r
-// \r
-// This is the user-friendly form of System.Photo.ProgramMode. Not intended to be parsed \r
-// programmatically.\r
-DEFINE_PROPERTYKEY(PKEY_Photo_ProgramModeText, 0x7FE3AA27, 0x2648, 0x42F3, 0x89, 0xB0, 0x45, 0x4E, 0x5C, 0xB1, 0x50, 0xC3, 100);\r
-\r
-// Name: System.Photo.RelatedSoundFile -- PKEY_Photo_RelatedSoundFile\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 318A6B45-087F-4DC2-B8CC-05359551FC9E, 100\r
-DEFINE_PROPERTYKEY(PKEY_Photo_RelatedSoundFile, 0x318A6B45, 0x087F, 0x4DC2, 0xB8, 0xCC, 0x05, 0x35, 0x95, 0x51, 0xFC, 0x9E, 100);\r
-\r
-// Name: System.Photo.Saturation -- PKEY_Photo_Saturation\r
-// Type: UInt32 -- VT_UI4\r
-// FormatID: 49237325-A95A-4F67-B211-816B2D45D2E0, 100\r
-// \r
-// This indicates the direction of saturation processing applied by the camera when \r
-// the image was shot.\r
-DEFINE_PROPERTYKEY(PKEY_Photo_Saturation, 0x49237325, 0xA95A, 0x4F67, 0xB2, 0x11, 0x81, 0x6B, 0x2D, 0x45, 0xD2, 0xE0, 100);\r
-\r
-// Possible discrete values for PKEY_Photo_Saturation are:\r
-#define PHOTO_SATURATION_NORMAL 0ul\r
-#define PHOTO_SATURATION_LOW 1ul\r
-#define PHOTO_SATURATION_HIGH 2ul\r
-\r
-// Name: System.Photo.SaturationText -- PKEY_Photo_SaturationText\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 61478C08-B600-4A84-BBE4-E99C45F0A072, 100\r
-// \r
-// This is the user-friendly form of System.Photo.Saturation. Not intended to be parsed \r
-// programmatically.\r
-DEFINE_PROPERTYKEY(PKEY_Photo_SaturationText, 0x61478C08, 0xB600, 0x4A84, 0xBB, 0xE4, 0xE9, 0x9C, 0x45, 0xF0, 0xA0, 0x72, 100);\r
-\r
-// Name: System.Photo.Sharpness -- PKEY_Photo_Sharpness\r
-// Type: UInt32 -- VT_UI4\r
-// FormatID: FC6976DB-8349-4970-AE97-B3C5316A08F0, 100\r
-// \r
-// This indicates the direction of sharpness processing applied by the camera when \r
-// the image was shot.\r
-DEFINE_PROPERTYKEY(PKEY_Photo_Sharpness, 0xFC6976DB, 0x8349, 0x4970, 0xAE, 0x97, 0xB3, 0xC5, 0x31, 0x6A, 0x08, 0xF0, 100);\r
-\r
-// Possible discrete values for PKEY_Photo_Sharpness are:\r
-#define PHOTO_SHARPNESS_NORMAL 0ul\r
-#define PHOTO_SHARPNESS_SOFT 1ul\r
-#define PHOTO_SHARPNESS_HARD 2ul\r
-\r
-// Name: System.Photo.SharpnessText -- PKEY_Photo_SharpnessText\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 51EC3F47-DD50-421D-8769-334F50424B1E, 100\r
-// \r
-// This is the user-friendly form of System.Photo.Sharpness. Not intended to be parsed \r
-// programmatically.\r
-DEFINE_PROPERTYKEY(PKEY_Photo_SharpnessText, 0x51EC3F47, 0xDD50, 0x421D, 0x87, 0x69, 0x33, 0x4F, 0x50, 0x42, 0x4B, 0x1E, 100);\r
-\r
-// Name: System.Photo.ShutterSpeed -- PKEY_Photo_ShutterSpeed\r
-// Type: Double -- VT_R8\r
-// FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 37377\r
-//\r
-// PropertyTagExifShutterSpeed. Calculated from PKEY_Photo_ShutterSpeedNumerator and PKEY_Photo_ShutterSpeedDenominator\r
-DEFINE_PROPERTYKEY(PKEY_Photo_ShutterSpeed, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 37377);\r
-\r
-// Name: System.Photo.ShutterSpeedDenominator -- PKEY_Photo_ShutterSpeedDenominator\r
-// Type: Int32 -- VT_I4\r
-// FormatID: E13D8975-81C7-4948-AE3F-37CAE11E8FF7, 100\r
-//\r
-// Denominator of PKEY_Photo_ShutterSpeed\r
-DEFINE_PROPERTYKEY(PKEY_Photo_ShutterSpeedDenominator, 0xE13D8975, 0x81C7, 0x4948, 0xAE, 0x3F, 0x37, 0xCA, 0xE1, 0x1E, 0x8F, 0xF7, 100);\r
-\r
-// Name: System.Photo.ShutterSpeedNumerator -- PKEY_Photo_ShutterSpeedNumerator\r
-// Type: Int32 -- VT_I4\r
-// FormatID: 16EA4042-D6F4-4BCA-8349-7C78D30FB333, 100\r
-//\r
-// Numerator of PKEY_Photo_ShutterSpeed\r
-DEFINE_PROPERTYKEY(PKEY_Photo_ShutterSpeedNumerator, 0x16EA4042, 0xD6F4, 0x4BCA, 0x83, 0x49, 0x7C, 0x78, 0xD3, 0x0F, 0xB3, 0x33, 100);\r
-\r
-// Name: System.Photo.SubjectDistance -- PKEY_Photo_SubjectDistance\r
-// Type: Double -- VT_R8\r
-// FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 37382\r
-//\r
-// PropertyTagExifSubjectDist. Calculated from PKEY_Photo_SubjectDistanceNumerator and PKEY_Photo_SubjectDistanceDenominator\r
-DEFINE_PROPERTYKEY(PKEY_Photo_SubjectDistance, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 37382);\r
-\r
-// Name: System.Photo.SubjectDistanceDenominator -- PKEY_Photo_SubjectDistanceDenominator\r
-// Type: UInt32 -- VT_UI4\r
-// FormatID: 0C840A88-B043-466D-9766-D4B26DA3FA77, 100\r
-//\r
-// Denominator of PKEY_Photo_SubjectDistance\r
-DEFINE_PROPERTYKEY(PKEY_Photo_SubjectDistanceDenominator, 0x0C840A88, 0xB043, 0x466D, 0x97, 0x66, 0xD4, 0xB2, 0x6D, 0xA3, 0xFA, 0x77, 100);\r
-\r
-// Name: System.Photo.SubjectDistanceNumerator -- PKEY_Photo_SubjectDistanceNumerator\r
-// Type: UInt32 -- VT_UI4\r
-// FormatID: 8AF4961C-F526-43E5-AA81-DB768219178D, 100\r
-//\r
-// Numerator of PKEY_Photo_SubjectDistance\r
-DEFINE_PROPERTYKEY(PKEY_Photo_SubjectDistanceNumerator, 0x8AF4961C, 0xF526, 0x43E5, 0xAA, 0x81, 0xDB, 0x76, 0x82, 0x19, 0x17, 0x8D, 100);\r
-\r
-// Name: System.Photo.TranscodedForSync -- PKEY_Photo_TranscodedForSync\r
-// Type: Boolean -- VT_BOOL\r
-// FormatID: 9A8EBB75-6458-4E82-BACB-35C0095B03BB, 100\r
-DEFINE_PROPERTYKEY(PKEY_Photo_TranscodedForSync, 0x9A8EBB75, 0x6458, 0x4E82, 0xBA, 0xCB, 0x35, 0xC0, 0x09, 0x5B, 0x03, 0xBB, 100);\r
-\r
-// Name: System.Photo.WhiteBalance -- PKEY_Photo_WhiteBalance\r
-// Type: UInt32 -- VT_UI4\r
-// FormatID: EE3D3D8A-5381-4CFA-B13B-AAF66B5F4EC9, 100\r
-// \r
-// This indicates the white balance mode set when the image was shot.\r
-DEFINE_PROPERTYKEY(PKEY_Photo_WhiteBalance, 0xEE3D3D8A, 0x5381, 0x4CFA, 0xB1, 0x3B, 0xAA, 0xF6, 0x6B, 0x5F, 0x4E, 0xC9, 100);\r
-\r
-// Possible discrete values for PKEY_Photo_WhiteBalance are:\r
-#define PHOTO_WHITEBALANCE_AUTO 0ul\r
-#define PHOTO_WHITEBALANCE_MANUAL 1ul\r
-\r
-// Name: System.Photo.WhiteBalanceText -- PKEY_Photo_WhiteBalanceText\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 6336B95E-C7A7-426D-86FD-7AE3D39C84B4, 100\r
-// \r
-// This is the user-friendly form of System.Photo.WhiteBalance. Not intended to be parsed \r
-// programmatically.\r
-DEFINE_PROPERTYKEY(PKEY_Photo_WhiteBalanceText, 0x6336B95E, 0xC7A7, 0x426D, 0x86, 0xFD, 0x7A, 0xE3, 0xD3, 0x9C, 0x84, 0xB4, 100);\r
- \r
-//-----------------------------------------------------------------------------\r
-// PropGroup properties\r
-\r
-// Name: System.PropGroup.Advanced -- PKEY_PropGroup_Advanced\r
-// Type: Null -- VT_NULL\r
-// FormatID: 900A403B-097B-4B95-8AE2-071FDAEEB118, 100\r
-DEFINE_PROPERTYKEY(PKEY_PropGroup_Advanced, 0x900A403B, 0x097B, 0x4B95, 0x8A, 0xE2, 0x07, 0x1F, 0xDA, 0xEE, 0xB1, 0x18, 100);\r
-\r
-// Name: System.PropGroup.Audio -- PKEY_PropGroup_Audio\r
-// Type: Null -- VT_NULL\r
-// FormatID: 2804D469-788F-48AA-8570-71B9C187E138, 100\r
-DEFINE_PROPERTYKEY(PKEY_PropGroup_Audio, 0x2804D469, 0x788F, 0x48AA, 0x85, 0x70, 0x71, 0xB9, 0xC1, 0x87, 0xE1, 0x38, 100);\r
-\r
-// Name: System.PropGroup.Calendar -- PKEY_PropGroup_Calendar\r
-// Type: Null -- VT_NULL\r
-// FormatID: 9973D2B5-BFD8-438A-BA94-5349B293181A, 100\r
-DEFINE_PROPERTYKEY(PKEY_PropGroup_Calendar, 0x9973D2B5, 0xBFD8, 0x438A, 0xBA, 0x94, 0x53, 0x49, 0xB2, 0x93, 0x18, 0x1A, 100);\r
-\r
-// Name: System.PropGroup.Camera -- PKEY_PropGroup_Camera\r
-// Type: Null -- VT_NULL\r
-// FormatID: DE00DE32-547E-4981-AD4B-542F2E9007D8, 100\r
-DEFINE_PROPERTYKEY(PKEY_PropGroup_Camera, 0xDE00DE32, 0x547E, 0x4981, 0xAD, 0x4B, 0x54, 0x2F, 0x2E, 0x90, 0x07, 0xD8, 100);\r
-\r
-// Name: System.PropGroup.Contact -- PKEY_PropGroup_Contact\r
-// Type: Null -- VT_NULL\r
-// FormatID: DF975FD3-250A-4004-858F-34E29A3E37AA, 100\r
-DEFINE_PROPERTYKEY(PKEY_PropGroup_Contact, 0xDF975FD3, 0x250A, 0x4004, 0x85, 0x8F, 0x34, 0xE2, 0x9A, 0x3E, 0x37, 0xAA, 100);\r
-\r
-// Name: System.PropGroup.Content -- PKEY_PropGroup_Content\r
-// Type: Null -- VT_NULL\r
-// FormatID: D0DAB0BA-368A-4050-A882-6C010FD19A4F, 100\r
-DEFINE_PROPERTYKEY(PKEY_PropGroup_Content, 0xD0DAB0BA, 0x368A, 0x4050, 0xA8, 0x82, 0x6C, 0x01, 0x0F, 0xD1, 0x9A, 0x4F, 100);\r
-\r
-// Name: System.PropGroup.Description -- PKEY_PropGroup_Description\r
-// Type: Null -- VT_NULL\r
-// FormatID: 8969B275-9475-4E00-A887-FF93B8B41E44, 100\r
-DEFINE_PROPERTYKEY(PKEY_PropGroup_Description, 0x8969B275, 0x9475, 0x4E00, 0xA8, 0x87, 0xFF, 0x93, 0xB8, 0xB4, 0x1E, 0x44, 100);\r
-\r
-// Name: System.PropGroup.FileSystem -- PKEY_PropGroup_FileSystem\r
-// Type: Null -- VT_NULL\r
-// FormatID: E3A7D2C1-80FC-4B40-8F34-30EA111BDC2E, 100\r
-DEFINE_PROPERTYKEY(PKEY_PropGroup_FileSystem, 0xE3A7D2C1, 0x80FC, 0x4B40, 0x8F, 0x34, 0x30, 0xEA, 0x11, 0x1B, 0xDC, 0x2E, 100);\r
-\r
-// Name: System.PropGroup.General -- PKEY_PropGroup_General\r
-// Type: Null -- VT_NULL\r
-// FormatID: CC301630-B192-4C22-B372-9F4C6D338E07, 100\r
-DEFINE_PROPERTYKEY(PKEY_PropGroup_General, 0xCC301630, 0xB192, 0x4C22, 0xB3, 0x72, 0x9F, 0x4C, 0x6D, 0x33, 0x8E, 0x07, 100);\r
-\r
-// Name: System.PropGroup.GPS -- PKEY_PropGroup_GPS\r
-// Type: Null -- VT_NULL\r
-// FormatID: F3713ADA-90E3-4E11-AAE5-FDC17685B9BE, 100\r
-DEFINE_PROPERTYKEY(PKEY_PropGroup_GPS, 0xF3713ADA, 0x90E3, 0x4E11, 0xAA, 0xE5, 0xFD, 0xC1, 0x76, 0x85, 0xB9, 0xBE, 100);\r
-\r
-// Name: System.PropGroup.Image -- PKEY_PropGroup_Image\r
-// Type: Null -- VT_NULL\r
-// FormatID: E3690A87-0FA8-4A2A-9A9F-FCE8827055AC, 100\r
-DEFINE_PROPERTYKEY(PKEY_PropGroup_Image, 0xE3690A87, 0x0FA8, 0x4A2A, 0x9A, 0x9F, 0xFC, 0xE8, 0x82, 0x70, 0x55, 0xAC, 100);\r
-\r
-// Name: System.PropGroup.Media -- PKEY_PropGroup_Media\r
-// Type: Null -- VT_NULL\r
-// FormatID: 61872CF7-6B5E-4B4B-AC2D-59DA84459248, 100\r
-DEFINE_PROPERTYKEY(PKEY_PropGroup_Media, 0x61872CF7, 0x6B5E, 0x4B4B, 0xAC, 0x2D, 0x59, 0xDA, 0x84, 0x45, 0x92, 0x48, 100);\r
-\r
-// Name: System.PropGroup.MediaAdvanced -- PKEY_PropGroup_MediaAdvanced\r
-// Type: Null -- VT_NULL\r
-// FormatID: 8859A284-DE7E-4642-99BA-D431D044B1EC, 100\r
-DEFINE_PROPERTYKEY(PKEY_PropGroup_MediaAdvanced, 0x8859A284, 0xDE7E, 0x4642, 0x99, 0xBA, 0xD4, 0x31, 0xD0, 0x44, 0xB1, 0xEC, 100);\r
-\r
-// Name: System.PropGroup.Message -- PKEY_PropGroup_Message\r
-// Type: Null -- VT_NULL\r
-// FormatID: 7FD7259D-16B4-4135-9F97-7C96ECD2FA9E, 100\r
-DEFINE_PROPERTYKEY(PKEY_PropGroup_Message, 0x7FD7259D, 0x16B4, 0x4135, 0x9F, 0x97, 0x7C, 0x96, 0xEC, 0xD2, 0xFA, 0x9E, 100);\r
-\r
-// Name: System.PropGroup.Music -- PKEY_PropGroup_Music\r
-// Type: Null -- VT_NULL\r
-// FormatID: 68DD6094-7216-40F1-A029-43FE7127043F, 100\r
-DEFINE_PROPERTYKEY(PKEY_PropGroup_Music, 0x68DD6094, 0x7216, 0x40F1, 0xA0, 0x29, 0x43, 0xFE, 0x71, 0x27, 0x04, 0x3F, 100);\r
-\r
-// Name: System.PropGroup.Origin -- PKEY_PropGroup_Origin\r
-// Type: Null -- VT_NULL\r
-// FormatID: 2598D2FB-5569-4367-95DF-5CD3A177E1A5, 100\r
-DEFINE_PROPERTYKEY(PKEY_PropGroup_Origin, 0x2598D2FB, 0x5569, 0x4367, 0x95, 0xDF, 0x5C, 0xD3, 0xA1, 0x77, 0xE1, 0xA5, 100);\r
-\r
-// Name: System.PropGroup.PhotoAdvanced -- PKEY_PropGroup_PhotoAdvanced\r
-// Type: Null -- VT_NULL\r
-// FormatID: 0CB2BF5A-9EE7-4A86-8222-F01E07FDADAF, 100\r
-DEFINE_PROPERTYKEY(PKEY_PropGroup_PhotoAdvanced, 0x0CB2BF5A, 0x9EE7, 0x4A86, 0x82, 0x22, 0xF0, 0x1E, 0x07, 0xFD, 0xAD, 0xAF, 100);\r
-\r
-// Name: System.PropGroup.RecordedTV -- PKEY_PropGroup_RecordedTV\r
-// Type: Null -- VT_NULL\r
-// FormatID: E7B33238-6584-4170-A5C0-AC25EFD9DA56, 100\r
-DEFINE_PROPERTYKEY(PKEY_PropGroup_RecordedTV, 0xE7B33238, 0x6584, 0x4170, 0xA5, 0xC0, 0xAC, 0x25, 0xEF, 0xD9, 0xDA, 0x56, 100);\r
-\r
-// Name: System.PropGroup.Video -- PKEY_PropGroup_Video\r
-// Type: Null -- VT_NULL\r
-// FormatID: BEBE0920-7671-4C54-A3EB-49FDDFC191EE, 100\r
-DEFINE_PROPERTYKEY(PKEY_PropGroup_Video, 0xBEBE0920, 0x7671, 0x4C54, 0xA3, 0xEB, 0x49, 0xFD, 0xDF, 0xC1, 0x91, 0xEE, 100);\r
- \r
-//-----------------------------------------------------------------------------\r
-// PropList properties\r
-\r
-\r
-\r
-// Name: System.PropList.ConflictPrompt -- PKEY_PropList_ConflictPrompt\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: C9944A21-A406-48FE-8225-AEC7E24C211B, 11\r
-// \r
-// The list of properties to show in the file operation conflict resolution dialog. Properties with empty \r
-// values will not be displayed. Register under the regvalue of "ConflictPrompt".\r
-DEFINE_PROPERTYKEY(PKEY_PropList_ConflictPrompt, 0xC9944A21, 0xA406, 0x48FE, 0x82, 0x25, 0xAE, 0xC7, 0xE2, 0x4C, 0x21, 0x1B, 11);\r
-\r
-// Name: System.PropList.ExtendedTileInfo -- PKEY_PropList_ExtendedTileInfo\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: C9944A21-A406-48FE-8225-AEC7E24C211B, 9\r
-// \r
-// The list of properties to show in the listview on extended tiles. Register under the regvalue of \r
-// "ExtendedTileInfo".\r
-DEFINE_PROPERTYKEY(PKEY_PropList_ExtendedTileInfo, 0xC9944A21, 0xA406, 0x48FE, 0x82, 0x25, 0xAE, 0xC7, 0xE2, 0x4C, 0x21, 0x1B, 9);\r
-\r
-// Name: System.PropList.FileOperationPrompt -- PKEY_PropList_FileOperationPrompt\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: C9944A21-A406-48FE-8225-AEC7E24C211B, 10\r
-// \r
-// The list of properties to show in the file operation confirmation dialog. Properties with empty values \r
-// will not be displayed. If this list is not specified, then the InfoTip property list is used instead. \r
-// Register under the regvalue of "FileOperationPrompt".\r
-DEFINE_PROPERTYKEY(PKEY_PropList_FileOperationPrompt, 0xC9944A21, 0xA406, 0x48FE, 0x82, 0x25, 0xAE, 0xC7, 0xE2, 0x4C, 0x21, 0x1B, 10);\r
-\r
-// Name: System.PropList.FullDetails -- PKEY_PropList_FullDetails\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: C9944A21-A406-48FE-8225-AEC7E24C211B, 2\r
-// \r
-// The list of all the properties to show in the details page. Property groups can be included in this list \r
-// in order to more easily organize the UI. Register under the regvalue of "FullDetails".\r
-DEFINE_PROPERTYKEY(PKEY_PropList_FullDetails, 0xC9944A21, 0xA406, 0x48FE, 0x82, 0x25, 0xAE, 0xC7, 0xE2, 0x4C, 0x21, 0x1B, 2);\r
-\r
-// Name: System.PropList.InfoTip -- PKEY_PropList_InfoTip\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: C9944A21-A406-48FE-8225-AEC7E24C211B, 4 (PID_PROPLIST_INFOTIP)\r
-// \r
-// The list of properties to show in the infotip. Properties with empty values will not be displayed. Register \r
-// under the regvalue of "InfoTip".\r
-DEFINE_PROPERTYKEY(PKEY_PropList_InfoTip, 0xC9944A21, 0xA406, 0x48FE, 0x82, 0x25, 0xAE, 0xC7, 0xE2, 0x4C, 0x21, 0x1B, 4);\r
-\r
-// Name: System.PropList.NonPersonal -- PKEY_PropList_NonPersonal\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 49D1091F-082E-493F-B23F-D2308AA9668C, 100\r
-// \r
-// The list of properties that are considered 'non-personal'. When told to remove all non-personal properties \r
-// from a given file, the system will leave these particular properties untouched. Register under the regvalue \r
-// of "NonPersonal".\r
-DEFINE_PROPERTYKEY(PKEY_PropList_NonPersonal, 0x49D1091F, 0x082E, 0x493F, 0xB2, 0x3F, 0xD2, 0x30, 0x8A, 0xA9, 0x66, 0x8C, 100);\r
-\r
-// Name: System.PropList.PreviewDetails -- PKEY_PropList_PreviewDetails\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: C9944A21-A406-48FE-8225-AEC7E24C211B, 8\r
-//\r
-// The list of properties to display in the preview pane. Register under the regvalue of "PreviewDetails".\r
-DEFINE_PROPERTYKEY(PKEY_PropList_PreviewDetails, 0xC9944A21, 0xA406, 0x48FE, 0x82, 0x25, 0xAE, 0xC7, 0xE2, 0x4C, 0x21, 0x1B, 8);\r
-\r
-// Name: System.PropList.PreviewTitle -- PKEY_PropList_PreviewTitle\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: C9944A21-A406-48FE-8225-AEC7E24C211B, 6\r
-// \r
-// The one or two properties to display in the preview pane title section. The optional second property is \r
-// displayed as a subtitle. Register under the regvalue of "PreviewTitle".\r
-DEFINE_PROPERTYKEY(PKEY_PropList_PreviewTitle, 0xC9944A21, 0xA406, 0x48FE, 0x82, 0x25, 0xAE, 0xC7, 0xE2, 0x4C, 0x21, 0x1B, 6);\r
-\r
-// Name: System.PropList.QuickTip -- PKEY_PropList_QuickTip\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: C9944A21-A406-48FE-8225-AEC7E24C211B, 5 (PID_PROPLIST_QUICKTIP)\r
-// \r
-// The list of properties to show in the infotip when the item is on a slow network. Properties with empty \r
-// values will not be displayed. Register under the regvalue of "QuickTip".\r
-DEFINE_PROPERTYKEY(PKEY_PropList_QuickTip, 0xC9944A21, 0xA406, 0x48FE, 0x82, 0x25, 0xAE, 0xC7, 0xE2, 0x4C, 0x21, 0x1B, 5);\r
-\r
-// Name: System.PropList.TileInfo -- PKEY_PropList_TileInfo\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: C9944A21-A406-48FE-8225-AEC7E24C211B, 3 (PID_PROPLIST_TILEINFO)\r
-// \r
-// The list of properties to show in the listview on tiles. Register under the regvalue of "TileInfo".\r
-DEFINE_PROPERTYKEY(PKEY_PropList_TileInfo, 0xC9944A21, 0xA406, 0x48FE, 0x82, 0x25, 0xAE, 0xC7, 0xE2, 0x4C, 0x21, 0x1B, 3);\r
-\r
-// Name: System.PropList.XPDetailsPanel -- PKEY_PropList_XPDetailsPanel\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: (FMTID_WebView) F2275480-F782-4291-BD94-F13693513AEC, 0 (PID_DISPLAY_PROPERTIES)\r
-//\r
-// The list of properties to display in the XP webview details panel. Obsolete.\r
-DEFINE_PROPERTYKEY(PKEY_PropList_XPDetailsPanel, 0xF2275480, 0xF782, 0x4291, 0xBD, 0x94, 0xF1, 0x36, 0x93, 0x51, 0x3A, 0xEC, 0);\r
- \r
-//-----------------------------------------------------------------------------\r
-// RecordedTV properties\r
-\r
-\r
-\r
-// Name: System.RecordedTV.ChannelNumber -- PKEY_RecordedTV_ChannelNumber\r
-// Type: UInt32 -- VT_UI4\r
-// FormatID: 6D748DE2-8D38-4CC3-AC60-F009B057C557, 7\r
-//\r
-// Example: 42\r
-DEFINE_PROPERTYKEY(PKEY_RecordedTV_ChannelNumber, 0x6D748DE2, 0x8D38, 0x4CC3, 0xAC, 0x60, 0xF0, 0x09, 0xB0, 0x57, 0xC5, 0x57, 7);\r
-\r
-// Name: System.RecordedTV.Credits -- PKEY_RecordedTV_Credits\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 6D748DE2-8D38-4CC3-AC60-F009B057C557, 4\r
-//\r
-// Example: "Don Messick/Frank Welker/Casey Kasem/Heather North/Nicole Jaffe;;;"\r
-DEFINE_PROPERTYKEY(PKEY_RecordedTV_Credits, 0x6D748DE2, 0x8D38, 0x4CC3, 0xAC, 0x60, 0xF0, 0x09, 0xB0, 0x57, 0xC5, 0x57, 4);\r
-\r
-// Name: System.RecordedTV.DateContentExpires -- PKEY_RecordedTV_DateContentExpires\r
-// Type: DateTime -- VT_FILETIME (For variants: VT_DATE)\r
-// FormatID: 6D748DE2-8D38-4CC3-AC60-F009B057C557, 15\r
-DEFINE_PROPERTYKEY(PKEY_RecordedTV_DateContentExpires, 0x6D748DE2, 0x8D38, 0x4CC3, 0xAC, 0x60, 0xF0, 0x09, 0xB0, 0x57, 0xC5, 0x57, 15);\r
-\r
-// Name: System.RecordedTV.EpisodeName -- PKEY_RecordedTV_EpisodeName\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 6D748DE2-8D38-4CC3-AC60-F009B057C557, 2\r
-//\r
-// Example: "Nowhere to Hyde"\r
-DEFINE_PROPERTYKEY(PKEY_RecordedTV_EpisodeName, 0x6D748DE2, 0x8D38, 0x4CC3, 0xAC, 0x60, 0xF0, 0x09, 0xB0, 0x57, 0xC5, 0x57, 2);\r
-\r
-// Name: System.RecordedTV.IsATSCContent -- PKEY_RecordedTV_IsATSCContent\r
-// Type: Boolean -- VT_BOOL\r
-// FormatID: 6D748DE2-8D38-4CC3-AC60-F009B057C557, 16\r
-DEFINE_PROPERTYKEY(PKEY_RecordedTV_IsATSCContent, 0x6D748DE2, 0x8D38, 0x4CC3, 0xAC, 0x60, 0xF0, 0x09, 0xB0, 0x57, 0xC5, 0x57, 16);\r
-\r
-// Name: System.RecordedTV.IsClosedCaptioningAvailable -- PKEY_RecordedTV_IsClosedCaptioningAvailable\r
-// Type: Boolean -- VT_BOOL\r
-// FormatID: 6D748DE2-8D38-4CC3-AC60-F009B057C557, 12\r
-DEFINE_PROPERTYKEY(PKEY_RecordedTV_IsClosedCaptioningAvailable, 0x6D748DE2, 0x8D38, 0x4CC3, 0xAC, 0x60, 0xF0, 0x09, 0xB0, 0x57, 0xC5, 0x57, 12);\r
-\r
-// Name: System.RecordedTV.IsDTVContent -- PKEY_RecordedTV_IsDTVContent\r
-// Type: Boolean -- VT_BOOL\r
-// FormatID: 6D748DE2-8D38-4CC3-AC60-F009B057C557, 17\r
-DEFINE_PROPERTYKEY(PKEY_RecordedTV_IsDTVContent, 0x6D748DE2, 0x8D38, 0x4CC3, 0xAC, 0x60, 0xF0, 0x09, 0xB0, 0x57, 0xC5, 0x57, 17);\r
-\r
-// Name: System.RecordedTV.IsHDContent -- PKEY_RecordedTV_IsHDContent\r
-// Type: Boolean -- VT_BOOL\r
-// FormatID: 6D748DE2-8D38-4CC3-AC60-F009B057C557, 18\r
-DEFINE_PROPERTYKEY(PKEY_RecordedTV_IsHDContent, 0x6D748DE2, 0x8D38, 0x4CC3, 0xAC, 0x60, 0xF0, 0x09, 0xB0, 0x57, 0xC5, 0x57, 18);\r
-\r
-// Name: System.RecordedTV.IsRepeatBroadcast -- PKEY_RecordedTV_IsRepeatBroadcast\r
-// Type: Boolean -- VT_BOOL\r
-// FormatID: 6D748DE2-8D38-4CC3-AC60-F009B057C557, 13\r
-DEFINE_PROPERTYKEY(PKEY_RecordedTV_IsRepeatBroadcast, 0x6D748DE2, 0x8D38, 0x4CC3, 0xAC, 0x60, 0xF0, 0x09, 0xB0, 0x57, 0xC5, 0x57, 13);\r
-\r
-// Name: System.RecordedTV.IsSAP -- PKEY_RecordedTV_IsSAP\r
-// Type: Boolean -- VT_BOOL\r
-// FormatID: 6D748DE2-8D38-4CC3-AC60-F009B057C557, 14\r
-DEFINE_PROPERTYKEY(PKEY_RecordedTV_IsSAP, 0x6D748DE2, 0x8D38, 0x4CC3, 0xAC, 0x60, 0xF0, 0x09, 0xB0, 0x57, 0xC5, 0x57, 14);\r
-\r
-// Name: System.RecordedTV.NetworkAffiliation -- PKEY_RecordedTV_NetworkAffiliation\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 2C53C813-FB63-4E22-A1AB-0B331CA1E273, 100\r
-DEFINE_PROPERTYKEY(PKEY_RecordedTV_NetworkAffiliation, 0x2C53C813, 0xFB63, 0x4E22, 0xA1, 0xAB, 0x0B, 0x33, 0x1C, 0xA1, 0xE2, 0x73, 100);\r
-\r
-// Name: System.RecordedTV.OriginalBroadcastDate -- PKEY_RecordedTV_OriginalBroadcastDate\r
-// Type: DateTime -- VT_FILETIME (For variants: VT_DATE)\r
-// FormatID: 4684FE97-8765-4842-9C13-F006447B178C, 100\r
-DEFINE_PROPERTYKEY(PKEY_RecordedTV_OriginalBroadcastDate, 0x4684FE97, 0x8765, 0x4842, 0x9C, 0x13, 0xF0, 0x06, 0x44, 0x7B, 0x17, 0x8C, 100);\r
-\r
-// Name: System.RecordedTV.ProgramDescription -- PKEY_RecordedTV_ProgramDescription\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 6D748DE2-8D38-4CC3-AC60-F009B057C557, 3\r
-DEFINE_PROPERTYKEY(PKEY_RecordedTV_ProgramDescription, 0x6D748DE2, 0x8D38, 0x4CC3, 0xAC, 0x60, 0xF0, 0x09, 0xB0, 0x57, 0xC5, 0x57, 3);\r
-\r
-// Name: System.RecordedTV.RecordingTime -- PKEY_RecordedTV_RecordingTime\r
-// Type: DateTime -- VT_FILETIME (For variants: VT_DATE)\r
-// FormatID: A5477F61-7A82-4ECA-9DDE-98B69B2479B3, 100\r
-DEFINE_PROPERTYKEY(PKEY_RecordedTV_RecordingTime, 0xA5477F61, 0x7A82, 0x4ECA, 0x9D, 0xDE, 0x98, 0xB6, 0x9B, 0x24, 0x79, 0xB3, 100);\r
-\r
-// Name: System.RecordedTV.StationCallSign -- PKEY_RecordedTV_StationCallSign\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 6D748DE2-8D38-4CC3-AC60-F009B057C557, 5\r
-//\r
-// Example: "TOONP"\r
-DEFINE_PROPERTYKEY(PKEY_RecordedTV_StationCallSign, 0x6D748DE2, 0x8D38, 0x4CC3, 0xAC, 0x60, 0xF0, 0x09, 0xB0, 0x57, 0xC5, 0x57, 5);\r
-\r
-// Name: System.RecordedTV.StationName -- PKEY_RecordedTV_StationName\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 1B5439E7-EBA1-4AF8-BDD7-7AF1D4549493, 100\r
-DEFINE_PROPERTYKEY(PKEY_RecordedTV_StationName, 0x1B5439E7, 0xEBA1, 0x4AF8, 0xBD, 0xD7, 0x7A, 0xF1, 0xD4, 0x54, 0x94, 0x93, 100);\r
- \r
-//-----------------------------------------------------------------------------\r
-// Search properties\r
-\r
-\r
-\r
-// Name: System.Search.AutoSummary -- PKEY_Search_AutoSummary\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 560C36C0-503A-11CF-BAA1-00004C752A9A, 2\r
-//\r
-// General Summary of the document.\r
-DEFINE_PROPERTYKEY(PKEY_Search_AutoSummary, 0x560C36C0, 0x503A, 0x11CF, 0xBA, 0xA1, 0x00, 0x00, 0x4C, 0x75, 0x2A, 0x9A, 2);\r
-\r
-// Name: System.Search.ContainerHash -- PKEY_Search_ContainerHash\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: BCEEE283-35DF-4D53-826A-F36A3EEFC6BE, 100\r
-//\r
-// Hash code used to identify attachments to be deleted based on a common container url\r
-DEFINE_PROPERTYKEY(PKEY_Search_ContainerHash, 0xBCEEE283, 0x35DF, 0x4D53, 0x82, 0x6A, 0xF3, 0x6A, 0x3E, 0xEF, 0xC6, 0xBE, 100);\r
-\r
-// Name: System.Search.Contents -- PKEY_Search_Contents\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: (FMTID_Storage) B725F130-47EF-101A-A5F1-02608C9EEBAC, 19 (PID_STG_CONTENTS)\r
-// \r
-// The contents of the item. This property is for query restrictions only; it cannot be retrieved in a \r
-// query result. The Indexing Service friendly name is 'contents'.\r
-DEFINE_PROPERTYKEY(PKEY_Search_Contents, 0xB725F130, 0x47EF, 0x101A, 0xA5, 0xF1, 0x02, 0x60, 0x8C, 0x9E, 0xEB, 0xAC, 19);\r
-\r
-// Name: System.Search.EntryID -- PKEY_Search_EntryID\r
-// Type: Int32 -- VT_I4\r
-// FormatID: (FMTID_Query) 49691C90-7E17-101A-A91C-08002B2ECDA9, 5 (PROPID_QUERY_WORKID)\r
-// \r
-// The entry ID for an item within a given catalog in the Windows Search Index.\r
-// This value may be recycled, and therefore is not considered unique over time.\r
-DEFINE_PROPERTYKEY(PKEY_Search_EntryID, 0x49691C90, 0x7E17, 0x101A, 0xA9, 0x1C, 0x08, 0x00, 0x2B, 0x2E, 0xCD, 0xA9, 5);\r
-\r
-// Name: System.Search.GatherTime -- PKEY_Search_GatherTime\r
-// Type: DateTime -- VT_FILETIME (For variants: VT_DATE)\r
-// FormatID: 0B63E350-9CCC-11D0-BCDB-00805FCCCE04, 8\r
-//\r
-// The Datetime that the Windows Search Gatherer process last pushed properties of this document to the Windows Search Gatherer Plugins.\r
-DEFINE_PROPERTYKEY(PKEY_Search_GatherTime, 0x0B63E350, 0x9CCC, 0x11D0, 0xBC, 0xDB, 0x00, 0x80, 0x5F, 0xCC, 0xCE, 0x04, 8);\r
-\r
-// Name: System.Search.IsClosedDirectory -- PKEY_Search_IsClosedDirectory\r
-// Type: Boolean -- VT_BOOL\r
-// FormatID: 0B63E343-9CCC-11D0-BCDB-00805FCCCE04, 23\r
-//\r
-// If this property is emitted with a value of TRUE, then it indicates that this URL's last modified time applies to all of it's children, and if this URL is deleted then all of it's children are deleted as well. For example, this would be emitted as TRUE when emitting the URL of an email so that all attachments are tied to the last modified time of that email.\r
-DEFINE_PROPERTYKEY(PKEY_Search_IsClosedDirectory, 0x0B63E343, 0x9CCC, 0x11D0, 0xBC, 0xDB, 0x00, 0x80, 0x5F, 0xCC, 0xCE, 0x04, 23);\r
-\r
-// Name: System.Search.IsFullyContained -- PKEY_Search_IsFullyContained\r
-// Type: Boolean -- VT_BOOL\r
-// FormatID: 0B63E343-9CCC-11D0-BCDB-00805FCCCE04, 24\r
-//\r
-// Any child URL of a URL which has System.Search.IsClosedDirectory=TRUE must emit System.Search.IsFullyContained=TRUE. This ensures that the URL is not deleted at the end of a crawl because it hasn't been visited (which is the normal mechanism for detecting deletes). For example an email attachment would emit this property\r
-DEFINE_PROPERTYKEY(PKEY_Search_IsFullyContained, 0x0B63E343, 0x9CCC, 0x11D0, 0xBC, 0xDB, 0x00, 0x80, 0x5F, 0xCC, 0xCE, 0x04, 24);\r
-\r
-// Name: System.Search.QueryFocusedSummary -- PKEY_Search_QueryFocusedSummary\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 560C36C0-503A-11CF-BAA1-00004C752A9A, 3\r
-//\r
-// Query Focused Summary of the document.\r
-DEFINE_PROPERTYKEY(PKEY_Search_QueryFocusedSummary, 0x560C36C0, 0x503A, 0x11CF, 0xBA, 0xA1, 0x00, 0x00, 0x4C, 0x75, 0x2A, 0x9A, 3);\r
-\r
-// Name: System.Search.Rank -- PKEY_Search_Rank\r
-// Type: Int32 -- VT_I4\r
-// FormatID: (FMTID_Query) 49691C90-7E17-101A-A91C-08002B2ECDA9, 3 (PROPID_QUERY_RANK)\r
-// \r
-// Relevance rank of row. Ranges from 0-1000. Larger numbers = better matches. Query-time only, not \r
-// defined in Search schema, retrievable but not searchable.\r
-DEFINE_PROPERTYKEY(PKEY_Search_Rank, 0x49691C90, 0x7E17, 0x101A, 0xA9, 0x1C, 0x08, 0x00, 0x2B, 0x2E, 0xCD, 0xA9, 3);\r
-\r
-// Name: System.Search.Store -- PKEY_Search_Store\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: A06992B3-8CAF-4ED7-A547-B259E32AC9FC, 100\r
-//\r
-// The identifier for the protocol handler that produced this item. (E.g. MAPI, CSC, FILE etc.)\r
-DEFINE_PROPERTYKEY(PKEY_Search_Store, 0xA06992B3, 0x8CAF, 0x4ED7, 0xA5, 0x47, 0xB2, 0x59, 0xE3, 0x2A, 0xC9, 0xFC, 100);\r
-\r
-// Name: System.Search.UrlToIndex -- PKEY_Search_UrlToIndex\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 0B63E343-9CCC-11D0-BCDB-00805FCCCE04, 2\r
-//\r
-// This property should be emitted by a container IFilter for each child URL within the container. The children will eventually be crawled by the indexer if they are within scope.\r
-DEFINE_PROPERTYKEY(PKEY_Search_UrlToIndex, 0x0B63E343, 0x9CCC, 0x11D0, 0xBC, 0xDB, 0x00, 0x80, 0x5F, 0xCC, 0xCE, 0x04, 2);\r
-\r
-// Name: System.Search.UrlToIndexWithModificationTime -- PKEY_Search_UrlToIndexWithModificationTime\r
-// Type: Multivalue Any -- VT_VECTOR | VT_NULL (For variants: VT_ARRAY | VT_NULL)\r
-// FormatID: 0B63E343-9CCC-11D0-BCDB-00805FCCCE04, 12\r
-//\r
-// This property is the same as System.Search.UrlToIndex except that it includes the time the URL was last modified. This is an optimization for the indexer as it doesn't have to call back into the protocol handler to ask for this information to determine if the content needs to be indexed again. The property is a vector with two elements, a VT_LPWSTR with the URL and a VT_FILETIME for the last modified time.\r
-DEFINE_PROPERTYKEY(PKEY_Search_UrlToIndexWithModificationTime, 0x0B63E343, 0x9CCC, 0x11D0, 0xBC, 0xDB, 0x00, 0x80, 0x5F, 0xCC, 0xCE, 0x04, 12);\r
- \r
-//-----------------------------------------------------------------------------\r
-// Shell properties\r
-\r
-\r
-\r
-// Name: System.DescriptionID -- PKEY_DescriptionID\r
-// Type: Buffer -- VT_VECTOR | VT_UI1 (For variants: VT_ARRAY | VT_UI1)\r
-// FormatID: (FMTID_ShellDetails) 28636AA6-953D-11D2-B5D6-00C04FD918D0, 2 (PID_DESCRIPTIONID)\r
-//\r
-// The contents of a SHDESCRIPTIONID structure as a buffer of bytes.\r
-DEFINE_PROPERTYKEY(PKEY_DescriptionID, 0x28636AA6, 0x953D, 0x11D2, 0xB5, 0xD6, 0x00, 0xC0, 0x4F, 0xD9, 0x18, 0xD0, 2);\r
-\r
-// Name: System.Link.TargetSFGAOFlagsStrings -- PKEY_Link_TargetSFGAOFlagsStrings\r
-// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR)\r
-// FormatID: D6942081-D53B-443D-AD47-5E059D9CD27A, 3\r
-// \r
-// Expresses the SFGAO flags of a link as string values and is used as a query optimization. See \r
-// PKEY_Shell_SFGAOFlagsStrings for possible values of this.\r
-DEFINE_PROPERTYKEY(PKEY_Link_TargetSFGAOFlagsStrings, 0xD6942081, 0xD53B, 0x443D, 0xAD, 0x47, 0x5E, 0x05, 0x9D, 0x9C, 0xD2, 0x7A, 3);\r
-\r
-// Name: System.Link.TargetUrl -- PKEY_Link_TargetUrl\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 5CBF2787-48CF-4208-B90E-EE5E5D420294, 2 (PKEYs relating to URLs. Used by IE History.)\r
-DEFINE_PROPERTYKEY(PKEY_Link_TargetUrl, 0x5CBF2787, 0x48CF, 0x4208, 0xB9, 0x0E, 0xEE, 0x5E, 0x5D, 0x42, 0x02, 0x94, 2);\r
-\r
-// Name: System.Shell.SFGAOFlagsStrings -- PKEY_Shell_SFGAOFlagsStrings\r
-// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR)\r
-// FormatID: D6942081-D53B-443D-AD47-5E059D9CD27A, 2\r
-//\r
-// Expresses the SFGAO flags as string values and is used as a query optimization.\r
-DEFINE_PROPERTYKEY(PKEY_Shell_SFGAOFlagsStrings, 0xD6942081, 0xD53B, 0x443D, 0xAD, 0x47, 0x5E, 0x05, 0x9D, 0x9C, 0xD2, 0x7A, 2);\r
-\r
-// Possible discrete values for PKEY_Shell_SFGAOFlagsStrings are:\r
-#define SFGAOSTR_FILESYS L"filesys" // SFGAO_FILESYSTEM\r
-#define SFGAOSTR_FILEANC L"fileanc" // SFGAO_FILESYSANCESTOR\r
-#define SFGAOSTR_STORAGEANC L"storageanc" // SFGAO_STORAGEANCESTOR\r
-#define SFGAOSTR_STREAM L"stream" // SFGAO_STREAM\r
-#define SFGAOSTR_LINK L"link" // SFGAO_LINK\r
-#define SFGAOSTR_HIDDEN L"hidden" // SFGAO_HIDDEN\r
-#define SFGAOSTR_FOLDER L"folder" // SFGAO_FOLDER\r
-#define SFGAOSTR_NONENUM L"nonenum" // SFGAO_NONENUMERATED\r
-#define SFGAOSTR_BROWSABLE L"browsable" // SFGAO_BROWSABLE\r
- \r
-//-----------------------------------------------------------------------------\r
-// Software properties\r
-\r
-\r
-\r
-// Name: System.Software.DateLastUsed -- PKEY_Software_DateLastUsed\r
-// Type: DateTime -- VT_FILETIME (For variants: VT_DATE)\r
-// FormatID: 841E4F90-FF59-4D16-8947-E81BBFFAB36D, 16\r
-// \r
-// \r
-DEFINE_PROPERTYKEY(PKEY_Software_DateLastUsed, 0x841E4F90, 0xFF59, 0x4D16, 0x89, 0x47, 0xE8, 0x1B, 0xBF, 0xFA, 0xB3, 0x6D, 16);\r
-\r
-// Name: System.Software.ProductName -- PKEY_Software_ProductName\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: (PSFMTID_VERSION) 0CEF7D53-FA64-11D1-A203-0000F81FEDEE, 7\r
-// \r
-// \r
-DEFINE_PROPERTYKEY(PKEY_Software_ProductName, 0x0CEF7D53, 0xFA64, 0x11D1, 0xA2, 0x03, 0x00, 0x00, 0xF8, 0x1F, 0xED, 0xEE, 7);\r
- \r
-//-----------------------------------------------------------------------------\r
-// Sync properties\r
-\r
-\r
-\r
-// Name: System.Sync.Comments -- PKEY_Sync_Comments\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 7BD5533E-AF15-44DB-B8C8-BD6624E1D032, 13\r
-DEFINE_PROPERTYKEY(PKEY_Sync_Comments, 0x7BD5533E, 0xAF15, 0x44DB, 0xB8, 0xC8, 0xBD, 0x66, 0x24, 0xE1, 0xD0, 0x32, 13);\r
-\r
-// Name: System.Sync.ConflictDescription -- PKEY_Sync_ConflictDescription\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: CE50C159-2FB8-41FD-BE68-D3E042E274BC, 4\r
-DEFINE_PROPERTYKEY(PKEY_Sync_ConflictDescription, 0xCE50C159, 0x2FB8, 0x41FD, 0xBE, 0x68, 0xD3, 0xE0, 0x42, 0xE2, 0x74, 0xBC, 4);\r
-\r
-// Name: System.Sync.ConflictFirstLocation -- PKEY_Sync_ConflictFirstLocation\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: CE50C159-2FB8-41FD-BE68-D3E042E274BC, 6\r
-DEFINE_PROPERTYKEY(PKEY_Sync_ConflictFirstLocation, 0xCE50C159, 0x2FB8, 0x41FD, 0xBE, 0x68, 0xD3, 0xE0, 0x42, 0xE2, 0x74, 0xBC, 6);\r
-\r
-// Name: System.Sync.ConflictSecondLocation -- PKEY_Sync_ConflictSecondLocation\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: CE50C159-2FB8-41FD-BE68-D3E042E274BC, 7\r
-DEFINE_PROPERTYKEY(PKEY_Sync_ConflictSecondLocation, 0xCE50C159, 0x2FB8, 0x41FD, 0xBE, 0x68, 0xD3, 0xE0, 0x42, 0xE2, 0x74, 0xBC, 7);\r
-\r
-// Name: System.Sync.HandlerCollectionID -- PKEY_Sync_HandlerCollectionID\r
-// Type: Guid -- VT_CLSID\r
-// FormatID: 7BD5533E-AF15-44DB-B8C8-BD6624E1D032, 2\r
-DEFINE_PROPERTYKEY(PKEY_Sync_HandlerCollectionID, 0x7BD5533E, 0xAF15, 0x44DB, 0xB8, 0xC8, 0xBD, 0x66, 0x24, 0xE1, 0xD0, 0x32, 2);\r
-\r
-// Name: System.Sync.HandlerID -- PKEY_Sync_HandlerID\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 7BD5533E-AF15-44DB-B8C8-BD6624E1D032, 3\r
-DEFINE_PROPERTYKEY(PKEY_Sync_HandlerID, 0x7BD5533E, 0xAF15, 0x44DB, 0xB8, 0xC8, 0xBD, 0x66, 0x24, 0xE1, 0xD0, 0x32, 3);\r
-\r
-// Name: System.Sync.HandlerName -- PKEY_Sync_HandlerName\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: CE50C159-2FB8-41FD-BE68-D3E042E274BC, 2\r
-DEFINE_PROPERTYKEY(PKEY_Sync_HandlerName, 0xCE50C159, 0x2FB8, 0x41FD, 0xBE, 0x68, 0xD3, 0xE0, 0x42, 0xE2, 0x74, 0xBC, 2);\r
-\r
-// Name: System.Sync.HandlerType -- PKEY_Sync_HandlerType\r
-// Type: UInt32 -- VT_UI4\r
-// FormatID: 7BD5533E-AF15-44DB-B8C8-BD6624E1D032, 8\r
-// \r
-// \r
-DEFINE_PROPERTYKEY(PKEY_Sync_HandlerType, 0x7BD5533E, 0xAF15, 0x44DB, 0xB8, 0xC8, 0xBD, 0x66, 0x24, 0xE1, 0xD0, 0x32, 8);\r
-\r
-// Possible discrete values for PKEY_Sync_HandlerType are:\r
-#define SYNC_HANDLERTYPE_OTHER 0ul\r
-#define SYNC_HANDLERTYPE_PROGRAMS 1ul\r
-#define SYNC_HANDLERTYPE_DEVICES 2ul\r
-#define SYNC_HANDLERTYPE_FOLDERS 3ul\r
-#define SYNC_HANDLERTYPE_WEBSERVICES 4ul\r
-#define SYNC_HANDLERTYPE_COMPUTERS 5ul\r
-\r
-// Name: System.Sync.HandlerTypeLabel -- PKEY_Sync_HandlerTypeLabel\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 7BD5533E-AF15-44DB-B8C8-BD6624E1D032, 9\r
-// \r
-// \r
-DEFINE_PROPERTYKEY(PKEY_Sync_HandlerTypeLabel, 0x7BD5533E, 0xAF15, 0x44DB, 0xB8, 0xC8, 0xBD, 0x66, 0x24, 0xE1, 0xD0, 0x32, 9);\r
-\r
-// Name: System.Sync.ItemID -- PKEY_Sync_ItemID\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 7BD5533E-AF15-44DB-B8C8-BD6624E1D032, 6\r
-DEFINE_PROPERTYKEY(PKEY_Sync_ItemID, 0x7BD5533E, 0xAF15, 0x44DB, 0xB8, 0xC8, 0xBD, 0x66, 0x24, 0xE1, 0xD0, 0x32, 6);\r
-\r
-// Name: System.Sync.ItemName -- PKEY_Sync_ItemName\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: CE50C159-2FB8-41FD-BE68-D3E042E274BC, 3\r
-DEFINE_PROPERTYKEY(PKEY_Sync_ItemName, 0xCE50C159, 0x2FB8, 0x41FD, 0xBE, 0x68, 0xD3, 0xE0, 0x42, 0xE2, 0x74, 0xBC, 3);\r
- \r
-//-----------------------------------------------------------------------------\r
-// Task properties\r
-\r
-// Name: System.Task.BillingInformation -- PKEY_Task_BillingInformation\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: D37D52C6-261C-4303-82B3-08B926AC6F12, 100\r
-DEFINE_PROPERTYKEY(PKEY_Task_BillingInformation, 0xD37D52C6, 0x261C, 0x4303, 0x82, 0xB3, 0x08, 0xB9, 0x26, 0xAC, 0x6F, 0x12, 100);\r
-\r
-// Name: System.Task.CompletionStatus -- PKEY_Task_CompletionStatus\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 084D8A0A-E6D5-40DE-BF1F-C8820E7C877C, 100\r
-DEFINE_PROPERTYKEY(PKEY_Task_CompletionStatus, 0x084D8A0A, 0xE6D5, 0x40DE, 0xBF, 0x1F, 0xC8, 0x82, 0x0E, 0x7C, 0x87, 0x7C, 100);\r
-\r
-// Name: System.Task.Owner -- PKEY_Task_Owner\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: 08C7CC5F-60F2-4494-AD75-55E3E0B5ADD0, 100\r
-DEFINE_PROPERTYKEY(PKEY_Task_Owner, 0x08C7CC5F, 0x60F2, 0x4494, 0xAD, 0x75, 0x55, 0xE3, 0xE0, 0xB5, 0xAD, 0xD0, 100);\r
-\r
- \r
- \r
-//-----------------------------------------------------------------------------\r
-// Video properties\r
-\r
-// Name: System.Video.Compression -- PKEY_Video_Compression\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: (FMTID_VideoSummaryInformation) 64440491-4C8B-11D1-8B70-080036B11A03, 10 (PIDVSI_COMPRESSION)\r
-//\r
-// Indicates the level of compression for the video stream. "Compression".\r
-DEFINE_PROPERTYKEY(PKEY_Video_Compression, 0x64440491, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 10);\r
-\r
-// Name: System.Video.Director -- PKEY_Video_Director\r
-// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR)\r
-// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 20 (PIDMSI_DIRECTOR)\r
-//\r
-// \r
-DEFINE_PROPERTYKEY(PKEY_Video_Director, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 20);\r
-\r
-// Name: System.Video.EncodingBitrate -- PKEY_Video_EncodingBitrate\r
-// Type: UInt32 -- VT_UI4\r
-// FormatID: (FMTID_VideoSummaryInformation) 64440491-4C8B-11D1-8B70-080036B11A03, 8 (PIDVSI_DATA_RATE)\r
-//\r
-// Indicates the data rate in "bits per second" for the video stream. "DataRate".\r
-DEFINE_PROPERTYKEY(PKEY_Video_EncodingBitrate, 0x64440491, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 8);\r
-\r
-// Name: System.Video.FourCC -- PKEY_Video_FourCC\r
-// Type: UInt32 -- VT_UI4\r
-// FormatID: (FMTID_VideoSummaryInformation) 64440491-4C8B-11D1-8B70-080036B11A03, 44\r
-// \r
-// Indicates the 4CC for the video stream.\r
-DEFINE_PROPERTYKEY(PKEY_Video_FourCC, 0x64440491, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 44);\r
-\r
-// Name: System.Video.FrameHeight -- PKEY_Video_FrameHeight\r
-// Type: UInt32 -- VT_UI4\r
-// FormatID: (FMTID_VideoSummaryInformation) 64440491-4C8B-11D1-8B70-080036B11A03, 4\r
-//\r
-// Indicates the frame height for the video stream.\r
-DEFINE_PROPERTYKEY(PKEY_Video_FrameHeight, 0x64440491, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 4);\r
-\r
-// Name: System.Video.FrameRate -- PKEY_Video_FrameRate\r
-// Type: UInt32 -- VT_UI4\r
-// FormatID: (FMTID_VideoSummaryInformation) 64440491-4C8B-11D1-8B70-080036B11A03, 6 (PIDVSI_FRAME_RATE)\r
-//\r
-// Indicates the frame rate in "frames per millisecond" for the video stream. "FrameRate".\r
-DEFINE_PROPERTYKEY(PKEY_Video_FrameRate, 0x64440491, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 6);\r
-\r
-// Name: System.Video.FrameWidth -- PKEY_Video_FrameWidth\r
-// Type: UInt32 -- VT_UI4\r
-// FormatID: (FMTID_VideoSummaryInformation) 64440491-4C8B-11D1-8B70-080036B11A03, 3\r
-//\r
-// Indicates the frame width for the video stream.\r
-DEFINE_PROPERTYKEY(PKEY_Video_FrameWidth, 0x64440491, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 3);\r
-\r
-// Name: System.Video.HorizontalAspectRatio -- PKEY_Video_HorizontalAspectRatio\r
-// Type: UInt32 -- VT_UI4\r
-// FormatID: (FMTID_VideoSummaryInformation) 64440491-4C8B-11D1-8B70-080036B11A03, 42\r
-// \r
-// Indicates the horizontal portion of the aspect ratio. The X portion of XX:YY,\r
-// like 16:9.\r
-DEFINE_PROPERTYKEY(PKEY_Video_HorizontalAspectRatio, 0x64440491, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 42);\r
-\r
-// Name: System.Video.SampleSize -- PKEY_Video_SampleSize\r
-// Type: UInt32 -- VT_UI4\r
-// FormatID: (FMTID_VideoSummaryInformation) 64440491-4C8B-11D1-8B70-080036B11A03, 9 (PIDVSI_SAMPLE_SIZE)\r
-//\r
-// Indicates the sample size in bits for the video stream. "SampleSize".\r
-DEFINE_PROPERTYKEY(PKEY_Video_SampleSize, 0x64440491, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 9);\r
-\r
-// Name: System.Video.StreamName -- PKEY_Video_StreamName\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: (FMTID_VideoSummaryInformation) 64440491-4C8B-11D1-8B70-080036B11A03, 2 (PIDVSI_STREAM_NAME)\r
-//\r
-// Indicates the name for the video stream. "StreamName".\r
-DEFINE_PROPERTYKEY(PKEY_Video_StreamName, 0x64440491, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 2);\r
-\r
-// Name: System.Video.StreamNumber -- PKEY_Video_StreamNumber\r
-// Type: UInt16 -- VT_UI2\r
-// FormatID: (FMTID_VideoSummaryInformation) 64440491-4C8B-11D1-8B70-080036B11A03, 11 (PIDVSI_STREAM_NUMBER)\r
-//\r
-// "Stream Number".\r
-DEFINE_PROPERTYKEY(PKEY_Video_StreamNumber, 0x64440491, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 11);\r
-\r
-// Name: System.Video.TotalBitrate -- PKEY_Video_TotalBitrate\r
-// Type: UInt32 -- VT_UI4\r
-// FormatID: (FMTID_VideoSummaryInformation) 64440491-4C8B-11D1-8B70-080036B11A03, 43 (PIDVSI_TOTAL_BITRATE)\r
-//\r
-// Indicates the total data rate in "bits per second" for all video and audio streams.\r
-DEFINE_PROPERTYKEY(PKEY_Video_TotalBitrate, 0x64440491, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 43);\r
-\r
-// Name: System.Video.VerticalAspectRatio -- PKEY_Video_VerticalAspectRatio\r
-// Type: UInt32 -- VT_UI4\r
-// FormatID: (FMTID_VideoSummaryInformation) 64440491-4C8B-11D1-8B70-080036B11A03, 45\r
-// \r
-// Indicates the vertical portion of the aspect ratio. The Y portion of \r
-// XX:YY, like 16:9.\r
-DEFINE_PROPERTYKEY(PKEY_Video_VerticalAspectRatio, 0x64440491, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 45);\r
-\r
- \r
- \r
-//-----------------------------------------------------------------------------\r
-// Volume properties\r
-\r
-// Name: System.Volume.FileSystem -- PKEY_Volume_FileSystem\r
-// Type: String -- VT_LPWSTR (For variants: VT_BSTR)\r
-// FormatID: (FMTID_Volume) 9B174B35-40FF-11D2-A27E-00C04FC30871, 4 (PID_VOLUME_FILESYSTEM) (Filesystem Volume Properties)\r
-//\r
-// Indicates the filesystem of the volume.\r
-DEFINE_PROPERTYKEY(PKEY_Volume_FileSystem, 0x9B174B35, 0x40FF, 0x11D2, 0xA2, 0x7E, 0x00, 0xC0, 0x4F, 0xC3, 0x08, 0x71, 4);\r
-\r
-// Name: System.Volume.IsMappedDrive -- PKEY_Volume_IsMappedDrive\r
-// Type: Boolean -- VT_BOOL\r
-// FormatID: 149C0B69-2C2D-48FC-808F-D318D78C4636, 2\r
-DEFINE_PROPERTYKEY(PKEY_Volume_IsMappedDrive, 0x149C0B69, 0x2C2D, 0x48FC, 0x80, 0x8F, 0xD3, 0x18, 0xD7, 0x8C, 0x46, 0x36, 2);\r
-\r
-// Name: System.Volume.IsRoot -- PKEY_Volume_IsRoot\r
-// Type: Boolean -- VT_BOOL\r
-// FormatID: (FMTID_Volume) 9B174B35-40FF-11D2-A27E-00C04FC30871, 10 (Filesystem Volume Properties)\r
-//\r
-// \r
-DEFINE_PROPERTYKEY(PKEY_Volume_IsRoot, 0x9B174B35, 0x40FF, 0x11D2, 0xA2, 0x7E, 0x00, 0xC0, 0x4F, 0xC3, 0x08, 0x71, 10);\r
-\r
-#endif /* _INC_PROPKEY */\r
-\r
-\r
+//===========================================================================
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+//
+//===========================================================================
+
+
+#ifndef _INC_PROPKEY
+#define _INC_PROPKEY
+
+#ifndef DEFINE_API_PKEY
+#define DEFINE_API_PKEY(name, managed_name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8, pid) \
+ DEFINE_PROPERTYKEY(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8, pid)
+#endif
+
+#include <propkeydef.h>
+
+#ifndef _WIN32_IE
+#define _WIN32_IE 0x0501
+#else
+#if (_WIN32_IE < 0x0400) && defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0500)
+#error _WIN32_IE setting conflicts with _WIN32_WINNT setting
+#endif
+#endif
+
+
+//-----------------------------------------------------------------------------
+// Audio properties
+
+// Name: System.Audio.ChannelCount -- PKEY_Audio_ChannelCount
+// Type: UInt32 -- VT_UI4
+// FormatID: (FMTID_AudioSummaryInformation) 64440490-4C8B-11D1-8B70-080036B11A03, 7 (PIDASI_CHANNEL_COUNT)
+//
+// Indicates the channel count for the audio file. Values: 1 (mono), 2 (stereo).
+DEFINE_PROPERTYKEY(PKEY_Audio_ChannelCount, 0x64440490, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 7);
+
+// Possible discrete values for PKEY_Audio_ChannelCount are:
+#define AUDIO_CHANNELCOUNT_MONO 1ul
+#define AUDIO_CHANNELCOUNT_STEREO 2ul
+
+// Name: System.Audio.Compression -- PKEY_Audio_Compression
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: (FMTID_AudioSummaryInformation) 64440490-4C8B-11D1-8B70-080036B11A03, 10 (PIDASI_COMPRESSION)
+//
+//
+DEFINE_PROPERTYKEY(PKEY_Audio_Compression, 0x64440490, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 10);
+
+// Name: System.Audio.EncodingBitrate -- PKEY_Audio_EncodingBitrate
+// Type: UInt32 -- VT_UI4
+// FormatID: (FMTID_AudioSummaryInformation) 64440490-4C8B-11D1-8B70-080036B11A03, 4 (PIDASI_AVG_DATA_RATE)
+//
+// Indicates the average data rate in Hz for the audio file in "bits per second".
+DEFINE_PROPERTYKEY(PKEY_Audio_EncodingBitrate, 0x64440490, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 4);
+
+// Name: System.Audio.Format -- PKEY_Audio_Format
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR) Legacy code may treat this as VT_BSTR.
+// FormatID: (FMTID_AudioSummaryInformation) 64440490-4C8B-11D1-8B70-080036B11A03, 2 (PIDASI_FORMAT)
+//
+// Indicates the format of the audio file.
+DEFINE_PROPERTYKEY(PKEY_Audio_Format, 0x64440490, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 2);
+
+// Name: System.Audio.IsVariableBitRate -- PKEY_Audio_IsVariableBitRate
+// Type: Boolean -- VT_BOOL
+// FormatID: E6822FEE-8C17-4D62-823C-8E9CFCBD1D5C, 100
+DEFINE_PROPERTYKEY(PKEY_Audio_IsVariableBitRate, 0xE6822FEE, 0x8C17, 0x4D62, 0x82, 0x3C, 0x8E, 0x9C, 0xFC, 0xBD, 0x1D, 0x5C, 100);
+
+// Name: System.Audio.PeakValue -- PKEY_Audio_PeakValue
+// Type: UInt32 -- VT_UI4
+// FormatID: 2579E5D0-1116-4084-BD9A-9B4F7CB4DF5E, 100
+DEFINE_PROPERTYKEY(PKEY_Audio_PeakValue, 0x2579E5D0, 0x1116, 0x4084, 0xBD, 0x9A, 0x9B, 0x4F, 0x7C, 0xB4, 0xDF, 0x5E, 100);
+
+// Name: System.Audio.SampleRate -- PKEY_Audio_SampleRate
+// Type: UInt32 -- VT_UI4
+// FormatID: (FMTID_AudioSummaryInformation) 64440490-4C8B-11D1-8B70-080036B11A03, 5 (PIDASI_SAMPLE_RATE)
+//
+// Indicates the audio sample rate for the audio file in "samples per second".
+DEFINE_PROPERTYKEY(PKEY_Audio_SampleRate, 0x64440490, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 5);
+
+// Name: System.Audio.SampleSize -- PKEY_Audio_SampleSize
+// Type: UInt32 -- VT_UI4
+// FormatID: (FMTID_AudioSummaryInformation) 64440490-4C8B-11D1-8B70-080036B11A03, 6 (PIDASI_SAMPLE_SIZE)
+//
+// Indicates the audio sample size for the audio file in "bits per sample".
+DEFINE_PROPERTYKEY(PKEY_Audio_SampleSize, 0x64440490, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 6);
+
+// Name: System.Audio.StreamName -- PKEY_Audio_StreamName
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: (FMTID_AudioSummaryInformation) 64440490-4C8B-11D1-8B70-080036B11A03, 9 (PIDASI_STREAM_NAME)
+//
+//
+DEFINE_PROPERTYKEY(PKEY_Audio_StreamName, 0x64440490, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 9);
+
+// Name: System.Audio.StreamNumber -- PKEY_Audio_StreamNumber
+// Type: UInt16 -- VT_UI2
+// FormatID: (FMTID_AudioSummaryInformation) 64440490-4C8B-11D1-8B70-080036B11A03, 8 (PIDASI_STREAM_NUMBER)
+//
+//
+DEFINE_PROPERTYKEY(PKEY_Audio_StreamNumber, 0x64440490, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 8);
+
+
+
+//-----------------------------------------------------------------------------
+// Calendar properties
+
+// Name: System.Calendar.Duration -- PKEY_Calendar_Duration
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 293CA35A-09AA-4DD2-B180-1FE245728A52, 100
+//
+// The duration as specified in a string.
+DEFINE_PROPERTYKEY(PKEY_Calendar_Duration, 0x293CA35A, 0x09AA, 0x4DD2, 0xB1, 0x80, 0x1F, 0xE2, 0x45, 0x72, 0x8A, 0x52, 100);
+
+// Name: System.Calendar.IsOnline -- PKEY_Calendar_IsOnline
+// Type: Boolean -- VT_BOOL
+// FormatID: BFEE9149-E3E2-49A7-A862-C05988145CEC, 100
+//
+// Identifies if the event is an online event.
+DEFINE_PROPERTYKEY(PKEY_Calendar_IsOnline, 0xBFEE9149, 0xE3E2, 0x49A7, 0xA8, 0x62, 0xC0, 0x59, 0x88, 0x14, 0x5C, 0xEC, 100);
+
+// Name: System.Calendar.IsRecurring -- PKEY_Calendar_IsRecurring
+// Type: Boolean -- VT_BOOL
+// FormatID: 315B9C8D-80A9-4EF9-AE16-8E746DA51D70, 100
+DEFINE_PROPERTYKEY(PKEY_Calendar_IsRecurring, 0x315B9C8D, 0x80A9, 0x4EF9, 0xAE, 0x16, 0x8E, 0x74, 0x6D, 0xA5, 0x1D, 0x70, 100);
+
+// Name: System.Calendar.Location -- PKEY_Calendar_Location
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: F6272D18-CECC-40B1-B26A-3911717AA7BD, 100
+DEFINE_PROPERTYKEY(PKEY_Calendar_Location, 0xF6272D18, 0xCECC, 0x40B1, 0xB2, 0x6A, 0x39, 0x11, 0x71, 0x7A, 0xA7, 0xBD, 100);
+
+// Name: System.Calendar.OptionalAttendeeAddresses -- PKEY_Calendar_OptionalAttendeeAddresses
+// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR)
+// FormatID: D55BAE5A-3892-417A-A649-C6AC5AAAEAB3, 100
+DEFINE_PROPERTYKEY(PKEY_Calendar_OptionalAttendeeAddresses, 0xD55BAE5A, 0x3892, 0x417A, 0xA6, 0x49, 0xC6, 0xAC, 0x5A, 0xAA, 0xEA, 0xB3, 100);
+
+// Name: System.Calendar.OptionalAttendeeNames -- PKEY_Calendar_OptionalAttendeeNames
+// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR)
+// FormatID: 09429607-582D-437F-84C3-DE93A2B24C3C, 100
+DEFINE_PROPERTYKEY(PKEY_Calendar_OptionalAttendeeNames, 0x09429607, 0x582D, 0x437F, 0x84, 0xC3, 0xDE, 0x93, 0xA2, 0xB2, 0x4C, 0x3C, 100);
+
+// Name: System.Calendar.OrganizerAddress -- PKEY_Calendar_OrganizerAddress
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 744C8242-4DF5-456C-AB9E-014EFB9021E3, 100
+//
+// Address of the organizer organizing the event.
+DEFINE_PROPERTYKEY(PKEY_Calendar_OrganizerAddress, 0x744C8242, 0x4DF5, 0x456C, 0xAB, 0x9E, 0x01, 0x4E, 0xFB, 0x90, 0x21, 0xE3, 100);
+
+// Name: System.Calendar.OrganizerName -- PKEY_Calendar_OrganizerName
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: AAA660F9-9865-458E-B484-01BC7FE3973E, 100
+//
+// Name of the organizer organizing the event.
+DEFINE_PROPERTYKEY(PKEY_Calendar_OrganizerName, 0xAAA660F9, 0x9865, 0x458E, 0xB4, 0x84, 0x01, 0xBC, 0x7F, 0xE3, 0x97, 0x3E, 100);
+
+// Name: System.Calendar.ReminderTime -- PKEY_Calendar_ReminderTime
+// Type: DateTime -- VT_FILETIME (For variants: VT_DATE)
+// FormatID: 72FC5BA4-24F9-4011-9F3F-ADD27AFAD818, 100
+DEFINE_PROPERTYKEY(PKEY_Calendar_ReminderTime, 0x72FC5BA4, 0x24F9, 0x4011, 0x9F, 0x3F, 0xAD, 0xD2, 0x7A, 0xFA, 0xD8, 0x18, 100);
+
+// Name: System.Calendar.RequiredAttendeeAddresses -- PKEY_Calendar_RequiredAttendeeAddresses
+// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR)
+// FormatID: 0BA7D6C3-568D-4159-AB91-781A91FB71E5, 100
+DEFINE_PROPERTYKEY(PKEY_Calendar_RequiredAttendeeAddresses, 0x0BA7D6C3, 0x568D, 0x4159, 0xAB, 0x91, 0x78, 0x1A, 0x91, 0xFB, 0x71, 0xE5, 100);
+
+// Name: System.Calendar.RequiredAttendeeNames -- PKEY_Calendar_RequiredAttendeeNames
+// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR)
+// FormatID: B33AF30B-F552-4584-936C-CB93E5CDA29F, 100
+DEFINE_PROPERTYKEY(PKEY_Calendar_RequiredAttendeeNames, 0xB33AF30B, 0xF552, 0x4584, 0x93, 0x6C, 0xCB, 0x93, 0xE5, 0xCD, 0xA2, 0x9F, 100);
+
+// Name: System.Calendar.Resources -- PKEY_Calendar_Resources
+// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR)
+// FormatID: 00F58A38-C54B-4C40-8696-97235980EAE1, 100
+DEFINE_PROPERTYKEY(PKEY_Calendar_Resources, 0x00F58A38, 0xC54B, 0x4C40, 0x86, 0x96, 0x97, 0x23, 0x59, 0x80, 0xEA, 0xE1, 100);
+
+// Name: System.Calendar.ShowTimeAs -- PKEY_Calendar_ShowTimeAs
+// Type: UInt16 -- VT_UI2
+// FormatID: 5BF396D4-5EB2-466F-BDE9-2FB3F2361D6E, 100
+//
+//
+DEFINE_PROPERTYKEY(PKEY_Calendar_ShowTimeAs, 0x5BF396D4, 0x5EB2, 0x466F, 0xBD, 0xE9, 0x2F, 0xB3, 0xF2, 0x36, 0x1D, 0x6E, 100);
+
+// Possible discrete values for PKEY_Calendar_ShowTimeAs are:
+#define CALENDAR_SHOWTIMEAS_FREE 0u
+#define CALENDAR_SHOWTIMEAS_TENTATIVE 1u
+#define CALENDAR_SHOWTIMEAS_BUSY 2u
+#define CALENDAR_SHOWTIMEAS_OOF 3u
+
+// Name: System.Calendar.ShowTimeAsText -- PKEY_Calendar_ShowTimeAsText
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 53DA57CF-62C0-45C4-81DE-7610BCEFD7F5, 100
+//
+// This is the user-friendly form of System.Calendar.ShowTimeAs. Not intended to be parsed
+// programmatically.
+DEFINE_PROPERTYKEY(PKEY_Calendar_ShowTimeAsText, 0x53DA57CF, 0x62C0, 0x45C4, 0x81, 0xDE, 0x76, 0x10, 0xBC, 0xEF, 0xD7, 0xF5, 100);
+
+//-----------------------------------------------------------------------------
+// Communication properties
+
+
+
+// Name: System.Communication.AccountName -- PKEY_Communication_AccountName
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD, 9
+//
+// Account Name
+DEFINE_PROPERTYKEY(PKEY_Communication_AccountName, 0xE3E0584C, 0xB788, 0x4A5A, 0xBB, 0x20, 0x7F, 0x5A, 0x44, 0xC9, 0xAC, 0xDD, 9);
+
+// Name: System.Communication.Suffix -- PKEY_Communication_Suffix
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 807B653A-9E91-43EF-8F97-11CE04EE20C5, 100
+DEFINE_PROPERTYKEY(PKEY_Communication_Suffix, 0x807B653A, 0x9E91, 0x43EF, 0x8F, 0x97, 0x11, 0xCE, 0x04, 0xEE, 0x20, 0xC5, 100);
+
+// Name: System.Communication.TaskStatus -- PKEY_Communication_TaskStatus
+// Type: UInt16 -- VT_UI2
+// FormatID: BE1A72C6-9A1D-46B7-AFE7-AFAF8CEF4999, 100
+DEFINE_PROPERTYKEY(PKEY_Communication_TaskStatus, 0xBE1A72C6, 0x9A1D, 0x46B7, 0xAF, 0xE7, 0xAF, 0xAF, 0x8C, 0xEF, 0x49, 0x99, 100);
+
+// Possible discrete values for PKEY_Communication_TaskStatus are:
+#define TASKSTATUS_NOTSTARTED 0u
+#define TASKSTATUS_INPROGRESS 1u
+#define TASKSTATUS_COMPLETE 2u
+#define TASKSTATUS_WAITING 3u
+#define TASKSTATUS_DEFERRED 4u
+
+// Name: System.Communication.TaskStatusText -- PKEY_Communication_TaskStatusText
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: A6744477-C237-475B-A075-54F34498292A, 100
+//
+// This is the user-friendly form of System.Communication.TaskStatus. Not intended to be parsed
+// programmatically.
+DEFINE_PROPERTYKEY(PKEY_Communication_TaskStatusText, 0xA6744477, 0xC237, 0x475B, 0xA0, 0x75, 0x54, 0xF3, 0x44, 0x98, 0x29, 0x2A, 100);
+
+//-----------------------------------------------------------------------------
+// Computer properties
+
+
+
+// Name: System.Computer.DecoratedFreeSpace -- PKEY_Computer_DecoratedFreeSpace
+// Type: Multivalue UInt64 -- VT_VECTOR | VT_UI8 (For variants: VT_ARRAY | VT_UI8)
+// FormatID: (FMTID_Volume) 9B174B35-40FF-11D2-A27E-00C04FC30871, 7 (Filesystem Volume Properties)
+//
+// Free space and total space: "%s free of %s"
+DEFINE_PROPERTYKEY(PKEY_Computer_DecoratedFreeSpace, 0x9B174B35, 0x40FF, 0x11D2, 0xA2, 0x7E, 0x00, 0xC0, 0x4F, 0xC3, 0x08, 0x71, 7);
+
+//-----------------------------------------------------------------------------
+// Contact properties
+
+
+
+// Name: System.Contact.Anniversary -- PKEY_Contact_Anniversary
+// Type: DateTime -- VT_FILETIME (For variants: VT_DATE)
+// FormatID: 9AD5BADB-CEA7-4470-A03D-B84E51B9949E, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_Anniversary, 0x9AD5BADB, 0xCEA7, 0x4470, 0xA0, 0x3D, 0xB8, 0x4E, 0x51, 0xB9, 0x94, 0x9E, 100);
+
+// Name: System.Contact.AssistantName -- PKEY_Contact_AssistantName
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: CD102C9C-5540-4A88-A6F6-64E4981C8CD1, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_AssistantName, 0xCD102C9C, 0x5540, 0x4A88, 0xA6, 0xF6, 0x64, 0xE4, 0x98, 0x1C, 0x8C, 0xD1, 100);
+
+// Name: System.Contact.AssistantTelephone -- PKEY_Contact_AssistantTelephone
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 9A93244D-A7AD-4FF8-9B99-45EE4CC09AF6, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_AssistantTelephone, 0x9A93244D, 0xA7AD, 0x4FF8, 0x9B, 0x99, 0x45, 0xEE, 0x4C, 0xC0, 0x9A, 0xF6, 100);
+
+// Name: System.Contact.Birthday -- PKEY_Contact_Birthday
+// Type: DateTime -- VT_FILETIME (For variants: VT_DATE)
+// FormatID: 176DC63C-2688-4E89-8143-A347800F25E9, 47
+DEFINE_PROPERTYKEY(PKEY_Contact_Birthday, 0x176DC63C, 0x2688, 0x4E89, 0x81, 0x43, 0xA3, 0x47, 0x80, 0x0F, 0x25, 0xE9, 47);
+
+// Name: System.Contact.BusinessAddress -- PKEY_Contact_BusinessAddress
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 730FB6DD-CF7C-426B-A03F-BD166CC9EE24, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_BusinessAddress, 0x730FB6DD, 0xCF7C, 0x426B, 0xA0, 0x3F, 0xBD, 0x16, 0x6C, 0xC9, 0xEE, 0x24, 100);
+
+// Name: System.Contact.BusinessAddressCity -- PKEY_Contact_BusinessAddressCity
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 402B5934-EC5A-48C3-93E6-85E86A2D934E, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_BusinessAddressCity, 0x402B5934, 0xEC5A, 0x48C3, 0x93, 0xE6, 0x85, 0xE8, 0x6A, 0x2D, 0x93, 0x4E, 100);
+
+// Name: System.Contact.BusinessAddressCountry -- PKEY_Contact_BusinessAddressCountry
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: B0B87314-FCF6-4FEB-8DFF-A50DA6AF561C, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_BusinessAddressCountry, 0xB0B87314, 0xFCF6, 0x4FEB, 0x8D, 0xFF, 0xA5, 0x0D, 0xA6, 0xAF, 0x56, 0x1C, 100);
+
+// Name: System.Contact.BusinessAddressPostalCode -- PKEY_Contact_BusinessAddressPostalCode
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: E1D4A09E-D758-4CD1-B6EC-34A8B5A73F80, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_BusinessAddressPostalCode, 0xE1D4A09E, 0xD758, 0x4CD1, 0xB6, 0xEC, 0x34, 0xA8, 0xB5, 0xA7, 0x3F, 0x80, 100);
+
+// Name: System.Contact.BusinessAddressPostOfficeBox -- PKEY_Contact_BusinessAddressPostOfficeBox
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: BC4E71CE-17F9-48D5-BEE9-021DF0EA5409, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_BusinessAddressPostOfficeBox, 0xBC4E71CE, 0x17F9, 0x48D5, 0xBE, 0xE9, 0x02, 0x1D, 0xF0, 0xEA, 0x54, 0x09, 100);
+
+// Name: System.Contact.BusinessAddressState -- PKEY_Contact_BusinessAddressState
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 446F787F-10C4-41CB-A6C4-4D0343551597, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_BusinessAddressState, 0x446F787F, 0x10C4, 0x41CB, 0xA6, 0xC4, 0x4D, 0x03, 0x43, 0x55, 0x15, 0x97, 100);
+
+// Name: System.Contact.BusinessAddressStreet -- PKEY_Contact_BusinessAddressStreet
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: DDD1460F-C0BF-4553-8CE4-10433C908FB0, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_BusinessAddressStreet, 0xDDD1460F, 0xC0BF, 0x4553, 0x8C, 0xE4, 0x10, 0x43, 0x3C, 0x90, 0x8F, 0xB0, 100);
+
+// Name: System.Contact.BusinessFaxNumber -- PKEY_Contact_BusinessFaxNumber
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 91EFF6F3-2E27-42CA-933E-7C999FBE310B, 100
+//
+// Business fax number of the contact.
+DEFINE_PROPERTYKEY(PKEY_Contact_BusinessFaxNumber, 0x91EFF6F3, 0x2E27, 0x42CA, 0x93, 0x3E, 0x7C, 0x99, 0x9F, 0xBE, 0x31, 0x0B, 100);
+
+// Name: System.Contact.BusinessHomePage -- PKEY_Contact_BusinessHomePage
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 56310920-2491-4919-99CE-EADB06FAFDB2, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_BusinessHomePage, 0x56310920, 0x2491, 0x4919, 0x99, 0xCE, 0xEA, 0xDB, 0x06, 0xFA, 0xFD, 0xB2, 100);
+
+// Name: System.Contact.BusinessTelephone -- PKEY_Contact_BusinessTelephone
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 6A15E5A0-0A1E-4CD7-BB8C-D2F1B0C929BC, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_BusinessTelephone, 0x6A15E5A0, 0x0A1E, 0x4CD7, 0xBB, 0x8C, 0xD2, 0xF1, 0xB0, 0xC9, 0x29, 0xBC, 100);
+
+// Name: System.Contact.CallbackTelephone -- PKEY_Contact_CallbackTelephone
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: BF53D1C3-49E0-4F7F-8567-5A821D8AC542, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_CallbackTelephone, 0xBF53D1C3, 0x49E0, 0x4F7F, 0x85, 0x67, 0x5A, 0x82, 0x1D, 0x8A, 0xC5, 0x42, 100);
+
+// Name: System.Contact.CarTelephone -- PKEY_Contact_CarTelephone
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 8FDC6DEA-B929-412B-BA90-397A257465FE, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_CarTelephone, 0x8FDC6DEA, 0xB929, 0x412B, 0xBA, 0x90, 0x39, 0x7A, 0x25, 0x74, 0x65, 0xFE, 100);
+
+// Name: System.Contact.Children -- PKEY_Contact_Children
+// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR)
+// FormatID: D4729704-8EF1-43EF-9024-2BD381187FD5, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_Children, 0xD4729704, 0x8EF1, 0x43EF, 0x90, 0x24, 0x2B, 0xD3, 0x81, 0x18, 0x7F, 0xD5, 100);
+
+// Name: System.Contact.CompanyMainTelephone -- PKEY_Contact_CompanyMainTelephone
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 8589E481-6040-473D-B171-7FA89C2708ED, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_CompanyMainTelephone, 0x8589E481, 0x6040, 0x473D, 0xB1, 0x71, 0x7F, 0xA8, 0x9C, 0x27, 0x08, 0xED, 100);
+
+// Name: System.Contact.Department -- PKEY_Contact_Department
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: FC9F7306-FF8F-4D49-9FB6-3FFE5C0951EC, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_Department, 0xFC9F7306, 0xFF8F, 0x4D49, 0x9F, 0xB6, 0x3F, 0xFE, 0x5C, 0x09, 0x51, 0xEC, 100);
+
+// Name: System.Contact.EmailAddress -- PKEY_Contact_EmailAddress
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: F8FA7FA3-D12B-4785-8A4E-691A94F7A3E7, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_EmailAddress, 0xF8FA7FA3, 0xD12B, 0x4785, 0x8A, 0x4E, 0x69, 0x1A, 0x94, 0xF7, 0xA3, 0xE7, 100);
+
+// Name: System.Contact.EmailAddress2 -- PKEY_Contact_EmailAddress2
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 38965063-EDC8-4268-8491-B7723172CF29, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_EmailAddress2, 0x38965063, 0xEDC8, 0x4268, 0x84, 0x91, 0xB7, 0x72, 0x31, 0x72, 0xCF, 0x29, 100);
+
+// Name: System.Contact.EmailAddress3 -- PKEY_Contact_EmailAddress3
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 644D37B4-E1B3-4BAD-B099-7E7C04966ACA, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_EmailAddress3, 0x644D37B4, 0xE1B3, 0x4BAD, 0xB0, 0x99, 0x7E, 0x7C, 0x04, 0x96, 0x6A, 0xCA, 100);
+
+// Name: System.Contact.EmailAddresses -- PKEY_Contact_EmailAddresses
+// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR)
+// FormatID: 84D8F337-981D-44B3-9615-C7596DBA17E3, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_EmailAddresses, 0x84D8F337, 0x981D, 0x44B3, 0x96, 0x15, 0xC7, 0x59, 0x6D, 0xBA, 0x17, 0xE3, 100);
+
+// Name: System.Contact.EmailName -- PKEY_Contact_EmailName
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: CC6F4F24-6083-4BD4-8754-674D0DE87AB8, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_EmailName, 0xCC6F4F24, 0x6083, 0x4BD4, 0x87, 0x54, 0x67, 0x4D, 0x0D, 0xE8, 0x7A, 0xB8, 100);
+
+// Name: System.Contact.FileAsName -- PKEY_Contact_FileAsName
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: F1A24AA7-9CA7-40F6-89EC-97DEF9FFE8DB, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_FileAsName, 0xF1A24AA7, 0x9CA7, 0x40F6, 0x89, 0xEC, 0x97, 0xDE, 0xF9, 0xFF, 0xE8, 0xDB, 100);
+
+// Name: System.Contact.FirstName -- PKEY_Contact_FirstName
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 14977844-6B49-4AAD-A714-A4513BF60460, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_FirstName, 0x14977844, 0x6B49, 0x4AAD, 0xA7, 0x14, 0xA4, 0x51, 0x3B, 0xF6, 0x04, 0x60, 100);
+
+// Name: System.Contact.FullName -- PKEY_Contact_FullName
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 635E9051-50A5-4BA2-B9DB-4ED056C77296, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_FullName, 0x635E9051, 0x50A5, 0x4BA2, 0xB9, 0xDB, 0x4E, 0xD0, 0x56, 0xC7, 0x72, 0x96, 100);
+
+// Name: System.Contact.Gender -- PKEY_Contact_Gender
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 3C8CEE58-D4F0-4CF9-B756-4E5D24447BCD, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_Gender, 0x3C8CEE58, 0xD4F0, 0x4CF9, 0xB7, 0x56, 0x4E, 0x5D, 0x24, 0x44, 0x7B, 0xCD, 100);
+
+// Name: System.Contact.Hobbies -- PKEY_Contact_Hobbies
+// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR)
+// FormatID: 5DC2253F-5E11-4ADF-9CFE-910DD01E3E70, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_Hobbies, 0x5DC2253F, 0x5E11, 0x4ADF, 0x9C, 0xFE, 0x91, 0x0D, 0xD0, 0x1E, 0x3E, 0x70, 100);
+
+// Name: System.Contact.HomeAddress -- PKEY_Contact_HomeAddress
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 98F98354-617A-46B8-8560-5B1B64BF1F89, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_HomeAddress, 0x98F98354, 0x617A, 0x46B8, 0x85, 0x60, 0x5B, 0x1B, 0x64, 0xBF, 0x1F, 0x89, 100);
+
+// Name: System.Contact.HomeAddressCity -- PKEY_Contact_HomeAddressCity
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 176DC63C-2688-4E89-8143-A347800F25E9, 65
+DEFINE_PROPERTYKEY(PKEY_Contact_HomeAddressCity, 0x176DC63C, 0x2688, 0x4E89, 0x81, 0x43, 0xA3, 0x47, 0x80, 0x0F, 0x25, 0xE9, 65);
+
+// Name: System.Contact.HomeAddressCountry -- PKEY_Contact_HomeAddressCountry
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 08A65AA1-F4C9-43DD-9DDF-A33D8E7EAD85, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_HomeAddressCountry, 0x08A65AA1, 0xF4C9, 0x43DD, 0x9D, 0xDF, 0xA3, 0x3D, 0x8E, 0x7E, 0xAD, 0x85, 100);
+
+// Name: System.Contact.HomeAddressPostalCode -- PKEY_Contact_HomeAddressPostalCode
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 8AFCC170-8A46-4B53-9EEE-90BAE7151E62, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_HomeAddressPostalCode, 0x8AFCC170, 0x8A46, 0x4B53, 0x9E, 0xEE, 0x90, 0xBA, 0xE7, 0x15, 0x1E, 0x62, 100);
+
+// Name: System.Contact.HomeAddressPostOfficeBox -- PKEY_Contact_HomeAddressPostOfficeBox
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 7B9F6399-0A3F-4B12-89BD-4ADC51C918AF, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_HomeAddressPostOfficeBox, 0x7B9F6399, 0x0A3F, 0x4B12, 0x89, 0xBD, 0x4A, 0xDC, 0x51, 0xC9, 0x18, 0xAF, 100);
+
+// Name: System.Contact.HomeAddressState -- PKEY_Contact_HomeAddressState
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: C89A23D0-7D6D-4EB8-87D4-776A82D493E5, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_HomeAddressState, 0xC89A23D0, 0x7D6D, 0x4EB8, 0x87, 0xD4, 0x77, 0x6A, 0x82, 0xD4, 0x93, 0xE5, 100);
+
+// Name: System.Contact.HomeAddressStreet -- PKEY_Contact_HomeAddressStreet
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 0ADEF160-DB3F-4308-9A21-06237B16FA2A, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_HomeAddressStreet, 0x0ADEF160, 0xDB3F, 0x4308, 0x9A, 0x21, 0x06, 0x23, 0x7B, 0x16, 0xFA, 0x2A, 100);
+
+// Name: System.Contact.HomeFaxNumber -- PKEY_Contact_HomeFaxNumber
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 660E04D6-81AB-4977-A09F-82313113AB26, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_HomeFaxNumber, 0x660E04D6, 0x81AB, 0x4977, 0xA0, 0x9F, 0x82, 0x31, 0x31, 0x13, 0xAB, 0x26, 100);
+
+// Name: System.Contact.HomeTelephone -- PKEY_Contact_HomeTelephone
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 176DC63C-2688-4E89-8143-A347800F25E9, 20
+DEFINE_PROPERTYKEY(PKEY_Contact_HomeTelephone, 0x176DC63C, 0x2688, 0x4E89, 0x81, 0x43, 0xA3, 0x47, 0x80, 0x0F, 0x25, 0xE9, 20);
+
+// Name: System.Contact.IMAddress -- PKEY_Contact_IMAddress
+// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR)
+// FormatID: D68DBD8A-3374-4B81-9972-3EC30682DB3D, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_IMAddress, 0xD68DBD8A, 0x3374, 0x4B81, 0x99, 0x72, 0x3E, 0xC3, 0x06, 0x82, 0xDB, 0x3D, 100);
+
+// Name: System.Contact.Initials -- PKEY_Contact_Initials
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: F3D8F40D-50CB-44A2-9718-40CB9119495D, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_Initials, 0xF3D8F40D, 0x50CB, 0x44A2, 0x97, 0x18, 0x40, 0xCB, 0x91, 0x19, 0x49, 0x5D, 100);
+
+// Name: System.Contact.JA.CompanyNamePhonetic -- PKEY_Contact_JA_CompanyNamePhonetic
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 897B3694-FE9E-43E6-8066-260F590C0100, 2
+//
+//
+DEFINE_PROPERTYKEY(PKEY_Contact_JA_CompanyNamePhonetic, 0x897B3694, 0xFE9E, 0x43E6, 0x80, 0x66, 0x26, 0x0F, 0x59, 0x0C, 0x01, 0x00, 2);
+
+// Name: System.Contact.JA.FirstNamePhonetic -- PKEY_Contact_JA_FirstNamePhonetic
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 897B3694-FE9E-43E6-8066-260F590C0100, 3
+//
+//
+DEFINE_PROPERTYKEY(PKEY_Contact_JA_FirstNamePhonetic, 0x897B3694, 0xFE9E, 0x43E6, 0x80, 0x66, 0x26, 0x0F, 0x59, 0x0C, 0x01, 0x00, 3);
+
+// Name: System.Contact.JA.LastNamePhonetic -- PKEY_Contact_JA_LastNamePhonetic
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 897B3694-FE9E-43E6-8066-260F590C0100, 4
+//
+//
+DEFINE_PROPERTYKEY(PKEY_Contact_JA_LastNamePhonetic, 0x897B3694, 0xFE9E, 0x43E6, 0x80, 0x66, 0x26, 0x0F, 0x59, 0x0C, 0x01, 0x00, 4);
+
+// Name: System.Contact.JobTitle -- PKEY_Contact_JobTitle
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 176DC63C-2688-4E89-8143-A347800F25E9, 6
+DEFINE_PROPERTYKEY(PKEY_Contact_JobTitle, 0x176DC63C, 0x2688, 0x4E89, 0x81, 0x43, 0xA3, 0x47, 0x80, 0x0F, 0x25, 0xE9, 6);
+
+// Name: System.Contact.Label -- PKEY_Contact_Label
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 97B0AD89-DF49-49CC-834E-660974FD755B, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_Label, 0x97B0AD89, 0xDF49, 0x49CC, 0x83, 0x4E, 0x66, 0x09, 0x74, 0xFD, 0x75, 0x5B, 100);
+
+// Name: System.Contact.LastName -- PKEY_Contact_LastName
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 8F367200-C270-457C-B1D4-E07C5BCD90C7, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_LastName, 0x8F367200, 0xC270, 0x457C, 0xB1, 0xD4, 0xE0, 0x7C, 0x5B, 0xCD, 0x90, 0xC7, 100);
+
+// Name: System.Contact.MailingAddress -- PKEY_Contact_MailingAddress
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: C0AC206A-827E-4650-95AE-77E2BB74FCC9, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_MailingAddress, 0xC0AC206A, 0x827E, 0x4650, 0x95, 0xAE, 0x77, 0xE2, 0xBB, 0x74, 0xFC, 0xC9, 100);
+
+// Name: System.Contact.MiddleName -- PKEY_Contact_MiddleName
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 176DC63C-2688-4E89-8143-A347800F25E9, 71
+DEFINE_PROPERTYKEY(PKEY_Contact_MiddleName, 0x176DC63C, 0x2688, 0x4E89, 0x81, 0x43, 0xA3, 0x47, 0x80, 0x0F, 0x25, 0xE9, 71);
+
+// Name: System.Contact.MobileTelephone -- PKEY_Contact_MobileTelephone
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 176DC63C-2688-4E89-8143-A347800F25E9, 35
+DEFINE_PROPERTYKEY(PKEY_Contact_MobileTelephone, 0x176DC63C, 0x2688, 0x4E89, 0x81, 0x43, 0xA3, 0x47, 0x80, 0x0F, 0x25, 0xE9, 35);
+
+// Name: System.Contact.NickName -- PKEY_Contact_NickName
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 176DC63C-2688-4E89-8143-A347800F25E9, 74
+DEFINE_PROPERTYKEY(PKEY_Contact_NickName, 0x176DC63C, 0x2688, 0x4E89, 0x81, 0x43, 0xA3, 0x47, 0x80, 0x0F, 0x25, 0xE9, 74);
+
+// Name: System.Contact.OfficeLocation -- PKEY_Contact_OfficeLocation
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 176DC63C-2688-4E89-8143-A347800F25E9, 7
+DEFINE_PROPERTYKEY(PKEY_Contact_OfficeLocation, 0x176DC63C, 0x2688, 0x4E89, 0x81, 0x43, 0xA3, 0x47, 0x80, 0x0F, 0x25, 0xE9, 7);
+
+// Name: System.Contact.OtherAddress -- PKEY_Contact_OtherAddress
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 508161FA-313B-43D5-83A1-C1ACCF68622C, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_OtherAddress, 0x508161FA, 0x313B, 0x43D5, 0x83, 0xA1, 0xC1, 0xAC, 0xCF, 0x68, 0x62, 0x2C, 100);
+
+// Name: System.Contact.OtherAddressCity -- PKEY_Contact_OtherAddressCity
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 6E682923-7F7B-4F0C-A337-CFCA296687BF, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_OtherAddressCity, 0x6E682923, 0x7F7B, 0x4F0C, 0xA3, 0x37, 0xCF, 0xCA, 0x29, 0x66, 0x87, 0xBF, 100);
+
+// Name: System.Contact.OtherAddressCountry -- PKEY_Contact_OtherAddressCountry
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 8F167568-0AAE-4322-8ED9-6055B7B0E398, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_OtherAddressCountry, 0x8F167568, 0x0AAE, 0x4322, 0x8E, 0xD9, 0x60, 0x55, 0xB7, 0xB0, 0xE3, 0x98, 100);
+
+// Name: System.Contact.OtherAddressPostalCode -- PKEY_Contact_OtherAddressPostalCode
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 95C656C1-2ABF-4148-9ED3-9EC602E3B7CD, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_OtherAddressPostalCode, 0x95C656C1, 0x2ABF, 0x4148, 0x9E, 0xD3, 0x9E, 0xC6, 0x02, 0xE3, 0xB7, 0xCD, 100);
+
+// Name: System.Contact.OtherAddressPostOfficeBox -- PKEY_Contact_OtherAddressPostOfficeBox
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 8B26EA41-058F-43F6-AECC-4035681CE977, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_OtherAddressPostOfficeBox, 0x8B26EA41, 0x058F, 0x43F6, 0xAE, 0xCC, 0x40, 0x35, 0x68, 0x1C, 0xE9, 0x77, 100);
+
+// Name: System.Contact.OtherAddressState -- PKEY_Contact_OtherAddressState
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 71B377D6-E570-425F-A170-809FAE73E54E, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_OtherAddressState, 0x71B377D6, 0xE570, 0x425F, 0xA1, 0x70, 0x80, 0x9F, 0xAE, 0x73, 0xE5, 0x4E, 100);
+
+// Name: System.Contact.OtherAddressStreet -- PKEY_Contact_OtherAddressStreet
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: FF962609-B7D6-4999-862D-95180D529AEA, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_OtherAddressStreet, 0xFF962609, 0xB7D6, 0x4999, 0x86, 0x2D, 0x95, 0x18, 0x0D, 0x52, 0x9A, 0xEA, 100);
+
+// Name: System.Contact.PagerTelephone -- PKEY_Contact_PagerTelephone
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: D6304E01-F8F5-4F45-8B15-D024A6296789, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_PagerTelephone, 0xD6304E01, 0xF8F5, 0x4F45, 0x8B, 0x15, 0xD0, 0x24, 0xA6, 0x29, 0x67, 0x89, 100);
+
+// Name: System.Contact.PersonalTitle -- PKEY_Contact_PersonalTitle
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 176DC63C-2688-4E89-8143-A347800F25E9, 69
+DEFINE_PROPERTYKEY(PKEY_Contact_PersonalTitle, 0x176DC63C, 0x2688, 0x4E89, 0x81, 0x43, 0xA3, 0x47, 0x80, 0x0F, 0x25, 0xE9, 69);
+
+// Name: System.Contact.PrimaryAddressCity -- PKEY_Contact_PrimaryAddressCity
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: C8EA94F0-A9E3-4969-A94B-9C62A95324E0, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_PrimaryAddressCity, 0xC8EA94F0, 0xA9E3, 0x4969, 0xA9, 0x4B, 0x9C, 0x62, 0xA9, 0x53, 0x24, 0xE0, 100);
+
+// Name: System.Contact.PrimaryAddressCountry -- PKEY_Contact_PrimaryAddressCountry
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: E53D799D-0F3F-466E-B2FF-74634A3CB7A4, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_PrimaryAddressCountry, 0xE53D799D, 0x0F3F, 0x466E, 0xB2, 0xFF, 0x74, 0x63, 0x4A, 0x3C, 0xB7, 0xA4, 100);
+
+// Name: System.Contact.PrimaryAddressPostalCode -- PKEY_Contact_PrimaryAddressPostalCode
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 18BBD425-ECFD-46EF-B612-7B4A6034EDA0, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_PrimaryAddressPostalCode, 0x18BBD425, 0xECFD, 0x46EF, 0xB6, 0x12, 0x7B, 0x4A, 0x60, 0x34, 0xED, 0xA0, 100);
+
+// Name: System.Contact.PrimaryAddressPostOfficeBox -- PKEY_Contact_PrimaryAddressPostOfficeBox
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: DE5EF3C7-46E1-484E-9999-62C5308394C1, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_PrimaryAddressPostOfficeBox, 0xDE5EF3C7, 0x46E1, 0x484E, 0x99, 0x99, 0x62, 0xC5, 0x30, 0x83, 0x94, 0xC1, 100);
+
+// Name: System.Contact.PrimaryAddressState -- PKEY_Contact_PrimaryAddressState
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: F1176DFE-7138-4640-8B4C-AE375DC70A6D, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_PrimaryAddressState, 0xF1176DFE, 0x7138, 0x4640, 0x8B, 0x4C, 0xAE, 0x37, 0x5D, 0xC7, 0x0A, 0x6D, 100);
+
+// Name: System.Contact.PrimaryAddressStreet -- PKEY_Contact_PrimaryAddressStreet
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 63C25B20-96BE-488F-8788-C09C407AD812, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_PrimaryAddressStreet, 0x63C25B20, 0x96BE, 0x488F, 0x87, 0x88, 0xC0, 0x9C, 0x40, 0x7A, 0xD8, 0x12, 100);
+
+// Name: System.Contact.PrimaryEmailAddress -- PKEY_Contact_PrimaryEmailAddress
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 176DC63C-2688-4E89-8143-A347800F25E9, 48
+DEFINE_PROPERTYKEY(PKEY_Contact_PrimaryEmailAddress, 0x176DC63C, 0x2688, 0x4E89, 0x81, 0x43, 0xA3, 0x47, 0x80, 0x0F, 0x25, 0xE9, 48);
+
+// Name: System.Contact.PrimaryTelephone -- PKEY_Contact_PrimaryTelephone
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 176DC63C-2688-4E89-8143-A347800F25E9, 25
+DEFINE_PROPERTYKEY(PKEY_Contact_PrimaryTelephone, 0x176DC63C, 0x2688, 0x4E89, 0x81, 0x43, 0xA3, 0x47, 0x80, 0x0F, 0x25, 0xE9, 25);
+
+// Name: System.Contact.Profession -- PKEY_Contact_Profession
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 7268AF55-1CE4-4F6E-A41F-B6E4EF10E4A9, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_Profession, 0x7268AF55, 0x1CE4, 0x4F6E, 0xA4, 0x1F, 0xB6, 0xE4, 0xEF, 0x10, 0xE4, 0xA9, 100);
+
+// Name: System.Contact.SpouseName -- PKEY_Contact_SpouseName
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 9D2408B6-3167-422B-82B0-F583B7A7CFE3, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_SpouseName, 0x9D2408B6, 0x3167, 0x422B, 0x82, 0xB0, 0xF5, 0x83, 0xB7, 0xA7, 0xCF, 0xE3, 100);
+
+// Name: System.Contact.Suffix -- PKEY_Contact_Suffix
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 176DC63C-2688-4E89-8143-A347800F25E9, 73
+DEFINE_PROPERTYKEY(PKEY_Contact_Suffix, 0x176DC63C, 0x2688, 0x4E89, 0x81, 0x43, 0xA3, 0x47, 0x80, 0x0F, 0x25, 0xE9, 73);
+
+// Name: System.Contact.TelexNumber -- PKEY_Contact_TelexNumber
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: C554493C-C1F7-40C1-A76C-EF8C0614003E, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_TelexNumber, 0xC554493C, 0xC1F7, 0x40C1, 0xA7, 0x6C, 0xEF, 0x8C, 0x06, 0x14, 0x00, 0x3E, 100);
+
+// Name: System.Contact.TTYTDDTelephone -- PKEY_Contact_TTYTDDTelephone
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: AAF16BAC-2B55-45E6-9F6D-415EB94910DF, 100
+DEFINE_PROPERTYKEY(PKEY_Contact_TTYTDDTelephone, 0xAAF16BAC, 0x2B55, 0x45E6, 0x9F, 0x6D, 0x41, 0x5E, 0xB9, 0x49, 0x10, 0xDF, 100);
+
+// Name: System.Contact.WebPage -- PKEY_Contact_WebPage
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD, 18
+DEFINE_PROPERTYKEY(PKEY_Contact_WebPage, 0xE3E0584C, 0xB788, 0x4A5A, 0xBB, 0x20, 0x7F, 0x5A, 0x44, 0xC9, 0xAC, 0xDD, 18);
+
+//-----------------------------------------------------------------------------
+// Core properties
+
+
+
+// Name: System.AcquisitionID -- PKEY_AcquisitionID
+// Type: Int32 -- VT_I4
+// FormatID: 65A98875-3C80-40AB-ABBC-EFDAF77DBEE2, 100
+//
+// Hash to determine acquisition session.
+DEFINE_PROPERTYKEY(PKEY_AcquisitionID, 0x65A98875, 0x3C80, 0x40AB, 0xAB, 0xBC, 0xEF, 0xDA, 0xF7, 0x7D, 0xBE, 0xE2, 100);
+
+// Name: System.ApplicationName -- PKEY_ApplicationName
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR) Legacy code may treat this as VT_LPSTR.
+// FormatID: (FMTID_SummaryInformation) F29F85E0-4FF9-1068-AB91-08002B27B3D9, 18 (PIDSI_APPNAME)
+//
+//
+DEFINE_PROPERTYKEY(PKEY_ApplicationName, 0xF29F85E0, 0x4FF9, 0x1068, 0xAB, 0x91, 0x08, 0x00, 0x2B, 0x27, 0xB3, 0xD9, 18);
+
+// Name: System.Author -- PKEY_Author
+// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) Legacy code may treat this as VT_LPSTR.
+// FormatID: (FMTID_SummaryInformation) F29F85E0-4FF9-1068-AB91-08002B27B3D9, 4 (PIDSI_AUTHOR)
+//
+//
+DEFINE_PROPERTYKEY(PKEY_Author, 0xF29F85E0, 0x4FF9, 0x1068, 0xAB, 0x91, 0x08, 0x00, 0x2B, 0x27, 0xB3, 0xD9, 4);
+
+// Name: System.Capacity -- PKEY_Capacity
+// Type: UInt64 -- VT_UI8
+// FormatID: (FMTID_Volume) 9B174B35-40FF-11D2-A27E-00C04FC30871, 3 (PID_VOLUME_CAPACITY) (Filesystem Volume Properties)
+//
+// The amount of total space in bytes.
+DEFINE_PROPERTYKEY(PKEY_Capacity, 0x9B174B35, 0x40FF, 0x11D2, 0xA2, 0x7E, 0x00, 0xC0, 0x4F, 0xC3, 0x08, 0x71, 3);
+
+// Name: System.Category -- PKEY_Category
+// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR)
+// FormatID: (FMTID_DocumentSummaryInformation) D5CDD502-2E9C-101B-9397-08002B2CF9AE, 2 (PIDDSI_CATEGORY)
+//
+// Legacy code treats this as VT_LPSTR.
+DEFINE_PROPERTYKEY(PKEY_Category, 0xD5CDD502, 0x2E9C, 0x101B, 0x93, 0x97, 0x08, 0x00, 0x2B, 0x2C, 0xF9, 0xAE, 2);
+
+// Name: System.Comment -- PKEY_Comment
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR) Legacy code may treat this as VT_LPSTR.
+// FormatID: (FMTID_SummaryInformation) F29F85E0-4FF9-1068-AB91-08002B27B3D9, 6 (PIDSI_COMMENTS)
+//
+// Comments.
+DEFINE_PROPERTYKEY(PKEY_Comment, 0xF29F85E0, 0x4FF9, 0x1068, 0xAB, 0x91, 0x08, 0x00, 0x2B, 0x27, 0xB3, 0xD9, 6);
+
+// Name: System.Company -- PKEY_Company
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: (FMTID_DocumentSummaryInformation) D5CDD502-2E9C-101B-9397-08002B2CF9AE, 15 (PIDDSI_COMPANY)
+//
+// The company or publisher.
+DEFINE_PROPERTYKEY(PKEY_Company, 0xD5CDD502, 0x2E9C, 0x101B, 0x93, 0x97, 0x08, 0x00, 0x2B, 0x2C, 0xF9, 0xAE, 15);
+
+// Name: System.ComputerName -- PKEY_ComputerName
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: (FMTID_ShellDetails) 28636AA6-953D-11D2-B5D6-00C04FD918D0, 5 (PID_COMPUTERNAME)
+//
+//
+DEFINE_PROPERTYKEY(PKEY_ComputerName, 0x28636AA6, 0x953D, 0x11D2, 0xB5, 0xD6, 0x00, 0xC0, 0x4F, 0xD9, 0x18, 0xD0, 5);
+
+// Name: System.ContainedItems -- PKEY_ContainedItems
+// Type: Multivalue Guid -- VT_VECTOR | VT_CLSID (For variants: VT_ARRAY | VT_CLSID)
+// FormatID: (FMTID_ShellDetails) 28636AA6-953D-11D2-B5D6-00C04FD918D0, 29
+//
+// The list of type of items, this item contains. For example, this item contains urls, attachments etc.
+// This is represented as a vector array of GUIDs where each GUID represents certain type.
+DEFINE_PROPERTYKEY(PKEY_ContainedItems, 0x28636AA6, 0x953D, 0x11D2, 0xB5, 0xD6, 0x00, 0xC0, 0x4F, 0xD9, 0x18, 0xD0, 29);
+
+// Name: System.ContentStatus -- PKEY_ContentStatus
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: (FMTID_DocumentSummaryInformation) D5CDD502-2E9C-101B-9397-08002B2CF9AE, 27
+DEFINE_PROPERTYKEY(PKEY_ContentStatus, 0xD5CDD502, 0x2E9C, 0x101B, 0x93, 0x97, 0x08, 0x00, 0x2B, 0x2C, 0xF9, 0xAE, 27);
+
+// Name: System.ContentType -- PKEY_ContentType
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: (FMTID_DocumentSummaryInformation) D5CDD502-2E9C-101B-9397-08002B2CF9AE, 26
+DEFINE_PROPERTYKEY(PKEY_ContentType, 0xD5CDD502, 0x2E9C, 0x101B, 0x93, 0x97, 0x08, 0x00, 0x2B, 0x2C, 0xF9, 0xAE, 26);
+
+// Name: System.Copyright -- PKEY_Copyright
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 11 (PIDMSI_COPYRIGHT)
+//
+//
+DEFINE_PROPERTYKEY(PKEY_Copyright, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 11);
+
+// Name: System.DateAccessed -- PKEY_DateAccessed
+// Type: DateTime -- VT_FILETIME (For variants: VT_DATE)
+// FormatID: (FMTID_Storage) B725F130-47EF-101A-A5F1-02608C9EEBAC, 16 (PID_STG_ACCESSTIME)
+//
+// The time of the last access to the item. The Indexing Service friendly name is 'access'.
+DEFINE_PROPERTYKEY(PKEY_DateAccessed, 0xB725F130, 0x47EF, 0x101A, 0xA5, 0xF1, 0x02, 0x60, 0x8C, 0x9E, 0xEB, 0xAC, 16);
+
+// Name: System.DateAcquired -- PKEY_DateAcquired
+// Type: DateTime -- VT_FILETIME (For variants: VT_DATE)
+// FormatID: 2CBAA8F5-D81F-47CA-B17A-F8D822300131, 100
+//
+// The time the file entered the system via acquisition. This is not the same as System.DateImported.
+// Examples are when pictures are acquired from a camera, or when music is purchased online.
+DEFINE_PROPERTYKEY(PKEY_DateAcquired, 0x2CBAA8F5, 0xD81F, 0x47CA, 0xB1, 0x7A, 0xF8, 0xD8, 0x22, 0x30, 0x01, 0x31, 100);
+
+// Name: System.DateArchived -- PKEY_DateArchived
+// Type: DateTime -- VT_FILETIME (For variants: VT_DATE)
+// FormatID: 43F8D7B7-A444-4F87-9383-52271C9B915C, 100
+DEFINE_PROPERTYKEY(PKEY_DateArchived, 0x43F8D7B7, 0xA444, 0x4F87, 0x93, 0x83, 0x52, 0x27, 0x1C, 0x9B, 0x91, 0x5C, 100);
+
+// Name: System.DateCompleted -- PKEY_DateCompleted
+// Type: DateTime -- VT_FILETIME (For variants: VT_DATE)
+// FormatID: 72FAB781-ACDA-43E5-B155-B2434F85E678, 100
+DEFINE_PROPERTYKEY(PKEY_DateCompleted, 0x72FAB781, 0xACDA, 0x43E5, 0xB1, 0x55, 0xB2, 0x43, 0x4F, 0x85, 0xE6, 0x78, 100);
+
+// Name: System.DateCreated -- PKEY_DateCreated
+// Type: DateTime -- VT_FILETIME (For variants: VT_DATE)
+// FormatID: (FMTID_Storage) B725F130-47EF-101A-A5F1-02608C9EEBAC, 15 (PID_STG_CREATETIME)
+//
+// The date and time the item was created. The Indexing Service friendly name is 'create'.
+DEFINE_PROPERTYKEY(PKEY_DateCreated, 0xB725F130, 0x47EF, 0x101A, 0xA5, 0xF1, 0x02, 0x60, 0x8C, 0x9E, 0xEB, 0xAC, 15);
+
+// Name: System.DateImported -- PKEY_DateImported
+// Type: DateTime -- VT_FILETIME (For variants: VT_DATE)
+// FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 18258
+//
+// The time the file is imported into a separate database. This is not the same as System.DateAcquired. (Eg, 2003:05:22 13:55:04)
+DEFINE_PROPERTYKEY(PKEY_DateImported, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 18258);
+
+// Name: System.DateModified -- PKEY_DateModified
+// Type: DateTime -- VT_FILETIME (For variants: VT_DATE)
+// FormatID: (FMTID_Storage) B725F130-47EF-101A-A5F1-02608C9EEBAC, 14 (PID_STG_WRITETIME)
+//
+// The date and time of the last write to the item. The Indexing Service friendly name is 'write'.
+DEFINE_PROPERTYKEY(PKEY_DateModified, 0xB725F130, 0x47EF, 0x101A, 0xA5, 0xF1, 0x02, 0x60, 0x8C, 0x9E, 0xEB, 0xAC, 14);
+
+// Name: System.DueDate -- PKEY_DueDate
+// Type: DateTime -- VT_FILETIME (For variants: VT_DATE)
+// FormatID: 3F8472B5-E0AF-4DB2-8071-C53FE76AE7CE, 100
+DEFINE_PROPERTYKEY(PKEY_DueDate, 0x3F8472B5, 0xE0AF, 0x4DB2, 0x80, 0x71, 0xC5, 0x3F, 0xE7, 0x6A, 0xE7, 0xCE, 100);
+
+// Name: System.EndDate -- PKEY_EndDate
+// Type: DateTime -- VT_FILETIME (For variants: VT_DATE)
+// FormatID: C75FAA05-96FD-49E7-9CB4-9F601082D553, 100
+DEFINE_PROPERTYKEY(PKEY_EndDate, 0xC75FAA05, 0x96FD, 0x49E7, 0x9C, 0xB4, 0x9F, 0x60, 0x10, 0x82, 0xD5, 0x53, 100);
+
+// Name: System.FileAllocationSize -- PKEY_FileAllocationSize
+// Type: UInt64 -- VT_UI8
+// FormatID: (FMTID_Storage) B725F130-47EF-101A-A5F1-02608C9EEBAC, 18 (PID_STG_ALLOCSIZE)
+//
+//
+DEFINE_PROPERTYKEY(PKEY_FileAllocationSize, 0xB725F130, 0x47EF, 0x101A, 0xA5, 0xF1, 0x02, 0x60, 0x8C, 0x9E, 0xEB, 0xAC, 18);
+
+// Name: System.FileAttributes -- PKEY_FileAttributes
+// Type: UInt32 -- VT_UI4
+// FormatID: (FMTID_Storage) B725F130-47EF-101A-A5F1-02608C9EEBAC, 13 (PID_STG_ATTRIBUTES)
+//
+// This is the WIN32_FIND_DATA dwFileAttributes for the file-based item.
+DEFINE_PROPERTYKEY(PKEY_FileAttributes, 0xB725F130, 0x47EF, 0x101A, 0xA5, 0xF1, 0x02, 0x60, 0x8C, 0x9E, 0xEB, 0xAC, 13);
+
+// Name: System.FileCount -- PKEY_FileCount
+// Type: UInt64 -- VT_UI8
+// FormatID: (FMTID_ShellDetails) 28636AA6-953D-11D2-B5D6-00C04FD918D0, 12
+//
+//
+DEFINE_PROPERTYKEY(PKEY_FileCount, 0x28636AA6, 0x953D, 0x11D2, 0xB5, 0xD6, 0x00, 0xC0, 0x4F, 0xD9, 0x18, 0xD0, 12);
+
+// Name: System.FileDescription -- PKEY_FileDescription
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: (PSFMTID_VERSION) 0CEF7D53-FA64-11D1-A203-0000F81FEDEE, 3 (PIDVSI_FileDescription)
+//
+// This is a user-friendly description of the file.
+DEFINE_PROPERTYKEY(PKEY_FileDescription, 0x0CEF7D53, 0xFA64, 0x11D1, 0xA2, 0x03, 0x00, 0x00, 0xF8, 0x1F, 0xED, 0xEE, 3);
+
+// Name: System.FileExtension -- PKEY_FileExtension
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: E4F10A3C-49E6-405D-8288-A23BD4EEAA6C, 100
+//
+// This is the file extension of the file based item, including the leading period.
+//
+// If System.FileName is VT_EMPTY, then this property should be too. Otherwise, it should be derived
+// appropriately by the data source from System.FileName. If System.FileName does not have a file
+// extension, this value should be VT_EMPTY.
+//
+// To obtain the type of any item (including an item that is not a file), use System.ItemType.
+//
+// Example values:
+//
+// If the path is... The property value is...
+// ----------------- ------------------------
+// "c:\foo\bar\hello.txt" ".txt"
+// "\\server\share\mydir\goodnews.doc" ".doc"
+// "\\server\share\numbers.xls" ".xls"
+// "\\server\share\folder" VT_EMPTY
+// "c:\foo\MyFolder" VT_EMPTY
+// [desktop] VT_EMPTY
+DEFINE_PROPERTYKEY(PKEY_FileExtension, 0xE4F10A3C, 0x49E6, 0x405D, 0x82, 0x88, 0xA2, 0x3B, 0xD4, 0xEE, 0xAA, 0x6C, 100);
+
+// Name: System.FileFRN -- PKEY_FileFRN
+// Type: UInt64 -- VT_UI8
+// FormatID: (FMTID_Storage) B725F130-47EF-101A-A5F1-02608C9EEBAC, 21 (PID_STG_FRN)
+//
+// This is the unique file ID, also known as the File Reference Number. For a given file, this is the same value
+// as is found in the structure variable FILE_ID_BOTH_DIR_INFO.FileId, via GetFileInformationByHandleEx().
+DEFINE_PROPERTYKEY(PKEY_FileFRN, 0xB725F130, 0x47EF, 0x101A, 0xA5, 0xF1, 0x02, 0x60, 0x8C, 0x9E, 0xEB, 0xAC, 21);
+
+// Name: System.FileName -- PKEY_FileName
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 41CF5AE0-F75A-4806-BD87-59C7D9248EB9, 100
+//
+// This is the file name (including extension) of the file.
+//
+// It is possible that the item might not exist on a filesystem (ie, it may not be opened
+// using CreateFile). Nonetheless, if the item is represented as a file from the logical sense
+// (and its name follows standard Win32 file-naming syntax), then the data source should emit this property.
+//
+// If an item is not a file, then the value for this property is VT_EMPTY. See
+// System.ItemNameDisplay.
+//
+// This has the same value as System.ParsingName for items that are provided by the Shell's file folder.
+//
+// Example values:
+//
+// If the path is... The property value is...
+// ----------------- ------------------------
+// "c:\foo\bar\hello.txt" "hello.txt"
+// "\\server\share\mydir\goodnews.doc" "goodnews.doc"
+// "\\server\share\numbers.xls" "numbers.xls"
+// "c:\foo\MyFolder" "MyFolder"
+// (email message) VT_EMPTY
+// (song on portable device) "song.wma"
+DEFINE_PROPERTYKEY(PKEY_FileName, 0x41CF5AE0, 0xF75A, 0x4806, 0xBD, 0x87, 0x59, 0xC7, 0xD9, 0x24, 0x8E, 0xB9, 100);
+
+// Name: System.FileOwner -- PKEY_FileOwner
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: (FMTID_Misc) 9B174B34-40FF-11D2-A27E-00C04FC30871, 4 (PID_MISC_OWNER)
+//
+// This is the owner of the file, according to the file system.
+DEFINE_PROPERTYKEY(PKEY_FileOwner, 0x9B174B34, 0x40FF, 0x11D2, 0xA2, 0x7E, 0x00, 0xC0, 0x4F, 0xC3, 0x08, 0x71, 4);
+
+// Name: System.FileVersion -- PKEY_FileVersion
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: (PSFMTID_VERSION) 0CEF7D53-FA64-11D1-A203-0000F81FEDEE, 4 (PIDVSI_FileVersion)
+//
+//
+DEFINE_PROPERTYKEY(PKEY_FileVersion, 0x0CEF7D53, 0xFA64, 0x11D1, 0xA2, 0x03, 0x00, 0x00, 0xF8, 0x1F, 0xED, 0xEE, 4);
+
+// Name: System.FindData -- PKEY_FindData
+// Type: Buffer -- VT_VECTOR | VT_UI1 (For variants: VT_ARRAY | VT_UI1)
+// FormatID: (FMTID_ShellDetails) 28636AA6-953D-11D2-B5D6-00C04FD918D0, 0 (PID_FINDDATA)
+//
+// WIN32_FIND_DATAW in buffer of bytes.
+DEFINE_PROPERTYKEY(PKEY_FindData, 0x28636AA6, 0x953D, 0x11D2, 0xB5, 0xD6, 0x00, 0xC0, 0x4F, 0xD9, 0x18, 0xD0, 0);
+
+// Name: System.FlagColor -- PKEY_FlagColor
+// Type: UInt16 -- VT_UI2
+// FormatID: 67DF94DE-0CA7-4D6F-B792-053A3E4F03CF, 100
+//
+//
+DEFINE_PROPERTYKEY(PKEY_FlagColor, 0x67DF94DE, 0x0CA7, 0x4D6F, 0xB7, 0x92, 0x05, 0x3A, 0x3E, 0x4F, 0x03, 0xCF, 100);
+
+// Possible discrete values for PKEY_FlagColor are:
+#define FLAGCOLOR_PURPLE 1u
+#define FLAGCOLOR_ORANGE 2u
+#define FLAGCOLOR_GREEN 3u
+#define FLAGCOLOR_YELLOW 4u
+#define FLAGCOLOR_BLUE 5u
+#define FLAGCOLOR_RED 6u
+
+// Name: System.FlagColorText -- PKEY_FlagColorText
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 45EAE747-8E2A-40AE-8CBF-CA52ABA6152A, 100
+//
+// This is the user-friendly form of System.FlagColor. Not intended to be parsed
+// programmatically.
+DEFINE_PROPERTYKEY(PKEY_FlagColorText, 0x45EAE747, 0x8E2A, 0x40AE, 0x8C, 0xBF, 0xCA, 0x52, 0xAB, 0xA6, 0x15, 0x2A, 100);
+
+// Name: System.FlagStatus -- PKEY_FlagStatus
+// Type: Int32 -- VT_I4
+// FormatID: E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD, 12
+//
+// Status of Flag. Values: (0=none 1=white 2=Red). cdoPR_FLAG_STATUS
+DEFINE_PROPERTYKEY(PKEY_FlagStatus, 0xE3E0584C, 0xB788, 0x4A5A, 0xBB, 0x20, 0x7F, 0x5A, 0x44, 0xC9, 0xAC, 0xDD, 12);
+
+// Possible discrete values for PKEY_FlagStatus are:
+#define FLAGSTATUS_NOTFLAGGED 0l
+#define FLAGSTATUS_COMPLETED 1l
+#define FLAGSTATUS_FOLLOWUP 2l
+
+// Name: System.FlagStatusText -- PKEY_FlagStatusText
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: DC54FD2E-189D-4871-AA01-08C2F57A4ABC, 100
+//
+// This is the user-friendly form of System.FlagStatus. Not intended to be parsed
+// programmatically.
+DEFINE_PROPERTYKEY(PKEY_FlagStatusText, 0xDC54FD2E, 0x189D, 0x4871, 0xAA, 0x01, 0x08, 0xC2, 0xF5, 0x7A, 0x4A, 0xBC, 100);
+
+// Name: System.FreeSpace -- PKEY_FreeSpace
+// Type: UInt64 -- VT_UI8
+// FormatID: (FMTID_Volume) 9B174B35-40FF-11D2-A27E-00C04FC30871, 2 (PID_VOLUME_FREE) (Filesystem Volume Properties)
+//
+// The amount of free space in bytes.
+DEFINE_PROPERTYKEY(PKEY_FreeSpace, 0x9B174B35, 0x40FF, 0x11D2, 0xA2, 0x7E, 0x00, 0xC0, 0x4F, 0xC3, 0x08, 0x71, 2);
+
+// Name: System.Identity -- PKEY_Identity
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: A26F4AFC-7346-4299-BE47-EB1AE613139F, 100
+DEFINE_PROPERTYKEY(PKEY_Identity, 0xA26F4AFC, 0x7346, 0x4299, 0xBE, 0x47, 0xEB, 0x1A, 0xE6, 0x13, 0x13, 0x9F, 100);
+
+// Name: System.Importance -- PKEY_Importance
+// Type: Int32 -- VT_I4
+// FormatID: E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD, 11
+DEFINE_PROPERTYKEY(PKEY_Importance, 0xE3E0584C, 0xB788, 0x4A5A, 0xBB, 0x20, 0x7F, 0x5A, 0x44, 0xC9, 0xAC, 0xDD, 11);
+
+// Possible range of values for PKEY_Importance are:
+#define IMPORTANCE_LOW_MIN 0l
+#define IMPORTANCE_LOW_SET 1l
+#define IMPORTANCE_LOW_MAX 1l
+
+#define IMPORTANCE_NORMAL_MIN 2l
+#define IMPORTANCE_NORMAL_SET 3l
+#define IMPORTANCE_NORMAL_MAX 4l
+
+#define IMPORTANCE_HIGH_MIN 5l
+#define IMPORTANCE_HIGH_SET 5l
+#define IMPORTANCE_HIGH_MAX 5l
+
+
+// Name: System.ImportanceText -- PKEY_ImportanceText
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: A3B29791-7713-4E1D-BB40-17DB85F01831, 100
+//
+// This is the user-friendly form of System.Importance. Not intended to be parsed
+// programmatically.
+DEFINE_PROPERTYKEY(PKEY_ImportanceText, 0xA3B29791, 0x7713, 0x4E1D, 0xBB, 0x40, 0x17, 0xDB, 0x85, 0xF0, 0x18, 0x31, 100);
+
+// Name: System.IsAttachment -- PKEY_IsAttachment
+// Type: Boolean -- VT_BOOL
+// FormatID: F23F425C-71A1-4FA8-922F-678EA4A60408, 100
+//
+// Identifies if this item is an attachment.
+DEFINE_PROPERTYKEY(PKEY_IsAttachment, 0xF23F425C, 0x71A1, 0x4FA8, 0x92, 0x2F, 0x67, 0x8E, 0xA4, 0xA6, 0x04, 0x08, 100);
+
+// Name: System.IsDeleted -- PKEY_IsDeleted
+// Type: Boolean -- VT_BOOL
+// FormatID: 5CDA5FC8-33EE-4FF3-9094-AE7BD8868C4D, 100
+DEFINE_PROPERTYKEY(PKEY_IsDeleted, 0x5CDA5FC8, 0x33EE, 0x4FF3, 0x90, 0x94, 0xAE, 0x7B, 0xD8, 0x86, 0x8C, 0x4D, 100);
+
+// Name: System.IsFlagged -- PKEY_IsFlagged
+// Type: Boolean -- VT_BOOL
+// FormatID: 5DA84765-E3FF-4278-86B0-A27967FBDD03, 100
+DEFINE_PROPERTYKEY(PKEY_IsFlagged, 0x5DA84765, 0xE3FF, 0x4278, 0x86, 0xB0, 0xA2, 0x79, 0x67, 0xFB, 0xDD, 0x03, 100);
+
+// Name: System.IsFlaggedComplete -- PKEY_IsFlaggedComplete
+// Type: Boolean -- VT_BOOL
+// FormatID: A6F360D2-55F9-48DE-B909-620E090A647C, 100
+DEFINE_PROPERTYKEY(PKEY_IsFlaggedComplete, 0xA6F360D2, 0x55F9, 0x48DE, 0xB9, 0x09, 0x62, 0x0E, 0x09, 0x0A, 0x64, 0x7C, 100);
+
+// Name: System.IsIncomplete -- PKEY_IsIncomplete
+// Type: Boolean -- VT_BOOL
+// FormatID: 346C8BD1-2E6A-4C45-89A4-61B78E8E700F, 100
+//
+// Identifies if the message was not completely received for some error condition.
+DEFINE_PROPERTYKEY(PKEY_IsIncomplete, 0x346C8BD1, 0x2E6A, 0x4C45, 0x89, 0xA4, 0x61, 0xB7, 0x8E, 0x8E, 0x70, 0x0F, 100);
+
+// Name: System.IsRead -- PKEY_IsRead
+// Type: Boolean -- VT_BOOL
+// FormatID: E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD, 10
+//
+// Has the item been read?
+DEFINE_PROPERTYKEY(PKEY_IsRead, 0xE3E0584C, 0xB788, 0x4A5A, 0xBB, 0x20, 0x7F, 0x5A, 0x44, 0xC9, 0xAC, 0xDD, 10);
+
+// Name: System.IsSendToTarget -- PKEY_IsSendToTarget
+// Type: Boolean -- VT_BOOL
+// FormatID: (FMTID_ShellDetails) 28636AA6-953D-11D2-B5D6-00C04FD918D0, 33
+//
+// Provided by certain shell folders. Return TRUE if the folder is a valid Send To target.
+DEFINE_PROPERTYKEY(PKEY_IsSendToTarget, 0x28636AA6, 0x953D, 0x11D2, 0xB5, 0xD6, 0x00, 0xC0, 0x4F, 0xD9, 0x18, 0xD0, 33);
+
+// Name: System.IsShared -- PKEY_IsShared
+// Type: Boolean -- VT_BOOL
+// FormatID: EF884C5B-2BFE-41BB-AAE5-76EEDF4F9902, 100
+//
+// Is this item shared?
+DEFINE_PROPERTYKEY(PKEY_IsShared, 0xEF884C5B, 0x2BFE, 0x41BB, 0xAA, 0xE5, 0x76, 0xEE, 0xDF, 0x4F, 0x99, 0x02, 100);
+
+// Name: System.ItemAuthors -- PKEY_ItemAuthors
+// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR)
+// FormatID: D0A04F0A-462A-48A4-BB2F-3706E88DBD7D, 100
+//
+// This is the generic list of authors associated with an item.
+//
+// For example, the artist name for a track is the item author.
+DEFINE_PROPERTYKEY(PKEY_ItemAuthors, 0xD0A04F0A, 0x462A, 0x48A4, 0xBB, 0x2F, 0x37, 0x06, 0xE8, 0x8D, 0xBD, 0x7D, 100);
+
+// Name: System.ItemDate -- PKEY_ItemDate
+// Type: DateTime -- VT_FILETIME (For variants: VT_DATE)
+// FormatID: F7DB74B4-4287-4103-AFBA-F1B13DCD75CF, 100
+//
+// This is the main date for an item. The date of interest.
+//
+// For example, for photos this maps to System.Photo.DateTaken.
+DEFINE_PROPERTYKEY(PKEY_ItemDate, 0xF7DB74B4, 0x4287, 0x4103, 0xAF, 0xBA, 0xF1, 0xB1, 0x3D, 0xCD, 0x75, 0xCF, 100);
+
+// Name: System.ItemFolderNameDisplay -- PKEY_ItemFolderNameDisplay
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: (FMTID_Storage) B725F130-47EF-101A-A5F1-02608C9EEBAC, 2 (PID_STG_DIRECTORY)
+//
+// This is the user-friendly display name of the parent folder of an item.
+//
+// If System.ItemFolderPathDisplay is VT_EMPTY, then this property should be too. Otherwise, it
+// should be derived appropriately by the data source from System.ItemFolderPathDisplay.
+//
+// Example values:
+//
+// If the path is... The property value is...
+// ----------------- ------------------------
+// "c:\foo\bar\hello.txt" "bar"
+// "\\server\share\mydir\goodnews.doc" "mydir"
+// "\\server\share\numbers.xls" "share"
+// "c:\foo\MyFolder" "foo"
+// "/Mailbox Account/Inbox/'Re: Hello!'" "Inbox"
+DEFINE_PROPERTYKEY(PKEY_ItemFolderNameDisplay, 0xB725F130, 0x47EF, 0x101A, 0xA5, 0xF1, 0x02, 0x60, 0x8C, 0x9E, 0xEB, 0xAC, 2);
+
+// Name: System.ItemFolderPathDisplay -- PKEY_ItemFolderPathDisplay
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD, 6
+//
+// This is the user-friendly display path of the parent folder of an item.
+//
+// If System.ItemPathDisplay is VT_EMPTY, then this property should be too. Otherwise, it should
+// be derived appropriately by the data source from System.ItemPathDisplay.
+//
+// Example values:
+//
+// If the path is... The property value is...
+// ----------------- ------------------------
+// "c:\foo\bar\hello.txt" "c:\foo\bar"
+// "\\server\share\mydir\goodnews.doc" "\\server\share\mydir"
+// "\\server\share\numbers.xls" "\\server\share"
+// "c:\foo\MyFolder" "c:\foo"
+// "/Mailbox Account/Inbox/'Re: Hello!'" "/Mailbox Account/Inbox"
+DEFINE_PROPERTYKEY(PKEY_ItemFolderPathDisplay, 0xE3E0584C, 0xB788, 0x4A5A, 0xBB, 0x20, 0x7F, 0x5A, 0x44, 0xC9, 0xAC, 0xDD, 6);
+
+// Name: System.ItemFolderPathDisplayNarrow -- PKEY_ItemFolderPathDisplayNarrow
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: DABD30ED-0043-4789-A7F8-D013A4736622, 100
+//
+// This is the user-friendly display path of the parent folder of an item. The format of the string
+// should be tailored such that the folder name comes first, to optimize for a narrow viewing column.
+//
+// If the folder is a file folder, the value includes localized names if they are present.
+//
+// If System.ItemFolderPathDisplay is VT_EMPTY, then this property should be too. Otherwise, it should
+// be derived appropriately by the data source from System.ItemFolderPathDisplay.
+//
+// Example values:
+//
+// If the path is... The property value is...
+// ----------------- ------------------------
+// "c:\foo\bar\hello.txt" "bar (c:\foo)"
+// "\\server\share\mydir\goodnews.doc" "mydir (\\server\share)"
+// "\\server\share\numbers.xls" "share (\\server)"
+// "c:\foo\MyFolder" "foo (c:\)"
+// "/Mailbox Account/Inbox/'Re: Hello!'" "Inbox (/Mailbox Account)"
+DEFINE_PROPERTYKEY(PKEY_ItemFolderPathDisplayNarrow, 0xDABD30ED, 0x0043, 0x4789, 0xA7, 0xF8, 0xD0, 0x13, 0xA4, 0x73, 0x66, 0x22, 100);
+
+// Name: System.ItemName -- PKEY_ItemName
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 6B8DA074-3B5C-43BC-886F-0A2CDCE00B6F, 100
+//
+// This is the base-name of the System.ItemNameDisplay.
+//
+// If the item is a file this property
+// includes the extension in all cases, and will be localized if a localized name is available.
+//
+// If the item is a message, then the value of this property does not include the forwarding or
+// reply prefixes (see System.ItemNamePrefix).
+DEFINE_PROPERTYKEY(PKEY_ItemName, 0x6B8DA074, 0x3B5C, 0x43BC, 0x88, 0x6F, 0x0A, 0x2C, 0xDC, 0xE0, 0x0B, 0x6F, 100);
+
+// Name: System.ItemNameDisplay -- PKEY_ItemNameDisplay
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: (FMTID_Storage) B725F130-47EF-101A-A5F1-02608C9EEBAC, 10 (PID_STG_NAME)
+//
+// This is the display name in "most complete" form. This is the best effort unique representation
+// of the name of an item that makes sense for end users to read. It is the concatentation of
+// System.ItemNamePrefix and System.ItemName.
+//
+// If the item is a file this property
+// includes the extension in all cases, and will be localized if a localized name is available.
+//
+// There are acceptable cases when System.FileName is not VT_EMPTY, yet the value of this property
+// is completely different. Email messages are a key example. If the item is an email message,
+// the item name is likely the subject. In that case, the value must be the concatenation of the
+// System.ItemNamePrefix and System.ItemName. Since the value of System.ItemNamePrefix excludes
+// any trailing whitespace, the concatenation must include a whitespace when generating System.ItemNameDisplay.
+//
+// Note that this property is not guaranteed to be unique, but the idea is to promote the most likely
+// candidate that can be unique and also makes sense for end users. For example, for documents, you
+// might think about using System.Title as the System.ItemNameDisplay, but in practice the title of
+// the documents may not be useful or unique enough to be of value as the sole System.ItemNameDisplay.
+// Instead, providing the value of System.FileName as the value of System.ItemNameDisplay is a better
+// candidate. In Windows Mail, the emails are stored in the file system as .eml files and the
+// System.FileName for those files are not human-friendly as they contain GUIDs. In this example,
+// promoting System.Subject as System.ItemNameDisplay makes more sense.
+//
+// Compatibility notes:
+//
+// Shell folder implementations on Vista: use PKEY_ItemNameDisplay for the name column when
+// you want Explorer to call ISF::GetDisplayNameOf(SHGDN_NORMAL) to get the value of the name. Use
+// another PKEY (like PKEY_ItemName) when you want Explorer to call either the folder's property store or
+// ISF2::GetDetailsEx in order to get the value of the name.
+//
+// Shell folder implementations on XP: the first column needs to be the name column, and Explorer
+// will call ISF::GetDisplayNameOf to get the value of the name. The PKEY/SCID does not matter.
+//
+// Example values:
+//
+// File: "hello.txt"
+// Message: "Re: Let's talk about Tom's argyle socks!"
+// Device folder: "song.wma"
+// Folder: "Documents"
+DEFINE_PROPERTYKEY(PKEY_ItemNameDisplay, 0xB725F130, 0x47EF, 0x101A, 0xA5, 0xF1, 0x02, 0x60, 0x8C, 0x9E, 0xEB, 0xAC, 10);
+
+// Name: System.ItemNamePrefix -- PKEY_ItemNamePrefix
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: D7313FF1-A77A-401C-8C99-3DBDD68ADD36, 100
+//
+// This is the prefix of an item, used for email messages.
+// where the subject begins with "Re:" which is the prefix.
+//
+// If the item is a file, then the value of this property is VT_EMPTY.
+//
+// If the item is a message, then the value of this property is the forwarding or reply
+// prefixes (including delimiting colon, but no whitespace), or VT_EMPTY if there is no prefix.
+//
+// Example values:
+//
+// System.ItemNamePrefix System.ItemName System.ItemNameDisplay
+// --------------------- ------------------- ----------------------
+// VT_EMPTY "Great day" "Great day"
+// "Re:" "Great day" "Re: Great day"
+// "Fwd: " "Monthly budget" "Fwd: Monthly budget"
+// VT_EMPTY "accounts.xls" "accounts.xls"
+DEFINE_PROPERTYKEY(PKEY_ItemNamePrefix, 0xD7313FF1, 0xA77A, 0x401C, 0x8C, 0x99, 0x3D, 0xBD, 0xD6, 0x8A, 0xDD, 0x36, 100);
+
+// Name: System.ItemParticipants -- PKEY_ItemParticipants
+// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR)
+// FormatID: D4D0AA16-9948-41A4-AA85-D97FF9646993, 100
+//
+// This is the generic list of people associated with an item and who contributed
+// to the item.
+//
+// For example, this is the combination of people in the To list, Cc list and
+// sender of an email message.
+DEFINE_PROPERTYKEY(PKEY_ItemParticipants, 0xD4D0AA16, 0x9948, 0x41A4, 0xAA, 0x85, 0xD9, 0x7F, 0xF9, 0x64, 0x69, 0x93, 100);
+
+// Name: System.ItemPathDisplay -- PKEY_ItemPathDisplay
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD, 7
+//
+// This is the user-friendly display path to the item.
+//
+// If the item is a file or folder this property
+// includes the extension in all cases, and will be localized if a localized name is available.
+//
+// For other items,this is the user-friendly equivalent, assuming the item exists in hierarchical storage.
+//
+// Unlike System.ItemUrl, this property value does not include the URL scheme.
+//
+// To parse an item path, use System.ItemUrl or System.ParsingPath. To reference shell
+// namespace items using shell APIs, use System.ParsingPath.
+//
+// Example values:
+//
+// If the path is... The property value is...
+// ----------------- ------------------------
+// "c:\foo\bar\hello.txt" "c:\foo\bar\hello.txt"
+// "\\server\share\mydir\goodnews.doc" "\\server\share\mydir\goodnews.doc"
+// "\\server\share\numbers.xls" "\\server\share\numbers.xls"
+// "c:\foo\MyFolder" "c:\foo\MyFolder"
+// "/Mailbox Account/Inbox/'Re: Hello!'" "/Mailbox Account/Inbox/'Re: Hello!'"
+DEFINE_PROPERTYKEY(PKEY_ItemPathDisplay, 0xE3E0584C, 0xB788, 0x4A5A, 0xBB, 0x20, 0x7F, 0x5A, 0x44, 0xC9, 0xAC, 0xDD, 7);
+
+// Name: System.ItemPathDisplayNarrow -- PKEY_ItemPathDisplayNarrow
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: (FMTID_ShellDetails) 28636AA6-953D-11D2-B5D6-00C04FD918D0, 8
+//
+// This is the user-friendly display path to the item. The format of the string should be
+// tailored such that the name comes first, to optimize for a narrow viewing column.
+//
+// If the item is a file, the value excludes the file extension, and includes localized names if they are present.
+// If the item is a message, the value includes the System.ItemNamePrefix.
+//
+// To parse an item path, use System.ItemUrl or System.ParsingPath.
+//
+// Example values:
+//
+// If the path is... The property value is...
+// ----------------- ------------------------
+// "c:\foo\bar\hello.txt" "hello (c:\foo\bar)"
+// "\\server\share\mydir\goodnews.doc" "goodnews (\\server\share\mydir)"
+// "\\server\share\folder" "folder (\\server\share)"
+// "c:\foo\MyFolder" "MyFolder (c:\foo)"
+// "/Mailbox Account/Inbox/'Re: Hello!'" "Re: Hello! (/Mailbox Account/Inbox)"
+DEFINE_PROPERTYKEY(PKEY_ItemPathDisplayNarrow, 0x28636AA6, 0x953D, 0x11D2, 0xB5, 0xD6, 0x00, 0xC0, 0x4F, 0xD9, 0x18, 0xD0, 8);
+
+// Name: System.ItemType -- PKEY_ItemType
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: (FMTID_ShellDetails) 28636AA6-953D-11D2-B5D6-00C04FD918D0, 11
+//
+// This is the canonical type of the item and is intended to be programmatically
+// parsed.
+//
+// If there is no canonical type, the value is VT_EMPTY.
+//
+// If the item is a file (ie, System.FileName is not VT_EMPTY), the value is the same as
+// System.FileExtension.
+//
+// Use System.ItemTypeText when you want to display the type to end users in a view. (If
+// the item is a file, passing the System.ItemType value to PSFormatForDisplay will
+// result in the same value as System.ItemTypeText.)
+//
+// Example values:
+//
+// If the path is... The property value is...
+// ----------------- ------------------------
+// "c:\foo\bar\hello.txt" ".txt"
+// "\\server\share\mydir\goodnews.doc" ".doc"
+// "\\server\share\folder" "Directory"
+// "c:\foo\MyFolder" "Directory"
+// [desktop] "Folder"
+// "/Mailbox Account/Inbox/'Re: Hello!'" "MAPI/IPM.Message"
+DEFINE_PROPERTYKEY(PKEY_ItemType, 0x28636AA6, 0x953D, 0x11D2, 0xB5, 0xD6, 0x00, 0xC0, 0x4F, 0xD9, 0x18, 0xD0, 11);
+
+// Name: System.ItemTypeText -- PKEY_ItemTypeText
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: (FMTID_Storage) B725F130-47EF-101A-A5F1-02608C9EEBAC, 4 (PID_STG_STORAGETYPE)
+//
+// This is the user friendly type name of the item. This is not intended to be
+// programmatically parsed.
+//
+// If System.ItemType is VT_EMPTY, the value of this property is also VT_EMPTY.
+//
+// If the item is a file, the value of this property is the same as if you passed the
+// file's System.ItemType value to PSFormatForDisplay.
+//
+// This property should not be confused with System.Kind, where System.Kind is a high-level
+// user friendly kind name. For example, for a document, System.Kind = "Document" and
+// System.Item.Type = ".doc" and System.Item.TypeText = "Microsoft Word Document"
+//
+// Example values:
+//
+// If the path is... The property value is...
+// ----------------- ------------------------
+// "c:\foo\bar\hello.txt" "Text File"
+// "\\server\share\mydir\goodnews.doc" "Microsoft Word Document"
+// "\\server\share\folder" "File Folder"
+// "c:\foo\MyFolder" "File Folder"
+// "/Mailbox Account/Inbox/'Re: Hello!'" "Outlook E-Mail Message"
+DEFINE_PROPERTYKEY(PKEY_ItemTypeText, 0xB725F130, 0x47EF, 0x101A, 0xA5, 0xF1, 0x02, 0x60, 0x8C, 0x9E, 0xEB, 0xAC, 4);
+
+// Name: System.ItemUrl -- PKEY_ItemUrl
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: (FMTID_Query) 49691C90-7E17-101A-A91C-08002B2ECDA9, 9 (PROPID_QUERY_VIRTUALPATH)
+//
+// This always represents a well formed URL that points to the item.
+//
+// To reference shell namespace items using shell APIs, use System.ParsingPath.
+//
+// Example values:
+//
+// Files: "file:///c:/foo/bar/hello.txt"
+// "csc://{GUID}/..."
+// Messages: "mapi://..."
+DEFINE_PROPERTYKEY(PKEY_ItemUrl, 0x49691C90, 0x7E17, 0x101A, 0xA9, 0x1C, 0x08, 0x00, 0x2B, 0x2E, 0xCD, 0xA9, 9);
+
+// Name: System.Keywords -- PKEY_Keywords
+// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) Legacy code may treat this as VT_LPSTR.
+// FormatID: (FMTID_SummaryInformation) F29F85E0-4FF9-1068-AB91-08002B27B3D9, 5 (PIDSI_KEYWORDS)
+//
+// The keywords for the item. Also referred to as tags.
+DEFINE_PROPERTYKEY(PKEY_Keywords, 0xF29F85E0, 0x4FF9, 0x1068, 0xAB, 0x91, 0x08, 0x00, 0x2B, 0x27, 0xB3, 0xD9, 5);
+
+// Name: System.Kind -- PKEY_Kind
+// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR)
+// FormatID: 1E3EE840-BC2B-476C-8237-2ACD1A839B22, 3
+//
+// System.Kind is used to map extensions to various .Search folders.
+// Extensions are mapped to Kinds at HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Explorer\KindMap
+// The list of kinds is not extensible.
+DEFINE_PROPERTYKEY(PKEY_Kind, 0x1E3EE840, 0xBC2B, 0x476C, 0x82, 0x37, 0x2A, 0xCD, 0x1A, 0x83, 0x9B, 0x22, 3);
+
+// Possible discrete values for PKEY_Kind are:
+#define KIND_CALENDAR L"calendar"
+#define KIND_COMMUNICATION L"communication"
+#define KIND_CONTACT L"contact"
+#define KIND_DOCUMENT L"document"
+#define KIND_EMAIL L"email"
+#define KIND_FEED L"feed"
+#define KIND_FOLDER L"folder"
+#define KIND_GAME L"game"
+#define KIND_INSTANTMESSAGE L"instantmessage"
+#define KIND_JOURNAL L"journal"
+#define KIND_LINK L"link"
+#define KIND_MOVIE L"movie"
+#define KIND_MUSIC L"music"
+#define KIND_NOTE L"note"
+#define KIND_PICTURE L"picture"
+#define KIND_PROGRAM L"program"
+#define KIND_RECORDEDTV L"recordedtv"
+#define KIND_SEARCHFOLDER L"searchfolder"
+#define KIND_TASK L"task"
+#define KIND_VIDEO L"video"
+#define KIND_WEBHISTORY L"webhistory"
+
+// Name: System.KindText -- PKEY_KindText
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: F04BEF95-C585-4197-A2B7-DF46FDC9EE6D, 100
+//
+// This is the user-friendly form of System.Kind. Not intended to be parsed
+// programmatically.
+DEFINE_PROPERTYKEY(PKEY_KindText, 0xF04BEF95, 0xC585, 0x4197, 0xA2, 0xB7, 0xDF, 0x46, 0xFD, 0xC9, 0xEE, 0x6D, 100);
+
+// Name: System.Language -- PKEY_Language
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: (FMTID_DocumentSummaryInformation) D5CDD502-2E9C-101B-9397-08002B2CF9AE, 28
+//
+//
+DEFINE_PROPERTYKEY(PKEY_Language, 0xD5CDD502, 0x2E9C, 0x101B, 0x93, 0x97, 0x08, 0x00, 0x2B, 0x2C, 0xF9, 0xAE, 28);
+
+// Name: System.MileageInformation -- PKEY_MileageInformation
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: FDF84370-031A-4ADD-9E91-0D775F1C6605, 100
+DEFINE_PROPERTYKEY(PKEY_MileageInformation, 0xFDF84370, 0x031A, 0x4ADD, 0x9E, 0x91, 0x0D, 0x77, 0x5F, 0x1C, 0x66, 0x05, 100);
+
+// Name: System.MIMEType -- PKEY_MIMEType
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 0B63E350-9CCC-11D0-BCDB-00805FCCCE04, 5
+//
+// The MIME type. Eg, for EML files: 'message/rfc822'.
+DEFINE_PROPERTYKEY(PKEY_MIMEType, 0x0B63E350, 0x9CCC, 0x11D0, 0xBC, 0xDB, 0x00, 0x80, 0x5F, 0xCC, 0xCE, 0x04, 5);
+
+// Name: System.Null -- PKEY_Null
+// Type: Null -- VT_NULL
+// FormatID: 00000000-0000-0000-0000-000000000000, 0
+DEFINE_PROPERTYKEY(PKEY_Null, 0x00000000, 0x0000, 0x0000, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0);
+
+// Name: System.OfflineAvailability -- PKEY_OfflineAvailability
+// Type: UInt32 -- VT_UI4
+// FormatID: A94688B6-7D9F-4570-A648-E3DFC0AB2B3F, 100
+DEFINE_PROPERTYKEY(PKEY_OfflineAvailability, 0xA94688B6, 0x7D9F, 0x4570, 0xA6, 0x48, 0xE3, 0xDF, 0xC0, 0xAB, 0x2B, 0x3F, 100);
+
+// Possible discrete values for PKEY_OfflineAvailability are:
+#define OFFLINEAVAILABILITY_NOT_AVAILABLE 0ul
+#define OFFLINEAVAILABILITY_AVAILABLE 1ul
+#define OFFLINEAVAILABILITY_ALWAYS_AVAILABLE 2ul
+
+// Name: System.OfflineStatus -- PKEY_OfflineStatus
+// Type: UInt32 -- VT_UI4
+// FormatID: 6D24888F-4718-4BDA-AFED-EA0FB4386CD8, 100
+DEFINE_PROPERTYKEY(PKEY_OfflineStatus, 0x6D24888F, 0x4718, 0x4BDA, 0xAF, 0xED, 0xEA, 0x0F, 0xB4, 0x38, 0x6C, 0xD8, 100);
+
+// Possible discrete values for PKEY_OfflineStatus are:
+#define OFFLINESTATUS_ONLINE 0ul
+#define OFFLINESTATUS_OFFLINE 1ul
+#define OFFLINESTATUS_OFFLINE_FORCED 2ul
+#define OFFLINESTATUS_OFFLINE_SLOW 3ul
+#define OFFLINESTATUS_OFFLINE_ERROR 4ul
+#define OFFLINESTATUS_OFFLINE_ITEM_VERSION_CONFLICT 5ul
+#define OFFLINESTATUS_OFFLINE_SUSPENDED 6ul
+
+// Name: System.OriginalFileName -- PKEY_OriginalFileName
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: (PSFMTID_VERSION) 0CEF7D53-FA64-11D1-A203-0000F81FEDEE, 6
+//
+//
+DEFINE_PROPERTYKEY(PKEY_OriginalFileName, 0x0CEF7D53, 0xFA64, 0x11D1, 0xA2, 0x03, 0x00, 0x00, 0xF8, 0x1F, 0xED, 0xEE, 6);
+
+// Name: System.ParentalRating -- PKEY_ParentalRating
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 21 (PIDMSI_PARENTAL_RATING)
+//
+//
+DEFINE_PROPERTYKEY(PKEY_ParentalRating, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 21);
+
+// Name: System.ParentalRatingReason -- PKEY_ParentalRatingReason
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 10984E0A-F9F2-4321-B7EF-BAF195AF4319, 100
+DEFINE_PROPERTYKEY(PKEY_ParentalRatingReason, 0x10984E0A, 0xF9F2, 0x4321, 0xB7, 0xEF, 0xBA, 0xF1, 0x95, 0xAF, 0x43, 0x19, 100);
+
+// Name: System.ParentalRatingsOrganization -- PKEY_ParentalRatingsOrganization
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: A7FE0840-1344-46F0-8D37-52ED712A4BF9, 100
+DEFINE_PROPERTYKEY(PKEY_ParentalRatingsOrganization, 0xA7FE0840, 0x1344, 0x46F0, 0x8D, 0x37, 0x52, 0xED, 0x71, 0x2A, 0x4B, 0xF9, 100);
+
+// Name: System.ParsingBindContext -- PKEY_ParsingBindContext
+// Type: Any -- VT_NULL Legacy code may treat this as VT_UNKNOWN.
+// FormatID: DFB9A04D-362F-4CA3-B30B-0254B17B5B84, 100
+//
+// used to get the IBindCtx for an item for parsing
+DEFINE_PROPERTYKEY(PKEY_ParsingBindContext, 0xDFB9A04D, 0x362F, 0x4CA3, 0xB3, 0x0B, 0x02, 0x54, 0xB1, 0x7B, 0x5B, 0x84, 100);
+
+// Name: System.ParsingName -- PKEY_ParsingName
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: (FMTID_ShellDetails) 28636AA6-953D-11D2-B5D6-00C04FD918D0, 24
+//
+// The shell namespace name of an item relative to a parent folder. This name may be passed to
+// IShellFolder::ParseDisplayName() of the parent shell folder.
+DEFINE_PROPERTYKEY(PKEY_ParsingName, 0x28636AA6, 0x953D, 0x11D2, 0xB5, 0xD6, 0x00, 0xC0, 0x4F, 0xD9, 0x18, 0xD0, 24);
+
+// Name: System.ParsingPath -- PKEY_ParsingPath
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: (FMTID_ShellDetails) 28636AA6-953D-11D2-B5D6-00C04FD918D0, 30
+//
+// This is the shell namespace path to the item. This path may be passed to
+// SHParseDisplayName to parse the path to the correct shell folder.
+//
+// If the item is a file, the value is identical to System.ItemPathDisplay.
+//
+// If the item cannot be accessed through the shell namespace, this value is VT_EMPTY.
+DEFINE_PROPERTYKEY(PKEY_ParsingPath, 0x28636AA6, 0x953D, 0x11D2, 0xB5, 0xD6, 0x00, 0xC0, 0x4F, 0xD9, 0x18, 0xD0, 30);
+
+// Name: System.PerceivedType -- PKEY_PerceivedType
+// Type: Int32 -- VT_I4
+// FormatID: (FMTID_ShellDetails) 28636AA6-953D-11D2-B5D6-00C04FD918D0, 9
+//
+// The perceived type of a shell item, based upon its canonical type.
+DEFINE_PROPERTYKEY(PKEY_PerceivedType, 0x28636AA6, 0x953D, 0x11D2, 0xB5, 0xD6, 0x00, 0xC0, 0x4F, 0xD9, 0x18, 0xD0, 9);
+
+// For the enumerated values of PKEY_PerceivedType, see the PERCEIVED_TYPE_* values in shtypes.idl.
+
+// Name: System.PercentFull -- PKEY_PercentFull
+// Type: UInt32 -- VT_UI4
+// FormatID: (FMTID_Volume) 9B174B35-40FF-11D2-A27E-00C04FC30871, 5 (Filesystem Volume Properties)
+//
+// The amount filled as a percentage, multiplied by 100 (ie, the valid range is 0 through 100).
+DEFINE_PROPERTYKEY(PKEY_PercentFull, 0x9B174B35, 0x40FF, 0x11D2, 0xA2, 0x7E, 0x00, 0xC0, 0x4F, 0xC3, 0x08, 0x71, 5);
+
+// Name: System.Priority -- PKEY_Priority
+// Type: UInt16 -- VT_UI2
+// FormatID: 9C1FCF74-2D97-41BA-B4AE-CB2E3661A6E4, 5
+//
+//
+DEFINE_PROPERTYKEY(PKEY_Priority, 0x9C1FCF74, 0x2D97, 0x41BA, 0xB4, 0xAE, 0xCB, 0x2E, 0x36, 0x61, 0xA6, 0xE4, 5);
+
+// Possible discrete values for PKEY_Priority are:
+#define PRIORITY_PROP_LOW 0u
+#define PRIORITY_PROP_NORMAL 1u
+#define PRIORITY_PROP_HIGH 2u
+
+// Name: System.PriorityText -- PKEY_PriorityText
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: D98BE98B-B86B-4095-BF52-9D23B2E0A752, 100
+//
+// This is the user-friendly form of System.Priority. Not intended to be parsed
+// programmatically.
+DEFINE_PROPERTYKEY(PKEY_PriorityText, 0xD98BE98B, 0xB86B, 0x4095, 0xBF, 0x52, 0x9D, 0x23, 0xB2, 0xE0, 0xA7, 0x52, 100);
+
+// Name: System.Project -- PKEY_Project
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 39A7F922-477C-48DE-8BC8-B28441E342E3, 100
+DEFINE_PROPERTYKEY(PKEY_Project, 0x39A7F922, 0x477C, 0x48DE, 0x8B, 0xC8, 0xB2, 0x84, 0x41, 0xE3, 0x42, 0xE3, 100);
+
+// Name: System.ProviderItemID -- PKEY_ProviderItemID
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: F21D9941-81F0-471A-ADEE-4E74B49217ED, 100
+//
+//
+DEFINE_PROPERTYKEY(PKEY_ProviderItemID, 0xF21D9941, 0x81F0, 0x471A, 0xAD, 0xEE, 0x4E, 0x74, 0xB4, 0x92, 0x17, 0xED, 100);
+
+// Name: System.Rating -- PKEY_Rating
+// Type: UInt32 -- VT_UI4
+// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 9 (PIDMSI_RATING)
+//
+// Indicates the users preference rating of an item on a scale of 0-99 (0 = unrated, 1-12 = One Star,
+// 13-37 = Two Stars, 38-62 = Three Stars, 63-87 = Four Stars, 88-99 = Five Stars).
+DEFINE_PROPERTYKEY(PKEY_Rating, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 9);
+
+// Use the following constants to convert between visual stars and the ratings value:
+#define RATING_UNRATED_MIN 0ul
+#define RATING_UNRATED_SET 0ul
+#define RATING_UNRATED_MAX 0ul
+
+#define RATING_ONE_STAR_MIN 1ul
+#define RATING_ONE_STAR_SET 1ul
+#define RATING_ONE_STAR_MAX 12ul
+
+#define RATING_TWO_STARS_MIN 13ul
+#define RATING_TWO_STARS_SET 25ul
+#define RATING_TWO_STARS_MAX 37ul
+
+#define RATING_THREE_STARS_MIN 38ul
+#define RATING_THREE_STARS_SET 50ul
+#define RATING_THREE_STARS_MAX 62ul
+
+#define RATING_FOUR_STARS_MIN 63ul
+#define RATING_FOUR_STARS_SET 75ul
+#define RATING_FOUR_STARS_MAX 87ul
+
+#define RATING_FIVE_STARS_MIN 88ul
+#define RATING_FIVE_STARS_SET 99ul
+#define RATING_FIVE_STARS_MAX 99ul
+
+
+// Name: System.RatingText -- PKEY_RatingText
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 90197CA7-FD8F-4E8C-9DA3-B57E1E609295, 100
+//
+// This is the user-friendly form of System.Rating. Not intended to be parsed
+// programmatically.
+DEFINE_PROPERTYKEY(PKEY_RatingText, 0x90197CA7, 0xFD8F, 0x4E8C, 0x9D, 0xA3, 0xB5, 0x7E, 0x1E, 0x60, 0x92, 0x95, 100);
+
+// Name: System.Sensitivity -- PKEY_Sensitivity
+// Type: UInt16 -- VT_UI2
+// FormatID: F8D3F6AC-4874-42CB-BE59-AB454B30716A, 100
+//
+//
+DEFINE_PROPERTYKEY(PKEY_Sensitivity, 0xF8D3F6AC, 0x4874, 0x42CB, 0xBE, 0x59, 0xAB, 0x45, 0x4B, 0x30, 0x71, 0x6A, 100);
+
+// Possible discrete values for PKEY_Sensitivity are:
+#define SENSITIVITY_PROP_NORMAL 0u
+#define SENSITIVITY_PROP_PERSONAL 1u
+#define SENSITIVITY_PROP_PRIVATE 2u
+#define SENSITIVITY_PROP_CONFIDENTIAL 3u
+
+// Name: System.SensitivityText -- PKEY_SensitivityText
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: D0C7F054-3F72-4725-8527-129A577CB269, 100
+//
+// This is the user-friendly form of System.Sensitivity. Not intended to be parsed
+// programmatically.
+DEFINE_PROPERTYKEY(PKEY_SensitivityText, 0xD0C7F054, 0x3F72, 0x4725, 0x85, 0x27, 0x12, 0x9A, 0x57, 0x7C, 0xB2, 0x69, 100);
+
+// Name: System.SFGAOFlags -- PKEY_SFGAOFlags
+// Type: UInt32 -- VT_UI4
+// FormatID: (FMTID_ShellDetails) 28636AA6-953D-11D2-B5D6-00C04FD918D0, 25
+//
+// IShellFolder::GetAttributesOf flags, with SFGAO_PKEYSFGAOMASK attributes masked out.
+DEFINE_PROPERTYKEY(PKEY_SFGAOFlags, 0x28636AA6, 0x953D, 0x11D2, 0xB5, 0xD6, 0x00, 0xC0, 0x4F, 0xD9, 0x18, 0xD0, 25);
+
+// Name: System.SharedWith -- PKEY_SharedWith
+// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR)
+// FormatID: EF884C5B-2BFE-41BB-AAE5-76EEDF4F9902, 200
+//
+// Who is the item shared with?
+DEFINE_PROPERTYKEY(PKEY_SharedWith, 0xEF884C5B, 0x2BFE, 0x41BB, 0xAA, 0xE5, 0x76, 0xEE, 0xDF, 0x4F, 0x99, 0x02, 200);
+
+// Name: System.ShareUserRating -- PKEY_ShareUserRating
+// Type: UInt32 -- VT_UI4
+// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 12 (PIDMSI_SHARE_USER_RATING)
+//
+//
+DEFINE_PROPERTYKEY(PKEY_ShareUserRating, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 12);
+
+// Name: System.Shell.OmitFromView -- PKEY_Shell_OmitFromView
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: DE35258C-C695-4CBC-B982-38B0AD24CED0, 2
+//
+// Set this to a string value of 'True' to omit this item from shell views
+DEFINE_PROPERTYKEY(PKEY_Shell_OmitFromView, 0xDE35258C, 0xC695, 0x4CBC, 0xB9, 0x82, 0x38, 0xB0, 0xAD, 0x24, 0xCE, 0xD0, 2);
+
+// Name: System.SimpleRating -- PKEY_SimpleRating
+// Type: UInt32 -- VT_UI4
+// FormatID: A09F084E-AD41-489F-8076-AA5BE3082BCA, 100
+//
+// Indicates the users preference rating of an item on a scale of 0-5 (0=unrated, 1=One Star, 2=Two Stars, 3=Three Stars,
+// 4=Four Stars, 5=Five Stars)
+DEFINE_PROPERTYKEY(PKEY_SimpleRating, 0xA09F084E, 0xAD41, 0x489F, 0x80, 0x76, 0xAA, 0x5B, 0xE3, 0x08, 0x2B, 0xCA, 100);
+
+// Name: System.Size -- PKEY_Size
+// Type: UInt64 -- VT_UI8
+// FormatID: (FMTID_Storage) B725F130-47EF-101A-A5F1-02608C9EEBAC, 12 (PID_STG_SIZE)
+//
+//
+DEFINE_PROPERTYKEY(PKEY_Size, 0xB725F130, 0x47EF, 0x101A, 0xA5, 0xF1, 0x02, 0x60, 0x8C, 0x9E, 0xEB, 0xAC, 12);
+
+// Name: System.SoftwareUsed -- PKEY_SoftwareUsed
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 305
+//
+// PropertyTagSoftwareUsed
+DEFINE_PROPERTYKEY(PKEY_SoftwareUsed, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 305);
+
+// Name: System.SourceItem -- PKEY_SourceItem
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 668CDFA5-7A1B-4323-AE4B-E527393A1D81, 100
+DEFINE_PROPERTYKEY(PKEY_SourceItem, 0x668CDFA5, 0x7A1B, 0x4323, 0xAE, 0x4B, 0xE5, 0x27, 0x39, 0x3A, 0x1D, 0x81, 100);
+
+// Name: System.StartDate -- PKEY_StartDate
+// Type: DateTime -- VT_FILETIME (For variants: VT_DATE)
+// FormatID: 48FD6EC8-8A12-4CDF-A03E-4EC5A511EDDE, 100
+DEFINE_PROPERTYKEY(PKEY_StartDate, 0x48FD6EC8, 0x8A12, 0x4CDF, 0xA0, 0x3E, 0x4E, 0xC5, 0xA5, 0x11, 0xED, 0xDE, 100);
+
+// Name: System.Status -- PKEY_Status
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: (FMTID_IntSite) 000214A1-0000-0000-C000-000000000046, 9
+DEFINE_PROPERTYKEY(PKEY_Status, 0x000214A1, 0x0000, 0x0000, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 9);
+
+// Name: System.Subject -- PKEY_Subject
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: (FMTID_SummaryInformation) F29F85E0-4FF9-1068-AB91-08002B27B3D9, 3 (PIDSI_SUBJECT)
+//
+//
+DEFINE_PROPERTYKEY(PKEY_Subject, 0xF29F85E0, 0x4FF9, 0x1068, 0xAB, 0x91, 0x08, 0x00, 0x2B, 0x27, 0xB3, 0xD9, 3);
+
+// Name: System.Thumbnail -- PKEY_Thumbnail
+// Type: Clipboard -- VT_CF
+// FormatID: (FMTID_SummaryInformation) F29F85E0-4FF9-1068-AB91-08002B27B3D9, 17 (PIDSI_THUMBNAIL)
+//
+// A data that represents the thumbnail in VT_CF format.
+DEFINE_PROPERTYKEY(PKEY_Thumbnail, 0xF29F85E0, 0x4FF9, 0x1068, 0xAB, 0x91, 0x08, 0x00, 0x2B, 0x27, 0xB3, 0xD9, 17);
+
+// Name: System.ThumbnailCacheId -- PKEY_ThumbnailCacheId
+// Type: UInt64 -- VT_UI8
+// FormatID: 446D16B1-8DAD-4870-A748-402EA43D788C, 100
+//
+// Unique value that can be used as a key to cache thumbnails. The value changes when the name, volume, or data modified
+// of an item changes.
+DEFINE_PROPERTYKEY(PKEY_ThumbnailCacheId, 0x446D16B1, 0x8DAD, 0x4870, 0xA7, 0x48, 0x40, 0x2E, 0xA4, 0x3D, 0x78, 0x8C, 100);
+
+// Name: System.ThumbnailStream -- PKEY_ThumbnailStream
+// Type: Stream -- VT_STREAM
+// FormatID: (FMTID_SummaryInformation) F29F85E0-4FF9-1068-AB91-08002B27B3D9, 27
+//
+// Data that represents the thumbnail in VT_STREAM format that GDI+/WindowsCodecs supports (jpg, png, etc).
+DEFINE_PROPERTYKEY(PKEY_ThumbnailStream, 0xF29F85E0, 0x4FF9, 0x1068, 0xAB, 0x91, 0x08, 0x00, 0x2B, 0x27, 0xB3, 0xD9, 27);
+
+// Name: System.Title -- PKEY_Title
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR) Legacy code may treat this as VT_LPSTR.
+// FormatID: (FMTID_SummaryInformation) F29F85E0-4FF9-1068-AB91-08002B27B3D9, 2 (PIDSI_TITLE)
+//
+// Title of item.
+DEFINE_PROPERTYKEY(PKEY_Title, 0xF29F85E0, 0x4FF9, 0x1068, 0xAB, 0x91, 0x08, 0x00, 0x2B, 0x27, 0xB3, 0xD9, 2);
+
+// Name: System.TotalFileSize -- PKEY_TotalFileSize
+// Type: UInt64 -- VT_UI8
+// FormatID: (FMTID_ShellDetails) 28636AA6-953D-11D2-B5D6-00C04FD918D0, 14
+//
+//
+DEFINE_PROPERTYKEY(PKEY_TotalFileSize, 0x28636AA6, 0x953D, 0x11D2, 0xB5, 0xD6, 0x00, 0xC0, 0x4F, 0xD9, 0x18, 0xD0, 14);
+
+// Name: System.Trademarks -- PKEY_Trademarks
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: (PSFMTID_VERSION) 0CEF7D53-FA64-11D1-A203-0000F81FEDEE, 9 (PIDVSI_Trademarks)
+//
+//
+DEFINE_PROPERTYKEY(PKEY_Trademarks, 0x0CEF7D53, 0xFA64, 0x11D1, 0xA2, 0x03, 0x00, 0x00, 0xF8, 0x1F, 0xED, 0xEE, 9);
+
+//-----------------------------------------------------------------------------
+// Document properties
+
+
+
+// Name: System.Document.ByteCount -- PKEY_Document_ByteCount
+// Type: Int32 -- VT_I4
+// FormatID: (FMTID_DocumentSummaryInformation) D5CDD502-2E9C-101B-9397-08002B2CF9AE, 4 (PIDDSI_BYTECOUNT)
+//
+//
+DEFINE_PROPERTYKEY(PKEY_Document_ByteCount, 0xD5CDD502, 0x2E9C, 0x101B, 0x93, 0x97, 0x08, 0x00, 0x2B, 0x2C, 0xF9, 0xAE, 4);
+
+// Name: System.Document.CharacterCount -- PKEY_Document_CharacterCount
+// Type: Int32 -- VT_I4
+// FormatID: (FMTID_SummaryInformation) F29F85E0-4FF9-1068-AB91-08002B27B3D9, 16 (PIDSI_CHARCOUNT)
+//
+//
+DEFINE_PROPERTYKEY(PKEY_Document_CharacterCount, 0xF29F85E0, 0x4FF9, 0x1068, 0xAB, 0x91, 0x08, 0x00, 0x2B, 0x27, 0xB3, 0xD9, 16);
+
+// Name: System.Document.ClientID -- PKEY_Document_ClientID
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 276D7BB0-5B34-4FB0-AA4B-158ED12A1809, 100
+DEFINE_PROPERTYKEY(PKEY_Document_ClientID, 0x276D7BB0, 0x5B34, 0x4FB0, 0xAA, 0x4B, 0x15, 0x8E, 0xD1, 0x2A, 0x18, 0x09, 100);
+
+// Name: System.Document.Contributor -- PKEY_Document_Contributor
+// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR)
+// FormatID: F334115E-DA1B-4509-9B3D-119504DC7ABB, 100
+DEFINE_PROPERTYKEY(PKEY_Document_Contributor, 0xF334115E, 0xDA1B, 0x4509, 0x9B, 0x3D, 0x11, 0x95, 0x04, 0xDC, 0x7A, 0xBB, 100);
+
+// Name: System.Document.DateCreated -- PKEY_Document_DateCreated
+// Type: DateTime -- VT_FILETIME (For variants: VT_DATE)
+// FormatID: (FMTID_SummaryInformation) F29F85E0-4FF9-1068-AB91-08002B27B3D9, 12 (PIDSI_CREATE_DTM)
+//
+// This property is stored in the document, not obtained from the file system.
+DEFINE_PROPERTYKEY(PKEY_Document_DateCreated, 0xF29F85E0, 0x4FF9, 0x1068, 0xAB, 0x91, 0x08, 0x00, 0x2B, 0x27, 0xB3, 0xD9, 12);
+
+// Name: System.Document.DatePrinted -- PKEY_Document_DatePrinted
+// Type: DateTime -- VT_FILETIME (For variants: VT_DATE)
+// FormatID: (FMTID_SummaryInformation) F29F85E0-4FF9-1068-AB91-08002B27B3D9, 11 (PIDSI_LASTPRINTED)
+//
+// Legacy name: "DocLastPrinted".
+DEFINE_PROPERTYKEY(PKEY_Document_DatePrinted, 0xF29F85E0, 0x4FF9, 0x1068, 0xAB, 0x91, 0x08, 0x00, 0x2B, 0x27, 0xB3, 0xD9, 11);
+
+// Name: System.Document.DateSaved -- PKEY_Document_DateSaved
+// Type: DateTime -- VT_FILETIME (For variants: VT_DATE)
+// FormatID: (FMTID_SummaryInformation) F29F85E0-4FF9-1068-AB91-08002B27B3D9, 13 (PIDSI_LASTSAVE_DTM)
+//
+// Legacy name: "DocLastSavedTm".
+DEFINE_PROPERTYKEY(PKEY_Document_DateSaved, 0xF29F85E0, 0x4FF9, 0x1068, 0xAB, 0x91, 0x08, 0x00, 0x2B, 0x27, 0xB3, 0xD9, 13);
+
+// Name: System.Document.Division -- PKEY_Document_Division
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 1E005EE6-BF27-428B-B01C-79676ACD2870, 100
+DEFINE_PROPERTYKEY(PKEY_Document_Division, 0x1E005EE6, 0xBF27, 0x428B, 0xB0, 0x1C, 0x79, 0x67, 0x6A, 0xCD, 0x28, 0x70, 100);
+
+// Name: System.Document.DocumentID -- PKEY_Document_DocumentID
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: E08805C8-E395-40DF-80D2-54F0D6C43154, 100
+DEFINE_PROPERTYKEY(PKEY_Document_DocumentID, 0xE08805C8, 0xE395, 0x40DF, 0x80, 0xD2, 0x54, 0xF0, 0xD6, 0xC4, 0x31, 0x54, 100);
+
+// Name: System.Document.HiddenSlideCount -- PKEY_Document_HiddenSlideCount
+// Type: Int32 -- VT_I4
+// FormatID: (FMTID_DocumentSummaryInformation) D5CDD502-2E9C-101B-9397-08002B2CF9AE, 9 (PIDDSI_HIDDENCOUNT)
+//
+//
+DEFINE_PROPERTYKEY(PKEY_Document_HiddenSlideCount, 0xD5CDD502, 0x2E9C, 0x101B, 0x93, 0x97, 0x08, 0x00, 0x2B, 0x2C, 0xF9, 0xAE, 9);
+
+// Name: System.Document.LastAuthor -- PKEY_Document_LastAuthor
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: (FMTID_SummaryInformation) F29F85E0-4FF9-1068-AB91-08002B27B3D9, 8 (PIDSI_LASTAUTHOR)
+//
+//
+DEFINE_PROPERTYKEY(PKEY_Document_LastAuthor, 0xF29F85E0, 0x4FF9, 0x1068, 0xAB, 0x91, 0x08, 0x00, 0x2B, 0x27, 0xB3, 0xD9, 8);
+
+// Name: System.Document.LineCount -- PKEY_Document_LineCount
+// Type: Int32 -- VT_I4
+// FormatID: (FMTID_DocumentSummaryInformation) D5CDD502-2E9C-101B-9397-08002B2CF9AE, 5 (PIDDSI_LINECOUNT)
+//
+//
+DEFINE_PROPERTYKEY(PKEY_Document_LineCount, 0xD5CDD502, 0x2E9C, 0x101B, 0x93, 0x97, 0x08, 0x00, 0x2B, 0x2C, 0xF9, 0xAE, 5);
+
+// Name: System.Document.Manager -- PKEY_Document_Manager
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: (FMTID_DocumentSummaryInformation) D5CDD502-2E9C-101B-9397-08002B2CF9AE, 14 (PIDDSI_MANAGER)
+//
+//
+DEFINE_PROPERTYKEY(PKEY_Document_Manager, 0xD5CDD502, 0x2E9C, 0x101B, 0x93, 0x97, 0x08, 0x00, 0x2B, 0x2C, 0xF9, 0xAE, 14);
+
+// Name: System.Document.MultimediaClipCount -- PKEY_Document_MultimediaClipCount
+// Type: Int32 -- VT_I4
+// FormatID: (FMTID_DocumentSummaryInformation) D5CDD502-2E9C-101B-9397-08002B2CF9AE, 10 (PIDDSI_MMCLIPCOUNT)
+//
+//
+DEFINE_PROPERTYKEY(PKEY_Document_MultimediaClipCount, 0xD5CDD502, 0x2E9C, 0x101B, 0x93, 0x97, 0x08, 0x00, 0x2B, 0x2C, 0xF9, 0xAE, 10);
+
+// Name: System.Document.NoteCount -- PKEY_Document_NoteCount
+// Type: Int32 -- VT_I4
+// FormatID: (FMTID_DocumentSummaryInformation) D5CDD502-2E9C-101B-9397-08002B2CF9AE, 8 (PIDDSI_NOTECOUNT)
+//
+//
+DEFINE_PROPERTYKEY(PKEY_Document_NoteCount, 0xD5CDD502, 0x2E9C, 0x101B, 0x93, 0x97, 0x08, 0x00, 0x2B, 0x2C, 0xF9, 0xAE, 8);
+
+// Name: System.Document.PageCount -- PKEY_Document_PageCount
+// Type: Int32 -- VT_I4
+// FormatID: (FMTID_SummaryInformation) F29F85E0-4FF9-1068-AB91-08002B27B3D9, 14 (PIDSI_PAGECOUNT)
+//
+//
+DEFINE_PROPERTYKEY(PKEY_Document_PageCount, 0xF29F85E0, 0x4FF9, 0x1068, 0xAB, 0x91, 0x08, 0x00, 0x2B, 0x27, 0xB3, 0xD9, 14);
+
+// Name: System.Document.ParagraphCount -- PKEY_Document_ParagraphCount
+// Type: Int32 -- VT_I4
+// FormatID: (FMTID_DocumentSummaryInformation) D5CDD502-2E9C-101B-9397-08002B2CF9AE, 6 (PIDDSI_PARCOUNT)
+//
+//
+DEFINE_PROPERTYKEY(PKEY_Document_ParagraphCount, 0xD5CDD502, 0x2E9C, 0x101B, 0x93, 0x97, 0x08, 0x00, 0x2B, 0x2C, 0xF9, 0xAE, 6);
+
+// Name: System.Document.PresentationFormat -- PKEY_Document_PresentationFormat
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: (FMTID_DocumentSummaryInformation) D5CDD502-2E9C-101B-9397-08002B2CF9AE, 3 (PIDDSI_PRESFORMAT)
+//
+//
+DEFINE_PROPERTYKEY(PKEY_Document_PresentationFormat, 0xD5CDD502, 0x2E9C, 0x101B, 0x93, 0x97, 0x08, 0x00, 0x2B, 0x2C, 0xF9, 0xAE, 3);
+
+// Name: System.Document.RevisionNumber -- PKEY_Document_RevisionNumber
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: (FMTID_SummaryInformation) F29F85E0-4FF9-1068-AB91-08002B27B3D9, 9 (PIDSI_REVNUMBER)
+//
+//
+DEFINE_PROPERTYKEY(PKEY_Document_RevisionNumber, 0xF29F85E0, 0x4FF9, 0x1068, 0xAB, 0x91, 0x08, 0x00, 0x2B, 0x27, 0xB3, 0xD9, 9);
+
+// Name: System.Document.Security -- PKEY_Document_Security
+// Type: Int32 -- VT_I4
+// FormatID: (FMTID_SummaryInformation) F29F85E0-4FF9-1068-AB91-08002B27B3D9, 19
+//
+// Access control information, from SummaryInfo propset
+DEFINE_PROPERTYKEY(PKEY_Document_Security, 0xF29F85E0, 0x4FF9, 0x1068, 0xAB, 0x91, 0x08, 0x00, 0x2B, 0x27, 0xB3, 0xD9, 19);
+
+// Name: System.Document.SlideCount -- PKEY_Document_SlideCount
+// Type: Int32 -- VT_I4
+// FormatID: (FMTID_DocumentSummaryInformation) D5CDD502-2E9C-101B-9397-08002B2CF9AE, 7 (PIDDSI_SLIDECOUNT)
+//
+//
+DEFINE_PROPERTYKEY(PKEY_Document_SlideCount, 0xD5CDD502, 0x2E9C, 0x101B, 0x93, 0x97, 0x08, 0x00, 0x2B, 0x2C, 0xF9, 0xAE, 7);
+
+// Name: System.Document.Template -- PKEY_Document_Template
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: (FMTID_SummaryInformation) F29F85E0-4FF9-1068-AB91-08002B27B3D9, 7 (PIDSI_TEMPLATE)
+//
+//
+DEFINE_PROPERTYKEY(PKEY_Document_Template, 0xF29F85E0, 0x4FF9, 0x1068, 0xAB, 0x91, 0x08, 0x00, 0x2B, 0x27, 0xB3, 0xD9, 7);
+
+// Name: System.Document.TotalEditingTime -- PKEY_Document_TotalEditingTime
+// Type: UInt64 -- VT_UI8
+// FormatID: (FMTID_SummaryInformation) F29F85E0-4FF9-1068-AB91-08002B27B3D9, 10 (PIDSI_EDITTIME)
+//
+// 100ns units, not milliseconds. VT_FILETIME for IPropertySetStorage handlers (legacy)
+DEFINE_PROPERTYKEY(PKEY_Document_TotalEditingTime, 0xF29F85E0, 0x4FF9, 0x1068, 0xAB, 0x91, 0x08, 0x00, 0x2B, 0x27, 0xB3, 0xD9, 10);
+
+// Name: System.Document.Version -- PKEY_Document_Version
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: (FMTID_DocumentSummaryInformation) D5CDD502-2E9C-101B-9397-08002B2CF9AE, 29
+DEFINE_PROPERTYKEY(PKEY_Document_Version, 0xD5CDD502, 0x2E9C, 0x101B, 0x93, 0x97, 0x08, 0x00, 0x2B, 0x2C, 0xF9, 0xAE, 29);
+
+// Name: System.Document.WordCount -- PKEY_Document_WordCount
+// Type: Int32 -- VT_I4
+// FormatID: (FMTID_SummaryInformation) F29F85E0-4FF9-1068-AB91-08002B27B3D9, 15 (PIDSI_WORDCOUNT)
+//
+//
+DEFINE_PROPERTYKEY(PKEY_Document_WordCount, 0xF29F85E0, 0x4FF9, 0x1068, 0xAB, 0x91, 0x08, 0x00, 0x2B, 0x27, 0xB3, 0xD9, 15);
+
+
+
+//-----------------------------------------------------------------------------
+// DRM properties
+
+// Name: System.DRM.DatePlayExpires -- PKEY_DRM_DatePlayExpires
+// Type: DateTime -- VT_FILETIME (For variants: VT_DATE)
+// FormatID: (FMTID_DRM) AEAC19E4-89AE-4508-B9B7-BB867ABEE2ED, 6 (PIDDRSI_PLAYEXPIRES)
+//
+// Indicates when play expires for digital rights management.
+DEFINE_PROPERTYKEY(PKEY_DRM_DatePlayExpires, 0xAEAC19E4, 0x89AE, 0x4508, 0xB9, 0xB7, 0xBB, 0x86, 0x7A, 0xBE, 0xE2, 0xED, 6);
+
+// Name: System.DRM.DatePlayStarts -- PKEY_DRM_DatePlayStarts
+// Type: DateTime -- VT_FILETIME (For variants: VT_DATE)
+// FormatID: (FMTID_DRM) AEAC19E4-89AE-4508-B9B7-BB867ABEE2ED, 5 (PIDDRSI_PLAYSTARTS)
+//
+// Indicates when play starts for digital rights management.
+DEFINE_PROPERTYKEY(PKEY_DRM_DatePlayStarts, 0xAEAC19E4, 0x89AE, 0x4508, 0xB9, 0xB7, 0xBB, 0x86, 0x7A, 0xBE, 0xE2, 0xED, 5);
+
+// Name: System.DRM.Description -- PKEY_DRM_Description
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: (FMTID_DRM) AEAC19E4-89AE-4508-B9B7-BB867ABEE2ED, 3 (PIDDRSI_DESCRIPTION)
+//
+// Displays the description for digital rights management.
+DEFINE_PROPERTYKEY(PKEY_DRM_Description, 0xAEAC19E4, 0x89AE, 0x4508, 0xB9, 0xB7, 0xBB, 0x86, 0x7A, 0xBE, 0xE2, 0xED, 3);
+
+// Name: System.DRM.IsProtected -- PKEY_DRM_IsProtected
+// Type: Boolean -- VT_BOOL
+// FormatID: (FMTID_DRM) AEAC19E4-89AE-4508-B9B7-BB867ABEE2ED, 2 (PIDDRSI_PROTECTED)
+//
+//
+DEFINE_PROPERTYKEY(PKEY_DRM_IsProtected, 0xAEAC19E4, 0x89AE, 0x4508, 0xB9, 0xB7, 0xBB, 0x86, 0x7A, 0xBE, 0xE2, 0xED, 2);
+
+// Name: System.DRM.PlayCount -- PKEY_DRM_PlayCount
+// Type: UInt32 -- VT_UI4
+// FormatID: (FMTID_DRM) AEAC19E4-89AE-4508-B9B7-BB867ABEE2ED, 4 (PIDDRSI_PLAYCOUNT)
+//
+// Indicates the play count for digital rights management.
+DEFINE_PROPERTYKEY(PKEY_DRM_PlayCount, 0xAEAC19E4, 0x89AE, 0x4508, 0xB9, 0xB7, 0xBB, 0x86, 0x7A, 0xBE, 0xE2, 0xED, 4);
+
+//-----------------------------------------------------------------------------
+// GPS properties
+
+// Name: System.GPS.Altitude -- PKEY_GPS_Altitude
+// Type: Double -- VT_R8
+// FormatID: 827EDB4F-5B73-44A7-891D-FDFFABEA35CA, 100
+//
+// Indicates the altitude based on the reference in PKEY_GPS_AltitudeRef. Calculated from PKEY_GPS_AltitudeNumerator and
+// PKEY_GPS_AltitudeDenominator
+DEFINE_PROPERTYKEY(PKEY_GPS_Altitude, 0x827EDB4F, 0x5B73, 0x44A7, 0x89, 0x1D, 0xFD, 0xFF, 0xAB, 0xEA, 0x35, 0xCA, 100);
+
+// Name: System.GPS.AltitudeDenominator -- PKEY_GPS_AltitudeDenominator
+// Type: UInt32 -- VT_UI4
+// FormatID: 78342DCB-E358-4145-AE9A-6BFE4E0F9F51, 100
+//
+// Denominator of PKEY_GPS_Altitude
+DEFINE_PROPERTYKEY(PKEY_GPS_AltitudeDenominator, 0x78342DCB, 0xE358, 0x4145, 0xAE, 0x9A, 0x6B, 0xFE, 0x4E, 0x0F, 0x9F, 0x51, 100);
+
+// Name: System.GPS.AltitudeNumerator -- PKEY_GPS_AltitudeNumerator
+// Type: UInt32 -- VT_UI4
+// FormatID: 2DAD1EB7-816D-40D3-9EC3-C9773BE2AADE, 100
+//
+// Numerator of PKEY_GPS_Altitude
+DEFINE_PROPERTYKEY(PKEY_GPS_AltitudeNumerator, 0x2DAD1EB7, 0x816D, 0x40D3, 0x9E, 0xC3, 0xC9, 0x77, 0x3B, 0xE2, 0xAA, 0xDE, 100);
+
+// Name: System.GPS.AltitudeRef -- PKEY_GPS_AltitudeRef
+// Type: Byte -- VT_UI1
+// FormatID: 46AC629D-75EA-4515-867F-6DC4321C5844, 100
+//
+// Indicates the reference for the altitude property. (eg: above sea level, below sea level, absolute value)
+DEFINE_PROPERTYKEY(PKEY_GPS_AltitudeRef, 0x46AC629D, 0x75EA, 0x4515, 0x86, 0x7F, 0x6D, 0xC4, 0x32, 0x1C, 0x58, 0x44, 100);
+
+// Name: System.GPS.AreaInformation -- PKEY_GPS_AreaInformation
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 972E333E-AC7E-49F1-8ADF-A70D07A9BCAB, 100
+//
+// Represents the name of the GPS area
+DEFINE_PROPERTYKEY(PKEY_GPS_AreaInformation, 0x972E333E, 0xAC7E, 0x49F1, 0x8A, 0xDF, 0xA7, 0x0D, 0x07, 0xA9, 0xBC, 0xAB, 100);
+
+// Name: System.GPS.Date -- PKEY_GPS_Date
+// Type: DateTime -- VT_FILETIME (For variants: VT_DATE)
+// FormatID: 3602C812-0F3B-45F0-85AD-603468D69423, 100
+//
+// Date and time of the GPS record
+DEFINE_PROPERTYKEY(PKEY_GPS_Date, 0x3602C812, 0x0F3B, 0x45F0, 0x85, 0xAD, 0x60, 0x34, 0x68, 0xD6, 0x94, 0x23, 100);
+
+// Name: System.GPS.DestBearing -- PKEY_GPS_DestBearing
+// Type: Double -- VT_R8
+// FormatID: C66D4B3C-E888-47CC-B99F-9DCA3EE34DEA, 100
+//
+// Indicates the bearing to the destination point. Calculated from PKEY_GPS_DestBearingNumerator and
+// PKEY_GPS_DestBearingDenominator.
+DEFINE_PROPERTYKEY(PKEY_GPS_DestBearing, 0xC66D4B3C, 0xE888, 0x47CC, 0xB9, 0x9F, 0x9D, 0xCA, 0x3E, 0xE3, 0x4D, 0xEA, 100);
+
+// Name: System.GPS.DestBearingDenominator -- PKEY_GPS_DestBearingDenominator
+// Type: UInt32 -- VT_UI4
+// FormatID: 7ABCF4F8-7C3F-4988-AC91-8D2C2E97ECA5, 100
+//
+// Denominator of PKEY_GPS_DestBearing
+DEFINE_PROPERTYKEY(PKEY_GPS_DestBearingDenominator, 0x7ABCF4F8, 0x7C3F, 0x4988, 0xAC, 0x91, 0x8D, 0x2C, 0x2E, 0x97, 0xEC, 0xA5, 100);
+
+// Name: System.GPS.DestBearingNumerator -- PKEY_GPS_DestBearingNumerator
+// Type: UInt32 -- VT_UI4
+// FormatID: BA3B1DA9-86EE-4B5D-A2A4-A271A429F0CF, 100
+//
+// Numerator of PKEY_GPS_DestBearing
+DEFINE_PROPERTYKEY(PKEY_GPS_DestBearingNumerator, 0xBA3B1DA9, 0x86EE, 0x4B5D, 0xA2, 0xA4, 0xA2, 0x71, 0xA4, 0x29, 0xF0, 0xCF, 100);
+
+// Name: System.GPS.DestBearingRef -- PKEY_GPS_DestBearingRef
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 9AB84393-2A0F-4B75-BB22-7279786977CB, 100
+//
+// Indicates the reference used for the giving the bearing to the destination point. (eg: true direction, magnetic direction)
+DEFINE_PROPERTYKEY(PKEY_GPS_DestBearingRef, 0x9AB84393, 0x2A0F, 0x4B75, 0xBB, 0x22, 0x72, 0x79, 0x78, 0x69, 0x77, 0xCB, 100);
+
+// Name: System.GPS.DestDistance -- PKEY_GPS_DestDistance
+// Type: Double -- VT_R8
+// FormatID: A93EAE04-6804-4F24-AC81-09B266452118, 100
+//
+// Indicates the distance to the destination point. Calculated from PKEY_GPS_DestDistanceNumerator and
+// PKEY_GPS_DestDistanceDenominator.
+DEFINE_PROPERTYKEY(PKEY_GPS_DestDistance, 0xA93EAE04, 0x6804, 0x4F24, 0xAC, 0x81, 0x09, 0xB2, 0x66, 0x45, 0x21, 0x18, 100);
+
+// Name: System.GPS.DestDistanceDenominator -- PKEY_GPS_DestDistanceDenominator
+// Type: UInt32 -- VT_UI4
+// FormatID: 9BC2C99B-AC71-4127-9D1C-2596D0D7DCB7, 100
+//
+// Denominator of PKEY_GPS_DestDistance
+DEFINE_PROPERTYKEY(PKEY_GPS_DestDistanceDenominator, 0x9BC2C99B, 0xAC71, 0x4127, 0x9D, 0x1C, 0x25, 0x96, 0xD0, 0xD7, 0xDC, 0xB7, 100);
+
+// Name: System.GPS.DestDistanceNumerator -- PKEY_GPS_DestDistanceNumerator
+// Type: UInt32 -- VT_UI4
+// FormatID: 2BDA47DA-08C6-4FE1-80BC-A72FC517C5D0, 100
+//
+// Numerator of PKEY_GPS_DestDistance
+DEFINE_PROPERTYKEY(PKEY_GPS_DestDistanceNumerator, 0x2BDA47DA, 0x08C6, 0x4FE1, 0x80, 0xBC, 0xA7, 0x2F, 0xC5, 0x17, 0xC5, 0xD0, 100);
+
+// Name: System.GPS.DestDistanceRef -- PKEY_GPS_DestDistanceRef
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: ED4DF2D3-8695-450B-856F-F5C1C53ACB66, 100
+//
+// Indicates the unit used to express the distance to the destination. (eg: kilometers, miles, knots)
+DEFINE_PROPERTYKEY(PKEY_GPS_DestDistanceRef, 0xED4DF2D3, 0x8695, 0x450B, 0x85, 0x6F, 0xF5, 0xC1, 0xC5, 0x3A, 0xCB, 0x66, 100);
+
+// Name: System.GPS.DestLatitude -- PKEY_GPS_DestLatitude
+// Type: Multivalue Double -- VT_VECTOR | VT_R8 (For variants: VT_ARRAY | VT_R8)
+// FormatID: 9D1D7CC5-5C39-451C-86B3-928E2D18CC47, 100
+//
+// Indicates the latitude of the destination point. This is an array of three values. Index 0 is the degrees, index 1
+// is the minutes, index 2 is the seconds. Each is calculated from the values in PKEY_GPS_DestLatitudeNumerator and
+// PKEY_GPS_DestLatitudeDenominator.
+DEFINE_PROPERTYKEY(PKEY_GPS_DestLatitude, 0x9D1D7CC5, 0x5C39, 0x451C, 0x86, 0xB3, 0x92, 0x8E, 0x2D, 0x18, 0xCC, 0x47, 100);
+
+// Name: System.GPS.DestLatitudeDenominator -- PKEY_GPS_DestLatitudeDenominator
+// Type: Multivalue UInt32 -- VT_VECTOR | VT_UI4 (For variants: VT_ARRAY | VT_UI4)
+// FormatID: 3A372292-7FCA-49A7-99D5-E47BB2D4E7AB, 100
+//
+// Denominator of PKEY_GPS_DestLatitude
+DEFINE_PROPERTYKEY(PKEY_GPS_DestLatitudeDenominator, 0x3A372292, 0x7FCA, 0x49A7, 0x99, 0xD5, 0xE4, 0x7B, 0xB2, 0xD4, 0xE7, 0xAB, 100);
+
+// Name: System.GPS.DestLatitudeNumerator -- PKEY_GPS_DestLatitudeNumerator
+// Type: Multivalue UInt32 -- VT_VECTOR | VT_UI4 (For variants: VT_ARRAY | VT_UI4)
+// FormatID: ECF4B6F6-D5A6-433C-BB92-4076650FC890, 100
+//
+// Numerator of PKEY_GPS_DestLatitude
+DEFINE_PROPERTYKEY(PKEY_GPS_DestLatitudeNumerator, 0xECF4B6F6, 0xD5A6, 0x433C, 0xBB, 0x92, 0x40, 0x76, 0x65, 0x0F, 0xC8, 0x90, 100);
+
+// Name: System.GPS.DestLatitudeRef -- PKEY_GPS_DestLatitudeRef
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: CEA820B9-CE61-4885-A128-005D9087C192, 100
+//
+// Indicates whether the latitude destination point is north or south latitude
+DEFINE_PROPERTYKEY(PKEY_GPS_DestLatitudeRef, 0xCEA820B9, 0xCE61, 0x4885, 0xA1, 0x28, 0x00, 0x5D, 0x90, 0x87, 0xC1, 0x92, 100);
+
+// Name: System.GPS.DestLongitude -- PKEY_GPS_DestLongitude
+// Type: Multivalue Double -- VT_VECTOR | VT_R8 (For variants: VT_ARRAY | VT_R8)
+// FormatID: 47A96261-CB4C-4807-8AD3-40B9D9DBC6BC, 100
+//
+// Indicates the latitude of the destination point. This is an array of three values. Index 0 is the degrees, index 1
+// is the minutes, index 2 is the seconds. Each is calculated from the values in PKEY_GPS_DestLongitudeNumerator and
+// PKEY_GPS_DestLongitudeDenominator.
+DEFINE_PROPERTYKEY(PKEY_GPS_DestLongitude, 0x47A96261, 0xCB4C, 0x4807, 0x8A, 0xD3, 0x40, 0xB9, 0xD9, 0xDB, 0xC6, 0xBC, 100);
+
+// Name: System.GPS.DestLongitudeDenominator -- PKEY_GPS_DestLongitudeDenominator
+// Type: Multivalue UInt32 -- VT_VECTOR | VT_UI4 (For variants: VT_ARRAY | VT_UI4)
+// FormatID: 425D69E5-48AD-4900-8D80-6EB6B8D0AC86, 100
+//
+// Denominator of PKEY_GPS_DestLongitude
+DEFINE_PROPERTYKEY(PKEY_GPS_DestLongitudeDenominator, 0x425D69E5, 0x48AD, 0x4900, 0x8D, 0x80, 0x6E, 0xB6, 0xB8, 0xD0, 0xAC, 0x86, 100);
+
+// Name: System.GPS.DestLongitudeNumerator -- PKEY_GPS_DestLongitudeNumerator
+// Type: Multivalue UInt32 -- VT_VECTOR | VT_UI4 (For variants: VT_ARRAY | VT_UI4)
+// FormatID: A3250282-FB6D-48D5-9A89-DBCACE75CCCF, 100
+//
+// Numerator of PKEY_GPS_DestLongitude
+DEFINE_PROPERTYKEY(PKEY_GPS_DestLongitudeNumerator, 0xA3250282, 0xFB6D, 0x48D5, 0x9A, 0x89, 0xDB, 0xCA, 0xCE, 0x75, 0xCC, 0xCF, 100);
+
+// Name: System.GPS.DestLongitudeRef -- PKEY_GPS_DestLongitudeRef
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 182C1EA6-7C1C-4083-AB4B-AC6C9F4ED128, 100
+//
+// Indicates whether the longitude destination point is east or west longitude
+DEFINE_PROPERTYKEY(PKEY_GPS_DestLongitudeRef, 0x182C1EA6, 0x7C1C, 0x4083, 0xAB, 0x4B, 0xAC, 0x6C, 0x9F, 0x4E, 0xD1, 0x28, 100);
+
+// Name: System.GPS.Differential -- PKEY_GPS_Differential
+// Type: UInt16 -- VT_UI2
+// FormatID: AAF4EE25-BD3B-4DD7-BFC4-47F77BB00F6D, 100
+//
+// Indicates whether differential correction was applied to the GPS receiver
+DEFINE_PROPERTYKEY(PKEY_GPS_Differential, 0xAAF4EE25, 0xBD3B, 0x4DD7, 0xBF, 0xC4, 0x47, 0xF7, 0x7B, 0xB0, 0x0F, 0x6D, 100);
+
+// Name: System.GPS.DOP -- PKEY_GPS_DOP
+// Type: Double -- VT_R8
+// FormatID: 0CF8FB02-1837-42F1-A697-A7017AA289B9, 100
+//
+// Indicates the GPS DOP (data degree of precision). Calculated from PKEY_GPS_DOPNumerator and PKEY_GPS_DOPDenominator
+DEFINE_PROPERTYKEY(PKEY_GPS_DOP, 0x0CF8FB02, 0x1837, 0x42F1, 0xA6, 0x97, 0xA7, 0x01, 0x7A, 0xA2, 0x89, 0xB9, 100);
+
+// Name: System.GPS.DOPDenominator -- PKEY_GPS_DOPDenominator
+// Type: UInt32 -- VT_UI4
+// FormatID: A0BE94C5-50BA-487B-BD35-0654BE8881ED, 100
+//
+// Denominator of PKEY_GPS_DOP
+DEFINE_PROPERTYKEY(PKEY_GPS_DOPDenominator, 0xA0BE94C5, 0x50BA, 0x487B, 0xBD, 0x35, 0x06, 0x54, 0xBE, 0x88, 0x81, 0xED, 100);
+
+// Name: System.GPS.DOPNumerator -- PKEY_GPS_DOPNumerator
+// Type: UInt32 -- VT_UI4
+// FormatID: 47166B16-364F-4AA0-9F31-E2AB3DF449C3, 100
+//
+// Numerator of PKEY_GPS_DOP
+DEFINE_PROPERTYKEY(PKEY_GPS_DOPNumerator, 0x47166B16, 0x364F, 0x4AA0, 0x9F, 0x31, 0xE2, 0xAB, 0x3D, 0xF4, 0x49, 0xC3, 100);
+
+// Name: System.GPS.ImgDirection -- PKEY_GPS_ImgDirection
+// Type: Double -- VT_R8
+// FormatID: 16473C91-D017-4ED9-BA4D-B6BAA55DBCF8, 100
+//
+// Indicates direction of the image when it was captured. Calculated from PKEY_GPS_ImgDirectionNumerator and
+// PKEY_GPS_ImgDirectionDenominator.
+DEFINE_PROPERTYKEY(PKEY_GPS_ImgDirection, 0x16473C91, 0xD017, 0x4ED9, 0xBA, 0x4D, 0xB6, 0xBA, 0xA5, 0x5D, 0xBC, 0xF8, 100);
+
+// Name: System.GPS.ImgDirectionDenominator -- PKEY_GPS_ImgDirectionDenominator
+// Type: UInt32 -- VT_UI4
+// FormatID: 10B24595-41A2-4E20-93C2-5761C1395F32, 100
+//
+// Denominator of PKEY_GPS_ImgDirection
+DEFINE_PROPERTYKEY(PKEY_GPS_ImgDirectionDenominator, 0x10B24595, 0x41A2, 0x4E20, 0x93, 0xC2, 0x57, 0x61, 0xC1, 0x39, 0x5F, 0x32, 100);
+
+// Name: System.GPS.ImgDirectionNumerator -- PKEY_GPS_ImgDirectionNumerator
+// Type: UInt32 -- VT_UI4
+// FormatID: DC5877C7-225F-45F7-BAC7-E81334B6130A, 100
+//
+// Numerator of PKEY_GPS_ImgDirection
+DEFINE_PROPERTYKEY(PKEY_GPS_ImgDirectionNumerator, 0xDC5877C7, 0x225F, 0x45F7, 0xBA, 0xC7, 0xE8, 0x13, 0x34, 0xB6, 0x13, 0x0A, 100);
+
+// Name: System.GPS.ImgDirectionRef -- PKEY_GPS_ImgDirectionRef
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: A4AAA5B7-1AD0-445F-811A-0F8F6E67F6B5, 100
+//
+// Indicates reference for giving the direction of the image when it was captured. (eg: true direction, magnetic direction)
+DEFINE_PROPERTYKEY(PKEY_GPS_ImgDirectionRef, 0xA4AAA5B7, 0x1AD0, 0x445F, 0x81, 0x1A, 0x0F, 0x8F, 0x6E, 0x67, 0xF6, 0xB5, 100);
+
+// Name: System.GPS.Latitude -- PKEY_GPS_Latitude
+// Type: Multivalue Double -- VT_VECTOR | VT_R8 (For variants: VT_ARRAY | VT_R8)
+// FormatID: 8727CFFF-4868-4EC6-AD5B-81B98521D1AB, 100
+//
+// Indicates the latitude. This is an array of three values. Index 0 is the degrees, index 1 is the minutes, index 2
+// is the seconds. Each is calculated from the values in PKEY_GPS_LatitudeNumerator and PKEY_GPS_LatitudeDenominator.
+DEFINE_PROPERTYKEY(PKEY_GPS_Latitude, 0x8727CFFF, 0x4868, 0x4EC6, 0xAD, 0x5B, 0x81, 0xB9, 0x85, 0x21, 0xD1, 0xAB, 100);
+
+// Name: System.GPS.LatitudeDenominator -- PKEY_GPS_LatitudeDenominator
+// Type: Multivalue UInt32 -- VT_VECTOR | VT_UI4 (For variants: VT_ARRAY | VT_UI4)
+// FormatID: 16E634EE-2BFF-497B-BD8A-4341AD39EEB9, 100
+//
+// Denominator of PKEY_GPS_Latitude
+DEFINE_PROPERTYKEY(PKEY_GPS_LatitudeDenominator, 0x16E634EE, 0x2BFF, 0x497B, 0xBD, 0x8A, 0x43, 0x41, 0xAD, 0x39, 0xEE, 0xB9, 100);
+
+// Name: System.GPS.LatitudeNumerator -- PKEY_GPS_LatitudeNumerator
+// Type: Multivalue UInt32 -- VT_VECTOR | VT_UI4 (For variants: VT_ARRAY | VT_UI4)
+// FormatID: 7DDAAAD1-CCC8-41AE-B750-B2CB8031AEA2, 100
+//
+// Numerator of PKEY_GPS_Latitude
+DEFINE_PROPERTYKEY(PKEY_GPS_LatitudeNumerator, 0x7DDAAAD1, 0xCCC8, 0x41AE, 0xB7, 0x50, 0xB2, 0xCB, 0x80, 0x31, 0xAE, 0xA2, 100);
+
+// Name: System.GPS.LatitudeRef -- PKEY_GPS_LatitudeRef
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 029C0252-5B86-46C7-ACA0-2769FFC8E3D4, 100
+//
+// Indicates whether latitude is north or south latitude
+DEFINE_PROPERTYKEY(PKEY_GPS_LatitudeRef, 0x029C0252, 0x5B86, 0x46C7, 0xAC, 0xA0, 0x27, 0x69, 0xFF, 0xC8, 0xE3, 0xD4, 100);
+
+// Name: System.GPS.Longitude -- PKEY_GPS_Longitude
+// Type: Multivalue Double -- VT_VECTOR | VT_R8 (For variants: VT_ARRAY | VT_R8)
+// FormatID: C4C4DBB2-B593-466B-BBDA-D03D27D5E43A, 100
+//
+// Indicates the longitude. This is an array of three values. Index 0 is the degrees, index 1 is the minutes, index 2
+// is the seconds. Each is calculated from the values in PKEY_GPS_LongitudeNumerator and PKEY_GPS_LongitudeDenominator.
+DEFINE_PROPERTYKEY(PKEY_GPS_Longitude, 0xC4C4DBB2, 0xB593, 0x466B, 0xBB, 0xDA, 0xD0, 0x3D, 0x27, 0xD5, 0xE4, 0x3A, 100);
+
+// Name: System.GPS.LongitudeDenominator -- PKEY_GPS_LongitudeDenominator
+// Type: Multivalue UInt32 -- VT_VECTOR | VT_UI4 (For variants: VT_ARRAY | VT_UI4)
+// FormatID: BE6E176C-4534-4D2C-ACE5-31DEDAC1606B, 100
+//
+// Denominator of PKEY_GPS_Longitude
+DEFINE_PROPERTYKEY(PKEY_GPS_LongitudeDenominator, 0xBE6E176C, 0x4534, 0x4D2C, 0xAC, 0xE5, 0x31, 0xDE, 0xDA, 0xC1, 0x60, 0x6B, 100);
+
+// Name: System.GPS.LongitudeNumerator -- PKEY_GPS_LongitudeNumerator
+// Type: Multivalue UInt32 -- VT_VECTOR | VT_UI4 (For variants: VT_ARRAY | VT_UI4)
+// FormatID: 02B0F689-A914-4E45-821D-1DDA452ED2C4, 100
+//
+// Numerator of PKEY_GPS_Longitude
+DEFINE_PROPERTYKEY(PKEY_GPS_LongitudeNumerator, 0x02B0F689, 0xA914, 0x4E45, 0x82, 0x1D, 0x1D, 0xDA, 0x45, 0x2E, 0xD2, 0xC4, 100);
+
+// Name: System.GPS.LongitudeRef -- PKEY_GPS_LongitudeRef
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 33DCF22B-28D5-464C-8035-1EE9EFD25278, 100
+//
+// Indicates whether longitude is east or west longitude
+DEFINE_PROPERTYKEY(PKEY_GPS_LongitudeRef, 0x33DCF22B, 0x28D5, 0x464C, 0x80, 0x35, 0x1E, 0xE9, 0xEF, 0xD2, 0x52, 0x78, 100);
+
+// Name: System.GPS.MapDatum -- PKEY_GPS_MapDatum
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 2CA2DAE6-EDDC-407D-BEF1-773942ABFA95, 100
+//
+// Indicates the geodetic survey data used by the GPS receiver
+DEFINE_PROPERTYKEY(PKEY_GPS_MapDatum, 0x2CA2DAE6, 0xEDDC, 0x407D, 0xBE, 0xF1, 0x77, 0x39, 0x42, 0xAB, 0xFA, 0x95, 100);
+
+// Name: System.GPS.MeasureMode -- PKEY_GPS_MeasureMode
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: A015ED5D-AAEA-4D58-8A86-3C586920EA0B, 100
+//
+// Indicates the GPS measurement mode. (eg: 2-dimensional, 3-dimensional)
+DEFINE_PROPERTYKEY(PKEY_GPS_MeasureMode, 0xA015ED5D, 0xAAEA, 0x4D58, 0x8A, 0x86, 0x3C, 0x58, 0x69, 0x20, 0xEA, 0x0B, 100);
+
+// Name: System.GPS.ProcessingMethod -- PKEY_GPS_ProcessingMethod
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 59D49E61-840F-4AA9-A939-E2099B7F6399, 100
+//
+// Indicates the name of the method used for location finding
+DEFINE_PROPERTYKEY(PKEY_GPS_ProcessingMethod, 0x59D49E61, 0x840F, 0x4AA9, 0xA9, 0x39, 0xE2, 0x09, 0x9B, 0x7F, 0x63, 0x99, 100);
+
+// Name: System.GPS.Satellites -- PKEY_GPS_Satellites
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 467EE575-1F25-4557-AD4E-B8B58B0D9C15, 100
+//
+// Indicates the GPS satellites used for measurements
+DEFINE_PROPERTYKEY(PKEY_GPS_Satellites, 0x467EE575, 0x1F25, 0x4557, 0xAD, 0x4E, 0xB8, 0xB5, 0x8B, 0x0D, 0x9C, 0x15, 100);
+
+// Name: System.GPS.Speed -- PKEY_GPS_Speed
+// Type: Double -- VT_R8
+// FormatID: DA5D0862-6E76-4E1B-BABD-70021BD25494, 100
+//
+// Indicates the speed of the GPS receiver movement. Calculated from PKEY_GPS_SpeedNumerator and
+// PKEY_GPS_SpeedDenominator.
+DEFINE_PROPERTYKEY(PKEY_GPS_Speed, 0xDA5D0862, 0x6E76, 0x4E1B, 0xBA, 0xBD, 0x70, 0x02, 0x1B, 0xD2, 0x54, 0x94, 100);
+
+// Name: System.GPS.SpeedDenominator -- PKEY_GPS_SpeedDenominator
+// Type: UInt32 -- VT_UI4
+// FormatID: 7D122D5A-AE5E-4335-8841-D71E7CE72F53, 100
+//
+// Denominator of PKEY_GPS_Speed
+DEFINE_PROPERTYKEY(PKEY_GPS_SpeedDenominator, 0x7D122D5A, 0xAE5E, 0x4335, 0x88, 0x41, 0xD7, 0x1E, 0x7C, 0xE7, 0x2F, 0x53, 100);
+
+// Name: System.GPS.SpeedNumerator -- PKEY_GPS_SpeedNumerator
+// Type: UInt32 -- VT_UI4
+// FormatID: ACC9CE3D-C213-4942-8B48-6D0820F21C6D, 100
+//
+// Numerator of PKEY_GPS_Speed
+DEFINE_PROPERTYKEY(PKEY_GPS_SpeedNumerator, 0xACC9CE3D, 0xC213, 0x4942, 0x8B, 0x48, 0x6D, 0x08, 0x20, 0xF2, 0x1C, 0x6D, 100);
+
+// Name: System.GPS.SpeedRef -- PKEY_GPS_SpeedRef
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: ECF7F4C9-544F-4D6D-9D98-8AD79ADAF453, 100
+//
+// Indicates the unit used to express the speed of the GPS receiver movement. (eg: kilometers per hour,
+// miles per hour, knots).
+DEFINE_PROPERTYKEY(PKEY_GPS_SpeedRef, 0xECF7F4C9, 0x544F, 0x4D6D, 0x9D, 0x98, 0x8A, 0xD7, 0x9A, 0xDA, 0xF4, 0x53, 100);
+
+// Name: System.GPS.Status -- PKEY_GPS_Status
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 125491F4-818F-46B2-91B5-D537753617B2, 100
+//
+// Indicates the status of the GPS receiver when the image was recorded. (eg: measurement in progress,
+// measurement interoperability).
+DEFINE_PROPERTYKEY(PKEY_GPS_Status, 0x125491F4, 0x818F, 0x46B2, 0x91, 0xB5, 0xD5, 0x37, 0x75, 0x36, 0x17, 0xB2, 100);
+
+// Name: System.GPS.Track -- PKEY_GPS_Track
+// Type: Double -- VT_R8
+// FormatID: 76C09943-7C33-49E3-9E7E-CDBA872CFADA, 100
+//
+// Indicates the direction of the GPS receiver movement. Calculated from PKEY_GPS_TrackNumerator and
+// PKEY_GPS_TrackDenominator.
+DEFINE_PROPERTYKEY(PKEY_GPS_Track, 0x76C09943, 0x7C33, 0x49E3, 0x9E, 0x7E, 0xCD, 0xBA, 0x87, 0x2C, 0xFA, 0xDA, 100);
+
+// Name: System.GPS.TrackDenominator -- PKEY_GPS_TrackDenominator
+// Type: UInt32 -- VT_UI4
+// FormatID: C8D1920C-01F6-40C0-AC86-2F3A4AD00770, 100
+//
+// Denominator of PKEY_GPS_Track
+DEFINE_PROPERTYKEY(PKEY_GPS_TrackDenominator, 0xC8D1920C, 0x01F6, 0x40C0, 0xAC, 0x86, 0x2F, 0x3A, 0x4A, 0xD0, 0x07, 0x70, 100);
+
+// Name: System.GPS.TrackNumerator -- PKEY_GPS_TrackNumerator
+// Type: UInt32 -- VT_UI4
+// FormatID: 702926F4-44A6-43E1-AE71-45627116893B, 100
+//
+// Numerator of PKEY_GPS_Track
+DEFINE_PROPERTYKEY(PKEY_GPS_TrackNumerator, 0x702926F4, 0x44A6, 0x43E1, 0xAE, 0x71, 0x45, 0x62, 0x71, 0x16, 0x89, 0x3B, 100);
+
+// Name: System.GPS.TrackRef -- PKEY_GPS_TrackRef
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 35DBE6FE-44C3-4400-AAAE-D2C799C407E8, 100
+//
+// Indicates reference for the direction of the GPS receiver movement. (eg: true direction, magnetic direction)
+DEFINE_PROPERTYKEY(PKEY_GPS_TrackRef, 0x35DBE6FE, 0x44C3, 0x4400, 0xAA, 0xAE, 0xD2, 0xC7, 0x99, 0xC4, 0x07, 0xE8, 100);
+
+// Name: System.GPS.VersionID -- PKEY_GPS_VersionID
+// Type: Buffer -- VT_VECTOR | VT_UI1 (For variants: VT_ARRAY | VT_UI1)
+// FormatID: 22704DA4-C6B2-4A99-8E56-F16DF8C92599, 100
+//
+// Indicates the version of the GPS information
+DEFINE_PROPERTYKEY(PKEY_GPS_VersionID, 0x22704DA4, 0xC6B2, 0x4A99, 0x8E, 0x56, 0xF1, 0x6D, 0xF8, 0xC9, 0x25, 0x99, 100);
+
+//-----------------------------------------------------------------------------
+// Image properties
+
+
+
+// Name: System.Image.BitDepth -- PKEY_Image_BitDepth
+// Type: UInt32 -- VT_UI4
+// FormatID: (PSGUID_IMAGESUMMARYINFORMATION) 6444048F-4C8B-11D1-8B70-080036B11A03, 7 (PIDISI_BITDEPTH)
+//
+//
+DEFINE_PROPERTYKEY(PKEY_Image_BitDepth, 0x6444048F, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 7);
+
+// Name: System.Image.ColorSpace -- PKEY_Image_ColorSpace
+// Type: UInt16 -- VT_UI2
+// FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 40961
+//
+// PropertyTagExifColorSpace
+DEFINE_PROPERTYKEY(PKEY_Image_ColorSpace, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 40961);
+
+// Possible discrete values for PKEY_Image_ColorSpace are:
+#define IMAGE_COLORSPACE_SRGB 1u
+#define IMAGE_COLORSPACE_UNCALIBRATED 0xFFFFu
+
+// Name: System.Image.CompressedBitsPerPixel -- PKEY_Image_CompressedBitsPerPixel
+// Type: Double -- VT_R8
+// FormatID: 364B6FA9-37AB-482A-BE2B-AE02F60D4318, 100
+//
+// Calculated from PKEY_Image_CompressedBitsPerPixelNumerator and PKEY_Image_CompressedBitsPerPixelDenominator.
+DEFINE_PROPERTYKEY(PKEY_Image_CompressedBitsPerPixel, 0x364B6FA9, 0x37AB, 0x482A, 0xBE, 0x2B, 0xAE, 0x02, 0xF6, 0x0D, 0x43, 0x18, 100);
+
+// Name: System.Image.CompressedBitsPerPixelDenominator -- PKEY_Image_CompressedBitsPerPixelDenominator
+// Type: UInt32 -- VT_UI4
+// FormatID: 1F8844E1-24AD-4508-9DFD-5326A415CE02, 100
+//
+// Denominator of PKEY_Image_CompressedBitsPerPixel.
+DEFINE_PROPERTYKEY(PKEY_Image_CompressedBitsPerPixelDenominator, 0x1F8844E1, 0x24AD, 0x4508, 0x9D, 0xFD, 0x53, 0x26, 0xA4, 0x15, 0xCE, 0x02, 100);
+
+// Name: System.Image.CompressedBitsPerPixelNumerator -- PKEY_Image_CompressedBitsPerPixelNumerator
+// Type: UInt32 -- VT_UI4
+// FormatID: D21A7148-D32C-4624-8900-277210F79C0F, 100
+//
+// Numerator of PKEY_Image_CompressedBitsPerPixel.
+DEFINE_PROPERTYKEY(PKEY_Image_CompressedBitsPerPixelNumerator, 0xD21A7148, 0xD32C, 0x4624, 0x89, 0x00, 0x27, 0x72, 0x10, 0xF7, 0x9C, 0x0F, 100);
+
+// Name: System.Image.Compression -- PKEY_Image_Compression
+// Type: UInt16 -- VT_UI2
+// FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 259
+//
+// Indicates the image compression level. PropertyTagCompression.
+DEFINE_PROPERTYKEY(PKEY_Image_Compression, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 259);
+
+// Possible discrete values for PKEY_Image_Compression are:
+#define IMAGE_COMPRESSION_UNCOMPRESSED 1u
+#define IMAGE_COMPRESSION_CCITT_T3 2u
+#define IMAGE_COMPRESSION_CCITT_T4 3u
+#define IMAGE_COMPRESSION_CCITT_T6 4u
+#define IMAGE_COMPRESSION_LZW 5u
+#define IMAGE_COMPRESSION_JPEG 6u
+#define IMAGE_COMPRESSION_PACKBITS 32773u
+
+// Name: System.Image.CompressionText -- PKEY_Image_CompressionText
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 3F08E66F-2F44-4BB9-A682-AC35D2562322, 100
+//
+// This is the user-friendly form of System.Image.Compression. Not intended to be parsed
+// programmatically.
+DEFINE_PROPERTYKEY(PKEY_Image_CompressionText, 0x3F08E66F, 0x2F44, 0x4BB9, 0xA6, 0x82, 0xAC, 0x35, 0xD2, 0x56, 0x23, 0x22, 100);
+
+// Name: System.Image.Dimensions -- PKEY_Image_Dimensions
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: (PSGUID_IMAGESUMMARYINFORMATION) 6444048F-4C8B-11D1-8B70-080036B11A03, 13 (PIDISI_DIMENSIONS)
+//
+// Indicates the dimensions of the image.
+DEFINE_PROPERTYKEY(PKEY_Image_Dimensions, 0x6444048F, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 13);
+
+// Name: System.Image.HorizontalResolution -- PKEY_Image_HorizontalResolution
+// Type: Double -- VT_R8
+// FormatID: (PSGUID_IMAGESUMMARYINFORMATION) 6444048F-4C8B-11D1-8B70-080036B11A03, 5 (PIDISI_RESOLUTIONX)
+//
+//
+DEFINE_PROPERTYKEY(PKEY_Image_HorizontalResolution, 0x6444048F, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 5);
+
+// Name: System.Image.HorizontalSize -- PKEY_Image_HorizontalSize
+// Type: UInt32 -- VT_UI4
+// FormatID: (PSGUID_IMAGESUMMARYINFORMATION) 6444048F-4C8B-11D1-8B70-080036B11A03, 3 (PIDISI_CX)
+//
+//
+DEFINE_PROPERTYKEY(PKEY_Image_HorizontalSize, 0x6444048F, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 3);
+
+// Name: System.Image.ImageID -- PKEY_Image_ImageID
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 10DABE05-32AA-4C29-BF1A-63E2D220587F, 100
+DEFINE_PROPERTYKEY(PKEY_Image_ImageID, 0x10DABE05, 0x32AA, 0x4C29, 0xBF, 0x1A, 0x63, 0xE2, 0xD2, 0x20, 0x58, 0x7F, 100);
+
+// Name: System.Image.ResolutionUnit -- PKEY_Image_ResolutionUnit
+// Type: Int16 -- VT_I2
+// FormatID: 19B51FA6-1F92-4A5C-AB48-7DF0ABD67444, 100
+DEFINE_PROPERTYKEY(PKEY_Image_ResolutionUnit, 0x19B51FA6, 0x1F92, 0x4A5C, 0xAB, 0x48, 0x7D, 0xF0, 0xAB, 0xD6, 0x74, 0x44, 100);
+
+// Name: System.Image.VerticalResolution -- PKEY_Image_VerticalResolution
+// Type: Double -- VT_R8
+// FormatID: (PSGUID_IMAGESUMMARYINFORMATION) 6444048F-4C8B-11D1-8B70-080036B11A03, 6 (PIDISI_RESOLUTIONY)
+//
+//
+DEFINE_PROPERTYKEY(PKEY_Image_VerticalResolution, 0x6444048F, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 6);
+
+// Name: System.Image.VerticalSize -- PKEY_Image_VerticalSize
+// Type: UInt32 -- VT_UI4
+// FormatID: (PSGUID_IMAGESUMMARYINFORMATION) 6444048F-4C8B-11D1-8B70-080036B11A03, 4 (PIDISI_CY)
+//
+//
+DEFINE_PROPERTYKEY(PKEY_Image_VerticalSize, 0x6444048F, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 4);
+
+
+
+//-----------------------------------------------------------------------------
+// Journal properties
+
+// Name: System.Journal.Contacts -- PKEY_Journal_Contacts
+// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR)
+// FormatID: DEA7C82C-1D89-4A66-9427-A4E3DEBABCB1, 100
+DEFINE_PROPERTYKEY(PKEY_Journal_Contacts, 0xDEA7C82C, 0x1D89, 0x4A66, 0x94, 0x27, 0xA4, 0xE3, 0xDE, 0xBA, 0xBC, 0xB1, 100);
+
+// Name: System.Journal.EntryType -- PKEY_Journal_EntryType
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 95BEB1FC-326D-4644-B396-CD3ED90E6DDF, 100
+DEFINE_PROPERTYKEY(PKEY_Journal_EntryType, 0x95BEB1FC, 0x326D, 0x4644, 0xB3, 0x96, 0xCD, 0x3E, 0xD9, 0x0E, 0x6D, 0xDF, 100);
+
+//-----------------------------------------------------------------------------
+// Link properties
+
+
+
+// Name: System.Link.Comment -- PKEY_Link_Comment
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: (PSGUID_LINK) B9B4B3FC-2B51-4A42-B5D8-324146AFCF25, 5
+DEFINE_PROPERTYKEY(PKEY_Link_Comment, 0xB9B4B3FC, 0x2B51, 0x4A42, 0xB5, 0xD8, 0x32, 0x41, 0x46, 0xAF, 0xCF, 0x25, 5);
+
+// Name: System.Link.DateVisited -- PKEY_Link_DateVisited
+// Type: DateTime -- VT_FILETIME (For variants: VT_DATE)
+// FormatID: 5CBF2787-48CF-4208-B90E-EE5E5D420294, 23 (PKEYs relating to URLs. Used by IE History.)
+DEFINE_PROPERTYKEY(PKEY_Link_DateVisited, 0x5CBF2787, 0x48CF, 0x4208, 0xB9, 0x0E, 0xEE, 0x5E, 0x5D, 0x42, 0x02, 0x94, 23);
+
+// Name: System.Link.Description -- PKEY_Link_Description
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 5CBF2787-48CF-4208-B90E-EE5E5D420294, 21 (PKEYs relating to URLs. Used by IE History.)
+DEFINE_PROPERTYKEY(PKEY_Link_Description, 0x5CBF2787, 0x48CF, 0x4208, 0xB9, 0x0E, 0xEE, 0x5E, 0x5D, 0x42, 0x02, 0x94, 21);
+
+// Name: System.Link.Status -- PKEY_Link_Status
+// Type: Int32 -- VT_I4
+// FormatID: (PSGUID_LINK) B9B4B3FC-2B51-4A42-B5D8-324146AFCF25, 3 (PID_LINK_TARGET_TYPE)
+//
+//
+DEFINE_PROPERTYKEY(PKEY_Link_Status, 0xB9B4B3FC, 0x2B51, 0x4A42, 0xB5, 0xD8, 0x32, 0x41, 0x46, 0xAF, 0xCF, 0x25, 3);
+
+// Possible discrete values for PKEY_Link_Status are:
+#define LINK_STATUS_RESOLVED 1l
+#define LINK_STATUS_BROKEN 2l
+
+// Name: System.Link.TargetExtension -- PKEY_Link_TargetExtension
+// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR)
+// FormatID: 7A7D76F4-B630-4BD7-95FF-37CC51A975C9, 2
+//
+// The file extension of the link target. See System.File.Extension
+DEFINE_PROPERTYKEY(PKEY_Link_TargetExtension, 0x7A7D76F4, 0xB630, 0x4BD7, 0x95, 0xFF, 0x37, 0xCC, 0x51, 0xA9, 0x75, 0xC9, 2);
+
+// Name: System.Link.TargetParsingPath -- PKEY_Link_TargetParsingPath
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: (PSGUID_LINK) B9B4B3FC-2B51-4A42-B5D8-324146AFCF25, 2 (PID_LINK_TARGET)
+//
+// This is the shell namespace path to the target of the link item. This path may be passed to
+// SHParseDisplayName to parse the path to the correct shell folder.
+//
+// If the target item is a file, the value is identical to System.ItemPathDisplay.
+//
+// If the target item cannot be accessed through the shell namespace, this value is VT_EMPTY.
+DEFINE_PROPERTYKEY(PKEY_Link_TargetParsingPath, 0xB9B4B3FC, 0x2B51, 0x4A42, 0xB5, 0xD8, 0x32, 0x41, 0x46, 0xAF, 0xCF, 0x25, 2);
+
+// Name: System.Link.TargetSFGAOFlags -- PKEY_Link_TargetSFGAOFlags
+// Type: UInt32 -- VT_UI4
+// FormatID: (PSGUID_LINK) B9B4B3FC-2B51-4A42-B5D8-324146AFCF25, 8
+//
+// IShellFolder::GetAttributesOf flags for the target of a link, with SFGAO_PKEYSFGAOMASK
+// attributes masked out.
+DEFINE_PROPERTYKEY(PKEY_Link_TargetSFGAOFlags, 0xB9B4B3FC, 0x2B51, 0x4A42, 0xB5, 0xD8, 0x32, 0x41, 0x46, 0xAF, 0xCF, 0x25, 8);
+
+//-----------------------------------------------------------------------------
+// Media properties
+
+
+
+// Name: System.Media.AuthorUrl -- PKEY_Media_AuthorUrl
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 32 (PIDMSI_AUTHOR_URL)
+//
+//
+DEFINE_PROPERTYKEY(PKEY_Media_AuthorUrl, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 32);
+
+// Name: System.Media.AverageLevel -- PKEY_Media_AverageLevel
+// Type: UInt32 -- VT_UI4
+// FormatID: 09EDD5B6-B301-43C5-9990-D00302EFFD46, 100
+DEFINE_PROPERTYKEY(PKEY_Media_AverageLevel, 0x09EDD5B6, 0xB301, 0x43C5, 0x99, 0x90, 0xD0, 0x03, 0x02, 0xEF, 0xFD, 0x46, 100);
+
+// Name: System.Media.ClassPrimaryID -- PKEY_Media_ClassPrimaryID
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 13 (PIDMSI_CLASS_PRIMARY_ID)
+//
+//
+DEFINE_PROPERTYKEY(PKEY_Media_ClassPrimaryID, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 13);
+
+// Name: System.Media.ClassSecondaryID -- PKEY_Media_ClassSecondaryID
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 14 (PIDMSI_CLASS_SECONDARY_ID)
+//
+//
+DEFINE_PROPERTYKEY(PKEY_Media_ClassSecondaryID, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 14);
+
+// Name: System.Media.CollectionGroupID -- PKEY_Media_CollectionGroupID
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 24 (PIDMSI_COLLECTION_GROUP_ID)
+//
+//
+DEFINE_PROPERTYKEY(PKEY_Media_CollectionGroupID, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 24);
+
+// Name: System.Media.CollectionID -- PKEY_Media_CollectionID
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 25 (PIDMSI_COLLECTION_ID)
+//
+//
+DEFINE_PROPERTYKEY(PKEY_Media_CollectionID, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 25);
+
+// Name: System.Media.ContentDistributor -- PKEY_Media_ContentDistributor
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 18 (PIDMSI_CONTENTDISTRIBUTOR)
+//
+//
+DEFINE_PROPERTYKEY(PKEY_Media_ContentDistributor, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 18);
+
+// Name: System.Media.ContentID -- PKEY_Media_ContentID
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 26 (PIDMSI_CONTENT_ID)
+//
+//
+DEFINE_PROPERTYKEY(PKEY_Media_ContentID, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 26);
+
+// Name: System.Media.CreatorApplication -- PKEY_Media_CreatorApplication
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 27 (PIDMSI_TOOL_NAME)
+//
+//
+DEFINE_PROPERTYKEY(PKEY_Media_CreatorApplication, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 27);
+
+// Name: System.Media.CreatorApplicationVersion -- PKEY_Media_CreatorApplicationVersion
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 28 (PIDMSI_TOOL_VERSION)
+//
+//
+DEFINE_PROPERTYKEY(PKEY_Media_CreatorApplicationVersion, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 28);
+
+// Name: System.Media.DateEncoded -- PKEY_Media_DateEncoded
+// Type: DateTime -- VT_FILETIME (For variants: VT_DATE)
+// FormatID: 2E4B640D-5019-46D8-8881-55414CC5CAA0, 100
+//
+// DateTime is in UTC (in the doc, not file system).
+DEFINE_PROPERTYKEY(PKEY_Media_DateEncoded, 0x2E4B640D, 0x5019, 0x46D8, 0x88, 0x81, 0x55, 0x41, 0x4C, 0xC5, 0xCA, 0xA0, 100);
+
+// Name: System.Media.DateReleased -- PKEY_Media_DateReleased
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: DE41CC29-6971-4290-B472-F59F2E2F31E2, 100
+DEFINE_PROPERTYKEY(PKEY_Media_DateReleased, 0xDE41CC29, 0x6971, 0x4290, 0xB4, 0x72, 0xF5, 0x9F, 0x2E, 0x2F, 0x31, 0xE2, 100);
+
+// Name: System.Media.Duration -- PKEY_Media_Duration
+// Type: UInt64 -- VT_UI8
+// FormatID: (FMTID_AudioSummaryInformation) 64440490-4C8B-11D1-8B70-080036B11A03, 3 (PIDASI_TIMELENGTH)
+//
+// 100ns units, not milliseconds
+DEFINE_PROPERTYKEY(PKEY_Media_Duration, 0x64440490, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 3);
+
+// Name: System.Media.DVDID -- PKEY_Media_DVDID
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 15 (PIDMSI_DVDID)
+//
+//
+DEFINE_PROPERTYKEY(PKEY_Media_DVDID, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 15);
+
+// Name: System.Media.EncodedBy -- PKEY_Media_EncodedBy
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 36 (PIDMSI_ENCODED_BY)
+//
+//
+DEFINE_PROPERTYKEY(PKEY_Media_EncodedBy, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 36);
+
+// Name: System.Media.EncodingSettings -- PKEY_Media_EncodingSettings
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 37 (PIDMSI_ENCODING_SETTINGS)
+//
+//
+DEFINE_PROPERTYKEY(PKEY_Media_EncodingSettings, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 37);
+
+// Name: System.Media.FrameCount -- PKEY_Media_FrameCount
+// Type: UInt32 -- VT_UI4
+// FormatID: (PSGUID_IMAGESUMMARYINFORMATION) 6444048F-4C8B-11D1-8B70-080036B11A03, 12 (PIDISI_FRAMECOUNT)
+//
+// Indicates the frame count for the image.
+DEFINE_PROPERTYKEY(PKEY_Media_FrameCount, 0x6444048F, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 12);
+
+// Name: System.Media.MCDI -- PKEY_Media_MCDI
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 16 (PIDMSI_MCDI)
+//
+//
+DEFINE_PROPERTYKEY(PKEY_Media_MCDI, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 16);
+
+// Name: System.Media.MetadataContentProvider -- PKEY_Media_MetadataContentProvider
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 17 (PIDMSI_PROVIDER)
+//
+//
+DEFINE_PROPERTYKEY(PKEY_Media_MetadataContentProvider, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 17);
+
+// Name: System.Media.Producer -- PKEY_Media_Producer
+// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR)
+// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 22 (PIDMSI_PRODUCER)
+//
+//
+DEFINE_PROPERTYKEY(PKEY_Media_Producer, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 22);
+
+// Name: System.Media.PromotionUrl -- PKEY_Media_PromotionUrl
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 33 (PIDMSI_PROMOTION_URL)
+//
+//
+DEFINE_PROPERTYKEY(PKEY_Media_PromotionUrl, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 33);
+
+// Name: System.Media.ProtectionType -- PKEY_Media_ProtectionType
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 38
+//
+// If media is protected, how is it protected?
+DEFINE_PROPERTYKEY(PKEY_Media_ProtectionType, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 38);
+
+// Name: System.Media.ProviderRating -- PKEY_Media_ProviderRating
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 39
+//
+// Rating (0 - 99) supplied by metadata provider
+DEFINE_PROPERTYKEY(PKEY_Media_ProviderRating, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 39);
+
+// Name: System.Media.ProviderStyle -- PKEY_Media_ProviderStyle
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 40
+//
+// Style of music or video, supplied by metadata provider
+DEFINE_PROPERTYKEY(PKEY_Media_ProviderStyle, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 40);
+
+// Name: System.Media.Publisher -- PKEY_Media_Publisher
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 30 (PIDMSI_PUBLISHER)
+//
+//
+DEFINE_PROPERTYKEY(PKEY_Media_Publisher, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 30);
+
+// Name: System.Media.SubscriptionContentId -- PKEY_Media_SubscriptionContentId
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 9AEBAE7A-9644-487D-A92C-657585ED751A, 100
+DEFINE_PROPERTYKEY(PKEY_Media_SubscriptionContentId, 0x9AEBAE7A, 0x9644, 0x487D, 0xA9, 0x2C, 0x65, 0x75, 0x85, 0xED, 0x75, 0x1A, 100);
+
+// Name: System.Media.SubTitle -- PKEY_Media_SubTitle
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: (FMTID_MUSIC) 56A3372E-CE9C-11D2-9F0E-006097C686F6, 38 (PIDSI_MUSIC_SUB_TITLE)
+//
+//
+DEFINE_PROPERTYKEY(PKEY_Media_SubTitle, 0x56A3372E, 0xCE9C, 0x11D2, 0x9F, 0x0E, 0x00, 0x60, 0x97, 0xC6, 0x86, 0xF6, 38);
+
+// Name: System.Media.UniqueFileIdentifier -- PKEY_Media_UniqueFileIdentifier
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 35 (PIDMSI_UNIQUE_FILE_IDENTIFIER)
+//
+//
+DEFINE_PROPERTYKEY(PKEY_Media_UniqueFileIdentifier, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 35);
+
+// Name: System.Media.UserNoAutoInfo -- PKEY_Media_UserNoAutoInfo
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 41
+//
+// If true, do NOT alter this file's metadata. Set by user.
+DEFINE_PROPERTYKEY(PKEY_Media_UserNoAutoInfo, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 41);
+
+// Name: System.Media.UserWebUrl -- PKEY_Media_UserWebUrl
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 34 (PIDMSI_USER_WEB_URL)
+//
+//
+DEFINE_PROPERTYKEY(PKEY_Media_UserWebUrl, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 34);
+
+// Name: System.Media.Writer -- PKEY_Media_Writer
+// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR)
+// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 23 (PIDMSI_WRITER)
+//
+//
+DEFINE_PROPERTYKEY(PKEY_Media_Writer, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 23);
+
+// Name: System.Media.Year -- PKEY_Media_Year
+// Type: UInt32 -- VT_UI4
+// FormatID: (FMTID_MUSIC) 56A3372E-CE9C-11D2-9F0E-006097C686F6, 5 (PIDSI_MUSIC_YEAR)
+//
+//
+DEFINE_PROPERTYKEY(PKEY_Media_Year, 0x56A3372E, 0xCE9C, 0x11D2, 0x9F, 0x0E, 0x00, 0x60, 0x97, 0xC6, 0x86, 0xF6, 5);
+
+//-----------------------------------------------------------------------------
+// Message properties
+
+
+
+// Name: System.Message.AttachmentContents -- PKEY_Message_AttachmentContents
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 3143BF7C-80A8-4854-8880-E2E40189BDD0, 100
+DEFINE_PROPERTYKEY(PKEY_Message_AttachmentContents, 0x3143BF7C, 0x80A8, 0x4854, 0x88, 0x80, 0xE2, 0xE4, 0x01, 0x89, 0xBD, 0xD0, 100);
+
+// Name: System.Message.AttachmentNames -- PKEY_Message_AttachmentNames
+// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR)
+// FormatID: E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD, 21
+//
+// The names of the attachments in a message
+DEFINE_PROPERTYKEY(PKEY_Message_AttachmentNames, 0xE3E0584C, 0xB788, 0x4A5A, 0xBB, 0x20, 0x7F, 0x5A, 0x44, 0xC9, 0xAC, 0xDD, 21);
+
+// Name: System.Message.BccAddress -- PKEY_Message_BccAddress
+// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR)
+// FormatID: E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD, 2
+//
+// Addresses in Bcc: field
+DEFINE_PROPERTYKEY(PKEY_Message_BccAddress, 0xE3E0584C, 0xB788, 0x4A5A, 0xBB, 0x20, 0x7F, 0x5A, 0x44, 0xC9, 0xAC, 0xDD, 2);
+
+// Name: System.Message.BccName -- PKEY_Message_BccName
+// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR)
+// FormatID: E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD, 3
+//
+// person names in Bcc: field
+DEFINE_PROPERTYKEY(PKEY_Message_BccName, 0xE3E0584C, 0xB788, 0x4A5A, 0xBB, 0x20, 0x7F, 0x5A, 0x44, 0xC9, 0xAC, 0xDD, 3);
+
+// Name: System.Message.CcAddress -- PKEY_Message_CcAddress
+// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR)
+// FormatID: E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD, 4
+//
+// Addresses in Cc: field
+DEFINE_PROPERTYKEY(PKEY_Message_CcAddress, 0xE3E0584C, 0xB788, 0x4A5A, 0xBB, 0x20, 0x7F, 0x5A, 0x44, 0xC9, 0xAC, 0xDD, 4);
+
+// Name: System.Message.CcName -- PKEY_Message_CcName
+// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR)
+// FormatID: E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD, 5
+//
+// person names in Cc: field
+DEFINE_PROPERTYKEY(PKEY_Message_CcName, 0xE3E0584C, 0xB788, 0x4A5A, 0xBB, 0x20, 0x7F, 0x5A, 0x44, 0xC9, 0xAC, 0xDD, 5);
+
+// Name: System.Message.ConversationID -- PKEY_Message_ConversationID
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: DC8F80BD-AF1E-4289-85B6-3DFC1B493992, 100
+DEFINE_PROPERTYKEY(PKEY_Message_ConversationID, 0xDC8F80BD, 0xAF1E, 0x4289, 0x85, 0xB6, 0x3D, 0xFC, 0x1B, 0x49, 0x39, 0x92, 100);
+
+// Name: System.Message.ConversationIndex -- PKEY_Message_ConversationIndex
+// Type: Buffer -- VT_VECTOR | VT_UI1 (For variants: VT_ARRAY | VT_UI1)
+// FormatID: DC8F80BD-AF1E-4289-85B6-3DFC1B493992, 101
+//
+//
+DEFINE_PROPERTYKEY(PKEY_Message_ConversationIndex, 0xDC8F80BD, 0xAF1E, 0x4289, 0x85, 0xB6, 0x3D, 0xFC, 0x1B, 0x49, 0x39, 0x92, 101);
+
+// Name: System.Message.DateReceived -- PKEY_Message_DateReceived
+// Type: DateTime -- VT_FILETIME (For variants: VT_DATE)
+// FormatID: E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD, 20
+//
+// Date and Time communication was received
+DEFINE_PROPERTYKEY(PKEY_Message_DateReceived, 0xE3E0584C, 0xB788, 0x4A5A, 0xBB, 0x20, 0x7F, 0x5A, 0x44, 0xC9, 0xAC, 0xDD, 20);
+
+// Name: System.Message.DateSent -- PKEY_Message_DateSent
+// Type: DateTime -- VT_FILETIME (For variants: VT_DATE)
+// FormatID: E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD, 19
+//
+// Date and Time communication was sent
+DEFINE_PROPERTYKEY(PKEY_Message_DateSent, 0xE3E0584C, 0xB788, 0x4A5A, 0xBB, 0x20, 0x7F, 0x5A, 0x44, 0xC9, 0xAC, 0xDD, 19);
+
+// Name: System.Message.FromAddress -- PKEY_Message_FromAddress
+// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR)
+// FormatID: E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD, 13
+DEFINE_PROPERTYKEY(PKEY_Message_FromAddress, 0xE3E0584C, 0xB788, 0x4A5A, 0xBB, 0x20, 0x7F, 0x5A, 0x44, 0xC9, 0xAC, 0xDD, 13);
+
+// Name: System.Message.FromName -- PKEY_Message_FromName
+// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR)
+// FormatID: E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD, 14
+//
+// Address in from field as person name
+DEFINE_PROPERTYKEY(PKEY_Message_FromName, 0xE3E0584C, 0xB788, 0x4A5A, 0xBB, 0x20, 0x7F, 0x5A, 0x44, 0xC9, 0xAC, 0xDD, 14);
+
+// Name: System.Message.HasAttachments -- PKEY_Message_HasAttachments
+// Type: Boolean -- VT_BOOL
+// FormatID: 9C1FCF74-2D97-41BA-B4AE-CB2E3661A6E4, 8
+//
+//
+DEFINE_PROPERTYKEY(PKEY_Message_HasAttachments, 0x9C1FCF74, 0x2D97, 0x41BA, 0xB4, 0xAE, 0xCB, 0x2E, 0x36, 0x61, 0xA6, 0xE4, 8);
+
+// Name: System.Message.IsFwdOrReply -- PKEY_Message_IsFwdOrReply
+// Type: Int32 -- VT_I4
+// FormatID: 9A9BC088-4F6D-469E-9919-E705412040F9, 100
+DEFINE_PROPERTYKEY(PKEY_Message_IsFwdOrReply, 0x9A9BC088, 0x4F6D, 0x469E, 0x99, 0x19, 0xE7, 0x05, 0x41, 0x20, 0x40, 0xF9, 100);
+
+// Name: System.Message.MessageClass -- PKEY_Message_MessageClass
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: CD9ED458-08CE-418F-A70E-F912C7BB9C5C, 103
+//
+// What type of outlook msg this is (meeting, task, mail, etc.)
+DEFINE_PROPERTYKEY(PKEY_Message_MessageClass, 0xCD9ED458, 0x08CE, 0x418F, 0xA7, 0x0E, 0xF9, 0x12, 0xC7, 0xBB, 0x9C, 0x5C, 103);
+
+// Name: System.Message.SenderAddress -- PKEY_Message_SenderAddress
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 0BE1C8E7-1981-4676-AE14-FDD78F05A6E7, 100
+DEFINE_PROPERTYKEY(PKEY_Message_SenderAddress, 0x0BE1C8E7, 0x1981, 0x4676, 0xAE, 0x14, 0xFD, 0xD7, 0x8F, 0x05, 0xA6, 0xE7, 100);
+
+// Name: System.Message.SenderName -- PKEY_Message_SenderName
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 0DA41CFA-D224-4A18-AE2F-596158DB4B3A, 100
+DEFINE_PROPERTYKEY(PKEY_Message_SenderName, 0x0DA41CFA, 0xD224, 0x4A18, 0xAE, 0x2F, 0x59, 0x61, 0x58, 0xDB, 0x4B, 0x3A, 100);
+
+// Name: System.Message.Store -- PKEY_Message_Store
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD, 15
+//
+// The store (aka protocol handler) FILE, MAIL, OUTLOOKEXPRESS
+DEFINE_PROPERTYKEY(PKEY_Message_Store, 0xE3E0584C, 0xB788, 0x4A5A, 0xBB, 0x20, 0x7F, 0x5A, 0x44, 0xC9, 0xAC, 0xDD, 15);
+
+// Name: System.Message.ToAddress -- PKEY_Message_ToAddress
+// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR)
+// FormatID: E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD, 16
+//
+// Addresses in To: field
+DEFINE_PROPERTYKEY(PKEY_Message_ToAddress, 0xE3E0584C, 0xB788, 0x4A5A, 0xBB, 0x20, 0x7F, 0x5A, 0x44, 0xC9, 0xAC, 0xDD, 16);
+
+// Name: System.Message.ToDoTitle -- PKEY_Message_ToDoTitle
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: BCCC8A3C-8CEF-42E5-9B1C-C69079398BC7, 100
+DEFINE_PROPERTYKEY(PKEY_Message_ToDoTitle, 0xBCCC8A3C, 0x8CEF, 0x42E5, 0x9B, 0x1C, 0xC6, 0x90, 0x79, 0x39, 0x8B, 0xC7, 100);
+
+// Name: System.Message.ToName -- PKEY_Message_ToName
+// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR)
+// FormatID: E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD, 17
+//
+// Person names in To: field
+DEFINE_PROPERTYKEY(PKEY_Message_ToName, 0xE3E0584C, 0xB788, 0x4A5A, 0xBB, 0x20, 0x7F, 0x5A, 0x44, 0xC9, 0xAC, 0xDD, 17);
+
+//-----------------------------------------------------------------------------
+// Music properties
+
+// Name: System.Music.AlbumArtist -- PKEY_Music_AlbumArtist
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: (FMTID_MUSIC) 56A3372E-CE9C-11D2-9F0E-006097C686F6, 13 (PIDSI_MUSIC_ALBUM_ARTIST)
+//
+//
+DEFINE_PROPERTYKEY(PKEY_Music_AlbumArtist, 0x56A3372E, 0xCE9C, 0x11D2, 0x9F, 0x0E, 0x00, 0x60, 0x97, 0xC6, 0x86, 0xF6, 13);
+
+// Name: System.Music.AlbumTitle -- PKEY_Music_AlbumTitle
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: (FMTID_MUSIC) 56A3372E-CE9C-11D2-9F0E-006097C686F6, 4 (PIDSI_MUSIC_ALBUM)
+//
+//
+DEFINE_PROPERTYKEY(PKEY_Music_AlbumTitle, 0x56A3372E, 0xCE9C, 0x11D2, 0x9F, 0x0E, 0x00, 0x60, 0x97, 0xC6, 0x86, 0xF6, 4);
+
+// Name: System.Music.Artist -- PKEY_Music_Artist
+// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR)
+// FormatID: (FMTID_MUSIC) 56A3372E-CE9C-11D2-9F0E-006097C686F6, 2 (PIDSI_MUSIC_ARTIST)
+//
+//
+DEFINE_PROPERTYKEY(PKEY_Music_Artist, 0x56A3372E, 0xCE9C, 0x11D2, 0x9F, 0x0E, 0x00, 0x60, 0x97, 0xC6, 0x86, 0xF6, 2);
+
+// Name: System.Music.BeatsPerMinute -- PKEY_Music_BeatsPerMinute
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: (FMTID_MUSIC) 56A3372E-CE9C-11D2-9F0E-006097C686F6, 35 (PIDSI_MUSIC_BEATS_PER_MINUTE)
+//
+//
+DEFINE_PROPERTYKEY(PKEY_Music_BeatsPerMinute, 0x56A3372E, 0xCE9C, 0x11D2, 0x9F, 0x0E, 0x00, 0x60, 0x97, 0xC6, 0x86, 0xF6, 35);
+
+// Name: System.Music.Composer -- PKEY_Music_Composer
+// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR)
+// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 19 (PIDMSI_COMPOSER)
+//
+//
+DEFINE_PROPERTYKEY(PKEY_Music_Composer, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 19);
+
+// Name: System.Music.Conductor -- PKEY_Music_Conductor
+// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR)
+// FormatID: (FMTID_MUSIC) 56A3372E-CE9C-11D2-9F0E-006097C686F6, 36 (PIDSI_MUSIC_CONDUCTOR)
+//
+//
+DEFINE_PROPERTYKEY(PKEY_Music_Conductor, 0x56A3372E, 0xCE9C, 0x11D2, 0x9F, 0x0E, 0x00, 0x60, 0x97, 0xC6, 0x86, 0xF6, 36);
+
+// Name: System.Music.ContentGroupDescription -- PKEY_Music_ContentGroupDescription
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: (FMTID_MUSIC) 56A3372E-CE9C-11D2-9F0E-006097C686F6, 33 (PIDSI_MUSIC_CONTENT_GROUP_DESCRIPTION)
+//
+//
+DEFINE_PROPERTYKEY(PKEY_Music_ContentGroupDescription, 0x56A3372E, 0xCE9C, 0x11D2, 0x9F, 0x0E, 0x00, 0x60, 0x97, 0xC6, 0x86, 0xF6, 33);
+
+// Name: System.Music.Genre -- PKEY_Music_Genre
+// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR)
+// FormatID: (FMTID_MUSIC) 56A3372E-CE9C-11D2-9F0E-006097C686F6, 11 (PIDSI_MUSIC_GENRE)
+//
+//
+DEFINE_PROPERTYKEY(PKEY_Music_Genre, 0x56A3372E, 0xCE9C, 0x11D2, 0x9F, 0x0E, 0x00, 0x60, 0x97, 0xC6, 0x86, 0xF6, 11);
+
+// Name: System.Music.InitialKey -- PKEY_Music_InitialKey
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: (FMTID_MUSIC) 56A3372E-CE9C-11D2-9F0E-006097C686F6, 34 (PIDSI_MUSIC_INITIAL_KEY)
+//
+//
+DEFINE_PROPERTYKEY(PKEY_Music_InitialKey, 0x56A3372E, 0xCE9C, 0x11D2, 0x9F, 0x0E, 0x00, 0x60, 0x97, 0xC6, 0x86, 0xF6, 34);
+
+// Name: System.Music.Lyrics -- PKEY_Music_Lyrics
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: (FMTID_MUSIC) 56A3372E-CE9C-11D2-9F0E-006097C686F6, 12 (PIDSI_MUSIC_LYRICS)
+//
+//
+DEFINE_PROPERTYKEY(PKEY_Music_Lyrics, 0x56A3372E, 0xCE9C, 0x11D2, 0x9F, 0x0E, 0x00, 0x60, 0x97, 0xC6, 0x86, 0xF6, 12);
+
+// Name: System.Music.Mood -- PKEY_Music_Mood
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: (FMTID_MUSIC) 56A3372E-CE9C-11D2-9F0E-006097C686F6, 39 (PIDSI_MUSIC_MOOD)
+//
+//
+DEFINE_PROPERTYKEY(PKEY_Music_Mood, 0x56A3372E, 0xCE9C, 0x11D2, 0x9F, 0x0E, 0x00, 0x60, 0x97, 0xC6, 0x86, 0xF6, 39);
+
+// Name: System.Music.PartOfSet -- PKEY_Music_PartOfSet
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: (FMTID_MUSIC) 56A3372E-CE9C-11D2-9F0E-006097C686F6, 37 (PIDSI_MUSIC_PART_OF_SET)
+//
+//
+DEFINE_PROPERTYKEY(PKEY_Music_PartOfSet, 0x56A3372E, 0xCE9C, 0x11D2, 0x9F, 0x0E, 0x00, 0x60, 0x97, 0xC6, 0x86, 0xF6, 37);
+
+// Name: System.Music.Period -- PKEY_Music_Period
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 31 (PIDMSI_PERIOD)
+//
+//
+DEFINE_PROPERTYKEY(PKEY_Music_Period, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 31);
+
+// Name: System.Music.SynchronizedLyrics -- PKEY_Music_SynchronizedLyrics
+// Type: Blob -- VT_BLOB
+// FormatID: 6B223B6A-162E-4AA9-B39F-05D678FC6D77, 100
+DEFINE_PROPERTYKEY(PKEY_Music_SynchronizedLyrics, 0x6B223B6A, 0x162E, 0x4AA9, 0xB3, 0x9F, 0x05, 0xD6, 0x78, 0xFC, 0x6D, 0x77, 100);
+
+// Name: System.Music.TrackNumber -- PKEY_Music_TrackNumber
+// Type: UInt32 -- VT_UI4
+// FormatID: (FMTID_MUSIC) 56A3372E-CE9C-11D2-9F0E-006097C686F6, 7 (PIDSI_MUSIC_TRACK)
+//
+//
+DEFINE_PROPERTYKEY(PKEY_Music_TrackNumber, 0x56A3372E, 0xCE9C, 0x11D2, 0x9F, 0x0E, 0x00, 0x60, 0x97, 0xC6, 0x86, 0xF6, 7);
+
+
+
+//-----------------------------------------------------------------------------
+// Note properties
+
+// Name: System.Note.Color -- PKEY_Note_Color
+// Type: UInt16 -- VT_UI2
+// FormatID: 4776CAFA-BCE4-4CB1-A23E-265E76D8EB11, 100
+DEFINE_PROPERTYKEY(PKEY_Note_Color, 0x4776CAFA, 0xBCE4, 0x4CB1, 0xA2, 0x3E, 0x26, 0x5E, 0x76, 0xD8, 0xEB, 0x11, 100);
+
+// Possible discrete values for PKEY_Note_Color are:
+#define NOTE_COLOR_BLUE 0u
+#define NOTE_COLOR_GREEN 1u
+#define NOTE_COLOR_PINK 2u
+#define NOTE_COLOR_YELLOW 3u
+#define NOTE_COLOR_WHITE 4u
+#define NOTE_COLOR_LIGHTGREEN 5u
+
+// Name: System.Note.ColorText -- PKEY_Note_ColorText
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 46B4E8DE-CDB2-440D-885C-1658EB65B914, 100
+//
+// This is the user-friendly form of System.Note.Color. Not intended to be parsed
+// programmatically.
+DEFINE_PROPERTYKEY(PKEY_Note_ColorText, 0x46B4E8DE, 0xCDB2, 0x440D, 0x88, 0x5C, 0x16, 0x58, 0xEB, 0x65, 0xB9, 0x14, 100);
+
+//-----------------------------------------------------------------------------
+// Photo properties
+
+
+
+// Name: System.Photo.Aperture -- PKEY_Photo_Aperture
+// Type: Double -- VT_R8
+// FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 37378
+//
+// PropertyTagExifAperture. Calculated from PKEY_Photo_ApertureNumerator and PKEY_Photo_ApertureDenominator
+DEFINE_PROPERTYKEY(PKEY_Photo_Aperture, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 37378);
+
+// Name: System.Photo.ApertureDenominator -- PKEY_Photo_ApertureDenominator
+// Type: UInt32 -- VT_UI4
+// FormatID: E1A9A38B-6685-46BD-875E-570DC7AD7320, 100
+//
+// Denominator of PKEY_Photo_Aperture
+DEFINE_PROPERTYKEY(PKEY_Photo_ApertureDenominator, 0xE1A9A38B, 0x6685, 0x46BD, 0x87, 0x5E, 0x57, 0x0D, 0xC7, 0xAD, 0x73, 0x20, 100);
+
+// Name: System.Photo.ApertureNumerator -- PKEY_Photo_ApertureNumerator
+// Type: UInt32 -- VT_UI4
+// FormatID: 0337ECEC-39FB-4581-A0BD-4C4CC51E9914, 100
+//
+// Numerator of PKEY_Photo_Aperture
+DEFINE_PROPERTYKEY(PKEY_Photo_ApertureNumerator, 0x0337ECEC, 0x39FB, 0x4581, 0xA0, 0xBD, 0x4C, 0x4C, 0xC5, 0x1E, 0x99, 0x14, 100);
+
+// Name: System.Photo.Brightness -- PKEY_Photo_Brightness
+// Type: Double -- VT_R8
+// FormatID: 1A701BF6-478C-4361-83AB-3701BB053C58, 100 (PropertyTagExifBrightness)
+//
+// This is the brightness of the photo.
+//
+// Calculated from PKEY_Photo_BrightnessNumerator and PKEY_Photo_BrightnessDenominator.
+//
+// The units are "APEX", normally in the range of -99.99 to 99.99. If the numerator of
+// the recorded value is FFFFFFFF.H, "Unknown" should be indicated.
+DEFINE_PROPERTYKEY(PKEY_Photo_Brightness, 0x1A701BF6, 0x478C, 0x4361, 0x83, 0xAB, 0x37, 0x01, 0xBB, 0x05, 0x3C, 0x58, 100);
+
+// Name: System.Photo.BrightnessDenominator -- PKEY_Photo_BrightnessDenominator
+// Type: UInt32 -- VT_UI4
+// FormatID: 6EBE6946-2321-440A-90F0-C043EFD32476, 100
+//
+// Denominator of PKEY_Photo_Brightness
+DEFINE_PROPERTYKEY(PKEY_Photo_BrightnessDenominator, 0x6EBE6946, 0x2321, 0x440A, 0x90, 0xF0, 0xC0, 0x43, 0xEF, 0xD3, 0x24, 0x76, 100);
+
+// Name: System.Photo.BrightnessNumerator -- PKEY_Photo_BrightnessNumerator
+// Type: UInt32 -- VT_UI4
+// FormatID: 9E7D118F-B314-45A0-8CFB-D654B917C9E9, 100
+//
+// Numerator of PKEY_Photo_Brightness
+DEFINE_PROPERTYKEY(PKEY_Photo_BrightnessNumerator, 0x9E7D118F, 0xB314, 0x45A0, 0x8C, 0xFB, 0xD6, 0x54, 0xB9, 0x17, 0xC9, 0xE9, 100);
+
+// Name: System.Photo.CameraManufacturer -- PKEY_Photo_CameraManufacturer
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 271 (PropertyTagEquipMake)
+//
+//
+DEFINE_PROPERTYKEY(PKEY_Photo_CameraManufacturer, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 271);
+
+// Name: System.Photo.CameraModel -- PKEY_Photo_CameraModel
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 272 (PropertyTagEquipModel)
+//
+//
+DEFINE_PROPERTYKEY(PKEY_Photo_CameraModel, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 272);
+
+// Name: System.Photo.CameraSerialNumber -- PKEY_Photo_CameraSerialNumber
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 273
+//
+// Serial number of camera that produced this photo
+DEFINE_PROPERTYKEY(PKEY_Photo_CameraSerialNumber, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 273);
+
+// Name: System.Photo.Contrast -- PKEY_Photo_Contrast
+// Type: UInt32 -- VT_UI4
+// FormatID: 2A785BA9-8D23-4DED-82E6-60A350C86A10, 100
+//
+// This indicates the direction of contrast processing applied by the camera
+// when the image was shot.
+DEFINE_PROPERTYKEY(PKEY_Photo_Contrast, 0x2A785BA9, 0x8D23, 0x4DED, 0x82, 0xE6, 0x60, 0xA3, 0x50, 0xC8, 0x6A, 0x10, 100);
+
+// Possible discrete values for PKEY_Photo_Contrast are:
+#define PHOTO_CONTRAST_NORMAL 0ul
+#define PHOTO_CONTRAST_SOFT 1ul
+#define PHOTO_CONTRAST_HARD 2ul
+
+// Name: System.Photo.ContrastText -- PKEY_Photo_ContrastText
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 59DDE9F2-5253-40EA-9A8B-479E96C6249A, 100
+//
+// This is the user-friendly form of System.Photo.Contrast. Not intended to be parsed
+// programmatically.
+DEFINE_PROPERTYKEY(PKEY_Photo_ContrastText, 0x59DDE9F2, 0x5253, 0x40EA, 0x9A, 0x8B, 0x47, 0x9E, 0x96, 0xC6, 0x24, 0x9A, 100);
+
+// Name: System.Photo.DateTaken -- PKEY_Photo_DateTaken
+// Type: DateTime -- VT_FILETIME (For variants: VT_DATE)
+// FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 36867
+//
+// PropertyTagExifDTOrig
+DEFINE_PROPERTYKEY(PKEY_Photo_DateTaken, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 36867);
+
+// Name: System.Photo.DigitalZoom -- PKEY_Photo_DigitalZoom
+// Type: Double -- VT_R8
+// FormatID: F85BF840-A925-4BC2-B0C4-8E36B598679E, 100
+//
+// PropertyTagExifDigitalZoom. Calculated from PKEY_Photo_DigitalZoomNumerator and PKEY_Photo_DigitalZoomDenominator
+DEFINE_PROPERTYKEY(PKEY_Photo_DigitalZoom, 0xF85BF840, 0xA925, 0x4BC2, 0xB0, 0xC4, 0x8E, 0x36, 0xB5, 0x98, 0x67, 0x9E, 100);
+
+// Name: System.Photo.DigitalZoomDenominator -- PKEY_Photo_DigitalZoomDenominator
+// Type: UInt32 -- VT_UI4
+// FormatID: 745BAF0E-E5C1-4CFB-8A1B-D031A0A52393, 100
+//
+// Denominator of PKEY_Photo_DigitalZoom
+DEFINE_PROPERTYKEY(PKEY_Photo_DigitalZoomDenominator, 0x745BAF0E, 0xE5C1, 0x4CFB, 0x8A, 0x1B, 0xD0, 0x31, 0xA0, 0xA5, 0x23, 0x93, 100);
+
+// Name: System.Photo.DigitalZoomNumerator -- PKEY_Photo_DigitalZoomNumerator
+// Type: UInt32 -- VT_UI4
+// FormatID: 16CBB924-6500-473B-A5BE-F1599BCBE413, 100
+//
+// Numerator of PKEY_Photo_DigitalZoom
+DEFINE_PROPERTYKEY(PKEY_Photo_DigitalZoomNumerator, 0x16CBB924, 0x6500, 0x473B, 0xA5, 0xBE, 0xF1, 0x59, 0x9B, 0xCB, 0xE4, 0x13, 100);
+
+// Name: System.Photo.Event -- PKEY_Photo_Event
+// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR)
+// FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 18248
+//
+// The event at which the photo was taken
+DEFINE_PROPERTYKEY(PKEY_Photo_Event, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 18248);
+
+// Name: System.Photo.EXIFVersion -- PKEY_Photo_EXIFVersion
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: D35F743A-EB2E-47F2-A286-844132CB1427, 100
+//
+// The EXIF version.
+DEFINE_PROPERTYKEY(PKEY_Photo_EXIFVersion, 0xD35F743A, 0xEB2E, 0x47F2, 0xA2, 0x86, 0x84, 0x41, 0x32, 0xCB, 0x14, 0x27, 100);
+
+// Name: System.Photo.ExposureBias -- PKEY_Photo_ExposureBias
+// Type: Double -- VT_R8
+// FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 37380
+//
+// PropertyTagExifExposureBias. Calculated from PKEY_Photo_ExposureBiasNumerator and PKEY_Photo_ExposureBiasDenominator
+DEFINE_PROPERTYKEY(PKEY_Photo_ExposureBias, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 37380);
+
+// Name: System.Photo.ExposureBiasDenominator -- PKEY_Photo_ExposureBiasDenominator
+// Type: Int32 -- VT_I4
+// FormatID: AB205E50-04B7-461C-A18C-2F233836E627, 100
+//
+// Denominator of PKEY_Photo_ExposureBias
+DEFINE_PROPERTYKEY(PKEY_Photo_ExposureBiasDenominator, 0xAB205E50, 0x04B7, 0x461C, 0xA1, 0x8C, 0x2F, 0x23, 0x38, 0x36, 0xE6, 0x27, 100);
+
+// Name: System.Photo.ExposureBiasNumerator -- PKEY_Photo_ExposureBiasNumerator
+// Type: Int32 -- VT_I4
+// FormatID: 738BF284-1D87-420B-92CF-5834BF6EF9ED, 100
+//
+// Numerator of PKEY_Photo_ExposureBias
+DEFINE_PROPERTYKEY(PKEY_Photo_ExposureBiasNumerator, 0x738BF284, 0x1D87, 0x420B, 0x92, 0xCF, 0x58, 0x34, 0xBF, 0x6E, 0xF9, 0xED, 100);
+
+// Name: System.Photo.ExposureIndex -- PKEY_Photo_ExposureIndex
+// Type: Double -- VT_R8
+// FormatID: 967B5AF8-995A-46ED-9E11-35B3C5B9782D, 100
+//
+// PropertyTagExifExposureIndex. Calculated from PKEY_Photo_ExposureIndexNumerator and PKEY_Photo_ExposureIndexDenominator
+DEFINE_PROPERTYKEY(PKEY_Photo_ExposureIndex, 0x967B5AF8, 0x995A, 0x46ED, 0x9E, 0x11, 0x35, 0xB3, 0xC5, 0xB9, 0x78, 0x2D, 100);
+
+// Name: System.Photo.ExposureIndexDenominator -- PKEY_Photo_ExposureIndexDenominator
+// Type: UInt32 -- VT_UI4
+// FormatID: 93112F89-C28B-492F-8A9D-4BE2062CEE8A, 100
+//
+// Denominator of PKEY_Photo_ExposureIndex
+DEFINE_PROPERTYKEY(PKEY_Photo_ExposureIndexDenominator, 0x93112F89, 0xC28B, 0x492F, 0x8A, 0x9D, 0x4B, 0xE2, 0x06, 0x2C, 0xEE, 0x8A, 100);
+
+// Name: System.Photo.ExposureIndexNumerator -- PKEY_Photo_ExposureIndexNumerator
+// Type: UInt32 -- VT_UI4
+// FormatID: CDEDCF30-8919-44DF-8F4C-4EB2FFDB8D89, 100
+//
+// Numerator of PKEY_Photo_ExposureIndex
+DEFINE_PROPERTYKEY(PKEY_Photo_ExposureIndexNumerator, 0xCDEDCF30, 0x8919, 0x44DF, 0x8F, 0x4C, 0x4E, 0xB2, 0xFF, 0xDB, 0x8D, 0x89, 100);
+
+// Name: System.Photo.ExposureProgram -- PKEY_Photo_ExposureProgram
+// Type: UInt32 -- VT_UI4
+// FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 34850 (PropertyTagExifExposureProg)
+//
+//
+DEFINE_PROPERTYKEY(PKEY_Photo_ExposureProgram, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 34850);
+
+// Possible discrete values for PKEY_Photo_ExposureProgram are:
+#define PHOTO_EXPOSUREPROGRAM_UNKNOWN 0ul
+#define PHOTO_EXPOSUREPROGRAM_MANUAL 1ul
+#define PHOTO_EXPOSUREPROGRAM_NORMAL 2ul
+#define PHOTO_EXPOSUREPROGRAM_APERTURE 3ul
+#define PHOTO_EXPOSUREPROGRAM_SHUTTER 4ul
+#define PHOTO_EXPOSUREPROGRAM_CREATIVE 5ul
+#define PHOTO_EXPOSUREPROGRAM_ACTION 6ul
+#define PHOTO_EXPOSUREPROGRAM_PORTRAIT 7ul
+#define PHOTO_EXPOSUREPROGRAM_LANDSCAPE 8ul
+
+// Name: System.Photo.ExposureProgramText -- PKEY_Photo_ExposureProgramText
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: FEC690B7-5F30-4646-AE47-4CAAFBA884A3, 100
+//
+// This is the user-friendly form of System.Photo.ExposureProgram. Not intended to be parsed
+// programmatically.
+DEFINE_PROPERTYKEY(PKEY_Photo_ExposureProgramText, 0xFEC690B7, 0x5F30, 0x4646, 0xAE, 0x47, 0x4C, 0xAA, 0xFB, 0xA8, 0x84, 0xA3, 100);
+
+// Name: System.Photo.ExposureTime -- PKEY_Photo_ExposureTime
+// Type: Double -- VT_R8
+// FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 33434
+//
+// PropertyTagExifExposureTime. Calculated from PKEY_Photo_ExposureTimeNumerator and PKEY_Photo_ExposureTimeDenominator
+DEFINE_PROPERTYKEY(PKEY_Photo_ExposureTime, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 33434);
+
+// Name: System.Photo.ExposureTimeDenominator -- PKEY_Photo_ExposureTimeDenominator
+// Type: UInt32 -- VT_UI4
+// FormatID: 55E98597-AD16-42E0-B624-21599A199838, 100
+//
+// Denominator of PKEY_Photo_ExposureTime
+DEFINE_PROPERTYKEY(PKEY_Photo_ExposureTimeDenominator, 0x55E98597, 0xAD16, 0x42E0, 0xB6, 0x24, 0x21, 0x59, 0x9A, 0x19, 0x98, 0x38, 100);
+
+// Name: System.Photo.ExposureTimeNumerator -- PKEY_Photo_ExposureTimeNumerator
+// Type: UInt32 -- VT_UI4
+// FormatID: 257E44E2-9031-4323-AC38-85C552871B2E, 100
+//
+// Numerator of PKEY_Photo_ExposureTime
+DEFINE_PROPERTYKEY(PKEY_Photo_ExposureTimeNumerator, 0x257E44E2, 0x9031, 0x4323, 0xAC, 0x38, 0x85, 0xC5, 0x52, 0x87, 0x1B, 0x2E, 100);
+
+// Name: System.Photo.Flash -- PKEY_Photo_Flash
+// Type: Byte -- VT_UI1
+// FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 37385
+//
+// PropertyTagExifFlash
+DEFINE_PROPERTYKEY(PKEY_Photo_Flash, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 37385);
+
+// Possible discrete values for PKEY_Photo_Flash are:
+#define PHOTO_FLASH_NONE 0
+#define PHOTO_FLASH_FLASH 1
+#define PHOTO_FLASH_WITHOUTSTROBE 5
+#define PHOTO_FLASH_WITHSTROBE 7
+
+// Name: System.Photo.FlashEnergy -- PKEY_Photo_FlashEnergy
+// Type: Double -- VT_R8
+// FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 41483
+//
+// PropertyTagExifFlashEnergy. Calculated from PKEY_Photo_FlashEnergyNumerator and PKEY_Photo_FlashEnergyDenominator
+DEFINE_PROPERTYKEY(PKEY_Photo_FlashEnergy, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 41483);
+
+// Name: System.Photo.FlashEnergyDenominator -- PKEY_Photo_FlashEnergyDenominator
+// Type: UInt32 -- VT_UI4
+// FormatID: D7B61C70-6323-49CD-A5FC-C84277162C97, 100
+//
+// Denominator of PKEY_Photo_FlashEnergy
+DEFINE_PROPERTYKEY(PKEY_Photo_FlashEnergyDenominator, 0xD7B61C70, 0x6323, 0x49CD, 0xA5, 0xFC, 0xC8, 0x42, 0x77, 0x16, 0x2C, 0x97, 100);
+
+// Name: System.Photo.FlashEnergyNumerator -- PKEY_Photo_FlashEnergyNumerator
+// Type: UInt32 -- VT_UI4
+// FormatID: FCAD3D3D-0858-400F-AAA3-2F66CCE2A6BC, 100
+//
+// Numerator of PKEY_Photo_FlashEnergy
+DEFINE_PROPERTYKEY(PKEY_Photo_FlashEnergyNumerator, 0xFCAD3D3D, 0x0858, 0x400F, 0xAA, 0xA3, 0x2F, 0x66, 0xCC, 0xE2, 0xA6, 0xBC, 100);
+
+// Name: System.Photo.FlashManufacturer -- PKEY_Photo_FlashManufacturer
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: AABAF6C9-E0C5-4719-8585-57B103E584FE, 100
+DEFINE_PROPERTYKEY(PKEY_Photo_FlashManufacturer, 0xAABAF6C9, 0xE0C5, 0x4719, 0x85, 0x85, 0x57, 0xB1, 0x03, 0xE5, 0x84, 0xFE, 100);
+
+// Name: System.Photo.FlashModel -- PKEY_Photo_FlashModel
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: FE83BB35-4D1A-42E2-916B-06F3E1AF719E, 100
+DEFINE_PROPERTYKEY(PKEY_Photo_FlashModel, 0xFE83BB35, 0x4D1A, 0x42E2, 0x91, 0x6B, 0x06, 0xF3, 0xE1, 0xAF, 0x71, 0x9E, 100);
+
+// Name: System.Photo.FlashText -- PKEY_Photo_FlashText
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 6B8B68F6-200B-47EA-8D25-D8050F57339F, 100
+//
+// This is the user-friendly form of System.Photo.Flash. Not intended to be parsed
+// programmatically.
+DEFINE_PROPERTYKEY(PKEY_Photo_FlashText, 0x6B8B68F6, 0x200B, 0x47EA, 0x8D, 0x25, 0xD8, 0x05, 0x0F, 0x57, 0x33, 0x9F, 100);
+
+// Name: System.Photo.FNumber -- PKEY_Photo_FNumber
+// Type: Double -- VT_R8
+// FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 33437
+//
+// PropertyTagExifFNumber. Calculated from PKEY_Photo_FNumberNumerator and PKEY_Photo_FNumberDenominator
+DEFINE_PROPERTYKEY(PKEY_Photo_FNumber, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 33437);
+
+// Name: System.Photo.FNumberDenominator -- PKEY_Photo_FNumberDenominator
+// Type: UInt32 -- VT_UI4
+// FormatID: E92A2496-223B-4463-A4E3-30EABBA79D80, 100
+//
+// Denominator of PKEY_Photo_FNumber
+DEFINE_PROPERTYKEY(PKEY_Photo_FNumberDenominator, 0xE92A2496, 0x223B, 0x4463, 0xA4, 0xE3, 0x30, 0xEA, 0xBB, 0xA7, 0x9D, 0x80, 100);
+
+// Name: System.Photo.FNumberNumerator -- PKEY_Photo_FNumberNumerator
+// Type: UInt32 -- VT_UI4
+// FormatID: 1B97738A-FDFC-462F-9D93-1957E08BE90C, 100
+//
+// Numerator of PKEY_Photo_FNumber
+DEFINE_PROPERTYKEY(PKEY_Photo_FNumberNumerator, 0x1B97738A, 0xFDFC, 0x462F, 0x9D, 0x93, 0x19, 0x57, 0xE0, 0x8B, 0xE9, 0x0C, 100);
+
+// Name: System.Photo.FocalLength -- PKEY_Photo_FocalLength
+// Type: Double -- VT_R8
+// FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 37386
+//
+// PropertyTagExifFocalLength. Calculated from PKEY_Photo_FocalLengthNumerator and PKEY_Photo_FocalLengthDenominator
+DEFINE_PROPERTYKEY(PKEY_Photo_FocalLength, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 37386);
+
+// Name: System.Photo.FocalLengthDenominator -- PKEY_Photo_FocalLengthDenominator
+// Type: UInt32 -- VT_UI4
+// FormatID: 305BC615-DCA1-44A5-9FD4-10C0BA79412E, 100
+//
+// Denominator of PKEY_Photo_FocalLength
+DEFINE_PROPERTYKEY(PKEY_Photo_FocalLengthDenominator, 0x305BC615, 0xDCA1, 0x44A5, 0x9F, 0xD4, 0x10, 0xC0, 0xBA, 0x79, 0x41, 0x2E, 100);
+
+// Name: System.Photo.FocalLengthInFilm -- PKEY_Photo_FocalLengthInFilm
+// Type: UInt16 -- VT_UI2
+// FormatID: A0E74609-B84D-4F49-B860-462BD9971F98, 100
+DEFINE_PROPERTYKEY(PKEY_Photo_FocalLengthInFilm, 0xA0E74609, 0xB84D, 0x4F49, 0xB8, 0x60, 0x46, 0x2B, 0xD9, 0x97, 0x1F, 0x98, 100);
+
+// Name: System.Photo.FocalLengthNumerator -- PKEY_Photo_FocalLengthNumerator
+// Type: UInt32 -- VT_UI4
+// FormatID: 776B6B3B-1E3D-4B0C-9A0E-8FBAF2A8492A, 100
+//
+// Numerator of PKEY_Photo_FocalLength
+DEFINE_PROPERTYKEY(PKEY_Photo_FocalLengthNumerator, 0x776B6B3B, 0x1E3D, 0x4B0C, 0x9A, 0x0E, 0x8F, 0xBA, 0xF2, 0xA8, 0x49, 0x2A, 100);
+
+// Name: System.Photo.FocalPlaneXResolution -- PKEY_Photo_FocalPlaneXResolution
+// Type: Double -- VT_R8
+// FormatID: CFC08D97-C6F7-4484-89DD-EBEF4356FE76, 100
+//
+// PropertyTagExifFocalXRes. Calculated from PKEY_Photo_FocalPlaneXResolutionNumerator and
+// PKEY_Photo_FocalPlaneXResolutionDenominator.
+DEFINE_PROPERTYKEY(PKEY_Photo_FocalPlaneXResolution, 0xCFC08D97, 0xC6F7, 0x4484, 0x89, 0xDD, 0xEB, 0xEF, 0x43, 0x56, 0xFE, 0x76, 100);
+
+// Name: System.Photo.FocalPlaneXResolutionDenominator -- PKEY_Photo_FocalPlaneXResolutionDenominator
+// Type: UInt32 -- VT_UI4
+// FormatID: 0933F3F5-4786-4F46-A8E8-D64DD37FA521, 100
+//
+// Denominator of PKEY_Photo_FocalPlaneXResolution
+DEFINE_PROPERTYKEY(PKEY_Photo_FocalPlaneXResolutionDenominator, 0x0933F3F5, 0x4786, 0x4F46, 0xA8, 0xE8, 0xD6, 0x4D, 0xD3, 0x7F, 0xA5, 0x21, 100);
+
+// Name: System.Photo.FocalPlaneXResolutionNumerator -- PKEY_Photo_FocalPlaneXResolutionNumerator
+// Type: UInt32 -- VT_UI4
+// FormatID: DCCB10AF-B4E2-4B88-95F9-031B4D5AB490, 100
+//
+// Numerator of PKEY_Photo_FocalPlaneXResolution
+DEFINE_PROPERTYKEY(PKEY_Photo_FocalPlaneXResolutionNumerator, 0xDCCB10AF, 0xB4E2, 0x4B88, 0x95, 0xF9, 0x03, 0x1B, 0x4D, 0x5A, 0xB4, 0x90, 100);
+
+// Name: System.Photo.FocalPlaneYResolution -- PKEY_Photo_FocalPlaneYResolution
+// Type: Double -- VT_R8
+// FormatID: 4FFFE4D0-914F-4AC4-8D6F-C9C61DE169B1, 100
+//
+// PropertyTagExifFocalYRes. Calculated from PKEY_Photo_FocalPlaneYResolutionNumerator and
+// PKEY_Photo_FocalPlaneYResolutionDenominator.
+DEFINE_PROPERTYKEY(PKEY_Photo_FocalPlaneYResolution, 0x4FFFE4D0, 0x914F, 0x4AC4, 0x8D, 0x6F, 0xC9, 0xC6, 0x1D, 0xE1, 0x69, 0xB1, 100);
+
+// Name: System.Photo.FocalPlaneYResolutionDenominator -- PKEY_Photo_FocalPlaneYResolutionDenominator
+// Type: UInt32 -- VT_UI4
+// FormatID: 1D6179A6-A876-4031-B013-3347B2B64DC8, 100
+//
+// Denominator of PKEY_Photo_FocalPlaneYResolution
+DEFINE_PROPERTYKEY(PKEY_Photo_FocalPlaneYResolutionDenominator, 0x1D6179A6, 0xA876, 0x4031, 0xB0, 0x13, 0x33, 0x47, 0xB2, 0xB6, 0x4D, 0xC8, 100);
+
+// Name: System.Photo.FocalPlaneYResolutionNumerator -- PKEY_Photo_FocalPlaneYResolutionNumerator
+// Type: UInt32 -- VT_UI4
+// FormatID: A2E541C5-4440-4BA8-867E-75CFC06828CD, 100
+//
+// Numerator of PKEY_Photo_FocalPlaneYResolution
+DEFINE_PROPERTYKEY(PKEY_Photo_FocalPlaneYResolutionNumerator, 0xA2E541C5, 0x4440, 0x4BA8, 0x86, 0x7E, 0x75, 0xCF, 0xC0, 0x68, 0x28, 0xCD, 100);
+
+// Name: System.Photo.GainControl -- PKEY_Photo_GainControl
+// Type: Double -- VT_R8
+// FormatID: FA304789-00C7-4D80-904A-1E4DCC7265AA, 100 (PropertyTagExifGainControl)
+//
+// This indicates the degree of overall image gain adjustment.
+//
+// Calculated from PKEY_Photo_GainControlNumerator and PKEY_Photo_GainControlDenominator.
+DEFINE_PROPERTYKEY(PKEY_Photo_GainControl, 0xFA304789, 0x00C7, 0x4D80, 0x90, 0x4A, 0x1E, 0x4D, 0xCC, 0x72, 0x65, 0xAA, 100);
+
+// Possible discrete values for PKEY_Photo_GainControl are:
+#define PHOTO_GAINCONTROL_NONE 0.0
+#define PHOTO_GAINCONTROL_LOWGAINUP 1.0
+#define PHOTO_GAINCONTROL_HIGHGAINUP 2.0
+#define PHOTO_GAINCONTROL_LOWGAINDOWN 3.0
+#define PHOTO_GAINCONTROL_HIGHGAINDOWN 4.0
+
+// Name: System.Photo.GainControlDenominator -- PKEY_Photo_GainControlDenominator
+// Type: UInt32 -- VT_UI4
+// FormatID: 42864DFD-9DA4-4F77-BDED-4AAD7B256735, 100
+//
+// Denominator of PKEY_Photo_GainControl
+DEFINE_PROPERTYKEY(PKEY_Photo_GainControlDenominator, 0x42864DFD, 0x9DA4, 0x4F77, 0xBD, 0xED, 0x4A, 0xAD, 0x7B, 0x25, 0x67, 0x35, 100);
+
+// Name: System.Photo.GainControlNumerator -- PKEY_Photo_GainControlNumerator
+// Type: UInt32 -- VT_UI4
+// FormatID: 8E8ECF7C-B7B8-4EB8-A63F-0EE715C96F9E, 100
+//
+// Numerator of PKEY_Photo_GainControl
+DEFINE_PROPERTYKEY(PKEY_Photo_GainControlNumerator, 0x8E8ECF7C, 0xB7B8, 0x4EB8, 0xA6, 0x3F, 0x0E, 0xE7, 0x15, 0xC9, 0x6F, 0x9E, 100);
+
+// Name: System.Photo.GainControlText -- PKEY_Photo_GainControlText
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: C06238B2-0BF9-4279-A723-25856715CB9D, 100
+//
+// This is the user-friendly form of System.Photo.GainControl. Not intended to be parsed
+// programmatically.
+DEFINE_PROPERTYKEY(PKEY_Photo_GainControlText, 0xC06238B2, 0x0BF9, 0x4279, 0xA7, 0x23, 0x25, 0x85, 0x67, 0x15, 0xCB, 0x9D, 100);
+
+// Name: System.Photo.ISOSpeed -- PKEY_Photo_ISOSpeed
+// Type: UInt16 -- VT_UI2
+// FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 34855
+//
+// PropertyTagExifISOSpeed
+DEFINE_PROPERTYKEY(PKEY_Photo_ISOSpeed, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 34855);
+
+// Name: System.Photo.LensManufacturer -- PKEY_Photo_LensManufacturer
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: E6DDCAF7-29C5-4F0A-9A68-D19412EC7090, 100
+DEFINE_PROPERTYKEY(PKEY_Photo_LensManufacturer, 0xE6DDCAF7, 0x29C5, 0x4F0A, 0x9A, 0x68, 0xD1, 0x94, 0x12, 0xEC, 0x70, 0x90, 100);
+
+// Name: System.Photo.LensModel -- PKEY_Photo_LensModel
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: E1277516-2B5F-4869-89B1-2E585BD38B7A, 100
+DEFINE_PROPERTYKEY(PKEY_Photo_LensModel, 0xE1277516, 0x2B5F, 0x4869, 0x89, 0xB1, 0x2E, 0x58, 0x5B, 0xD3, 0x8B, 0x7A, 100);
+
+// Name: System.Photo.LightSource -- PKEY_Photo_LightSource
+// Type: UInt32 -- VT_UI4
+// FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 37384
+//
+// PropertyTagExifLightSource
+DEFINE_PROPERTYKEY(PKEY_Photo_LightSource, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 37384);
+
+// Possible discrete values for PKEY_Photo_LightSource are:
+#define PHOTO_LIGHTSOURCE_UNKNOWN 0ul
+#define PHOTO_LIGHTSOURCE_DAYLIGHT 1ul
+#define PHOTO_LIGHTSOURCE_FLUORESCENT 2ul
+#define PHOTO_LIGHTSOURCE_TUNGSTEN 3ul
+#define PHOTO_LIGHTSOURCE_STANDARD_A 17ul
+#define PHOTO_LIGHTSOURCE_STANDARD_B 18ul
+#define PHOTO_LIGHTSOURCE_STANDARD_C 19ul
+#define PHOTO_LIGHTSOURCE_D55 20ul
+#define PHOTO_LIGHTSOURCE_D65 21ul
+#define PHOTO_LIGHTSOURCE_D75 22ul
+
+// Name: System.Photo.MakerNote -- PKEY_Photo_MakerNote
+// Type: Buffer -- VT_VECTOR | VT_UI1 (For variants: VT_ARRAY | VT_UI1)
+// FormatID: FA303353-B659-4052-85E9-BCAC79549B84, 100
+DEFINE_PROPERTYKEY(PKEY_Photo_MakerNote, 0xFA303353, 0xB659, 0x4052, 0x85, 0xE9, 0xBC, 0xAC, 0x79, 0x54, 0x9B, 0x84, 100);
+
+// Name: System.Photo.MakerNoteOffset -- PKEY_Photo_MakerNoteOffset
+// Type: UInt64 -- VT_UI8
+// FormatID: 813F4124-34E6-4D17-AB3E-6B1F3C2247A1, 100
+DEFINE_PROPERTYKEY(PKEY_Photo_MakerNoteOffset, 0x813F4124, 0x34E6, 0x4D17, 0xAB, 0x3E, 0x6B, 0x1F, 0x3C, 0x22, 0x47, 0xA1, 100);
+
+// Name: System.Photo.MaxAperture -- PKEY_Photo_MaxAperture
+// Type: Double -- VT_R8
+// FormatID: 08F6D7C2-E3F2-44FC-AF1E-5AA5C81A2D3E, 100
+//
+// Calculated from PKEY_Photo_MaxApertureNumerator and PKEY_Photo_MaxApertureDenominator
+DEFINE_PROPERTYKEY(PKEY_Photo_MaxAperture, 0x08F6D7C2, 0xE3F2, 0x44FC, 0xAF, 0x1E, 0x5A, 0xA5, 0xC8, 0x1A, 0x2D, 0x3E, 100);
+
+// Name: System.Photo.MaxApertureDenominator -- PKEY_Photo_MaxApertureDenominator
+// Type: UInt32 -- VT_UI4
+// FormatID: C77724D4-601F-46C5-9B89-C53F93BCEB77, 100
+//
+// Denominator of PKEY_Photo_MaxAperture
+DEFINE_PROPERTYKEY(PKEY_Photo_MaxApertureDenominator, 0xC77724D4, 0x601F, 0x46C5, 0x9B, 0x89, 0xC5, 0x3F, 0x93, 0xBC, 0xEB, 0x77, 100);
+
+// Name: System.Photo.MaxApertureNumerator -- PKEY_Photo_MaxApertureNumerator
+// Type: UInt32 -- VT_UI4
+// FormatID: C107E191-A459-44C5-9AE6-B952AD4B906D, 100
+//
+// Numerator of PKEY_Photo_MaxAperture
+DEFINE_PROPERTYKEY(PKEY_Photo_MaxApertureNumerator, 0xC107E191, 0xA459, 0x44C5, 0x9A, 0xE6, 0xB9, 0x52, 0xAD, 0x4B, 0x90, 0x6D, 100);
+
+// Name: System.Photo.MeteringMode -- PKEY_Photo_MeteringMode
+// Type: UInt16 -- VT_UI2
+// FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 37383
+//
+// PropertyTagExifMeteringMode
+DEFINE_PROPERTYKEY(PKEY_Photo_MeteringMode, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 37383);
+
+// Possible discrete values for PKEY_Photo_MeteringMode are:
+#define PHOTO_METERINGMODE_UNKNOWN 0u
+#define PHOTO_METERINGMODE_AVERAGE 1u
+#define PHOTO_METERINGMODE_CENTER 2u
+#define PHOTO_METERINGMODE_SPOT 3u
+#define PHOTO_METERINGMODE_MULTISPOT 4u
+#define PHOTO_METERINGMODE_PATTERN 5u
+#define PHOTO_METERINGMODE_PARTIAL 6u
+
+// Name: System.Photo.MeteringModeText -- PKEY_Photo_MeteringModeText
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: F628FD8C-7BA8-465A-A65B-C5AA79263A9E, 100
+//
+// This is the user-friendly form of System.Photo.MeteringMode. Not intended to be parsed
+// programmatically.
+DEFINE_PROPERTYKEY(PKEY_Photo_MeteringModeText, 0xF628FD8C, 0x7BA8, 0x465A, 0xA6, 0x5B, 0xC5, 0xAA, 0x79, 0x26, 0x3A, 0x9E, 100);
+
+// Name: System.Photo.Orientation -- PKEY_Photo_Orientation
+// Type: UInt16 -- VT_UI2
+// FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 274 (PropertyTagOrientation)
+//
+// This is the image orientation viewed in terms of rows and columns.
+DEFINE_PROPERTYKEY(PKEY_Photo_Orientation, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 274);
+
+// Possible discrete values for PKEY_Photo_Orientation are:
+#define PHOTO_ORIENTATION_NORMAL 1u
+#define PHOTO_ORIENTATION_FLIPHORIZONTAL 2u
+#define PHOTO_ORIENTATION_ROTATE180 3u
+#define PHOTO_ORIENTATION_FLIPVERTICAL 4u
+#define PHOTO_ORIENTATION_TRANSPOSE 5u
+#define PHOTO_ORIENTATION_ROTATE270 6u
+#define PHOTO_ORIENTATION_TRANSVERSE 7u
+#define PHOTO_ORIENTATION_ROTATE90 8u
+
+// Name: System.Photo.OrientationText -- PKEY_Photo_OrientationText
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: A9EA193C-C511-498A-A06B-58E2776DCC28, 100
+//
+// This is the user-friendly form of System.Photo.Orientation. Not intended to be parsed
+// programmatically.
+DEFINE_PROPERTYKEY(PKEY_Photo_OrientationText, 0xA9EA193C, 0xC511, 0x498A, 0xA0, 0x6B, 0x58, 0xE2, 0x77, 0x6D, 0xCC, 0x28, 100);
+
+// Name: System.Photo.PhotometricInterpretation -- PKEY_Photo_PhotometricInterpretation
+// Type: UInt16 -- VT_UI2
+// FormatID: 341796F1-1DF9-4B1C-A564-91BDEFA43877, 100
+//
+// This is the pixel composition. In JPEG compressed data, a JPEG marker is used
+// instead of this property.
+DEFINE_PROPERTYKEY(PKEY_Photo_PhotometricInterpretation, 0x341796F1, 0x1DF9, 0x4B1C, 0xA5, 0x64, 0x91, 0xBD, 0xEF, 0xA4, 0x38, 0x77, 100);
+
+// Possible discrete values for PKEY_Photo_PhotometricInterpretation are:
+#define PHOTO_PHOTOMETRIC_RGB 2u
+#define PHOTO_PHOTOMETRIC_YCBCR 6u
+
+// Name: System.Photo.PhotometricInterpretationText -- PKEY_Photo_PhotometricInterpretationText
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 821437D6-9EAB-4765-A589-3B1CBBD22A61, 100
+//
+// This is the user-friendly form of System.Photo.PhotometricInterpretation. Not intended to be parsed
+// programmatically.
+DEFINE_PROPERTYKEY(PKEY_Photo_PhotometricInterpretationText, 0x821437D6, 0x9EAB, 0x4765, 0xA5, 0x89, 0x3B, 0x1C, 0xBB, 0xD2, 0x2A, 0x61, 100);
+
+// Name: System.Photo.ProgramMode -- PKEY_Photo_ProgramMode
+// Type: UInt32 -- VT_UI4
+// FormatID: 6D217F6D-3F6A-4825-B470-5F03CA2FBE9B, 100
+//
+// This is the class of the program used by the camera to set exposure when the
+// picture is taken.
+DEFINE_PROPERTYKEY(PKEY_Photo_ProgramMode, 0x6D217F6D, 0x3F6A, 0x4825, 0xB4, 0x70, 0x5F, 0x03, 0xCA, 0x2F, 0xBE, 0x9B, 100);
+
+// Possible discrete values for PKEY_Photo_ProgramMode are:
+#define PHOTO_PROGRAMMODE_NOTDEFINED 0ul
+#define PHOTO_PROGRAMMODE_MANUAL 1ul
+#define PHOTO_PROGRAMMODE_NORMAL 2ul
+#define PHOTO_PROGRAMMODE_APERTURE 3ul
+#define PHOTO_PROGRAMMODE_SHUTTER 4ul
+#define PHOTO_PROGRAMMODE_CREATIVE 5ul
+#define PHOTO_PROGRAMMODE_ACTION 6ul
+#define PHOTO_PROGRAMMODE_PORTRAIT 7ul
+#define PHOTO_PROGRAMMODE_LANDSCAPE 8ul
+
+// Name: System.Photo.ProgramModeText -- PKEY_Photo_ProgramModeText
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 7FE3AA27-2648-42F3-89B0-454E5CB150C3, 100
+//
+// This is the user-friendly form of System.Photo.ProgramMode. Not intended to be parsed
+// programmatically.
+DEFINE_PROPERTYKEY(PKEY_Photo_ProgramModeText, 0x7FE3AA27, 0x2648, 0x42F3, 0x89, 0xB0, 0x45, 0x4E, 0x5C, 0xB1, 0x50, 0xC3, 100);
+
+// Name: System.Photo.RelatedSoundFile -- PKEY_Photo_RelatedSoundFile
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 318A6B45-087F-4DC2-B8CC-05359551FC9E, 100
+DEFINE_PROPERTYKEY(PKEY_Photo_RelatedSoundFile, 0x318A6B45, 0x087F, 0x4DC2, 0xB8, 0xCC, 0x05, 0x35, 0x95, 0x51, 0xFC, 0x9E, 100);
+
+// Name: System.Photo.Saturation -- PKEY_Photo_Saturation
+// Type: UInt32 -- VT_UI4
+// FormatID: 49237325-A95A-4F67-B211-816B2D45D2E0, 100
+//
+// This indicates the direction of saturation processing applied by the camera when
+// the image was shot.
+DEFINE_PROPERTYKEY(PKEY_Photo_Saturation, 0x49237325, 0xA95A, 0x4F67, 0xB2, 0x11, 0x81, 0x6B, 0x2D, 0x45, 0xD2, 0xE0, 100);
+
+// Possible discrete values for PKEY_Photo_Saturation are:
+#define PHOTO_SATURATION_NORMAL 0ul
+#define PHOTO_SATURATION_LOW 1ul
+#define PHOTO_SATURATION_HIGH 2ul
+
+// Name: System.Photo.SaturationText -- PKEY_Photo_SaturationText
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 61478C08-B600-4A84-BBE4-E99C45F0A072, 100
+//
+// This is the user-friendly form of System.Photo.Saturation. Not intended to be parsed
+// programmatically.
+DEFINE_PROPERTYKEY(PKEY_Photo_SaturationText, 0x61478C08, 0xB600, 0x4A84, 0xBB, 0xE4, 0xE9, 0x9C, 0x45, 0xF0, 0xA0, 0x72, 100);
+
+// Name: System.Photo.Sharpness -- PKEY_Photo_Sharpness
+// Type: UInt32 -- VT_UI4
+// FormatID: FC6976DB-8349-4970-AE97-B3C5316A08F0, 100
+//
+// This indicates the direction of sharpness processing applied by the camera when
+// the image was shot.
+DEFINE_PROPERTYKEY(PKEY_Photo_Sharpness, 0xFC6976DB, 0x8349, 0x4970, 0xAE, 0x97, 0xB3, 0xC5, 0x31, 0x6A, 0x08, 0xF0, 100);
+
+// Possible discrete values for PKEY_Photo_Sharpness are:
+#define PHOTO_SHARPNESS_NORMAL 0ul
+#define PHOTO_SHARPNESS_SOFT 1ul
+#define PHOTO_SHARPNESS_HARD 2ul
+
+// Name: System.Photo.SharpnessText -- PKEY_Photo_SharpnessText
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 51EC3F47-DD50-421D-8769-334F50424B1E, 100
+//
+// This is the user-friendly form of System.Photo.Sharpness. Not intended to be parsed
+// programmatically.
+DEFINE_PROPERTYKEY(PKEY_Photo_SharpnessText, 0x51EC3F47, 0xDD50, 0x421D, 0x87, 0x69, 0x33, 0x4F, 0x50, 0x42, 0x4B, 0x1E, 100);
+
+// Name: System.Photo.ShutterSpeed -- PKEY_Photo_ShutterSpeed
+// Type: Double -- VT_R8
+// FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 37377
+//
+// PropertyTagExifShutterSpeed. Calculated from PKEY_Photo_ShutterSpeedNumerator and PKEY_Photo_ShutterSpeedDenominator
+DEFINE_PROPERTYKEY(PKEY_Photo_ShutterSpeed, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 37377);
+
+// Name: System.Photo.ShutterSpeedDenominator -- PKEY_Photo_ShutterSpeedDenominator
+// Type: Int32 -- VT_I4
+// FormatID: E13D8975-81C7-4948-AE3F-37CAE11E8FF7, 100
+//
+// Denominator of PKEY_Photo_ShutterSpeed
+DEFINE_PROPERTYKEY(PKEY_Photo_ShutterSpeedDenominator, 0xE13D8975, 0x81C7, 0x4948, 0xAE, 0x3F, 0x37, 0xCA, 0xE1, 0x1E, 0x8F, 0xF7, 100);
+
+// Name: System.Photo.ShutterSpeedNumerator -- PKEY_Photo_ShutterSpeedNumerator
+// Type: Int32 -- VT_I4
+// FormatID: 16EA4042-D6F4-4BCA-8349-7C78D30FB333, 100
+//
+// Numerator of PKEY_Photo_ShutterSpeed
+DEFINE_PROPERTYKEY(PKEY_Photo_ShutterSpeedNumerator, 0x16EA4042, 0xD6F4, 0x4BCA, 0x83, 0x49, 0x7C, 0x78, 0xD3, 0x0F, 0xB3, 0x33, 100);
+
+// Name: System.Photo.SubjectDistance -- PKEY_Photo_SubjectDistance
+// Type: Double -- VT_R8
+// FormatID: (FMTID_ImageProperties) 14B81DA1-0135-4D31-96D9-6CBFC9671A99, 37382
+//
+// PropertyTagExifSubjectDist. Calculated from PKEY_Photo_SubjectDistanceNumerator and PKEY_Photo_SubjectDistanceDenominator
+DEFINE_PROPERTYKEY(PKEY_Photo_SubjectDistance, 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 37382);
+
+// Name: System.Photo.SubjectDistanceDenominator -- PKEY_Photo_SubjectDistanceDenominator
+// Type: UInt32 -- VT_UI4
+// FormatID: 0C840A88-B043-466D-9766-D4B26DA3FA77, 100
+//
+// Denominator of PKEY_Photo_SubjectDistance
+DEFINE_PROPERTYKEY(PKEY_Photo_SubjectDistanceDenominator, 0x0C840A88, 0xB043, 0x466D, 0x97, 0x66, 0xD4, 0xB2, 0x6D, 0xA3, 0xFA, 0x77, 100);
+
+// Name: System.Photo.SubjectDistanceNumerator -- PKEY_Photo_SubjectDistanceNumerator
+// Type: UInt32 -- VT_UI4
+// FormatID: 8AF4961C-F526-43E5-AA81-DB768219178D, 100
+//
+// Numerator of PKEY_Photo_SubjectDistance
+DEFINE_PROPERTYKEY(PKEY_Photo_SubjectDistanceNumerator, 0x8AF4961C, 0xF526, 0x43E5, 0xAA, 0x81, 0xDB, 0x76, 0x82, 0x19, 0x17, 0x8D, 100);
+
+// Name: System.Photo.TranscodedForSync -- PKEY_Photo_TranscodedForSync
+// Type: Boolean -- VT_BOOL
+// FormatID: 9A8EBB75-6458-4E82-BACB-35C0095B03BB, 100
+DEFINE_PROPERTYKEY(PKEY_Photo_TranscodedForSync, 0x9A8EBB75, 0x6458, 0x4E82, 0xBA, 0xCB, 0x35, 0xC0, 0x09, 0x5B, 0x03, 0xBB, 100);
+
+// Name: System.Photo.WhiteBalance -- PKEY_Photo_WhiteBalance
+// Type: UInt32 -- VT_UI4
+// FormatID: EE3D3D8A-5381-4CFA-B13B-AAF66B5F4EC9, 100
+//
+// This indicates the white balance mode set when the image was shot.
+DEFINE_PROPERTYKEY(PKEY_Photo_WhiteBalance, 0xEE3D3D8A, 0x5381, 0x4CFA, 0xB1, 0x3B, 0xAA, 0xF6, 0x6B, 0x5F, 0x4E, 0xC9, 100);
+
+// Possible discrete values for PKEY_Photo_WhiteBalance are:
+#define PHOTO_WHITEBALANCE_AUTO 0ul
+#define PHOTO_WHITEBALANCE_MANUAL 1ul
+
+// Name: System.Photo.WhiteBalanceText -- PKEY_Photo_WhiteBalanceText
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 6336B95E-C7A7-426D-86FD-7AE3D39C84B4, 100
+//
+// This is the user-friendly form of System.Photo.WhiteBalance. Not intended to be parsed
+// programmatically.
+DEFINE_PROPERTYKEY(PKEY_Photo_WhiteBalanceText, 0x6336B95E, 0xC7A7, 0x426D, 0x86, 0xFD, 0x7A, 0xE3, 0xD3, 0x9C, 0x84, 0xB4, 100);
+
+//-----------------------------------------------------------------------------
+// PropGroup properties
+
+// Name: System.PropGroup.Advanced -- PKEY_PropGroup_Advanced
+// Type: Null -- VT_NULL
+// FormatID: 900A403B-097B-4B95-8AE2-071FDAEEB118, 100
+DEFINE_PROPERTYKEY(PKEY_PropGroup_Advanced, 0x900A403B, 0x097B, 0x4B95, 0x8A, 0xE2, 0x07, 0x1F, 0xDA, 0xEE, 0xB1, 0x18, 100);
+
+// Name: System.PropGroup.Audio -- PKEY_PropGroup_Audio
+// Type: Null -- VT_NULL
+// FormatID: 2804D469-788F-48AA-8570-71B9C187E138, 100
+DEFINE_PROPERTYKEY(PKEY_PropGroup_Audio, 0x2804D469, 0x788F, 0x48AA, 0x85, 0x70, 0x71, 0xB9, 0xC1, 0x87, 0xE1, 0x38, 100);
+
+// Name: System.PropGroup.Calendar -- PKEY_PropGroup_Calendar
+// Type: Null -- VT_NULL
+// FormatID: 9973D2B5-BFD8-438A-BA94-5349B293181A, 100
+DEFINE_PROPERTYKEY(PKEY_PropGroup_Calendar, 0x9973D2B5, 0xBFD8, 0x438A, 0xBA, 0x94, 0x53, 0x49, 0xB2, 0x93, 0x18, 0x1A, 100);
+
+// Name: System.PropGroup.Camera -- PKEY_PropGroup_Camera
+// Type: Null -- VT_NULL
+// FormatID: DE00DE32-547E-4981-AD4B-542F2E9007D8, 100
+DEFINE_PROPERTYKEY(PKEY_PropGroup_Camera, 0xDE00DE32, 0x547E, 0x4981, 0xAD, 0x4B, 0x54, 0x2F, 0x2E, 0x90, 0x07, 0xD8, 100);
+
+// Name: System.PropGroup.Contact -- PKEY_PropGroup_Contact
+// Type: Null -- VT_NULL
+// FormatID: DF975FD3-250A-4004-858F-34E29A3E37AA, 100
+DEFINE_PROPERTYKEY(PKEY_PropGroup_Contact, 0xDF975FD3, 0x250A, 0x4004, 0x85, 0x8F, 0x34, 0xE2, 0x9A, 0x3E, 0x37, 0xAA, 100);
+
+// Name: System.PropGroup.Content -- PKEY_PropGroup_Content
+// Type: Null -- VT_NULL
+// FormatID: D0DAB0BA-368A-4050-A882-6C010FD19A4F, 100
+DEFINE_PROPERTYKEY(PKEY_PropGroup_Content, 0xD0DAB0BA, 0x368A, 0x4050, 0xA8, 0x82, 0x6C, 0x01, 0x0F, 0xD1, 0x9A, 0x4F, 100);
+
+// Name: System.PropGroup.Description -- PKEY_PropGroup_Description
+// Type: Null -- VT_NULL
+// FormatID: 8969B275-9475-4E00-A887-FF93B8B41E44, 100
+DEFINE_PROPERTYKEY(PKEY_PropGroup_Description, 0x8969B275, 0x9475, 0x4E00, 0xA8, 0x87, 0xFF, 0x93, 0xB8, 0xB4, 0x1E, 0x44, 100);
+
+// Name: System.PropGroup.FileSystem -- PKEY_PropGroup_FileSystem
+// Type: Null -- VT_NULL
+// FormatID: E3A7D2C1-80FC-4B40-8F34-30EA111BDC2E, 100
+DEFINE_PROPERTYKEY(PKEY_PropGroup_FileSystem, 0xE3A7D2C1, 0x80FC, 0x4B40, 0x8F, 0x34, 0x30, 0xEA, 0x11, 0x1B, 0xDC, 0x2E, 100);
+
+// Name: System.PropGroup.General -- PKEY_PropGroup_General
+// Type: Null -- VT_NULL
+// FormatID: CC301630-B192-4C22-B372-9F4C6D338E07, 100
+DEFINE_PROPERTYKEY(PKEY_PropGroup_General, 0xCC301630, 0xB192, 0x4C22, 0xB3, 0x72, 0x9F, 0x4C, 0x6D, 0x33, 0x8E, 0x07, 100);
+
+// Name: System.PropGroup.GPS -- PKEY_PropGroup_GPS
+// Type: Null -- VT_NULL
+// FormatID: F3713ADA-90E3-4E11-AAE5-FDC17685B9BE, 100
+DEFINE_PROPERTYKEY(PKEY_PropGroup_GPS, 0xF3713ADA, 0x90E3, 0x4E11, 0xAA, 0xE5, 0xFD, 0xC1, 0x76, 0x85, 0xB9, 0xBE, 100);
+
+// Name: System.PropGroup.Image -- PKEY_PropGroup_Image
+// Type: Null -- VT_NULL
+// FormatID: E3690A87-0FA8-4A2A-9A9F-FCE8827055AC, 100
+DEFINE_PROPERTYKEY(PKEY_PropGroup_Image, 0xE3690A87, 0x0FA8, 0x4A2A, 0x9A, 0x9F, 0xFC, 0xE8, 0x82, 0x70, 0x55, 0xAC, 100);
+
+// Name: System.PropGroup.Media -- PKEY_PropGroup_Media
+// Type: Null -- VT_NULL
+// FormatID: 61872CF7-6B5E-4B4B-AC2D-59DA84459248, 100
+DEFINE_PROPERTYKEY(PKEY_PropGroup_Media, 0x61872CF7, 0x6B5E, 0x4B4B, 0xAC, 0x2D, 0x59, 0xDA, 0x84, 0x45, 0x92, 0x48, 100);
+
+// Name: System.PropGroup.MediaAdvanced -- PKEY_PropGroup_MediaAdvanced
+// Type: Null -- VT_NULL
+// FormatID: 8859A284-DE7E-4642-99BA-D431D044B1EC, 100
+DEFINE_PROPERTYKEY(PKEY_PropGroup_MediaAdvanced, 0x8859A284, 0xDE7E, 0x4642, 0x99, 0xBA, 0xD4, 0x31, 0xD0, 0x44, 0xB1, 0xEC, 100);
+
+// Name: System.PropGroup.Message -- PKEY_PropGroup_Message
+// Type: Null -- VT_NULL
+// FormatID: 7FD7259D-16B4-4135-9F97-7C96ECD2FA9E, 100
+DEFINE_PROPERTYKEY(PKEY_PropGroup_Message, 0x7FD7259D, 0x16B4, 0x4135, 0x9F, 0x97, 0x7C, 0x96, 0xEC, 0xD2, 0xFA, 0x9E, 100);
+
+// Name: System.PropGroup.Music -- PKEY_PropGroup_Music
+// Type: Null -- VT_NULL
+// FormatID: 68DD6094-7216-40F1-A029-43FE7127043F, 100
+DEFINE_PROPERTYKEY(PKEY_PropGroup_Music, 0x68DD6094, 0x7216, 0x40F1, 0xA0, 0x29, 0x43, 0xFE, 0x71, 0x27, 0x04, 0x3F, 100);
+
+// Name: System.PropGroup.Origin -- PKEY_PropGroup_Origin
+// Type: Null -- VT_NULL
+// FormatID: 2598D2FB-5569-4367-95DF-5CD3A177E1A5, 100
+DEFINE_PROPERTYKEY(PKEY_PropGroup_Origin, 0x2598D2FB, 0x5569, 0x4367, 0x95, 0xDF, 0x5C, 0xD3, 0xA1, 0x77, 0xE1, 0xA5, 100);
+
+// Name: System.PropGroup.PhotoAdvanced -- PKEY_PropGroup_PhotoAdvanced
+// Type: Null -- VT_NULL
+// FormatID: 0CB2BF5A-9EE7-4A86-8222-F01E07FDADAF, 100
+DEFINE_PROPERTYKEY(PKEY_PropGroup_PhotoAdvanced, 0x0CB2BF5A, 0x9EE7, 0x4A86, 0x82, 0x22, 0xF0, 0x1E, 0x07, 0xFD, 0xAD, 0xAF, 100);
+
+// Name: System.PropGroup.RecordedTV -- PKEY_PropGroup_RecordedTV
+// Type: Null -- VT_NULL
+// FormatID: E7B33238-6584-4170-A5C0-AC25EFD9DA56, 100
+DEFINE_PROPERTYKEY(PKEY_PropGroup_RecordedTV, 0xE7B33238, 0x6584, 0x4170, 0xA5, 0xC0, 0xAC, 0x25, 0xEF, 0xD9, 0xDA, 0x56, 100);
+
+// Name: System.PropGroup.Video -- PKEY_PropGroup_Video
+// Type: Null -- VT_NULL
+// FormatID: BEBE0920-7671-4C54-A3EB-49FDDFC191EE, 100
+DEFINE_PROPERTYKEY(PKEY_PropGroup_Video, 0xBEBE0920, 0x7671, 0x4C54, 0xA3, 0xEB, 0x49, 0xFD, 0xDF, 0xC1, 0x91, 0xEE, 100);
+
+//-----------------------------------------------------------------------------
+// PropList properties
+
+
+
+// Name: System.PropList.ConflictPrompt -- PKEY_PropList_ConflictPrompt
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: C9944A21-A406-48FE-8225-AEC7E24C211B, 11
+//
+// The list of properties to show in the file operation conflict resolution dialog. Properties with empty
+// values will not be displayed. Register under the regvalue of "ConflictPrompt".
+DEFINE_PROPERTYKEY(PKEY_PropList_ConflictPrompt, 0xC9944A21, 0xA406, 0x48FE, 0x82, 0x25, 0xAE, 0xC7, 0xE2, 0x4C, 0x21, 0x1B, 11);
+
+// Name: System.PropList.ExtendedTileInfo -- PKEY_PropList_ExtendedTileInfo
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: C9944A21-A406-48FE-8225-AEC7E24C211B, 9
+//
+// The list of properties to show in the listview on extended tiles. Register under the regvalue of
+// "ExtendedTileInfo".
+DEFINE_PROPERTYKEY(PKEY_PropList_ExtendedTileInfo, 0xC9944A21, 0xA406, 0x48FE, 0x82, 0x25, 0xAE, 0xC7, 0xE2, 0x4C, 0x21, 0x1B, 9);
+
+// Name: System.PropList.FileOperationPrompt -- PKEY_PropList_FileOperationPrompt
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: C9944A21-A406-48FE-8225-AEC7E24C211B, 10
+//
+// The list of properties to show in the file operation confirmation dialog. Properties with empty values
+// will not be displayed. If this list is not specified, then the InfoTip property list is used instead.
+// Register under the regvalue of "FileOperationPrompt".
+DEFINE_PROPERTYKEY(PKEY_PropList_FileOperationPrompt, 0xC9944A21, 0xA406, 0x48FE, 0x82, 0x25, 0xAE, 0xC7, 0xE2, 0x4C, 0x21, 0x1B, 10);
+
+// Name: System.PropList.FullDetails -- PKEY_PropList_FullDetails
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: C9944A21-A406-48FE-8225-AEC7E24C211B, 2
+//
+// The list of all the properties to show in the details page. Property groups can be included in this list
+// in order to more easily organize the UI. Register under the regvalue of "FullDetails".
+DEFINE_PROPERTYKEY(PKEY_PropList_FullDetails, 0xC9944A21, 0xA406, 0x48FE, 0x82, 0x25, 0xAE, 0xC7, 0xE2, 0x4C, 0x21, 0x1B, 2);
+
+// Name: System.PropList.InfoTip -- PKEY_PropList_InfoTip
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: C9944A21-A406-48FE-8225-AEC7E24C211B, 4 (PID_PROPLIST_INFOTIP)
+//
+// The list of properties to show in the infotip. Properties with empty values will not be displayed. Register
+// under the regvalue of "InfoTip".
+DEFINE_PROPERTYKEY(PKEY_PropList_InfoTip, 0xC9944A21, 0xA406, 0x48FE, 0x82, 0x25, 0xAE, 0xC7, 0xE2, 0x4C, 0x21, 0x1B, 4);
+
+// Name: System.PropList.NonPersonal -- PKEY_PropList_NonPersonal
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 49D1091F-082E-493F-B23F-D2308AA9668C, 100
+//
+// The list of properties that are considered 'non-personal'. When told to remove all non-personal properties
+// from a given file, the system will leave these particular properties untouched. Register under the regvalue
+// of "NonPersonal".
+DEFINE_PROPERTYKEY(PKEY_PropList_NonPersonal, 0x49D1091F, 0x082E, 0x493F, 0xB2, 0x3F, 0xD2, 0x30, 0x8A, 0xA9, 0x66, 0x8C, 100);
+
+// Name: System.PropList.PreviewDetails -- PKEY_PropList_PreviewDetails
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: C9944A21-A406-48FE-8225-AEC7E24C211B, 8
+//
+// The list of properties to display in the preview pane. Register under the regvalue of "PreviewDetails".
+DEFINE_PROPERTYKEY(PKEY_PropList_PreviewDetails, 0xC9944A21, 0xA406, 0x48FE, 0x82, 0x25, 0xAE, 0xC7, 0xE2, 0x4C, 0x21, 0x1B, 8);
+
+// Name: System.PropList.PreviewTitle -- PKEY_PropList_PreviewTitle
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: C9944A21-A406-48FE-8225-AEC7E24C211B, 6
+//
+// The one or two properties to display in the preview pane title section. The optional second property is
+// displayed as a subtitle. Register under the regvalue of "PreviewTitle".
+DEFINE_PROPERTYKEY(PKEY_PropList_PreviewTitle, 0xC9944A21, 0xA406, 0x48FE, 0x82, 0x25, 0xAE, 0xC7, 0xE2, 0x4C, 0x21, 0x1B, 6);
+
+// Name: System.PropList.QuickTip -- PKEY_PropList_QuickTip
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: C9944A21-A406-48FE-8225-AEC7E24C211B, 5 (PID_PROPLIST_QUICKTIP)
+//
+// The list of properties to show in the infotip when the item is on a slow network. Properties with empty
+// values will not be displayed. Register under the regvalue of "QuickTip".
+DEFINE_PROPERTYKEY(PKEY_PropList_QuickTip, 0xC9944A21, 0xA406, 0x48FE, 0x82, 0x25, 0xAE, 0xC7, 0xE2, 0x4C, 0x21, 0x1B, 5);
+
+// Name: System.PropList.TileInfo -- PKEY_PropList_TileInfo
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: C9944A21-A406-48FE-8225-AEC7E24C211B, 3 (PID_PROPLIST_TILEINFO)
+//
+// The list of properties to show in the listview on tiles. Register under the regvalue of "TileInfo".
+DEFINE_PROPERTYKEY(PKEY_PropList_TileInfo, 0xC9944A21, 0xA406, 0x48FE, 0x82, 0x25, 0xAE, 0xC7, 0xE2, 0x4C, 0x21, 0x1B, 3);
+
+// Name: System.PropList.XPDetailsPanel -- PKEY_PropList_XPDetailsPanel
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: (FMTID_WebView) F2275480-F782-4291-BD94-F13693513AEC, 0 (PID_DISPLAY_PROPERTIES)
+//
+// The list of properties to display in the XP webview details panel. Obsolete.
+DEFINE_PROPERTYKEY(PKEY_PropList_XPDetailsPanel, 0xF2275480, 0xF782, 0x4291, 0xBD, 0x94, 0xF1, 0x36, 0x93, 0x51, 0x3A, 0xEC, 0);
+
+//-----------------------------------------------------------------------------
+// RecordedTV properties
+
+
+
+// Name: System.RecordedTV.ChannelNumber -- PKEY_RecordedTV_ChannelNumber
+// Type: UInt32 -- VT_UI4
+// FormatID: 6D748DE2-8D38-4CC3-AC60-F009B057C557, 7
+//
+// Example: 42
+DEFINE_PROPERTYKEY(PKEY_RecordedTV_ChannelNumber, 0x6D748DE2, 0x8D38, 0x4CC3, 0xAC, 0x60, 0xF0, 0x09, 0xB0, 0x57, 0xC5, 0x57, 7);
+
+// Name: System.RecordedTV.Credits -- PKEY_RecordedTV_Credits
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 6D748DE2-8D38-4CC3-AC60-F009B057C557, 4
+//
+// Example: "Don Messick/Frank Welker/Casey Kasem/Heather North/Nicole Jaffe;;;"
+DEFINE_PROPERTYKEY(PKEY_RecordedTV_Credits, 0x6D748DE2, 0x8D38, 0x4CC3, 0xAC, 0x60, 0xF0, 0x09, 0xB0, 0x57, 0xC5, 0x57, 4);
+
+// Name: System.RecordedTV.DateContentExpires -- PKEY_RecordedTV_DateContentExpires
+// Type: DateTime -- VT_FILETIME (For variants: VT_DATE)
+// FormatID: 6D748DE2-8D38-4CC3-AC60-F009B057C557, 15
+DEFINE_PROPERTYKEY(PKEY_RecordedTV_DateContentExpires, 0x6D748DE2, 0x8D38, 0x4CC3, 0xAC, 0x60, 0xF0, 0x09, 0xB0, 0x57, 0xC5, 0x57, 15);
+
+// Name: System.RecordedTV.EpisodeName -- PKEY_RecordedTV_EpisodeName
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 6D748DE2-8D38-4CC3-AC60-F009B057C557, 2
+//
+// Example: "Nowhere to Hyde"
+DEFINE_PROPERTYKEY(PKEY_RecordedTV_EpisodeName, 0x6D748DE2, 0x8D38, 0x4CC3, 0xAC, 0x60, 0xF0, 0x09, 0xB0, 0x57, 0xC5, 0x57, 2);
+
+// Name: System.RecordedTV.IsATSCContent -- PKEY_RecordedTV_IsATSCContent
+// Type: Boolean -- VT_BOOL
+// FormatID: 6D748DE2-8D38-4CC3-AC60-F009B057C557, 16
+DEFINE_PROPERTYKEY(PKEY_RecordedTV_IsATSCContent, 0x6D748DE2, 0x8D38, 0x4CC3, 0xAC, 0x60, 0xF0, 0x09, 0xB0, 0x57, 0xC5, 0x57, 16);
+
+// Name: System.RecordedTV.IsClosedCaptioningAvailable -- PKEY_RecordedTV_IsClosedCaptioningAvailable
+// Type: Boolean -- VT_BOOL
+// FormatID: 6D748DE2-8D38-4CC3-AC60-F009B057C557, 12
+DEFINE_PROPERTYKEY(PKEY_RecordedTV_IsClosedCaptioningAvailable, 0x6D748DE2, 0x8D38, 0x4CC3, 0xAC, 0x60, 0xF0, 0x09, 0xB0, 0x57, 0xC5, 0x57, 12);
+
+// Name: System.RecordedTV.IsDTVContent -- PKEY_RecordedTV_IsDTVContent
+// Type: Boolean -- VT_BOOL
+// FormatID: 6D748DE2-8D38-4CC3-AC60-F009B057C557, 17
+DEFINE_PROPERTYKEY(PKEY_RecordedTV_IsDTVContent, 0x6D748DE2, 0x8D38, 0x4CC3, 0xAC, 0x60, 0xF0, 0x09, 0xB0, 0x57, 0xC5, 0x57, 17);
+
+// Name: System.RecordedTV.IsHDContent -- PKEY_RecordedTV_IsHDContent
+// Type: Boolean -- VT_BOOL
+// FormatID: 6D748DE2-8D38-4CC3-AC60-F009B057C557, 18
+DEFINE_PROPERTYKEY(PKEY_RecordedTV_IsHDContent, 0x6D748DE2, 0x8D38, 0x4CC3, 0xAC, 0x60, 0xF0, 0x09, 0xB0, 0x57, 0xC5, 0x57, 18);
+
+// Name: System.RecordedTV.IsRepeatBroadcast -- PKEY_RecordedTV_IsRepeatBroadcast
+// Type: Boolean -- VT_BOOL
+// FormatID: 6D748DE2-8D38-4CC3-AC60-F009B057C557, 13
+DEFINE_PROPERTYKEY(PKEY_RecordedTV_IsRepeatBroadcast, 0x6D748DE2, 0x8D38, 0x4CC3, 0xAC, 0x60, 0xF0, 0x09, 0xB0, 0x57, 0xC5, 0x57, 13);
+
+// Name: System.RecordedTV.IsSAP -- PKEY_RecordedTV_IsSAP
+// Type: Boolean -- VT_BOOL
+// FormatID: 6D748DE2-8D38-4CC3-AC60-F009B057C557, 14
+DEFINE_PROPERTYKEY(PKEY_RecordedTV_IsSAP, 0x6D748DE2, 0x8D38, 0x4CC3, 0xAC, 0x60, 0xF0, 0x09, 0xB0, 0x57, 0xC5, 0x57, 14);
+
+// Name: System.RecordedTV.NetworkAffiliation -- PKEY_RecordedTV_NetworkAffiliation
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 2C53C813-FB63-4E22-A1AB-0B331CA1E273, 100
+DEFINE_PROPERTYKEY(PKEY_RecordedTV_NetworkAffiliation, 0x2C53C813, 0xFB63, 0x4E22, 0xA1, 0xAB, 0x0B, 0x33, 0x1C, 0xA1, 0xE2, 0x73, 100);
+
+// Name: System.RecordedTV.OriginalBroadcastDate -- PKEY_RecordedTV_OriginalBroadcastDate
+// Type: DateTime -- VT_FILETIME (For variants: VT_DATE)
+// FormatID: 4684FE97-8765-4842-9C13-F006447B178C, 100
+DEFINE_PROPERTYKEY(PKEY_RecordedTV_OriginalBroadcastDate, 0x4684FE97, 0x8765, 0x4842, 0x9C, 0x13, 0xF0, 0x06, 0x44, 0x7B, 0x17, 0x8C, 100);
+
+// Name: System.RecordedTV.ProgramDescription -- PKEY_RecordedTV_ProgramDescription
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 6D748DE2-8D38-4CC3-AC60-F009B057C557, 3
+DEFINE_PROPERTYKEY(PKEY_RecordedTV_ProgramDescription, 0x6D748DE2, 0x8D38, 0x4CC3, 0xAC, 0x60, 0xF0, 0x09, 0xB0, 0x57, 0xC5, 0x57, 3);
+
+// Name: System.RecordedTV.RecordingTime -- PKEY_RecordedTV_RecordingTime
+// Type: DateTime -- VT_FILETIME (For variants: VT_DATE)
+// FormatID: A5477F61-7A82-4ECA-9DDE-98B69B2479B3, 100
+DEFINE_PROPERTYKEY(PKEY_RecordedTV_RecordingTime, 0xA5477F61, 0x7A82, 0x4ECA, 0x9D, 0xDE, 0x98, 0xB6, 0x9B, 0x24, 0x79, 0xB3, 100);
+
+// Name: System.RecordedTV.StationCallSign -- PKEY_RecordedTV_StationCallSign
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 6D748DE2-8D38-4CC3-AC60-F009B057C557, 5
+//
+// Example: "TOONP"
+DEFINE_PROPERTYKEY(PKEY_RecordedTV_StationCallSign, 0x6D748DE2, 0x8D38, 0x4CC3, 0xAC, 0x60, 0xF0, 0x09, 0xB0, 0x57, 0xC5, 0x57, 5);
+
+// Name: System.RecordedTV.StationName -- PKEY_RecordedTV_StationName
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 1B5439E7-EBA1-4AF8-BDD7-7AF1D4549493, 100
+DEFINE_PROPERTYKEY(PKEY_RecordedTV_StationName, 0x1B5439E7, 0xEBA1, 0x4AF8, 0xBD, 0xD7, 0x7A, 0xF1, 0xD4, 0x54, 0x94, 0x93, 100);
+
+//-----------------------------------------------------------------------------
+// Search properties
+
+
+
+// Name: System.Search.AutoSummary -- PKEY_Search_AutoSummary
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 560C36C0-503A-11CF-BAA1-00004C752A9A, 2
+//
+// General Summary of the document.
+DEFINE_PROPERTYKEY(PKEY_Search_AutoSummary, 0x560C36C0, 0x503A, 0x11CF, 0xBA, 0xA1, 0x00, 0x00, 0x4C, 0x75, 0x2A, 0x9A, 2);
+
+// Name: System.Search.ContainerHash -- PKEY_Search_ContainerHash
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: BCEEE283-35DF-4D53-826A-F36A3EEFC6BE, 100
+//
+// Hash code used to identify attachments to be deleted based on a common container url
+DEFINE_PROPERTYKEY(PKEY_Search_ContainerHash, 0xBCEEE283, 0x35DF, 0x4D53, 0x82, 0x6A, 0xF3, 0x6A, 0x3E, 0xEF, 0xC6, 0xBE, 100);
+
+// Name: System.Search.Contents -- PKEY_Search_Contents
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: (FMTID_Storage) B725F130-47EF-101A-A5F1-02608C9EEBAC, 19 (PID_STG_CONTENTS)
+//
+// The contents of the item. This property is for query restrictions only; it cannot be retrieved in a
+// query result. The Indexing Service friendly name is 'contents'.
+DEFINE_PROPERTYKEY(PKEY_Search_Contents, 0xB725F130, 0x47EF, 0x101A, 0xA5, 0xF1, 0x02, 0x60, 0x8C, 0x9E, 0xEB, 0xAC, 19);
+
+// Name: System.Search.EntryID -- PKEY_Search_EntryID
+// Type: Int32 -- VT_I4
+// FormatID: (FMTID_Query) 49691C90-7E17-101A-A91C-08002B2ECDA9, 5 (PROPID_QUERY_WORKID)
+//
+// The entry ID for an item within a given catalog in the Windows Search Index.
+// This value may be recycled, and therefore is not considered unique over time.
+DEFINE_PROPERTYKEY(PKEY_Search_EntryID, 0x49691C90, 0x7E17, 0x101A, 0xA9, 0x1C, 0x08, 0x00, 0x2B, 0x2E, 0xCD, 0xA9, 5);
+
+// Name: System.Search.GatherTime -- PKEY_Search_GatherTime
+// Type: DateTime -- VT_FILETIME (For variants: VT_DATE)
+// FormatID: 0B63E350-9CCC-11D0-BCDB-00805FCCCE04, 8
+//
+// The Datetime that the Windows Search Gatherer process last pushed properties of this document to the Windows Search Gatherer Plugins.
+DEFINE_PROPERTYKEY(PKEY_Search_GatherTime, 0x0B63E350, 0x9CCC, 0x11D0, 0xBC, 0xDB, 0x00, 0x80, 0x5F, 0xCC, 0xCE, 0x04, 8);
+
+// Name: System.Search.IsClosedDirectory -- PKEY_Search_IsClosedDirectory
+// Type: Boolean -- VT_BOOL
+// FormatID: 0B63E343-9CCC-11D0-BCDB-00805FCCCE04, 23
+//
+// If this property is emitted with a value of TRUE, then it indicates that this URL's last modified time applies to all of it's children, and if this URL is deleted then all of it's children are deleted as well. For example, this would be emitted as TRUE when emitting the URL of an email so that all attachments are tied to the last modified time of that email.
+DEFINE_PROPERTYKEY(PKEY_Search_IsClosedDirectory, 0x0B63E343, 0x9CCC, 0x11D0, 0xBC, 0xDB, 0x00, 0x80, 0x5F, 0xCC, 0xCE, 0x04, 23);
+
+// Name: System.Search.IsFullyContained -- PKEY_Search_IsFullyContained
+// Type: Boolean -- VT_BOOL
+// FormatID: 0B63E343-9CCC-11D0-BCDB-00805FCCCE04, 24
+//
+// Any child URL of a URL which has System.Search.IsClosedDirectory=TRUE must emit System.Search.IsFullyContained=TRUE. This ensures that the URL is not deleted at the end of a crawl because it hasn't been visited (which is the normal mechanism for detecting deletes). For example an email attachment would emit this property
+DEFINE_PROPERTYKEY(PKEY_Search_IsFullyContained, 0x0B63E343, 0x9CCC, 0x11D0, 0xBC, 0xDB, 0x00, 0x80, 0x5F, 0xCC, 0xCE, 0x04, 24);
+
+// Name: System.Search.QueryFocusedSummary -- PKEY_Search_QueryFocusedSummary
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 560C36C0-503A-11CF-BAA1-00004C752A9A, 3
+//
+// Query Focused Summary of the document.
+DEFINE_PROPERTYKEY(PKEY_Search_QueryFocusedSummary, 0x560C36C0, 0x503A, 0x11CF, 0xBA, 0xA1, 0x00, 0x00, 0x4C, 0x75, 0x2A, 0x9A, 3);
+
+// Name: System.Search.Rank -- PKEY_Search_Rank
+// Type: Int32 -- VT_I4
+// FormatID: (FMTID_Query) 49691C90-7E17-101A-A91C-08002B2ECDA9, 3 (PROPID_QUERY_RANK)
+//
+// Relevance rank of row. Ranges from 0-1000. Larger numbers = better matches. Query-time only, not
+// defined in Search schema, retrievable but not searchable.
+DEFINE_PROPERTYKEY(PKEY_Search_Rank, 0x49691C90, 0x7E17, 0x101A, 0xA9, 0x1C, 0x08, 0x00, 0x2B, 0x2E, 0xCD, 0xA9, 3);
+
+// Name: System.Search.Store -- PKEY_Search_Store
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: A06992B3-8CAF-4ED7-A547-B259E32AC9FC, 100
+//
+// The identifier for the protocol handler that produced this item. (E.g. MAPI, CSC, FILE etc.)
+DEFINE_PROPERTYKEY(PKEY_Search_Store, 0xA06992B3, 0x8CAF, 0x4ED7, 0xA5, 0x47, 0xB2, 0x59, 0xE3, 0x2A, 0xC9, 0xFC, 100);
+
+// Name: System.Search.UrlToIndex -- PKEY_Search_UrlToIndex
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 0B63E343-9CCC-11D0-BCDB-00805FCCCE04, 2
+//
+// This property should be emitted by a container IFilter for each child URL within the container. The children will eventually be crawled by the indexer if they are within scope.
+DEFINE_PROPERTYKEY(PKEY_Search_UrlToIndex, 0x0B63E343, 0x9CCC, 0x11D0, 0xBC, 0xDB, 0x00, 0x80, 0x5F, 0xCC, 0xCE, 0x04, 2);
+
+// Name: System.Search.UrlToIndexWithModificationTime -- PKEY_Search_UrlToIndexWithModificationTime
+// Type: Multivalue Any -- VT_VECTOR | VT_NULL (For variants: VT_ARRAY | VT_NULL)
+// FormatID: 0B63E343-9CCC-11D0-BCDB-00805FCCCE04, 12
+//
+// This property is the same as System.Search.UrlToIndex except that it includes the time the URL was last modified. This is an optimization for the indexer as it doesn't have to call back into the protocol handler to ask for this information to determine if the content needs to be indexed again. The property is a vector with two elements, a VT_LPWSTR with the URL and a VT_FILETIME for the last modified time.
+DEFINE_PROPERTYKEY(PKEY_Search_UrlToIndexWithModificationTime, 0x0B63E343, 0x9CCC, 0x11D0, 0xBC, 0xDB, 0x00, 0x80, 0x5F, 0xCC, 0xCE, 0x04, 12);
+
+//-----------------------------------------------------------------------------
+// Shell properties
+
+
+
+// Name: System.DescriptionID -- PKEY_DescriptionID
+// Type: Buffer -- VT_VECTOR | VT_UI1 (For variants: VT_ARRAY | VT_UI1)
+// FormatID: (FMTID_ShellDetails) 28636AA6-953D-11D2-B5D6-00C04FD918D0, 2 (PID_DESCRIPTIONID)
+//
+// The contents of a SHDESCRIPTIONID structure as a buffer of bytes.
+DEFINE_PROPERTYKEY(PKEY_DescriptionID, 0x28636AA6, 0x953D, 0x11D2, 0xB5, 0xD6, 0x00, 0xC0, 0x4F, 0xD9, 0x18, 0xD0, 2);
+
+// Name: System.Link.TargetSFGAOFlagsStrings -- PKEY_Link_TargetSFGAOFlagsStrings
+// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR)
+// FormatID: D6942081-D53B-443D-AD47-5E059D9CD27A, 3
+//
+// Expresses the SFGAO flags of a link as string values and is used as a query optimization. See
+// PKEY_Shell_SFGAOFlagsStrings for possible values of this.
+DEFINE_PROPERTYKEY(PKEY_Link_TargetSFGAOFlagsStrings, 0xD6942081, 0xD53B, 0x443D, 0xAD, 0x47, 0x5E, 0x05, 0x9D, 0x9C, 0xD2, 0x7A, 3);
+
+// Name: System.Link.TargetUrl -- PKEY_Link_TargetUrl
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 5CBF2787-48CF-4208-B90E-EE5E5D420294, 2 (PKEYs relating to URLs. Used by IE History.)
+DEFINE_PROPERTYKEY(PKEY_Link_TargetUrl, 0x5CBF2787, 0x48CF, 0x4208, 0xB9, 0x0E, 0xEE, 0x5E, 0x5D, 0x42, 0x02, 0x94, 2);
+
+// Name: System.Shell.SFGAOFlagsStrings -- PKEY_Shell_SFGAOFlagsStrings
+// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR)
+// FormatID: D6942081-D53B-443D-AD47-5E059D9CD27A, 2
+//
+// Expresses the SFGAO flags as string values and is used as a query optimization.
+DEFINE_PROPERTYKEY(PKEY_Shell_SFGAOFlagsStrings, 0xD6942081, 0xD53B, 0x443D, 0xAD, 0x47, 0x5E, 0x05, 0x9D, 0x9C, 0xD2, 0x7A, 2);
+
+// Possible discrete values for PKEY_Shell_SFGAOFlagsStrings are:
+#define SFGAOSTR_FILESYS L"filesys" // SFGAO_FILESYSTEM
+#define SFGAOSTR_FILEANC L"fileanc" // SFGAO_FILESYSANCESTOR
+#define SFGAOSTR_STORAGEANC L"storageanc" // SFGAO_STORAGEANCESTOR
+#define SFGAOSTR_STREAM L"stream" // SFGAO_STREAM
+#define SFGAOSTR_LINK L"link" // SFGAO_LINK
+#define SFGAOSTR_HIDDEN L"hidden" // SFGAO_HIDDEN
+#define SFGAOSTR_FOLDER L"folder" // SFGAO_FOLDER
+#define SFGAOSTR_NONENUM L"nonenum" // SFGAO_NONENUMERATED
+#define SFGAOSTR_BROWSABLE L"browsable" // SFGAO_BROWSABLE
+
+//-----------------------------------------------------------------------------
+// Software properties
+
+
+
+// Name: System.Software.DateLastUsed -- PKEY_Software_DateLastUsed
+// Type: DateTime -- VT_FILETIME (For variants: VT_DATE)
+// FormatID: 841E4F90-FF59-4D16-8947-E81BBFFAB36D, 16
+//
+//
+DEFINE_PROPERTYKEY(PKEY_Software_DateLastUsed, 0x841E4F90, 0xFF59, 0x4D16, 0x89, 0x47, 0xE8, 0x1B, 0xBF, 0xFA, 0xB3, 0x6D, 16);
+
+// Name: System.Software.ProductName -- PKEY_Software_ProductName
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: (PSFMTID_VERSION) 0CEF7D53-FA64-11D1-A203-0000F81FEDEE, 7
+//
+//
+DEFINE_PROPERTYKEY(PKEY_Software_ProductName, 0x0CEF7D53, 0xFA64, 0x11D1, 0xA2, 0x03, 0x00, 0x00, 0xF8, 0x1F, 0xED, 0xEE, 7);
+
+//-----------------------------------------------------------------------------
+// Sync properties
+
+
+
+// Name: System.Sync.Comments -- PKEY_Sync_Comments
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 7BD5533E-AF15-44DB-B8C8-BD6624E1D032, 13
+DEFINE_PROPERTYKEY(PKEY_Sync_Comments, 0x7BD5533E, 0xAF15, 0x44DB, 0xB8, 0xC8, 0xBD, 0x66, 0x24, 0xE1, 0xD0, 0x32, 13);
+
+// Name: System.Sync.ConflictDescription -- PKEY_Sync_ConflictDescription
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: CE50C159-2FB8-41FD-BE68-D3E042E274BC, 4
+DEFINE_PROPERTYKEY(PKEY_Sync_ConflictDescription, 0xCE50C159, 0x2FB8, 0x41FD, 0xBE, 0x68, 0xD3, 0xE0, 0x42, 0xE2, 0x74, 0xBC, 4);
+
+// Name: System.Sync.ConflictFirstLocation -- PKEY_Sync_ConflictFirstLocation
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: CE50C159-2FB8-41FD-BE68-D3E042E274BC, 6
+DEFINE_PROPERTYKEY(PKEY_Sync_ConflictFirstLocation, 0xCE50C159, 0x2FB8, 0x41FD, 0xBE, 0x68, 0xD3, 0xE0, 0x42, 0xE2, 0x74, 0xBC, 6);
+
+// Name: System.Sync.ConflictSecondLocation -- PKEY_Sync_ConflictSecondLocation
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: CE50C159-2FB8-41FD-BE68-D3E042E274BC, 7
+DEFINE_PROPERTYKEY(PKEY_Sync_ConflictSecondLocation, 0xCE50C159, 0x2FB8, 0x41FD, 0xBE, 0x68, 0xD3, 0xE0, 0x42, 0xE2, 0x74, 0xBC, 7);
+
+// Name: System.Sync.HandlerCollectionID -- PKEY_Sync_HandlerCollectionID
+// Type: Guid -- VT_CLSID
+// FormatID: 7BD5533E-AF15-44DB-B8C8-BD6624E1D032, 2
+DEFINE_PROPERTYKEY(PKEY_Sync_HandlerCollectionID, 0x7BD5533E, 0xAF15, 0x44DB, 0xB8, 0xC8, 0xBD, 0x66, 0x24, 0xE1, 0xD0, 0x32, 2);
+
+// Name: System.Sync.HandlerID -- PKEY_Sync_HandlerID
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 7BD5533E-AF15-44DB-B8C8-BD6624E1D032, 3
+DEFINE_PROPERTYKEY(PKEY_Sync_HandlerID, 0x7BD5533E, 0xAF15, 0x44DB, 0xB8, 0xC8, 0xBD, 0x66, 0x24, 0xE1, 0xD0, 0x32, 3);
+
+// Name: System.Sync.HandlerName -- PKEY_Sync_HandlerName
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: CE50C159-2FB8-41FD-BE68-D3E042E274BC, 2
+DEFINE_PROPERTYKEY(PKEY_Sync_HandlerName, 0xCE50C159, 0x2FB8, 0x41FD, 0xBE, 0x68, 0xD3, 0xE0, 0x42, 0xE2, 0x74, 0xBC, 2);
+
+// Name: System.Sync.HandlerType -- PKEY_Sync_HandlerType
+// Type: UInt32 -- VT_UI4
+// FormatID: 7BD5533E-AF15-44DB-B8C8-BD6624E1D032, 8
+//
+//
+DEFINE_PROPERTYKEY(PKEY_Sync_HandlerType, 0x7BD5533E, 0xAF15, 0x44DB, 0xB8, 0xC8, 0xBD, 0x66, 0x24, 0xE1, 0xD0, 0x32, 8);
+
+// Possible discrete values for PKEY_Sync_HandlerType are:
+#define SYNC_HANDLERTYPE_OTHER 0ul
+#define SYNC_HANDLERTYPE_PROGRAMS 1ul
+#define SYNC_HANDLERTYPE_DEVICES 2ul
+#define SYNC_HANDLERTYPE_FOLDERS 3ul
+#define SYNC_HANDLERTYPE_WEBSERVICES 4ul
+#define SYNC_HANDLERTYPE_COMPUTERS 5ul
+
+// Name: System.Sync.HandlerTypeLabel -- PKEY_Sync_HandlerTypeLabel
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 7BD5533E-AF15-44DB-B8C8-BD6624E1D032, 9
+//
+//
+DEFINE_PROPERTYKEY(PKEY_Sync_HandlerTypeLabel, 0x7BD5533E, 0xAF15, 0x44DB, 0xB8, 0xC8, 0xBD, 0x66, 0x24, 0xE1, 0xD0, 0x32, 9);
+
+// Name: System.Sync.ItemID -- PKEY_Sync_ItemID
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 7BD5533E-AF15-44DB-B8C8-BD6624E1D032, 6
+DEFINE_PROPERTYKEY(PKEY_Sync_ItemID, 0x7BD5533E, 0xAF15, 0x44DB, 0xB8, 0xC8, 0xBD, 0x66, 0x24, 0xE1, 0xD0, 0x32, 6);
+
+// Name: System.Sync.ItemName -- PKEY_Sync_ItemName
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: CE50C159-2FB8-41FD-BE68-D3E042E274BC, 3
+DEFINE_PROPERTYKEY(PKEY_Sync_ItemName, 0xCE50C159, 0x2FB8, 0x41FD, 0xBE, 0x68, 0xD3, 0xE0, 0x42, 0xE2, 0x74, 0xBC, 3);
+
+//-----------------------------------------------------------------------------
+// Task properties
+
+// Name: System.Task.BillingInformation -- PKEY_Task_BillingInformation
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: D37D52C6-261C-4303-82B3-08B926AC6F12, 100
+DEFINE_PROPERTYKEY(PKEY_Task_BillingInformation, 0xD37D52C6, 0x261C, 0x4303, 0x82, 0xB3, 0x08, 0xB9, 0x26, 0xAC, 0x6F, 0x12, 100);
+
+// Name: System.Task.CompletionStatus -- PKEY_Task_CompletionStatus
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 084D8A0A-E6D5-40DE-BF1F-C8820E7C877C, 100
+DEFINE_PROPERTYKEY(PKEY_Task_CompletionStatus, 0x084D8A0A, 0xE6D5, 0x40DE, 0xBF, 0x1F, 0xC8, 0x82, 0x0E, 0x7C, 0x87, 0x7C, 100);
+
+// Name: System.Task.Owner -- PKEY_Task_Owner
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: 08C7CC5F-60F2-4494-AD75-55E3E0B5ADD0, 100
+DEFINE_PROPERTYKEY(PKEY_Task_Owner, 0x08C7CC5F, 0x60F2, 0x4494, 0xAD, 0x75, 0x55, 0xE3, 0xE0, 0xB5, 0xAD, 0xD0, 100);
+
+
+
+//-----------------------------------------------------------------------------
+// Video properties
+
+// Name: System.Video.Compression -- PKEY_Video_Compression
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: (FMTID_VideoSummaryInformation) 64440491-4C8B-11D1-8B70-080036B11A03, 10 (PIDVSI_COMPRESSION)
+//
+// Indicates the level of compression for the video stream. "Compression".
+DEFINE_PROPERTYKEY(PKEY_Video_Compression, 0x64440491, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 10);
+
+// Name: System.Video.Director -- PKEY_Video_Director
+// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR)
+// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) 64440492-4C8B-11D1-8B70-080036B11A03, 20 (PIDMSI_DIRECTOR)
+//
+//
+DEFINE_PROPERTYKEY(PKEY_Video_Director, 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 20);
+
+// Name: System.Video.EncodingBitrate -- PKEY_Video_EncodingBitrate
+// Type: UInt32 -- VT_UI4
+// FormatID: (FMTID_VideoSummaryInformation) 64440491-4C8B-11D1-8B70-080036B11A03, 8 (PIDVSI_DATA_RATE)
+//
+// Indicates the data rate in "bits per second" for the video stream. "DataRate".
+DEFINE_PROPERTYKEY(PKEY_Video_EncodingBitrate, 0x64440491, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 8);
+
+// Name: System.Video.FourCC -- PKEY_Video_FourCC
+// Type: UInt32 -- VT_UI4
+// FormatID: (FMTID_VideoSummaryInformation) 64440491-4C8B-11D1-8B70-080036B11A03, 44
+//
+// Indicates the 4CC for the video stream.
+DEFINE_PROPERTYKEY(PKEY_Video_FourCC, 0x64440491, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 44);
+
+// Name: System.Video.FrameHeight -- PKEY_Video_FrameHeight
+// Type: UInt32 -- VT_UI4
+// FormatID: (FMTID_VideoSummaryInformation) 64440491-4C8B-11D1-8B70-080036B11A03, 4
+//
+// Indicates the frame height for the video stream.
+DEFINE_PROPERTYKEY(PKEY_Video_FrameHeight, 0x64440491, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 4);
+
+// Name: System.Video.FrameRate -- PKEY_Video_FrameRate
+// Type: UInt32 -- VT_UI4
+// FormatID: (FMTID_VideoSummaryInformation) 64440491-4C8B-11D1-8B70-080036B11A03, 6 (PIDVSI_FRAME_RATE)
+//
+// Indicates the frame rate in "frames per millisecond" for the video stream. "FrameRate".
+DEFINE_PROPERTYKEY(PKEY_Video_FrameRate, 0x64440491, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 6);
+
+// Name: System.Video.FrameWidth -- PKEY_Video_FrameWidth
+// Type: UInt32 -- VT_UI4
+// FormatID: (FMTID_VideoSummaryInformation) 64440491-4C8B-11D1-8B70-080036B11A03, 3
+//
+// Indicates the frame width for the video stream.
+DEFINE_PROPERTYKEY(PKEY_Video_FrameWidth, 0x64440491, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 3);
+
+// Name: System.Video.HorizontalAspectRatio -- PKEY_Video_HorizontalAspectRatio
+// Type: UInt32 -- VT_UI4
+// FormatID: (FMTID_VideoSummaryInformation) 64440491-4C8B-11D1-8B70-080036B11A03, 42
+//
+// Indicates the horizontal portion of the aspect ratio. The X portion of XX:YY,
+// like 16:9.
+DEFINE_PROPERTYKEY(PKEY_Video_HorizontalAspectRatio, 0x64440491, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 42);
+
+// Name: System.Video.SampleSize -- PKEY_Video_SampleSize
+// Type: UInt32 -- VT_UI4
+// FormatID: (FMTID_VideoSummaryInformation) 64440491-4C8B-11D1-8B70-080036B11A03, 9 (PIDVSI_SAMPLE_SIZE)
+//
+// Indicates the sample size in bits for the video stream. "SampleSize".
+DEFINE_PROPERTYKEY(PKEY_Video_SampleSize, 0x64440491, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 9);
+
+// Name: System.Video.StreamName -- PKEY_Video_StreamName
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: (FMTID_VideoSummaryInformation) 64440491-4C8B-11D1-8B70-080036B11A03, 2 (PIDVSI_STREAM_NAME)
+//
+// Indicates the name for the video stream. "StreamName".
+DEFINE_PROPERTYKEY(PKEY_Video_StreamName, 0x64440491, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 2);
+
+// Name: System.Video.StreamNumber -- PKEY_Video_StreamNumber
+// Type: UInt16 -- VT_UI2
+// FormatID: (FMTID_VideoSummaryInformation) 64440491-4C8B-11D1-8B70-080036B11A03, 11 (PIDVSI_STREAM_NUMBER)
+//
+// "Stream Number".
+DEFINE_PROPERTYKEY(PKEY_Video_StreamNumber, 0x64440491, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 11);
+
+// Name: System.Video.TotalBitrate -- PKEY_Video_TotalBitrate
+// Type: UInt32 -- VT_UI4
+// FormatID: (FMTID_VideoSummaryInformation) 64440491-4C8B-11D1-8B70-080036B11A03, 43 (PIDVSI_TOTAL_BITRATE)
+//
+// Indicates the total data rate in "bits per second" for all video and audio streams.
+DEFINE_PROPERTYKEY(PKEY_Video_TotalBitrate, 0x64440491, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 43);
+
+// Name: System.Video.VerticalAspectRatio -- PKEY_Video_VerticalAspectRatio
+// Type: UInt32 -- VT_UI4
+// FormatID: (FMTID_VideoSummaryInformation) 64440491-4C8B-11D1-8B70-080036B11A03, 45
+//
+// Indicates the vertical portion of the aspect ratio. The Y portion of
+// XX:YY, like 16:9.
+DEFINE_PROPERTYKEY(PKEY_Video_VerticalAspectRatio, 0x64440491, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 45);
+
+
+
+//-----------------------------------------------------------------------------
+// Volume properties
+
+// Name: System.Volume.FileSystem -- PKEY_Volume_FileSystem
+// Type: String -- VT_LPWSTR (For variants: VT_BSTR)
+// FormatID: (FMTID_Volume) 9B174B35-40FF-11D2-A27E-00C04FC30871, 4 (PID_VOLUME_FILESYSTEM) (Filesystem Volume Properties)
+//
+// Indicates the filesystem of the volume.
+DEFINE_PROPERTYKEY(PKEY_Volume_FileSystem, 0x9B174B35, 0x40FF, 0x11D2, 0xA2, 0x7E, 0x00, 0xC0, 0x4F, 0xC3, 0x08, 0x71, 4);
+
+// Name: System.Volume.IsMappedDrive -- PKEY_Volume_IsMappedDrive
+// Type: Boolean -- VT_BOOL
+// FormatID: 149C0B69-2C2D-48FC-808F-D318D78C4636, 2
+DEFINE_PROPERTYKEY(PKEY_Volume_IsMappedDrive, 0x149C0B69, 0x2C2D, 0x48FC, 0x80, 0x8F, 0xD3, 0x18, 0xD7, 0x8C, 0x46, 0x36, 2);
+
+// Name: System.Volume.IsRoot -- PKEY_Volume_IsRoot
+// Type: Boolean -- VT_BOOL
+// FormatID: (FMTID_Volume) 9B174B35-40FF-11D2-A27E-00C04FC30871, 10 (Filesystem Volume Properties)
+//
+//
+DEFINE_PROPERTYKEY(PKEY_Volume_IsRoot, 0x9B174B35, 0x40FF, 0x11D2, 0xA2, 0x7E, 0x00, 0xC0, 0x4F, 0xC3, 0x08, 0x71, 10);
+
+#endif /* _INC_PROPKEY */
+
+
-#ifndef PID_FIRST_USABLE\r
-#define PID_FIRST_USABLE 2\r
-#endif\r
-\r
-#ifndef REFPROPERTYKEY\r
-#ifdef __cplusplus\r
-#define REFPROPERTYKEY const PROPERTYKEY &\r
-#else // !__cplusplus\r
-#define REFPROPERTYKEY const PROPERTYKEY * __MIDL_CONST\r
-#endif // __cplusplus\r
-#endif //REFPROPERTYKEY\r
-\r
-#ifdef DEFINE_PROPERTYKEY\r
-#undef DEFINE_PROPERTYKEY\r
-#endif\r
-\r
-#ifdef INITGUID\r
-#define DEFINE_PROPERTYKEY(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8, pid) EXTERN_C const PROPERTYKEY DECLSPEC_SELECTANY name = { { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }, pid }\r
-#else\r
-#define DEFINE_PROPERTYKEY(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8, pid) EXTERN_C const PROPERTYKEY name\r
-#endif // INITGUID\r
-\r
-#ifndef IsEqualPropertyKey\r
-#define IsEqualPropertyKey(a, b) (((a).pid == (b).pid) && IsEqualIID((a).fmtid, (b).fmtid) )\r
-#endif // IsEqualPropertyKey\r
-\r
+#ifndef PID_FIRST_USABLE
+#define PID_FIRST_USABLE 2
+#endif
+
+#ifndef REFPROPERTYKEY
+#ifdef __cplusplus
+#define REFPROPERTYKEY const PROPERTYKEY &
+#else // !__cplusplus
+#define REFPROPERTYKEY const PROPERTYKEY * __MIDL_CONST
+#endif // __cplusplus
+#endif //REFPROPERTYKEY
+
+#ifdef DEFINE_PROPERTYKEY
+#undef DEFINE_PROPERTYKEY
+#endif
+
+#ifdef INITGUID
+#define DEFINE_PROPERTYKEY(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8, pid) EXTERN_C const PROPERTYKEY DECLSPEC_SELECTANY name = { { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }, pid }
+#else
+#define DEFINE_PROPERTYKEY(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8, pid) EXTERN_C const PROPERTYKEY name
+#endif // INITGUID
+
+#ifndef IsEqualPropertyKey
+#define IsEqualPropertyKey(a, b) (((a).pid == (b).pid) && IsEqualIID((a).fmtid, (b).fmtid) )
+#endif // IsEqualPropertyKey
+
-\r
-\r
-/* this ALWAYS GENERATED file contains the definitions for the interfaces */\r
-\r
-\r
- /* File created by MIDL compiler version 7.00.0499 */\r
-/* Compiler settings for propsys.idl:\r
- Oicf, W1, Zp8, env=Win32 (32b run)\r
- protocol : dce , ms_ext, c_ext, robust\r
- error checks: allocation ref bounds_check enum stub_data \r
- VC __declspec() decoration level: \r
- __declspec(uuid()), __declspec(selectany), __declspec(novtable)\r
- DECLSPEC_UUID(), MIDL_INTERFACE()\r
-*/\r
-//@@MIDL_FILE_HEADING( )\r
-\r
-#pragma warning( disable: 4049 ) /* more than 64k source lines */\r
-\r
-\r
-/* verify that the <rpcndr.h> version is high enough to compile this file*/\r
-#ifndef __REQUIRED_RPCNDR_H_VERSION__\r
-#define __REQUIRED_RPCNDR_H_VERSION__ 475\r
-#endif\r
-\r
-/* verify that the <rpcsal.h> version is high enough to compile this file*/\r
-#ifndef __REQUIRED_RPCSAL_H_VERSION__\r
-#define __REQUIRED_RPCSAL_H_VERSION__ 100\r
-#endif\r
-\r
-#include "rpc.h"\r
-#include "rpcndr.h"\r
-\r
-#ifndef __RPCNDR_H_VERSION__\r
-#error this stub requires an updated version of <rpcndr.h>\r
-#endif // __RPCNDR_H_VERSION__\r
-\r
-#ifndef COM_NO_WINDOWS_H\r
-#include "windows.h"\r
-#include "ole2.h"\r
-#endif /*COM_NO_WINDOWS_H*/\r
-\r
-#ifndef __propsys_h__\r
-#define __propsys_h__\r
-\r
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)\r
-#pragma once\r
-#endif\r
-\r
-/* Forward Declarations */ \r
-\r
-#ifndef __IInitializeWithFile_FWD_DEFINED__\r
-#define __IInitializeWithFile_FWD_DEFINED__\r
-typedef interface IInitializeWithFile IInitializeWithFile;\r
-#endif /* __IInitializeWithFile_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __IInitializeWithStream_FWD_DEFINED__\r
-#define __IInitializeWithStream_FWD_DEFINED__\r
-typedef interface IInitializeWithStream IInitializeWithStream;\r
-#endif /* __IInitializeWithStream_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __IPropertyStore_FWD_DEFINED__\r
-#define __IPropertyStore_FWD_DEFINED__\r
-typedef interface IPropertyStore IPropertyStore;\r
-#endif /* __IPropertyStore_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __INamedPropertyStore_FWD_DEFINED__\r
-#define __INamedPropertyStore_FWD_DEFINED__\r
-typedef interface INamedPropertyStore INamedPropertyStore;\r
-#endif /* __INamedPropertyStore_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __IObjectWithPropertyKey_FWD_DEFINED__\r
-#define __IObjectWithPropertyKey_FWD_DEFINED__\r
-typedef interface IObjectWithPropertyKey IObjectWithPropertyKey;\r
-#endif /* __IObjectWithPropertyKey_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __IPropertyChange_FWD_DEFINED__\r
-#define __IPropertyChange_FWD_DEFINED__\r
-typedef interface IPropertyChange IPropertyChange;\r
-#endif /* __IPropertyChange_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __IPropertyChangeArray_FWD_DEFINED__\r
-#define __IPropertyChangeArray_FWD_DEFINED__\r
-typedef interface IPropertyChangeArray IPropertyChangeArray;\r
-#endif /* __IPropertyChangeArray_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __IPropertyStoreCapabilities_FWD_DEFINED__\r
-#define __IPropertyStoreCapabilities_FWD_DEFINED__\r
-typedef interface IPropertyStoreCapabilities IPropertyStoreCapabilities;\r
-#endif /* __IPropertyStoreCapabilities_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __IPropertyStoreCache_FWD_DEFINED__\r
-#define __IPropertyStoreCache_FWD_DEFINED__\r
-typedef interface IPropertyStoreCache IPropertyStoreCache;\r
-#endif /* __IPropertyStoreCache_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __IPropertyEnumType_FWD_DEFINED__\r
-#define __IPropertyEnumType_FWD_DEFINED__\r
-typedef interface IPropertyEnumType IPropertyEnumType;\r
-#endif /* __IPropertyEnumType_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __IPropertyEnumTypeList_FWD_DEFINED__\r
-#define __IPropertyEnumTypeList_FWD_DEFINED__\r
-typedef interface IPropertyEnumTypeList IPropertyEnumTypeList;\r
-#endif /* __IPropertyEnumTypeList_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __IPropertyDescription_FWD_DEFINED__\r
-#define __IPropertyDescription_FWD_DEFINED__\r
-typedef interface IPropertyDescription IPropertyDescription;\r
-#endif /* __IPropertyDescription_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __IPropertyDescriptionAliasInfo_FWD_DEFINED__\r
-#define __IPropertyDescriptionAliasInfo_FWD_DEFINED__\r
-typedef interface IPropertyDescriptionAliasInfo IPropertyDescriptionAliasInfo;\r
-#endif /* __IPropertyDescriptionAliasInfo_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __IPropertyDescriptionSearchInfo_FWD_DEFINED__\r
-#define __IPropertyDescriptionSearchInfo_FWD_DEFINED__\r
-typedef interface IPropertyDescriptionSearchInfo IPropertyDescriptionSearchInfo;\r
-#endif /* __IPropertyDescriptionSearchInfo_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __IPropertySystem_FWD_DEFINED__\r
-#define __IPropertySystem_FWD_DEFINED__\r
-typedef interface IPropertySystem IPropertySystem;\r
-#endif /* __IPropertySystem_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __IPropertyDescriptionList_FWD_DEFINED__\r
-#define __IPropertyDescriptionList_FWD_DEFINED__\r
-typedef interface IPropertyDescriptionList IPropertyDescriptionList;\r
-#endif /* __IPropertyDescriptionList_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __IPropertyStoreFactory_FWD_DEFINED__\r
-#define __IPropertyStoreFactory_FWD_DEFINED__\r
-typedef interface IPropertyStoreFactory IPropertyStoreFactory;\r
-#endif /* __IPropertyStoreFactory_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __IDelayedPropertyStoreFactory_FWD_DEFINED__\r
-#define __IDelayedPropertyStoreFactory_FWD_DEFINED__\r
-typedef interface IDelayedPropertyStoreFactory IDelayedPropertyStoreFactory;\r
-#endif /* __IDelayedPropertyStoreFactory_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __IPersistSerializedPropStorage_FWD_DEFINED__\r
-#define __IPersistSerializedPropStorage_FWD_DEFINED__\r
-typedef interface IPersistSerializedPropStorage IPersistSerializedPropStorage;\r
-#endif /* __IPersistSerializedPropStorage_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __IPropertySystemChangeNotify_FWD_DEFINED__\r
-#define __IPropertySystemChangeNotify_FWD_DEFINED__\r
-typedef interface IPropertySystemChangeNotify IPropertySystemChangeNotify;\r
-#endif /* __IPropertySystemChangeNotify_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __ICreateObject_FWD_DEFINED__\r
-#define __ICreateObject_FWD_DEFINED__\r
-typedef interface ICreateObject ICreateObject;\r
-#endif /* __ICreateObject_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __InMemoryPropertyStore_FWD_DEFINED__\r
-#define __InMemoryPropertyStore_FWD_DEFINED__\r
-\r
-#ifdef __cplusplus\r
-typedef class InMemoryPropertyStore InMemoryPropertyStore;\r
-#else\r
-typedef struct InMemoryPropertyStore InMemoryPropertyStore;\r
-#endif /* __cplusplus */\r
-\r
-#endif /* __InMemoryPropertyStore_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __PropertySystem_FWD_DEFINED__\r
-#define __PropertySystem_FWD_DEFINED__\r
-\r
-#ifdef __cplusplus\r
-typedef class PropertySystem PropertySystem;\r
-#else\r
-typedef struct PropertySystem PropertySystem;\r
-#endif /* __cplusplus */\r
-\r
-#endif /* __PropertySystem_FWD_DEFINED__ */\r
-\r
-\r
-/* header files for imported files */\r
-#include "objidl.h"\r
-#include "oleidl.h"\r
-#include "ocidl.h"\r
-#include "shtypes.h"\r
-#include "structuredquery.h"\r
-\r
-#ifdef __cplusplus\r
-extern "C"{\r
-#endif \r
-\r
-\r
-/* interface __MIDL_itf_propsys_0000_0000 */\r
-/* [local] */ \r
-\r
-#ifndef PSSTDAPI\r
-#if defined(_PROPSYS_)\r
-#define PSSTDAPI STDAPI\r
-#define PSSTDAPI_(type) STDAPI_(type)\r
-#else\r
-#define PSSTDAPI EXTERN_C DECLSPEC_IMPORT HRESULT STDAPICALLTYPE\r
-#define PSSTDAPI_(type) EXTERN_C DECLSPEC_IMPORT type STDAPICALLTYPE\r
-#endif\r
-#endif // PSSTDAPI\r
-#if 0\r
-typedef PROPERTYKEY *REFPROPERTYKEY;\r
-\r
-#endif // 0\r
-#include <propkeydef.h>\r
-\r
-\r
-extern RPC_IF_HANDLE __MIDL_itf_propsys_0000_0000_v0_0_c_ifspec;\r
-extern RPC_IF_HANDLE __MIDL_itf_propsys_0000_0000_v0_0_s_ifspec;\r
-\r
-#ifndef __IInitializeWithFile_INTERFACE_DEFINED__\r
-#define __IInitializeWithFile_INTERFACE_DEFINED__\r
-\r
-/* interface IInitializeWithFile */\r
-/* [unique][object][uuid] */ \r
-\r
-\r
-EXTERN_C const IID IID_IInitializeWithFile;\r
-\r
-#if defined(__cplusplus) && !defined(CINTERFACE)\r
- \r
- MIDL_INTERFACE("b7d14566-0509-4cce-a71f-0a554233bd9b")\r
- IInitializeWithFile : public IUnknown\r
- {\r
- public:\r
- virtual HRESULT STDMETHODCALLTYPE Initialize( \r
- /* [string][in] */ __RPC__in LPCWSTR pszFilePath,\r
- /* [in] */ DWORD grfMode) = 0;\r
- \r
- };\r
- \r
-#else /* C style interface */\r
-\r
- typedef struct IInitializeWithFileVtbl\r
- {\r
- BEGIN_INTERFACE\r
- \r
- HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r
- IInitializeWithFile * This,\r
- /* [in] */ __RPC__in REFIID riid,\r
- /* [iid_is][out] */ \r
- __RPC__deref_out void **ppvObject);\r
- \r
- ULONG ( STDMETHODCALLTYPE *AddRef )( \r
- IInitializeWithFile * This);\r
- \r
- ULONG ( STDMETHODCALLTYPE *Release )( \r
- IInitializeWithFile * This);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *Initialize )( \r
- IInitializeWithFile * This,\r
- /* [string][in] */ __RPC__in LPCWSTR pszFilePath,\r
- /* [in] */ DWORD grfMode);\r
- \r
- END_INTERFACE\r
- } IInitializeWithFileVtbl;\r
-\r
- interface IInitializeWithFile\r
- {\r
- CONST_VTBL struct IInitializeWithFileVtbl *lpVtbl;\r
- };\r
-\r
- \r
-\r
-#ifdef COBJMACROS\r
-\r
-\r
-#define IInitializeWithFile_QueryInterface(This,riid,ppvObject) \\r
- ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r
-\r
-#define IInitializeWithFile_AddRef(This) \\r
- ( (This)->lpVtbl -> AddRef(This) ) \r
-\r
-#define IInitializeWithFile_Release(This) \\r
- ( (This)->lpVtbl -> Release(This) ) \r
-\r
-\r
-#define IInitializeWithFile_Initialize(This,pszFilePath,grfMode) \\r
- ( (This)->lpVtbl -> Initialize(This,pszFilePath,grfMode) ) \r
-\r
-#endif /* COBJMACROS */\r
-\r
-\r
-#endif /* C style interface */\r
-\r
-\r
-\r
-\r
-#endif /* __IInitializeWithFile_INTERFACE_DEFINED__ */\r
-\r
-\r
-#ifndef __IInitializeWithStream_INTERFACE_DEFINED__\r
-#define __IInitializeWithStream_INTERFACE_DEFINED__\r
-\r
-/* interface IInitializeWithStream */\r
-/* [unique][object][uuid] */ \r
-\r
-\r
-EXTERN_C const IID IID_IInitializeWithStream;\r
-\r
-#if defined(__cplusplus) && !defined(CINTERFACE)\r
- \r
- MIDL_INTERFACE("b824b49d-22ac-4161-ac8a-9916e8fa3f7f")\r
- IInitializeWithStream : public IUnknown\r
- {\r
- public:\r
- virtual /* [local] */ HRESULT STDMETHODCALLTYPE Initialize( \r
- /* [in] */ IStream *pstream,\r
- /* [in] */ DWORD grfMode) = 0;\r
- \r
- };\r
- \r
-#else /* C style interface */\r
-\r
- typedef struct IInitializeWithStreamVtbl\r
- {\r
- BEGIN_INTERFACE\r
- \r
- HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r
- IInitializeWithStream * This,\r
- /* [in] */ __RPC__in REFIID riid,\r
- /* [iid_is][out] */ \r
- __RPC__deref_out void **ppvObject);\r
- \r
- ULONG ( STDMETHODCALLTYPE *AddRef )( \r
- IInitializeWithStream * This);\r
- \r
- ULONG ( STDMETHODCALLTYPE *Release )( \r
- IInitializeWithStream * This);\r
- \r
- /* [local] */ HRESULT ( STDMETHODCALLTYPE *Initialize )( \r
- IInitializeWithStream * This,\r
- /* [in] */ IStream *pstream,\r
- /* [in] */ DWORD grfMode);\r
- \r
- END_INTERFACE\r
- } IInitializeWithStreamVtbl;\r
-\r
- interface IInitializeWithStream\r
- {\r
- CONST_VTBL struct IInitializeWithStreamVtbl *lpVtbl;\r
- };\r
-\r
- \r
-\r
-#ifdef COBJMACROS\r
-\r
-\r
-#define IInitializeWithStream_QueryInterface(This,riid,ppvObject) \\r
- ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r
-\r
-#define IInitializeWithStream_AddRef(This) \\r
- ( (This)->lpVtbl -> AddRef(This) ) \r
-\r
-#define IInitializeWithStream_Release(This) \\r
- ( (This)->lpVtbl -> Release(This) ) \r
-\r
-\r
-#define IInitializeWithStream_Initialize(This,pstream,grfMode) \\r
- ( (This)->lpVtbl -> Initialize(This,pstream,grfMode) ) \r
-\r
-#endif /* COBJMACROS */\r
-\r
-\r
-#endif /* C style interface */\r
-\r
-\r
-\r
-/* [call_as] */ HRESULT STDMETHODCALLTYPE IInitializeWithStream_RemoteInitialize_Proxy( \r
- IInitializeWithStream * This,\r
- /* [in] */ __RPC__in_opt IStream *pstream,\r
- /* [in] */ DWORD grfMode);\r
-\r
-\r
-void __RPC_STUB IInitializeWithStream_RemoteInitialize_Stub(\r
- IRpcStubBuffer *This,\r
- IRpcChannelBuffer *_pRpcChannelBuffer,\r
- PRPC_MESSAGE _pRpcMessage,\r
- DWORD *_pdwStubPhase);\r
-\r
-\r
-\r
-#endif /* __IInitializeWithStream_INTERFACE_DEFINED__ */\r
-\r
-\r
-#ifndef __IPropertyStore_INTERFACE_DEFINED__\r
-#define __IPropertyStore_INTERFACE_DEFINED__\r
-\r
-/* interface IPropertyStore */\r
-/* [unique][object][helpstring][uuid] */ \r
-\r
-\r
-EXTERN_C const IID IID_IPropertyStore;\r
-\r
-#if defined(__cplusplus) && !defined(CINTERFACE)\r
- \r
- MIDL_INTERFACE("886d8eeb-8cf2-4446-8d02-cdba1dbdcf99")\r
- IPropertyStore : public IUnknown\r
- {\r
- public:\r
- virtual HRESULT STDMETHODCALLTYPE GetCount( \r
- /* [out] */ __RPC__out DWORD *cProps) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE GetAt( \r
- /* [in] */ DWORD iProp,\r
- /* [out] */ __RPC__out PROPERTYKEY *pkey) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE GetValue( \r
- /* [in] */ __RPC__in REFPROPERTYKEY key,\r
- /* [out] */ __RPC__out PROPVARIANT *pv) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE SetValue( \r
- /* [in] */ __RPC__in REFPROPERTYKEY key,\r
- /* [in] */ __RPC__in REFPROPVARIANT propvar) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE Commit( void) = 0;\r
- \r
- };\r
- \r
-#else /* C style interface */\r
-\r
- typedef struct IPropertyStoreVtbl\r
- {\r
- BEGIN_INTERFACE\r
- \r
- HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r
- IPropertyStore * This,\r
- /* [in] */ __RPC__in REFIID riid,\r
- /* [iid_is][out] */ \r
- __RPC__deref_out void **ppvObject);\r
- \r
- ULONG ( STDMETHODCALLTYPE *AddRef )( \r
- IPropertyStore * This);\r
- \r
- ULONG ( STDMETHODCALLTYPE *Release )( \r
- IPropertyStore * This);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetCount )( \r
- IPropertyStore * This,\r
- /* [out] */ __RPC__out DWORD *cProps);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetAt )( \r
- IPropertyStore * This,\r
- /* [in] */ DWORD iProp,\r
- /* [out] */ __RPC__out PROPERTYKEY *pkey);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetValue )( \r
- IPropertyStore * This,\r
- /* [in] */ __RPC__in REFPROPERTYKEY key,\r
- /* [out] */ __RPC__out PROPVARIANT *pv);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *SetValue )( \r
- IPropertyStore * This,\r
- /* [in] */ __RPC__in REFPROPERTYKEY key,\r
- /* [in] */ __RPC__in REFPROPVARIANT propvar);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *Commit )( \r
- IPropertyStore * This);\r
- \r
- END_INTERFACE\r
- } IPropertyStoreVtbl;\r
-\r
- interface IPropertyStore\r
- {\r
- CONST_VTBL struct IPropertyStoreVtbl *lpVtbl;\r
- };\r
-\r
- \r
-\r
-#ifdef COBJMACROS\r
-\r
-\r
-#define IPropertyStore_QueryInterface(This,riid,ppvObject) \\r
- ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r
-\r
-#define IPropertyStore_AddRef(This) \\r
- ( (This)->lpVtbl -> AddRef(This) ) \r
-\r
-#define IPropertyStore_Release(This) \\r
- ( (This)->lpVtbl -> Release(This) ) \r
-\r
-\r
-#define IPropertyStore_GetCount(This,cProps) \\r
- ( (This)->lpVtbl -> GetCount(This,cProps) ) \r
-\r
-#define IPropertyStore_GetAt(This,iProp,pkey) \\r
- ( (This)->lpVtbl -> GetAt(This,iProp,pkey) ) \r
-\r
-#define IPropertyStore_GetValue(This,key,pv) \\r
- ( (This)->lpVtbl -> GetValue(This,key,pv) ) \r
-\r
-#define IPropertyStore_SetValue(This,key,propvar) \\r
- ( (This)->lpVtbl -> SetValue(This,key,propvar) ) \r
-\r
-#define IPropertyStore_Commit(This) \\r
- ( (This)->lpVtbl -> Commit(This) ) \r
-\r
-#endif /* COBJMACROS */\r
-\r
-\r
-#endif /* C style interface */\r
-\r
-\r
-\r
-\r
-#endif /* __IPropertyStore_INTERFACE_DEFINED__ */\r
-\r
-\r
-/* interface __MIDL_itf_propsys_0000_0003 */\r
-/* [local] */ \r
-\r
-typedef /* [unique] */ __RPC_unique_pointer IPropertyStore *LPPROPERTYSTORE;\r
-\r
-\r
-\r
-extern RPC_IF_HANDLE __MIDL_itf_propsys_0000_0003_v0_0_c_ifspec;\r
-extern RPC_IF_HANDLE __MIDL_itf_propsys_0000_0003_v0_0_s_ifspec;\r
-\r
-#ifndef __INamedPropertyStore_INTERFACE_DEFINED__\r
-#define __INamedPropertyStore_INTERFACE_DEFINED__\r
-\r
-/* interface INamedPropertyStore */\r
-/* [unique][object][uuid] */ \r
-\r
-\r
-EXTERN_C const IID IID_INamedPropertyStore;\r
-\r
-#if defined(__cplusplus) && !defined(CINTERFACE)\r
- \r
- MIDL_INTERFACE("71604b0f-97b0-4764-8577-2f13e98a1422")\r
- INamedPropertyStore : public IUnknown\r
- {\r
- public:\r
- virtual HRESULT STDMETHODCALLTYPE GetNamedValue( \r
- /* [string][in] */ __RPC__in LPCWSTR pszName,\r
- /* [out] */ __RPC__out PROPVARIANT *ppropvar) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE SetNamedValue( \r
- /* [string][in] */ __RPC__in LPCWSTR pszName,\r
- /* [in] */ __RPC__in REFPROPVARIANT propvar) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE GetNameCount( \r
- /* [out] */ __RPC__out DWORD *pdwCount) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE GetNameAt( \r
- /* [in] */ DWORD iProp,\r
- /* [out] */ __RPC__deref_out_opt BSTR *pbstrName) = 0;\r
- \r
- };\r
- \r
-#else /* C style interface */\r
-\r
- typedef struct INamedPropertyStoreVtbl\r
- {\r
- BEGIN_INTERFACE\r
- \r
- HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r
- INamedPropertyStore * This,\r
- /* [in] */ __RPC__in REFIID riid,\r
- /* [iid_is][out] */ \r
- __RPC__deref_out void **ppvObject);\r
- \r
- ULONG ( STDMETHODCALLTYPE *AddRef )( \r
- INamedPropertyStore * This);\r
- \r
- ULONG ( STDMETHODCALLTYPE *Release )( \r
- INamedPropertyStore * This);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetNamedValue )( \r
- INamedPropertyStore * This,\r
- /* [string][in] */ __RPC__in LPCWSTR pszName,\r
- /* [out] */ __RPC__out PROPVARIANT *ppropvar);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *SetNamedValue )( \r
- INamedPropertyStore * This,\r
- /* [string][in] */ __RPC__in LPCWSTR pszName,\r
- /* [in] */ __RPC__in REFPROPVARIANT propvar);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetNameCount )( \r
- INamedPropertyStore * This,\r
- /* [out] */ __RPC__out DWORD *pdwCount);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetNameAt )( \r
- INamedPropertyStore * This,\r
- /* [in] */ DWORD iProp,\r
- /* [out] */ __RPC__deref_out_opt BSTR *pbstrName);\r
- \r
- END_INTERFACE\r
- } INamedPropertyStoreVtbl;\r
-\r
- interface INamedPropertyStore\r
- {\r
- CONST_VTBL struct INamedPropertyStoreVtbl *lpVtbl;\r
- };\r
-\r
- \r
-\r
-#ifdef COBJMACROS\r
-\r
-\r
-#define INamedPropertyStore_QueryInterface(This,riid,ppvObject) \\r
- ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r
-\r
-#define INamedPropertyStore_AddRef(This) \\r
- ( (This)->lpVtbl -> AddRef(This) ) \r
-\r
-#define INamedPropertyStore_Release(This) \\r
- ( (This)->lpVtbl -> Release(This) ) \r
-\r
-\r
-#define INamedPropertyStore_GetNamedValue(This,pszName,ppropvar) \\r
- ( (This)->lpVtbl -> GetNamedValue(This,pszName,ppropvar) ) \r
-\r
-#define INamedPropertyStore_SetNamedValue(This,pszName,propvar) \\r
- ( (This)->lpVtbl -> SetNamedValue(This,pszName,propvar) ) \r
-\r
-#define INamedPropertyStore_GetNameCount(This,pdwCount) \\r
- ( (This)->lpVtbl -> GetNameCount(This,pdwCount) ) \r
-\r
-#define INamedPropertyStore_GetNameAt(This,iProp,pbstrName) \\r
- ( (This)->lpVtbl -> GetNameAt(This,iProp,pbstrName) ) \r
-\r
-#endif /* COBJMACROS */\r
-\r
-\r
-#endif /* C style interface */\r
-\r
-\r
-\r
-\r
-#endif /* __INamedPropertyStore_INTERFACE_DEFINED__ */\r
-\r
-\r
-/* interface __MIDL_itf_propsys_0000_0004 */\r
-/* [local] */ \r
-\r
-/* [v1_enum] */ \r
-enum tagGETPROPERTYSTOREFLAGS\r
- { GPS_DEFAULT = 0,\r
- GPS_HANDLERPROPERTIESONLY = 0x1,\r
- GPS_READWRITE = 0x2,\r
- GPS_TEMPORARY = 0x4,\r
- GPS_FASTPROPERTIESONLY = 0x8,\r
- GPS_OPENSLOWITEM = 0x10,\r
- GPS_DELAYCREATION = 0x20,\r
- GPS_BESTEFFORT = 0x40,\r
- GPS_MASK_VALID = 0x7f\r
- } ;\r
-typedef int GETPROPERTYSTOREFLAGS;\r
-\r
-\r
-\r
-extern RPC_IF_HANDLE __MIDL_itf_propsys_0000_0004_v0_0_c_ifspec;\r
-extern RPC_IF_HANDLE __MIDL_itf_propsys_0000_0004_v0_0_s_ifspec;\r
-\r
-#ifndef __IObjectWithPropertyKey_INTERFACE_DEFINED__\r
-#define __IObjectWithPropertyKey_INTERFACE_DEFINED__\r
-\r
-/* interface IObjectWithPropertyKey */\r
-/* [uuid][object] */ \r
-\r
-\r
-EXTERN_C const IID IID_IObjectWithPropertyKey;\r
-\r
-#if defined(__cplusplus) && !defined(CINTERFACE)\r
- \r
- MIDL_INTERFACE("fc0ca0a7-c316-4fd2-9031-3e628e6d4f23")\r
- IObjectWithPropertyKey : public IUnknown\r
- {\r
- public:\r
- virtual HRESULT STDMETHODCALLTYPE SetPropertyKey( \r
- /* [in] */ __RPC__in REFPROPERTYKEY key) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE GetPropertyKey( \r
- /* [out] */ __RPC__out PROPERTYKEY *pkey) = 0;\r
- \r
- };\r
- \r
-#else /* C style interface */\r
-\r
- typedef struct IObjectWithPropertyKeyVtbl\r
- {\r
- BEGIN_INTERFACE\r
- \r
- HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r
- IObjectWithPropertyKey * This,\r
- /* [in] */ __RPC__in REFIID riid,\r
- /* [iid_is][out] */ \r
- __RPC__deref_out void **ppvObject);\r
- \r
- ULONG ( STDMETHODCALLTYPE *AddRef )( \r
- IObjectWithPropertyKey * This);\r
- \r
- ULONG ( STDMETHODCALLTYPE *Release )( \r
- IObjectWithPropertyKey * This);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *SetPropertyKey )( \r
- IObjectWithPropertyKey * This,\r
- /* [in] */ __RPC__in REFPROPERTYKEY key);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetPropertyKey )( \r
- IObjectWithPropertyKey * This,\r
- /* [out] */ __RPC__out PROPERTYKEY *pkey);\r
- \r
- END_INTERFACE\r
- } IObjectWithPropertyKeyVtbl;\r
-\r
- interface IObjectWithPropertyKey\r
- {\r
- CONST_VTBL struct IObjectWithPropertyKeyVtbl *lpVtbl;\r
- };\r
-\r
- \r
-\r
-#ifdef COBJMACROS\r
-\r
-\r
-#define IObjectWithPropertyKey_QueryInterface(This,riid,ppvObject) \\r
- ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r
-\r
-#define IObjectWithPropertyKey_AddRef(This) \\r
- ( (This)->lpVtbl -> AddRef(This) ) \r
-\r
-#define IObjectWithPropertyKey_Release(This) \\r
- ( (This)->lpVtbl -> Release(This) ) \r
-\r
-\r
-#define IObjectWithPropertyKey_SetPropertyKey(This,key) \\r
- ( (This)->lpVtbl -> SetPropertyKey(This,key) ) \r
-\r
-#define IObjectWithPropertyKey_GetPropertyKey(This,pkey) \\r
- ( (This)->lpVtbl -> GetPropertyKey(This,pkey) ) \r
-\r
-#endif /* COBJMACROS */\r
-\r
-\r
-#endif /* C style interface */\r
-\r
-\r
-\r
-\r
-#endif /* __IObjectWithPropertyKey_INTERFACE_DEFINED__ */\r
-\r
-\r
-/* interface __MIDL_itf_propsys_0000_0005 */\r
-/* [local] */ \r
-\r
-typedef /* [v1_enum] */ \r
-enum tagPKA_FLAGS\r
- { PKA_SET = 0,\r
- PKA_APPEND = ( PKA_SET + 1 ) ,\r
- PKA_DELETE = ( PKA_APPEND + 1 ) \r
- } PKA_FLAGS;\r
-\r
-\r
-\r
-extern RPC_IF_HANDLE __MIDL_itf_propsys_0000_0005_v0_0_c_ifspec;\r
-extern RPC_IF_HANDLE __MIDL_itf_propsys_0000_0005_v0_0_s_ifspec;\r
-\r
-#ifndef __IPropertyChange_INTERFACE_DEFINED__\r
-#define __IPropertyChange_INTERFACE_DEFINED__\r
-\r
-/* interface IPropertyChange */\r
-/* [unique][object][uuid] */ \r
-\r
-\r
-EXTERN_C const IID IID_IPropertyChange;\r
-\r
-#if defined(__cplusplus) && !defined(CINTERFACE)\r
- \r
- MIDL_INTERFACE("f917bc8a-1bba-4478-a245-1bde03eb9431")\r
- IPropertyChange : public IObjectWithPropertyKey\r
- {\r
- public:\r
- virtual HRESULT STDMETHODCALLTYPE ApplyToPropVariant( \r
- /* [in] */ __RPC__in REFPROPVARIANT propvarIn,\r
- /* [out] */ __RPC__out PROPVARIANT *ppropvarOut) = 0;\r
- \r
- };\r
- \r
-#else /* C style interface */\r
-\r
- typedef struct IPropertyChangeVtbl\r
- {\r
- BEGIN_INTERFACE\r
- \r
- HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r
- IPropertyChange * This,\r
- /* [in] */ __RPC__in REFIID riid,\r
- /* [iid_is][out] */ \r
- __RPC__deref_out void **ppvObject);\r
- \r
- ULONG ( STDMETHODCALLTYPE *AddRef )( \r
- IPropertyChange * This);\r
- \r
- ULONG ( STDMETHODCALLTYPE *Release )( \r
- IPropertyChange * This);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *SetPropertyKey )( \r
- IPropertyChange * This,\r
- /* [in] */ __RPC__in REFPROPERTYKEY key);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetPropertyKey )( \r
- IPropertyChange * This,\r
- /* [out] */ __RPC__out PROPERTYKEY *pkey);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *ApplyToPropVariant )( \r
- IPropertyChange * This,\r
- /* [in] */ __RPC__in REFPROPVARIANT propvarIn,\r
- /* [out] */ __RPC__out PROPVARIANT *ppropvarOut);\r
- \r
- END_INTERFACE\r
- } IPropertyChangeVtbl;\r
-\r
- interface IPropertyChange\r
- {\r
- CONST_VTBL struct IPropertyChangeVtbl *lpVtbl;\r
- };\r
-\r
- \r
-\r
-#ifdef COBJMACROS\r
-\r
-\r
-#define IPropertyChange_QueryInterface(This,riid,ppvObject) \\r
- ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r
-\r
-#define IPropertyChange_AddRef(This) \\r
- ( (This)->lpVtbl -> AddRef(This) ) \r
-\r
-#define IPropertyChange_Release(This) \\r
- ( (This)->lpVtbl -> Release(This) ) \r
-\r
-\r
-#define IPropertyChange_SetPropertyKey(This,key) \\r
- ( (This)->lpVtbl -> SetPropertyKey(This,key) ) \r
-\r
-#define IPropertyChange_GetPropertyKey(This,pkey) \\r
- ( (This)->lpVtbl -> GetPropertyKey(This,pkey) ) \r
-\r
-\r
-#define IPropertyChange_ApplyToPropVariant(This,propvarIn,ppropvarOut) \\r
- ( (This)->lpVtbl -> ApplyToPropVariant(This,propvarIn,ppropvarOut) ) \r
-\r
-#endif /* COBJMACROS */\r
-\r
-\r
-#endif /* C style interface */\r
-\r
-\r
-\r
-\r
-#endif /* __IPropertyChange_INTERFACE_DEFINED__ */\r
-\r
-\r
-#ifndef __IPropertyChangeArray_INTERFACE_DEFINED__\r
-#define __IPropertyChangeArray_INTERFACE_DEFINED__\r
-\r
-/* interface IPropertyChangeArray */\r
-/* [unique][object][uuid] */ \r
-\r
-\r
-EXTERN_C const IID IID_IPropertyChangeArray;\r
-\r
-#if defined(__cplusplus) && !defined(CINTERFACE)\r
- \r
- MIDL_INTERFACE("380f5cad-1b5e-42f2-805d-637fd392d31e")\r
- IPropertyChangeArray : public IUnknown\r
- {\r
- public:\r
- virtual HRESULT STDMETHODCALLTYPE GetCount( \r
- /* [out] */ __RPC__out UINT *pcOperations) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE GetAt( \r
- /* [in] */ UINT iIndex,\r
- /* [in] */ __RPC__in REFIID riid,\r
- /* [iid_is][out] */ __RPC__deref_out_opt void **ppv) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE InsertAt( \r
- /* [in] */ UINT iIndex,\r
- /* [in] */ __RPC__in_opt IPropertyChange *ppropChange) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE Append( \r
- /* [in] */ __RPC__in_opt IPropertyChange *ppropChange) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE AppendOrReplace( \r
- /* [in] */ __RPC__in_opt IPropertyChange *ppropChange) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE RemoveAt( \r
- /* [in] */ UINT iIndex) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE IsKeyInArray( \r
- /* [in] */ __RPC__in REFPROPERTYKEY key) = 0;\r
- \r
- };\r
- \r
-#else /* C style interface */\r
-\r
- typedef struct IPropertyChangeArrayVtbl\r
- {\r
- BEGIN_INTERFACE\r
- \r
- HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r
- IPropertyChangeArray * This,\r
- /* [in] */ __RPC__in REFIID riid,\r
- /* [iid_is][out] */ \r
- __RPC__deref_out void **ppvObject);\r
- \r
- ULONG ( STDMETHODCALLTYPE *AddRef )( \r
- IPropertyChangeArray * This);\r
- \r
- ULONG ( STDMETHODCALLTYPE *Release )( \r
- IPropertyChangeArray * This);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetCount )( \r
- IPropertyChangeArray * This,\r
- /* [out] */ __RPC__out UINT *pcOperations);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetAt )( \r
- IPropertyChangeArray * This,\r
- /* [in] */ UINT iIndex,\r
- /* [in] */ __RPC__in REFIID riid,\r
- /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *InsertAt )( \r
- IPropertyChangeArray * This,\r
- /* [in] */ UINT iIndex,\r
- /* [in] */ __RPC__in_opt IPropertyChange *ppropChange);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *Append )( \r
- IPropertyChangeArray * This,\r
- /* [in] */ __RPC__in_opt IPropertyChange *ppropChange);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *AppendOrReplace )( \r
- IPropertyChangeArray * This,\r
- /* [in] */ __RPC__in_opt IPropertyChange *ppropChange);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *RemoveAt )( \r
- IPropertyChangeArray * This,\r
- /* [in] */ UINT iIndex);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *IsKeyInArray )( \r
- IPropertyChangeArray * This,\r
- /* [in] */ __RPC__in REFPROPERTYKEY key);\r
- \r
- END_INTERFACE\r
- } IPropertyChangeArrayVtbl;\r
-\r
- interface IPropertyChangeArray\r
- {\r
- CONST_VTBL struct IPropertyChangeArrayVtbl *lpVtbl;\r
- };\r
-\r
- \r
-\r
-#ifdef COBJMACROS\r
-\r
-\r
-#define IPropertyChangeArray_QueryInterface(This,riid,ppvObject) \\r
- ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r
-\r
-#define IPropertyChangeArray_AddRef(This) \\r
- ( (This)->lpVtbl -> AddRef(This) ) \r
-\r
-#define IPropertyChangeArray_Release(This) \\r
- ( (This)->lpVtbl -> Release(This) ) \r
-\r
-\r
-#define IPropertyChangeArray_GetCount(This,pcOperations) \\r
- ( (This)->lpVtbl -> GetCount(This,pcOperations) ) \r
-\r
-#define IPropertyChangeArray_GetAt(This,iIndex,riid,ppv) \\r
- ( (This)->lpVtbl -> GetAt(This,iIndex,riid,ppv) ) \r
-\r
-#define IPropertyChangeArray_InsertAt(This,iIndex,ppropChange) \\r
- ( (This)->lpVtbl -> InsertAt(This,iIndex,ppropChange) ) \r
-\r
-#define IPropertyChangeArray_Append(This,ppropChange) \\r
- ( (This)->lpVtbl -> Append(This,ppropChange) ) \r
-\r
-#define IPropertyChangeArray_AppendOrReplace(This,ppropChange) \\r
- ( (This)->lpVtbl -> AppendOrReplace(This,ppropChange) ) \r
-\r
-#define IPropertyChangeArray_RemoveAt(This,iIndex) \\r
- ( (This)->lpVtbl -> RemoveAt(This,iIndex) ) \r
-\r
-#define IPropertyChangeArray_IsKeyInArray(This,key) \\r
- ( (This)->lpVtbl -> IsKeyInArray(This,key) ) \r
-\r
-#endif /* COBJMACROS */\r
-\r
-\r
-#endif /* C style interface */\r
-\r
-\r
-\r
-\r
-#endif /* __IPropertyChangeArray_INTERFACE_DEFINED__ */\r
-\r
-\r
-#ifndef __IPropertyStoreCapabilities_INTERFACE_DEFINED__\r
-#define __IPropertyStoreCapabilities_INTERFACE_DEFINED__\r
-\r
-/* interface IPropertyStoreCapabilities */\r
-/* [unique][object][uuid] */ \r
-\r
-\r
-EXTERN_C const IID IID_IPropertyStoreCapabilities;\r
-\r
-#if defined(__cplusplus) && !defined(CINTERFACE)\r
- \r
- MIDL_INTERFACE("c8e2d566-186e-4d49-bf41-6909ead56acc")\r
- IPropertyStoreCapabilities : public IUnknown\r
- {\r
- public:\r
- virtual HRESULT STDMETHODCALLTYPE IsPropertyWritable( \r
- /* [in] */ __RPC__in REFPROPERTYKEY key) = 0;\r
- \r
- };\r
- \r
-#else /* C style interface */\r
-\r
- typedef struct IPropertyStoreCapabilitiesVtbl\r
- {\r
- BEGIN_INTERFACE\r
- \r
- HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r
- IPropertyStoreCapabilities * This,\r
- /* [in] */ __RPC__in REFIID riid,\r
- /* [iid_is][out] */ \r
- __RPC__deref_out void **ppvObject);\r
- \r
- ULONG ( STDMETHODCALLTYPE *AddRef )( \r
- IPropertyStoreCapabilities * This);\r
- \r
- ULONG ( STDMETHODCALLTYPE *Release )( \r
- IPropertyStoreCapabilities * This);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *IsPropertyWritable )( \r
- IPropertyStoreCapabilities * This,\r
- /* [in] */ __RPC__in REFPROPERTYKEY key);\r
- \r
- END_INTERFACE\r
- } IPropertyStoreCapabilitiesVtbl;\r
-\r
- interface IPropertyStoreCapabilities\r
- {\r
- CONST_VTBL struct IPropertyStoreCapabilitiesVtbl *lpVtbl;\r
- };\r
-\r
- \r
-\r
-#ifdef COBJMACROS\r
-\r
-\r
-#define IPropertyStoreCapabilities_QueryInterface(This,riid,ppvObject) \\r
- ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r
-\r
-#define IPropertyStoreCapabilities_AddRef(This) \\r
- ( (This)->lpVtbl -> AddRef(This) ) \r
-\r
-#define IPropertyStoreCapabilities_Release(This) \\r
- ( (This)->lpVtbl -> Release(This) ) \r
-\r
-\r
-#define IPropertyStoreCapabilities_IsPropertyWritable(This,key) \\r
- ( (This)->lpVtbl -> IsPropertyWritable(This,key) ) \r
-\r
-#endif /* COBJMACROS */\r
-\r
-\r
-#endif /* C style interface */\r
-\r
-\r
-\r
-\r
-#endif /* __IPropertyStoreCapabilities_INTERFACE_DEFINED__ */\r
-\r
-\r
-#ifndef __IPropertyStoreCache_INTERFACE_DEFINED__\r
-#define __IPropertyStoreCache_INTERFACE_DEFINED__\r
-\r
-/* interface IPropertyStoreCache */\r
-/* [unique][object][uuid] */ \r
-\r
-typedef /* [v1_enum] */ \r
-enum _PSC_STATE\r
- { PSC_NORMAL = 0,\r
- PSC_NOTINSOURCE = 1,\r
- PSC_DIRTY = 2,\r
- PSC_READONLY = 3\r
- } PSC_STATE;\r
-\r
-\r
-EXTERN_C const IID IID_IPropertyStoreCache;\r
-\r
-#if defined(__cplusplus) && !defined(CINTERFACE)\r
- \r
- MIDL_INTERFACE("3017056d-9a91-4e90-937d-746c72abbf4f")\r
- IPropertyStoreCache : public IPropertyStore\r
- {\r
- public:\r
- virtual HRESULT STDMETHODCALLTYPE GetState( \r
- /* [in] */ __RPC__in REFPROPERTYKEY key,\r
- /* [out] */ __RPC__out PSC_STATE *pstate) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE GetValueAndState( \r
- /* [in] */ __RPC__in REFPROPERTYKEY key,\r
- /* [out] */ __RPC__out PROPVARIANT *ppropvar,\r
- /* [out] */ __RPC__out PSC_STATE *pstate) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE SetState( \r
- /* [in] */ __RPC__in REFPROPERTYKEY key,\r
- /* [in] */ PSC_STATE state) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE SetValueAndState( \r
- /* [in] */ __RPC__in REFPROPERTYKEY key,\r
- /* [unique][in] */ __RPC__in_opt const PROPVARIANT *ppropvar,\r
- /* [in] */ PSC_STATE state) = 0;\r
- \r
- };\r
- \r
-#else /* C style interface */\r
-\r
- typedef struct IPropertyStoreCacheVtbl\r
- {\r
- BEGIN_INTERFACE\r
- \r
- HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r
- IPropertyStoreCache * This,\r
- /* [in] */ __RPC__in REFIID riid,\r
- /* [iid_is][out] */ \r
- __RPC__deref_out void **ppvObject);\r
- \r
- ULONG ( STDMETHODCALLTYPE *AddRef )( \r
- IPropertyStoreCache * This);\r
- \r
- ULONG ( STDMETHODCALLTYPE *Release )( \r
- IPropertyStoreCache * This);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetCount )( \r
- IPropertyStoreCache * This,\r
- /* [out] */ __RPC__out DWORD *cProps);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetAt )( \r
- IPropertyStoreCache * This,\r
- /* [in] */ DWORD iProp,\r
- /* [out] */ __RPC__out PROPERTYKEY *pkey);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetValue )( \r
- IPropertyStoreCache * This,\r
- /* [in] */ __RPC__in REFPROPERTYKEY key,\r
- /* [out] */ __RPC__out PROPVARIANT *pv);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *SetValue )( \r
- IPropertyStoreCache * This,\r
- /* [in] */ __RPC__in REFPROPERTYKEY key,\r
- /* [in] */ __RPC__in REFPROPVARIANT propvar);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *Commit )( \r
- IPropertyStoreCache * This);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetState )( \r
- IPropertyStoreCache * This,\r
- /* [in] */ __RPC__in REFPROPERTYKEY key,\r
- /* [out] */ __RPC__out PSC_STATE *pstate);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetValueAndState )( \r
- IPropertyStoreCache * This,\r
- /* [in] */ __RPC__in REFPROPERTYKEY key,\r
- /* [out] */ __RPC__out PROPVARIANT *ppropvar,\r
- /* [out] */ __RPC__out PSC_STATE *pstate);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *SetState )( \r
- IPropertyStoreCache * This,\r
- /* [in] */ __RPC__in REFPROPERTYKEY key,\r
- /* [in] */ PSC_STATE state);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *SetValueAndState )( \r
- IPropertyStoreCache * This,\r
- /* [in] */ __RPC__in REFPROPERTYKEY key,\r
- /* [unique][in] */ __RPC__in_opt const PROPVARIANT *ppropvar,\r
- /* [in] */ PSC_STATE state);\r
- \r
- END_INTERFACE\r
- } IPropertyStoreCacheVtbl;\r
-\r
- interface IPropertyStoreCache\r
- {\r
- CONST_VTBL struct IPropertyStoreCacheVtbl *lpVtbl;\r
- };\r
-\r
- \r
-\r
-#ifdef COBJMACROS\r
-\r
-\r
-#define IPropertyStoreCache_QueryInterface(This,riid,ppvObject) \\r
- ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r
-\r
-#define IPropertyStoreCache_AddRef(This) \\r
- ( (This)->lpVtbl -> AddRef(This) ) \r
-\r
-#define IPropertyStoreCache_Release(This) \\r
- ( (This)->lpVtbl -> Release(This) ) \r
-\r
-\r
-#define IPropertyStoreCache_GetCount(This,cProps) \\r
- ( (This)->lpVtbl -> GetCount(This,cProps) ) \r
-\r
-#define IPropertyStoreCache_GetAt(This,iProp,pkey) \\r
- ( (This)->lpVtbl -> GetAt(This,iProp,pkey) ) \r
-\r
-#define IPropertyStoreCache_GetValue(This,key,pv) \\r
- ( (This)->lpVtbl -> GetValue(This,key,pv) ) \r
-\r
-#define IPropertyStoreCache_SetValue(This,key,propvar) \\r
- ( (This)->lpVtbl -> SetValue(This,key,propvar) ) \r
-\r
-#define IPropertyStoreCache_Commit(This) \\r
- ( (This)->lpVtbl -> Commit(This) ) \r
-\r
-\r
-#define IPropertyStoreCache_GetState(This,key,pstate) \\r
- ( (This)->lpVtbl -> GetState(This,key,pstate) ) \r
-\r
-#define IPropertyStoreCache_GetValueAndState(This,key,ppropvar,pstate) \\r
- ( (This)->lpVtbl -> GetValueAndState(This,key,ppropvar,pstate) ) \r
-\r
-#define IPropertyStoreCache_SetState(This,key,state) \\r
- ( (This)->lpVtbl -> SetState(This,key,state) ) \r
-\r
-#define IPropertyStoreCache_SetValueAndState(This,key,ppropvar,state) \\r
- ( (This)->lpVtbl -> SetValueAndState(This,key,ppropvar,state) ) \r
-\r
-#endif /* COBJMACROS */\r
-\r
-\r
-#endif /* C style interface */\r
-\r
-\r
-\r
-\r
-#endif /* __IPropertyStoreCache_INTERFACE_DEFINED__ */\r
-\r
-\r
-#ifndef __IPropertyEnumType_INTERFACE_DEFINED__\r
-#define __IPropertyEnumType_INTERFACE_DEFINED__\r
-\r
-/* interface IPropertyEnumType */\r
-/* [unique][object][uuid] */ \r
-\r
-/* [v1_enum] */ \r
-enum tagPROPENUMTYPE\r
- { PET_DISCRETEVALUE = 0,\r
- PET_RANGEDVALUE = 1,\r
- PET_DEFAULTVALUE = 2,\r
- PET_ENDRANGE = 3\r
- } ;\r
-typedef enum tagPROPENUMTYPE PROPENUMTYPE;\r
-\r
-\r
-EXTERN_C const IID IID_IPropertyEnumType;\r
-\r
-#if defined(__cplusplus) && !defined(CINTERFACE)\r
- \r
- MIDL_INTERFACE("11e1fbf9-2d56-4a6b-8db3-7cd193a471f2")\r
- IPropertyEnumType : public IUnknown\r
- {\r
- public:\r
- virtual HRESULT STDMETHODCALLTYPE GetEnumType( \r
- /* [out] */ __RPC__out PROPENUMTYPE *penumtype) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE GetValue( \r
- /* [out] */ __RPC__out PROPVARIANT *ppropvar) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE GetRangeMinValue( \r
- /* [out] */ __RPC__out PROPVARIANT *ppropvarMin) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE GetRangeSetValue( \r
- /* [out] */ __RPC__out PROPVARIANT *ppropvarSet) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE GetDisplayText( \r
- /* [out] */ __RPC__deref_out_opt LPWSTR *ppszDisplay) = 0;\r
- \r
- };\r
- \r
-#else /* C style interface */\r
-\r
- typedef struct IPropertyEnumTypeVtbl\r
- {\r
- BEGIN_INTERFACE\r
- \r
- HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r
- IPropertyEnumType * This,\r
- /* [in] */ __RPC__in REFIID riid,\r
- /* [iid_is][out] */ \r
- __RPC__deref_out void **ppvObject);\r
- \r
- ULONG ( STDMETHODCALLTYPE *AddRef )( \r
- IPropertyEnumType * This);\r
- \r
- ULONG ( STDMETHODCALLTYPE *Release )( \r
- IPropertyEnumType * This);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetEnumType )( \r
- IPropertyEnumType * This,\r
- /* [out] */ __RPC__out PROPENUMTYPE *penumtype);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetValue )( \r
- IPropertyEnumType * This,\r
- /* [out] */ __RPC__out PROPVARIANT *ppropvar);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetRangeMinValue )( \r
- IPropertyEnumType * This,\r
- /* [out] */ __RPC__out PROPVARIANT *ppropvarMin);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetRangeSetValue )( \r
- IPropertyEnumType * This,\r
- /* [out] */ __RPC__out PROPVARIANT *ppropvarSet);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetDisplayText )( \r
- IPropertyEnumType * This,\r
- /* [out] */ __RPC__deref_out_opt LPWSTR *ppszDisplay);\r
- \r
- END_INTERFACE\r
- } IPropertyEnumTypeVtbl;\r
-\r
- interface IPropertyEnumType\r
- {\r
- CONST_VTBL struct IPropertyEnumTypeVtbl *lpVtbl;\r
- };\r
-\r
- \r
-\r
-#ifdef COBJMACROS\r
-\r
-\r
-#define IPropertyEnumType_QueryInterface(This,riid,ppvObject) \\r
- ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r
-\r
-#define IPropertyEnumType_AddRef(This) \\r
- ( (This)->lpVtbl -> AddRef(This) ) \r
-\r
-#define IPropertyEnumType_Release(This) \\r
- ( (This)->lpVtbl -> Release(This) ) \r
-\r
-\r
-#define IPropertyEnumType_GetEnumType(This,penumtype) \\r
- ( (This)->lpVtbl -> GetEnumType(This,penumtype) ) \r
-\r
-#define IPropertyEnumType_GetValue(This,ppropvar) \\r
- ( (This)->lpVtbl -> GetValue(This,ppropvar) ) \r
-\r
-#define IPropertyEnumType_GetRangeMinValue(This,ppropvarMin) \\r
- ( (This)->lpVtbl -> GetRangeMinValue(This,ppropvarMin) ) \r
-\r
-#define IPropertyEnumType_GetRangeSetValue(This,ppropvarSet) \\r
- ( (This)->lpVtbl -> GetRangeSetValue(This,ppropvarSet) ) \r
-\r
-#define IPropertyEnumType_GetDisplayText(This,ppszDisplay) \\r
- ( (This)->lpVtbl -> GetDisplayText(This,ppszDisplay) ) \r
-\r
-#endif /* COBJMACROS */\r
-\r
-\r
-#endif /* C style interface */\r
-\r
-\r
-\r
-\r
-#endif /* __IPropertyEnumType_INTERFACE_DEFINED__ */\r
-\r
-\r
-#ifndef __IPropertyEnumTypeList_INTERFACE_DEFINED__\r
-#define __IPropertyEnumTypeList_INTERFACE_DEFINED__\r
-\r
-/* interface IPropertyEnumTypeList */\r
-/* [unique][object][uuid] */ \r
-\r
-\r
-EXTERN_C const IID IID_IPropertyEnumTypeList;\r
-\r
-#if defined(__cplusplus) && !defined(CINTERFACE)\r
- \r
- MIDL_INTERFACE("a99400f4-3d84-4557-94ba-1242fb2cc9a6")\r
- IPropertyEnumTypeList : public IUnknown\r
- {\r
- public:\r
- virtual HRESULT STDMETHODCALLTYPE GetCount( \r
- /* [out] */ __RPC__out UINT *pctypes) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE GetAt( \r
- /* [in] */ UINT itype,\r
- /* [in] */ __RPC__in REFIID riid,\r
- /* [iid_is][out] */ __RPC__deref_out_opt void **ppv) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE GetConditionAt( \r
- /* [in] */ UINT nIndex,\r
- /* [in] */ __RPC__in REFIID riid,\r
- /* [iid_is][out] */ __RPC__deref_out_opt void **ppv) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE FindMatchingIndex( \r
- /* [in] */ __RPC__in REFPROPVARIANT propvarCmp,\r
- /* [out] */ __RPC__out UINT *pnIndex) = 0;\r
- \r
- };\r
- \r
-#else /* C style interface */\r
-\r
- typedef struct IPropertyEnumTypeListVtbl\r
- {\r
- BEGIN_INTERFACE\r
- \r
- HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r
- IPropertyEnumTypeList * This,\r
- /* [in] */ __RPC__in REFIID riid,\r
- /* [iid_is][out] */ \r
- __RPC__deref_out void **ppvObject);\r
- \r
- ULONG ( STDMETHODCALLTYPE *AddRef )( \r
- IPropertyEnumTypeList * This);\r
- \r
- ULONG ( STDMETHODCALLTYPE *Release )( \r
- IPropertyEnumTypeList * This);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetCount )( \r
- IPropertyEnumTypeList * This,\r
- /* [out] */ __RPC__out UINT *pctypes);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetAt )( \r
- IPropertyEnumTypeList * This,\r
- /* [in] */ UINT itype,\r
- /* [in] */ __RPC__in REFIID riid,\r
- /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetConditionAt )( \r
- IPropertyEnumTypeList * This,\r
- /* [in] */ UINT nIndex,\r
- /* [in] */ __RPC__in REFIID riid,\r
- /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *FindMatchingIndex )( \r
- IPropertyEnumTypeList * This,\r
- /* [in] */ __RPC__in REFPROPVARIANT propvarCmp,\r
- /* [out] */ __RPC__out UINT *pnIndex);\r
- \r
- END_INTERFACE\r
- } IPropertyEnumTypeListVtbl;\r
-\r
- interface IPropertyEnumTypeList\r
- {\r
- CONST_VTBL struct IPropertyEnumTypeListVtbl *lpVtbl;\r
- };\r
-\r
- \r
-\r
-#ifdef COBJMACROS\r
-\r
-\r
-#define IPropertyEnumTypeList_QueryInterface(This,riid,ppvObject) \\r
- ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r
-\r
-#define IPropertyEnumTypeList_AddRef(This) \\r
- ( (This)->lpVtbl -> AddRef(This) ) \r
-\r
-#define IPropertyEnumTypeList_Release(This) \\r
- ( (This)->lpVtbl -> Release(This) ) \r
-\r
-\r
-#define IPropertyEnumTypeList_GetCount(This,pctypes) \\r
- ( (This)->lpVtbl -> GetCount(This,pctypes) ) \r
-\r
-#define IPropertyEnumTypeList_GetAt(This,itype,riid,ppv) \\r
- ( (This)->lpVtbl -> GetAt(This,itype,riid,ppv) ) \r
-\r
-#define IPropertyEnumTypeList_GetConditionAt(This,nIndex,riid,ppv) \\r
- ( (This)->lpVtbl -> GetConditionAt(This,nIndex,riid,ppv) ) \r
-\r
-#define IPropertyEnumTypeList_FindMatchingIndex(This,propvarCmp,pnIndex) \\r
- ( (This)->lpVtbl -> FindMatchingIndex(This,propvarCmp,pnIndex) ) \r
-\r
-#endif /* COBJMACROS */\r
-\r
-\r
-#endif /* C style interface */\r
-\r
-\r
-\r
-\r
-#endif /* __IPropertyEnumTypeList_INTERFACE_DEFINED__ */\r
-\r
-\r
-#ifndef __IPropertyDescription_INTERFACE_DEFINED__\r
-#define __IPropertyDescription_INTERFACE_DEFINED__\r
-\r
-/* interface IPropertyDescription */\r
-/* [unique][object][uuid] */ \r
-\r
-/* [v1_enum] */ \r
-enum tagPROPDESC_TYPE_FLAGS\r
- { PDTF_DEFAULT = 0,\r
- PDTF_MULTIPLEVALUES = 0x1,\r
- PDTF_ISINNATE = 0x2,\r
- PDTF_ISGROUP = 0x4,\r
- PDTF_CANGROUPBY = 0x8,\r
- PDTF_CANSTACKBY = 0x10,\r
- PDTF_ISTREEPROPERTY = 0x20,\r
- PDTF_INCLUDEINFULLTEXTQUERY = 0x40,\r
- PDTF_ISVIEWABLE = 0x80,\r
- PDTF_ISQUERYABLE = 0x100,\r
- PDTF_ISSYSTEMPROPERTY = 0x80000000,\r
- PDTF_MASK_ALL = 0x800001ff\r
- } ;\r
-typedef int PROPDESC_TYPE_FLAGS;\r
-\r
-/* [v1_enum] */ \r
-enum tagPROPDESC_VIEW_FLAGS\r
- { PDVF_DEFAULT = 0,\r
- PDVF_CENTERALIGN = 0x1,\r
- PDVF_RIGHTALIGN = 0x2,\r
- PDVF_BEGINNEWGROUP = 0x4,\r
- PDVF_FILLAREA = 0x8,\r
- PDVF_SORTDESCENDING = 0x10,\r
- PDVF_SHOWONLYIFPRESENT = 0x20,\r
- PDVF_SHOWBYDEFAULT = 0x40,\r
- PDVF_SHOWINPRIMARYLIST = 0x80,\r
- PDVF_SHOWINSECONDARYLIST = 0x100,\r
- PDVF_HIDELABEL = 0x200,\r
- PDVF_HIDDEN = 0x800,\r
- PDVF_CANWRAP = 0x1000,\r
- PDVF_MASK_ALL = 0x1bff\r
- } ;\r
-typedef int PROPDESC_VIEW_FLAGS;\r
-\r
-/* [v1_enum] */ \r
-enum tagPROPDESC_DISPLAYTYPE\r
- { PDDT_STRING = 0,\r
- PDDT_NUMBER = 1,\r
- PDDT_BOOLEAN = 2,\r
- PDDT_DATETIME = 3,\r
- PDDT_ENUMERATED = 4\r
- } ;\r
-typedef enum tagPROPDESC_DISPLAYTYPE PROPDESC_DISPLAYTYPE;\r
-\r
-/* [v1_enum] */ \r
-enum tagPROPDESC_GROUPING_RANGE\r
- { PDGR_DISCRETE = 0,\r
- PDGR_ALPHANUMERIC = 1,\r
- PDGR_SIZE = 2,\r
- PDGR_DYNAMIC = 3,\r
- PDGR_DATE = 4,\r
- PDGR_PERCENT = 5,\r
- PDGR_ENUMERATED = 6\r
- } ;\r
-typedef enum tagPROPDESC_GROUPING_RANGE PROPDESC_GROUPING_RANGE;\r
-\r
-/* [v1_enum] */ \r
-enum tagPROPDESC_FORMAT_FLAGS\r
- { PDFF_DEFAULT = 0,\r
- PDFF_PREFIXNAME = 0x1,\r
- PDFF_FILENAME = 0x2,\r
- PDFF_ALWAYSKB = 0x4,\r
- PDFF_RESERVED_RIGHTTOLEFT = 0x8,\r
- PDFF_SHORTTIME = 0x10,\r
- PDFF_LONGTIME = 0x20,\r
- PDFF_HIDETIME = 0x40,\r
- PDFF_SHORTDATE = 0x80,\r
- PDFF_LONGDATE = 0x100,\r
- PDFF_HIDEDATE = 0x200,\r
- PDFF_RELATIVEDATE = 0x400,\r
- PDFF_USEEDITINVITATION = 0x800,\r
- PDFF_READONLY = 0x1000,\r
- PDFF_NOAUTOREADINGORDER = 0x2000\r
- } ;\r
-typedef int PROPDESC_FORMAT_FLAGS;\r
-\r
-/* [v1_enum] */ \r
-enum tagPROPDESC_SORTDESCRIPTION\r
- { PDSD_GENERAL = 0,\r
- PDSD_A_Z = 1,\r
- PDSD_LOWEST_HIGHEST = 2,\r
- PDSD_SMALLEST_BIGGEST = 3,\r
- PDSD_OLDEST_NEWEST = 4\r
- } ;\r
-typedef enum tagPROPDESC_SORTDESCRIPTION PROPDESC_SORTDESCRIPTION;\r
-\r
-/* [v1_enum] */ \r
-enum tagPROPDESC_RELATIVEDESCRIPTION_TYPE\r
- { PDRDT_GENERAL = 0,\r
- PDRDT_DATE = 1,\r
- PDRDT_SIZE = 2,\r
- PDRDT_COUNT = 3,\r
- PDRDT_REVISION = 4,\r
- PDRDT_LENGTH = 5,\r
- PDRDT_DURATION = 6,\r
- PDRDT_SPEED = 7,\r
- PDRDT_RATE = 8,\r
- PDRDT_RATING = 9,\r
- PDRDT_PRIORITY = 10\r
- } ;\r
-typedef enum tagPROPDESC_RELATIVEDESCRIPTION_TYPE PROPDESC_RELATIVEDESCRIPTION_TYPE;\r
-\r
-/* [v1_enum] */ \r
-enum tagPROPDESC_AGGREGATION_TYPE\r
- { PDAT_DEFAULT = 0,\r
- PDAT_FIRST = 1,\r
- PDAT_SUM = 2,\r
- PDAT_AVERAGE = 3,\r
- PDAT_DATERANGE = 4,\r
- PDAT_UNION = 5,\r
- PDAT_MAX = 6,\r
- PDAT_MIN = 7\r
- } ;\r
-typedef enum tagPROPDESC_AGGREGATION_TYPE PROPDESC_AGGREGATION_TYPE;\r
-\r
-/* [v1_enum] */ \r
-enum tagPROPDESC_CONDITION_TYPE\r
- { PDCOT_NONE = 0,\r
- PDCOT_STRING = 1,\r
- PDCOT_SIZE = 2,\r
- PDCOT_DATETIME = 3,\r
- PDCOT_BOOLEAN = 4,\r
- PDCOT_NUMBER = 5\r
- } ;\r
-typedef enum tagPROPDESC_CONDITION_TYPE PROPDESC_CONDITION_TYPE;\r
-\r
-\r
-EXTERN_C const IID IID_IPropertyDescription;\r
-\r
-#if defined(__cplusplus) && !defined(CINTERFACE)\r
- \r
- MIDL_INTERFACE("6f79d558-3e96-4549-a1d1-7d75d2288814")\r
- IPropertyDescription : public IUnknown\r
- {\r
- public:\r
- virtual HRESULT STDMETHODCALLTYPE GetPropertyKey( \r
- /* [out] */ __RPC__out PROPERTYKEY *pkey) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE GetCanonicalName( \r
- /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszName) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE GetPropertyType( \r
- /* [out] */ __RPC__out VARTYPE *pvartype) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE GetDisplayName( \r
- /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszName) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE GetEditInvitation( \r
- /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszInvite) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE GetTypeFlags( \r
- /* [in] */ PROPDESC_TYPE_FLAGS mask,\r
- /* [out] */ __RPC__out PROPDESC_TYPE_FLAGS *ppdtFlags) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE GetViewFlags( \r
- /* [out] */ __RPC__out PROPDESC_VIEW_FLAGS *ppdvFlags) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE GetDefaultColumnWidth( \r
- /* [out] */ __RPC__out UINT *pcxChars) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE GetDisplayType( \r
- /* [out] */ __RPC__out PROPDESC_DISPLAYTYPE *pdisplaytype) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE GetColumnState( \r
- /* [out] */ __RPC__out SHCOLSTATEF *pcsFlags) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE GetGroupingRange( \r
- /* [out] */ __RPC__out PROPDESC_GROUPING_RANGE *pgr) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE GetRelativeDescriptionType( \r
- /* [out] */ __RPC__out PROPDESC_RELATIVEDESCRIPTION_TYPE *prdt) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE GetRelativeDescription( \r
- /* [in] */ __RPC__in REFPROPVARIANT propvar1,\r
- /* [in] */ __RPC__in REFPROPVARIANT propvar2,\r
- /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszDesc1,\r
- /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszDesc2) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE GetSortDescription( \r
- /* [out] */ __RPC__out PROPDESC_SORTDESCRIPTION *psd) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE GetSortDescriptionLabel( \r
- /* [in] */ BOOL fDescending,\r
- /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszDescription) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE GetAggregationType( \r
- /* [out] */ __RPC__out PROPDESC_AGGREGATION_TYPE *paggtype) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE GetConditionType( \r
- /* [out] */ __RPC__out PROPDESC_CONDITION_TYPE *pcontype,\r
- /* [out] */ __RPC__out CONDITION_OPERATION *popDefault) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE GetEnumTypeList( \r
- /* [in] */ __RPC__in REFIID riid,\r
- /* [iid_is][out] */ __RPC__deref_out_opt void **ppv) = 0;\r
- \r
- virtual /* [local] */ HRESULT STDMETHODCALLTYPE CoerceToCanonicalValue( \r
- /* [out][in] */ PROPVARIANT *ppropvar) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE FormatForDisplay( \r
- /* [in] */ __RPC__in REFPROPVARIANT propvar,\r
- /* [in] */ PROPDESC_FORMAT_FLAGS pdfFlags,\r
- /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszDisplay) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE IsValueCanonical( \r
- /* [in] */ __RPC__in REFPROPVARIANT propvar) = 0;\r
- \r
- };\r
- \r
-#else /* C style interface */\r
-\r
- typedef struct IPropertyDescriptionVtbl\r
- {\r
- BEGIN_INTERFACE\r
- \r
- HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r
- IPropertyDescription * This,\r
- /* [in] */ __RPC__in REFIID riid,\r
- /* [iid_is][out] */ \r
- __RPC__deref_out void **ppvObject);\r
- \r
- ULONG ( STDMETHODCALLTYPE *AddRef )( \r
- IPropertyDescription * This);\r
- \r
- ULONG ( STDMETHODCALLTYPE *Release )( \r
- IPropertyDescription * This);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetPropertyKey )( \r
- IPropertyDescription * This,\r
- /* [out] */ __RPC__out PROPERTYKEY *pkey);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetCanonicalName )( \r
- IPropertyDescription * This,\r
- /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszName);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetPropertyType )( \r
- IPropertyDescription * This,\r
- /* [out] */ __RPC__out VARTYPE *pvartype);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetDisplayName )( \r
- IPropertyDescription * This,\r
- /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszName);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetEditInvitation )( \r
- IPropertyDescription * This,\r
- /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszInvite);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetTypeFlags )( \r
- IPropertyDescription * This,\r
- /* [in] */ PROPDESC_TYPE_FLAGS mask,\r
- /* [out] */ __RPC__out PROPDESC_TYPE_FLAGS *ppdtFlags);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetViewFlags )( \r
- IPropertyDescription * This,\r
- /* [out] */ __RPC__out PROPDESC_VIEW_FLAGS *ppdvFlags);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetDefaultColumnWidth )( \r
- IPropertyDescription * This,\r
- /* [out] */ __RPC__out UINT *pcxChars);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetDisplayType )( \r
- IPropertyDescription * This,\r
- /* [out] */ __RPC__out PROPDESC_DISPLAYTYPE *pdisplaytype);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetColumnState )( \r
- IPropertyDescription * This,\r
- /* [out] */ __RPC__out SHCOLSTATEF *pcsFlags);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetGroupingRange )( \r
- IPropertyDescription * This,\r
- /* [out] */ __RPC__out PROPDESC_GROUPING_RANGE *pgr);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetRelativeDescriptionType )( \r
- IPropertyDescription * This,\r
- /* [out] */ __RPC__out PROPDESC_RELATIVEDESCRIPTION_TYPE *prdt);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetRelativeDescription )( \r
- IPropertyDescription * This,\r
- /* [in] */ __RPC__in REFPROPVARIANT propvar1,\r
- /* [in] */ __RPC__in REFPROPVARIANT propvar2,\r
- /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszDesc1,\r
- /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszDesc2);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetSortDescription )( \r
- IPropertyDescription * This,\r
- /* [out] */ __RPC__out PROPDESC_SORTDESCRIPTION *psd);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetSortDescriptionLabel )( \r
- IPropertyDescription * This,\r
- /* [in] */ BOOL fDescending,\r
- /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszDescription);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetAggregationType )( \r
- IPropertyDescription * This,\r
- /* [out] */ __RPC__out PROPDESC_AGGREGATION_TYPE *paggtype);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetConditionType )( \r
- IPropertyDescription * This,\r
- /* [out] */ __RPC__out PROPDESC_CONDITION_TYPE *pcontype,\r
- /* [out] */ __RPC__out CONDITION_OPERATION *popDefault);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetEnumTypeList )( \r
- IPropertyDescription * This,\r
- /* [in] */ __RPC__in REFIID riid,\r
- /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);\r
- \r
- /* [local] */ HRESULT ( STDMETHODCALLTYPE *CoerceToCanonicalValue )( \r
- IPropertyDescription * This,\r
- /* [out][in] */ PROPVARIANT *ppropvar);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *FormatForDisplay )( \r
- IPropertyDescription * This,\r
- /* [in] */ __RPC__in REFPROPVARIANT propvar,\r
- /* [in] */ PROPDESC_FORMAT_FLAGS pdfFlags,\r
- /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszDisplay);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *IsValueCanonical )( \r
- IPropertyDescription * This,\r
- /* [in] */ __RPC__in REFPROPVARIANT propvar);\r
- \r
- END_INTERFACE\r
- } IPropertyDescriptionVtbl;\r
-\r
- interface IPropertyDescription\r
- {\r
- CONST_VTBL struct IPropertyDescriptionVtbl *lpVtbl;\r
- };\r
-\r
- \r
-\r
-#ifdef COBJMACROS\r
-\r
-\r
-#define IPropertyDescription_QueryInterface(This,riid,ppvObject) \\r
- ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r
-\r
-#define IPropertyDescription_AddRef(This) \\r
- ( (This)->lpVtbl -> AddRef(This) ) \r
-\r
-#define IPropertyDescription_Release(This) \\r
- ( (This)->lpVtbl -> Release(This) ) \r
-\r
-\r
-#define IPropertyDescription_GetPropertyKey(This,pkey) \\r
- ( (This)->lpVtbl -> GetPropertyKey(This,pkey) ) \r
-\r
-#define IPropertyDescription_GetCanonicalName(This,ppszName) \\r
- ( (This)->lpVtbl -> GetCanonicalName(This,ppszName) ) \r
-\r
-#define IPropertyDescription_GetPropertyType(This,pvartype) \\r
- ( (This)->lpVtbl -> GetPropertyType(This,pvartype) ) \r
-\r
-#define IPropertyDescription_GetDisplayName(This,ppszName) \\r
- ( (This)->lpVtbl -> GetDisplayName(This,ppszName) ) \r
-\r
-#define IPropertyDescription_GetEditInvitation(This,ppszInvite) \\r
- ( (This)->lpVtbl -> GetEditInvitation(This,ppszInvite) ) \r
-\r
-#define IPropertyDescription_GetTypeFlags(This,mask,ppdtFlags) \\r
- ( (This)->lpVtbl -> GetTypeFlags(This,mask,ppdtFlags) ) \r
-\r
-#define IPropertyDescription_GetViewFlags(This,ppdvFlags) \\r
- ( (This)->lpVtbl -> GetViewFlags(This,ppdvFlags) ) \r
-\r
-#define IPropertyDescription_GetDefaultColumnWidth(This,pcxChars) \\r
- ( (This)->lpVtbl -> GetDefaultColumnWidth(This,pcxChars) ) \r
-\r
-#define IPropertyDescription_GetDisplayType(This,pdisplaytype) \\r
- ( (This)->lpVtbl -> GetDisplayType(This,pdisplaytype) ) \r
-\r
-#define IPropertyDescription_GetColumnState(This,pcsFlags) \\r
- ( (This)->lpVtbl -> GetColumnState(This,pcsFlags) ) \r
-\r
-#define IPropertyDescription_GetGroupingRange(This,pgr) \\r
- ( (This)->lpVtbl -> GetGroupingRange(This,pgr) ) \r
-\r
-#define IPropertyDescription_GetRelativeDescriptionType(This,prdt) \\r
- ( (This)->lpVtbl -> GetRelativeDescriptionType(This,prdt) ) \r
-\r
-#define IPropertyDescription_GetRelativeDescription(This,propvar1,propvar2,ppszDesc1,ppszDesc2) \\r
- ( (This)->lpVtbl -> GetRelativeDescription(This,propvar1,propvar2,ppszDesc1,ppszDesc2) ) \r
-\r
-#define IPropertyDescription_GetSortDescription(This,psd) \\r
- ( (This)->lpVtbl -> GetSortDescription(This,psd) ) \r
-\r
-#define IPropertyDescription_GetSortDescriptionLabel(This,fDescending,ppszDescription) \\r
- ( (This)->lpVtbl -> GetSortDescriptionLabel(This,fDescending,ppszDescription) ) \r
-\r
-#define IPropertyDescription_GetAggregationType(This,paggtype) \\r
- ( (This)->lpVtbl -> GetAggregationType(This,paggtype) ) \r
-\r
-#define IPropertyDescription_GetConditionType(This,pcontype,popDefault) \\r
- ( (This)->lpVtbl -> GetConditionType(This,pcontype,popDefault) ) \r
-\r
-#define IPropertyDescription_GetEnumTypeList(This,riid,ppv) \\r
- ( (This)->lpVtbl -> GetEnumTypeList(This,riid,ppv) ) \r
-\r
-#define IPropertyDescription_CoerceToCanonicalValue(This,ppropvar) \\r
- ( (This)->lpVtbl -> CoerceToCanonicalValue(This,ppropvar) ) \r
-\r
-#define IPropertyDescription_FormatForDisplay(This,propvar,pdfFlags,ppszDisplay) \\r
- ( (This)->lpVtbl -> FormatForDisplay(This,propvar,pdfFlags,ppszDisplay) ) \r
-\r
-#define IPropertyDescription_IsValueCanonical(This,propvar) \\r
- ( (This)->lpVtbl -> IsValueCanonical(This,propvar) ) \r
-\r
-#endif /* COBJMACROS */\r
-\r
-\r
-#endif /* C style interface */\r
-\r
-\r
-\r
-/* [call_as] */ HRESULT STDMETHODCALLTYPE IPropertyDescription_RemoteCoerceToCanonicalValue_Proxy( \r
- IPropertyDescription * This,\r
- /* [in] */ __RPC__in REFPROPVARIANT propvar,\r
- /* [out] */ __RPC__out PROPVARIANT *ppropvar);\r
-\r
-\r
-void __RPC_STUB IPropertyDescription_RemoteCoerceToCanonicalValue_Stub(\r
- IRpcStubBuffer *This,\r
- IRpcChannelBuffer *_pRpcChannelBuffer,\r
- PRPC_MESSAGE _pRpcMessage,\r
- DWORD *_pdwStubPhase);\r
-\r
-\r
-\r
-#endif /* __IPropertyDescription_INTERFACE_DEFINED__ */\r
-\r
-\r
-#ifndef __IPropertyDescriptionAliasInfo_INTERFACE_DEFINED__\r
-#define __IPropertyDescriptionAliasInfo_INTERFACE_DEFINED__\r
-\r
-/* interface IPropertyDescriptionAliasInfo */\r
-/* [unique][object][uuid] */ \r
-\r
-\r
-EXTERN_C const IID IID_IPropertyDescriptionAliasInfo;\r
-\r
-#if defined(__cplusplus) && !defined(CINTERFACE)\r
- \r
- MIDL_INTERFACE("f67104fc-2af9-46fd-b32d-243c1404f3d1")\r
- IPropertyDescriptionAliasInfo : public IPropertyDescription\r
- {\r
- public:\r
- virtual HRESULT STDMETHODCALLTYPE GetSortByAlias( \r
- /* [in] */ __RPC__in REFIID riid,\r
- /* [iid_is][out] */ __RPC__deref_out_opt void **ppv) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE GetAdditionalSortByAliases( \r
- /* [in] */ __RPC__in REFIID riid,\r
- /* [iid_is][out] */ __RPC__deref_out_opt void **ppv) = 0;\r
- \r
- };\r
- \r
-#else /* C style interface */\r
-\r
- typedef struct IPropertyDescriptionAliasInfoVtbl\r
- {\r
- BEGIN_INTERFACE\r
- \r
- HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r
- IPropertyDescriptionAliasInfo * This,\r
- /* [in] */ __RPC__in REFIID riid,\r
- /* [iid_is][out] */ \r
- __RPC__deref_out void **ppvObject);\r
- \r
- ULONG ( STDMETHODCALLTYPE *AddRef )( \r
- IPropertyDescriptionAliasInfo * This);\r
- \r
- ULONG ( STDMETHODCALLTYPE *Release )( \r
- IPropertyDescriptionAliasInfo * This);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetPropertyKey )( \r
- IPropertyDescriptionAliasInfo * This,\r
- /* [out] */ __RPC__out PROPERTYKEY *pkey);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetCanonicalName )( \r
- IPropertyDescriptionAliasInfo * This,\r
- /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszName);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetPropertyType )( \r
- IPropertyDescriptionAliasInfo * This,\r
- /* [out] */ __RPC__out VARTYPE *pvartype);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetDisplayName )( \r
- IPropertyDescriptionAliasInfo * This,\r
- /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszName);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetEditInvitation )( \r
- IPropertyDescriptionAliasInfo * This,\r
- /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszInvite);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetTypeFlags )( \r
- IPropertyDescriptionAliasInfo * This,\r
- /* [in] */ PROPDESC_TYPE_FLAGS mask,\r
- /* [out] */ __RPC__out PROPDESC_TYPE_FLAGS *ppdtFlags);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetViewFlags )( \r
- IPropertyDescriptionAliasInfo * This,\r
- /* [out] */ __RPC__out PROPDESC_VIEW_FLAGS *ppdvFlags);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetDefaultColumnWidth )( \r
- IPropertyDescriptionAliasInfo * This,\r
- /* [out] */ __RPC__out UINT *pcxChars);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetDisplayType )( \r
- IPropertyDescriptionAliasInfo * This,\r
- /* [out] */ __RPC__out PROPDESC_DISPLAYTYPE *pdisplaytype);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetColumnState )( \r
- IPropertyDescriptionAliasInfo * This,\r
- /* [out] */ __RPC__out SHCOLSTATEF *pcsFlags);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetGroupingRange )( \r
- IPropertyDescriptionAliasInfo * This,\r
- /* [out] */ __RPC__out PROPDESC_GROUPING_RANGE *pgr);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetRelativeDescriptionType )( \r
- IPropertyDescriptionAliasInfo * This,\r
- /* [out] */ __RPC__out PROPDESC_RELATIVEDESCRIPTION_TYPE *prdt);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetRelativeDescription )( \r
- IPropertyDescriptionAliasInfo * This,\r
- /* [in] */ __RPC__in REFPROPVARIANT propvar1,\r
- /* [in] */ __RPC__in REFPROPVARIANT propvar2,\r
- /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszDesc1,\r
- /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszDesc2);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetSortDescription )( \r
- IPropertyDescriptionAliasInfo * This,\r
- /* [out] */ __RPC__out PROPDESC_SORTDESCRIPTION *psd);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetSortDescriptionLabel )( \r
- IPropertyDescriptionAliasInfo * This,\r
- /* [in] */ BOOL fDescending,\r
- /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszDescription);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetAggregationType )( \r
- IPropertyDescriptionAliasInfo * This,\r
- /* [out] */ __RPC__out PROPDESC_AGGREGATION_TYPE *paggtype);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetConditionType )( \r
- IPropertyDescriptionAliasInfo * This,\r
- /* [out] */ __RPC__out PROPDESC_CONDITION_TYPE *pcontype,\r
- /* [out] */ __RPC__out CONDITION_OPERATION *popDefault);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetEnumTypeList )( \r
- IPropertyDescriptionAliasInfo * This,\r
- /* [in] */ __RPC__in REFIID riid,\r
- /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);\r
- \r
- /* [local] */ HRESULT ( STDMETHODCALLTYPE *CoerceToCanonicalValue )( \r
- IPropertyDescriptionAliasInfo * This,\r
- /* [out][in] */ PROPVARIANT *ppropvar);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *FormatForDisplay )( \r
- IPropertyDescriptionAliasInfo * This,\r
- /* [in] */ __RPC__in REFPROPVARIANT propvar,\r
- /* [in] */ PROPDESC_FORMAT_FLAGS pdfFlags,\r
- /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszDisplay);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *IsValueCanonical )( \r
- IPropertyDescriptionAliasInfo * This,\r
- /* [in] */ __RPC__in REFPROPVARIANT propvar);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetSortByAlias )( \r
- IPropertyDescriptionAliasInfo * This,\r
- /* [in] */ __RPC__in REFIID riid,\r
- /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetAdditionalSortByAliases )( \r
- IPropertyDescriptionAliasInfo * This,\r
- /* [in] */ __RPC__in REFIID riid,\r
- /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);\r
- \r
- END_INTERFACE\r
- } IPropertyDescriptionAliasInfoVtbl;\r
-\r
- interface IPropertyDescriptionAliasInfo\r
- {\r
- CONST_VTBL struct IPropertyDescriptionAliasInfoVtbl *lpVtbl;\r
- };\r
-\r
- \r
-\r
-#ifdef COBJMACROS\r
-\r
-\r
-#define IPropertyDescriptionAliasInfo_QueryInterface(This,riid,ppvObject) \\r
- ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r
-\r
-#define IPropertyDescriptionAliasInfo_AddRef(This) \\r
- ( (This)->lpVtbl -> AddRef(This) ) \r
-\r
-#define IPropertyDescriptionAliasInfo_Release(This) \\r
- ( (This)->lpVtbl -> Release(This) ) \r
-\r
-\r
-#define IPropertyDescriptionAliasInfo_GetPropertyKey(This,pkey) \\r
- ( (This)->lpVtbl -> GetPropertyKey(This,pkey) ) \r
-\r
-#define IPropertyDescriptionAliasInfo_GetCanonicalName(This,ppszName) \\r
- ( (This)->lpVtbl -> GetCanonicalName(This,ppszName) ) \r
-\r
-#define IPropertyDescriptionAliasInfo_GetPropertyType(This,pvartype) \\r
- ( (This)->lpVtbl -> GetPropertyType(This,pvartype) ) \r
-\r
-#define IPropertyDescriptionAliasInfo_GetDisplayName(This,ppszName) \\r
- ( (This)->lpVtbl -> GetDisplayName(This,ppszName) ) \r
-\r
-#define IPropertyDescriptionAliasInfo_GetEditInvitation(This,ppszInvite) \\r
- ( (This)->lpVtbl -> GetEditInvitation(This,ppszInvite) ) \r
-\r
-#define IPropertyDescriptionAliasInfo_GetTypeFlags(This,mask,ppdtFlags) \\r
- ( (This)->lpVtbl -> GetTypeFlags(This,mask,ppdtFlags) ) \r
-\r
-#define IPropertyDescriptionAliasInfo_GetViewFlags(This,ppdvFlags) \\r
- ( (This)->lpVtbl -> GetViewFlags(This,ppdvFlags) ) \r
-\r
-#define IPropertyDescriptionAliasInfo_GetDefaultColumnWidth(This,pcxChars) \\r
- ( (This)->lpVtbl -> GetDefaultColumnWidth(This,pcxChars) ) \r
-\r
-#define IPropertyDescriptionAliasInfo_GetDisplayType(This,pdisplaytype) \\r
- ( (This)->lpVtbl -> GetDisplayType(This,pdisplaytype) ) \r
-\r
-#define IPropertyDescriptionAliasInfo_GetColumnState(This,pcsFlags) \\r
- ( (This)->lpVtbl -> GetColumnState(This,pcsFlags) ) \r
-\r
-#define IPropertyDescriptionAliasInfo_GetGroupingRange(This,pgr) \\r
- ( (This)->lpVtbl -> GetGroupingRange(This,pgr) ) \r
-\r
-#define IPropertyDescriptionAliasInfo_GetRelativeDescriptionType(This,prdt) \\r
- ( (This)->lpVtbl -> GetRelativeDescriptionType(This,prdt) ) \r
-\r
-#define IPropertyDescriptionAliasInfo_GetRelativeDescription(This,propvar1,propvar2,ppszDesc1,ppszDesc2) \\r
- ( (This)->lpVtbl -> GetRelativeDescription(This,propvar1,propvar2,ppszDesc1,ppszDesc2) ) \r
-\r
-#define IPropertyDescriptionAliasInfo_GetSortDescription(This,psd) \\r
- ( (This)->lpVtbl -> GetSortDescription(This,psd) ) \r
-\r
-#define IPropertyDescriptionAliasInfo_GetSortDescriptionLabel(This,fDescending,ppszDescription) \\r
- ( (This)->lpVtbl -> GetSortDescriptionLabel(This,fDescending,ppszDescription) ) \r
-\r
-#define IPropertyDescriptionAliasInfo_GetAggregationType(This,paggtype) \\r
- ( (This)->lpVtbl -> GetAggregationType(This,paggtype) ) \r
-\r
-#define IPropertyDescriptionAliasInfo_GetConditionType(This,pcontype,popDefault) \\r
- ( (This)->lpVtbl -> GetConditionType(This,pcontype,popDefault) ) \r
-\r
-#define IPropertyDescriptionAliasInfo_GetEnumTypeList(This,riid,ppv) \\r
- ( (This)->lpVtbl -> GetEnumTypeList(This,riid,ppv) ) \r
-\r
-#define IPropertyDescriptionAliasInfo_CoerceToCanonicalValue(This,ppropvar) \\r
- ( (This)->lpVtbl -> CoerceToCanonicalValue(This,ppropvar) ) \r
-\r
-#define IPropertyDescriptionAliasInfo_FormatForDisplay(This,propvar,pdfFlags,ppszDisplay) \\r
- ( (This)->lpVtbl -> FormatForDisplay(This,propvar,pdfFlags,ppszDisplay) ) \r
-\r
-#define IPropertyDescriptionAliasInfo_IsValueCanonical(This,propvar) \\r
- ( (This)->lpVtbl -> IsValueCanonical(This,propvar) ) \r
-\r
-\r
-#define IPropertyDescriptionAliasInfo_GetSortByAlias(This,riid,ppv) \\r
- ( (This)->lpVtbl -> GetSortByAlias(This,riid,ppv) ) \r
-\r
-#define IPropertyDescriptionAliasInfo_GetAdditionalSortByAliases(This,riid,ppv) \\r
- ( (This)->lpVtbl -> GetAdditionalSortByAliases(This,riid,ppv) ) \r
-\r
-#endif /* COBJMACROS */\r
-\r
-\r
-#endif /* C style interface */\r
-\r
-\r
-\r
-\r
-#endif /* __IPropertyDescriptionAliasInfo_INTERFACE_DEFINED__ */\r
-\r
-\r
-#ifndef __IPropertyDescriptionSearchInfo_INTERFACE_DEFINED__\r
-#define __IPropertyDescriptionSearchInfo_INTERFACE_DEFINED__\r
-\r
-/* interface IPropertyDescriptionSearchInfo */\r
-/* [unique][object][uuid] */ \r
-\r
-/* [v1_enum] */ \r
-enum tagPROPDESC_SEARCHINFO_FLAGS\r
- { PDSIF_DEFAULT = 0,\r
- PDSIF_ININVERTEDINDEX = 0x1,\r
- PDSIF_ISCOLUMN = 0x2,\r
- PDSIF_ISCOLUMNSPARSE = 0x4\r
- } ;\r
-typedef int PROPDESC_SEARCHINFO_FLAGS;\r
-\r
-typedef /* [v1_enum] */ \r
-enum tagPROPDESC_COLUMNINDEX_TYPE\r
- { PDCIT_NONE = 0,\r
- PDCIT_ONDISK = 1,\r
- PDCIT_INMEMORY = 2\r
- } PROPDESC_COLUMNINDEX_TYPE;\r
-\r
-\r
-EXTERN_C const IID IID_IPropertyDescriptionSearchInfo;\r
-\r
-#if defined(__cplusplus) && !defined(CINTERFACE)\r
- \r
- MIDL_INTERFACE("078f91bd-29a2-440f-924e-46a291524520")\r
- IPropertyDescriptionSearchInfo : public IPropertyDescription\r
- {\r
- public:\r
- virtual HRESULT STDMETHODCALLTYPE GetSearchInfoFlags( \r
- /* [out] */ __RPC__out PROPDESC_SEARCHINFO_FLAGS *ppdsiFlags) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE GetColumnIndexType( \r
- /* [out] */ __RPC__out PROPDESC_COLUMNINDEX_TYPE *ppdciType) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE GetProjectionString( \r
- /* [out] */ __RPC__deref_out_opt LPWSTR *ppszProjection) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE GetMaxSize( \r
- /* [out] */ __RPC__out UINT *pcbMaxSize) = 0;\r
- \r
- };\r
- \r
-#else /* C style interface */\r
-\r
- typedef struct IPropertyDescriptionSearchInfoVtbl\r
- {\r
- BEGIN_INTERFACE\r
- \r
- HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r
- IPropertyDescriptionSearchInfo * This,\r
- /* [in] */ __RPC__in REFIID riid,\r
- /* [iid_is][out] */ \r
- __RPC__deref_out void **ppvObject);\r
- \r
- ULONG ( STDMETHODCALLTYPE *AddRef )( \r
- IPropertyDescriptionSearchInfo * This);\r
- \r
- ULONG ( STDMETHODCALLTYPE *Release )( \r
- IPropertyDescriptionSearchInfo * This);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetPropertyKey )( \r
- IPropertyDescriptionSearchInfo * This,\r
- /* [out] */ __RPC__out PROPERTYKEY *pkey);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetCanonicalName )( \r
- IPropertyDescriptionSearchInfo * This,\r
- /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszName);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetPropertyType )( \r
- IPropertyDescriptionSearchInfo * This,\r
- /* [out] */ __RPC__out VARTYPE *pvartype);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetDisplayName )( \r
- IPropertyDescriptionSearchInfo * This,\r
- /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszName);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetEditInvitation )( \r
- IPropertyDescriptionSearchInfo * This,\r
- /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszInvite);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetTypeFlags )( \r
- IPropertyDescriptionSearchInfo * This,\r
- /* [in] */ PROPDESC_TYPE_FLAGS mask,\r
- /* [out] */ __RPC__out PROPDESC_TYPE_FLAGS *ppdtFlags);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetViewFlags )( \r
- IPropertyDescriptionSearchInfo * This,\r
- /* [out] */ __RPC__out PROPDESC_VIEW_FLAGS *ppdvFlags);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetDefaultColumnWidth )( \r
- IPropertyDescriptionSearchInfo * This,\r
- /* [out] */ __RPC__out UINT *pcxChars);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetDisplayType )( \r
- IPropertyDescriptionSearchInfo * This,\r
- /* [out] */ __RPC__out PROPDESC_DISPLAYTYPE *pdisplaytype);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetColumnState )( \r
- IPropertyDescriptionSearchInfo * This,\r
- /* [out] */ __RPC__out SHCOLSTATEF *pcsFlags);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetGroupingRange )( \r
- IPropertyDescriptionSearchInfo * This,\r
- /* [out] */ __RPC__out PROPDESC_GROUPING_RANGE *pgr);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetRelativeDescriptionType )( \r
- IPropertyDescriptionSearchInfo * This,\r
- /* [out] */ __RPC__out PROPDESC_RELATIVEDESCRIPTION_TYPE *prdt);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetRelativeDescription )( \r
- IPropertyDescriptionSearchInfo * This,\r
- /* [in] */ __RPC__in REFPROPVARIANT propvar1,\r
- /* [in] */ __RPC__in REFPROPVARIANT propvar2,\r
- /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszDesc1,\r
- /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszDesc2);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetSortDescription )( \r
- IPropertyDescriptionSearchInfo * This,\r
- /* [out] */ __RPC__out PROPDESC_SORTDESCRIPTION *psd);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetSortDescriptionLabel )( \r
- IPropertyDescriptionSearchInfo * This,\r
- /* [in] */ BOOL fDescending,\r
- /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszDescription);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetAggregationType )( \r
- IPropertyDescriptionSearchInfo * This,\r
- /* [out] */ __RPC__out PROPDESC_AGGREGATION_TYPE *paggtype);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetConditionType )( \r
- IPropertyDescriptionSearchInfo * This,\r
- /* [out] */ __RPC__out PROPDESC_CONDITION_TYPE *pcontype,\r
- /* [out] */ __RPC__out CONDITION_OPERATION *popDefault);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetEnumTypeList )( \r
- IPropertyDescriptionSearchInfo * This,\r
- /* [in] */ __RPC__in REFIID riid,\r
- /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);\r
- \r
- /* [local] */ HRESULT ( STDMETHODCALLTYPE *CoerceToCanonicalValue )( \r
- IPropertyDescriptionSearchInfo * This,\r
- /* [out][in] */ PROPVARIANT *ppropvar);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *FormatForDisplay )( \r
- IPropertyDescriptionSearchInfo * This,\r
- /* [in] */ __RPC__in REFPROPVARIANT propvar,\r
- /* [in] */ PROPDESC_FORMAT_FLAGS pdfFlags,\r
- /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszDisplay);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *IsValueCanonical )( \r
- IPropertyDescriptionSearchInfo * This,\r
- /* [in] */ __RPC__in REFPROPVARIANT propvar);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetSearchInfoFlags )( \r
- IPropertyDescriptionSearchInfo * This,\r
- /* [out] */ __RPC__out PROPDESC_SEARCHINFO_FLAGS *ppdsiFlags);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetColumnIndexType )( \r
- IPropertyDescriptionSearchInfo * This,\r
- /* [out] */ __RPC__out PROPDESC_COLUMNINDEX_TYPE *ppdciType);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetProjectionString )( \r
- IPropertyDescriptionSearchInfo * This,\r
- /* [out] */ __RPC__deref_out_opt LPWSTR *ppszProjection);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetMaxSize )( \r
- IPropertyDescriptionSearchInfo * This,\r
- /* [out] */ __RPC__out UINT *pcbMaxSize);\r
- \r
- END_INTERFACE\r
- } IPropertyDescriptionSearchInfoVtbl;\r
-\r
- interface IPropertyDescriptionSearchInfo\r
- {\r
- CONST_VTBL struct IPropertyDescriptionSearchInfoVtbl *lpVtbl;\r
- };\r
-\r
- \r
-\r
-#ifdef COBJMACROS\r
-\r
-\r
-#define IPropertyDescriptionSearchInfo_QueryInterface(This,riid,ppvObject) \\r
- ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r
-\r
-#define IPropertyDescriptionSearchInfo_AddRef(This) \\r
- ( (This)->lpVtbl -> AddRef(This) ) \r
-\r
-#define IPropertyDescriptionSearchInfo_Release(This) \\r
- ( (This)->lpVtbl -> Release(This) ) \r
-\r
-\r
-#define IPropertyDescriptionSearchInfo_GetPropertyKey(This,pkey) \\r
- ( (This)->lpVtbl -> GetPropertyKey(This,pkey) ) \r
-\r
-#define IPropertyDescriptionSearchInfo_GetCanonicalName(This,ppszName) \\r
- ( (This)->lpVtbl -> GetCanonicalName(This,ppszName) ) \r
-\r
-#define IPropertyDescriptionSearchInfo_GetPropertyType(This,pvartype) \\r
- ( (This)->lpVtbl -> GetPropertyType(This,pvartype) ) \r
-\r
-#define IPropertyDescriptionSearchInfo_GetDisplayName(This,ppszName) \\r
- ( (This)->lpVtbl -> GetDisplayName(This,ppszName) ) \r
-\r
-#define IPropertyDescriptionSearchInfo_GetEditInvitation(This,ppszInvite) \\r
- ( (This)->lpVtbl -> GetEditInvitation(This,ppszInvite) ) \r
-\r
-#define IPropertyDescriptionSearchInfo_GetTypeFlags(This,mask,ppdtFlags) \\r
- ( (This)->lpVtbl -> GetTypeFlags(This,mask,ppdtFlags) ) \r
-\r
-#define IPropertyDescriptionSearchInfo_GetViewFlags(This,ppdvFlags) \\r
- ( (This)->lpVtbl -> GetViewFlags(This,ppdvFlags) ) \r
-\r
-#define IPropertyDescriptionSearchInfo_GetDefaultColumnWidth(This,pcxChars) \\r
- ( (This)->lpVtbl -> GetDefaultColumnWidth(This,pcxChars) ) \r
-\r
-#define IPropertyDescriptionSearchInfo_GetDisplayType(This,pdisplaytype) \\r
- ( (This)->lpVtbl -> GetDisplayType(This,pdisplaytype) ) \r
-\r
-#define IPropertyDescriptionSearchInfo_GetColumnState(This,pcsFlags) \\r
- ( (This)->lpVtbl -> GetColumnState(This,pcsFlags) ) \r
-\r
-#define IPropertyDescriptionSearchInfo_GetGroupingRange(This,pgr) \\r
- ( (This)->lpVtbl -> GetGroupingRange(This,pgr) ) \r
-\r
-#define IPropertyDescriptionSearchInfo_GetRelativeDescriptionType(This,prdt) \\r
- ( (This)->lpVtbl -> GetRelativeDescriptionType(This,prdt) ) \r
-\r
-#define IPropertyDescriptionSearchInfo_GetRelativeDescription(This,propvar1,propvar2,ppszDesc1,ppszDesc2) \\r
- ( (This)->lpVtbl -> GetRelativeDescription(This,propvar1,propvar2,ppszDesc1,ppszDesc2) ) \r
-\r
-#define IPropertyDescriptionSearchInfo_GetSortDescription(This,psd) \\r
- ( (This)->lpVtbl -> GetSortDescription(This,psd) ) \r
-\r
-#define IPropertyDescriptionSearchInfo_GetSortDescriptionLabel(This,fDescending,ppszDescription) \\r
- ( (This)->lpVtbl -> GetSortDescriptionLabel(This,fDescending,ppszDescription) ) \r
-\r
-#define IPropertyDescriptionSearchInfo_GetAggregationType(This,paggtype) \\r
- ( (This)->lpVtbl -> GetAggregationType(This,paggtype) ) \r
-\r
-#define IPropertyDescriptionSearchInfo_GetConditionType(This,pcontype,popDefault) \\r
- ( (This)->lpVtbl -> GetConditionType(This,pcontype,popDefault) ) \r
-\r
-#define IPropertyDescriptionSearchInfo_GetEnumTypeList(This,riid,ppv) \\r
- ( (This)->lpVtbl -> GetEnumTypeList(This,riid,ppv) ) \r
-\r
-#define IPropertyDescriptionSearchInfo_CoerceToCanonicalValue(This,ppropvar) \\r
- ( (This)->lpVtbl -> CoerceToCanonicalValue(This,ppropvar) ) \r
-\r
-#define IPropertyDescriptionSearchInfo_FormatForDisplay(This,propvar,pdfFlags,ppszDisplay) \\r
- ( (This)->lpVtbl -> FormatForDisplay(This,propvar,pdfFlags,ppszDisplay) ) \r
-\r
-#define IPropertyDescriptionSearchInfo_IsValueCanonical(This,propvar) \\r
- ( (This)->lpVtbl -> IsValueCanonical(This,propvar) ) \r
-\r
-\r
-#define IPropertyDescriptionSearchInfo_GetSearchInfoFlags(This,ppdsiFlags) \\r
- ( (This)->lpVtbl -> GetSearchInfoFlags(This,ppdsiFlags) ) \r
-\r
-#define IPropertyDescriptionSearchInfo_GetColumnIndexType(This,ppdciType) \\r
- ( (This)->lpVtbl -> GetColumnIndexType(This,ppdciType) ) \r
-\r
-#define IPropertyDescriptionSearchInfo_GetProjectionString(This,ppszProjection) \\r
- ( (This)->lpVtbl -> GetProjectionString(This,ppszProjection) ) \r
-\r
-#define IPropertyDescriptionSearchInfo_GetMaxSize(This,pcbMaxSize) \\r
- ( (This)->lpVtbl -> GetMaxSize(This,pcbMaxSize) ) \r
-\r
-#endif /* COBJMACROS */\r
-\r
-\r
-#endif /* C style interface */\r
-\r
-\r
-\r
-\r
-#endif /* __IPropertyDescriptionSearchInfo_INTERFACE_DEFINED__ */\r
-\r
-\r
-/* interface __MIDL_itf_propsys_0000_0014 */\r
-/* [local] */ \r
-\r
-/* [v1_enum] */ \r
-enum tagPROPDESC_ENUMFILTER\r
- { PDEF_ALL = 0,\r
- PDEF_SYSTEM = 1,\r
- PDEF_NONSYSTEM = 2,\r
- PDEF_VIEWABLE = 3,\r
- PDEF_QUERYABLE = 4,\r
- PDEF_INFULLTEXTQUERY = 5,\r
- PDEF_COLUMN = 6\r
- } ;\r
-typedef enum tagPROPDESC_ENUMFILTER PROPDESC_ENUMFILTER;\r
-\r
-\r
-\r
-extern RPC_IF_HANDLE __MIDL_itf_propsys_0000_0014_v0_0_c_ifspec;\r
-extern RPC_IF_HANDLE __MIDL_itf_propsys_0000_0014_v0_0_s_ifspec;\r
-\r
-#ifndef __IPropertySystem_INTERFACE_DEFINED__\r
-#define __IPropertySystem_INTERFACE_DEFINED__\r
-\r
-/* interface IPropertySystem */\r
-/* [unique][object][uuid] */ \r
-\r
-\r
-EXTERN_C const IID IID_IPropertySystem;\r
-\r
-#if defined(__cplusplus) && !defined(CINTERFACE)\r
- \r
- MIDL_INTERFACE("ca724e8a-c3e6-442b-88a4-6fb0db8035a3")\r
- IPropertySystem : public IUnknown\r
- {\r
- public:\r
- virtual HRESULT STDMETHODCALLTYPE GetPropertyDescription( \r
- /* [in] */ __RPC__in REFPROPERTYKEY propkey,\r
- /* [in] */ __RPC__in REFIID riid,\r
- /* [iid_is][out] */ __RPC__deref_out_opt void **ppv) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE GetPropertyDescriptionByName( \r
- /* [string][in] */ __RPC__in LPCWSTR pszCanonicalName,\r
- /* [in] */ __RPC__in REFIID riid,\r
- /* [iid_is][out] */ __RPC__deref_out_opt void **ppv) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE GetPropertyDescriptionListFromString( \r
- /* [string][in] */ __RPC__in LPCWSTR pszPropList,\r
- /* [in] */ __RPC__in REFIID riid,\r
- /* [iid_is][out] */ __RPC__deref_out_opt void **ppv) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE EnumeratePropertyDescriptions( \r
- /* [in] */ PROPDESC_ENUMFILTER filterOn,\r
- /* [in] */ __RPC__in REFIID riid,\r
- /* [iid_is][out] */ __RPC__deref_out_opt void **ppv) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE FormatForDisplay( \r
- /* [in] */ __RPC__in REFPROPERTYKEY key,\r
- /* [in] */ __RPC__in REFPROPVARIANT propvar,\r
- /* [in] */ PROPDESC_FORMAT_FLAGS pdff,\r
- /* [size_is][string][out] */ __RPC__out_ecount_full_string(cchText) LPWSTR pszText,\r
- /* [in] */ DWORD cchText) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE FormatForDisplayAlloc( \r
- /* [in] */ __RPC__in REFPROPERTYKEY key,\r
- /* [in] */ __RPC__in REFPROPVARIANT propvar,\r
- /* [in] */ PROPDESC_FORMAT_FLAGS pdff,\r
- /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszDisplay) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE RegisterPropertySchema( \r
- /* [string][in] */ __RPC__in LPCWSTR pszPath) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE UnregisterPropertySchema( \r
- /* [string][in] */ __RPC__in LPCWSTR pszPath) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE RefreshPropertySchema( void) = 0;\r
- \r
- };\r
- \r
-#else /* C style interface */\r
-\r
- typedef struct IPropertySystemVtbl\r
- {\r
- BEGIN_INTERFACE\r
- \r
- HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r
- IPropertySystem * This,\r
- /* [in] */ __RPC__in REFIID riid,\r
- /* [iid_is][out] */ \r
- __RPC__deref_out void **ppvObject);\r
- \r
- ULONG ( STDMETHODCALLTYPE *AddRef )( \r
- IPropertySystem * This);\r
- \r
- ULONG ( STDMETHODCALLTYPE *Release )( \r
- IPropertySystem * This);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetPropertyDescription )( \r
- IPropertySystem * This,\r
- /* [in] */ __RPC__in REFPROPERTYKEY propkey,\r
- /* [in] */ __RPC__in REFIID riid,\r
- /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetPropertyDescriptionByName )( \r
- IPropertySystem * This,\r
- /* [string][in] */ __RPC__in LPCWSTR pszCanonicalName,\r
- /* [in] */ __RPC__in REFIID riid,\r
- /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetPropertyDescriptionListFromString )( \r
- IPropertySystem * This,\r
- /* [string][in] */ __RPC__in LPCWSTR pszPropList,\r
- /* [in] */ __RPC__in REFIID riid,\r
- /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *EnumeratePropertyDescriptions )( \r
- IPropertySystem * This,\r
- /* [in] */ PROPDESC_ENUMFILTER filterOn,\r
- /* [in] */ __RPC__in REFIID riid,\r
- /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *FormatForDisplay )( \r
- IPropertySystem * This,\r
- /* [in] */ __RPC__in REFPROPERTYKEY key,\r
- /* [in] */ __RPC__in REFPROPVARIANT propvar,\r
- /* [in] */ PROPDESC_FORMAT_FLAGS pdff,\r
- /* [size_is][string][out] */ __RPC__out_ecount_full_string(cchText) LPWSTR pszText,\r
- /* [in] */ DWORD cchText);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *FormatForDisplayAlloc )( \r
- IPropertySystem * This,\r
- /* [in] */ __RPC__in REFPROPERTYKEY key,\r
- /* [in] */ __RPC__in REFPROPVARIANT propvar,\r
- /* [in] */ PROPDESC_FORMAT_FLAGS pdff,\r
- /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszDisplay);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *RegisterPropertySchema )( \r
- IPropertySystem * This,\r
- /* [string][in] */ __RPC__in LPCWSTR pszPath);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *UnregisterPropertySchema )( \r
- IPropertySystem * This,\r
- /* [string][in] */ __RPC__in LPCWSTR pszPath);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *RefreshPropertySchema )( \r
- IPropertySystem * This);\r
- \r
- END_INTERFACE\r
- } IPropertySystemVtbl;\r
-\r
- interface IPropertySystem\r
- {\r
- CONST_VTBL struct IPropertySystemVtbl *lpVtbl;\r
- };\r
-\r
- \r
-\r
-#ifdef COBJMACROS\r
-\r
-\r
-#define IPropertySystem_QueryInterface(This,riid,ppvObject) \\r
- ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r
-\r
-#define IPropertySystem_AddRef(This) \\r
- ( (This)->lpVtbl -> AddRef(This) ) \r
-\r
-#define IPropertySystem_Release(This) \\r
- ( (This)->lpVtbl -> Release(This) ) \r
-\r
-\r
-#define IPropertySystem_GetPropertyDescription(This,propkey,riid,ppv) \\r
- ( (This)->lpVtbl -> GetPropertyDescription(This,propkey,riid,ppv) ) \r
-\r
-#define IPropertySystem_GetPropertyDescriptionByName(This,pszCanonicalName,riid,ppv) \\r
- ( (This)->lpVtbl -> GetPropertyDescriptionByName(This,pszCanonicalName,riid,ppv) ) \r
-\r
-#define IPropertySystem_GetPropertyDescriptionListFromString(This,pszPropList,riid,ppv) \\r
- ( (This)->lpVtbl -> GetPropertyDescriptionListFromString(This,pszPropList,riid,ppv) ) \r
-\r
-#define IPropertySystem_EnumeratePropertyDescriptions(This,filterOn,riid,ppv) \\r
- ( (This)->lpVtbl -> EnumeratePropertyDescriptions(This,filterOn,riid,ppv) ) \r
-\r
-#define IPropertySystem_FormatForDisplay(This,key,propvar,pdff,pszText,cchText) \\r
- ( (This)->lpVtbl -> FormatForDisplay(This,key,propvar,pdff,pszText,cchText) ) \r
-\r
-#define IPropertySystem_FormatForDisplayAlloc(This,key,propvar,pdff,ppszDisplay) \\r
- ( (This)->lpVtbl -> FormatForDisplayAlloc(This,key,propvar,pdff,ppszDisplay) ) \r
-\r
-#define IPropertySystem_RegisterPropertySchema(This,pszPath) \\r
- ( (This)->lpVtbl -> RegisterPropertySchema(This,pszPath) ) \r
-\r
-#define IPropertySystem_UnregisterPropertySchema(This,pszPath) \\r
- ( (This)->lpVtbl -> UnregisterPropertySchema(This,pszPath) ) \r
-\r
-#define IPropertySystem_RefreshPropertySchema(This) \\r
- ( (This)->lpVtbl -> RefreshPropertySchema(This) ) \r
-\r
-#endif /* COBJMACROS */\r
-\r
-\r
-#endif /* C style interface */\r
-\r
-\r
-\r
-\r
-#endif /* __IPropertySystem_INTERFACE_DEFINED__ */\r
-\r
-\r
-#ifndef __IPropertyDescriptionList_INTERFACE_DEFINED__\r
-#define __IPropertyDescriptionList_INTERFACE_DEFINED__\r
-\r
-/* interface IPropertyDescriptionList */\r
-/* [unique][object][uuid] */ \r
-\r
-\r
-EXTERN_C const IID IID_IPropertyDescriptionList;\r
-\r
-#if defined(__cplusplus) && !defined(CINTERFACE)\r
- \r
- MIDL_INTERFACE("1f9fc1d0-c39b-4b26-817f-011967d3440e")\r
- IPropertyDescriptionList : public IUnknown\r
- {\r
- public:\r
- virtual HRESULT STDMETHODCALLTYPE GetCount( \r
- /* [out] */ __RPC__out UINT *pcElem) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE GetAt( \r
- /* [in] */ UINT iElem,\r
- /* [in] */ __RPC__in REFIID riid,\r
- /* [iid_is][out] */ __RPC__deref_out_opt void **ppv) = 0;\r
- \r
- };\r
- \r
-#else /* C style interface */\r
-\r
- typedef struct IPropertyDescriptionListVtbl\r
- {\r
- BEGIN_INTERFACE\r
- \r
- HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r
- IPropertyDescriptionList * This,\r
- /* [in] */ __RPC__in REFIID riid,\r
- /* [iid_is][out] */ \r
- __RPC__deref_out void **ppvObject);\r
- \r
- ULONG ( STDMETHODCALLTYPE *AddRef )( \r
- IPropertyDescriptionList * This);\r
- \r
- ULONG ( STDMETHODCALLTYPE *Release )( \r
- IPropertyDescriptionList * This);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetCount )( \r
- IPropertyDescriptionList * This,\r
- /* [out] */ __RPC__out UINT *pcElem);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetAt )( \r
- IPropertyDescriptionList * This,\r
- /* [in] */ UINT iElem,\r
- /* [in] */ __RPC__in REFIID riid,\r
- /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);\r
- \r
- END_INTERFACE\r
- } IPropertyDescriptionListVtbl;\r
-\r
- interface IPropertyDescriptionList\r
- {\r
- CONST_VTBL struct IPropertyDescriptionListVtbl *lpVtbl;\r
- };\r
-\r
- \r
-\r
-#ifdef COBJMACROS\r
-\r
-\r
-#define IPropertyDescriptionList_QueryInterface(This,riid,ppvObject) \\r
- ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r
-\r
-#define IPropertyDescriptionList_AddRef(This) \\r
- ( (This)->lpVtbl -> AddRef(This) ) \r
-\r
-#define IPropertyDescriptionList_Release(This) \\r
- ( (This)->lpVtbl -> Release(This) ) \r
-\r
-\r
-#define IPropertyDescriptionList_GetCount(This,pcElem) \\r
- ( (This)->lpVtbl -> GetCount(This,pcElem) ) \r
-\r
-#define IPropertyDescriptionList_GetAt(This,iElem,riid,ppv) \\r
- ( (This)->lpVtbl -> GetAt(This,iElem,riid,ppv) ) \r
-\r
-#endif /* COBJMACROS */\r
-\r
-\r
-#endif /* C style interface */\r
-\r
-\r
-\r
-\r
-#endif /* __IPropertyDescriptionList_INTERFACE_DEFINED__ */\r
-\r
-\r
-#ifndef __IPropertyStoreFactory_INTERFACE_DEFINED__\r
-#define __IPropertyStoreFactory_INTERFACE_DEFINED__\r
-\r
-/* interface IPropertyStoreFactory */\r
-/* [unique][object][uuid] */ \r
-\r
-\r
-EXTERN_C const IID IID_IPropertyStoreFactory;\r
-\r
-#if defined(__cplusplus) && !defined(CINTERFACE)\r
- \r
- MIDL_INTERFACE("bc110b6d-57e8-4148-a9c6-91015ab2f3a5")\r
- IPropertyStoreFactory : public IUnknown\r
- {\r
- public:\r
- virtual HRESULT STDMETHODCALLTYPE GetPropertyStore( \r
- /* [in] */ GETPROPERTYSTOREFLAGS flags,\r
- /* [unique][in] */ __RPC__in_opt IUnknown *pUnkFactory,\r
- /* [in] */ __RPC__in REFIID riid,\r
- /* [iid_is][out] */ __RPC__deref_out_opt void **ppv) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE GetPropertyStoreForKeys( \r
- /* [unique][in] */ __RPC__in_opt const PROPERTYKEY *rgKeys,\r
- /* [in] */ UINT cKeys,\r
- /* [in] */ GETPROPERTYSTOREFLAGS flags,\r
- /* [in] */ __RPC__in REFIID riid,\r
- /* [iid_is][out] */ __RPC__deref_out_opt void **ppv) = 0;\r
- \r
- };\r
- \r
-#else /* C style interface */\r
-\r
- typedef struct IPropertyStoreFactoryVtbl\r
- {\r
- BEGIN_INTERFACE\r
- \r
- HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r
- IPropertyStoreFactory * This,\r
- /* [in] */ __RPC__in REFIID riid,\r
- /* [iid_is][out] */ \r
- __RPC__deref_out void **ppvObject);\r
- \r
- ULONG ( STDMETHODCALLTYPE *AddRef )( \r
- IPropertyStoreFactory * This);\r
- \r
- ULONG ( STDMETHODCALLTYPE *Release )( \r
- IPropertyStoreFactory * This);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetPropertyStore )( \r
- IPropertyStoreFactory * This,\r
- /* [in] */ GETPROPERTYSTOREFLAGS flags,\r
- /* [unique][in] */ __RPC__in_opt IUnknown *pUnkFactory,\r
- /* [in] */ __RPC__in REFIID riid,\r
- /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetPropertyStoreForKeys )( \r
- IPropertyStoreFactory * This,\r
- /* [unique][in] */ __RPC__in_opt const PROPERTYKEY *rgKeys,\r
- /* [in] */ UINT cKeys,\r
- /* [in] */ GETPROPERTYSTOREFLAGS flags,\r
- /* [in] */ __RPC__in REFIID riid,\r
- /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);\r
- \r
- END_INTERFACE\r
- } IPropertyStoreFactoryVtbl;\r
-\r
- interface IPropertyStoreFactory\r
- {\r
- CONST_VTBL struct IPropertyStoreFactoryVtbl *lpVtbl;\r
- };\r
-\r
- \r
-\r
-#ifdef COBJMACROS\r
-\r
-\r
-#define IPropertyStoreFactory_QueryInterface(This,riid,ppvObject) \\r
- ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r
-\r
-#define IPropertyStoreFactory_AddRef(This) \\r
- ( (This)->lpVtbl -> AddRef(This) ) \r
-\r
-#define IPropertyStoreFactory_Release(This) \\r
- ( (This)->lpVtbl -> Release(This) ) \r
-\r
-\r
-#define IPropertyStoreFactory_GetPropertyStore(This,flags,pUnkFactory,riid,ppv) \\r
- ( (This)->lpVtbl -> GetPropertyStore(This,flags,pUnkFactory,riid,ppv) ) \r
-\r
-#define IPropertyStoreFactory_GetPropertyStoreForKeys(This,rgKeys,cKeys,flags,riid,ppv) \\r
- ( (This)->lpVtbl -> GetPropertyStoreForKeys(This,rgKeys,cKeys,flags,riid,ppv) ) \r
-\r
-#endif /* COBJMACROS */\r
-\r
-\r
-#endif /* C style interface */\r
-\r
-\r
-\r
-\r
-#endif /* __IPropertyStoreFactory_INTERFACE_DEFINED__ */\r
-\r
-\r
-#ifndef __IDelayedPropertyStoreFactory_INTERFACE_DEFINED__\r
-#define __IDelayedPropertyStoreFactory_INTERFACE_DEFINED__\r
-\r
-/* interface IDelayedPropertyStoreFactory */\r
-/* [unique][object][uuid] */ \r
-\r
-\r
-EXTERN_C const IID IID_IDelayedPropertyStoreFactory;\r
-\r
-#if defined(__cplusplus) && !defined(CINTERFACE)\r
- \r
- MIDL_INTERFACE("40d4577f-e237-4bdb-bd69-58f089431b6a")\r
- IDelayedPropertyStoreFactory : public IPropertyStoreFactory\r
- {\r
- public:\r
- virtual HRESULT STDMETHODCALLTYPE GetDelayedPropertyStore( \r
- /* [in] */ GETPROPERTYSTOREFLAGS flags,\r
- /* [in] */ DWORD dwStoreId,\r
- /* [in] */ __RPC__in REFIID riid,\r
- /* [iid_is][out] */ __RPC__deref_out_opt void **ppv) = 0;\r
- \r
- };\r
- \r
-#else /* C style interface */\r
-\r
- typedef struct IDelayedPropertyStoreFactoryVtbl\r
- {\r
- BEGIN_INTERFACE\r
- \r
- HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r
- IDelayedPropertyStoreFactory * This,\r
- /* [in] */ __RPC__in REFIID riid,\r
- /* [iid_is][out] */ \r
- __RPC__deref_out void **ppvObject);\r
- \r
- ULONG ( STDMETHODCALLTYPE *AddRef )( \r
- IDelayedPropertyStoreFactory * This);\r
- \r
- ULONG ( STDMETHODCALLTYPE *Release )( \r
- IDelayedPropertyStoreFactory * This);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetPropertyStore )( \r
- IDelayedPropertyStoreFactory * This,\r
- /* [in] */ GETPROPERTYSTOREFLAGS flags,\r
- /* [unique][in] */ __RPC__in_opt IUnknown *pUnkFactory,\r
- /* [in] */ __RPC__in REFIID riid,\r
- /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetPropertyStoreForKeys )( \r
- IDelayedPropertyStoreFactory * This,\r
- /* [unique][in] */ __RPC__in_opt const PROPERTYKEY *rgKeys,\r
- /* [in] */ UINT cKeys,\r
- /* [in] */ GETPROPERTYSTOREFLAGS flags,\r
- /* [in] */ __RPC__in REFIID riid,\r
- /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetDelayedPropertyStore )( \r
- IDelayedPropertyStoreFactory * This,\r
- /* [in] */ GETPROPERTYSTOREFLAGS flags,\r
- /* [in] */ DWORD dwStoreId,\r
- /* [in] */ __RPC__in REFIID riid,\r
- /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);\r
- \r
- END_INTERFACE\r
- } IDelayedPropertyStoreFactoryVtbl;\r
-\r
- interface IDelayedPropertyStoreFactory\r
- {\r
- CONST_VTBL struct IDelayedPropertyStoreFactoryVtbl *lpVtbl;\r
- };\r
-\r
- \r
-\r
-#ifdef COBJMACROS\r
-\r
-\r
-#define IDelayedPropertyStoreFactory_QueryInterface(This,riid,ppvObject) \\r
- ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r
-\r
-#define IDelayedPropertyStoreFactory_AddRef(This) \\r
- ( (This)->lpVtbl -> AddRef(This) ) \r
-\r
-#define IDelayedPropertyStoreFactory_Release(This) \\r
- ( (This)->lpVtbl -> Release(This) ) \r
-\r
-\r
-#define IDelayedPropertyStoreFactory_GetPropertyStore(This,flags,pUnkFactory,riid,ppv) \\r
- ( (This)->lpVtbl -> GetPropertyStore(This,flags,pUnkFactory,riid,ppv) ) \r
-\r
-#define IDelayedPropertyStoreFactory_GetPropertyStoreForKeys(This,rgKeys,cKeys,flags,riid,ppv) \\r
- ( (This)->lpVtbl -> GetPropertyStoreForKeys(This,rgKeys,cKeys,flags,riid,ppv) ) \r
-\r
-\r
-#define IDelayedPropertyStoreFactory_GetDelayedPropertyStore(This,flags,dwStoreId,riid,ppv) \\r
- ( (This)->lpVtbl -> GetDelayedPropertyStore(This,flags,dwStoreId,riid,ppv) ) \r
-\r
-#endif /* COBJMACROS */\r
-\r
-\r
-#endif /* C style interface */\r
-\r
-\r
-\r
-\r
-#endif /* __IDelayedPropertyStoreFactory_INTERFACE_DEFINED__ */\r
-\r
-\r
-/* interface __MIDL_itf_propsys_0000_0018 */\r
-/* [local] */ \r
-\r
-/* [v1_enum] */ \r
-enum tagPERSIST_SPROPSTORE_FLAGS\r
- { FPSPS_READONLY = 0x1\r
- } ;\r
-typedef int PERSIST_SPROPSTORE_FLAGS;\r
-\r
-typedef struct tagSERIALIZEDPROPSTORAGE SERIALIZEDPROPSTORAGE;\r
-\r
-typedef SERIALIZEDPROPSTORAGE __unaligned *PUSERIALIZEDPROPSTORAGE;\r
-\r
-typedef const SERIALIZEDPROPSTORAGE __unaligned *PCUSERIALIZEDPROPSTORAGE;\r
-\r
-\r
-\r
-extern RPC_IF_HANDLE __MIDL_itf_propsys_0000_0018_v0_0_c_ifspec;\r
-extern RPC_IF_HANDLE __MIDL_itf_propsys_0000_0018_v0_0_s_ifspec;\r
-\r
-#ifndef __IPersistSerializedPropStorage_INTERFACE_DEFINED__\r
-#define __IPersistSerializedPropStorage_INTERFACE_DEFINED__\r
-\r
-/* interface IPersistSerializedPropStorage */\r
-/* [object][local][unique][uuid] */ \r
-\r
-\r
-EXTERN_C const IID IID_IPersistSerializedPropStorage;\r
-\r
-#if defined(__cplusplus) && !defined(CINTERFACE)\r
- \r
- MIDL_INTERFACE("e318ad57-0aa0-450f-aca5-6fab7103d917")\r
- IPersistSerializedPropStorage : public IUnknown\r
- {\r
- public:\r
- virtual HRESULT STDMETHODCALLTYPE SetFlags( \r
- /* [in] */ PERSIST_SPROPSTORE_FLAGS flags) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE SetPropertyStorage( \r
- /* [in] */ \r
- __in_bcount(cb) PCUSERIALIZEDPROPSTORAGE psps,\r
- /* [in] */ \r
- __in DWORD cb) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE GetPropertyStorage( \r
- /* [out] */ \r
- __deref_out_bcount(*pcb) SERIALIZEDPROPSTORAGE **ppsps,\r
- /* [out] */ \r
- __out DWORD *pcb) = 0;\r
- \r
- };\r
- \r
-#else /* C style interface */\r
-\r
- typedef struct IPersistSerializedPropStorageVtbl\r
- {\r
- BEGIN_INTERFACE\r
- \r
- HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r
- IPersistSerializedPropStorage * This,\r
- /* [in] */ REFIID riid,\r
- /* [iid_is][out] */ \r
- __RPC__deref_out void **ppvObject);\r
- \r
- ULONG ( STDMETHODCALLTYPE *AddRef )( \r
- IPersistSerializedPropStorage * This);\r
- \r
- ULONG ( STDMETHODCALLTYPE *Release )( \r
- IPersistSerializedPropStorage * This);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *SetFlags )( \r
- IPersistSerializedPropStorage * This,\r
- /* [in] */ PERSIST_SPROPSTORE_FLAGS flags);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *SetPropertyStorage )( \r
- IPersistSerializedPropStorage * This,\r
- /* [in] */ \r
- __in_bcount(cb) PCUSERIALIZEDPROPSTORAGE psps,\r
- /* [in] */ \r
- __in DWORD cb);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetPropertyStorage )( \r
- IPersistSerializedPropStorage * This,\r
- /* [out] */ \r
- __deref_out_bcount(*pcb) SERIALIZEDPROPSTORAGE **ppsps,\r
- /* [out] */ \r
- __out DWORD *pcb);\r
- \r
- END_INTERFACE\r
- } IPersistSerializedPropStorageVtbl;\r
-\r
- interface IPersistSerializedPropStorage\r
- {\r
- CONST_VTBL struct IPersistSerializedPropStorageVtbl *lpVtbl;\r
- };\r
-\r
- \r
-\r
-#ifdef COBJMACROS\r
-\r
-\r
-#define IPersistSerializedPropStorage_QueryInterface(This,riid,ppvObject) \\r
- ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r
-\r
-#define IPersistSerializedPropStorage_AddRef(This) \\r
- ( (This)->lpVtbl -> AddRef(This) ) \r
-\r
-#define IPersistSerializedPropStorage_Release(This) \\r
- ( (This)->lpVtbl -> Release(This) ) \r
-\r
-\r
-#define IPersistSerializedPropStorage_SetFlags(This,flags) \\r
- ( (This)->lpVtbl -> SetFlags(This,flags) ) \r
-\r
-#define IPersistSerializedPropStorage_SetPropertyStorage(This,psps,cb) \\r
- ( (This)->lpVtbl -> SetPropertyStorage(This,psps,cb) ) \r
-\r
-#define IPersistSerializedPropStorage_GetPropertyStorage(This,ppsps,pcb) \\r
- ( (This)->lpVtbl -> GetPropertyStorage(This,ppsps,pcb) ) \r
-\r
-#endif /* COBJMACROS */\r
-\r
-\r
-#endif /* C style interface */\r
-\r
-\r
-\r
-\r
-#endif /* __IPersistSerializedPropStorage_INTERFACE_DEFINED__ */\r
-\r
-\r
-#ifndef __IPropertySystemChangeNotify_INTERFACE_DEFINED__\r
-#define __IPropertySystemChangeNotify_INTERFACE_DEFINED__\r
-\r
-/* interface IPropertySystemChangeNotify */\r
-/* [unique][object][uuid] */ \r
-\r
-\r
-EXTERN_C const IID IID_IPropertySystemChangeNotify;\r
-\r
-#if defined(__cplusplus) && !defined(CINTERFACE)\r
- \r
- MIDL_INTERFACE("fa955fd9-38be-4879-a6ce-824cf52d609f")\r
- IPropertySystemChangeNotify : public IUnknown\r
- {\r
- public:\r
- virtual HRESULT STDMETHODCALLTYPE SchemaRefreshed( void) = 0;\r
- \r
- };\r
- \r
-#else /* C style interface */\r
-\r
- typedef struct IPropertySystemChangeNotifyVtbl\r
- {\r
- BEGIN_INTERFACE\r
- \r
- HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r
- IPropertySystemChangeNotify * This,\r
- /* [in] */ __RPC__in REFIID riid,\r
- /* [iid_is][out] */ \r
- __RPC__deref_out void **ppvObject);\r
- \r
- ULONG ( STDMETHODCALLTYPE *AddRef )( \r
- IPropertySystemChangeNotify * This);\r
- \r
- ULONG ( STDMETHODCALLTYPE *Release )( \r
- IPropertySystemChangeNotify * This);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *SchemaRefreshed )( \r
- IPropertySystemChangeNotify * This);\r
- \r
- END_INTERFACE\r
- } IPropertySystemChangeNotifyVtbl;\r
-\r
- interface IPropertySystemChangeNotify\r
- {\r
- CONST_VTBL struct IPropertySystemChangeNotifyVtbl *lpVtbl;\r
- };\r
-\r
- \r
-\r
-#ifdef COBJMACROS\r
-\r
-\r
-#define IPropertySystemChangeNotify_QueryInterface(This,riid,ppvObject) \\r
- ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r
-\r
-#define IPropertySystemChangeNotify_AddRef(This) \\r
- ( (This)->lpVtbl -> AddRef(This) ) \r
-\r
-#define IPropertySystemChangeNotify_Release(This) \\r
- ( (This)->lpVtbl -> Release(This) ) \r
-\r
-\r
-#define IPropertySystemChangeNotify_SchemaRefreshed(This) \\r
- ( (This)->lpVtbl -> SchemaRefreshed(This) ) \r
-\r
-#endif /* COBJMACROS */\r
-\r
-\r
-#endif /* C style interface */\r
-\r
-\r
-\r
-\r
-#endif /* __IPropertySystemChangeNotify_INTERFACE_DEFINED__ */\r
-\r
-\r
-#ifndef __ICreateObject_INTERFACE_DEFINED__\r
-#define __ICreateObject_INTERFACE_DEFINED__\r
-\r
-/* interface ICreateObject */\r
-/* [object][unique][uuid] */ \r
-\r
-\r
-EXTERN_C const IID IID_ICreateObject;\r
-\r
-#if defined(__cplusplus) && !defined(CINTERFACE)\r
- \r
- MIDL_INTERFACE("75121952-e0d0-43e5-9380-1d80483acf72")\r
- ICreateObject : public IUnknown\r
- {\r
- public:\r
- virtual HRESULT STDMETHODCALLTYPE CreateObject( \r
- /* [in] */ __RPC__in REFCLSID clsid,\r
- /* [unique][in] */ __RPC__in_opt IUnknown *pUnkOuter,\r
- /* [in] */ __RPC__in REFIID riid,\r
- /* [iid_is][out] */ __RPC__deref_out_opt void **ppv) = 0;\r
- \r
- };\r
- \r
-#else /* C style interface */\r
-\r
- typedef struct ICreateObjectVtbl\r
- {\r
- BEGIN_INTERFACE\r
- \r
- HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r
- ICreateObject * This,\r
- /* [in] */ __RPC__in REFIID riid,\r
- /* [iid_is][out] */ \r
- __RPC__deref_out void **ppvObject);\r
- \r
- ULONG ( STDMETHODCALLTYPE *AddRef )( \r
- ICreateObject * This);\r
- \r
- ULONG ( STDMETHODCALLTYPE *Release )( \r
- ICreateObject * This);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *CreateObject )( \r
- ICreateObject * This,\r
- /* [in] */ __RPC__in REFCLSID clsid,\r
- /* [unique][in] */ __RPC__in_opt IUnknown *pUnkOuter,\r
- /* [in] */ __RPC__in REFIID riid,\r
- /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);\r
- \r
- END_INTERFACE\r
- } ICreateObjectVtbl;\r
-\r
- interface ICreateObject\r
- {\r
- CONST_VTBL struct ICreateObjectVtbl *lpVtbl;\r
- };\r
-\r
- \r
-\r
-#ifdef COBJMACROS\r
-\r
-\r
-#define ICreateObject_QueryInterface(This,riid,ppvObject) \\r
- ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r
-\r
-#define ICreateObject_AddRef(This) \\r
- ( (This)->lpVtbl -> AddRef(This) ) \r
-\r
-#define ICreateObject_Release(This) \\r
- ( (This)->lpVtbl -> Release(This) ) \r
-\r
-\r
-#define ICreateObject_CreateObject(This,clsid,pUnkOuter,riid,ppv) \\r
- ( (This)->lpVtbl -> CreateObject(This,clsid,pUnkOuter,riid,ppv) ) \r
-\r
-#endif /* COBJMACROS */\r
-\r
-\r
-#endif /* C style interface */\r
-\r
-\r
-\r
-\r
-#endif /* __ICreateObject_INTERFACE_DEFINED__ */\r
-\r
-\r
-/* interface __MIDL_itf_propsys_0000_0021 */\r
-/* [local] */ \r
-\r
-// Format a property value for display purposes\r
-PSSTDAPI PSFormatForDisplay(\r
- __in REFPROPERTYKEY propkey,\r
- __in REFPROPVARIANT propvar,\r
- __in PROPDESC_FORMAT_FLAGS pdfFlags,\r
- __out_ecount(cchText) LPWSTR pwszText,\r
- __in DWORD cchText);\r
-\r
-PSSTDAPI PSFormatForDisplayAlloc(\r
- __in REFPROPERTYKEY key,\r
- __in REFPROPVARIANT propvar,\r
- __in PROPDESC_FORMAT_FLAGS pdff,\r
- __deref_out PWSTR *ppszDisplay);\r
-\r
-PSSTDAPI PSFormatPropertyValue(\r
- __in IPropertyStore *pps,\r
- __in IPropertyDescription *ppd,\r
- __in PROPDESC_FORMAT_FLAGS pdff,\r
- __deref_out LPWSTR *ppszDisplay);\r
-\r
-\r
-#define PKEY_PIDSTR_MAX 10 // will take care of any long integer value\r
-#define GUIDSTRING_MAX (1 + 8 + 1 + 4 + 1 + 4 + 1 + 4 + 1 + 12 + 1 + 1) // "{12345678-1234-1234-1234-123456789012}"\r
-#define PKEYSTR_MAX (GUIDSTRING_MAX + 1 + PKEY_PIDSTR_MAX)\r
-\r
-// Convert a PROPERTYKEY to and from a PWSTR\r
-PSSTDAPI PSStringFromPropertyKey(\r
- __in REFPROPERTYKEY pkey,\r
- __out_ecount(cch) LPWSTR psz,\r
- __in UINT cch);\r
-\r
-PSSTDAPI PSPropertyKeyFromString(\r
- __in LPCWSTR pszString,\r
- __out PROPERTYKEY *pkey);\r
-\r
-\r
-// Creates an in-memory property store\r
-// Returns an IPropertyStore, IPersistSerializedPropStorage, and related interfaces interface\r
-PSSTDAPI PSCreateMemoryPropertyStore(\r
- __in REFIID riid,\r
- __deref_out void **ppv);\r
-\r
-\r
-// Create a read-only, delay-bind multiplexing property store\r
-// Returns an IPropertyStore interface or related interfaces\r
-PSSTDAPI PSCreateDelayedMultiplexPropertyStore(\r
- __in GETPROPERTYSTOREFLAGS flags,\r
- __in IDelayedPropertyStoreFactory *pdpsf,\r
- __in_ecount(cStores) const DWORD *rgStoreIds,\r
- __in DWORD cStores,\r
- __in REFIID riid,\r
- __deref_out void **ppv);\r
-\r
-\r
-// Create a read-only property store from one or more sources (which each must support either IPropertyStore or IPropertySetStorage)\r
-// Returns an IPropertyStore interface or related interfaces\r
-PSSTDAPI PSCreateMultiplexPropertyStore(\r
- __in_ecount(cStores) IUnknown **prgpunkStores,\r
- __in DWORD cStores,\r
- __in REFIID riid,\r
- __deref_out void **ppv);\r
-\r
-\r
-// Create a container for IPropertyChanges\r
-// Returns an IPropertyChangeArray interface\r
-PSSTDAPI PSCreatePropertyChangeArray(\r
- __in_ecount_opt(cChanges) const PROPERTYKEY *rgpropkey,\r
- __in_ecount_opt(cChanges) const PKA_FLAGS *rgflags,\r
- __in_ecount_opt(cChanges) const PROPVARIANT *rgpropvar,\r
- __in UINT cChanges,\r
- __in REFIID riid,\r
- __deref_out void **ppv);\r
-\r
-\r
-// Create a simple property change\r
-// Returns an IPropertyChange interface\r
-PSSTDAPI PSCreateSimplePropertyChange(\r
- __in PKA_FLAGS flags,\r
- __in REFPROPERTYKEY key,\r
- __in REFPROPVARIANT propvar,\r
- __in REFIID riid,\r
- __deref_out void **ppv);\r
-\r
-\r
-// Get a property description\r
-// Returns an IPropertyDescription interface\r
-PSSTDAPI PSGetPropertyDescription(\r
- __in REFPROPERTYKEY propkey,\r
- __in REFIID riid,\r
- __deref_out void **ppv);\r
-\r
-PSSTDAPI PSGetPropertyDescriptionByName(\r
- __in LPCWSTR pszCanonicalName,\r
- __in REFIID riid,\r
- __deref_out void **ppv);\r
-\r
-\r
-// Lookup a per-machine registered file property handler\r
-PSSTDAPI PSLookupPropertyHandlerCLSID(\r
- __in PCWSTR pszFilePath,\r
- __out CLSID *pclsid);\r
-// Get a property handler, on Vista or downlevel to XP\r
-// punkItem is a shell item created with an SHCreateItemXXX API\r
-// Returns an IPropertyStore\r
-PSSTDAPI PSGetItemPropertyHandler(\r
- __in IUnknown *punkItem,\r
- __in BOOL fReadWrite,\r
- __in REFIID riid,\r
- __deref_out void **ppv);\r
-\r
-\r
-// Get a property handler, on Vista or downlevel to XP\r
-// punkItem is a shell item created with an SHCreateItemXXX API\r
-// punkCreateObject supports ICreateObject\r
-// Returns an IPropertyStore\r
-PSSTDAPI PSGetItemPropertyHandlerWithCreateObject(\r
- __in IUnknown *punkItem,\r
- __in BOOL fReadWrite,\r
- __in IUnknown *punkCreateObject,\r
- __in REFIID riid,\r
- __deref_out void **ppv);\r
-\r
-\r
-// Get or set a property value from a store\r
-PSSTDAPI PSGetPropertyValue(\r
- __in IPropertyStore *pps,\r
- __in IPropertyDescription *ppd,\r
- __out PROPVARIANT *ppropvar);\r
-\r
-PSSTDAPI PSSetPropertyValue(\r
- __in IPropertyStore *pps,\r
- __in IPropertyDescription *ppd,\r
- __in REFPROPVARIANT propvar);\r
-\r
-\r
-// Interact with the set of property descriptions\r
-PSSTDAPI PSRegisterPropertySchema(\r
- __in PCWSTR pszPath);\r
-\r
-PSSTDAPI PSUnregisterPropertySchema(\r
- __in PCWSTR pszPath);\r
-\r
-PSSTDAPI PSRefreshPropertySchema();\r
-\r
-// Returns either: IPropertyDescriptionList or IEnumUnknown interfaces\r
-PSSTDAPI PSEnumeratePropertyDescriptions(\r
- __in PROPDESC_ENUMFILTER filterOn,\r
- __in REFIID riid,\r
- __deref_out void **ppv);\r
-\r
-\r
-// Convert between a PROPERTYKEY and its canonical name\r
-PSSTDAPI PSGetPropertyKeyFromName(\r
- __in PCWSTR pszName,\r
- __out PROPERTYKEY *ppropkey);\r
-\r
-PSSTDAPI PSGetNameFromPropertyKey(\r
- __in REFPROPERTYKEY propkey,\r
- __deref_out PWSTR *ppszCanonicalName);\r
-\r
-\r
-// Coerce and canonicalize a property value\r
-PSSTDAPI PSCoerceToCanonicalValue(\r
- __in REFPROPERTYKEY key,\r
- __inout PROPVARIANT *ppropvar);\r
-\r
-\r
-// Convert a 'prop:' string into a list of property descriptions\r
-// Returns an IPropertyDescriptionList interface\r
-PSSTDAPI PSGetPropertyDescriptionListFromString(\r
- __in LPCWSTR pszPropList,\r
- __in REFIID riid,\r
- __deref_out void **ppv);\r
-\r
-\r
-// Wrap an IPropertySetStorage interface in an IPropertyStore interface\r
-// Returns an IPropertyStore or related interface\r
-PSSTDAPI PSCreatePropertyStoreFromPropertySetStorage(\r
- __in IPropertySetStorage *ppss,\r
- DWORD grfMode,\r
- REFIID riid,\r
- __deref_out void **ppv);\r
-\r
-\r
-// punkSource must support IPropertyStore or IPropertySetStorage\r
-// On success, the returned ppv is guaranteed to support IPropertyStore.\r
-// If punkSource already supports IPropertyStore, no wrapper is created.\r
-PSSTDAPI PSCreatePropertyStoreFromObject(\r
- __in IUnknown *punk,\r
- __in DWORD grfMode,\r
- __in REFIID riid,\r
- __deref_out void **ppv);\r
-\r
-\r
-// punkSource must support IPropertyStore\r
-// riid may be IPropertyStore, IPropertySetStorage, IPropertyStoreCapabilities, or IObjectProvider\r
-PSSTDAPI PSCreateAdapterFromPropertyStore(\r
- __in IPropertyStore *pps,\r
- __in REFIID riid,\r
- __deref_out void **ppv);\r
-\r
-\r
-// Talk to the property system using an interface\r
-// Returns an IPropertySystem interface\r
-PSSTDAPI PSGetPropertySystem(\r
- __in REFIID riid,\r
- __deref_out void **ppv);\r
-\r
-\r
-// Obtain a value from serialized property storage\r
-PSSTDAPI PSGetPropertyFromPropertyStorage(\r
- __in_bcount(cb) PCUSERIALIZEDPROPSTORAGE psps, \r
- __in DWORD cb, \r
- __in REFPROPERTYKEY rpkey, \r
- __out PROPVARIANT *ppropvar);\r
-\r
-\r
-// Obtain a named value from serialized property storage\r
-PSSTDAPI PSGetNamedPropertyFromPropertyStorage(\r
- __in_bcount(cb) PCUSERIALIZEDPROPSTORAGE psps, \r
- __in DWORD cb, \r
- __in LPCWSTR pszName, \r
- __out PROPVARIANT *ppropvar);\r
-\r
-\r
-\r
-\r
-extern RPC_IF_HANDLE __MIDL_itf_propsys_0000_0021_v0_0_c_ifspec;\r
-extern RPC_IF_HANDLE __MIDL_itf_propsys_0000_0021_v0_0_s_ifspec;\r
-\r
-\r
-#ifndef __PropSysObjects_LIBRARY_DEFINED__\r
-#define __PropSysObjects_LIBRARY_DEFINED__\r
-\r
-/* library PropSysObjects */\r
-/* [version][lcid][uuid] */ \r
-\r
-\r
-EXTERN_C const IID LIBID_PropSysObjects;\r
-\r
-EXTERN_C const CLSID CLSID_InMemoryPropertyStore;\r
-\r
-#ifdef __cplusplus\r
-\r
-class DECLSPEC_UUID("9a02e012-6303-4e1e-b9a1-630f802592c5")\r
-InMemoryPropertyStore;\r
-#endif\r
-\r
-EXTERN_C const CLSID CLSID_PropertySystem;\r
-\r
-#ifdef __cplusplus\r
-\r
-class DECLSPEC_UUID("b8967f85-58ae-4f46-9fb2-5d7904798f4b")\r
-PropertySystem;\r
-#endif\r
-#endif /* __PropSysObjects_LIBRARY_DEFINED__ */\r
-\r
-/* Additional Prototypes for ALL interfaces */\r
-\r
-unsigned long __RPC_USER BSTR_UserSize( unsigned long *, unsigned long , BSTR * ); \r
-unsigned char * __RPC_USER BSTR_UserMarshal( unsigned long *, unsigned char *, BSTR * ); \r
-unsigned char * __RPC_USER BSTR_UserUnmarshal(unsigned long *, unsigned char *, BSTR * ); \r
-void __RPC_USER BSTR_UserFree( unsigned long *, BSTR * ); \r
-\r
-unsigned long __RPC_USER LPSAFEARRAY_UserSize( unsigned long *, unsigned long , LPSAFEARRAY * ); \r
-unsigned char * __RPC_USER LPSAFEARRAY_UserMarshal( unsigned long *, unsigned char *, LPSAFEARRAY * ); \r
-unsigned char * __RPC_USER LPSAFEARRAY_UserUnmarshal(unsigned long *, unsigned char *, LPSAFEARRAY * ); \r
-void __RPC_USER LPSAFEARRAY_UserFree( unsigned long *, LPSAFEARRAY * ); \r
-\r
-unsigned long __RPC_USER BSTR_UserSize64( unsigned long *, unsigned long , BSTR * ); \r
-unsigned char * __RPC_USER BSTR_UserMarshal64( unsigned long *, unsigned char *, BSTR * ); \r
-unsigned char * __RPC_USER BSTR_UserUnmarshal64(unsigned long *, unsigned char *, BSTR * ); \r
-void __RPC_USER BSTR_UserFree64( unsigned long *, BSTR * ); \r
-\r
-unsigned long __RPC_USER LPSAFEARRAY_UserSize64( unsigned long *, unsigned long , LPSAFEARRAY * ); \r
-unsigned char * __RPC_USER LPSAFEARRAY_UserMarshal64( unsigned long *, unsigned char *, LPSAFEARRAY * ); \r
-unsigned char * __RPC_USER LPSAFEARRAY_UserUnmarshal64(unsigned long *, unsigned char *, LPSAFEARRAY * ); \r
-void __RPC_USER LPSAFEARRAY_UserFree64( unsigned long *, LPSAFEARRAY * ); \r
-\r
-/* [local] */ HRESULT STDMETHODCALLTYPE IInitializeWithStream_Initialize_Proxy( \r
- IInitializeWithStream * This,\r
- /* [in] */ IStream *pstream,\r
- /* [in] */ DWORD grfMode);\r
-\r
-\r
-/* [call_as] */ HRESULT STDMETHODCALLTYPE IInitializeWithStream_Initialize_Stub( \r
- IInitializeWithStream * This,\r
- /* [in] */ __RPC__in_opt IStream *pstream,\r
- /* [in] */ DWORD grfMode);\r
-\r
-/* [local] */ HRESULT STDMETHODCALLTYPE IPropertyDescription_CoerceToCanonicalValue_Proxy( \r
- IPropertyDescription * This,\r
- /* [out][in] */ PROPVARIANT *ppropvar);\r
-\r
-\r
-/* [call_as] */ HRESULT STDMETHODCALLTYPE IPropertyDescription_CoerceToCanonicalValue_Stub( \r
- IPropertyDescription * This,\r
- /* [in] */ __RPC__in REFPROPVARIANT propvar,\r
- /* [out] */ __RPC__out PROPVARIANT *ppropvar);\r
-\r
-\r
-\r
-/* end of Additional Prototypes */\r
-\r
-#ifdef __cplusplus\r
-}\r
-#endif\r
-\r
-#endif\r
-\r
-\r
-\r
+
+
+/* this ALWAYS GENERATED file contains the definitions for the interfaces */
+
+
+ /* File created by MIDL compiler version 7.00.0499 */
+/* Compiler settings for propsys.idl:
+ Oicf, W1, Zp8, env=Win32 (32b run)
+ protocol : dce , ms_ext, c_ext, robust
+ error checks: allocation ref bounds_check enum stub_data
+ VC __declspec() decoration level:
+ __declspec(uuid()), __declspec(selectany), __declspec(novtable)
+ DECLSPEC_UUID(), MIDL_INTERFACE()
+*/
+//@@MIDL_FILE_HEADING( )
+
+#pragma warning( disable: 4049 ) /* more than 64k source lines */
+
+
+/* verify that the <rpcndr.h> version is high enough to compile this file*/
+#ifndef __REQUIRED_RPCNDR_H_VERSION__
+#define __REQUIRED_RPCNDR_H_VERSION__ 475
+#endif
+
+/* verify that the <rpcsal.h> version is high enough to compile this file*/
+#ifndef __REQUIRED_RPCSAL_H_VERSION__
+#define __REQUIRED_RPCSAL_H_VERSION__ 100
+#endif
+
+#include "rpc.h"
+#include "rpcndr.h"
+
+#ifndef __RPCNDR_H_VERSION__
+#error this stub requires an updated version of <rpcndr.h>
+#endif // __RPCNDR_H_VERSION__
+
+#ifndef COM_NO_WINDOWS_H
+#include "windows.h"
+#include "ole2.h"
+#endif /*COM_NO_WINDOWS_H*/
+
+#ifndef __propsys_h__
+#define __propsys_h__
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#pragma once
+#endif
+
+/* Forward Declarations */
+
+#ifndef __IInitializeWithFile_FWD_DEFINED__
+#define __IInitializeWithFile_FWD_DEFINED__
+typedef interface IInitializeWithFile IInitializeWithFile;
+#endif /* __IInitializeWithFile_FWD_DEFINED__ */
+
+
+#ifndef __IInitializeWithStream_FWD_DEFINED__
+#define __IInitializeWithStream_FWD_DEFINED__
+typedef interface IInitializeWithStream IInitializeWithStream;
+#endif /* __IInitializeWithStream_FWD_DEFINED__ */
+
+
+#ifndef __IPropertyStore_FWD_DEFINED__
+#define __IPropertyStore_FWD_DEFINED__
+typedef interface IPropertyStore IPropertyStore;
+#endif /* __IPropertyStore_FWD_DEFINED__ */
+
+
+#ifndef __INamedPropertyStore_FWD_DEFINED__
+#define __INamedPropertyStore_FWD_DEFINED__
+typedef interface INamedPropertyStore INamedPropertyStore;
+#endif /* __INamedPropertyStore_FWD_DEFINED__ */
+
+
+#ifndef __IObjectWithPropertyKey_FWD_DEFINED__
+#define __IObjectWithPropertyKey_FWD_DEFINED__
+typedef interface IObjectWithPropertyKey IObjectWithPropertyKey;
+#endif /* __IObjectWithPropertyKey_FWD_DEFINED__ */
+
+
+#ifndef __IPropertyChange_FWD_DEFINED__
+#define __IPropertyChange_FWD_DEFINED__
+typedef interface IPropertyChange IPropertyChange;
+#endif /* __IPropertyChange_FWD_DEFINED__ */
+
+
+#ifndef __IPropertyChangeArray_FWD_DEFINED__
+#define __IPropertyChangeArray_FWD_DEFINED__
+typedef interface IPropertyChangeArray IPropertyChangeArray;
+#endif /* __IPropertyChangeArray_FWD_DEFINED__ */
+
+
+#ifndef __IPropertyStoreCapabilities_FWD_DEFINED__
+#define __IPropertyStoreCapabilities_FWD_DEFINED__
+typedef interface IPropertyStoreCapabilities IPropertyStoreCapabilities;
+#endif /* __IPropertyStoreCapabilities_FWD_DEFINED__ */
+
+
+#ifndef __IPropertyStoreCache_FWD_DEFINED__
+#define __IPropertyStoreCache_FWD_DEFINED__
+typedef interface IPropertyStoreCache IPropertyStoreCache;
+#endif /* __IPropertyStoreCache_FWD_DEFINED__ */
+
+
+#ifndef __IPropertyEnumType_FWD_DEFINED__
+#define __IPropertyEnumType_FWD_DEFINED__
+typedef interface IPropertyEnumType IPropertyEnumType;
+#endif /* __IPropertyEnumType_FWD_DEFINED__ */
+
+
+#ifndef __IPropertyEnumTypeList_FWD_DEFINED__
+#define __IPropertyEnumTypeList_FWD_DEFINED__
+typedef interface IPropertyEnumTypeList IPropertyEnumTypeList;
+#endif /* __IPropertyEnumTypeList_FWD_DEFINED__ */
+
+
+#ifndef __IPropertyDescription_FWD_DEFINED__
+#define __IPropertyDescription_FWD_DEFINED__
+typedef interface IPropertyDescription IPropertyDescription;
+#endif /* __IPropertyDescription_FWD_DEFINED__ */
+
+
+#ifndef __IPropertyDescriptionAliasInfo_FWD_DEFINED__
+#define __IPropertyDescriptionAliasInfo_FWD_DEFINED__
+typedef interface IPropertyDescriptionAliasInfo IPropertyDescriptionAliasInfo;
+#endif /* __IPropertyDescriptionAliasInfo_FWD_DEFINED__ */
+
+
+#ifndef __IPropertyDescriptionSearchInfo_FWD_DEFINED__
+#define __IPropertyDescriptionSearchInfo_FWD_DEFINED__
+typedef interface IPropertyDescriptionSearchInfo IPropertyDescriptionSearchInfo;
+#endif /* __IPropertyDescriptionSearchInfo_FWD_DEFINED__ */
+
+
+#ifndef __IPropertySystem_FWD_DEFINED__
+#define __IPropertySystem_FWD_DEFINED__
+typedef interface IPropertySystem IPropertySystem;
+#endif /* __IPropertySystem_FWD_DEFINED__ */
+
+
+#ifndef __IPropertyDescriptionList_FWD_DEFINED__
+#define __IPropertyDescriptionList_FWD_DEFINED__
+typedef interface IPropertyDescriptionList IPropertyDescriptionList;
+#endif /* __IPropertyDescriptionList_FWD_DEFINED__ */
+
+
+#ifndef __IPropertyStoreFactory_FWD_DEFINED__
+#define __IPropertyStoreFactory_FWD_DEFINED__
+typedef interface IPropertyStoreFactory IPropertyStoreFactory;
+#endif /* __IPropertyStoreFactory_FWD_DEFINED__ */
+
+
+#ifndef __IDelayedPropertyStoreFactory_FWD_DEFINED__
+#define __IDelayedPropertyStoreFactory_FWD_DEFINED__
+typedef interface IDelayedPropertyStoreFactory IDelayedPropertyStoreFactory;
+#endif /* __IDelayedPropertyStoreFactory_FWD_DEFINED__ */
+
+
+#ifndef __IPersistSerializedPropStorage_FWD_DEFINED__
+#define __IPersistSerializedPropStorage_FWD_DEFINED__
+typedef interface IPersistSerializedPropStorage IPersistSerializedPropStorage;
+#endif /* __IPersistSerializedPropStorage_FWD_DEFINED__ */
+
+
+#ifndef __IPropertySystemChangeNotify_FWD_DEFINED__
+#define __IPropertySystemChangeNotify_FWD_DEFINED__
+typedef interface IPropertySystemChangeNotify IPropertySystemChangeNotify;
+#endif /* __IPropertySystemChangeNotify_FWD_DEFINED__ */
+
+
+#ifndef __ICreateObject_FWD_DEFINED__
+#define __ICreateObject_FWD_DEFINED__
+typedef interface ICreateObject ICreateObject;
+#endif /* __ICreateObject_FWD_DEFINED__ */
+
+
+#ifndef __InMemoryPropertyStore_FWD_DEFINED__
+#define __InMemoryPropertyStore_FWD_DEFINED__
+
+#ifdef __cplusplus
+typedef class InMemoryPropertyStore InMemoryPropertyStore;
+#else
+typedef struct InMemoryPropertyStore InMemoryPropertyStore;
+#endif /* __cplusplus */
+
+#endif /* __InMemoryPropertyStore_FWD_DEFINED__ */
+
+
+#ifndef __PropertySystem_FWD_DEFINED__
+#define __PropertySystem_FWD_DEFINED__
+
+#ifdef __cplusplus
+typedef class PropertySystem PropertySystem;
+#else
+typedef struct PropertySystem PropertySystem;
+#endif /* __cplusplus */
+
+#endif /* __PropertySystem_FWD_DEFINED__ */
+
+
+/* header files for imported files */
+#include "objidl.h"
+#include "oleidl.h"
+#include "ocidl.h"
+#include "shtypes.h"
+#include "structuredquery.h"
+
+#ifdef __cplusplus
+extern "C"{
+#endif
+
+
+/* interface __MIDL_itf_propsys_0000_0000 */
+/* [local] */
+
+#ifndef PSSTDAPI
+#if defined(_PROPSYS_)
+#define PSSTDAPI STDAPI
+#define PSSTDAPI_(type) STDAPI_(type)
+#else
+#define PSSTDAPI EXTERN_C DECLSPEC_IMPORT HRESULT STDAPICALLTYPE
+#define PSSTDAPI_(type) EXTERN_C DECLSPEC_IMPORT type STDAPICALLTYPE
+#endif
+#endif // PSSTDAPI
+#if 0
+typedef PROPERTYKEY *REFPROPERTYKEY;
+
+#endif // 0
+#include <propkeydef.h>
+
+
+extern RPC_IF_HANDLE __MIDL_itf_propsys_0000_0000_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_propsys_0000_0000_v0_0_s_ifspec;
+
+#ifndef __IInitializeWithFile_INTERFACE_DEFINED__
+#define __IInitializeWithFile_INTERFACE_DEFINED__
+
+/* interface IInitializeWithFile */
+/* [unique][object][uuid] */
+
+
+EXTERN_C const IID IID_IInitializeWithFile;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("b7d14566-0509-4cce-a71f-0a554233bd9b")
+ IInitializeWithFile : public IUnknown
+ {
+ public:
+ virtual HRESULT STDMETHODCALLTYPE Initialize(
+ /* [string][in] */ __RPC__in LPCWSTR pszFilePath,
+ /* [in] */ DWORD grfMode) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct IInitializeWithFileVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IInitializeWithFile * This,
+ /* [in] */ __RPC__in REFIID riid,
+ /* [iid_is][out] */
+ __RPC__deref_out void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IInitializeWithFile * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IInitializeWithFile * This);
+
+ HRESULT ( STDMETHODCALLTYPE *Initialize )(
+ IInitializeWithFile * This,
+ /* [string][in] */ __RPC__in LPCWSTR pszFilePath,
+ /* [in] */ DWORD grfMode);
+
+ END_INTERFACE
+ } IInitializeWithFileVtbl;
+
+ interface IInitializeWithFile
+ {
+ CONST_VTBL struct IInitializeWithFileVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IInitializeWithFile_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IInitializeWithFile_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IInitializeWithFile_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IInitializeWithFile_Initialize(This,pszFilePath,grfMode) \
+ ( (This)->lpVtbl -> Initialize(This,pszFilePath,grfMode) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IInitializeWithFile_INTERFACE_DEFINED__ */
+
+
+#ifndef __IInitializeWithStream_INTERFACE_DEFINED__
+#define __IInitializeWithStream_INTERFACE_DEFINED__
+
+/* interface IInitializeWithStream */
+/* [unique][object][uuid] */
+
+
+EXTERN_C const IID IID_IInitializeWithStream;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("b824b49d-22ac-4161-ac8a-9916e8fa3f7f")
+ IInitializeWithStream : public IUnknown
+ {
+ public:
+ virtual /* [local] */ HRESULT STDMETHODCALLTYPE Initialize(
+ /* [in] */ IStream *pstream,
+ /* [in] */ DWORD grfMode) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct IInitializeWithStreamVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IInitializeWithStream * This,
+ /* [in] */ __RPC__in REFIID riid,
+ /* [iid_is][out] */
+ __RPC__deref_out void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IInitializeWithStream * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IInitializeWithStream * This);
+
+ /* [local] */ HRESULT ( STDMETHODCALLTYPE *Initialize )(
+ IInitializeWithStream * This,
+ /* [in] */ IStream *pstream,
+ /* [in] */ DWORD grfMode);
+
+ END_INTERFACE
+ } IInitializeWithStreamVtbl;
+
+ interface IInitializeWithStream
+ {
+ CONST_VTBL struct IInitializeWithStreamVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IInitializeWithStream_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IInitializeWithStream_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IInitializeWithStream_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IInitializeWithStream_Initialize(This,pstream,grfMode) \
+ ( (This)->lpVtbl -> Initialize(This,pstream,grfMode) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+/* [call_as] */ HRESULT STDMETHODCALLTYPE IInitializeWithStream_RemoteInitialize_Proxy(
+ IInitializeWithStream * This,
+ /* [in] */ __RPC__in_opt IStream *pstream,
+ /* [in] */ DWORD grfMode);
+
+
+void __RPC_STUB IInitializeWithStream_RemoteInitialize_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+
+#endif /* __IInitializeWithStream_INTERFACE_DEFINED__ */
+
+
+#ifndef __IPropertyStore_INTERFACE_DEFINED__
+#define __IPropertyStore_INTERFACE_DEFINED__
+
+/* interface IPropertyStore */
+/* [unique][object][helpstring][uuid] */
+
+
+EXTERN_C const IID IID_IPropertyStore;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("886d8eeb-8cf2-4446-8d02-cdba1dbdcf99")
+ IPropertyStore : public IUnknown
+ {
+ public:
+ virtual HRESULT STDMETHODCALLTYPE GetCount(
+ /* [out] */ __RPC__out DWORD *cProps) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetAt(
+ /* [in] */ DWORD iProp,
+ /* [out] */ __RPC__out PROPERTYKEY *pkey) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetValue(
+ /* [in] */ __RPC__in REFPROPERTYKEY key,
+ /* [out] */ __RPC__out PROPVARIANT *pv) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE SetValue(
+ /* [in] */ __RPC__in REFPROPERTYKEY key,
+ /* [in] */ __RPC__in REFPROPVARIANT propvar) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE Commit( void) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct IPropertyStoreVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IPropertyStore * This,
+ /* [in] */ __RPC__in REFIID riid,
+ /* [iid_is][out] */
+ __RPC__deref_out void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IPropertyStore * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IPropertyStore * This);
+
+ HRESULT ( STDMETHODCALLTYPE *GetCount )(
+ IPropertyStore * This,
+ /* [out] */ __RPC__out DWORD *cProps);
+
+ HRESULT ( STDMETHODCALLTYPE *GetAt )(
+ IPropertyStore * This,
+ /* [in] */ DWORD iProp,
+ /* [out] */ __RPC__out PROPERTYKEY *pkey);
+
+ HRESULT ( STDMETHODCALLTYPE *GetValue )(
+ IPropertyStore * This,
+ /* [in] */ __RPC__in REFPROPERTYKEY key,
+ /* [out] */ __RPC__out PROPVARIANT *pv);
+
+ HRESULT ( STDMETHODCALLTYPE *SetValue )(
+ IPropertyStore * This,
+ /* [in] */ __RPC__in REFPROPERTYKEY key,
+ /* [in] */ __RPC__in REFPROPVARIANT propvar);
+
+ HRESULT ( STDMETHODCALLTYPE *Commit )(
+ IPropertyStore * This);
+
+ END_INTERFACE
+ } IPropertyStoreVtbl;
+
+ interface IPropertyStore
+ {
+ CONST_VTBL struct IPropertyStoreVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IPropertyStore_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IPropertyStore_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IPropertyStore_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IPropertyStore_GetCount(This,cProps) \
+ ( (This)->lpVtbl -> GetCount(This,cProps) )
+
+#define IPropertyStore_GetAt(This,iProp,pkey) \
+ ( (This)->lpVtbl -> GetAt(This,iProp,pkey) )
+
+#define IPropertyStore_GetValue(This,key,pv) \
+ ( (This)->lpVtbl -> GetValue(This,key,pv) )
+
+#define IPropertyStore_SetValue(This,key,propvar) \
+ ( (This)->lpVtbl -> SetValue(This,key,propvar) )
+
+#define IPropertyStore_Commit(This) \
+ ( (This)->lpVtbl -> Commit(This) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IPropertyStore_INTERFACE_DEFINED__ */
+
+
+/* interface __MIDL_itf_propsys_0000_0003 */
+/* [local] */
+
+typedef /* [unique] */ __RPC_unique_pointer IPropertyStore *LPPROPERTYSTORE;
+
+
+
+extern RPC_IF_HANDLE __MIDL_itf_propsys_0000_0003_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_propsys_0000_0003_v0_0_s_ifspec;
+
+#ifndef __INamedPropertyStore_INTERFACE_DEFINED__
+#define __INamedPropertyStore_INTERFACE_DEFINED__
+
+/* interface INamedPropertyStore */
+/* [unique][object][uuid] */
+
+
+EXTERN_C const IID IID_INamedPropertyStore;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("71604b0f-97b0-4764-8577-2f13e98a1422")
+ INamedPropertyStore : public IUnknown
+ {
+ public:
+ virtual HRESULT STDMETHODCALLTYPE GetNamedValue(
+ /* [string][in] */ __RPC__in LPCWSTR pszName,
+ /* [out] */ __RPC__out PROPVARIANT *ppropvar) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE SetNamedValue(
+ /* [string][in] */ __RPC__in LPCWSTR pszName,
+ /* [in] */ __RPC__in REFPROPVARIANT propvar) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetNameCount(
+ /* [out] */ __RPC__out DWORD *pdwCount) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetNameAt(
+ /* [in] */ DWORD iProp,
+ /* [out] */ __RPC__deref_out_opt BSTR *pbstrName) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct INamedPropertyStoreVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ INamedPropertyStore * This,
+ /* [in] */ __RPC__in REFIID riid,
+ /* [iid_is][out] */
+ __RPC__deref_out void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ INamedPropertyStore * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ INamedPropertyStore * This);
+
+ HRESULT ( STDMETHODCALLTYPE *GetNamedValue )(
+ INamedPropertyStore * This,
+ /* [string][in] */ __RPC__in LPCWSTR pszName,
+ /* [out] */ __RPC__out PROPVARIANT *ppropvar);
+
+ HRESULT ( STDMETHODCALLTYPE *SetNamedValue )(
+ INamedPropertyStore * This,
+ /* [string][in] */ __RPC__in LPCWSTR pszName,
+ /* [in] */ __RPC__in REFPROPVARIANT propvar);
+
+ HRESULT ( STDMETHODCALLTYPE *GetNameCount )(
+ INamedPropertyStore * This,
+ /* [out] */ __RPC__out DWORD *pdwCount);
+
+ HRESULT ( STDMETHODCALLTYPE *GetNameAt )(
+ INamedPropertyStore * This,
+ /* [in] */ DWORD iProp,
+ /* [out] */ __RPC__deref_out_opt BSTR *pbstrName);
+
+ END_INTERFACE
+ } INamedPropertyStoreVtbl;
+
+ interface INamedPropertyStore
+ {
+ CONST_VTBL struct INamedPropertyStoreVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define INamedPropertyStore_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define INamedPropertyStore_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define INamedPropertyStore_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define INamedPropertyStore_GetNamedValue(This,pszName,ppropvar) \
+ ( (This)->lpVtbl -> GetNamedValue(This,pszName,ppropvar) )
+
+#define INamedPropertyStore_SetNamedValue(This,pszName,propvar) \
+ ( (This)->lpVtbl -> SetNamedValue(This,pszName,propvar) )
+
+#define INamedPropertyStore_GetNameCount(This,pdwCount) \
+ ( (This)->lpVtbl -> GetNameCount(This,pdwCount) )
+
+#define INamedPropertyStore_GetNameAt(This,iProp,pbstrName) \
+ ( (This)->lpVtbl -> GetNameAt(This,iProp,pbstrName) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __INamedPropertyStore_INTERFACE_DEFINED__ */
+
+
+/* interface __MIDL_itf_propsys_0000_0004 */
+/* [local] */
+
+/* [v1_enum] */
+enum tagGETPROPERTYSTOREFLAGS
+ { GPS_DEFAULT = 0,
+ GPS_HANDLERPROPERTIESONLY = 0x1,
+ GPS_READWRITE = 0x2,
+ GPS_TEMPORARY = 0x4,
+ GPS_FASTPROPERTIESONLY = 0x8,
+ GPS_OPENSLOWITEM = 0x10,
+ GPS_DELAYCREATION = 0x20,
+ GPS_BESTEFFORT = 0x40,
+ GPS_MASK_VALID = 0x7f
+ } ;
+typedef int GETPROPERTYSTOREFLAGS;
+
+
+
+extern RPC_IF_HANDLE __MIDL_itf_propsys_0000_0004_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_propsys_0000_0004_v0_0_s_ifspec;
+
+#ifndef __IObjectWithPropertyKey_INTERFACE_DEFINED__
+#define __IObjectWithPropertyKey_INTERFACE_DEFINED__
+
+/* interface IObjectWithPropertyKey */
+/* [uuid][object] */
+
+
+EXTERN_C const IID IID_IObjectWithPropertyKey;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("fc0ca0a7-c316-4fd2-9031-3e628e6d4f23")
+ IObjectWithPropertyKey : public IUnknown
+ {
+ public:
+ virtual HRESULT STDMETHODCALLTYPE SetPropertyKey(
+ /* [in] */ __RPC__in REFPROPERTYKEY key) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetPropertyKey(
+ /* [out] */ __RPC__out PROPERTYKEY *pkey) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct IObjectWithPropertyKeyVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IObjectWithPropertyKey * This,
+ /* [in] */ __RPC__in REFIID riid,
+ /* [iid_is][out] */
+ __RPC__deref_out void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IObjectWithPropertyKey * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IObjectWithPropertyKey * This);
+
+ HRESULT ( STDMETHODCALLTYPE *SetPropertyKey )(
+ IObjectWithPropertyKey * This,
+ /* [in] */ __RPC__in REFPROPERTYKEY key);
+
+ HRESULT ( STDMETHODCALLTYPE *GetPropertyKey )(
+ IObjectWithPropertyKey * This,
+ /* [out] */ __RPC__out PROPERTYKEY *pkey);
+
+ END_INTERFACE
+ } IObjectWithPropertyKeyVtbl;
+
+ interface IObjectWithPropertyKey
+ {
+ CONST_VTBL struct IObjectWithPropertyKeyVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IObjectWithPropertyKey_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IObjectWithPropertyKey_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IObjectWithPropertyKey_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IObjectWithPropertyKey_SetPropertyKey(This,key) \
+ ( (This)->lpVtbl -> SetPropertyKey(This,key) )
+
+#define IObjectWithPropertyKey_GetPropertyKey(This,pkey) \
+ ( (This)->lpVtbl -> GetPropertyKey(This,pkey) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IObjectWithPropertyKey_INTERFACE_DEFINED__ */
+
+
+/* interface __MIDL_itf_propsys_0000_0005 */
+/* [local] */
+
+typedef /* [v1_enum] */
+enum tagPKA_FLAGS
+ { PKA_SET = 0,
+ PKA_APPEND = ( PKA_SET + 1 ) ,
+ PKA_DELETE = ( PKA_APPEND + 1 )
+ } PKA_FLAGS;
+
+
+
+extern RPC_IF_HANDLE __MIDL_itf_propsys_0000_0005_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_propsys_0000_0005_v0_0_s_ifspec;
+
+#ifndef __IPropertyChange_INTERFACE_DEFINED__
+#define __IPropertyChange_INTERFACE_DEFINED__
+
+/* interface IPropertyChange */
+/* [unique][object][uuid] */
+
+
+EXTERN_C const IID IID_IPropertyChange;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("f917bc8a-1bba-4478-a245-1bde03eb9431")
+ IPropertyChange : public IObjectWithPropertyKey
+ {
+ public:
+ virtual HRESULT STDMETHODCALLTYPE ApplyToPropVariant(
+ /* [in] */ __RPC__in REFPROPVARIANT propvarIn,
+ /* [out] */ __RPC__out PROPVARIANT *ppropvarOut) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct IPropertyChangeVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IPropertyChange * This,
+ /* [in] */ __RPC__in REFIID riid,
+ /* [iid_is][out] */
+ __RPC__deref_out void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IPropertyChange * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IPropertyChange * This);
+
+ HRESULT ( STDMETHODCALLTYPE *SetPropertyKey )(
+ IPropertyChange * This,
+ /* [in] */ __RPC__in REFPROPERTYKEY key);
+
+ HRESULT ( STDMETHODCALLTYPE *GetPropertyKey )(
+ IPropertyChange * This,
+ /* [out] */ __RPC__out PROPERTYKEY *pkey);
+
+ HRESULT ( STDMETHODCALLTYPE *ApplyToPropVariant )(
+ IPropertyChange * This,
+ /* [in] */ __RPC__in REFPROPVARIANT propvarIn,
+ /* [out] */ __RPC__out PROPVARIANT *ppropvarOut);
+
+ END_INTERFACE
+ } IPropertyChangeVtbl;
+
+ interface IPropertyChange
+ {
+ CONST_VTBL struct IPropertyChangeVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IPropertyChange_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IPropertyChange_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IPropertyChange_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IPropertyChange_SetPropertyKey(This,key) \
+ ( (This)->lpVtbl -> SetPropertyKey(This,key) )
+
+#define IPropertyChange_GetPropertyKey(This,pkey) \
+ ( (This)->lpVtbl -> GetPropertyKey(This,pkey) )
+
+
+#define IPropertyChange_ApplyToPropVariant(This,propvarIn,ppropvarOut) \
+ ( (This)->lpVtbl -> ApplyToPropVariant(This,propvarIn,ppropvarOut) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IPropertyChange_INTERFACE_DEFINED__ */
+
+
+#ifndef __IPropertyChangeArray_INTERFACE_DEFINED__
+#define __IPropertyChangeArray_INTERFACE_DEFINED__
+
+/* interface IPropertyChangeArray */
+/* [unique][object][uuid] */
+
+
+EXTERN_C const IID IID_IPropertyChangeArray;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("380f5cad-1b5e-42f2-805d-637fd392d31e")
+ IPropertyChangeArray : public IUnknown
+ {
+ public:
+ virtual HRESULT STDMETHODCALLTYPE GetCount(
+ /* [out] */ __RPC__out UINT *pcOperations) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetAt(
+ /* [in] */ UINT iIndex,
+ /* [in] */ __RPC__in REFIID riid,
+ /* [iid_is][out] */ __RPC__deref_out_opt void **ppv) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE InsertAt(
+ /* [in] */ UINT iIndex,
+ /* [in] */ __RPC__in_opt IPropertyChange *ppropChange) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE Append(
+ /* [in] */ __RPC__in_opt IPropertyChange *ppropChange) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE AppendOrReplace(
+ /* [in] */ __RPC__in_opt IPropertyChange *ppropChange) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE RemoveAt(
+ /* [in] */ UINT iIndex) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE IsKeyInArray(
+ /* [in] */ __RPC__in REFPROPERTYKEY key) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct IPropertyChangeArrayVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IPropertyChangeArray * This,
+ /* [in] */ __RPC__in REFIID riid,
+ /* [iid_is][out] */
+ __RPC__deref_out void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IPropertyChangeArray * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IPropertyChangeArray * This);
+
+ HRESULT ( STDMETHODCALLTYPE *GetCount )(
+ IPropertyChangeArray * This,
+ /* [out] */ __RPC__out UINT *pcOperations);
+
+ HRESULT ( STDMETHODCALLTYPE *GetAt )(
+ IPropertyChangeArray * This,
+ /* [in] */ UINT iIndex,
+ /* [in] */ __RPC__in REFIID riid,
+ /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);
+
+ HRESULT ( STDMETHODCALLTYPE *InsertAt )(
+ IPropertyChangeArray * This,
+ /* [in] */ UINT iIndex,
+ /* [in] */ __RPC__in_opt IPropertyChange *ppropChange);
+
+ HRESULT ( STDMETHODCALLTYPE *Append )(
+ IPropertyChangeArray * This,
+ /* [in] */ __RPC__in_opt IPropertyChange *ppropChange);
+
+ HRESULT ( STDMETHODCALLTYPE *AppendOrReplace )(
+ IPropertyChangeArray * This,
+ /* [in] */ __RPC__in_opt IPropertyChange *ppropChange);
+
+ HRESULT ( STDMETHODCALLTYPE *RemoveAt )(
+ IPropertyChangeArray * This,
+ /* [in] */ UINT iIndex);
+
+ HRESULT ( STDMETHODCALLTYPE *IsKeyInArray )(
+ IPropertyChangeArray * This,
+ /* [in] */ __RPC__in REFPROPERTYKEY key);
+
+ END_INTERFACE
+ } IPropertyChangeArrayVtbl;
+
+ interface IPropertyChangeArray
+ {
+ CONST_VTBL struct IPropertyChangeArrayVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IPropertyChangeArray_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IPropertyChangeArray_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IPropertyChangeArray_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IPropertyChangeArray_GetCount(This,pcOperations) \
+ ( (This)->lpVtbl -> GetCount(This,pcOperations) )
+
+#define IPropertyChangeArray_GetAt(This,iIndex,riid,ppv) \
+ ( (This)->lpVtbl -> GetAt(This,iIndex,riid,ppv) )
+
+#define IPropertyChangeArray_InsertAt(This,iIndex,ppropChange) \
+ ( (This)->lpVtbl -> InsertAt(This,iIndex,ppropChange) )
+
+#define IPropertyChangeArray_Append(This,ppropChange) \
+ ( (This)->lpVtbl -> Append(This,ppropChange) )
+
+#define IPropertyChangeArray_AppendOrReplace(This,ppropChange) \
+ ( (This)->lpVtbl -> AppendOrReplace(This,ppropChange) )
+
+#define IPropertyChangeArray_RemoveAt(This,iIndex) \
+ ( (This)->lpVtbl -> RemoveAt(This,iIndex) )
+
+#define IPropertyChangeArray_IsKeyInArray(This,key) \
+ ( (This)->lpVtbl -> IsKeyInArray(This,key) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IPropertyChangeArray_INTERFACE_DEFINED__ */
+
+
+#ifndef __IPropertyStoreCapabilities_INTERFACE_DEFINED__
+#define __IPropertyStoreCapabilities_INTERFACE_DEFINED__
+
+/* interface IPropertyStoreCapabilities */
+/* [unique][object][uuid] */
+
+
+EXTERN_C const IID IID_IPropertyStoreCapabilities;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("c8e2d566-186e-4d49-bf41-6909ead56acc")
+ IPropertyStoreCapabilities : public IUnknown
+ {
+ public:
+ virtual HRESULT STDMETHODCALLTYPE IsPropertyWritable(
+ /* [in] */ __RPC__in REFPROPERTYKEY key) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct IPropertyStoreCapabilitiesVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IPropertyStoreCapabilities * This,
+ /* [in] */ __RPC__in REFIID riid,
+ /* [iid_is][out] */
+ __RPC__deref_out void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IPropertyStoreCapabilities * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IPropertyStoreCapabilities * This);
+
+ HRESULT ( STDMETHODCALLTYPE *IsPropertyWritable )(
+ IPropertyStoreCapabilities * This,
+ /* [in] */ __RPC__in REFPROPERTYKEY key);
+
+ END_INTERFACE
+ } IPropertyStoreCapabilitiesVtbl;
+
+ interface IPropertyStoreCapabilities
+ {
+ CONST_VTBL struct IPropertyStoreCapabilitiesVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IPropertyStoreCapabilities_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IPropertyStoreCapabilities_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IPropertyStoreCapabilities_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IPropertyStoreCapabilities_IsPropertyWritable(This,key) \
+ ( (This)->lpVtbl -> IsPropertyWritable(This,key) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IPropertyStoreCapabilities_INTERFACE_DEFINED__ */
+
+
+#ifndef __IPropertyStoreCache_INTERFACE_DEFINED__
+#define __IPropertyStoreCache_INTERFACE_DEFINED__
+
+/* interface IPropertyStoreCache */
+/* [unique][object][uuid] */
+
+typedef /* [v1_enum] */
+enum _PSC_STATE
+ { PSC_NORMAL = 0,
+ PSC_NOTINSOURCE = 1,
+ PSC_DIRTY = 2,
+ PSC_READONLY = 3
+ } PSC_STATE;
+
+
+EXTERN_C const IID IID_IPropertyStoreCache;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("3017056d-9a91-4e90-937d-746c72abbf4f")
+ IPropertyStoreCache : public IPropertyStore
+ {
+ public:
+ virtual HRESULT STDMETHODCALLTYPE GetState(
+ /* [in] */ __RPC__in REFPROPERTYKEY key,
+ /* [out] */ __RPC__out PSC_STATE *pstate) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetValueAndState(
+ /* [in] */ __RPC__in REFPROPERTYKEY key,
+ /* [out] */ __RPC__out PROPVARIANT *ppropvar,
+ /* [out] */ __RPC__out PSC_STATE *pstate) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE SetState(
+ /* [in] */ __RPC__in REFPROPERTYKEY key,
+ /* [in] */ PSC_STATE state) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE SetValueAndState(
+ /* [in] */ __RPC__in REFPROPERTYKEY key,
+ /* [unique][in] */ __RPC__in_opt const PROPVARIANT *ppropvar,
+ /* [in] */ PSC_STATE state) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct IPropertyStoreCacheVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IPropertyStoreCache * This,
+ /* [in] */ __RPC__in REFIID riid,
+ /* [iid_is][out] */
+ __RPC__deref_out void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IPropertyStoreCache * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IPropertyStoreCache * This);
+
+ HRESULT ( STDMETHODCALLTYPE *GetCount )(
+ IPropertyStoreCache * This,
+ /* [out] */ __RPC__out DWORD *cProps);
+
+ HRESULT ( STDMETHODCALLTYPE *GetAt )(
+ IPropertyStoreCache * This,
+ /* [in] */ DWORD iProp,
+ /* [out] */ __RPC__out PROPERTYKEY *pkey);
+
+ HRESULT ( STDMETHODCALLTYPE *GetValue )(
+ IPropertyStoreCache * This,
+ /* [in] */ __RPC__in REFPROPERTYKEY key,
+ /* [out] */ __RPC__out PROPVARIANT *pv);
+
+ HRESULT ( STDMETHODCALLTYPE *SetValue )(
+ IPropertyStoreCache * This,
+ /* [in] */ __RPC__in REFPROPERTYKEY key,
+ /* [in] */ __RPC__in REFPROPVARIANT propvar);
+
+ HRESULT ( STDMETHODCALLTYPE *Commit )(
+ IPropertyStoreCache * This);
+
+ HRESULT ( STDMETHODCALLTYPE *GetState )(
+ IPropertyStoreCache * This,
+ /* [in] */ __RPC__in REFPROPERTYKEY key,
+ /* [out] */ __RPC__out PSC_STATE *pstate);
+
+ HRESULT ( STDMETHODCALLTYPE *GetValueAndState )(
+ IPropertyStoreCache * This,
+ /* [in] */ __RPC__in REFPROPERTYKEY key,
+ /* [out] */ __RPC__out PROPVARIANT *ppropvar,
+ /* [out] */ __RPC__out PSC_STATE *pstate);
+
+ HRESULT ( STDMETHODCALLTYPE *SetState )(
+ IPropertyStoreCache * This,
+ /* [in] */ __RPC__in REFPROPERTYKEY key,
+ /* [in] */ PSC_STATE state);
+
+ HRESULT ( STDMETHODCALLTYPE *SetValueAndState )(
+ IPropertyStoreCache * This,
+ /* [in] */ __RPC__in REFPROPERTYKEY key,
+ /* [unique][in] */ __RPC__in_opt const PROPVARIANT *ppropvar,
+ /* [in] */ PSC_STATE state);
+
+ END_INTERFACE
+ } IPropertyStoreCacheVtbl;
+
+ interface IPropertyStoreCache
+ {
+ CONST_VTBL struct IPropertyStoreCacheVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IPropertyStoreCache_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IPropertyStoreCache_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IPropertyStoreCache_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IPropertyStoreCache_GetCount(This,cProps) \
+ ( (This)->lpVtbl -> GetCount(This,cProps) )
+
+#define IPropertyStoreCache_GetAt(This,iProp,pkey) \
+ ( (This)->lpVtbl -> GetAt(This,iProp,pkey) )
+
+#define IPropertyStoreCache_GetValue(This,key,pv) \
+ ( (This)->lpVtbl -> GetValue(This,key,pv) )
+
+#define IPropertyStoreCache_SetValue(This,key,propvar) \
+ ( (This)->lpVtbl -> SetValue(This,key,propvar) )
+
+#define IPropertyStoreCache_Commit(This) \
+ ( (This)->lpVtbl -> Commit(This) )
+
+
+#define IPropertyStoreCache_GetState(This,key,pstate) \
+ ( (This)->lpVtbl -> GetState(This,key,pstate) )
+
+#define IPropertyStoreCache_GetValueAndState(This,key,ppropvar,pstate) \
+ ( (This)->lpVtbl -> GetValueAndState(This,key,ppropvar,pstate) )
+
+#define IPropertyStoreCache_SetState(This,key,state) \
+ ( (This)->lpVtbl -> SetState(This,key,state) )
+
+#define IPropertyStoreCache_SetValueAndState(This,key,ppropvar,state) \
+ ( (This)->lpVtbl -> SetValueAndState(This,key,ppropvar,state) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IPropertyStoreCache_INTERFACE_DEFINED__ */
+
+
+#ifndef __IPropertyEnumType_INTERFACE_DEFINED__
+#define __IPropertyEnumType_INTERFACE_DEFINED__
+
+/* interface IPropertyEnumType */
+/* [unique][object][uuid] */
+
+/* [v1_enum] */
+enum tagPROPENUMTYPE
+ { PET_DISCRETEVALUE = 0,
+ PET_RANGEDVALUE = 1,
+ PET_DEFAULTVALUE = 2,
+ PET_ENDRANGE = 3
+ } ;
+typedef enum tagPROPENUMTYPE PROPENUMTYPE;
+
+
+EXTERN_C const IID IID_IPropertyEnumType;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("11e1fbf9-2d56-4a6b-8db3-7cd193a471f2")
+ IPropertyEnumType : public IUnknown
+ {
+ public:
+ virtual HRESULT STDMETHODCALLTYPE GetEnumType(
+ /* [out] */ __RPC__out PROPENUMTYPE *penumtype) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetValue(
+ /* [out] */ __RPC__out PROPVARIANT *ppropvar) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetRangeMinValue(
+ /* [out] */ __RPC__out PROPVARIANT *ppropvarMin) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetRangeSetValue(
+ /* [out] */ __RPC__out PROPVARIANT *ppropvarSet) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetDisplayText(
+ /* [out] */ __RPC__deref_out_opt LPWSTR *ppszDisplay) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct IPropertyEnumTypeVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IPropertyEnumType * This,
+ /* [in] */ __RPC__in REFIID riid,
+ /* [iid_is][out] */
+ __RPC__deref_out void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IPropertyEnumType * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IPropertyEnumType * This);
+
+ HRESULT ( STDMETHODCALLTYPE *GetEnumType )(
+ IPropertyEnumType * This,
+ /* [out] */ __RPC__out PROPENUMTYPE *penumtype);
+
+ HRESULT ( STDMETHODCALLTYPE *GetValue )(
+ IPropertyEnumType * This,
+ /* [out] */ __RPC__out PROPVARIANT *ppropvar);
+
+ HRESULT ( STDMETHODCALLTYPE *GetRangeMinValue )(
+ IPropertyEnumType * This,
+ /* [out] */ __RPC__out PROPVARIANT *ppropvarMin);
+
+ HRESULT ( STDMETHODCALLTYPE *GetRangeSetValue )(
+ IPropertyEnumType * This,
+ /* [out] */ __RPC__out PROPVARIANT *ppropvarSet);
+
+ HRESULT ( STDMETHODCALLTYPE *GetDisplayText )(
+ IPropertyEnumType * This,
+ /* [out] */ __RPC__deref_out_opt LPWSTR *ppszDisplay);
+
+ END_INTERFACE
+ } IPropertyEnumTypeVtbl;
+
+ interface IPropertyEnumType
+ {
+ CONST_VTBL struct IPropertyEnumTypeVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IPropertyEnumType_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IPropertyEnumType_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IPropertyEnumType_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IPropertyEnumType_GetEnumType(This,penumtype) \
+ ( (This)->lpVtbl -> GetEnumType(This,penumtype) )
+
+#define IPropertyEnumType_GetValue(This,ppropvar) \
+ ( (This)->lpVtbl -> GetValue(This,ppropvar) )
+
+#define IPropertyEnumType_GetRangeMinValue(This,ppropvarMin) \
+ ( (This)->lpVtbl -> GetRangeMinValue(This,ppropvarMin) )
+
+#define IPropertyEnumType_GetRangeSetValue(This,ppropvarSet) \
+ ( (This)->lpVtbl -> GetRangeSetValue(This,ppropvarSet) )
+
+#define IPropertyEnumType_GetDisplayText(This,ppszDisplay) \
+ ( (This)->lpVtbl -> GetDisplayText(This,ppszDisplay) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IPropertyEnumType_INTERFACE_DEFINED__ */
+
+
+#ifndef __IPropertyEnumTypeList_INTERFACE_DEFINED__
+#define __IPropertyEnumTypeList_INTERFACE_DEFINED__
+
+/* interface IPropertyEnumTypeList */
+/* [unique][object][uuid] */
+
+
+EXTERN_C const IID IID_IPropertyEnumTypeList;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("a99400f4-3d84-4557-94ba-1242fb2cc9a6")
+ IPropertyEnumTypeList : public IUnknown
+ {
+ public:
+ virtual HRESULT STDMETHODCALLTYPE GetCount(
+ /* [out] */ __RPC__out UINT *pctypes) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetAt(
+ /* [in] */ UINT itype,
+ /* [in] */ __RPC__in REFIID riid,
+ /* [iid_is][out] */ __RPC__deref_out_opt void **ppv) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetConditionAt(
+ /* [in] */ UINT nIndex,
+ /* [in] */ __RPC__in REFIID riid,
+ /* [iid_is][out] */ __RPC__deref_out_opt void **ppv) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE FindMatchingIndex(
+ /* [in] */ __RPC__in REFPROPVARIANT propvarCmp,
+ /* [out] */ __RPC__out UINT *pnIndex) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct IPropertyEnumTypeListVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IPropertyEnumTypeList * This,
+ /* [in] */ __RPC__in REFIID riid,
+ /* [iid_is][out] */
+ __RPC__deref_out void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IPropertyEnumTypeList * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IPropertyEnumTypeList * This);
+
+ HRESULT ( STDMETHODCALLTYPE *GetCount )(
+ IPropertyEnumTypeList * This,
+ /* [out] */ __RPC__out UINT *pctypes);
+
+ HRESULT ( STDMETHODCALLTYPE *GetAt )(
+ IPropertyEnumTypeList * This,
+ /* [in] */ UINT itype,
+ /* [in] */ __RPC__in REFIID riid,
+ /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);
+
+ HRESULT ( STDMETHODCALLTYPE *GetConditionAt )(
+ IPropertyEnumTypeList * This,
+ /* [in] */ UINT nIndex,
+ /* [in] */ __RPC__in REFIID riid,
+ /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);
+
+ HRESULT ( STDMETHODCALLTYPE *FindMatchingIndex )(
+ IPropertyEnumTypeList * This,
+ /* [in] */ __RPC__in REFPROPVARIANT propvarCmp,
+ /* [out] */ __RPC__out UINT *pnIndex);
+
+ END_INTERFACE
+ } IPropertyEnumTypeListVtbl;
+
+ interface IPropertyEnumTypeList
+ {
+ CONST_VTBL struct IPropertyEnumTypeListVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IPropertyEnumTypeList_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IPropertyEnumTypeList_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IPropertyEnumTypeList_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IPropertyEnumTypeList_GetCount(This,pctypes) \
+ ( (This)->lpVtbl -> GetCount(This,pctypes) )
+
+#define IPropertyEnumTypeList_GetAt(This,itype,riid,ppv) \
+ ( (This)->lpVtbl -> GetAt(This,itype,riid,ppv) )
+
+#define IPropertyEnumTypeList_GetConditionAt(This,nIndex,riid,ppv) \
+ ( (This)->lpVtbl -> GetConditionAt(This,nIndex,riid,ppv) )
+
+#define IPropertyEnumTypeList_FindMatchingIndex(This,propvarCmp,pnIndex) \
+ ( (This)->lpVtbl -> FindMatchingIndex(This,propvarCmp,pnIndex) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IPropertyEnumTypeList_INTERFACE_DEFINED__ */
+
+
+#ifndef __IPropertyDescription_INTERFACE_DEFINED__
+#define __IPropertyDescription_INTERFACE_DEFINED__
+
+/* interface IPropertyDescription */
+/* [unique][object][uuid] */
+
+/* [v1_enum] */
+enum tagPROPDESC_TYPE_FLAGS
+ { PDTF_DEFAULT = 0,
+ PDTF_MULTIPLEVALUES = 0x1,
+ PDTF_ISINNATE = 0x2,
+ PDTF_ISGROUP = 0x4,
+ PDTF_CANGROUPBY = 0x8,
+ PDTF_CANSTACKBY = 0x10,
+ PDTF_ISTREEPROPERTY = 0x20,
+ PDTF_INCLUDEINFULLTEXTQUERY = 0x40,
+ PDTF_ISVIEWABLE = 0x80,
+ PDTF_ISQUERYABLE = 0x100,
+ PDTF_ISSYSTEMPROPERTY = 0x80000000,
+ PDTF_MASK_ALL = 0x800001ff
+ } ;
+typedef int PROPDESC_TYPE_FLAGS;
+
+/* [v1_enum] */
+enum tagPROPDESC_VIEW_FLAGS
+ { PDVF_DEFAULT = 0,
+ PDVF_CENTERALIGN = 0x1,
+ PDVF_RIGHTALIGN = 0x2,
+ PDVF_BEGINNEWGROUP = 0x4,
+ PDVF_FILLAREA = 0x8,
+ PDVF_SORTDESCENDING = 0x10,
+ PDVF_SHOWONLYIFPRESENT = 0x20,
+ PDVF_SHOWBYDEFAULT = 0x40,
+ PDVF_SHOWINPRIMARYLIST = 0x80,
+ PDVF_SHOWINSECONDARYLIST = 0x100,
+ PDVF_HIDELABEL = 0x200,
+ PDVF_HIDDEN = 0x800,
+ PDVF_CANWRAP = 0x1000,
+ PDVF_MASK_ALL = 0x1bff
+ } ;
+typedef int PROPDESC_VIEW_FLAGS;
+
+/* [v1_enum] */
+enum tagPROPDESC_DISPLAYTYPE
+ { PDDT_STRING = 0,
+ PDDT_NUMBER = 1,
+ PDDT_BOOLEAN = 2,
+ PDDT_DATETIME = 3,
+ PDDT_ENUMERATED = 4
+ } ;
+typedef enum tagPROPDESC_DISPLAYTYPE PROPDESC_DISPLAYTYPE;
+
+/* [v1_enum] */
+enum tagPROPDESC_GROUPING_RANGE
+ { PDGR_DISCRETE = 0,
+ PDGR_ALPHANUMERIC = 1,
+ PDGR_SIZE = 2,
+ PDGR_DYNAMIC = 3,
+ PDGR_DATE = 4,
+ PDGR_PERCENT = 5,
+ PDGR_ENUMERATED = 6
+ } ;
+typedef enum tagPROPDESC_GROUPING_RANGE PROPDESC_GROUPING_RANGE;
+
+/* [v1_enum] */
+enum tagPROPDESC_FORMAT_FLAGS
+ { PDFF_DEFAULT = 0,
+ PDFF_PREFIXNAME = 0x1,
+ PDFF_FILENAME = 0x2,
+ PDFF_ALWAYSKB = 0x4,
+ PDFF_RESERVED_RIGHTTOLEFT = 0x8,
+ PDFF_SHORTTIME = 0x10,
+ PDFF_LONGTIME = 0x20,
+ PDFF_HIDETIME = 0x40,
+ PDFF_SHORTDATE = 0x80,
+ PDFF_LONGDATE = 0x100,
+ PDFF_HIDEDATE = 0x200,
+ PDFF_RELATIVEDATE = 0x400,
+ PDFF_USEEDITINVITATION = 0x800,
+ PDFF_READONLY = 0x1000,
+ PDFF_NOAUTOREADINGORDER = 0x2000
+ } ;
+typedef int PROPDESC_FORMAT_FLAGS;
+
+/* [v1_enum] */
+enum tagPROPDESC_SORTDESCRIPTION
+ { PDSD_GENERAL = 0,
+ PDSD_A_Z = 1,
+ PDSD_LOWEST_HIGHEST = 2,
+ PDSD_SMALLEST_BIGGEST = 3,
+ PDSD_OLDEST_NEWEST = 4
+ } ;
+typedef enum tagPROPDESC_SORTDESCRIPTION PROPDESC_SORTDESCRIPTION;
+
+/* [v1_enum] */
+enum tagPROPDESC_RELATIVEDESCRIPTION_TYPE
+ { PDRDT_GENERAL = 0,
+ PDRDT_DATE = 1,
+ PDRDT_SIZE = 2,
+ PDRDT_COUNT = 3,
+ PDRDT_REVISION = 4,
+ PDRDT_LENGTH = 5,
+ PDRDT_DURATION = 6,
+ PDRDT_SPEED = 7,
+ PDRDT_RATE = 8,
+ PDRDT_RATING = 9,
+ PDRDT_PRIORITY = 10
+ } ;
+typedef enum tagPROPDESC_RELATIVEDESCRIPTION_TYPE PROPDESC_RELATIVEDESCRIPTION_TYPE;
+
+/* [v1_enum] */
+enum tagPROPDESC_AGGREGATION_TYPE
+ { PDAT_DEFAULT = 0,
+ PDAT_FIRST = 1,
+ PDAT_SUM = 2,
+ PDAT_AVERAGE = 3,
+ PDAT_DATERANGE = 4,
+ PDAT_UNION = 5,
+ PDAT_MAX = 6,
+ PDAT_MIN = 7
+ } ;
+typedef enum tagPROPDESC_AGGREGATION_TYPE PROPDESC_AGGREGATION_TYPE;
+
+/* [v1_enum] */
+enum tagPROPDESC_CONDITION_TYPE
+ { PDCOT_NONE = 0,
+ PDCOT_STRING = 1,
+ PDCOT_SIZE = 2,
+ PDCOT_DATETIME = 3,
+ PDCOT_BOOLEAN = 4,
+ PDCOT_NUMBER = 5
+ } ;
+typedef enum tagPROPDESC_CONDITION_TYPE PROPDESC_CONDITION_TYPE;
+
+
+EXTERN_C const IID IID_IPropertyDescription;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("6f79d558-3e96-4549-a1d1-7d75d2288814")
+ IPropertyDescription : public IUnknown
+ {
+ public:
+ virtual HRESULT STDMETHODCALLTYPE GetPropertyKey(
+ /* [out] */ __RPC__out PROPERTYKEY *pkey) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetCanonicalName(
+ /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszName) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetPropertyType(
+ /* [out] */ __RPC__out VARTYPE *pvartype) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetDisplayName(
+ /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszName) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetEditInvitation(
+ /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszInvite) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetTypeFlags(
+ /* [in] */ PROPDESC_TYPE_FLAGS mask,
+ /* [out] */ __RPC__out PROPDESC_TYPE_FLAGS *ppdtFlags) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetViewFlags(
+ /* [out] */ __RPC__out PROPDESC_VIEW_FLAGS *ppdvFlags) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetDefaultColumnWidth(
+ /* [out] */ __RPC__out UINT *pcxChars) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetDisplayType(
+ /* [out] */ __RPC__out PROPDESC_DISPLAYTYPE *pdisplaytype) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetColumnState(
+ /* [out] */ __RPC__out SHCOLSTATEF *pcsFlags) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetGroupingRange(
+ /* [out] */ __RPC__out PROPDESC_GROUPING_RANGE *pgr) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetRelativeDescriptionType(
+ /* [out] */ __RPC__out PROPDESC_RELATIVEDESCRIPTION_TYPE *prdt) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetRelativeDescription(
+ /* [in] */ __RPC__in REFPROPVARIANT propvar1,
+ /* [in] */ __RPC__in REFPROPVARIANT propvar2,
+ /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszDesc1,
+ /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszDesc2) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetSortDescription(
+ /* [out] */ __RPC__out PROPDESC_SORTDESCRIPTION *psd) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetSortDescriptionLabel(
+ /* [in] */ BOOL fDescending,
+ /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszDescription) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetAggregationType(
+ /* [out] */ __RPC__out PROPDESC_AGGREGATION_TYPE *paggtype) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetConditionType(
+ /* [out] */ __RPC__out PROPDESC_CONDITION_TYPE *pcontype,
+ /* [out] */ __RPC__out CONDITION_OPERATION *popDefault) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetEnumTypeList(
+ /* [in] */ __RPC__in REFIID riid,
+ /* [iid_is][out] */ __RPC__deref_out_opt void **ppv) = 0;
+
+ virtual /* [local] */ HRESULT STDMETHODCALLTYPE CoerceToCanonicalValue(
+ /* [out][in] */ PROPVARIANT *ppropvar) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE FormatForDisplay(
+ /* [in] */ __RPC__in REFPROPVARIANT propvar,
+ /* [in] */ PROPDESC_FORMAT_FLAGS pdfFlags,
+ /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszDisplay) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE IsValueCanonical(
+ /* [in] */ __RPC__in REFPROPVARIANT propvar) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct IPropertyDescriptionVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IPropertyDescription * This,
+ /* [in] */ __RPC__in REFIID riid,
+ /* [iid_is][out] */
+ __RPC__deref_out void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IPropertyDescription * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IPropertyDescription * This);
+
+ HRESULT ( STDMETHODCALLTYPE *GetPropertyKey )(
+ IPropertyDescription * This,
+ /* [out] */ __RPC__out PROPERTYKEY *pkey);
+
+ HRESULT ( STDMETHODCALLTYPE *GetCanonicalName )(
+ IPropertyDescription * This,
+ /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszName);
+
+ HRESULT ( STDMETHODCALLTYPE *GetPropertyType )(
+ IPropertyDescription * This,
+ /* [out] */ __RPC__out VARTYPE *pvartype);
+
+ HRESULT ( STDMETHODCALLTYPE *GetDisplayName )(
+ IPropertyDescription * This,
+ /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszName);
+
+ HRESULT ( STDMETHODCALLTYPE *GetEditInvitation )(
+ IPropertyDescription * This,
+ /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszInvite);
+
+ HRESULT ( STDMETHODCALLTYPE *GetTypeFlags )(
+ IPropertyDescription * This,
+ /* [in] */ PROPDESC_TYPE_FLAGS mask,
+ /* [out] */ __RPC__out PROPDESC_TYPE_FLAGS *ppdtFlags);
+
+ HRESULT ( STDMETHODCALLTYPE *GetViewFlags )(
+ IPropertyDescription * This,
+ /* [out] */ __RPC__out PROPDESC_VIEW_FLAGS *ppdvFlags);
+
+ HRESULT ( STDMETHODCALLTYPE *GetDefaultColumnWidth )(
+ IPropertyDescription * This,
+ /* [out] */ __RPC__out UINT *pcxChars);
+
+ HRESULT ( STDMETHODCALLTYPE *GetDisplayType )(
+ IPropertyDescription * This,
+ /* [out] */ __RPC__out PROPDESC_DISPLAYTYPE *pdisplaytype);
+
+ HRESULT ( STDMETHODCALLTYPE *GetColumnState )(
+ IPropertyDescription * This,
+ /* [out] */ __RPC__out SHCOLSTATEF *pcsFlags);
+
+ HRESULT ( STDMETHODCALLTYPE *GetGroupingRange )(
+ IPropertyDescription * This,
+ /* [out] */ __RPC__out PROPDESC_GROUPING_RANGE *pgr);
+
+ HRESULT ( STDMETHODCALLTYPE *GetRelativeDescriptionType )(
+ IPropertyDescription * This,
+ /* [out] */ __RPC__out PROPDESC_RELATIVEDESCRIPTION_TYPE *prdt);
+
+ HRESULT ( STDMETHODCALLTYPE *GetRelativeDescription )(
+ IPropertyDescription * This,
+ /* [in] */ __RPC__in REFPROPVARIANT propvar1,
+ /* [in] */ __RPC__in REFPROPVARIANT propvar2,
+ /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszDesc1,
+ /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszDesc2);
+
+ HRESULT ( STDMETHODCALLTYPE *GetSortDescription )(
+ IPropertyDescription * This,
+ /* [out] */ __RPC__out PROPDESC_SORTDESCRIPTION *psd);
+
+ HRESULT ( STDMETHODCALLTYPE *GetSortDescriptionLabel )(
+ IPropertyDescription * This,
+ /* [in] */ BOOL fDescending,
+ /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszDescription);
+
+ HRESULT ( STDMETHODCALLTYPE *GetAggregationType )(
+ IPropertyDescription * This,
+ /* [out] */ __RPC__out PROPDESC_AGGREGATION_TYPE *paggtype);
+
+ HRESULT ( STDMETHODCALLTYPE *GetConditionType )(
+ IPropertyDescription * This,
+ /* [out] */ __RPC__out PROPDESC_CONDITION_TYPE *pcontype,
+ /* [out] */ __RPC__out CONDITION_OPERATION *popDefault);
+
+ HRESULT ( STDMETHODCALLTYPE *GetEnumTypeList )(
+ IPropertyDescription * This,
+ /* [in] */ __RPC__in REFIID riid,
+ /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);
+
+ /* [local] */ HRESULT ( STDMETHODCALLTYPE *CoerceToCanonicalValue )(
+ IPropertyDescription * This,
+ /* [out][in] */ PROPVARIANT *ppropvar);
+
+ HRESULT ( STDMETHODCALLTYPE *FormatForDisplay )(
+ IPropertyDescription * This,
+ /* [in] */ __RPC__in REFPROPVARIANT propvar,
+ /* [in] */ PROPDESC_FORMAT_FLAGS pdfFlags,
+ /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszDisplay);
+
+ HRESULT ( STDMETHODCALLTYPE *IsValueCanonical )(
+ IPropertyDescription * This,
+ /* [in] */ __RPC__in REFPROPVARIANT propvar);
+
+ END_INTERFACE
+ } IPropertyDescriptionVtbl;
+
+ interface IPropertyDescription
+ {
+ CONST_VTBL struct IPropertyDescriptionVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IPropertyDescription_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IPropertyDescription_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IPropertyDescription_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IPropertyDescription_GetPropertyKey(This,pkey) \
+ ( (This)->lpVtbl -> GetPropertyKey(This,pkey) )
+
+#define IPropertyDescription_GetCanonicalName(This,ppszName) \
+ ( (This)->lpVtbl -> GetCanonicalName(This,ppszName) )
+
+#define IPropertyDescription_GetPropertyType(This,pvartype) \
+ ( (This)->lpVtbl -> GetPropertyType(This,pvartype) )
+
+#define IPropertyDescription_GetDisplayName(This,ppszName) \
+ ( (This)->lpVtbl -> GetDisplayName(This,ppszName) )
+
+#define IPropertyDescription_GetEditInvitation(This,ppszInvite) \
+ ( (This)->lpVtbl -> GetEditInvitation(This,ppszInvite) )
+
+#define IPropertyDescription_GetTypeFlags(This,mask,ppdtFlags) \
+ ( (This)->lpVtbl -> GetTypeFlags(This,mask,ppdtFlags) )
+
+#define IPropertyDescription_GetViewFlags(This,ppdvFlags) \
+ ( (This)->lpVtbl -> GetViewFlags(This,ppdvFlags) )
+
+#define IPropertyDescription_GetDefaultColumnWidth(This,pcxChars) \
+ ( (This)->lpVtbl -> GetDefaultColumnWidth(This,pcxChars) )
+
+#define IPropertyDescription_GetDisplayType(This,pdisplaytype) \
+ ( (This)->lpVtbl -> GetDisplayType(This,pdisplaytype) )
+
+#define IPropertyDescription_GetColumnState(This,pcsFlags) \
+ ( (This)->lpVtbl -> GetColumnState(This,pcsFlags) )
+
+#define IPropertyDescription_GetGroupingRange(This,pgr) \
+ ( (This)->lpVtbl -> GetGroupingRange(This,pgr) )
+
+#define IPropertyDescription_GetRelativeDescriptionType(This,prdt) \
+ ( (This)->lpVtbl -> GetRelativeDescriptionType(This,prdt) )
+
+#define IPropertyDescription_GetRelativeDescription(This,propvar1,propvar2,ppszDesc1,ppszDesc2) \
+ ( (This)->lpVtbl -> GetRelativeDescription(This,propvar1,propvar2,ppszDesc1,ppszDesc2) )
+
+#define IPropertyDescription_GetSortDescription(This,psd) \
+ ( (This)->lpVtbl -> GetSortDescription(This,psd) )
+
+#define IPropertyDescription_GetSortDescriptionLabel(This,fDescending,ppszDescription) \
+ ( (This)->lpVtbl -> GetSortDescriptionLabel(This,fDescending,ppszDescription) )
+
+#define IPropertyDescription_GetAggregationType(This,paggtype) \
+ ( (This)->lpVtbl -> GetAggregationType(This,paggtype) )
+
+#define IPropertyDescription_GetConditionType(This,pcontype,popDefault) \
+ ( (This)->lpVtbl -> GetConditionType(This,pcontype,popDefault) )
+
+#define IPropertyDescription_GetEnumTypeList(This,riid,ppv) \
+ ( (This)->lpVtbl -> GetEnumTypeList(This,riid,ppv) )
+
+#define IPropertyDescription_CoerceToCanonicalValue(This,ppropvar) \
+ ( (This)->lpVtbl -> CoerceToCanonicalValue(This,ppropvar) )
+
+#define IPropertyDescription_FormatForDisplay(This,propvar,pdfFlags,ppszDisplay) \
+ ( (This)->lpVtbl -> FormatForDisplay(This,propvar,pdfFlags,ppszDisplay) )
+
+#define IPropertyDescription_IsValueCanonical(This,propvar) \
+ ( (This)->lpVtbl -> IsValueCanonical(This,propvar) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+/* [call_as] */ HRESULT STDMETHODCALLTYPE IPropertyDescription_RemoteCoerceToCanonicalValue_Proxy(
+ IPropertyDescription * This,
+ /* [in] */ __RPC__in REFPROPVARIANT propvar,
+ /* [out] */ __RPC__out PROPVARIANT *ppropvar);
+
+
+void __RPC_STUB IPropertyDescription_RemoteCoerceToCanonicalValue_Stub(
+ IRpcStubBuffer *This,
+ IRpcChannelBuffer *_pRpcChannelBuffer,
+ PRPC_MESSAGE _pRpcMessage,
+ DWORD *_pdwStubPhase);
+
+
+
+#endif /* __IPropertyDescription_INTERFACE_DEFINED__ */
+
+
+#ifndef __IPropertyDescriptionAliasInfo_INTERFACE_DEFINED__
+#define __IPropertyDescriptionAliasInfo_INTERFACE_DEFINED__
+
+/* interface IPropertyDescriptionAliasInfo */
+/* [unique][object][uuid] */
+
+
+EXTERN_C const IID IID_IPropertyDescriptionAliasInfo;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("f67104fc-2af9-46fd-b32d-243c1404f3d1")
+ IPropertyDescriptionAliasInfo : public IPropertyDescription
+ {
+ public:
+ virtual HRESULT STDMETHODCALLTYPE GetSortByAlias(
+ /* [in] */ __RPC__in REFIID riid,
+ /* [iid_is][out] */ __RPC__deref_out_opt void **ppv) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetAdditionalSortByAliases(
+ /* [in] */ __RPC__in REFIID riid,
+ /* [iid_is][out] */ __RPC__deref_out_opt void **ppv) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct IPropertyDescriptionAliasInfoVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IPropertyDescriptionAliasInfo * This,
+ /* [in] */ __RPC__in REFIID riid,
+ /* [iid_is][out] */
+ __RPC__deref_out void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IPropertyDescriptionAliasInfo * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IPropertyDescriptionAliasInfo * This);
+
+ HRESULT ( STDMETHODCALLTYPE *GetPropertyKey )(
+ IPropertyDescriptionAliasInfo * This,
+ /* [out] */ __RPC__out PROPERTYKEY *pkey);
+
+ HRESULT ( STDMETHODCALLTYPE *GetCanonicalName )(
+ IPropertyDescriptionAliasInfo * This,
+ /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszName);
+
+ HRESULT ( STDMETHODCALLTYPE *GetPropertyType )(
+ IPropertyDescriptionAliasInfo * This,
+ /* [out] */ __RPC__out VARTYPE *pvartype);
+
+ HRESULT ( STDMETHODCALLTYPE *GetDisplayName )(
+ IPropertyDescriptionAliasInfo * This,
+ /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszName);
+
+ HRESULT ( STDMETHODCALLTYPE *GetEditInvitation )(
+ IPropertyDescriptionAliasInfo * This,
+ /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszInvite);
+
+ HRESULT ( STDMETHODCALLTYPE *GetTypeFlags )(
+ IPropertyDescriptionAliasInfo * This,
+ /* [in] */ PROPDESC_TYPE_FLAGS mask,
+ /* [out] */ __RPC__out PROPDESC_TYPE_FLAGS *ppdtFlags);
+
+ HRESULT ( STDMETHODCALLTYPE *GetViewFlags )(
+ IPropertyDescriptionAliasInfo * This,
+ /* [out] */ __RPC__out PROPDESC_VIEW_FLAGS *ppdvFlags);
+
+ HRESULT ( STDMETHODCALLTYPE *GetDefaultColumnWidth )(
+ IPropertyDescriptionAliasInfo * This,
+ /* [out] */ __RPC__out UINT *pcxChars);
+
+ HRESULT ( STDMETHODCALLTYPE *GetDisplayType )(
+ IPropertyDescriptionAliasInfo * This,
+ /* [out] */ __RPC__out PROPDESC_DISPLAYTYPE *pdisplaytype);
+
+ HRESULT ( STDMETHODCALLTYPE *GetColumnState )(
+ IPropertyDescriptionAliasInfo * This,
+ /* [out] */ __RPC__out SHCOLSTATEF *pcsFlags);
+
+ HRESULT ( STDMETHODCALLTYPE *GetGroupingRange )(
+ IPropertyDescriptionAliasInfo * This,
+ /* [out] */ __RPC__out PROPDESC_GROUPING_RANGE *pgr);
+
+ HRESULT ( STDMETHODCALLTYPE *GetRelativeDescriptionType )(
+ IPropertyDescriptionAliasInfo * This,
+ /* [out] */ __RPC__out PROPDESC_RELATIVEDESCRIPTION_TYPE *prdt);
+
+ HRESULT ( STDMETHODCALLTYPE *GetRelativeDescription )(
+ IPropertyDescriptionAliasInfo * This,
+ /* [in] */ __RPC__in REFPROPVARIANT propvar1,
+ /* [in] */ __RPC__in REFPROPVARIANT propvar2,
+ /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszDesc1,
+ /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszDesc2);
+
+ HRESULT ( STDMETHODCALLTYPE *GetSortDescription )(
+ IPropertyDescriptionAliasInfo * This,
+ /* [out] */ __RPC__out PROPDESC_SORTDESCRIPTION *psd);
+
+ HRESULT ( STDMETHODCALLTYPE *GetSortDescriptionLabel )(
+ IPropertyDescriptionAliasInfo * This,
+ /* [in] */ BOOL fDescending,
+ /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszDescription);
+
+ HRESULT ( STDMETHODCALLTYPE *GetAggregationType )(
+ IPropertyDescriptionAliasInfo * This,
+ /* [out] */ __RPC__out PROPDESC_AGGREGATION_TYPE *paggtype);
+
+ HRESULT ( STDMETHODCALLTYPE *GetConditionType )(
+ IPropertyDescriptionAliasInfo * This,
+ /* [out] */ __RPC__out PROPDESC_CONDITION_TYPE *pcontype,
+ /* [out] */ __RPC__out CONDITION_OPERATION *popDefault);
+
+ HRESULT ( STDMETHODCALLTYPE *GetEnumTypeList )(
+ IPropertyDescriptionAliasInfo * This,
+ /* [in] */ __RPC__in REFIID riid,
+ /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);
+
+ /* [local] */ HRESULT ( STDMETHODCALLTYPE *CoerceToCanonicalValue )(
+ IPropertyDescriptionAliasInfo * This,
+ /* [out][in] */ PROPVARIANT *ppropvar);
+
+ HRESULT ( STDMETHODCALLTYPE *FormatForDisplay )(
+ IPropertyDescriptionAliasInfo * This,
+ /* [in] */ __RPC__in REFPROPVARIANT propvar,
+ /* [in] */ PROPDESC_FORMAT_FLAGS pdfFlags,
+ /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszDisplay);
+
+ HRESULT ( STDMETHODCALLTYPE *IsValueCanonical )(
+ IPropertyDescriptionAliasInfo * This,
+ /* [in] */ __RPC__in REFPROPVARIANT propvar);
+
+ HRESULT ( STDMETHODCALLTYPE *GetSortByAlias )(
+ IPropertyDescriptionAliasInfo * This,
+ /* [in] */ __RPC__in REFIID riid,
+ /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);
+
+ HRESULT ( STDMETHODCALLTYPE *GetAdditionalSortByAliases )(
+ IPropertyDescriptionAliasInfo * This,
+ /* [in] */ __RPC__in REFIID riid,
+ /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);
+
+ END_INTERFACE
+ } IPropertyDescriptionAliasInfoVtbl;
+
+ interface IPropertyDescriptionAliasInfo
+ {
+ CONST_VTBL struct IPropertyDescriptionAliasInfoVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IPropertyDescriptionAliasInfo_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IPropertyDescriptionAliasInfo_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IPropertyDescriptionAliasInfo_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IPropertyDescriptionAliasInfo_GetPropertyKey(This,pkey) \
+ ( (This)->lpVtbl -> GetPropertyKey(This,pkey) )
+
+#define IPropertyDescriptionAliasInfo_GetCanonicalName(This,ppszName) \
+ ( (This)->lpVtbl -> GetCanonicalName(This,ppszName) )
+
+#define IPropertyDescriptionAliasInfo_GetPropertyType(This,pvartype) \
+ ( (This)->lpVtbl -> GetPropertyType(This,pvartype) )
+
+#define IPropertyDescriptionAliasInfo_GetDisplayName(This,ppszName) \
+ ( (This)->lpVtbl -> GetDisplayName(This,ppszName) )
+
+#define IPropertyDescriptionAliasInfo_GetEditInvitation(This,ppszInvite) \
+ ( (This)->lpVtbl -> GetEditInvitation(This,ppszInvite) )
+
+#define IPropertyDescriptionAliasInfo_GetTypeFlags(This,mask,ppdtFlags) \
+ ( (This)->lpVtbl -> GetTypeFlags(This,mask,ppdtFlags) )
+
+#define IPropertyDescriptionAliasInfo_GetViewFlags(This,ppdvFlags) \
+ ( (This)->lpVtbl -> GetViewFlags(This,ppdvFlags) )
+
+#define IPropertyDescriptionAliasInfo_GetDefaultColumnWidth(This,pcxChars) \
+ ( (This)->lpVtbl -> GetDefaultColumnWidth(This,pcxChars) )
+
+#define IPropertyDescriptionAliasInfo_GetDisplayType(This,pdisplaytype) \
+ ( (This)->lpVtbl -> GetDisplayType(This,pdisplaytype) )
+
+#define IPropertyDescriptionAliasInfo_GetColumnState(This,pcsFlags) \
+ ( (This)->lpVtbl -> GetColumnState(This,pcsFlags) )
+
+#define IPropertyDescriptionAliasInfo_GetGroupingRange(This,pgr) \
+ ( (This)->lpVtbl -> GetGroupingRange(This,pgr) )
+
+#define IPropertyDescriptionAliasInfo_GetRelativeDescriptionType(This,prdt) \
+ ( (This)->lpVtbl -> GetRelativeDescriptionType(This,prdt) )
+
+#define IPropertyDescriptionAliasInfo_GetRelativeDescription(This,propvar1,propvar2,ppszDesc1,ppszDesc2) \
+ ( (This)->lpVtbl -> GetRelativeDescription(This,propvar1,propvar2,ppszDesc1,ppszDesc2) )
+
+#define IPropertyDescriptionAliasInfo_GetSortDescription(This,psd) \
+ ( (This)->lpVtbl -> GetSortDescription(This,psd) )
+
+#define IPropertyDescriptionAliasInfo_GetSortDescriptionLabel(This,fDescending,ppszDescription) \
+ ( (This)->lpVtbl -> GetSortDescriptionLabel(This,fDescending,ppszDescription) )
+
+#define IPropertyDescriptionAliasInfo_GetAggregationType(This,paggtype) \
+ ( (This)->lpVtbl -> GetAggregationType(This,paggtype) )
+
+#define IPropertyDescriptionAliasInfo_GetConditionType(This,pcontype,popDefault) \
+ ( (This)->lpVtbl -> GetConditionType(This,pcontype,popDefault) )
+
+#define IPropertyDescriptionAliasInfo_GetEnumTypeList(This,riid,ppv) \
+ ( (This)->lpVtbl -> GetEnumTypeList(This,riid,ppv) )
+
+#define IPropertyDescriptionAliasInfo_CoerceToCanonicalValue(This,ppropvar) \
+ ( (This)->lpVtbl -> CoerceToCanonicalValue(This,ppropvar) )
+
+#define IPropertyDescriptionAliasInfo_FormatForDisplay(This,propvar,pdfFlags,ppszDisplay) \
+ ( (This)->lpVtbl -> FormatForDisplay(This,propvar,pdfFlags,ppszDisplay) )
+
+#define IPropertyDescriptionAliasInfo_IsValueCanonical(This,propvar) \
+ ( (This)->lpVtbl -> IsValueCanonical(This,propvar) )
+
+
+#define IPropertyDescriptionAliasInfo_GetSortByAlias(This,riid,ppv) \
+ ( (This)->lpVtbl -> GetSortByAlias(This,riid,ppv) )
+
+#define IPropertyDescriptionAliasInfo_GetAdditionalSortByAliases(This,riid,ppv) \
+ ( (This)->lpVtbl -> GetAdditionalSortByAliases(This,riid,ppv) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IPropertyDescriptionAliasInfo_INTERFACE_DEFINED__ */
+
+
+#ifndef __IPropertyDescriptionSearchInfo_INTERFACE_DEFINED__
+#define __IPropertyDescriptionSearchInfo_INTERFACE_DEFINED__
+
+/* interface IPropertyDescriptionSearchInfo */
+/* [unique][object][uuid] */
+
+/* [v1_enum] */
+enum tagPROPDESC_SEARCHINFO_FLAGS
+ { PDSIF_DEFAULT = 0,
+ PDSIF_ININVERTEDINDEX = 0x1,
+ PDSIF_ISCOLUMN = 0x2,
+ PDSIF_ISCOLUMNSPARSE = 0x4
+ } ;
+typedef int PROPDESC_SEARCHINFO_FLAGS;
+
+typedef /* [v1_enum] */
+enum tagPROPDESC_COLUMNINDEX_TYPE
+ { PDCIT_NONE = 0,
+ PDCIT_ONDISK = 1,
+ PDCIT_INMEMORY = 2
+ } PROPDESC_COLUMNINDEX_TYPE;
+
+
+EXTERN_C const IID IID_IPropertyDescriptionSearchInfo;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("078f91bd-29a2-440f-924e-46a291524520")
+ IPropertyDescriptionSearchInfo : public IPropertyDescription
+ {
+ public:
+ virtual HRESULT STDMETHODCALLTYPE GetSearchInfoFlags(
+ /* [out] */ __RPC__out PROPDESC_SEARCHINFO_FLAGS *ppdsiFlags) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetColumnIndexType(
+ /* [out] */ __RPC__out PROPDESC_COLUMNINDEX_TYPE *ppdciType) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetProjectionString(
+ /* [out] */ __RPC__deref_out_opt LPWSTR *ppszProjection) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetMaxSize(
+ /* [out] */ __RPC__out UINT *pcbMaxSize) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct IPropertyDescriptionSearchInfoVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IPropertyDescriptionSearchInfo * This,
+ /* [in] */ __RPC__in REFIID riid,
+ /* [iid_is][out] */
+ __RPC__deref_out void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IPropertyDescriptionSearchInfo * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IPropertyDescriptionSearchInfo * This);
+
+ HRESULT ( STDMETHODCALLTYPE *GetPropertyKey )(
+ IPropertyDescriptionSearchInfo * This,
+ /* [out] */ __RPC__out PROPERTYKEY *pkey);
+
+ HRESULT ( STDMETHODCALLTYPE *GetCanonicalName )(
+ IPropertyDescriptionSearchInfo * This,
+ /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszName);
+
+ HRESULT ( STDMETHODCALLTYPE *GetPropertyType )(
+ IPropertyDescriptionSearchInfo * This,
+ /* [out] */ __RPC__out VARTYPE *pvartype);
+
+ HRESULT ( STDMETHODCALLTYPE *GetDisplayName )(
+ IPropertyDescriptionSearchInfo * This,
+ /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszName);
+
+ HRESULT ( STDMETHODCALLTYPE *GetEditInvitation )(
+ IPropertyDescriptionSearchInfo * This,
+ /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszInvite);
+
+ HRESULT ( STDMETHODCALLTYPE *GetTypeFlags )(
+ IPropertyDescriptionSearchInfo * This,
+ /* [in] */ PROPDESC_TYPE_FLAGS mask,
+ /* [out] */ __RPC__out PROPDESC_TYPE_FLAGS *ppdtFlags);
+
+ HRESULT ( STDMETHODCALLTYPE *GetViewFlags )(
+ IPropertyDescriptionSearchInfo * This,
+ /* [out] */ __RPC__out PROPDESC_VIEW_FLAGS *ppdvFlags);
+
+ HRESULT ( STDMETHODCALLTYPE *GetDefaultColumnWidth )(
+ IPropertyDescriptionSearchInfo * This,
+ /* [out] */ __RPC__out UINT *pcxChars);
+
+ HRESULT ( STDMETHODCALLTYPE *GetDisplayType )(
+ IPropertyDescriptionSearchInfo * This,
+ /* [out] */ __RPC__out PROPDESC_DISPLAYTYPE *pdisplaytype);
+
+ HRESULT ( STDMETHODCALLTYPE *GetColumnState )(
+ IPropertyDescriptionSearchInfo * This,
+ /* [out] */ __RPC__out SHCOLSTATEF *pcsFlags);
+
+ HRESULT ( STDMETHODCALLTYPE *GetGroupingRange )(
+ IPropertyDescriptionSearchInfo * This,
+ /* [out] */ __RPC__out PROPDESC_GROUPING_RANGE *pgr);
+
+ HRESULT ( STDMETHODCALLTYPE *GetRelativeDescriptionType )(
+ IPropertyDescriptionSearchInfo * This,
+ /* [out] */ __RPC__out PROPDESC_RELATIVEDESCRIPTION_TYPE *prdt);
+
+ HRESULT ( STDMETHODCALLTYPE *GetRelativeDescription )(
+ IPropertyDescriptionSearchInfo * This,
+ /* [in] */ __RPC__in REFPROPVARIANT propvar1,
+ /* [in] */ __RPC__in REFPROPVARIANT propvar2,
+ /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszDesc1,
+ /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszDesc2);
+
+ HRESULT ( STDMETHODCALLTYPE *GetSortDescription )(
+ IPropertyDescriptionSearchInfo * This,
+ /* [out] */ __RPC__out PROPDESC_SORTDESCRIPTION *psd);
+
+ HRESULT ( STDMETHODCALLTYPE *GetSortDescriptionLabel )(
+ IPropertyDescriptionSearchInfo * This,
+ /* [in] */ BOOL fDescending,
+ /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszDescription);
+
+ HRESULT ( STDMETHODCALLTYPE *GetAggregationType )(
+ IPropertyDescriptionSearchInfo * This,
+ /* [out] */ __RPC__out PROPDESC_AGGREGATION_TYPE *paggtype);
+
+ HRESULT ( STDMETHODCALLTYPE *GetConditionType )(
+ IPropertyDescriptionSearchInfo * This,
+ /* [out] */ __RPC__out PROPDESC_CONDITION_TYPE *pcontype,
+ /* [out] */ __RPC__out CONDITION_OPERATION *popDefault);
+
+ HRESULT ( STDMETHODCALLTYPE *GetEnumTypeList )(
+ IPropertyDescriptionSearchInfo * This,
+ /* [in] */ __RPC__in REFIID riid,
+ /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);
+
+ /* [local] */ HRESULT ( STDMETHODCALLTYPE *CoerceToCanonicalValue )(
+ IPropertyDescriptionSearchInfo * This,
+ /* [out][in] */ PROPVARIANT *ppropvar);
+
+ HRESULT ( STDMETHODCALLTYPE *FormatForDisplay )(
+ IPropertyDescriptionSearchInfo * This,
+ /* [in] */ __RPC__in REFPROPVARIANT propvar,
+ /* [in] */ PROPDESC_FORMAT_FLAGS pdfFlags,
+ /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszDisplay);
+
+ HRESULT ( STDMETHODCALLTYPE *IsValueCanonical )(
+ IPropertyDescriptionSearchInfo * This,
+ /* [in] */ __RPC__in REFPROPVARIANT propvar);
+
+ HRESULT ( STDMETHODCALLTYPE *GetSearchInfoFlags )(
+ IPropertyDescriptionSearchInfo * This,
+ /* [out] */ __RPC__out PROPDESC_SEARCHINFO_FLAGS *ppdsiFlags);
+
+ HRESULT ( STDMETHODCALLTYPE *GetColumnIndexType )(
+ IPropertyDescriptionSearchInfo * This,
+ /* [out] */ __RPC__out PROPDESC_COLUMNINDEX_TYPE *ppdciType);
+
+ HRESULT ( STDMETHODCALLTYPE *GetProjectionString )(
+ IPropertyDescriptionSearchInfo * This,
+ /* [out] */ __RPC__deref_out_opt LPWSTR *ppszProjection);
+
+ HRESULT ( STDMETHODCALLTYPE *GetMaxSize )(
+ IPropertyDescriptionSearchInfo * This,
+ /* [out] */ __RPC__out UINT *pcbMaxSize);
+
+ END_INTERFACE
+ } IPropertyDescriptionSearchInfoVtbl;
+
+ interface IPropertyDescriptionSearchInfo
+ {
+ CONST_VTBL struct IPropertyDescriptionSearchInfoVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IPropertyDescriptionSearchInfo_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IPropertyDescriptionSearchInfo_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IPropertyDescriptionSearchInfo_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IPropertyDescriptionSearchInfo_GetPropertyKey(This,pkey) \
+ ( (This)->lpVtbl -> GetPropertyKey(This,pkey) )
+
+#define IPropertyDescriptionSearchInfo_GetCanonicalName(This,ppszName) \
+ ( (This)->lpVtbl -> GetCanonicalName(This,ppszName) )
+
+#define IPropertyDescriptionSearchInfo_GetPropertyType(This,pvartype) \
+ ( (This)->lpVtbl -> GetPropertyType(This,pvartype) )
+
+#define IPropertyDescriptionSearchInfo_GetDisplayName(This,ppszName) \
+ ( (This)->lpVtbl -> GetDisplayName(This,ppszName) )
+
+#define IPropertyDescriptionSearchInfo_GetEditInvitation(This,ppszInvite) \
+ ( (This)->lpVtbl -> GetEditInvitation(This,ppszInvite) )
+
+#define IPropertyDescriptionSearchInfo_GetTypeFlags(This,mask,ppdtFlags) \
+ ( (This)->lpVtbl -> GetTypeFlags(This,mask,ppdtFlags) )
+
+#define IPropertyDescriptionSearchInfo_GetViewFlags(This,ppdvFlags) \
+ ( (This)->lpVtbl -> GetViewFlags(This,ppdvFlags) )
+
+#define IPropertyDescriptionSearchInfo_GetDefaultColumnWidth(This,pcxChars) \
+ ( (This)->lpVtbl -> GetDefaultColumnWidth(This,pcxChars) )
+
+#define IPropertyDescriptionSearchInfo_GetDisplayType(This,pdisplaytype) \
+ ( (This)->lpVtbl -> GetDisplayType(This,pdisplaytype) )
+
+#define IPropertyDescriptionSearchInfo_GetColumnState(This,pcsFlags) \
+ ( (This)->lpVtbl -> GetColumnState(This,pcsFlags) )
+
+#define IPropertyDescriptionSearchInfo_GetGroupingRange(This,pgr) \
+ ( (This)->lpVtbl -> GetGroupingRange(This,pgr) )
+
+#define IPropertyDescriptionSearchInfo_GetRelativeDescriptionType(This,prdt) \
+ ( (This)->lpVtbl -> GetRelativeDescriptionType(This,prdt) )
+
+#define IPropertyDescriptionSearchInfo_GetRelativeDescription(This,propvar1,propvar2,ppszDesc1,ppszDesc2) \
+ ( (This)->lpVtbl -> GetRelativeDescription(This,propvar1,propvar2,ppszDesc1,ppszDesc2) )
+
+#define IPropertyDescriptionSearchInfo_GetSortDescription(This,psd) \
+ ( (This)->lpVtbl -> GetSortDescription(This,psd) )
+
+#define IPropertyDescriptionSearchInfo_GetSortDescriptionLabel(This,fDescending,ppszDescription) \
+ ( (This)->lpVtbl -> GetSortDescriptionLabel(This,fDescending,ppszDescription) )
+
+#define IPropertyDescriptionSearchInfo_GetAggregationType(This,paggtype) \
+ ( (This)->lpVtbl -> GetAggregationType(This,paggtype) )
+
+#define IPropertyDescriptionSearchInfo_GetConditionType(This,pcontype,popDefault) \
+ ( (This)->lpVtbl -> GetConditionType(This,pcontype,popDefault) )
+
+#define IPropertyDescriptionSearchInfo_GetEnumTypeList(This,riid,ppv) \
+ ( (This)->lpVtbl -> GetEnumTypeList(This,riid,ppv) )
+
+#define IPropertyDescriptionSearchInfo_CoerceToCanonicalValue(This,ppropvar) \
+ ( (This)->lpVtbl -> CoerceToCanonicalValue(This,ppropvar) )
+
+#define IPropertyDescriptionSearchInfo_FormatForDisplay(This,propvar,pdfFlags,ppszDisplay) \
+ ( (This)->lpVtbl -> FormatForDisplay(This,propvar,pdfFlags,ppszDisplay) )
+
+#define IPropertyDescriptionSearchInfo_IsValueCanonical(This,propvar) \
+ ( (This)->lpVtbl -> IsValueCanonical(This,propvar) )
+
+
+#define IPropertyDescriptionSearchInfo_GetSearchInfoFlags(This,ppdsiFlags) \
+ ( (This)->lpVtbl -> GetSearchInfoFlags(This,ppdsiFlags) )
+
+#define IPropertyDescriptionSearchInfo_GetColumnIndexType(This,ppdciType) \
+ ( (This)->lpVtbl -> GetColumnIndexType(This,ppdciType) )
+
+#define IPropertyDescriptionSearchInfo_GetProjectionString(This,ppszProjection) \
+ ( (This)->lpVtbl -> GetProjectionString(This,ppszProjection) )
+
+#define IPropertyDescriptionSearchInfo_GetMaxSize(This,pcbMaxSize) \
+ ( (This)->lpVtbl -> GetMaxSize(This,pcbMaxSize) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IPropertyDescriptionSearchInfo_INTERFACE_DEFINED__ */
+
+
+/* interface __MIDL_itf_propsys_0000_0014 */
+/* [local] */
+
+/* [v1_enum] */
+enum tagPROPDESC_ENUMFILTER
+ { PDEF_ALL = 0,
+ PDEF_SYSTEM = 1,
+ PDEF_NONSYSTEM = 2,
+ PDEF_VIEWABLE = 3,
+ PDEF_QUERYABLE = 4,
+ PDEF_INFULLTEXTQUERY = 5,
+ PDEF_COLUMN = 6
+ } ;
+typedef enum tagPROPDESC_ENUMFILTER PROPDESC_ENUMFILTER;
+
+
+
+extern RPC_IF_HANDLE __MIDL_itf_propsys_0000_0014_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_propsys_0000_0014_v0_0_s_ifspec;
+
+#ifndef __IPropertySystem_INTERFACE_DEFINED__
+#define __IPropertySystem_INTERFACE_DEFINED__
+
+/* interface IPropertySystem */
+/* [unique][object][uuid] */
+
+
+EXTERN_C const IID IID_IPropertySystem;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("ca724e8a-c3e6-442b-88a4-6fb0db8035a3")
+ IPropertySystem : public IUnknown
+ {
+ public:
+ virtual HRESULT STDMETHODCALLTYPE GetPropertyDescription(
+ /* [in] */ __RPC__in REFPROPERTYKEY propkey,
+ /* [in] */ __RPC__in REFIID riid,
+ /* [iid_is][out] */ __RPC__deref_out_opt void **ppv) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetPropertyDescriptionByName(
+ /* [string][in] */ __RPC__in LPCWSTR pszCanonicalName,
+ /* [in] */ __RPC__in REFIID riid,
+ /* [iid_is][out] */ __RPC__deref_out_opt void **ppv) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetPropertyDescriptionListFromString(
+ /* [string][in] */ __RPC__in LPCWSTR pszPropList,
+ /* [in] */ __RPC__in REFIID riid,
+ /* [iid_is][out] */ __RPC__deref_out_opt void **ppv) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE EnumeratePropertyDescriptions(
+ /* [in] */ PROPDESC_ENUMFILTER filterOn,
+ /* [in] */ __RPC__in REFIID riid,
+ /* [iid_is][out] */ __RPC__deref_out_opt void **ppv) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE FormatForDisplay(
+ /* [in] */ __RPC__in REFPROPERTYKEY key,
+ /* [in] */ __RPC__in REFPROPVARIANT propvar,
+ /* [in] */ PROPDESC_FORMAT_FLAGS pdff,
+ /* [size_is][string][out] */ __RPC__out_ecount_full_string(cchText) LPWSTR pszText,
+ /* [in] */ DWORD cchText) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE FormatForDisplayAlloc(
+ /* [in] */ __RPC__in REFPROPERTYKEY key,
+ /* [in] */ __RPC__in REFPROPVARIANT propvar,
+ /* [in] */ PROPDESC_FORMAT_FLAGS pdff,
+ /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszDisplay) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE RegisterPropertySchema(
+ /* [string][in] */ __RPC__in LPCWSTR pszPath) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE UnregisterPropertySchema(
+ /* [string][in] */ __RPC__in LPCWSTR pszPath) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE RefreshPropertySchema( void) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct IPropertySystemVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IPropertySystem * This,
+ /* [in] */ __RPC__in REFIID riid,
+ /* [iid_is][out] */
+ __RPC__deref_out void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IPropertySystem * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IPropertySystem * This);
+
+ HRESULT ( STDMETHODCALLTYPE *GetPropertyDescription )(
+ IPropertySystem * This,
+ /* [in] */ __RPC__in REFPROPERTYKEY propkey,
+ /* [in] */ __RPC__in REFIID riid,
+ /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);
+
+ HRESULT ( STDMETHODCALLTYPE *GetPropertyDescriptionByName )(
+ IPropertySystem * This,
+ /* [string][in] */ __RPC__in LPCWSTR pszCanonicalName,
+ /* [in] */ __RPC__in REFIID riid,
+ /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);
+
+ HRESULT ( STDMETHODCALLTYPE *GetPropertyDescriptionListFromString )(
+ IPropertySystem * This,
+ /* [string][in] */ __RPC__in LPCWSTR pszPropList,
+ /* [in] */ __RPC__in REFIID riid,
+ /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);
+
+ HRESULT ( STDMETHODCALLTYPE *EnumeratePropertyDescriptions )(
+ IPropertySystem * This,
+ /* [in] */ PROPDESC_ENUMFILTER filterOn,
+ /* [in] */ __RPC__in REFIID riid,
+ /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);
+
+ HRESULT ( STDMETHODCALLTYPE *FormatForDisplay )(
+ IPropertySystem * This,
+ /* [in] */ __RPC__in REFPROPERTYKEY key,
+ /* [in] */ __RPC__in REFPROPVARIANT propvar,
+ /* [in] */ PROPDESC_FORMAT_FLAGS pdff,
+ /* [size_is][string][out] */ __RPC__out_ecount_full_string(cchText) LPWSTR pszText,
+ /* [in] */ DWORD cchText);
+
+ HRESULT ( STDMETHODCALLTYPE *FormatForDisplayAlloc )(
+ IPropertySystem * This,
+ /* [in] */ __RPC__in REFPROPERTYKEY key,
+ /* [in] */ __RPC__in REFPROPVARIANT propvar,
+ /* [in] */ PROPDESC_FORMAT_FLAGS pdff,
+ /* [string][out] */ __RPC__deref_out_opt_string LPWSTR *ppszDisplay);
+
+ HRESULT ( STDMETHODCALLTYPE *RegisterPropertySchema )(
+ IPropertySystem * This,
+ /* [string][in] */ __RPC__in LPCWSTR pszPath);
+
+ HRESULT ( STDMETHODCALLTYPE *UnregisterPropertySchema )(
+ IPropertySystem * This,
+ /* [string][in] */ __RPC__in LPCWSTR pszPath);
+
+ HRESULT ( STDMETHODCALLTYPE *RefreshPropertySchema )(
+ IPropertySystem * This);
+
+ END_INTERFACE
+ } IPropertySystemVtbl;
+
+ interface IPropertySystem
+ {
+ CONST_VTBL struct IPropertySystemVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IPropertySystem_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IPropertySystem_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IPropertySystem_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IPropertySystem_GetPropertyDescription(This,propkey,riid,ppv) \
+ ( (This)->lpVtbl -> GetPropertyDescription(This,propkey,riid,ppv) )
+
+#define IPropertySystem_GetPropertyDescriptionByName(This,pszCanonicalName,riid,ppv) \
+ ( (This)->lpVtbl -> GetPropertyDescriptionByName(This,pszCanonicalName,riid,ppv) )
+
+#define IPropertySystem_GetPropertyDescriptionListFromString(This,pszPropList,riid,ppv) \
+ ( (This)->lpVtbl -> GetPropertyDescriptionListFromString(This,pszPropList,riid,ppv) )
+
+#define IPropertySystem_EnumeratePropertyDescriptions(This,filterOn,riid,ppv) \
+ ( (This)->lpVtbl -> EnumeratePropertyDescriptions(This,filterOn,riid,ppv) )
+
+#define IPropertySystem_FormatForDisplay(This,key,propvar,pdff,pszText,cchText) \
+ ( (This)->lpVtbl -> FormatForDisplay(This,key,propvar,pdff,pszText,cchText) )
+
+#define IPropertySystem_FormatForDisplayAlloc(This,key,propvar,pdff,ppszDisplay) \
+ ( (This)->lpVtbl -> FormatForDisplayAlloc(This,key,propvar,pdff,ppszDisplay) )
+
+#define IPropertySystem_RegisterPropertySchema(This,pszPath) \
+ ( (This)->lpVtbl -> RegisterPropertySchema(This,pszPath) )
+
+#define IPropertySystem_UnregisterPropertySchema(This,pszPath) \
+ ( (This)->lpVtbl -> UnregisterPropertySchema(This,pszPath) )
+
+#define IPropertySystem_RefreshPropertySchema(This) \
+ ( (This)->lpVtbl -> RefreshPropertySchema(This) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IPropertySystem_INTERFACE_DEFINED__ */
+
+
+#ifndef __IPropertyDescriptionList_INTERFACE_DEFINED__
+#define __IPropertyDescriptionList_INTERFACE_DEFINED__
+
+/* interface IPropertyDescriptionList */
+/* [unique][object][uuid] */
+
+
+EXTERN_C const IID IID_IPropertyDescriptionList;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("1f9fc1d0-c39b-4b26-817f-011967d3440e")
+ IPropertyDescriptionList : public IUnknown
+ {
+ public:
+ virtual HRESULT STDMETHODCALLTYPE GetCount(
+ /* [out] */ __RPC__out UINT *pcElem) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetAt(
+ /* [in] */ UINT iElem,
+ /* [in] */ __RPC__in REFIID riid,
+ /* [iid_is][out] */ __RPC__deref_out_opt void **ppv) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct IPropertyDescriptionListVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IPropertyDescriptionList * This,
+ /* [in] */ __RPC__in REFIID riid,
+ /* [iid_is][out] */
+ __RPC__deref_out void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IPropertyDescriptionList * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IPropertyDescriptionList * This);
+
+ HRESULT ( STDMETHODCALLTYPE *GetCount )(
+ IPropertyDescriptionList * This,
+ /* [out] */ __RPC__out UINT *pcElem);
+
+ HRESULT ( STDMETHODCALLTYPE *GetAt )(
+ IPropertyDescriptionList * This,
+ /* [in] */ UINT iElem,
+ /* [in] */ __RPC__in REFIID riid,
+ /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);
+
+ END_INTERFACE
+ } IPropertyDescriptionListVtbl;
+
+ interface IPropertyDescriptionList
+ {
+ CONST_VTBL struct IPropertyDescriptionListVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IPropertyDescriptionList_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IPropertyDescriptionList_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IPropertyDescriptionList_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IPropertyDescriptionList_GetCount(This,pcElem) \
+ ( (This)->lpVtbl -> GetCount(This,pcElem) )
+
+#define IPropertyDescriptionList_GetAt(This,iElem,riid,ppv) \
+ ( (This)->lpVtbl -> GetAt(This,iElem,riid,ppv) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IPropertyDescriptionList_INTERFACE_DEFINED__ */
+
+
+#ifndef __IPropertyStoreFactory_INTERFACE_DEFINED__
+#define __IPropertyStoreFactory_INTERFACE_DEFINED__
+
+/* interface IPropertyStoreFactory */
+/* [unique][object][uuid] */
+
+
+EXTERN_C const IID IID_IPropertyStoreFactory;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("bc110b6d-57e8-4148-a9c6-91015ab2f3a5")
+ IPropertyStoreFactory : public IUnknown
+ {
+ public:
+ virtual HRESULT STDMETHODCALLTYPE GetPropertyStore(
+ /* [in] */ GETPROPERTYSTOREFLAGS flags,
+ /* [unique][in] */ __RPC__in_opt IUnknown *pUnkFactory,
+ /* [in] */ __RPC__in REFIID riid,
+ /* [iid_is][out] */ __RPC__deref_out_opt void **ppv) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetPropertyStoreForKeys(
+ /* [unique][in] */ __RPC__in_opt const PROPERTYKEY *rgKeys,
+ /* [in] */ UINT cKeys,
+ /* [in] */ GETPROPERTYSTOREFLAGS flags,
+ /* [in] */ __RPC__in REFIID riid,
+ /* [iid_is][out] */ __RPC__deref_out_opt void **ppv) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct IPropertyStoreFactoryVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IPropertyStoreFactory * This,
+ /* [in] */ __RPC__in REFIID riid,
+ /* [iid_is][out] */
+ __RPC__deref_out void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IPropertyStoreFactory * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IPropertyStoreFactory * This);
+
+ HRESULT ( STDMETHODCALLTYPE *GetPropertyStore )(
+ IPropertyStoreFactory * This,
+ /* [in] */ GETPROPERTYSTOREFLAGS flags,
+ /* [unique][in] */ __RPC__in_opt IUnknown *pUnkFactory,
+ /* [in] */ __RPC__in REFIID riid,
+ /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);
+
+ HRESULT ( STDMETHODCALLTYPE *GetPropertyStoreForKeys )(
+ IPropertyStoreFactory * This,
+ /* [unique][in] */ __RPC__in_opt const PROPERTYKEY *rgKeys,
+ /* [in] */ UINT cKeys,
+ /* [in] */ GETPROPERTYSTOREFLAGS flags,
+ /* [in] */ __RPC__in REFIID riid,
+ /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);
+
+ END_INTERFACE
+ } IPropertyStoreFactoryVtbl;
+
+ interface IPropertyStoreFactory
+ {
+ CONST_VTBL struct IPropertyStoreFactoryVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IPropertyStoreFactory_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IPropertyStoreFactory_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IPropertyStoreFactory_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IPropertyStoreFactory_GetPropertyStore(This,flags,pUnkFactory,riid,ppv) \
+ ( (This)->lpVtbl -> GetPropertyStore(This,flags,pUnkFactory,riid,ppv) )
+
+#define IPropertyStoreFactory_GetPropertyStoreForKeys(This,rgKeys,cKeys,flags,riid,ppv) \
+ ( (This)->lpVtbl -> GetPropertyStoreForKeys(This,rgKeys,cKeys,flags,riid,ppv) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IPropertyStoreFactory_INTERFACE_DEFINED__ */
+
+
+#ifndef __IDelayedPropertyStoreFactory_INTERFACE_DEFINED__
+#define __IDelayedPropertyStoreFactory_INTERFACE_DEFINED__
+
+/* interface IDelayedPropertyStoreFactory */
+/* [unique][object][uuid] */
+
+
+EXTERN_C const IID IID_IDelayedPropertyStoreFactory;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("40d4577f-e237-4bdb-bd69-58f089431b6a")
+ IDelayedPropertyStoreFactory : public IPropertyStoreFactory
+ {
+ public:
+ virtual HRESULT STDMETHODCALLTYPE GetDelayedPropertyStore(
+ /* [in] */ GETPROPERTYSTOREFLAGS flags,
+ /* [in] */ DWORD dwStoreId,
+ /* [in] */ __RPC__in REFIID riid,
+ /* [iid_is][out] */ __RPC__deref_out_opt void **ppv) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct IDelayedPropertyStoreFactoryVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IDelayedPropertyStoreFactory * This,
+ /* [in] */ __RPC__in REFIID riid,
+ /* [iid_is][out] */
+ __RPC__deref_out void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IDelayedPropertyStoreFactory * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IDelayedPropertyStoreFactory * This);
+
+ HRESULT ( STDMETHODCALLTYPE *GetPropertyStore )(
+ IDelayedPropertyStoreFactory * This,
+ /* [in] */ GETPROPERTYSTOREFLAGS flags,
+ /* [unique][in] */ __RPC__in_opt IUnknown *pUnkFactory,
+ /* [in] */ __RPC__in REFIID riid,
+ /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);
+
+ HRESULT ( STDMETHODCALLTYPE *GetPropertyStoreForKeys )(
+ IDelayedPropertyStoreFactory * This,
+ /* [unique][in] */ __RPC__in_opt const PROPERTYKEY *rgKeys,
+ /* [in] */ UINT cKeys,
+ /* [in] */ GETPROPERTYSTOREFLAGS flags,
+ /* [in] */ __RPC__in REFIID riid,
+ /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);
+
+ HRESULT ( STDMETHODCALLTYPE *GetDelayedPropertyStore )(
+ IDelayedPropertyStoreFactory * This,
+ /* [in] */ GETPROPERTYSTOREFLAGS flags,
+ /* [in] */ DWORD dwStoreId,
+ /* [in] */ __RPC__in REFIID riid,
+ /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);
+
+ END_INTERFACE
+ } IDelayedPropertyStoreFactoryVtbl;
+
+ interface IDelayedPropertyStoreFactory
+ {
+ CONST_VTBL struct IDelayedPropertyStoreFactoryVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IDelayedPropertyStoreFactory_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IDelayedPropertyStoreFactory_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IDelayedPropertyStoreFactory_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IDelayedPropertyStoreFactory_GetPropertyStore(This,flags,pUnkFactory,riid,ppv) \
+ ( (This)->lpVtbl -> GetPropertyStore(This,flags,pUnkFactory,riid,ppv) )
+
+#define IDelayedPropertyStoreFactory_GetPropertyStoreForKeys(This,rgKeys,cKeys,flags,riid,ppv) \
+ ( (This)->lpVtbl -> GetPropertyStoreForKeys(This,rgKeys,cKeys,flags,riid,ppv) )
+
+
+#define IDelayedPropertyStoreFactory_GetDelayedPropertyStore(This,flags,dwStoreId,riid,ppv) \
+ ( (This)->lpVtbl -> GetDelayedPropertyStore(This,flags,dwStoreId,riid,ppv) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IDelayedPropertyStoreFactory_INTERFACE_DEFINED__ */
+
+
+/* interface __MIDL_itf_propsys_0000_0018 */
+/* [local] */
+
+/* [v1_enum] */
+enum tagPERSIST_SPROPSTORE_FLAGS
+ { FPSPS_READONLY = 0x1
+ } ;
+typedef int PERSIST_SPROPSTORE_FLAGS;
+
+typedef struct tagSERIALIZEDPROPSTORAGE SERIALIZEDPROPSTORAGE;
+
+typedef SERIALIZEDPROPSTORAGE __unaligned *PUSERIALIZEDPROPSTORAGE;
+
+typedef const SERIALIZEDPROPSTORAGE __unaligned *PCUSERIALIZEDPROPSTORAGE;
+
+
+
+extern RPC_IF_HANDLE __MIDL_itf_propsys_0000_0018_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_propsys_0000_0018_v0_0_s_ifspec;
+
+#ifndef __IPersistSerializedPropStorage_INTERFACE_DEFINED__
+#define __IPersistSerializedPropStorage_INTERFACE_DEFINED__
+
+/* interface IPersistSerializedPropStorage */
+/* [object][local][unique][uuid] */
+
+
+EXTERN_C const IID IID_IPersistSerializedPropStorage;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("e318ad57-0aa0-450f-aca5-6fab7103d917")
+ IPersistSerializedPropStorage : public IUnknown
+ {
+ public:
+ virtual HRESULT STDMETHODCALLTYPE SetFlags(
+ /* [in] */ PERSIST_SPROPSTORE_FLAGS flags) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE SetPropertyStorage(
+ /* [in] */
+ __in_bcount(cb) PCUSERIALIZEDPROPSTORAGE psps,
+ /* [in] */
+ __in DWORD cb) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetPropertyStorage(
+ /* [out] */
+ __deref_out_bcount(*pcb) SERIALIZEDPROPSTORAGE **ppsps,
+ /* [out] */
+ __out DWORD *pcb) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct IPersistSerializedPropStorageVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IPersistSerializedPropStorage * This,
+ /* [in] */ REFIID riid,
+ /* [iid_is][out] */
+ __RPC__deref_out void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IPersistSerializedPropStorage * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IPersistSerializedPropStorage * This);
+
+ HRESULT ( STDMETHODCALLTYPE *SetFlags )(
+ IPersistSerializedPropStorage * This,
+ /* [in] */ PERSIST_SPROPSTORE_FLAGS flags);
+
+ HRESULT ( STDMETHODCALLTYPE *SetPropertyStorage )(
+ IPersistSerializedPropStorage * This,
+ /* [in] */
+ __in_bcount(cb) PCUSERIALIZEDPROPSTORAGE psps,
+ /* [in] */
+ __in DWORD cb);
+
+ HRESULT ( STDMETHODCALLTYPE *GetPropertyStorage )(
+ IPersistSerializedPropStorage * This,
+ /* [out] */
+ __deref_out_bcount(*pcb) SERIALIZEDPROPSTORAGE **ppsps,
+ /* [out] */
+ __out DWORD *pcb);
+
+ END_INTERFACE
+ } IPersistSerializedPropStorageVtbl;
+
+ interface IPersistSerializedPropStorage
+ {
+ CONST_VTBL struct IPersistSerializedPropStorageVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IPersistSerializedPropStorage_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IPersistSerializedPropStorage_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IPersistSerializedPropStorage_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IPersistSerializedPropStorage_SetFlags(This,flags) \
+ ( (This)->lpVtbl -> SetFlags(This,flags) )
+
+#define IPersistSerializedPropStorage_SetPropertyStorage(This,psps,cb) \
+ ( (This)->lpVtbl -> SetPropertyStorage(This,psps,cb) )
+
+#define IPersistSerializedPropStorage_GetPropertyStorage(This,ppsps,pcb) \
+ ( (This)->lpVtbl -> GetPropertyStorage(This,ppsps,pcb) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IPersistSerializedPropStorage_INTERFACE_DEFINED__ */
+
+
+#ifndef __IPropertySystemChangeNotify_INTERFACE_DEFINED__
+#define __IPropertySystemChangeNotify_INTERFACE_DEFINED__
+
+/* interface IPropertySystemChangeNotify */
+/* [unique][object][uuid] */
+
+
+EXTERN_C const IID IID_IPropertySystemChangeNotify;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("fa955fd9-38be-4879-a6ce-824cf52d609f")
+ IPropertySystemChangeNotify : public IUnknown
+ {
+ public:
+ virtual HRESULT STDMETHODCALLTYPE SchemaRefreshed( void) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct IPropertySystemChangeNotifyVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IPropertySystemChangeNotify * This,
+ /* [in] */ __RPC__in REFIID riid,
+ /* [iid_is][out] */
+ __RPC__deref_out void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IPropertySystemChangeNotify * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IPropertySystemChangeNotify * This);
+
+ HRESULT ( STDMETHODCALLTYPE *SchemaRefreshed )(
+ IPropertySystemChangeNotify * This);
+
+ END_INTERFACE
+ } IPropertySystemChangeNotifyVtbl;
+
+ interface IPropertySystemChangeNotify
+ {
+ CONST_VTBL struct IPropertySystemChangeNotifyVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IPropertySystemChangeNotify_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IPropertySystemChangeNotify_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IPropertySystemChangeNotify_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IPropertySystemChangeNotify_SchemaRefreshed(This) \
+ ( (This)->lpVtbl -> SchemaRefreshed(This) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IPropertySystemChangeNotify_INTERFACE_DEFINED__ */
+
+
+#ifndef __ICreateObject_INTERFACE_DEFINED__
+#define __ICreateObject_INTERFACE_DEFINED__
+
+/* interface ICreateObject */
+/* [object][unique][uuid] */
+
+
+EXTERN_C const IID IID_ICreateObject;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("75121952-e0d0-43e5-9380-1d80483acf72")
+ ICreateObject : public IUnknown
+ {
+ public:
+ virtual HRESULT STDMETHODCALLTYPE CreateObject(
+ /* [in] */ __RPC__in REFCLSID clsid,
+ /* [unique][in] */ __RPC__in_opt IUnknown *pUnkOuter,
+ /* [in] */ __RPC__in REFIID riid,
+ /* [iid_is][out] */ __RPC__deref_out_opt void **ppv) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct ICreateObjectVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ ICreateObject * This,
+ /* [in] */ __RPC__in REFIID riid,
+ /* [iid_is][out] */
+ __RPC__deref_out void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ ICreateObject * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ ICreateObject * This);
+
+ HRESULT ( STDMETHODCALLTYPE *CreateObject )(
+ ICreateObject * This,
+ /* [in] */ __RPC__in REFCLSID clsid,
+ /* [unique][in] */ __RPC__in_opt IUnknown *pUnkOuter,
+ /* [in] */ __RPC__in REFIID riid,
+ /* [iid_is][out] */ __RPC__deref_out_opt void **ppv);
+
+ END_INTERFACE
+ } ICreateObjectVtbl;
+
+ interface ICreateObject
+ {
+ CONST_VTBL struct ICreateObjectVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define ICreateObject_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define ICreateObject_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define ICreateObject_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define ICreateObject_CreateObject(This,clsid,pUnkOuter,riid,ppv) \
+ ( (This)->lpVtbl -> CreateObject(This,clsid,pUnkOuter,riid,ppv) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __ICreateObject_INTERFACE_DEFINED__ */
+
+
+/* interface __MIDL_itf_propsys_0000_0021 */
+/* [local] */
+
+// Format a property value for display purposes
+PSSTDAPI PSFormatForDisplay(
+ __in REFPROPERTYKEY propkey,
+ __in REFPROPVARIANT propvar,
+ __in PROPDESC_FORMAT_FLAGS pdfFlags,
+ __out_ecount(cchText) LPWSTR pwszText,
+ __in DWORD cchText);
+
+PSSTDAPI PSFormatForDisplayAlloc(
+ __in REFPROPERTYKEY key,
+ __in REFPROPVARIANT propvar,
+ __in PROPDESC_FORMAT_FLAGS pdff,
+ __deref_out PWSTR *ppszDisplay);
+
+PSSTDAPI PSFormatPropertyValue(
+ __in IPropertyStore *pps,
+ __in IPropertyDescription *ppd,
+ __in PROPDESC_FORMAT_FLAGS pdff,
+ __deref_out LPWSTR *ppszDisplay);
+
+
+#define PKEY_PIDSTR_MAX 10 // will take care of any long integer value
+#define GUIDSTRING_MAX (1 + 8 + 1 + 4 + 1 + 4 + 1 + 4 + 1 + 12 + 1 + 1) // "{12345678-1234-1234-1234-123456789012}"
+#define PKEYSTR_MAX (GUIDSTRING_MAX + 1 + PKEY_PIDSTR_MAX)
+
+// Convert a PROPERTYKEY to and from a PWSTR
+PSSTDAPI PSStringFromPropertyKey(
+ __in REFPROPERTYKEY pkey,
+ __out_ecount(cch) LPWSTR psz,
+ __in UINT cch);
+
+PSSTDAPI PSPropertyKeyFromString(
+ __in LPCWSTR pszString,
+ __out PROPERTYKEY *pkey);
+
+
+// Creates an in-memory property store
+// Returns an IPropertyStore, IPersistSerializedPropStorage, and related interfaces interface
+PSSTDAPI PSCreateMemoryPropertyStore(
+ __in REFIID riid,
+ __deref_out void **ppv);
+
+
+// Create a read-only, delay-bind multiplexing property store
+// Returns an IPropertyStore interface or related interfaces
+PSSTDAPI PSCreateDelayedMultiplexPropertyStore(
+ __in GETPROPERTYSTOREFLAGS flags,
+ __in IDelayedPropertyStoreFactory *pdpsf,
+ __in_ecount(cStores) const DWORD *rgStoreIds,
+ __in DWORD cStores,
+ __in REFIID riid,
+ __deref_out void **ppv);
+
+
+// Create a read-only property store from one or more sources (which each must support either IPropertyStore or IPropertySetStorage)
+// Returns an IPropertyStore interface or related interfaces
+PSSTDAPI PSCreateMultiplexPropertyStore(
+ __in_ecount(cStores) IUnknown **prgpunkStores,
+ __in DWORD cStores,
+ __in REFIID riid,
+ __deref_out void **ppv);
+
+
+// Create a container for IPropertyChanges
+// Returns an IPropertyChangeArray interface
+PSSTDAPI PSCreatePropertyChangeArray(
+ __in_ecount_opt(cChanges) const PROPERTYKEY *rgpropkey,
+ __in_ecount_opt(cChanges) const PKA_FLAGS *rgflags,
+ __in_ecount_opt(cChanges) const PROPVARIANT *rgpropvar,
+ __in UINT cChanges,
+ __in REFIID riid,
+ __deref_out void **ppv);
+
+
+// Create a simple property change
+// Returns an IPropertyChange interface
+PSSTDAPI PSCreateSimplePropertyChange(
+ __in PKA_FLAGS flags,
+ __in REFPROPERTYKEY key,
+ __in REFPROPVARIANT propvar,
+ __in REFIID riid,
+ __deref_out void **ppv);
+
+
+// Get a property description
+// Returns an IPropertyDescription interface
+PSSTDAPI PSGetPropertyDescription(
+ __in REFPROPERTYKEY propkey,
+ __in REFIID riid,
+ __deref_out void **ppv);
+
+PSSTDAPI PSGetPropertyDescriptionByName(
+ __in LPCWSTR pszCanonicalName,
+ __in REFIID riid,
+ __deref_out void **ppv);
+
+
+// Lookup a per-machine registered file property handler
+PSSTDAPI PSLookupPropertyHandlerCLSID(
+ __in PCWSTR pszFilePath,
+ __out CLSID *pclsid);
+// Get a property handler, on Vista or downlevel to XP
+// punkItem is a shell item created with an SHCreateItemXXX API
+// Returns an IPropertyStore
+PSSTDAPI PSGetItemPropertyHandler(
+ __in IUnknown *punkItem,
+ __in BOOL fReadWrite,
+ __in REFIID riid,
+ __deref_out void **ppv);
+
+
+// Get a property handler, on Vista or downlevel to XP
+// punkItem is a shell item created with an SHCreateItemXXX API
+// punkCreateObject supports ICreateObject
+// Returns an IPropertyStore
+PSSTDAPI PSGetItemPropertyHandlerWithCreateObject(
+ __in IUnknown *punkItem,
+ __in BOOL fReadWrite,
+ __in IUnknown *punkCreateObject,
+ __in REFIID riid,
+ __deref_out void **ppv);
+
+
+// Get or set a property value from a store
+PSSTDAPI PSGetPropertyValue(
+ __in IPropertyStore *pps,
+ __in IPropertyDescription *ppd,
+ __out PROPVARIANT *ppropvar);
+
+PSSTDAPI PSSetPropertyValue(
+ __in IPropertyStore *pps,
+ __in IPropertyDescription *ppd,
+ __in REFPROPVARIANT propvar);
+
+
+// Interact with the set of property descriptions
+PSSTDAPI PSRegisterPropertySchema(
+ __in PCWSTR pszPath);
+
+PSSTDAPI PSUnregisterPropertySchema(
+ __in PCWSTR pszPath);
+
+PSSTDAPI PSRefreshPropertySchema();
+
+// Returns either: IPropertyDescriptionList or IEnumUnknown interfaces
+PSSTDAPI PSEnumeratePropertyDescriptions(
+ __in PROPDESC_ENUMFILTER filterOn,
+ __in REFIID riid,
+ __deref_out void **ppv);
+
+
+// Convert between a PROPERTYKEY and its canonical name
+PSSTDAPI PSGetPropertyKeyFromName(
+ __in PCWSTR pszName,
+ __out PROPERTYKEY *ppropkey);
+
+PSSTDAPI PSGetNameFromPropertyKey(
+ __in REFPROPERTYKEY propkey,
+ __deref_out PWSTR *ppszCanonicalName);
+
+
+// Coerce and canonicalize a property value
+PSSTDAPI PSCoerceToCanonicalValue(
+ __in REFPROPERTYKEY key,
+ __inout PROPVARIANT *ppropvar);
+
+
+// Convert a 'prop:' string into a list of property descriptions
+// Returns an IPropertyDescriptionList interface
+PSSTDAPI PSGetPropertyDescriptionListFromString(
+ __in LPCWSTR pszPropList,
+ __in REFIID riid,
+ __deref_out void **ppv);
+
+
+// Wrap an IPropertySetStorage interface in an IPropertyStore interface
+// Returns an IPropertyStore or related interface
+PSSTDAPI PSCreatePropertyStoreFromPropertySetStorage(
+ __in IPropertySetStorage *ppss,
+ DWORD grfMode,
+ REFIID riid,
+ __deref_out void **ppv);
+
+
+// punkSource must support IPropertyStore or IPropertySetStorage
+// On success, the returned ppv is guaranteed to support IPropertyStore.
+// If punkSource already supports IPropertyStore, no wrapper is created.
+PSSTDAPI PSCreatePropertyStoreFromObject(
+ __in IUnknown *punk,
+ __in DWORD grfMode,
+ __in REFIID riid,
+ __deref_out void **ppv);
+
+
+// punkSource must support IPropertyStore
+// riid may be IPropertyStore, IPropertySetStorage, IPropertyStoreCapabilities, or IObjectProvider
+PSSTDAPI PSCreateAdapterFromPropertyStore(
+ __in IPropertyStore *pps,
+ __in REFIID riid,
+ __deref_out void **ppv);
+
+
+// Talk to the property system using an interface
+// Returns an IPropertySystem interface
+PSSTDAPI PSGetPropertySystem(
+ __in REFIID riid,
+ __deref_out void **ppv);
+
+
+// Obtain a value from serialized property storage
+PSSTDAPI PSGetPropertyFromPropertyStorage(
+ __in_bcount(cb) PCUSERIALIZEDPROPSTORAGE psps,
+ __in DWORD cb,
+ __in REFPROPERTYKEY rpkey,
+ __out PROPVARIANT *ppropvar);
+
+
+// Obtain a named value from serialized property storage
+PSSTDAPI PSGetNamedPropertyFromPropertyStorage(
+ __in_bcount(cb) PCUSERIALIZEDPROPSTORAGE psps,
+ __in DWORD cb,
+ __in LPCWSTR pszName,
+ __out PROPVARIANT *ppropvar);
+
+
+
+
+extern RPC_IF_HANDLE __MIDL_itf_propsys_0000_0021_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_propsys_0000_0021_v0_0_s_ifspec;
+
+
+#ifndef __PropSysObjects_LIBRARY_DEFINED__
+#define __PropSysObjects_LIBRARY_DEFINED__
+
+/* library PropSysObjects */
+/* [version][lcid][uuid] */
+
+
+EXTERN_C const IID LIBID_PropSysObjects;
+
+EXTERN_C const CLSID CLSID_InMemoryPropertyStore;
+
+#ifdef __cplusplus
+
+class DECLSPEC_UUID("9a02e012-6303-4e1e-b9a1-630f802592c5")
+InMemoryPropertyStore;
+#endif
+
+EXTERN_C const CLSID CLSID_PropertySystem;
+
+#ifdef __cplusplus
+
+class DECLSPEC_UUID("b8967f85-58ae-4f46-9fb2-5d7904798f4b")
+PropertySystem;
+#endif
+#endif /* __PropSysObjects_LIBRARY_DEFINED__ */
+
+/* Additional Prototypes for ALL interfaces */
+
+unsigned long __RPC_USER BSTR_UserSize( unsigned long *, unsigned long , BSTR * );
+unsigned char * __RPC_USER BSTR_UserMarshal( unsigned long *, unsigned char *, BSTR * );
+unsigned char * __RPC_USER BSTR_UserUnmarshal(unsigned long *, unsigned char *, BSTR * );
+void __RPC_USER BSTR_UserFree( unsigned long *, BSTR * );
+
+unsigned long __RPC_USER LPSAFEARRAY_UserSize( unsigned long *, unsigned long , LPSAFEARRAY * );
+unsigned char * __RPC_USER LPSAFEARRAY_UserMarshal( unsigned long *, unsigned char *, LPSAFEARRAY * );
+unsigned char * __RPC_USER LPSAFEARRAY_UserUnmarshal(unsigned long *, unsigned char *, LPSAFEARRAY * );
+void __RPC_USER LPSAFEARRAY_UserFree( unsigned long *, LPSAFEARRAY * );
+
+unsigned long __RPC_USER BSTR_UserSize64( unsigned long *, unsigned long , BSTR * );
+unsigned char * __RPC_USER BSTR_UserMarshal64( unsigned long *, unsigned char *, BSTR * );
+unsigned char * __RPC_USER BSTR_UserUnmarshal64(unsigned long *, unsigned char *, BSTR * );
+void __RPC_USER BSTR_UserFree64( unsigned long *, BSTR * );
+
+unsigned long __RPC_USER LPSAFEARRAY_UserSize64( unsigned long *, unsigned long , LPSAFEARRAY * );
+unsigned char * __RPC_USER LPSAFEARRAY_UserMarshal64( unsigned long *, unsigned char *, LPSAFEARRAY * );
+unsigned char * __RPC_USER LPSAFEARRAY_UserUnmarshal64(unsigned long *, unsigned char *, LPSAFEARRAY * );
+void __RPC_USER LPSAFEARRAY_UserFree64( unsigned long *, LPSAFEARRAY * );
+
+/* [local] */ HRESULT STDMETHODCALLTYPE IInitializeWithStream_Initialize_Proxy(
+ IInitializeWithStream * This,
+ /* [in] */ IStream *pstream,
+ /* [in] */ DWORD grfMode);
+
+
+/* [call_as] */ HRESULT STDMETHODCALLTYPE IInitializeWithStream_Initialize_Stub(
+ IInitializeWithStream * This,
+ /* [in] */ __RPC__in_opt IStream *pstream,
+ /* [in] */ DWORD grfMode);
+
+/* [local] */ HRESULT STDMETHODCALLTYPE IPropertyDescription_CoerceToCanonicalValue_Proxy(
+ IPropertyDescription * This,
+ /* [out][in] */ PROPVARIANT *ppropvar);
+
+
+/* [call_as] */ HRESULT STDMETHODCALLTYPE IPropertyDescription_CoerceToCanonicalValue_Stub(
+ IPropertyDescription * This,
+ /* [in] */ __RPC__in REFPROPVARIANT propvar,
+ /* [out] */ __RPC__out PROPVARIANT *ppropvar);
+
+
+
+/* end of Additional Prototypes */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
+
+
-#pragma once\r
-\r
-#if __GNUC__ >=3\r
-#pragma GCC system_header\r
-#endif\r
-\r
-#define RPC_range(min,max)\r
-\r
-#define __RPC__in \r
-#define __RPC__in_string\r
-#define __RPC__in_opt_string\r
-#define __RPC__deref_opt_in_opt\r
-#define __RPC__opt_in_opt_string\r
-#define __RPC__in_ecount(size) \r
-#define __RPC__in_ecount_full(size)\r
-#define __RPC__in_ecount_full_string(size)\r
-#define __RPC__in_ecount_part(size, length)\r
-#define __RPC__in_ecount_full_opt(size)\r
-#define __RPC__in_ecount_full_opt_string(size)\r
-#define __RPC__inout_ecount_full_opt_string(size)\r
-#define __RPC__in_ecount_part_opt(size, length)\r
-\r
-#define __RPC__deref_in \r
-#define __RPC__deref_in_string\r
-#define __RPC__deref_opt_in\r
-#define __RPC__deref_in_opt\r
-#define __RPC__deref_in_ecount(size) \r
-#define __RPC__deref_in_ecount_part(size, length) \r
-#define __RPC__deref_in_ecount_full(size) \r
-#define __RPC__deref_in_ecount_full_opt(size)\r
-#define __RPC__deref_in_ecount_full_string(size)\r
-#define __RPC__deref_in_ecount_full_opt_string(size)\r
-#define __RPC__deref_in_ecount_opt(size) \r
-#define __RPC__deref_in_ecount_opt_string(size)\r
-#define __RPC__deref_in_ecount_part_opt(size, length) \r
-\r
-// [out]\r
-#define __RPC__out \r
-#define __RPC__out_ecount(size) \r
-#define __RPC__out_ecount_part(size, length) \r
-#define __RPC__out_ecount_full(size)\r
-#define __RPC__out_ecount_full_string(size)\r
-\r
-// [in,out] \r
-#define __RPC__inout \r
-#define __RPC__inout_string\r
-#define __RPC__opt_inout\r
-#define __RPC__inout_ecount(size) \r
-#define __RPC__inout_ecount_part(size, length) \r
-#define __RPC__inout_ecount_full(size) \r
-#define __RPC__inout_ecount_full_string(size) \r
-\r
-// [in,unique] \r
-#define __RPC__in_opt \r
-#define __RPC__in_ecount_opt(size) \r
-\r
-\r
-// [in,out,unique] \r
-#define __RPC__inout_opt \r
-#define __RPC__inout_ecount_opt(size) \r
-#define __RPC__inout_ecount_part_opt(size, length) \r
-#define __RPC__inout_ecount_full_opt(size) \r
-#define __RPC__inout_ecount_full_string(size)\r
-\r
-// [out] **\r
-#define __RPC__deref_out \r
-#define __RPC__deref_out_string\r
-#define __RPC__deref_out_opt \r
-#define __RPC__deref_out_opt_string\r
-#define __RPC__deref_out_ecount(size) \r
-#define __RPC__deref_out_ecount_part(size, length) \r
-#define __RPC__deref_out_ecount_full(size) \r
-#define __RPC__deref_out_ecount_full_string(size)\r
-\r
-\r
-// [in,out] **, second pointer decoration. \r
-#define __RPC__deref_inout \r
-#define __RPC__deref_inout_string\r
-#define __RPC__deref_inout_opt \r
-#define __RPC__deref_inout_opt_string\r
-#define __RPC__deref_inout_ecount_full(size)\r
-#define __RPC__deref_inout_ecount_full_string(size)\r
-#define __RPC__deref_inout_ecount_opt(size) \r
-#define __RPC__deref_inout_ecount_part_opt(size, length) \r
-#define __RPC__deref_inout_ecount_full_opt(size) \r
-#define __RPC__deref_inout_ecount_full_opt_string(size) \r
-\r
-// #define __RPC_out_opt out_opt is not allowed in rpc\r
-\r
-// [in,out,unique] \r
-#define __RPC__deref_opt_inout \r
-#define __RPC__deref_opt_inout_string\r
-#define __RPC__deref_opt_inout_ecount(size) \r
-#define __RPC__deref_opt_inout_ecount_part(size, length) \r
-#define __RPC__deref_opt_inout_ecount_full(size) \r
-#define __RPC__deref_opt_inout_ecount_full_string(size)\r
-\r
-#define __RPC__deref_out_ecount_opt(size) \r
-#define __RPC__deref_out_ecount_part_opt(size, length) \r
-#define __RPC__deref_out_ecount_full_opt(size) \r
-#define __RPC__deref_out_ecount_full_opt_string(size)\r
-\r
-#define __RPC__deref_opt_inout_opt \r
-#define __RPC__deref_opt_inout_opt_string\r
-#define __RPC__deref_opt_inout_ecount_opt(size) \r
-#define __RPC__deref_opt_inout_ecount_part_opt(size, length) \r
-#define __RPC__deref_opt_inout_ecount_full_opt(size) \r
-#define __RPC__deref_opt_inout_ecount_full_opt_string(size) \r
-\r
-#define __RPC_full_pointer \r
-#define __RPC_unique_pointer\r
-#define __RPC_ref_pointer\r
-#define __RPC_string \r
+#pragma once
+
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
+#define RPC_range(min,max)
+
+#define __RPC__in
+#define __RPC__in_string
+#define __RPC__in_opt_string
+#define __RPC__deref_opt_in_opt
+#define __RPC__opt_in_opt_string
+#define __RPC__in_ecount(size)
+#define __RPC__in_ecount_full(size)
+#define __RPC__in_ecount_full_string(size)
+#define __RPC__in_ecount_part(size, length)
+#define __RPC__in_ecount_full_opt(size)
+#define __RPC__in_ecount_full_opt_string(size)
+#define __RPC__inout_ecount_full_opt_string(size)
+#define __RPC__in_ecount_part_opt(size, length)
+
+#define __RPC__deref_in
+#define __RPC__deref_in_string
+#define __RPC__deref_opt_in
+#define __RPC__deref_in_opt
+#define __RPC__deref_in_ecount(size)
+#define __RPC__deref_in_ecount_part(size, length)
+#define __RPC__deref_in_ecount_full(size)
+#define __RPC__deref_in_ecount_full_opt(size)
+#define __RPC__deref_in_ecount_full_string(size)
+#define __RPC__deref_in_ecount_full_opt_string(size)
+#define __RPC__deref_in_ecount_opt(size)
+#define __RPC__deref_in_ecount_opt_string(size)
+#define __RPC__deref_in_ecount_part_opt(size, length)
+
+// [out]
+#define __RPC__out
+#define __RPC__out_ecount(size)
+#define __RPC__out_ecount_part(size, length)
+#define __RPC__out_ecount_full(size)
+#define __RPC__out_ecount_full_string(size)
+
+// [in,out]
+#define __RPC__inout
+#define __RPC__inout_string
+#define __RPC__opt_inout
+#define __RPC__inout_ecount(size)
+#define __RPC__inout_ecount_part(size, length)
+#define __RPC__inout_ecount_full(size)
+#define __RPC__inout_ecount_full_string(size)
+
+// [in,unique]
+#define __RPC__in_opt
+#define __RPC__in_ecount_opt(size)
+
+
+// [in,out,unique]
+#define __RPC__inout_opt
+#define __RPC__inout_ecount_opt(size)
+#define __RPC__inout_ecount_part_opt(size, length)
+#define __RPC__inout_ecount_full_opt(size)
+#define __RPC__inout_ecount_full_string(size)
+
+// [out] **
+#define __RPC__deref_out
+#define __RPC__deref_out_string
+#define __RPC__deref_out_opt
+#define __RPC__deref_out_opt_string
+#define __RPC__deref_out_ecount(size)
+#define __RPC__deref_out_ecount_part(size, length)
+#define __RPC__deref_out_ecount_full(size)
+#define __RPC__deref_out_ecount_full_string(size)
+
+
+// [in,out] **, second pointer decoration.
+#define __RPC__deref_inout
+#define __RPC__deref_inout_string
+#define __RPC__deref_inout_opt
+#define __RPC__deref_inout_opt_string
+#define __RPC__deref_inout_ecount_full(size)
+#define __RPC__deref_inout_ecount_full_string(size)
+#define __RPC__deref_inout_ecount_opt(size)
+#define __RPC__deref_inout_ecount_part_opt(size, length)
+#define __RPC__deref_inout_ecount_full_opt(size)
+#define __RPC__deref_inout_ecount_full_opt_string(size)
+
+// #define __RPC_out_opt out_opt is not allowed in rpc
+
+// [in,out,unique]
+#define __RPC__deref_opt_inout
+#define __RPC__deref_opt_inout_string
+#define __RPC__deref_opt_inout_ecount(size)
+#define __RPC__deref_opt_inout_ecount_part(size, length)
+#define __RPC__deref_opt_inout_ecount_full(size)
+#define __RPC__deref_opt_inout_ecount_full_string(size)
+
+#define __RPC__deref_out_ecount_opt(size)
+#define __RPC__deref_out_ecount_part_opt(size, length)
+#define __RPC__deref_out_ecount_full_opt(size)
+#define __RPC__deref_out_ecount_full_opt_string(size)
+
+#define __RPC__deref_opt_inout_opt
+#define __RPC__deref_opt_inout_opt_string
+#define __RPC__deref_opt_inout_ecount_opt(size)
+#define __RPC__deref_opt_inout_ecount_part_opt(size, length)
+#define __RPC__deref_opt_inout_ecount_full_opt(size)
+#define __RPC__deref_opt_inout_ecount_full_opt_string(size)
+
+#define __RPC_full_pointer
+#define __RPC_unique_pointer
+#define __RPC_ref_pointer
+#define __RPC_string
-#pragma once\r
-\r
-#if __GNUC__ >=3\r
-#pragma GCC system_header\r
-#endif\r
-\r
-/*#define __null*/ // << Conflicts with GCC internal type __null\r
-#define __notnull\r
-#define __maybenull\r
-#define __readonly\r
-#define __notreadonly\r
-#define __maybereadonly\r
-#define __valid\r
-#define __notvalid\r
-#define __maybevalid\r
-#define __readableTo(extent)\r
-#define __elem_readableTo(size)\r
-#define __byte_readableTo(size)\r
-#define __writableTo(size)\r
-#define __elem_writableTo(size)\r
-#define __byte_writableTo(size)\r
-#define __deref\r
-#define __pre\r
-#define __post\r
-#define __precond(expr)\r
-#define __postcond(expr)\r
-#define __exceptthat\r
-#define __execeptthat\r
-#define __inner_success(expr)\r
-#define __inner_checkReturn\r
-#define __inner_typefix(ctype)\r
-#define __inner_override\r
-#define __inner_callback\r
-#define __inner_blocksOn(resource)\r
-#define __inner_fallthrough_dec\r
-#define __inner_fallthrough\r
-#define __refparam\r
-#define __inner_control_entrypoint(category)\r
-#define __inner_data_entrypoint(category)\r
-\r
-#define __ecount(size)\r
-#define __bcount(size)\r
-#define __in\r
-#define __in_ecount(size)\r
-#define __in_bcount(size)\r
-#define __in_z\r
-#define __in_ecount_z(size)\r
-#define __in_bcount_z(size)\r
-#define __in_nz\r
-#define __in_ecount_nz(size)\r
-#define __in_bcount_nz(size)\r
-#define __out\r
-#define __out_ecount(size)\r
-#define __out_bcount(size)\r
-#define __out_ecount_part(size,length)\r
-#define __out_bcount_part(size,length)\r
-#define __out_ecount_full(size)\r
-#define __out_bcount_full(size)\r
-#define __out_z\r
-#define __out_z_opt\r
-#define __out_ecount_z(size)\r
-#define __out_bcount_z(size)\r
-#define __out_ecount_part_z(size,length)\r
-#define __out_bcount_part_z(size,length)\r
-#define __out_ecount_full_z(size)\r
-#define __out_bcount_full_z(size)\r
-#define __out_nz\r
-#define __out_nz_opt\r
-#define __out_ecount_nz(size)\r
-#define __out_bcount_nz(size)\r
-#define __inout\r
-#define __inout_ecount(size)\r
-#define __inout_bcount(size)\r
-#define __inout_ecount_part(size,length)\r
-#define __inout_bcount_part(size,length)\r
-#define __inout_ecount_full(size)\r
-#define __inout_bcount_full(size)\r
-#define __inout_z\r
-#define __inout_ecount_z(size)\r
-#define __inout_bcount_z(size)\r
-#define __inout_nz\r
-#define __inout_ecount_nz(size)\r
-#define __inout_bcount_nz(size)\r
-#define __ecount_opt(size)\r
-#define __bcount_opt(size)\r
-#define __in_opt\r
-#define __in_ecount_opt(size)\r
-#define __in_bcount_opt(size)\r
-#define __in_z_opt\r
-#define __in_ecount_z_opt(size)\r
-#define __in_bcount_z_opt(size)\r
-#define __in_nz_opt\r
-#define __in_ecount_nz_opt(size)\r
-#define __in_bcount_nz_opt(size)\r
-#define __out_opt\r
-#define __out_ecount_opt(size)\r
-#define __out_bcount_opt(size)\r
-#define __out_ecount_part_opt(size,length)\r
-#define __out_bcount_part_opt(size,length)\r
-#define __out_ecount_full_opt(size)\r
-#define __out_bcount_full_opt(size)\r
-#define __out_ecount_z_opt(size)\r
-#define __out_bcount_z_opt(size)\r
-#define __out_ecount_part_z_opt(size,length)\r
-#define __out_bcount_part_z_opt(size,length)\r
-#define __out_ecount_full_z_opt(size)\r
-#define __out_bcount_full_z_opt(size)\r
-#define __out_ecount_nz_opt(size)\r
-#define __out_bcount_nz_opt(size)\r
-#define __inout_opt\r
-#define __inout_ecount_opt(size)\r
-#define __inout_bcount_opt(size)\r
-#define __inout_ecount_part_opt(size,length)\r
-#define __inout_bcount_part_opt(size,length)\r
-#define __inout_ecount_full_opt(size)\r
-#define __inout_bcount_full_opt(size)\r
-#define __inout_z_opt\r
-#define __inout_ecount_z_opt(size)\r
-#define __inout_ecount_z_opt(size)\r
-#define __inout_bcount_z_opt(size)\r
-#define __inout_nz_opt\r
-#define __inout_ecount_nz_opt(size)\r
-#define __inout_bcount_nz_opt(size)\r
-#define __deref_ecount(size)\r
-#define __deref_bcount(size)\r
-#define __deref_out\r
-#define __deref_out_ecount(size)\r
-#define __deref_out_bcount(size)\r
-#define __deref_out_ecount_part(size,length)\r
-#define __deref_out_bcount_part(size,length)\r
-#define __deref_out_ecount_full(size)\r
-#define __deref_out_bcount_full(size)\r
-#define __deref_out_z\r
-#define __deref_out_ecount_z(size)\r
-#define __deref_out_bcount_z(size)\r
-#define __deref_out_nz\r
-#define __deref_out_ecount_nz(size)\r
-#define __deref_out_bcount_nz(size)\r
-#define __deref_inout\r
-#define __deref_inout_z\r
-#define __deref_inout_ecount(size)\r
-#define __deref_inout_bcount(size)\r
-#define __deref_inout_ecount_part(size,length)\r
-#define __deref_inout_bcount_part(size,length)\r
-#define __deref_inout_ecount_full(size)\r
-#define __deref_inout_bcount_full(size)\r
-#define __deref_inout_z\r
-#define __deref_inout_ecount_z(size)\r
-#define __deref_inout_bcount_z(size)\r
-#define __deref_inout_nz\r
-#define __deref_inout_ecount_nz(size)\r
-#define __deref_inout_bcount_nz(size)\r
-#define __deref_ecount_opt(size)\r
-#define __deref_bcount_opt(size)\r
-#define __deref_out_opt\r
-#define __deref_out_ecount_opt(size)\r
-#define __deref_out_bcount_opt(size)\r
-#define __deref_out_ecount_part_opt(size,length)\r
-#define __deref_out_bcount_part_opt(size,length)\r
-#define __deref_out_ecount_full_opt(size)\r
-#define __deref_out_bcount_full_opt(size)\r
-#define __deref_out_z_opt\r
-#define __deref_out_ecount_z_opt(size)\r
-#define __deref_out_bcount_z_opt(size)\r
-#define __deref_out_nz_opt\r
-#define __deref_out_ecount_nz_opt(size)\r
-#define __deref_out_bcount_nz_opt(size)\r
-#define __deref_inout_opt\r
-#define __deref_inout_ecount_opt(size)\r
-#define __deref_inout_bcount_opt(size)\r
-#define __deref_inout_ecount_part_opt(size,length)\r
-#define __deref_inout_bcount_part_opt(size,length)\r
-#define __deref_inout_ecount_full_opt(size)\r
-#define __deref_inout_bcount_full_opt(size)\r
-#define __deref_inout_z_opt\r
-#define __deref_inout_ecount_z_opt(size)\r
-#define __deref_inout_bcount_z_opt(size)\r
-#define __deref_inout_nz_opt\r
-#define __deref_inout_ecount_nz_opt(size)\r
-#define __deref_inout_bcount_nz_opt(size)\r
-#define __deref_opt_ecount(size)\r
-#define __deref_opt_bcount(size)\r
-#define __deref_opt_out\r
-#define __deref_opt_out_z\r
-#define __deref_opt_out_ecount(size)\r
-#define __deref_opt_out_bcount(size)\r
-#define __deref_opt_out_ecount_part(size,length)\r
-#define __deref_opt_out_bcount_part(size,length)\r
-#define __deref_opt_out_ecount_full(size)\r
-#define __deref_opt_out_bcount_full(size)\r
-#define __deref_opt_inout\r
-#define __deref_opt_inout_ecount(size)\r
-#define __deref_opt_inout_bcount(size)\r
-#define __deref_opt_inout_ecount_part(size,length)\r
-#define __deref_opt_inout_bcount_part(size,length)\r
-#define __deref_opt_inout_ecount_full(size)\r
-#define __deref_opt_inout_bcount_full(size)\r
-#define __deref_opt_inout_z\r
-#define __deref_opt_inout_ecount_z(size)\r
-#define __deref_opt_inout_bcount_z(size)\r
-#define __deref_opt_inout_nz\r
-#define __deref_opt_inout_ecount_nz(size)\r
-#define __deref_opt_inout_bcount_nz(size)\r
-#define __deref_opt_ecount_opt(size)\r
-#define __deref_opt_bcount_opt(size)\r
-#define __deref_opt_out_opt\r
-#define __deref_opt_out_ecount_opt(size)\r
-#define __deref_opt_out_bcount_opt(size)\r
-#define __deref_opt_out_ecount_part_opt(size,length)\r
-#define __deref_opt_out_bcount_part_opt(size,length)\r
-#define __deref_opt_out_ecount_full_opt(size)\r
-#define __deref_opt_out_bcount_full_opt(size)\r
-#define __deref_opt_out_z_opt\r
-#define __deref_opt_out_ecount_z_opt(size)\r
-#define __deref_opt_out_bcount_z_opt(size)\r
-#define __deref_opt_out_nz_opt\r
-#define __deref_opt_out_ecount_nz_opt(size)\r
-#define __deref_opt_out_bcount_nz_opt(size)\r
-#define __deref_opt_inout_opt\r
-#define __deref_opt_inout_ecount_opt(size)\r
-#define __deref_opt_inout_bcount_opt(size)\r
-#define __deref_opt_inout_ecount_part_opt(size,length)\r
-#define __deref_opt_inout_bcount_part_opt(size,length)\r
-#define __deref_opt_inout_ecount_full_opt(size)\r
-#define __deref_opt_inout_bcount_full_opt(size)\r
-#define __deref_opt_inout_z_opt\r
-#define __deref_opt_inout_ecount_z_opt(size)\r
-#define __deref_opt_inout_bcount_z_opt(size)\r
-#define __deref_opt_inout_nz_opt\r
-#define __deref_opt_inout_ecount_nz_opt(size)\r
-#define __deref_opt_inout_bcount_nz_opt(size)\r
-\r
-#define __success(expr)\r
-#define __nullterminated\r
-#define __nullnullterminated\r
-#define __reserved\r
-#define __checkReturn\r
-#define __typefix(ctype)\r
-#define __override\r
-#define __callback\r
-#define __format_string\r
-#define __blocksOn(resource)\r
-#define __control_entrypoint(category)\r
-#define __data_entrypoint(category)\r
-\r
-#ifndef __fallthrough\r
- #define __fallthrough __inner_fallthrough\r
-#endif\r
-\r
-#ifndef __analysis_assume\r
- #define __analysis_assume(expr)\r
-#endif\r
+#pragma once
+
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
+/*#define __null*/ // << Conflicts with GCC internal type __null
+#define __notnull
+#define __maybenull
+#define __readonly
+#define __notreadonly
+#define __maybereadonly
+#define __valid
+#define __notvalid
+#define __maybevalid
+#define __readableTo(extent)
+#define __elem_readableTo(size)
+#define __byte_readableTo(size)
+#define __writableTo(size)
+#define __elem_writableTo(size)
+#define __byte_writableTo(size)
+#define __deref
+#define __pre
+#define __post
+#define __precond(expr)
+#define __postcond(expr)
+#define __exceptthat
+#define __execeptthat
+#define __inner_success(expr)
+#define __inner_checkReturn
+#define __inner_typefix(ctype)
+#define __inner_override
+#define __inner_callback
+#define __inner_blocksOn(resource)
+#define __inner_fallthrough_dec
+#define __inner_fallthrough
+#define __refparam
+#define __inner_control_entrypoint(category)
+#define __inner_data_entrypoint(category)
+
+#define __ecount(size)
+#define __bcount(size)
+#define __in
+#define __in_ecount(size)
+#define __in_bcount(size)
+#define __in_z
+#define __in_ecount_z(size)
+#define __in_bcount_z(size)
+#define __in_nz
+#define __in_ecount_nz(size)
+#define __in_bcount_nz(size)
+#define __out
+#define __out_ecount(size)
+#define __out_bcount(size)
+#define __out_ecount_part(size,length)
+#define __out_bcount_part(size,length)
+#define __out_ecount_full(size)
+#define __out_bcount_full(size)
+#define __out_z
+#define __out_z_opt
+#define __out_ecount_z(size)
+#define __out_bcount_z(size)
+#define __out_ecount_part_z(size,length)
+#define __out_bcount_part_z(size,length)
+#define __out_ecount_full_z(size)
+#define __out_bcount_full_z(size)
+#define __out_nz
+#define __out_nz_opt
+#define __out_ecount_nz(size)
+#define __out_bcount_nz(size)
+#define __inout
+#define __inout_ecount(size)
+#define __inout_bcount(size)
+#define __inout_ecount_part(size,length)
+#define __inout_bcount_part(size,length)
+#define __inout_ecount_full(size)
+#define __inout_bcount_full(size)
+#define __inout_z
+#define __inout_ecount_z(size)
+#define __inout_bcount_z(size)
+#define __inout_nz
+#define __inout_ecount_nz(size)
+#define __inout_bcount_nz(size)
+#define __ecount_opt(size)
+#define __bcount_opt(size)
+#define __in_opt
+#define __in_ecount_opt(size)
+#define __in_bcount_opt(size)
+#define __in_z_opt
+#define __in_ecount_z_opt(size)
+#define __in_bcount_z_opt(size)
+#define __in_nz_opt
+#define __in_ecount_nz_opt(size)
+#define __in_bcount_nz_opt(size)
+#define __out_opt
+#define __out_ecount_opt(size)
+#define __out_bcount_opt(size)
+#define __out_ecount_part_opt(size,length)
+#define __out_bcount_part_opt(size,length)
+#define __out_ecount_full_opt(size)
+#define __out_bcount_full_opt(size)
+#define __out_ecount_z_opt(size)
+#define __out_bcount_z_opt(size)
+#define __out_ecount_part_z_opt(size,length)
+#define __out_bcount_part_z_opt(size,length)
+#define __out_ecount_full_z_opt(size)
+#define __out_bcount_full_z_opt(size)
+#define __out_ecount_nz_opt(size)
+#define __out_bcount_nz_opt(size)
+#define __inout_opt
+#define __inout_ecount_opt(size)
+#define __inout_bcount_opt(size)
+#define __inout_ecount_part_opt(size,length)
+#define __inout_bcount_part_opt(size,length)
+#define __inout_ecount_full_opt(size)
+#define __inout_bcount_full_opt(size)
+#define __inout_z_opt
+#define __inout_ecount_z_opt(size)
+#define __inout_ecount_z_opt(size)
+#define __inout_bcount_z_opt(size)
+#define __inout_nz_opt
+#define __inout_ecount_nz_opt(size)
+#define __inout_bcount_nz_opt(size)
+#define __deref_ecount(size)
+#define __deref_bcount(size)
+#define __deref_out
+#define __deref_out_ecount(size)
+#define __deref_out_bcount(size)
+#define __deref_out_ecount_part(size,length)
+#define __deref_out_bcount_part(size,length)
+#define __deref_out_ecount_full(size)
+#define __deref_out_bcount_full(size)
+#define __deref_out_z
+#define __deref_out_ecount_z(size)
+#define __deref_out_bcount_z(size)
+#define __deref_out_nz
+#define __deref_out_ecount_nz(size)
+#define __deref_out_bcount_nz(size)
+#define __deref_inout
+#define __deref_inout_z
+#define __deref_inout_ecount(size)
+#define __deref_inout_bcount(size)
+#define __deref_inout_ecount_part(size,length)
+#define __deref_inout_bcount_part(size,length)
+#define __deref_inout_ecount_full(size)
+#define __deref_inout_bcount_full(size)
+#define __deref_inout_z
+#define __deref_inout_ecount_z(size)
+#define __deref_inout_bcount_z(size)
+#define __deref_inout_nz
+#define __deref_inout_ecount_nz(size)
+#define __deref_inout_bcount_nz(size)
+#define __deref_ecount_opt(size)
+#define __deref_bcount_opt(size)
+#define __deref_out_opt
+#define __deref_out_ecount_opt(size)
+#define __deref_out_bcount_opt(size)
+#define __deref_out_ecount_part_opt(size,length)
+#define __deref_out_bcount_part_opt(size,length)
+#define __deref_out_ecount_full_opt(size)
+#define __deref_out_bcount_full_opt(size)
+#define __deref_out_z_opt
+#define __deref_out_ecount_z_opt(size)
+#define __deref_out_bcount_z_opt(size)
+#define __deref_out_nz_opt
+#define __deref_out_ecount_nz_opt(size)
+#define __deref_out_bcount_nz_opt(size)
+#define __deref_inout_opt
+#define __deref_inout_ecount_opt(size)
+#define __deref_inout_bcount_opt(size)
+#define __deref_inout_ecount_part_opt(size,length)
+#define __deref_inout_bcount_part_opt(size,length)
+#define __deref_inout_ecount_full_opt(size)
+#define __deref_inout_bcount_full_opt(size)
+#define __deref_inout_z_opt
+#define __deref_inout_ecount_z_opt(size)
+#define __deref_inout_bcount_z_opt(size)
+#define __deref_inout_nz_opt
+#define __deref_inout_ecount_nz_opt(size)
+#define __deref_inout_bcount_nz_opt(size)
+#define __deref_opt_ecount(size)
+#define __deref_opt_bcount(size)
+#define __deref_opt_out
+#define __deref_opt_out_z
+#define __deref_opt_out_ecount(size)
+#define __deref_opt_out_bcount(size)
+#define __deref_opt_out_ecount_part(size,length)
+#define __deref_opt_out_bcount_part(size,length)
+#define __deref_opt_out_ecount_full(size)
+#define __deref_opt_out_bcount_full(size)
+#define __deref_opt_inout
+#define __deref_opt_inout_ecount(size)
+#define __deref_opt_inout_bcount(size)
+#define __deref_opt_inout_ecount_part(size,length)
+#define __deref_opt_inout_bcount_part(size,length)
+#define __deref_opt_inout_ecount_full(size)
+#define __deref_opt_inout_bcount_full(size)
+#define __deref_opt_inout_z
+#define __deref_opt_inout_ecount_z(size)
+#define __deref_opt_inout_bcount_z(size)
+#define __deref_opt_inout_nz
+#define __deref_opt_inout_ecount_nz(size)
+#define __deref_opt_inout_bcount_nz(size)
+#define __deref_opt_ecount_opt(size)
+#define __deref_opt_bcount_opt(size)
+#define __deref_opt_out_opt
+#define __deref_opt_out_ecount_opt(size)
+#define __deref_opt_out_bcount_opt(size)
+#define __deref_opt_out_ecount_part_opt(size,length)
+#define __deref_opt_out_bcount_part_opt(size,length)
+#define __deref_opt_out_ecount_full_opt(size)
+#define __deref_opt_out_bcount_full_opt(size)
+#define __deref_opt_out_z_opt
+#define __deref_opt_out_ecount_z_opt(size)
+#define __deref_opt_out_bcount_z_opt(size)
+#define __deref_opt_out_nz_opt
+#define __deref_opt_out_ecount_nz_opt(size)
+#define __deref_opt_out_bcount_nz_opt(size)
+#define __deref_opt_inout_opt
+#define __deref_opt_inout_ecount_opt(size)
+#define __deref_opt_inout_bcount_opt(size)
+#define __deref_opt_inout_ecount_part_opt(size,length)
+#define __deref_opt_inout_bcount_part_opt(size,length)
+#define __deref_opt_inout_ecount_full_opt(size)
+#define __deref_opt_inout_bcount_full_opt(size)
+#define __deref_opt_inout_z_opt
+#define __deref_opt_inout_ecount_z_opt(size)
+#define __deref_opt_inout_bcount_z_opt(size)
+#define __deref_opt_inout_nz_opt
+#define __deref_opt_inout_ecount_nz_opt(size)
+#define __deref_opt_inout_bcount_nz_opt(size)
+
+#define __success(expr)
+#define __nullterminated
+#define __nullnullterminated
+#define __reserved
+#define __checkReturn
+#define __typefix(ctype)
+#define __override
+#define __callback
+#define __format_string
+#define __blocksOn(resource)
+#define __control_entrypoint(category)
+#define __data_entrypoint(category)
+
+#ifndef __fallthrough
+ #define __fallthrough __inner_fallthrough
+#endif
+
+#ifndef __analysis_assume
+ #define __analysis_assume(expr)
+#endif
-/*\r
-\r
-Copyright (c) Microsoft Corporation. All rights reserved.\r
-\r
-Module Name:\r
-\r
- sdkddkver.h\r
-\r
-Abstract:\r
-\r
- Master include file for versioning windows SDK/DDK.\r
-\r
-*/\r
-\r
-#ifndef _INC_SDKDDKVER\r
-#define _INC_SDKDDKVER\r
-\r
-#pragma once\r
-\r
-//\r
-// _WIN32_WINNT version constants\r
-//\r
-#define _WIN32_WINNT_NT4 0x0400\r
-#define _WIN32_WINNT_WIN2K 0x0500\r
-#define _WIN32_WINNT_WINXP 0x0501\r
-#define _WIN32_WINNT_WS03 0x0502\r
-#define _WIN32_WINNT_LONGHORN 0x0600\r
-\r
-//\r
-// _WIN32_IE_ version constants\r
-//\r
-#define _WIN32_IE_IE20 0x0200\r
-#define _WIN32_IE_IE30 0x0300\r
-#define _WIN32_IE_IE302 0x0302\r
-#define _WIN32_IE_IE40 0x0400\r
-#define _WIN32_IE_IE401 0x0401\r
-#define _WIN32_IE_IE50 0x0500\r
-#define _WIN32_IE_IE501 0x0501\r
-#define _WIN32_IE_IE55 0x0550\r
-#define _WIN32_IE_IE60 0x0600\r
-#define _WIN32_IE_IE60SP1 0x0601\r
-#define _WIN32_IE_IE60SP2 0x0603\r
-#define _WIN32_IE_IE70 0x0700\r
-\r
-//\r
-// IE <-> OS version mapping\r
-//\r
-// NT4 supports IE versions 2.0 -> 6.0 SP1\r
-#define _WIN32_IE_NT4 _WIN32_IE_IE20\r
-#define _WIN32_IE_NT4SP1 _WIN32_IE_IE20\r
-#define _WIN32_IE_NT4SP2 _WIN32_IE_IE20\r
-#define _WIN32_IE_NT4SP3 _WIN32_IE_IE302\r
-#define _WIN32_IE_NT4SP4 _WIN32_IE_IE401\r
-#define _WIN32_IE_NT4SP5 _WIN32_IE_IE401\r
-#define _WIN32_IE_NT4SP6 _WIN32_IE_IE50\r
-// Win98 supports IE versions 4.01 -> 6.0 SP1\r
-#define _WIN32_IE_WIN98 _WIN32_IE_IE401\r
-// Win98SE supports IE versions 5.0 -> 6.0 SP1\r
-#define _WIN32_IE_WIN98SE _WIN32_IE_IE50\r
-// WinME supports IE versions 5.5 -> 6.0 SP1\r
-#define _WIN32_IE_WINME _WIN32_IE_IE55\r
-// Win2k supports IE versions 5.01 -> 6.0 SP1\r
-#define _WIN32_IE_WIN2K _WIN32_IE_IE501\r
-#define _WIN32_IE_WIN2KSP1 _WIN32_IE_IE501\r
-#define _WIN32_IE_WIN2KSP2 _WIN32_IE_IE501\r
-#define _WIN32_IE_WIN2KSP3 _WIN32_IE_IE501\r
-#define _WIN32_IE_WIN2KSP4 _WIN32_IE_IE501\r
-#define _WIN32_IE_XP _WIN32_IE_IE60\r
-#define _WIN32_IE_XPSP1 _WIN32_IE_IE60SP1\r
-#define _WIN32_IE_XPSP2 _WIN32_IE_IE60SP2\r
-#define _WIN32_IE_WS03 0x0602\r
-#define _WIN32_IE_WS03SP1 _WIN32_IE_IE60SP2\r
-#define _WIN32_IE_LONGHORN _WIN32_IE_IE70\r
-\r
-\r
-//\r
-// NTDDI version constants\r
-//\r
-#define NTDDI_WIN2K 0x05000000\r
-#define NTDDI_WIN2KSP1 0x05000100\r
-#define NTDDI_WIN2KSP2 0x05000200\r
-#define NTDDI_WIN2KSP3 0x05000300\r
-#define NTDDI_WIN2KSP4 0x05000400\r
-\r
-#define NTDDI_WINXP 0x05010000\r
-#define NTDDI_WINXPSP1 0x05010100\r
-#define NTDDI_WINXPSP2 0x05010200\r
-\r
-#define NTDDI_WS03 0x05020000\r
-#define NTDDI_WS03SP1 0x05020100\r
-\r
-#define NTDDI_LONGHORN 0x06000000\r
-\r
-//\r
-// masks for version macros\r
-//\r
-#define OSVERSION_MASK 0xFFFF0000\r
-#define SPVERSION_MASK 0x0000FF00\r
-#define SUBVERSION_MASK 0x000000FF\r
-\r
-\r
-//\r
-// macros to extract various version fields from the NTDDI version\r
-//\r
-#define OSVER(Version) ((Version) & OSVERSION_MASK)\r
-#define SPVER(Version) (((Version) & SPVERSION_MASK) >> 8)\r
-#define SUBVER(Version) (((Version) & SUBVERSION_MASK) )\r
-\r
-\r
-#if defined(DECLSPEC_DEPRECATED_DDK)\r
-\r
-// deprecate in 2k or later\r
-#if (NTDDI_VERSION >= NTDDI_WIN2K)\r
-#define DECLSPEC_DEPRECATED_DDK_WIN2K DECLSPEC_DEPRECATED_DDK\r
-#else\r
-#define DECLSPEC_DEPRECATED_DDK_WIN2K\r
-#endif\r
-\r
-// deprecate in XP or later\r
-#if (NTDDI_VERSION >= NTDDI_WINXP)\r
-#define DECLSPEC_DEPRECATED_DDK_WINXP DECLSPEC_DEPRECATED_DDK\r
-#else\r
-#define DECLSPEC_DEPRECATED_DDK_WINXP\r
-#endif\r
-\r
-// deprecate in WS03 or later\r
-#if (NTDDI_VERSION >= NTDDI_WS03)\r
-#define DECLSPEC_DEPRECATED_DDK_WIN2003 DECLSPEC_DEPRECATED_DDK\r
-#else\r
-#define DECLSPEC_DEPRECATED_DDK_WIN2003\r
-#endif\r
-\r
-// deprecate in WS03 or later\r
-#if (NTDDI_VERSION >= NTDDI_LONGHORN)\r
-#define DECLSPEC_DEPRECATED_DDK_LONGHORN DECLSPEC_DEPRECATED_DDK\r
-#else\r
-#define DECLSPEC_DEPRECATED_DDK_LONGHORN\r
-#endif\r
-\r
-#endif // defined(DECLSPEC_DEPRECATED_DDK)\r
-\r
-\r
-//\r
-// if versions aren't already defined, default to most current\r
-//\r
-\r
-#define NTDDI_VERSION_FROM_WIN32_WINNT2(ver) ver##0000\r
-#define NTDDI_VERSION_FROM_WIN32_WINNT(ver) NTDDI_VERSION_FROM_WIN32_WINNT2(ver)\r
-\r
-#if !defined(_WIN32_WINNT) && !defined(_CHICAGO_)\r
-#define _WIN32_WINNT 0x0600\r
-#endif\r
-\r
-#ifndef NTDDI_VERSION\r
-#ifdef _WIN32_WINNT\r
-// set NTDDI_VERSION based on _WIN32_WINNT\r
-#define NTDDI_VERSION NTDDI_VERSION_FROM_WIN32_WINNT(_WIN32_WINNT)\r
-#else\r
-#define NTDDI_VERSION 0x06000000\r
-#endif\r
-#endif\r
-\r
-#ifndef WINVER\r
-#ifdef _WIN32_WINNT\r
-// set WINVER based on _WIN32_WINNT\r
-#define WINVER _WIN32_WINNT\r
-#else\r
-#define WINVER 0x0600\r
-#endif\r
-#endif\r
-\r
-#ifndef _WIN32_IE\r
-#ifdef _WIN32_WINNT\r
-// set _WIN32_IE based on _WIN32_WINNT\r
-#if (_WIN32_WINNT <= _WIN32_WINNT_NT4)\r
-#define _WIN32_IE _WIN32_IE_IE50\r
-#elif (_WIN32_WINNT <= _WIN32_WINNT_WIN2K)\r
-#define _WIN32_IE _WIN32_IE_IE501\r
-#elif (_WIN32_WINNT <= _WIN32_WINNT_WINXP)\r
-#define _WIN32_IE _WIN32_IE_IE60\r
-#elif (_WIN32_WINNT <= _WIN32_WINNT_WS03)\r
-#define _WIN32_IE 0x0602\r
-#else\r
-#define _WIN32_IE 0x0700\r
-#endif\r
-#else\r
-#define _WIN32_IE 0x0700\r
-#endif\r
-#endif\r
-\r
-//\r
-// Sanity check for compatible versions\r
-//\r
-#if defined(_WIN32_WINNT) && !defined(MIDL_PASS) && !defined(RC_INVOKED)\r
-\r
-#if (defined(WINVER) && (WINVER < 0x0400) && (_WIN32_WINNT > 0x0400))\r
-#error WINVER setting conflicts with _WIN32_WINNT setting\r
-#endif\r
-\r
-#if (((OSVERSION_MASK & NTDDI_VERSION) == NTDDI_WIN2K) && (_WIN32_WINNT != _WIN32_WINNT_WIN2K))\r
-#error NTDDI_VERSION setting conflicts with _WIN32_WINNT setting\r
-#endif\r
-\r
-#if (((OSVERSION_MASK & NTDDI_VERSION) == NTDDI_WINXP) && (_WIN32_WINNT != _WIN32_WINNT_WINXP))\r
-#error NTDDI_VERSION setting conflicts with _WIN32_WINNT setting\r
-#endif\r
-\r
-#if (((OSVERSION_MASK & NTDDI_VERSION) == NTDDI_WS03) && (_WIN32_WINNT != _WIN32_WINNT_WS03))\r
-#error NTDDI_VERSION setting conflicts with _WIN32_WINNT setting\r
-#endif\r
-\r
-#if (((OSVERSION_MASK & NTDDI_VERSION) == NTDDI_LONGHORN) && (_WIN32_WINNT != _WIN32_WINNT_LONGHORN))\r
-#error NTDDI_VERSION setting conflicts with _WIN32_WINNT setting\r
-#endif\r
-\r
-#if ((_WIN32_WINNT < _WIN32_WINNT_WIN2K) && (_WIN32_IE > _WIN32_IE_IE60SP1))\r
-#error _WIN32_WINNT settings conflicts with _WIN32_IE setting\r
-#endif\r
-\r
-#endif // defined(_WIN32_WINNT) && !defined(MIDL_PASS) && !defined(_WINRESRC_)\r
-\r
-\r
-#endif // !_INC_SDKDDKVER\r
-\r
-\r
+/*
+
+Copyright (c) Microsoft Corporation. All rights reserved.
+
+Module Name:
+
+ sdkddkver.h
+
+Abstract:
+
+ Master include file for versioning windows SDK/DDK.
+
+*/
+
+#ifndef _INC_SDKDDKVER
+#define _INC_SDKDDKVER
+
+#pragma once
+
+//
+// _WIN32_WINNT version constants
+//
+#define _WIN32_WINNT_NT4 0x0400
+#define _WIN32_WINNT_WIN2K 0x0500
+#define _WIN32_WINNT_WINXP 0x0501
+#define _WIN32_WINNT_WS03 0x0502
+#define _WIN32_WINNT_LONGHORN 0x0600
+
+//
+// _WIN32_IE_ version constants
+//
+#define _WIN32_IE_IE20 0x0200
+#define _WIN32_IE_IE30 0x0300
+#define _WIN32_IE_IE302 0x0302
+#define _WIN32_IE_IE40 0x0400
+#define _WIN32_IE_IE401 0x0401
+#define _WIN32_IE_IE50 0x0500
+#define _WIN32_IE_IE501 0x0501
+#define _WIN32_IE_IE55 0x0550
+#define _WIN32_IE_IE60 0x0600
+#define _WIN32_IE_IE60SP1 0x0601
+#define _WIN32_IE_IE60SP2 0x0603
+#define _WIN32_IE_IE70 0x0700
+
+//
+// IE <-> OS version mapping
+//
+// NT4 supports IE versions 2.0 -> 6.0 SP1
+#define _WIN32_IE_NT4 _WIN32_IE_IE20
+#define _WIN32_IE_NT4SP1 _WIN32_IE_IE20
+#define _WIN32_IE_NT4SP2 _WIN32_IE_IE20
+#define _WIN32_IE_NT4SP3 _WIN32_IE_IE302
+#define _WIN32_IE_NT4SP4 _WIN32_IE_IE401
+#define _WIN32_IE_NT4SP5 _WIN32_IE_IE401
+#define _WIN32_IE_NT4SP6 _WIN32_IE_IE50
+// Win98 supports IE versions 4.01 -> 6.0 SP1
+#define _WIN32_IE_WIN98 _WIN32_IE_IE401
+// Win98SE supports IE versions 5.0 -> 6.0 SP1
+#define _WIN32_IE_WIN98SE _WIN32_IE_IE50
+// WinME supports IE versions 5.5 -> 6.0 SP1
+#define _WIN32_IE_WINME _WIN32_IE_IE55
+// Win2k supports IE versions 5.01 -> 6.0 SP1
+#define _WIN32_IE_WIN2K _WIN32_IE_IE501
+#define _WIN32_IE_WIN2KSP1 _WIN32_IE_IE501
+#define _WIN32_IE_WIN2KSP2 _WIN32_IE_IE501
+#define _WIN32_IE_WIN2KSP3 _WIN32_IE_IE501
+#define _WIN32_IE_WIN2KSP4 _WIN32_IE_IE501
+#define _WIN32_IE_XP _WIN32_IE_IE60
+#define _WIN32_IE_XPSP1 _WIN32_IE_IE60SP1
+#define _WIN32_IE_XPSP2 _WIN32_IE_IE60SP2
+#define _WIN32_IE_WS03 0x0602
+#define _WIN32_IE_WS03SP1 _WIN32_IE_IE60SP2
+#define _WIN32_IE_LONGHORN _WIN32_IE_IE70
+
+
+//
+// NTDDI version constants
+//
+#define NTDDI_WIN2K 0x05000000
+#define NTDDI_WIN2KSP1 0x05000100
+#define NTDDI_WIN2KSP2 0x05000200
+#define NTDDI_WIN2KSP3 0x05000300
+#define NTDDI_WIN2KSP4 0x05000400
+
+#define NTDDI_WINXP 0x05010000
+#define NTDDI_WINXPSP1 0x05010100
+#define NTDDI_WINXPSP2 0x05010200
+
+#define NTDDI_WS03 0x05020000
+#define NTDDI_WS03SP1 0x05020100
+
+#define NTDDI_LONGHORN 0x06000000
+
+//
+// masks for version macros
+//
+#define OSVERSION_MASK 0xFFFF0000
+#define SPVERSION_MASK 0x0000FF00
+#define SUBVERSION_MASK 0x000000FF
+
+
+//
+// macros to extract various version fields from the NTDDI version
+//
+#define OSVER(Version) ((Version) & OSVERSION_MASK)
+#define SPVER(Version) (((Version) & SPVERSION_MASK) >> 8)
+#define SUBVER(Version) (((Version) & SUBVERSION_MASK) )
+
+
+#if defined(DECLSPEC_DEPRECATED_DDK)
+
+// deprecate in 2k or later
+#if (NTDDI_VERSION >= NTDDI_WIN2K)
+#define DECLSPEC_DEPRECATED_DDK_WIN2K DECLSPEC_DEPRECATED_DDK
+#else
+#define DECLSPEC_DEPRECATED_DDK_WIN2K
+#endif
+
+// deprecate in XP or later
+#if (NTDDI_VERSION >= NTDDI_WINXP)
+#define DECLSPEC_DEPRECATED_DDK_WINXP DECLSPEC_DEPRECATED_DDK
+#else
+#define DECLSPEC_DEPRECATED_DDK_WINXP
+#endif
+
+// deprecate in WS03 or later
+#if (NTDDI_VERSION >= NTDDI_WS03)
+#define DECLSPEC_DEPRECATED_DDK_WIN2003 DECLSPEC_DEPRECATED_DDK
+#else
+#define DECLSPEC_DEPRECATED_DDK_WIN2003
+#endif
+
+// deprecate in WS03 or later
+#if (NTDDI_VERSION >= NTDDI_LONGHORN)
+#define DECLSPEC_DEPRECATED_DDK_LONGHORN DECLSPEC_DEPRECATED_DDK
+#else
+#define DECLSPEC_DEPRECATED_DDK_LONGHORN
+#endif
+
+#endif // defined(DECLSPEC_DEPRECATED_DDK)
+
+
+//
+// if versions aren't already defined, default to most current
+//
+
+#define NTDDI_VERSION_FROM_WIN32_WINNT2(ver) ver##0000
+#define NTDDI_VERSION_FROM_WIN32_WINNT(ver) NTDDI_VERSION_FROM_WIN32_WINNT2(ver)
+
+#if !defined(_WIN32_WINNT) && !defined(_CHICAGO_)
+#define _WIN32_WINNT 0x0600
+#endif
+
+#ifndef NTDDI_VERSION
+#ifdef _WIN32_WINNT
+// set NTDDI_VERSION based on _WIN32_WINNT
+#define NTDDI_VERSION NTDDI_VERSION_FROM_WIN32_WINNT(_WIN32_WINNT)
+#else
+#define NTDDI_VERSION 0x06000000
+#endif
+#endif
+
+#ifndef WINVER
+#ifdef _WIN32_WINNT
+// set WINVER based on _WIN32_WINNT
+#define WINVER _WIN32_WINNT
+#else
+#define WINVER 0x0600
+#endif
+#endif
+
+#ifndef _WIN32_IE
+#ifdef _WIN32_WINNT
+// set _WIN32_IE based on _WIN32_WINNT
+#if (_WIN32_WINNT <= _WIN32_WINNT_NT4)
+#define _WIN32_IE _WIN32_IE_IE50
+#elif (_WIN32_WINNT <= _WIN32_WINNT_WIN2K)
+#define _WIN32_IE _WIN32_IE_IE501
+#elif (_WIN32_WINNT <= _WIN32_WINNT_WINXP)
+#define _WIN32_IE _WIN32_IE_IE60
+#elif (_WIN32_WINNT <= _WIN32_WINNT_WS03)
+#define _WIN32_IE 0x0602
+#else
+#define _WIN32_IE 0x0700
+#endif
+#else
+#define _WIN32_IE 0x0700
+#endif
+#endif
+
+//
+// Sanity check for compatible versions
+//
+#if defined(_WIN32_WINNT) && !defined(MIDL_PASS) && !defined(RC_INVOKED)
+
+#if (defined(WINVER) && (WINVER < 0x0400) && (_WIN32_WINNT > 0x0400))
+#error WINVER setting conflicts with _WIN32_WINNT setting
+#endif
+
+#if (((OSVERSION_MASK & NTDDI_VERSION) == NTDDI_WIN2K) && (_WIN32_WINNT != _WIN32_WINNT_WIN2K))
+#error NTDDI_VERSION setting conflicts with _WIN32_WINNT setting
+#endif
+
+#if (((OSVERSION_MASK & NTDDI_VERSION) == NTDDI_WINXP) && (_WIN32_WINNT != _WIN32_WINNT_WINXP))
+#error NTDDI_VERSION setting conflicts with _WIN32_WINNT setting
+#endif
+
+#if (((OSVERSION_MASK & NTDDI_VERSION) == NTDDI_WS03) && (_WIN32_WINNT != _WIN32_WINNT_WS03))
+#error NTDDI_VERSION setting conflicts with _WIN32_WINNT setting
+#endif
+
+#if (((OSVERSION_MASK & NTDDI_VERSION) == NTDDI_LONGHORN) && (_WIN32_WINNT != _WIN32_WINNT_LONGHORN))
+#error NTDDI_VERSION setting conflicts with _WIN32_WINNT setting
+#endif
+
+#if ((_WIN32_WINNT < _WIN32_WINNT_WIN2K) && (_WIN32_IE > _WIN32_IE_IE60SP1))
+#error _WIN32_WINNT settings conflicts with _WIN32_IE setting
+#endif
+
+#endif // defined(_WIN32_WINNT) && !defined(MIDL_PASS) && !defined(_WINRESRC_)
+
+
+#endif // !_INC_SDKDDKVER
+
+
-\r
-\r
-/* this ALWAYS GENERATED file contains the definitions for the interfaces */\r
-\r
-\r
- /* File created by MIDL compiler version 7.00.0499 */\r
-/* Compiler settings for shtypes.idl:\r
- Oicf, W1, Zp8, env=Win32 (32b run)\r
- protocol : dce , ms_ext, c_ext, robust\r
- error checks: allocation ref bounds_check enum stub_data \r
- VC __declspec() decoration level: \r
- __declspec(uuid()), __declspec(selectany), __declspec(novtable)\r
- DECLSPEC_UUID(), MIDL_INTERFACE()\r
-*/\r
-//@@MIDL_FILE_HEADING( )\r
-\r
-#pragma warning( disable: 4049 ) /* more than 64k source lines */\r
-\r
-\r
-/* verify that the <rpcndr.h> version is high enough to compile this file*/\r
-#ifndef __REQUIRED_RPCNDR_H_VERSION__\r
-#define __REQUIRED_RPCNDR_H_VERSION__ 500\r
-#endif\r
-\r
-/* verify that the <rpcsal.h> version is high enough to compile this file*/\r
-#ifndef __REQUIRED_RPCSAL_H_VERSION__\r
-#define __REQUIRED_RPCSAL_H_VERSION__ 100\r
-#endif\r
-\r
-#include "rpc.h"\r
-#include "rpcndr.h"\r
-\r
-#ifndef __RPCNDR_H_VERSION__\r
-#error this stub requires an updated version of <rpcndr.h>\r
-#endif // __RPCNDR_H_VERSION__\r
-\r
-\r
-#ifndef __shtypes_h__\r
-#define __shtypes_h__\r
-\r
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)\r
-#pragma once\r
-#endif\r
-\r
-/* Forward Declarations */ \r
-\r
-/* header files for imported files */\r
-#include "wtypes.h"\r
-\r
-#ifdef __cplusplus\r
-extern "C"{\r
-#endif \r
-\r
-\r
-/* interface __MIDL_itf_shtypes_0000_0000 */\r
-/* [local] */ \r
-\r
-//+-------------------------------------------------------------------------\r
-//\r
-// Microsoft Windows\r
-// Copyright (c) Microsoft Corporation. All rights reserved.\r
-//\r
-//--------------------------------------------------------------------------\r
-//===========================================================================\r
-//\r
-// Object identifiers in the explorer's name space (ItemID and IDList)\r
-//\r
-// All the items that the user can browse with the explorer (such as files,\r
-// directories, servers, work-groups, etc.) has an identifier which is unique\r
-// among items within the parent folder. Those identifiers are called item\r
-// IDs (SHITEMID). Since all its parent folders have their own item IDs,\r
-// any items can be uniquely identified by a list of item IDs, which is called\r
-// an ID list (ITEMIDLIST).\r
-//\r
-// ID lists are almost always allocated by the task allocator (see some\r
-// description below as well as OLE 2.0 SDK) and may be passed across\r
-// some of shell interfaces (such as IShellFolder). Each item ID in an ID list\r
-// is only meaningful to its parent folder (which has generated it), and all\r
-// the clients must treat it as an opaque binary data except the first two\r
-// bytes, which indicates the size of the item ID.\r
-//\r
-// When a shell extension -- which implements the IShellFolder interace --\r
-// generates an item ID, it may put any information in it, not only the data\r
-// with that it needs to identifies the item, but also some additional\r
-// information, which would help implementing some other functions efficiently.\r
-// For example, the shell's IShellFolder implementation of file system items\r
-// stores the primary (long) name of a file or a directory as the item\r
-// identifier, but it also stores its alternative (short) name, size and date\r
-// etc.\r
-//\r
-// When an ID list is passed to one of shell APIs (such as SHGetPathFromIDList),\r
-// it is always an absolute path -- relative from the root of the name space,\r
-// which is the desktop folder. When an ID list is passed to one of IShellFolder\r
-// member function, it is always a relative path from the folder (unless it\r
-// is explicitly specified).\r
-//\r
-//===========================================================================\r
-//\r
-// SHITEMID -- Item ID (mkid)\r
-// USHORT cb; // Size of the ID (including cb itself)\r
-// BYTE abID[]; // The item ID (variable length)\r
-//\r
-#include <pshpack1.h>\r
-typedef struct _SHITEMID\r
- {\r
- USHORT cb;\r
- BYTE abID[ 1 ];\r
- } SHITEMID;\r
-\r
-#include <poppack.h>\r
-#if defined(_M_IX86)\r
-#define __unaligned\r
-#endif // __unaligned\r
-typedef SHITEMID __unaligned *LPSHITEMID;\r
-\r
-typedef const SHITEMID __unaligned *LPCSHITEMID;\r
-\r
-//\r
-// ITEMIDLIST -- List if item IDs (combined with 0-terminator)\r
-//\r
-#include <pshpack1.h>\r
-typedef struct _ITEMIDLIST\r
- {\r
- SHITEMID mkid;\r
- } ITEMIDLIST;\r
-\r
-#if defined(STRICT_TYPED_ITEMIDS) && defined(__cplusplus)\r
-typedef struct _ITEMIDLIST_RELATIVE : ITEMIDLIST {} ITEMIDLIST_RELATIVE;\r
-typedef struct _ITEMID_CHILD : ITEMIDLIST_RELATIVE {} ITEMID_CHILD;\r
-typedef struct _ITEMIDLIST_ABSOLUTE : ITEMIDLIST_RELATIVE {} ITEMIDLIST_ABSOLUTE;\r
-#else // !(defined(STRICT_TYPED_ITEMIDS) && defined(__cplusplus))\r
-typedef ITEMIDLIST ITEMIDLIST_RELATIVE;\r
-\r
-typedef ITEMIDLIST ITEMID_CHILD;\r
-\r
-typedef ITEMIDLIST ITEMIDLIST_ABSOLUTE;\r
-\r
-#endif // defined(STRICT_TYPED_ITEMIDS) && defined(__cplusplus)\r
-#include <poppack.h>\r
-typedef /* [unique] */ __RPC_unique_pointer BYTE_BLOB *wirePIDL;\r
-\r
-typedef /* [wire_marshal] */ ITEMIDLIST __unaligned *LPITEMIDLIST;\r
-\r
-typedef /* [wire_marshal] */ const ITEMIDLIST __unaligned *LPCITEMIDLIST;\r
-\r
-#if defined(STRICT_TYPED_ITEMIDS) && defined(__cplusplus)\r
-typedef /* [wire_marshal] */ ITEMIDLIST_ABSOLUTE *PIDLIST_ABSOLUTE;\r
-\r
-typedef /* [wire_marshal] */ const ITEMIDLIST_ABSOLUTE *PCIDLIST_ABSOLUTE;\r
-\r
-typedef /* [wire_marshal] */ const ITEMIDLIST_ABSOLUTE __unaligned *PCUIDLIST_ABSOLUTE;\r
-\r
-typedef /* [wire_marshal] */ ITEMIDLIST_RELATIVE *PIDLIST_RELATIVE;\r
-\r
-typedef /* [wire_marshal] */ const ITEMIDLIST_RELATIVE *PCIDLIST_RELATIVE;\r
-\r
-typedef /* [wire_marshal] */ ITEMIDLIST_RELATIVE __unaligned *PUIDLIST_RELATIVE;\r
-\r
-typedef /* [wire_marshal] */ const ITEMIDLIST_RELATIVE __unaligned *PCUIDLIST_RELATIVE;\r
-\r
-typedef /* [wire_marshal] */ ITEMID_CHILD *PITEMID_CHILD;\r
-\r
-typedef /* [wire_marshal] */ const ITEMID_CHILD *PCITEMID_CHILD;\r
-\r
-typedef /* [wire_marshal] */ ITEMID_CHILD __unaligned *PUITEMID_CHILD;\r
-\r
-typedef /* [wire_marshal] */ const ITEMID_CHILD __unaligned *PCUITEMID_CHILD;\r
-\r
-typedef const PCUITEMID_CHILD *PCUITEMID_CHILD_ARRAY;\r
-\r
-typedef const PCUIDLIST_RELATIVE *PCUIDLIST_RELATIVE_ARRAY;\r
-\r
-typedef const PCIDLIST_ABSOLUTE *PCIDLIST_ABSOLUTE_ARRAY;\r
-\r
-typedef const PCUIDLIST_ABSOLUTE *PCUIDLIST_ABSOLUTE_ARRAY;\r
-\r
-#else // !(defined(STRICT_TYPED_ITEMIDS) && defined(__cplusplus))\r
-#define PIDLIST_ABSOLUTE LPITEMIDLIST\r
-#define PCIDLIST_ABSOLUTE LPCITEMIDLIST\r
-#define PCUIDLIST_ABSOLUTE LPCITEMIDLIST\r
-#define PIDLIST_RELATIVE LPITEMIDLIST\r
-#define PCIDLIST_RELATIVE LPCITEMIDLIST\r
-#define PUIDLIST_RELATIVE LPITEMIDLIST\r
-#define PCUIDLIST_RELATIVE LPCITEMIDLIST\r
-#define PITEMID_CHILD LPITEMIDLIST\r
-#define PCITEMID_CHILD LPCITEMIDLIST\r
-#define PUITEMID_CHILD LPITEMIDLIST\r
-#define PCUITEMID_CHILD LPCITEMIDLIST\r
-#define PCUITEMID_CHILD_ARRAY LPCITEMIDLIST *\r
-#define PCUIDLIST_RELATIVE_ARRAY LPCITEMIDLIST *\r
-#define PCIDLIST_ABSOLUTE_ARRAY LPCITEMIDLIST *\r
-#define PCUIDLIST_ABSOLUTE_ARRAY LPCITEMIDLIST *\r
-#endif // defined(STRICT_TYPED_ITEMIDS) && defined(__cplusplus)\r
-#ifdef MIDL_PASS\r
-typedef struct _WIN32_FIND_DATAA\r
- {\r
- DWORD dwFileAttributes;\r
- FILETIME ftCreationTime;\r
- FILETIME ftLastAccessTime;\r
- FILETIME ftLastWriteTime;\r
- DWORD nFileSizeHigh;\r
- DWORD nFileSizeLow;\r
- DWORD dwReserved0;\r
- DWORD dwReserved1;\r
- CHAR cFileName[ 260 ];\r
- CHAR cAlternateFileName[ 14 ];\r
- } WIN32_FIND_DATAA;\r
-\r
-typedef struct _WIN32_FIND_DATAA *PWIN32_FIND_DATAA;\r
-\r
-typedef struct _WIN32_FIND_DATAA *LPWIN32_FIND_DATAA;\r
-\r
-typedef struct _WIN32_FIND_DATAW\r
- {\r
- DWORD dwFileAttributes;\r
- FILETIME ftCreationTime;\r
- FILETIME ftLastAccessTime;\r
- FILETIME ftLastWriteTime;\r
- DWORD nFileSizeHigh;\r
- DWORD nFileSizeLow;\r
- DWORD dwReserved0;\r
- DWORD dwReserved1;\r
- WCHAR cFileName[ 260 ];\r
- WCHAR cAlternateFileName[ 14 ];\r
- } WIN32_FIND_DATAW;\r
-\r
-typedef struct _WIN32_FIND_DATAW *PWIN32_FIND_DATAW;\r
-\r
-typedef struct _WIN32_FIND_DATAW *LPWIN32_FIND_DATAW;\r
-\r
-#endif // MIDL_PASS\r
-//-------------------------------------------------------------------------\r
-//\r
-// struct STRRET\r
-//\r
-// structure for returning strings from IShellFolder member functions\r
-//\r
-//-------------------------------------------------------------------------\r
-//\r
-// uType indicate which union member to use \r
-// STRRET_WSTR Use STRRET.pOleStr must be freed by caller of GetDisplayNameOf\r
-// STRRET_OFFSET Use STRRET.uOffset Offset into SHITEMID for ANSI string \r
-// STRRET_CSTR Use STRRET.cStr ANSI Buffer\r
-//\r
-typedef /* [v1_enum] */ \r
-enum tagSTRRET_TYPE\r
- { STRRET_WSTR = 0,\r
- STRRET_OFFSET = 0x1,\r
- STRRET_CSTR = 0x2\r
- } STRRET_TYPE;\r
-\r
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)\r
-#pragma warning(push)\r
-#pragma warning(disable:4201) /* nonstandard extension used : nameless struct/union */\r
-#pragma once\r
-#endif\r
-#include <pshpack8.h>\r
-typedef struct _STRRET\r
- {\r
- UINT uType;\r
- union \r
- {\r
- LPWSTR pOleStr;\r
- UINT uOffset;\r
- char cStr[ 260 ];\r
- } DUMMYUNIONNAME;\r
- } STRRET;\r
-\r
-#include <poppack.h>\r
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)\r
-#pragma warning(pop)\r
-#endif\r
-typedef STRRET *LPSTRRET;\r
-\r
-//-------------------------------------------------------------------------\r
-//\r
-// struct SHELLDETAILS\r
-//\r
-// structure for returning strings from IShellDetails\r
-//\r
-//-------------------------------------------------------------------------\r
-//\r
-// fmt; // LVCFMT_* value (header only)\r
-// cxChar; // Number of 'average' characters (header only)\r
-// str; // String information\r
-//\r
-#include <pshpack1.h>\r
-typedef struct _SHELLDETAILS\r
- {\r
- int fmt;\r
- int cxChar;\r
- STRRET str;\r
- } SHELLDETAILS;\r
-\r
-typedef struct _SHELLDETAILS *LPSHELLDETAILS;\r
-\r
-#include <poppack.h>\r
-\r
-#if (_WIN32_IE >= _WIN32_IE_IE60SP2)\r
-typedef /* [v1_enum] */ \r
-enum tagPERCEIVED\r
- { PERCEIVED_TYPE_FIRST = -3,\r
- PERCEIVED_TYPE_CUSTOM = -3,\r
- PERCEIVED_TYPE_UNSPECIFIED = -2,\r
- PERCEIVED_TYPE_FOLDER = -1,\r
- PERCEIVED_TYPE_UNKNOWN = 0,\r
- PERCEIVED_TYPE_TEXT = 1,\r
- PERCEIVED_TYPE_IMAGE = 2,\r
- PERCEIVED_TYPE_AUDIO = 3,\r
- PERCEIVED_TYPE_VIDEO = 4,\r
- PERCEIVED_TYPE_COMPRESSED = 5,\r
- PERCEIVED_TYPE_DOCUMENT = 6,\r
- PERCEIVED_TYPE_SYSTEM = 7,\r
- PERCEIVED_TYPE_APPLICATION = 8,\r
- PERCEIVED_TYPE_GAMEMEDIA = 9,\r
- PERCEIVED_TYPE_CONTACTS = 10,\r
- PERCEIVED_TYPE_LAST = 10\r
- } PERCEIVED;\r
-\r
-#define PERCEIVEDFLAG_UNDEFINED 0x0000\r
-#define PERCEIVEDFLAG_SOFTCODED 0x0001\r
-#define PERCEIVEDFLAG_HARDCODED 0x0002\r
-#define PERCEIVEDFLAG_NATIVESUPPORT 0x0004\r
-#define PERCEIVEDFLAG_GDIPLUS 0x0010\r
-#define PERCEIVEDFLAG_WMSDK 0x0020\r
-#define PERCEIVEDFLAG_ZIPFOLDER 0x0040\r
-typedef DWORD PERCEIVEDFLAG;\r
-\r
-#endif // _WIN32_IE_IE60SP2\r
-\r
-#if (NTDDI_VERSION >= NTDDI_LONGHORN)\r
-typedef struct _COMDLG_FILTERSPEC\r
- {\r
- LPCWSTR pszName;\r
- LPCWSTR pszSpec;\r
- } COMDLG_FILTERSPEC;\r
-\r
-typedef struct tagMACHINE_ID\r
- {\r
- char szName[ 16 ];\r
- } MACHINE_ID;\r
-\r
-typedef struct tagDOMAIN_RELATIVE_OBJECTID\r
- {\r
- GUID guidVolume;\r
- GUID guidObject;\r
- } DOMAIN_RELATIVE_OBJECTID;\r
-\r
-typedef GUID KNOWNFOLDERID;\r
-\r
-#if 0\r
-typedef KNOWNFOLDERID *REFKNOWNFOLDERID;\r
-\r
-#endif // 0\r
-#ifdef __cplusplus\r
-#define REFKNOWNFOLDERID const KNOWNFOLDERID &\r
-#else // !__cplusplus\r
-#define REFKNOWNFOLDERID const KNOWNFOLDERID * __MIDL_CONST\r
-#endif // __cplusplus\r
-#endif // NTDDI_LONGHORN\r
-typedef GUID FOLDERTYPEID;\r
-\r
-#if 0\r
-typedef FOLDERTYPEID *REFFOLDERTYPEID;\r
-\r
-#endif // 0\r
-#ifdef __cplusplus\r
-#define REFFOLDERTYPEID const FOLDERTYPEID &\r
-#else // !__cplusplus\r
-#define REFFOLDERTYPEID const FOLDERTYPEID * __MIDL_CONST\r
-#endif // __cplusplus\r
-typedef GUID TASKOWNERID;\r
-\r
-#if 0\r
-typedef TASKOWNERID *REFTASKOWNERID;\r
-\r
-#endif // 0\r
-#ifdef __cplusplus\r
-#define REFTASKOWNERID const TASKOWNERID &\r
-#else // !__cplusplus\r
-#define REFTASKOWNERID const TASKOWNERID * __MIDL_CONST\r
-#endif // __cplusplus\r
-#ifndef LF_FACESIZE\r
-typedef struct tagLOGFONTA\r
- {\r
- LONG lfHeight;\r
- LONG lfWidth;\r
- LONG lfEscapement;\r
- LONG lfOrientation;\r
- LONG lfWeight;\r
- BYTE lfItalic;\r
- BYTE lfUnderline;\r
- BYTE lfStrikeOut;\r
- BYTE lfCharSet;\r
- BYTE lfOutPrecision;\r
- BYTE lfClipPrecision;\r
- BYTE lfQuality;\r
- BYTE lfPitchAndFamily;\r
- CHAR lfFaceName[ 32 ];\r
- } LOGFONTA;\r
-\r
-typedef struct tagLOGFONTW\r
- {\r
- LONG lfHeight;\r
- LONG lfWidth;\r
- LONG lfEscapement;\r
- LONG lfOrientation;\r
- LONG lfWeight;\r
- BYTE lfItalic;\r
- BYTE lfUnderline;\r
- BYTE lfStrikeOut;\r
- BYTE lfCharSet;\r
- BYTE lfOutPrecision;\r
- BYTE lfClipPrecision;\r
- BYTE lfQuality;\r
- BYTE lfPitchAndFamily;\r
- WCHAR lfFaceName[ 32 ];\r
- } LOGFONTW;\r
-\r
-typedef LOGFONTA LOGFONT;\r
-\r
-#endif // LF_FACESIZE\r
-typedef /* [v1_enum] */ \r
-enum tagSHCOLSTATE\r
- { SHCOLSTATE_TYPE_STR = 0x1,\r
- SHCOLSTATE_TYPE_INT = 0x2,\r
- SHCOLSTATE_TYPE_DATE = 0x3,\r
- SHCOLSTATE_TYPEMASK = 0xf,\r
- SHCOLSTATE_ONBYDEFAULT = 0x10,\r
- SHCOLSTATE_SLOW = 0x20,\r
- SHCOLSTATE_EXTENDED = 0x40,\r
- SHCOLSTATE_SECONDARYUI = 0x80,\r
- SHCOLSTATE_HIDDEN = 0x100,\r
- SHCOLSTATE_PREFER_VARCMP = 0x200,\r
- SHCOLSTATE_PREFER_FMTCMP = 0x400,\r
- SHCOLSTATE_NOSORTBYFOLDERNESS = 0x800,\r
- SHCOLSTATE_VIEWONLY = 0x10000,\r
- SHCOLSTATE_BATCHREAD = 0x20000,\r
- SHCOLSTATE_NO_GROUPBY = 0x40000,\r
- SHCOLSTATE_FIXED_WIDTH = 0x1000,\r
- SHCOLSTATE_NODPISCALE = 0x2000,\r
- SHCOLSTATE_FIXED_RATIO = 0x4000,\r
- SHCOLSTATE_DISPLAYMASK = 0xf000\r
- } SHCOLSTATE;\r
-\r
-typedef DWORD SHCOLSTATEF;\r
-\r
-typedef PROPERTYKEY SHCOLUMNID;\r
-\r
-typedef const SHCOLUMNID *LPCSHCOLUMNID;\r
-\r
-\r
-\r
-extern RPC_IF_HANDLE __MIDL_itf_shtypes_0000_0000_v0_0_c_ifspec;\r
-extern RPC_IF_HANDLE __MIDL_itf_shtypes_0000_0000_v0_0_s_ifspec;\r
-\r
-/* Additional Prototypes for ALL interfaces */\r
-\r
-/* end of Additional Prototypes */\r
-\r
-#ifdef __cplusplus\r
-}\r
-#endif\r
-\r
-#endif\r
-\r
-\r
-\r
+
+
+/* this ALWAYS GENERATED file contains the definitions for the interfaces */
+
+
+ /* File created by MIDL compiler version 7.00.0499 */
+/* Compiler settings for shtypes.idl:
+ Oicf, W1, Zp8, env=Win32 (32b run)
+ protocol : dce , ms_ext, c_ext, robust
+ error checks: allocation ref bounds_check enum stub_data
+ VC __declspec() decoration level:
+ __declspec(uuid()), __declspec(selectany), __declspec(novtable)
+ DECLSPEC_UUID(), MIDL_INTERFACE()
+*/
+//@@MIDL_FILE_HEADING( )
+
+#pragma warning( disable: 4049 ) /* more than 64k source lines */
+
+
+/* verify that the <rpcndr.h> version is high enough to compile this file*/
+#ifndef __REQUIRED_RPCNDR_H_VERSION__
+#define __REQUIRED_RPCNDR_H_VERSION__ 500
+#endif
+
+/* verify that the <rpcsal.h> version is high enough to compile this file*/
+#ifndef __REQUIRED_RPCSAL_H_VERSION__
+#define __REQUIRED_RPCSAL_H_VERSION__ 100
+#endif
+
+#include "rpc.h"
+#include "rpcndr.h"
+
+#ifndef __RPCNDR_H_VERSION__
+#error this stub requires an updated version of <rpcndr.h>
+#endif // __RPCNDR_H_VERSION__
+
+
+#ifndef __shtypes_h__
+#define __shtypes_h__
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#pragma once
+#endif
+
+/* Forward Declarations */
+
+/* header files for imported files */
+#include "wtypes.h"
+
+#ifdef __cplusplus
+extern "C"{
+#endif
+
+
+/* interface __MIDL_itf_shtypes_0000_0000 */
+/* [local] */
+
+//+-------------------------------------------------------------------------
+//
+// Microsoft Windows
+// Copyright (c) Microsoft Corporation. All rights reserved.
+//
+//--------------------------------------------------------------------------
+//===========================================================================
+//
+// Object identifiers in the explorer's name space (ItemID and IDList)
+//
+// All the items that the user can browse with the explorer (such as files,
+// directories, servers, work-groups, etc.) has an identifier which is unique
+// among items within the parent folder. Those identifiers are called item
+// IDs (SHITEMID). Since all its parent folders have their own item IDs,
+// any items can be uniquely identified by a list of item IDs, which is called
+// an ID list (ITEMIDLIST).
+//
+// ID lists are almost always allocated by the task allocator (see some
+// description below as well as OLE 2.0 SDK) and may be passed across
+// some of shell interfaces (such as IShellFolder). Each item ID in an ID list
+// is only meaningful to its parent folder (which has generated it), and all
+// the clients must treat it as an opaque binary data except the first two
+// bytes, which indicates the size of the item ID.
+//
+// When a shell extension -- which implements the IShellFolder interace --
+// generates an item ID, it may put any information in it, not only the data
+// with that it needs to identifies the item, but also some additional
+// information, which would help implementing some other functions efficiently.
+// For example, the shell's IShellFolder implementation of file system items
+// stores the primary (long) name of a file or a directory as the item
+// identifier, but it also stores its alternative (short) name, size and date
+// etc.
+//
+// When an ID list is passed to one of shell APIs (such as SHGetPathFromIDList),
+// it is always an absolute path -- relative from the root of the name space,
+// which is the desktop folder. When an ID list is passed to one of IShellFolder
+// member function, it is always a relative path from the folder (unless it
+// is explicitly specified).
+//
+//===========================================================================
+//
+// SHITEMID -- Item ID (mkid)
+// USHORT cb; // Size of the ID (including cb itself)
+// BYTE abID[]; // The item ID (variable length)
+//
+#include <pshpack1.h>
+typedef struct _SHITEMID
+ {
+ USHORT cb;
+ BYTE abID[ 1 ];
+ } SHITEMID;
+
+#include <poppack.h>
+#if defined(_M_IX86)
+#define __unaligned
+#endif // __unaligned
+typedef SHITEMID __unaligned *LPSHITEMID;
+
+typedef const SHITEMID __unaligned *LPCSHITEMID;
+
+//
+// ITEMIDLIST -- List if item IDs (combined with 0-terminator)
+//
+#include <pshpack1.h>
+typedef struct _ITEMIDLIST
+ {
+ SHITEMID mkid;
+ } ITEMIDLIST;
+
+#if defined(STRICT_TYPED_ITEMIDS) && defined(__cplusplus)
+typedef struct _ITEMIDLIST_RELATIVE : ITEMIDLIST {} ITEMIDLIST_RELATIVE;
+typedef struct _ITEMID_CHILD : ITEMIDLIST_RELATIVE {} ITEMID_CHILD;
+typedef struct _ITEMIDLIST_ABSOLUTE : ITEMIDLIST_RELATIVE {} ITEMIDLIST_ABSOLUTE;
+#else // !(defined(STRICT_TYPED_ITEMIDS) && defined(__cplusplus))
+typedef ITEMIDLIST ITEMIDLIST_RELATIVE;
+
+typedef ITEMIDLIST ITEMID_CHILD;
+
+typedef ITEMIDLIST ITEMIDLIST_ABSOLUTE;
+
+#endif // defined(STRICT_TYPED_ITEMIDS) && defined(__cplusplus)
+#include <poppack.h>
+typedef /* [unique] */ __RPC_unique_pointer BYTE_BLOB *wirePIDL;
+
+typedef /* [wire_marshal] */ ITEMIDLIST __unaligned *LPITEMIDLIST;
+
+typedef /* [wire_marshal] */ const ITEMIDLIST __unaligned *LPCITEMIDLIST;
+
+#if defined(STRICT_TYPED_ITEMIDS) && defined(__cplusplus)
+typedef /* [wire_marshal] */ ITEMIDLIST_ABSOLUTE *PIDLIST_ABSOLUTE;
+
+typedef /* [wire_marshal] */ const ITEMIDLIST_ABSOLUTE *PCIDLIST_ABSOLUTE;
+
+typedef /* [wire_marshal] */ const ITEMIDLIST_ABSOLUTE __unaligned *PCUIDLIST_ABSOLUTE;
+
+typedef /* [wire_marshal] */ ITEMIDLIST_RELATIVE *PIDLIST_RELATIVE;
+
+typedef /* [wire_marshal] */ const ITEMIDLIST_RELATIVE *PCIDLIST_RELATIVE;
+
+typedef /* [wire_marshal] */ ITEMIDLIST_RELATIVE __unaligned *PUIDLIST_RELATIVE;
+
+typedef /* [wire_marshal] */ const ITEMIDLIST_RELATIVE __unaligned *PCUIDLIST_RELATIVE;
+
+typedef /* [wire_marshal] */ ITEMID_CHILD *PITEMID_CHILD;
+
+typedef /* [wire_marshal] */ const ITEMID_CHILD *PCITEMID_CHILD;
+
+typedef /* [wire_marshal] */ ITEMID_CHILD __unaligned *PUITEMID_CHILD;
+
+typedef /* [wire_marshal] */ const ITEMID_CHILD __unaligned *PCUITEMID_CHILD;
+
+typedef const PCUITEMID_CHILD *PCUITEMID_CHILD_ARRAY;
+
+typedef const PCUIDLIST_RELATIVE *PCUIDLIST_RELATIVE_ARRAY;
+
+typedef const PCIDLIST_ABSOLUTE *PCIDLIST_ABSOLUTE_ARRAY;
+
+typedef const PCUIDLIST_ABSOLUTE *PCUIDLIST_ABSOLUTE_ARRAY;
+
+#else // !(defined(STRICT_TYPED_ITEMIDS) && defined(__cplusplus))
+#define PIDLIST_ABSOLUTE LPITEMIDLIST
+#define PCIDLIST_ABSOLUTE LPCITEMIDLIST
+#define PCUIDLIST_ABSOLUTE LPCITEMIDLIST
+#define PIDLIST_RELATIVE LPITEMIDLIST
+#define PCIDLIST_RELATIVE LPCITEMIDLIST
+#define PUIDLIST_RELATIVE LPITEMIDLIST
+#define PCUIDLIST_RELATIVE LPCITEMIDLIST
+#define PITEMID_CHILD LPITEMIDLIST
+#define PCITEMID_CHILD LPCITEMIDLIST
+#define PUITEMID_CHILD LPITEMIDLIST
+#define PCUITEMID_CHILD LPCITEMIDLIST
+#define PCUITEMID_CHILD_ARRAY LPCITEMIDLIST *
+#define PCUIDLIST_RELATIVE_ARRAY LPCITEMIDLIST *
+#define PCIDLIST_ABSOLUTE_ARRAY LPCITEMIDLIST *
+#define PCUIDLIST_ABSOLUTE_ARRAY LPCITEMIDLIST *
+#endif // defined(STRICT_TYPED_ITEMIDS) && defined(__cplusplus)
+#ifdef MIDL_PASS
+typedef struct _WIN32_FIND_DATAA
+ {
+ DWORD dwFileAttributes;
+ FILETIME ftCreationTime;
+ FILETIME ftLastAccessTime;
+ FILETIME ftLastWriteTime;
+ DWORD nFileSizeHigh;
+ DWORD nFileSizeLow;
+ DWORD dwReserved0;
+ DWORD dwReserved1;
+ CHAR cFileName[ 260 ];
+ CHAR cAlternateFileName[ 14 ];
+ } WIN32_FIND_DATAA;
+
+typedef struct _WIN32_FIND_DATAA *PWIN32_FIND_DATAA;
+
+typedef struct _WIN32_FIND_DATAA *LPWIN32_FIND_DATAA;
+
+typedef struct _WIN32_FIND_DATAW
+ {
+ DWORD dwFileAttributes;
+ FILETIME ftCreationTime;
+ FILETIME ftLastAccessTime;
+ FILETIME ftLastWriteTime;
+ DWORD nFileSizeHigh;
+ DWORD nFileSizeLow;
+ DWORD dwReserved0;
+ DWORD dwReserved1;
+ WCHAR cFileName[ 260 ];
+ WCHAR cAlternateFileName[ 14 ];
+ } WIN32_FIND_DATAW;
+
+typedef struct _WIN32_FIND_DATAW *PWIN32_FIND_DATAW;
+
+typedef struct _WIN32_FIND_DATAW *LPWIN32_FIND_DATAW;
+
+#endif // MIDL_PASS
+//-------------------------------------------------------------------------
+//
+// struct STRRET
+//
+// structure for returning strings from IShellFolder member functions
+//
+//-------------------------------------------------------------------------
+//
+// uType indicate which union member to use
+// STRRET_WSTR Use STRRET.pOleStr must be freed by caller of GetDisplayNameOf
+// STRRET_OFFSET Use STRRET.uOffset Offset into SHITEMID for ANSI string
+// STRRET_CSTR Use STRRET.cStr ANSI Buffer
+//
+typedef /* [v1_enum] */
+enum tagSTRRET_TYPE
+ { STRRET_WSTR = 0,
+ STRRET_OFFSET = 0x1,
+ STRRET_CSTR = 0x2
+ } STRRET_TYPE;
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+#pragma warning(push)
+#pragma warning(disable:4201) /* nonstandard extension used : nameless struct/union */
+#pragma once
+#endif
+#include <pshpack8.h>
+typedef struct _STRRET
+ {
+ UINT uType;
+ union
+ {
+ LPWSTR pOleStr;
+ UINT uOffset;
+ char cStr[ 260 ];
+ } DUMMYUNIONNAME;
+ } STRRET;
+
+#include <poppack.h>
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+#pragma warning(pop)
+#endif
+typedef STRRET *LPSTRRET;
+
+//-------------------------------------------------------------------------
+//
+// struct SHELLDETAILS
+//
+// structure for returning strings from IShellDetails
+//
+//-------------------------------------------------------------------------
+//
+// fmt; // LVCFMT_* value (header only)
+// cxChar; // Number of 'average' characters (header only)
+// str; // String information
+//
+#include <pshpack1.h>
+typedef struct _SHELLDETAILS
+ {
+ int fmt;
+ int cxChar;
+ STRRET str;
+ } SHELLDETAILS;
+
+typedef struct _SHELLDETAILS *LPSHELLDETAILS;
+
+#include <poppack.h>
+
+#if (_WIN32_IE >= _WIN32_IE_IE60SP2)
+typedef /* [v1_enum] */
+enum tagPERCEIVED
+ { PERCEIVED_TYPE_FIRST = -3,
+ PERCEIVED_TYPE_CUSTOM = -3,
+ PERCEIVED_TYPE_UNSPECIFIED = -2,
+ PERCEIVED_TYPE_FOLDER = -1,
+ PERCEIVED_TYPE_UNKNOWN = 0,
+ PERCEIVED_TYPE_TEXT = 1,
+ PERCEIVED_TYPE_IMAGE = 2,
+ PERCEIVED_TYPE_AUDIO = 3,
+ PERCEIVED_TYPE_VIDEO = 4,
+ PERCEIVED_TYPE_COMPRESSED = 5,
+ PERCEIVED_TYPE_DOCUMENT = 6,
+ PERCEIVED_TYPE_SYSTEM = 7,
+ PERCEIVED_TYPE_APPLICATION = 8,
+ PERCEIVED_TYPE_GAMEMEDIA = 9,
+ PERCEIVED_TYPE_CONTACTS = 10,
+ PERCEIVED_TYPE_LAST = 10
+ } PERCEIVED;
+
+#define PERCEIVEDFLAG_UNDEFINED 0x0000
+#define PERCEIVEDFLAG_SOFTCODED 0x0001
+#define PERCEIVEDFLAG_HARDCODED 0x0002
+#define PERCEIVEDFLAG_NATIVESUPPORT 0x0004
+#define PERCEIVEDFLAG_GDIPLUS 0x0010
+#define PERCEIVEDFLAG_WMSDK 0x0020
+#define PERCEIVEDFLAG_ZIPFOLDER 0x0040
+typedef DWORD PERCEIVEDFLAG;
+
+#endif // _WIN32_IE_IE60SP2
+
+#if (NTDDI_VERSION >= NTDDI_LONGHORN)
+typedef struct _COMDLG_FILTERSPEC
+ {
+ LPCWSTR pszName;
+ LPCWSTR pszSpec;
+ } COMDLG_FILTERSPEC;
+
+typedef struct tagMACHINE_ID
+ {
+ char szName[ 16 ];
+ } MACHINE_ID;
+
+typedef struct tagDOMAIN_RELATIVE_OBJECTID
+ {
+ GUID guidVolume;
+ GUID guidObject;
+ } DOMAIN_RELATIVE_OBJECTID;
+
+typedef GUID KNOWNFOLDERID;
+
+#if 0
+typedef KNOWNFOLDERID *REFKNOWNFOLDERID;
+
+#endif // 0
+#ifdef __cplusplus
+#define REFKNOWNFOLDERID const KNOWNFOLDERID &
+#else // !__cplusplus
+#define REFKNOWNFOLDERID const KNOWNFOLDERID * __MIDL_CONST
+#endif // __cplusplus
+#endif // NTDDI_LONGHORN
+typedef GUID FOLDERTYPEID;
+
+#if 0
+typedef FOLDERTYPEID *REFFOLDERTYPEID;
+
+#endif // 0
+#ifdef __cplusplus
+#define REFFOLDERTYPEID const FOLDERTYPEID &
+#else // !__cplusplus
+#define REFFOLDERTYPEID const FOLDERTYPEID * __MIDL_CONST
+#endif // __cplusplus
+typedef GUID TASKOWNERID;
+
+#if 0
+typedef TASKOWNERID *REFTASKOWNERID;
+
+#endif // 0
+#ifdef __cplusplus
+#define REFTASKOWNERID const TASKOWNERID &
+#else // !__cplusplus
+#define REFTASKOWNERID const TASKOWNERID * __MIDL_CONST
+#endif // __cplusplus
+#ifndef LF_FACESIZE
+typedef struct tagLOGFONTA
+ {
+ LONG lfHeight;
+ LONG lfWidth;
+ LONG lfEscapement;
+ LONG lfOrientation;
+ LONG lfWeight;
+ BYTE lfItalic;
+ BYTE lfUnderline;
+ BYTE lfStrikeOut;
+ BYTE lfCharSet;
+ BYTE lfOutPrecision;
+ BYTE lfClipPrecision;
+ BYTE lfQuality;
+ BYTE lfPitchAndFamily;
+ CHAR lfFaceName[ 32 ];
+ } LOGFONTA;
+
+typedef struct tagLOGFONTW
+ {
+ LONG lfHeight;
+ LONG lfWidth;
+ LONG lfEscapement;
+ LONG lfOrientation;
+ LONG lfWeight;
+ BYTE lfItalic;
+ BYTE lfUnderline;
+ BYTE lfStrikeOut;
+ BYTE lfCharSet;
+ BYTE lfOutPrecision;
+ BYTE lfClipPrecision;
+ BYTE lfQuality;
+ BYTE lfPitchAndFamily;
+ WCHAR lfFaceName[ 32 ];
+ } LOGFONTW;
+
+typedef LOGFONTA LOGFONT;
+
+#endif // LF_FACESIZE
+typedef /* [v1_enum] */
+enum tagSHCOLSTATE
+ { SHCOLSTATE_TYPE_STR = 0x1,
+ SHCOLSTATE_TYPE_INT = 0x2,
+ SHCOLSTATE_TYPE_DATE = 0x3,
+ SHCOLSTATE_TYPEMASK = 0xf,
+ SHCOLSTATE_ONBYDEFAULT = 0x10,
+ SHCOLSTATE_SLOW = 0x20,
+ SHCOLSTATE_EXTENDED = 0x40,
+ SHCOLSTATE_SECONDARYUI = 0x80,
+ SHCOLSTATE_HIDDEN = 0x100,
+ SHCOLSTATE_PREFER_VARCMP = 0x200,
+ SHCOLSTATE_PREFER_FMTCMP = 0x400,
+ SHCOLSTATE_NOSORTBYFOLDERNESS = 0x800,
+ SHCOLSTATE_VIEWONLY = 0x10000,
+ SHCOLSTATE_BATCHREAD = 0x20000,
+ SHCOLSTATE_NO_GROUPBY = 0x40000,
+ SHCOLSTATE_FIXED_WIDTH = 0x1000,
+ SHCOLSTATE_NODPISCALE = 0x2000,
+ SHCOLSTATE_FIXED_RATIO = 0x4000,
+ SHCOLSTATE_DISPLAYMASK = 0xf000
+ } SHCOLSTATE;
+
+typedef DWORD SHCOLSTATEF;
+
+typedef PROPERTYKEY SHCOLUMNID;
+
+typedef const SHCOLUMNID *LPCSHCOLUMNID;
+
+
+
+extern RPC_IF_HANDLE __MIDL_itf_shtypes_0000_0000_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_shtypes_0000_0000_v0_0_s_ifspec;
+
+/* Additional Prototypes for ALL interfaces */
+
+/* end of Additional Prototypes */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
+
+
-\r
-\r
-/* this ALWAYS GENERATED file contains the definitions for the interfaces */\r
-\r
-\r
- /* File created by MIDL compiler version 7.00.0499 */\r
-/* Compiler settings for structuredquery.idl:\r
- Oicf, W1, Zp8, env=Win32 (32b run)\r
- protocol : dce , ms_ext, c_ext, robust\r
- error checks: allocation ref bounds_check enum stub_data \r
- VC __declspec() decoration level: \r
- __declspec(uuid()), __declspec(selectany), __declspec(novtable)\r
- DECLSPEC_UUID(), MIDL_INTERFACE()\r
-*/\r
-//@@MIDL_FILE_HEADING( )\r
-\r
-#pragma warning( disable: 4049 ) /* more than 64k source lines */\r
-\r
-\r
-/* verify that the <rpcndr.h> version is high enough to compile this file*/\r
-#ifndef __REQUIRED_RPCNDR_H_VERSION__\r
-#define __REQUIRED_RPCNDR_H_VERSION__ 475\r
-#endif\r
-\r
-/* verify that the <rpcsal.h> version is high enough to compile this file*/\r
-#ifndef __REQUIRED_RPCSAL_H_VERSION__\r
-#define __REQUIRED_RPCSAL_H_VERSION__ 100\r
-#endif\r
-\r
-#include "rpc.h"\r
-#include "rpcndr.h"\r
-\r
-#ifndef __RPCNDR_H_VERSION__\r
-#error this stub requires an updated version of <rpcndr.h>\r
-#endif // __RPCNDR_H_VERSION__\r
-\r
-#ifndef COM_NO_WINDOWS_H\r
-#include "windows.h"\r
-#include "ole2.h"\r
-#endif /*COM_NO_WINDOWS_H*/\r
-\r
-#ifndef __structuredquery_h__\r
-#define __structuredquery_h__\r
-\r
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)\r
-#pragma once\r
-#endif\r
-\r
-/* Forward Declarations */ \r
-\r
-#ifndef __IQueryParser_FWD_DEFINED__\r
-#define __IQueryParser_FWD_DEFINED__\r
-typedef interface IQueryParser IQueryParser;\r
-#endif /* __IQueryParser_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __IConditionFactory_FWD_DEFINED__\r
-#define __IConditionFactory_FWD_DEFINED__\r
-typedef interface IConditionFactory IConditionFactory;\r
-#endif /* __IConditionFactory_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __IQuerySolution_FWD_DEFINED__\r
-#define __IQuerySolution_FWD_DEFINED__\r
-typedef interface IQuerySolution IQuerySolution;\r
-#endif /* __IQuerySolution_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __ICondition_FWD_DEFINED__\r
-#define __ICondition_FWD_DEFINED__\r
-typedef interface ICondition ICondition;\r
-#endif /* __ICondition_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __IConditionGenerator_FWD_DEFINED__\r
-#define __IConditionGenerator_FWD_DEFINED__\r
-typedef interface IConditionGenerator IConditionGenerator;\r
-#endif /* __IConditionGenerator_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __IRichChunk_FWD_DEFINED__\r
-#define __IRichChunk_FWD_DEFINED__\r
-typedef interface IRichChunk IRichChunk;\r
-#endif /* __IRichChunk_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __IInterval_FWD_DEFINED__\r
-#define __IInterval_FWD_DEFINED__\r
-typedef interface IInterval IInterval;\r
-#endif /* __IInterval_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __IMetaData_FWD_DEFINED__\r
-#define __IMetaData_FWD_DEFINED__\r
-typedef interface IMetaData IMetaData;\r
-#endif /* __IMetaData_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __IEntity_FWD_DEFINED__\r
-#define __IEntity_FWD_DEFINED__\r
-typedef interface IEntity IEntity;\r
-#endif /* __IEntity_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __IRelationship_FWD_DEFINED__\r
-#define __IRelationship_FWD_DEFINED__\r
-typedef interface IRelationship IRelationship;\r
-#endif /* __IRelationship_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __INamedEntity_FWD_DEFINED__\r
-#define __INamedEntity_FWD_DEFINED__\r
-typedef interface INamedEntity INamedEntity;\r
-#endif /* __INamedEntity_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __ISchemaProvider_FWD_DEFINED__\r
-#define __ISchemaProvider_FWD_DEFINED__\r
-typedef interface ISchemaProvider ISchemaProvider;\r
-#endif /* __ISchemaProvider_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __ITokenCollection_FWD_DEFINED__\r
-#define __ITokenCollection_FWD_DEFINED__\r
-typedef interface ITokenCollection ITokenCollection;\r
-#endif /* __ITokenCollection_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __INamedEntityCollector_FWD_DEFINED__\r
-#define __INamedEntityCollector_FWD_DEFINED__\r
-typedef interface INamedEntityCollector INamedEntityCollector;\r
-#endif /* __INamedEntityCollector_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __ISchemaLocalizerSupport_FWD_DEFINED__\r
-#define __ISchemaLocalizerSupport_FWD_DEFINED__\r
-typedef interface ISchemaLocalizerSupport ISchemaLocalizerSupport;\r
-#endif /* __ISchemaLocalizerSupport_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __IQueryParserManager_FWD_DEFINED__\r
-#define __IQueryParserManager_FWD_DEFINED__\r
-typedef interface IQueryParserManager IQueryParserManager;\r
-#endif /* __IQueryParserManager_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __QueryParser_FWD_DEFINED__\r
-#define __QueryParser_FWD_DEFINED__\r
-\r
-#ifdef __cplusplus\r
-typedef class QueryParser QueryParser;\r
-#else\r
-typedef struct QueryParser QueryParser;\r
-#endif /* __cplusplus */\r
-\r
-#endif /* __QueryParser_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __NegationCondition_FWD_DEFINED__\r
-#define __NegationCondition_FWD_DEFINED__\r
-\r
-#ifdef __cplusplus\r
-typedef class NegationCondition NegationCondition;\r
-#else\r
-typedef struct NegationCondition NegationCondition;\r
-#endif /* __cplusplus */\r
-\r
-#endif /* __NegationCondition_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __CompoundCondition_FWD_DEFINED__\r
-#define __CompoundCondition_FWD_DEFINED__\r
-\r
-#ifdef __cplusplus\r
-typedef class CompoundCondition CompoundCondition;\r
-#else\r
-typedef struct CompoundCondition CompoundCondition;\r
-#endif /* __cplusplus */\r
-\r
-#endif /* __CompoundCondition_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __LeafCondition_FWD_DEFINED__\r
-#define __LeafCondition_FWD_DEFINED__\r
-\r
-#ifdef __cplusplus\r
-typedef class LeafCondition LeafCondition;\r
-#else\r
-typedef struct LeafCondition LeafCondition;\r
-#endif /* __cplusplus */\r
-\r
-#endif /* __LeafCondition_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __ConditionFactory_FWD_DEFINED__\r
-#define __ConditionFactory_FWD_DEFINED__\r
-\r
-#ifdef __cplusplus\r
-typedef class ConditionFactory ConditionFactory;\r
-#else\r
-typedef struct ConditionFactory ConditionFactory;\r
-#endif /* __cplusplus */\r
-\r
-#endif /* __ConditionFactory_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __Interval_FWD_DEFINED__\r
-#define __Interval_FWD_DEFINED__\r
-\r
-#ifdef __cplusplus\r
-typedef class Interval Interval;\r
-#else\r
-typedef struct Interval Interval;\r
-#endif /* __cplusplus */\r
-\r
-#endif /* __Interval_FWD_DEFINED__ */\r
-\r
-\r
-#ifndef __QueryParserManager_FWD_DEFINED__\r
-#define __QueryParserManager_FWD_DEFINED__\r
-\r
-#ifdef __cplusplus\r
-typedef class QueryParserManager QueryParserManager;\r
-#else\r
-typedef struct QueryParserManager QueryParserManager;\r
-#endif /* __cplusplus */\r
-\r
-#endif /* __QueryParserManager_FWD_DEFINED__ */\r
-\r
-\r
-/* header files for imported files */\r
-#include "oaidl.h"\r
-#include "ocidl.h"\r
-#include "propidl.h"\r
-\r
-#ifdef __cplusplus\r
-extern "C"{\r
-#endif \r
-\r
-\r
-/* interface __MIDL_itf_structuredquery_0000_0000 */\r
-/* [local] */ \r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-typedef /* [v1_enum] */ \r
-enum tagCONDITION_TYPE\r
- { CT_AND_CONDITION = 0,\r
- CT_OR_CONDITION = ( CT_AND_CONDITION + 1 ) ,\r
- CT_NOT_CONDITION = ( CT_OR_CONDITION + 1 ) ,\r
- CT_LEAF_CONDITION = ( CT_NOT_CONDITION + 1 ) \r
- } CONDITION_TYPE;\r
-\r
-typedef /* [v1_enum] */ \r
-enum tagCONDITION_OPERATION\r
- { COP_IMPLICIT = 0,\r
- COP_EQUAL = ( COP_IMPLICIT + 1 ) ,\r
- COP_NOTEQUAL = ( COP_EQUAL + 1 ) ,\r
- COP_LESSTHAN = ( COP_NOTEQUAL + 1 ) ,\r
- COP_GREATERTHAN = ( COP_LESSTHAN + 1 ) ,\r
- COP_LESSTHANOREQUAL = ( COP_GREATERTHAN + 1 ) ,\r
- COP_GREATERTHANOREQUAL = ( COP_LESSTHANOREQUAL + 1 ) ,\r
- COP_VALUE_STARTSWITH = ( COP_GREATERTHANOREQUAL + 1 ) ,\r
- COP_VALUE_ENDSWITH = ( COP_VALUE_STARTSWITH + 1 ) ,\r
- COP_VALUE_CONTAINS = ( COP_VALUE_ENDSWITH + 1 ) ,\r
- COP_VALUE_NOTCONTAINS = ( COP_VALUE_CONTAINS + 1 ) ,\r
- COP_DOSWILDCARDS = ( COP_VALUE_NOTCONTAINS + 1 ) ,\r
- COP_WORD_EQUAL = ( COP_DOSWILDCARDS + 1 ) ,\r
- COP_WORD_STARTSWITH = ( COP_WORD_EQUAL + 1 ) ,\r
- COP_APPLICATION_SPECIFIC = ( COP_WORD_STARTSWITH + 1 ) \r
- } CONDITION_OPERATION;\r
-\r
-typedef /* [v1_enum] */ \r
-enum tagSTRUCTURED_QUERY_SINGLE_OPTION\r
- { SQSO_SCHEMA = 0,\r
- SQSO_LOCALE_WORD_BREAKING = ( SQSO_SCHEMA + 1 ) ,\r
- SQSO_WORD_BREAKER = ( SQSO_LOCALE_WORD_BREAKING + 1 ) ,\r
- SQSO_NATURAL_SYNTAX = ( SQSO_WORD_BREAKER + 1 ) ,\r
- SQSO_AUTOMATIC_WILDCARD = ( SQSO_NATURAL_SYNTAX + 1 ) ,\r
- SQSO_TRACE_LEVEL = ( SQSO_AUTOMATIC_WILDCARD + 1 ) ,\r
- SQSO_LANGUAGE_KEYWORDS = ( SQSO_TRACE_LEVEL + 1 ) \r
- } STRUCTURED_QUERY_SINGLE_OPTION;\r
-\r
-typedef /* [v1_enum] */ \r
-enum tagSTRUCTURED_QUERY_MULTIOPTION\r
- { SQMO_VIRTUAL_PROPERTY = 0,\r
- SQMO_DEFAULT_PROPERTY = ( SQMO_VIRTUAL_PROPERTY + 1 ) ,\r
- SQMO_GENERATOR_FOR_TYPE = ( SQMO_DEFAULT_PROPERTY + 1 ) \r
- } STRUCTURED_QUERY_MULTIOPTION;\r
-\r
-typedef /* [v1_enum] */ \r
-enum tagSTRUCTURED_QUERY_PARSE_ERROR\r
- { SQPE_NONE = 0,\r
- SQPE_EXTRA_OPENING_PARENTHESIS = ( SQPE_NONE + 1 ) ,\r
- SQPE_EXTRA_CLOSING_PARENTHESIS = ( SQPE_EXTRA_OPENING_PARENTHESIS + 1 ) ,\r
- SQPE_IGNORED_MODIFIER = ( SQPE_EXTRA_CLOSING_PARENTHESIS + 1 ) ,\r
- SQPE_IGNORED_CONNECTOR = ( SQPE_IGNORED_MODIFIER + 1 ) ,\r
- SQPE_IGNORED_KEYWORD = ( SQPE_IGNORED_CONNECTOR + 1 ) ,\r
- SQPE_UNHANDLED = ( SQPE_IGNORED_KEYWORD + 1 ) \r
- } STRUCTURED_QUERY_PARSE_ERROR;\r
-\r
-/* [v1_enum] */ \r
-enum tagSTRUCTURED_QUERY_RESOLVE_OPTION\r
- { SQRO_DONT_RESOLVE_DATETIME = 0x1,\r
- SQRO_ALWAYS_ONE_INTERVAL = 0x2,\r
- SQRO_DONT_SIMPLIFY_CONDITION_TREES = 0x4,\r
- SQRO_DONT_MAP_RELATIONS = 0x8,\r
- SQRO_DONT_RESOLVE_RANGES = 0x10,\r
- SQRO_DONT_REMOVE_UNRESTRICTED_KEYWORDS = 0x20,\r
- SQRO_DONT_SPLIT_WORDS = 0x40,\r
- SQRO_IGNORE_PHRASE_ORDER = 0x80\r
- } ;\r
-typedef int STRUCTURED_QUERY_RESOLVE_OPTION;\r
-\r
-typedef /* [v1_enum] */ \r
-enum tagINTERVAL_LIMIT_KIND\r
- { ILK_EXPLICIT_INCLUDED = 0,\r
- ILK_EXPLICIT_EXCLUDED = ( ILK_EXPLICIT_INCLUDED + 1 ) ,\r
- ILK_NEGATIVE_INFINITY = ( ILK_EXPLICIT_EXCLUDED + 1 ) ,\r
- ILK_POSITIVE_INFINITY = ( ILK_NEGATIVE_INFINITY + 1 ) \r
- } INTERVAL_LIMIT_KIND;\r
-\r
-typedef /* [v1_enum] */ \r
-enum tagQUERY_PARSER_MANAGER_OPTION\r
- { QPMO_SCHEMA_BINARY_NAME = 0,\r
- QPMO_PRELOCALIZED_SCHEMA_BINARY_PATH = ( QPMO_SCHEMA_BINARY_NAME + 1 ) ,\r
- QPMO_UNLOCALIZED_SCHEMA_BINARY_PATH = ( QPMO_PRELOCALIZED_SCHEMA_BINARY_PATH + 1 ) ,\r
- QPMO_LOCALIZED_SCHEMA_BINARY_PATH = ( QPMO_UNLOCALIZED_SCHEMA_BINARY_PATH + 1 ) ,\r
- QPMO_APPEND_LCID_TO_LOCALIZED_PATH = ( QPMO_LOCALIZED_SCHEMA_BINARY_PATH + 1 ) ,\r
- QPMO_LOCALIZER_SUPPORT = ( QPMO_APPEND_LCID_TO_LOCALIZED_PATH + 1 ) \r
- } QUERY_PARSER_MANAGER_OPTION;\r
-\r
-\r
-\r
-extern RPC_IF_HANDLE __MIDL_itf_structuredquery_0000_0000_v0_0_c_ifspec;\r
-extern RPC_IF_HANDLE __MIDL_itf_structuredquery_0000_0000_v0_0_s_ifspec;\r
-\r
-#ifndef __IQueryParser_INTERFACE_DEFINED__\r
-#define __IQueryParser_INTERFACE_DEFINED__\r
-\r
-/* interface IQueryParser */\r
-/* [unique][uuid][object] */ \r
-\r
-\r
-EXTERN_C const IID IID_IQueryParser;\r
-\r
-#if defined(__cplusplus) && !defined(CINTERFACE)\r
- \r
- MIDL_INTERFACE("2EBDEE67-3505-43f8-9946-EA44ABC8E5B0")\r
- IQueryParser : public IUnknown\r
- {\r
- public:\r
- virtual HRESULT STDMETHODCALLTYPE Parse( \r
- /* [in] */ __RPC__in LPCWSTR pszInputString,\r
- /* [in] */ __RPC__in_opt IEnumUnknown *pCustomProperties,\r
- /* [retval][out] */ __RPC__deref_out_opt IQuerySolution **ppSolution) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE SetOption( \r
- /* [in] */ STRUCTURED_QUERY_SINGLE_OPTION option,\r
- /* [in] */ __RPC__in const PROPVARIANT *pOptionValue) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE GetOption( \r
- /* [in] */ STRUCTURED_QUERY_SINGLE_OPTION option,\r
- /* [retval][out] */ __RPC__out PROPVARIANT *pOptionValue) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE SetMultiOption( \r
- /* [in] */ STRUCTURED_QUERY_MULTIOPTION option,\r
- /* [in] */ __RPC__in LPCWSTR pszOptionKey,\r
- /* [in] */ __RPC__in const PROPVARIANT *pOptionValue) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE GetSchemaProvider( \r
- /* [retval][out] */ __RPC__deref_out_opt ISchemaProvider **ppSchemaProvider) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE RestateToString( \r
- /* [in] */ __RPC__in_opt ICondition *pCondition,\r
- /* [in] */ BOOL fUseEnglish,\r
- /* [out] */ __RPC__deref_out_opt LPWSTR *ppszQueryString) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE ParsePropertyValue( \r
- /* [in] */ __RPC__in LPCWSTR pszPropertyName,\r
- /* [in] */ __RPC__in LPCWSTR pszInputString,\r
- /* [retval][out] */ __RPC__deref_out_opt IQuerySolution **ppSolution) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE RestatePropertyValueToString( \r
- /* [in] */ __RPC__in_opt ICondition *pCondition,\r
- /* [in] */ BOOL fUseEnglish,\r
- /* [out] */ __RPC__deref_out_opt LPWSTR *ppszPropertyName,\r
- /* [out] */ __RPC__deref_out_opt LPWSTR *ppszQueryString) = 0;\r
- \r
- };\r
- \r
-#else /* C style interface */\r
-\r
- typedef struct IQueryParserVtbl\r
- {\r
- BEGIN_INTERFACE\r
- \r
- HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r
- IQueryParser * This,\r
- /* [in] */ __RPC__in REFIID riid,\r
- /* [iid_is][out] */ \r
- __RPC__deref_out void **ppvObject);\r
- \r
- ULONG ( STDMETHODCALLTYPE *AddRef )( \r
- IQueryParser * This);\r
- \r
- ULONG ( STDMETHODCALLTYPE *Release )( \r
- IQueryParser * This);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *Parse )( \r
- IQueryParser * This,\r
- /* [in] */ __RPC__in LPCWSTR pszInputString,\r
- /* [in] */ __RPC__in_opt IEnumUnknown *pCustomProperties,\r
- /* [retval][out] */ __RPC__deref_out_opt IQuerySolution **ppSolution);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *SetOption )( \r
- IQueryParser * This,\r
- /* [in] */ STRUCTURED_QUERY_SINGLE_OPTION option,\r
- /* [in] */ __RPC__in const PROPVARIANT *pOptionValue);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetOption )( \r
- IQueryParser * This,\r
- /* [in] */ STRUCTURED_QUERY_SINGLE_OPTION option,\r
- /* [retval][out] */ __RPC__out PROPVARIANT *pOptionValue);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *SetMultiOption )( \r
- IQueryParser * This,\r
- /* [in] */ STRUCTURED_QUERY_MULTIOPTION option,\r
- /* [in] */ __RPC__in LPCWSTR pszOptionKey,\r
- /* [in] */ __RPC__in const PROPVARIANT *pOptionValue);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetSchemaProvider )( \r
- IQueryParser * This,\r
- /* [retval][out] */ __RPC__deref_out_opt ISchemaProvider **ppSchemaProvider);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *RestateToString )( \r
- IQueryParser * This,\r
- /* [in] */ __RPC__in_opt ICondition *pCondition,\r
- /* [in] */ BOOL fUseEnglish,\r
- /* [out] */ __RPC__deref_out_opt LPWSTR *ppszQueryString);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *ParsePropertyValue )( \r
- IQueryParser * This,\r
- /* [in] */ __RPC__in LPCWSTR pszPropertyName,\r
- /* [in] */ __RPC__in LPCWSTR pszInputString,\r
- /* [retval][out] */ __RPC__deref_out_opt IQuerySolution **ppSolution);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *RestatePropertyValueToString )( \r
- IQueryParser * This,\r
- /* [in] */ __RPC__in_opt ICondition *pCondition,\r
- /* [in] */ BOOL fUseEnglish,\r
- /* [out] */ __RPC__deref_out_opt LPWSTR *ppszPropertyName,\r
- /* [out] */ __RPC__deref_out_opt LPWSTR *ppszQueryString);\r
- \r
- END_INTERFACE\r
- } IQueryParserVtbl;\r
-\r
- interface IQueryParser\r
- {\r
- CONST_VTBL struct IQueryParserVtbl *lpVtbl;\r
- };\r
-\r
- \r
-\r
-#ifdef COBJMACROS\r
-\r
-\r
-#define IQueryParser_QueryInterface(This,riid,ppvObject) \\r
- ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r
-\r
-#define IQueryParser_AddRef(This) \\r
- ( (This)->lpVtbl -> AddRef(This) ) \r
-\r
-#define IQueryParser_Release(This) \\r
- ( (This)->lpVtbl -> Release(This) ) \r
-\r
-\r
-#define IQueryParser_Parse(This,pszInputString,pCustomProperties,ppSolution) \\r
- ( (This)->lpVtbl -> Parse(This,pszInputString,pCustomProperties,ppSolution) ) \r
-\r
-#define IQueryParser_SetOption(This,option,pOptionValue) \\r
- ( (This)->lpVtbl -> SetOption(This,option,pOptionValue) ) \r
-\r
-#define IQueryParser_GetOption(This,option,pOptionValue) \\r
- ( (This)->lpVtbl -> GetOption(This,option,pOptionValue) ) \r
-\r
-#define IQueryParser_SetMultiOption(This,option,pszOptionKey,pOptionValue) \\r
- ( (This)->lpVtbl -> SetMultiOption(This,option,pszOptionKey,pOptionValue) ) \r
-\r
-#define IQueryParser_GetSchemaProvider(This,ppSchemaProvider) \\r
- ( (This)->lpVtbl -> GetSchemaProvider(This,ppSchemaProvider) ) \r
-\r
-#define IQueryParser_RestateToString(This,pCondition,fUseEnglish,ppszQueryString) \\r
- ( (This)->lpVtbl -> RestateToString(This,pCondition,fUseEnglish,ppszQueryString) ) \r
-\r
-#define IQueryParser_ParsePropertyValue(This,pszPropertyName,pszInputString,ppSolution) \\r
- ( (This)->lpVtbl -> ParsePropertyValue(This,pszPropertyName,pszInputString,ppSolution) ) \r
-\r
-#define IQueryParser_RestatePropertyValueToString(This,pCondition,fUseEnglish,ppszPropertyName,ppszQueryString) \\r
- ( (This)->lpVtbl -> RestatePropertyValueToString(This,pCondition,fUseEnglish,ppszPropertyName,ppszQueryString) ) \r
-\r
-#endif /* COBJMACROS */\r
-\r
-\r
-#endif /* C style interface */\r
-\r
-\r
-\r
-\r
-#endif /* __IQueryParser_INTERFACE_DEFINED__ */\r
-\r
-\r
-#ifndef __IConditionFactory_INTERFACE_DEFINED__\r
-#define __IConditionFactory_INTERFACE_DEFINED__\r
-\r
-/* interface IConditionFactory */\r
-/* [unique][uuid][object] */ \r
-\r
-\r
-EXTERN_C const IID IID_IConditionFactory;\r
-\r
-#if defined(__cplusplus) && !defined(CINTERFACE)\r
- \r
- MIDL_INTERFACE("A5EFE073-B16F-474f-9F3E-9F8B497A3E08")\r
- IConditionFactory : public IUnknown\r
- {\r
- public:\r
- virtual HRESULT STDMETHODCALLTYPE MakeNot( \r
- /* [in] */ __RPC__in_opt ICondition *pSubCondition,\r
- /* [in] */ BOOL simplify,\r
- /* [retval][out] */ __RPC__deref_out_opt ICondition **ppResultQuery) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE MakeAndOr( \r
- /* [in] */ CONDITION_TYPE nodeType,\r
- /* [in] */ __RPC__in_opt IEnumUnknown *pSubConditions,\r
- /* [in] */ BOOL simplify,\r
- /* [retval][out] */ __RPC__deref_out_opt ICondition **ppResultQuery) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE MakeLeaf( \r
- /* [unique][in] */ __RPC__in_opt LPCWSTR pszPropertyName,\r
- /* [in] */ CONDITION_OPERATION op,\r
- /* [unique][in] */ __RPC__in_opt LPCWSTR pszValueType,\r
- /* [in] */ __RPC__in const PROPVARIANT *pValue,\r
- /* [in] */ __RPC__in_opt IRichChunk *pPropertyNameTerm,\r
- /* [in] */ __RPC__in_opt IRichChunk *pOperationTerm,\r
- /* [in] */ __RPC__in_opt IRichChunk *pValueTerm,\r
- /* [in] */ BOOL expand,\r
- /* [retval][out] */ __RPC__deref_out_opt ICondition **ppResultQuery) = 0;\r
- \r
- virtual /* [local] */ HRESULT STDMETHODCALLTYPE Resolve( \r
- /* [in] */ \r
- __in ICondition *pConditionTree,\r
- /* [in] */ \r
- __in STRUCTURED_QUERY_RESOLVE_OPTION sqro,\r
- /* [ref][in] */ \r
- __in_opt const SYSTEMTIME *pstReferenceTime,\r
- /* [retval][out] */ \r
- __out ICondition **ppResolvedConditionTree) = 0;\r
- \r
- };\r
- \r
-#else /* C style interface */\r
-\r
- typedef struct IConditionFactoryVtbl\r
- {\r
- BEGIN_INTERFACE\r
- \r
- HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r
- IConditionFactory * This,\r
- /* [in] */ __RPC__in REFIID riid,\r
- /* [iid_is][out] */ \r
- __RPC__deref_out void **ppvObject);\r
- \r
- ULONG ( STDMETHODCALLTYPE *AddRef )( \r
- IConditionFactory * This);\r
- \r
- ULONG ( STDMETHODCALLTYPE *Release )( \r
- IConditionFactory * This);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *MakeNot )( \r
- IConditionFactory * This,\r
- /* [in] */ __RPC__in_opt ICondition *pSubCondition,\r
- /* [in] */ BOOL simplify,\r
- /* [retval][out] */ __RPC__deref_out_opt ICondition **ppResultQuery);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *MakeAndOr )( \r
- IConditionFactory * This,\r
- /* [in] */ CONDITION_TYPE nodeType,\r
- /* [in] */ __RPC__in_opt IEnumUnknown *pSubConditions,\r
- /* [in] */ BOOL simplify,\r
- /* [retval][out] */ __RPC__deref_out_opt ICondition **ppResultQuery);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *MakeLeaf )( \r
- IConditionFactory * This,\r
- /* [unique][in] */ __RPC__in_opt LPCWSTR pszPropertyName,\r
- /* [in] */ CONDITION_OPERATION op,\r
- /* [unique][in] */ __RPC__in_opt LPCWSTR pszValueType,\r
- /* [in] */ __RPC__in const PROPVARIANT *pValue,\r
- /* [in] */ __RPC__in_opt IRichChunk *pPropertyNameTerm,\r
- /* [in] */ __RPC__in_opt IRichChunk *pOperationTerm,\r
- /* [in] */ __RPC__in_opt IRichChunk *pValueTerm,\r
- /* [in] */ BOOL expand,\r
- /* [retval][out] */ __RPC__deref_out_opt ICondition **ppResultQuery);\r
- \r
- /* [local] */ HRESULT ( STDMETHODCALLTYPE *Resolve )( \r
- IConditionFactory * This,\r
- /* [in] */ \r
- __in ICondition *pConditionTree,\r
- /* [in] */ \r
- __in STRUCTURED_QUERY_RESOLVE_OPTION sqro,\r
- /* [ref][in] */ \r
- __in_opt const SYSTEMTIME *pstReferenceTime,\r
- /* [retval][out] */ \r
- __out ICondition **ppResolvedConditionTree);\r
- \r
- END_INTERFACE\r
- } IConditionFactoryVtbl;\r
-\r
- interface IConditionFactory\r
- {\r
- CONST_VTBL struct IConditionFactoryVtbl *lpVtbl;\r
- };\r
-\r
- \r
-\r
-#ifdef COBJMACROS\r
-\r
-\r
-#define IConditionFactory_QueryInterface(This,riid,ppvObject) \\r
- ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r
-\r
-#define IConditionFactory_AddRef(This) \\r
- ( (This)->lpVtbl -> AddRef(This) ) \r
-\r
-#define IConditionFactory_Release(This) \\r
- ( (This)->lpVtbl -> Release(This) ) \r
-\r
-\r
-#define IConditionFactory_MakeNot(This,pSubCondition,simplify,ppResultQuery) \\r
- ( (This)->lpVtbl -> MakeNot(This,pSubCondition,simplify,ppResultQuery) ) \r
-\r
-#define IConditionFactory_MakeAndOr(This,nodeType,pSubConditions,simplify,ppResultQuery) \\r
- ( (This)->lpVtbl -> MakeAndOr(This,nodeType,pSubConditions,simplify,ppResultQuery) ) \r
-\r
-#define IConditionFactory_MakeLeaf(This,pszPropertyName,op,pszValueType,pValue,pPropertyNameTerm,pOperationTerm,pValueTerm,expand,ppResultQuery) \\r
- ( (This)->lpVtbl -> MakeLeaf(This,pszPropertyName,op,pszValueType,pValue,pPropertyNameTerm,pOperationTerm,pValueTerm,expand,ppResultQuery) ) \r
-\r
-#define IConditionFactory_Resolve(This,pConditionTree,sqro,pstReferenceTime,ppResolvedConditionTree) \\r
- ( (This)->lpVtbl -> Resolve(This,pConditionTree,sqro,pstReferenceTime,ppResolvedConditionTree) ) \r
-\r
-#endif /* COBJMACROS */\r
-\r
-\r
-#endif /* C style interface */\r
-\r
-\r
-\r
-\r
-#endif /* __IConditionFactory_INTERFACE_DEFINED__ */\r
-\r
-\r
-#ifndef __IQuerySolution_INTERFACE_DEFINED__\r
-#define __IQuerySolution_INTERFACE_DEFINED__\r
-\r
-/* interface IQuerySolution */\r
-/* [unique][uuid][object] */ \r
-\r
-\r
-EXTERN_C const IID IID_IQuerySolution;\r
-\r
-#if defined(__cplusplus) && !defined(CINTERFACE)\r
- \r
- MIDL_INTERFACE("D6EBC66B-8921-4193-AFDD-A1789FB7FF57")\r
- IQuerySolution : public IConditionFactory\r
- {\r
- public:\r
- virtual /* [local] */ HRESULT STDMETHODCALLTYPE GetQuery( \r
- /* [out] */ \r
- __out_opt ICondition **ppQueryNode,\r
- /* [out] */ \r
- __out_opt IEntity **ppMainType) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE GetErrors( \r
- /* [in] */ __RPC__in REFIID riid,\r
- /* [iid_is][retval][out] */ __RPC__deref_out_opt void **ppParseErrors) = 0;\r
- \r
- virtual /* [local] */ HRESULT STDMETHODCALLTYPE GetLexicalData( \r
- /* [out] */ \r
- __deref_opt_out LPWSTR *ppszInputString,\r
- /* [out] */ \r
- __out_opt ITokenCollection **ppTokens,\r
- /* [out] */ \r
- __out_opt LCID *pLocale,\r
- /* [out] */ \r
- __out_opt IUnknown **ppWordBreaker) = 0;\r
- \r
- };\r
- \r
-#else /* C style interface */\r
-\r
- typedef struct IQuerySolutionVtbl\r
- {\r
- BEGIN_INTERFACE\r
- \r
- HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r
- IQuerySolution * This,\r
- /* [in] */ __RPC__in REFIID riid,\r
- /* [iid_is][out] */ \r
- __RPC__deref_out void **ppvObject);\r
- \r
- ULONG ( STDMETHODCALLTYPE *AddRef )( \r
- IQuerySolution * This);\r
- \r
- ULONG ( STDMETHODCALLTYPE *Release )( \r
- IQuerySolution * This);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *MakeNot )( \r
- IQuerySolution * This,\r
- /* [in] */ __RPC__in_opt ICondition *pSubCondition,\r
- /* [in] */ BOOL simplify,\r
- /* [retval][out] */ __RPC__deref_out_opt ICondition **ppResultQuery);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *MakeAndOr )( \r
- IQuerySolution * This,\r
- /* [in] */ CONDITION_TYPE nodeType,\r
- /* [in] */ __RPC__in_opt IEnumUnknown *pSubConditions,\r
- /* [in] */ BOOL simplify,\r
- /* [retval][out] */ __RPC__deref_out_opt ICondition **ppResultQuery);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *MakeLeaf )( \r
- IQuerySolution * This,\r
- /* [unique][in] */ __RPC__in_opt LPCWSTR pszPropertyName,\r
- /* [in] */ CONDITION_OPERATION op,\r
- /* [unique][in] */ __RPC__in_opt LPCWSTR pszValueType,\r
- /* [in] */ __RPC__in const PROPVARIANT *pValue,\r
- /* [in] */ __RPC__in_opt IRichChunk *pPropertyNameTerm,\r
- /* [in] */ __RPC__in_opt IRichChunk *pOperationTerm,\r
- /* [in] */ __RPC__in_opt IRichChunk *pValueTerm,\r
- /* [in] */ BOOL expand,\r
- /* [retval][out] */ __RPC__deref_out_opt ICondition **ppResultQuery);\r
- \r
- /* [local] */ HRESULT ( STDMETHODCALLTYPE *Resolve )( \r
- IQuerySolution * This,\r
- /* [in] */ \r
- __in ICondition *pConditionTree,\r
- /* [in] */ \r
- __in STRUCTURED_QUERY_RESOLVE_OPTION sqro,\r
- /* [ref][in] */ \r
- __in_opt const SYSTEMTIME *pstReferenceTime,\r
- /* [retval][out] */ \r
- __out ICondition **ppResolvedConditionTree);\r
- \r
- /* [local] */ HRESULT ( STDMETHODCALLTYPE *GetQuery )( \r
- IQuerySolution * This,\r
- /* [out] */ \r
- __out_opt ICondition **ppQueryNode,\r
- /* [out] */ \r
- __out_opt IEntity **ppMainType);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetErrors )( \r
- IQuerySolution * This,\r
- /* [in] */ __RPC__in REFIID riid,\r
- /* [iid_is][retval][out] */ __RPC__deref_out_opt void **ppParseErrors);\r
- \r
- /* [local] */ HRESULT ( STDMETHODCALLTYPE *GetLexicalData )( \r
- IQuerySolution * This,\r
- /* [out] */ \r
- __deref_opt_out LPWSTR *ppszInputString,\r
- /* [out] */ \r
- __out_opt ITokenCollection **ppTokens,\r
- /* [out] */ \r
- __out_opt LCID *pLocale,\r
- /* [out] */ \r
- __out_opt IUnknown **ppWordBreaker);\r
- \r
- END_INTERFACE\r
- } IQuerySolutionVtbl;\r
-\r
- interface IQuerySolution\r
- {\r
- CONST_VTBL struct IQuerySolutionVtbl *lpVtbl;\r
- };\r
-\r
- \r
-\r
-#ifdef COBJMACROS\r
-\r
-\r
-#define IQuerySolution_QueryInterface(This,riid,ppvObject) \\r
- ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r
-\r
-#define IQuerySolution_AddRef(This) \\r
- ( (This)->lpVtbl -> AddRef(This) ) \r
-\r
-#define IQuerySolution_Release(This) \\r
- ( (This)->lpVtbl -> Release(This) ) \r
-\r
-\r
-#define IQuerySolution_MakeNot(This,pSubCondition,simplify,ppResultQuery) \\r
- ( (This)->lpVtbl -> MakeNot(This,pSubCondition,simplify,ppResultQuery) ) \r
-\r
-#define IQuerySolution_MakeAndOr(This,nodeType,pSubConditions,simplify,ppResultQuery) \\r
- ( (This)->lpVtbl -> MakeAndOr(This,nodeType,pSubConditions,simplify,ppResultQuery) ) \r
-\r
-#define IQuerySolution_MakeLeaf(This,pszPropertyName,op,pszValueType,pValue,pPropertyNameTerm,pOperationTerm,pValueTerm,expand,ppResultQuery) \\r
- ( (This)->lpVtbl -> MakeLeaf(This,pszPropertyName,op,pszValueType,pValue,pPropertyNameTerm,pOperationTerm,pValueTerm,expand,ppResultQuery) ) \r
-\r
-#define IQuerySolution_Resolve(This,pConditionTree,sqro,pstReferenceTime,ppResolvedConditionTree) \\r
- ( (This)->lpVtbl -> Resolve(This,pConditionTree,sqro,pstReferenceTime,ppResolvedConditionTree) ) \r
-\r
-\r
-#define IQuerySolution_GetQuery(This,ppQueryNode,ppMainType) \\r
- ( (This)->lpVtbl -> GetQuery(This,ppQueryNode,ppMainType) ) \r
-\r
-#define IQuerySolution_GetErrors(This,riid,ppParseErrors) \\r
- ( (This)->lpVtbl -> GetErrors(This,riid,ppParseErrors) ) \r
-\r
-#define IQuerySolution_GetLexicalData(This,ppszInputString,ppTokens,pLocale,ppWordBreaker) \\r
- ( (This)->lpVtbl -> GetLexicalData(This,ppszInputString,ppTokens,pLocale,ppWordBreaker) ) \r
-\r
-#endif /* COBJMACROS */\r
-\r
-\r
-#endif /* C style interface */\r
-\r
-\r
-\r
-\r
-#endif /* __IQuerySolution_INTERFACE_DEFINED__ */\r
-\r
-\r
-#ifndef __ICondition_INTERFACE_DEFINED__\r
-#define __ICondition_INTERFACE_DEFINED__\r
-\r
-/* interface ICondition */\r
-/* [unique][uuid][object] */ \r
-\r
-\r
-EXTERN_C const IID IID_ICondition;\r
-\r
-#if defined(__cplusplus) && !defined(CINTERFACE)\r
- \r
- MIDL_INTERFACE("0FC988D4-C935-4b97-A973-46282EA175C8")\r
- ICondition : public IPersistStream\r
- {\r
- public:\r
- virtual HRESULT STDMETHODCALLTYPE GetConditionType( \r
- /* [retval][out] */ __RPC__out CONDITION_TYPE *pNodeType) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE GetSubConditions( \r
- /* [in] */ __RPC__in REFIID riid,\r
- /* [iid_is][retval][out] */ __RPC__deref_out_opt void **ppv) = 0;\r
- \r
- virtual /* [local] */ HRESULT STDMETHODCALLTYPE GetComparisonInfo( \r
- /* [out] */ \r
- __deref_opt_out LPWSTR *ppszPropertyName,\r
- /* [out] */ \r
- __out_opt CONDITION_OPERATION *pOperation,\r
- /* [out] */ \r
- __out_opt PROPVARIANT *pValue) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE GetValueType( \r
- /* [retval][out] */ __RPC__deref_out_opt LPWSTR *ppszValueTypeName) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE GetValueNormalization( \r
- /* [retval][out] */ __RPC__deref_out_opt LPWSTR *ppszNormalization) = 0;\r
- \r
- virtual /* [local] */ HRESULT STDMETHODCALLTYPE GetInputTerms( \r
- /* [out] */ \r
- __out_opt IRichChunk **ppPropertyTerm,\r
- /* [out] */ \r
- __out_opt IRichChunk **ppOperationTerm,\r
- /* [out] */ \r
- __out_opt IRichChunk **ppValueTerm) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE Clone( \r
- /* [retval][out] */ __RPC__deref_out_opt ICondition **ppc) = 0;\r
- \r
- };\r
- \r
-#else /* C style interface */\r
-\r
- typedef struct IConditionVtbl\r
- {\r
- BEGIN_INTERFACE\r
- \r
- HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r
- ICondition * This,\r
- /* [in] */ __RPC__in REFIID riid,\r
- /* [iid_is][out] */ \r
- __RPC__deref_out void **ppvObject);\r
- \r
- ULONG ( STDMETHODCALLTYPE *AddRef )( \r
- ICondition * This);\r
- \r
- ULONG ( STDMETHODCALLTYPE *Release )( \r
- ICondition * This);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetClassID )( \r
- ICondition * This,\r
- /* [out] */ __RPC__out CLSID *pClassID);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *IsDirty )( \r
- ICondition * This);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *Load )( \r
- ICondition * This,\r
- /* [unique][in] */ __RPC__in_opt IStream *pStm);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *Save )( \r
- ICondition * This,\r
- /* [unique][in] */ __RPC__in_opt IStream *pStm,\r
- /* [in] */ BOOL fClearDirty);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetSizeMax )( \r
- ICondition * This,\r
- /* [out] */ __RPC__out ULARGE_INTEGER *pcbSize);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetConditionType )( \r
- ICondition * This,\r
- /* [retval][out] */ __RPC__out CONDITION_TYPE *pNodeType);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetSubConditions )( \r
- ICondition * This,\r
- /* [in] */ __RPC__in REFIID riid,\r
- /* [iid_is][retval][out] */ __RPC__deref_out_opt void **ppv);\r
- \r
- /* [local] */ HRESULT ( STDMETHODCALLTYPE *GetComparisonInfo )( \r
- ICondition * This,\r
- /* [out] */ \r
- __deref_opt_out LPWSTR *ppszPropertyName,\r
- /* [out] */ \r
- __out_opt CONDITION_OPERATION *pOperation,\r
- /* [out] */ \r
- __out_opt PROPVARIANT *pValue);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetValueType )( \r
- ICondition * This,\r
- /* [retval][out] */ __RPC__deref_out_opt LPWSTR *ppszValueTypeName);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetValueNormalization )( \r
- ICondition * This,\r
- /* [retval][out] */ __RPC__deref_out_opt LPWSTR *ppszNormalization);\r
- \r
- /* [local] */ HRESULT ( STDMETHODCALLTYPE *GetInputTerms )( \r
- ICondition * This,\r
- /* [out] */ \r
- __out_opt IRichChunk **ppPropertyTerm,\r
- /* [out] */ \r
- __out_opt IRichChunk **ppOperationTerm,\r
- /* [out] */ \r
- __out_opt IRichChunk **ppValueTerm);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *Clone )( \r
- ICondition * This,\r
- /* [retval][out] */ __RPC__deref_out_opt ICondition **ppc);\r
- \r
- END_INTERFACE\r
- } IConditionVtbl;\r
-\r
- interface ICondition\r
- {\r
- CONST_VTBL struct IConditionVtbl *lpVtbl;\r
- };\r
-\r
- \r
-\r
-#ifdef COBJMACROS\r
-\r
-\r
-#define ICondition_QueryInterface(This,riid,ppvObject) \\r
- ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r
-\r
-#define ICondition_AddRef(This) \\r
- ( (This)->lpVtbl -> AddRef(This) ) \r
-\r
-#define ICondition_Release(This) \\r
- ( (This)->lpVtbl -> Release(This) ) \r
-\r
-\r
-#define ICondition_GetClassID(This,pClassID) \\r
- ( (This)->lpVtbl -> GetClassID(This,pClassID) ) \r
-\r
-\r
-#define ICondition_IsDirty(This) \\r
- ( (This)->lpVtbl -> IsDirty(This) ) \r
-\r
-#define ICondition_Load(This,pStm) \\r
- ( (This)->lpVtbl -> Load(This,pStm) ) \r
-\r
-#define ICondition_Save(This,pStm,fClearDirty) \\r
- ( (This)->lpVtbl -> Save(This,pStm,fClearDirty) ) \r
-\r
-#define ICondition_GetSizeMax(This,pcbSize) \\r
- ( (This)->lpVtbl -> GetSizeMax(This,pcbSize) ) \r
-\r
-\r
-#define ICondition_GetConditionType(This,pNodeType) \\r
- ( (This)->lpVtbl -> GetConditionType(This,pNodeType) ) \r
-\r
-#define ICondition_GetSubConditions(This,riid,ppv) \\r
- ( (This)->lpVtbl -> GetSubConditions(This,riid,ppv) ) \r
-\r
-#define ICondition_GetComparisonInfo(This,ppszPropertyName,pOperation,pValue) \\r
- ( (This)->lpVtbl -> GetComparisonInfo(This,ppszPropertyName,pOperation,pValue) ) \r
-\r
-#define ICondition_GetValueType(This,ppszValueTypeName) \\r
- ( (This)->lpVtbl -> GetValueType(This,ppszValueTypeName) ) \r
-\r
-#define ICondition_GetValueNormalization(This,ppszNormalization) \\r
- ( (This)->lpVtbl -> GetValueNormalization(This,ppszNormalization) ) \r
-\r
-#define ICondition_GetInputTerms(This,ppPropertyTerm,ppOperationTerm,ppValueTerm) \\r
- ( (This)->lpVtbl -> GetInputTerms(This,ppPropertyTerm,ppOperationTerm,ppValueTerm) ) \r
-\r
-#define ICondition_Clone(This,ppc) \\r
- ( (This)->lpVtbl -> Clone(This,ppc) ) \r
-\r
-#endif /* COBJMACROS */\r
-\r
-\r
-#endif /* C style interface */\r
-\r
-\r
-\r
-\r
-#endif /* __ICondition_INTERFACE_DEFINED__ */\r
-\r
-\r
-#ifndef __IConditionGenerator_INTERFACE_DEFINED__\r
-#define __IConditionGenerator_INTERFACE_DEFINED__\r
-\r
-/* interface IConditionGenerator */\r
-/* [unique][uuid][object] */ \r
-\r
-\r
-EXTERN_C const IID IID_IConditionGenerator;\r
-\r
-#if defined(__cplusplus) && !defined(CINTERFACE)\r
- \r
- MIDL_INTERFACE("92D2CC58-4386-45a3-B98C-7E0CE64A4117")\r
- IConditionGenerator : public IUnknown\r
- {\r
- public:\r
- virtual HRESULT STDMETHODCALLTYPE Initialize( \r
- /* [in] */ __RPC__in_opt ISchemaProvider *pSchemaProvider) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE RecognizeNamedEntities( \r
- /* [in] */ __RPC__in LPCWSTR pszInputString,\r
- /* [in] */ LCID lcid,\r
- /* [in] */ __RPC__in_opt ITokenCollection *pTokenCollection,\r
- /* [out][in] */ __RPC__inout_opt INamedEntityCollector *pNamedEntities) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE GenerateForLeaf( \r
- /* [in] */ __RPC__in_opt IConditionFactory *pConditionFactory,\r
- /* [unique][in] */ __RPC__in_opt LPCWSTR pszPropertyName,\r
- /* [in] */ CONDITION_OPERATION op,\r
- /* [unique][in] */ __RPC__in_opt LPCWSTR pszValueType,\r
- /* [in] */ __RPC__in LPCWSTR pszValue,\r
- /* [unique][in] */ __RPC__in_opt LPCWSTR pszValue2,\r
- /* [in] */ __RPC__in_opt IRichChunk *pPropertyNameTerm,\r
- /* [in] */ __RPC__in_opt IRichChunk *pOperationTerm,\r
- /* [in] */ __RPC__in_opt IRichChunk *pValueTerm,\r
- /* [in] */ BOOL automaticWildcard,\r
- /* [out] */ __RPC__out BOOL *pNoStringQuery,\r
- /* [retval][out] */ __RPC__deref_out_opt ICondition **ppQueryExpression) = 0;\r
- \r
- virtual /* [local] */ HRESULT STDMETHODCALLTYPE DefaultPhrase( \r
- /* [unique][in] */ LPCWSTR pszValueType,\r
- /* [in] */ const PROPVARIANT *ppropvar,\r
- /* [in] */ BOOL fUseEnglish,\r
- /* [retval][out] */ \r
- __deref_opt_out LPWSTR *ppszPhrase) = 0;\r
- \r
- };\r
- \r
-#else /* C style interface */\r
-\r
- typedef struct IConditionGeneratorVtbl\r
- {\r
- BEGIN_INTERFACE\r
- \r
- HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r
- IConditionGenerator * This,\r
- /* [in] */ __RPC__in REFIID riid,\r
- /* [iid_is][out] */ \r
- __RPC__deref_out void **ppvObject);\r
- \r
- ULONG ( STDMETHODCALLTYPE *AddRef )( \r
- IConditionGenerator * This);\r
- \r
- ULONG ( STDMETHODCALLTYPE *Release )( \r
- IConditionGenerator * This);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *Initialize )( \r
- IConditionGenerator * This,\r
- /* [in] */ __RPC__in_opt ISchemaProvider *pSchemaProvider);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *RecognizeNamedEntities )( \r
- IConditionGenerator * This,\r
- /* [in] */ __RPC__in LPCWSTR pszInputString,\r
- /* [in] */ LCID lcid,\r
- /* [in] */ __RPC__in_opt ITokenCollection *pTokenCollection,\r
- /* [out][in] */ __RPC__inout_opt INamedEntityCollector *pNamedEntities);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GenerateForLeaf )( \r
- IConditionGenerator * This,\r
- /* [in] */ __RPC__in_opt IConditionFactory *pConditionFactory,\r
- /* [unique][in] */ __RPC__in_opt LPCWSTR pszPropertyName,\r
- /* [in] */ CONDITION_OPERATION op,\r
- /* [unique][in] */ __RPC__in_opt LPCWSTR pszValueType,\r
- /* [in] */ __RPC__in LPCWSTR pszValue,\r
- /* [unique][in] */ __RPC__in_opt LPCWSTR pszValue2,\r
- /* [in] */ __RPC__in_opt IRichChunk *pPropertyNameTerm,\r
- /* [in] */ __RPC__in_opt IRichChunk *pOperationTerm,\r
- /* [in] */ __RPC__in_opt IRichChunk *pValueTerm,\r
- /* [in] */ BOOL automaticWildcard,\r
- /* [out] */ __RPC__out BOOL *pNoStringQuery,\r
- /* [retval][out] */ __RPC__deref_out_opt ICondition **ppQueryExpression);\r
- \r
- /* [local] */ HRESULT ( STDMETHODCALLTYPE *DefaultPhrase )( \r
- IConditionGenerator * This,\r
- /* [unique][in] */ LPCWSTR pszValueType,\r
- /* [in] */ const PROPVARIANT *ppropvar,\r
- /* [in] */ BOOL fUseEnglish,\r
- /* [retval][out] */ \r
- __deref_opt_out LPWSTR *ppszPhrase);\r
- \r
- END_INTERFACE\r
- } IConditionGeneratorVtbl;\r
-\r
- interface IConditionGenerator\r
- {\r
- CONST_VTBL struct IConditionGeneratorVtbl *lpVtbl;\r
- };\r
-\r
- \r
-\r
-#ifdef COBJMACROS\r
-\r
-\r
-#define IConditionGenerator_QueryInterface(This,riid,ppvObject) \\r
- ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r
-\r
-#define IConditionGenerator_AddRef(This) \\r
- ( (This)->lpVtbl -> AddRef(This) ) \r
-\r
-#define IConditionGenerator_Release(This) \\r
- ( (This)->lpVtbl -> Release(This) ) \r
-\r
-\r
-#define IConditionGenerator_Initialize(This,pSchemaProvider) \\r
- ( (This)->lpVtbl -> Initialize(This,pSchemaProvider) ) \r
-\r
-#define IConditionGenerator_RecognizeNamedEntities(This,pszInputString,lcid,pTokenCollection,pNamedEntities) \\r
- ( (This)->lpVtbl -> RecognizeNamedEntities(This,pszInputString,lcid,pTokenCollection,pNamedEntities) ) \r
-\r
-#define IConditionGenerator_GenerateForLeaf(This,pConditionFactory,pszPropertyName,op,pszValueType,pszValue,pszValue2,pPropertyNameTerm,pOperationTerm,pValueTerm,automaticWildcard,pNoStringQuery,ppQueryExpression) \\r
- ( (This)->lpVtbl -> GenerateForLeaf(This,pConditionFactory,pszPropertyName,op,pszValueType,pszValue,pszValue2,pPropertyNameTerm,pOperationTerm,pValueTerm,automaticWildcard,pNoStringQuery,ppQueryExpression) ) \r
-\r
-#define IConditionGenerator_DefaultPhrase(This,pszValueType,ppropvar,fUseEnglish,ppszPhrase) \\r
- ( (This)->lpVtbl -> DefaultPhrase(This,pszValueType,ppropvar,fUseEnglish,ppszPhrase) ) \r
-\r
-#endif /* COBJMACROS */\r
-\r
-\r
-#endif /* C style interface */\r
-\r
-\r
-\r
-\r
-#endif /* __IConditionGenerator_INTERFACE_DEFINED__ */\r
-\r
-\r
-#ifndef __IRichChunk_INTERFACE_DEFINED__\r
-#define __IRichChunk_INTERFACE_DEFINED__\r
-\r
-/* interface IRichChunk */\r
-/* [unique][uuid][object] */ \r
-\r
-\r
-EXTERN_C const IID IID_IRichChunk;\r
-\r
-#if defined(__cplusplus) && !defined(CINTERFACE)\r
- \r
- MIDL_INTERFACE("4FDEF69C-DBC9-454e-9910-B34F3C64B510")\r
- IRichChunk : public IUnknown\r
- {\r
- public:\r
- virtual /* [local] */ HRESULT STDMETHODCALLTYPE GetData( \r
- /* [out] */ \r
- __out_opt ULONG *pFirstPos,\r
- /* [out] */ \r
- __out_opt ULONG *pLength,\r
- /* [out] */ \r
- __deref_opt_out LPWSTR *ppsz,\r
- /* [out] */ \r
- __out_opt PROPVARIANT *pValue) = 0;\r
- \r
- };\r
- \r
-#else /* C style interface */\r
-\r
- typedef struct IRichChunkVtbl\r
- {\r
- BEGIN_INTERFACE\r
- \r
- HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r
- IRichChunk * This,\r
- /* [in] */ __RPC__in REFIID riid,\r
- /* [iid_is][out] */ \r
- __RPC__deref_out void **ppvObject);\r
- \r
- ULONG ( STDMETHODCALLTYPE *AddRef )( \r
- IRichChunk * This);\r
- \r
- ULONG ( STDMETHODCALLTYPE *Release )( \r
- IRichChunk * This);\r
- \r
- /* [local] */ HRESULT ( STDMETHODCALLTYPE *GetData )( \r
- IRichChunk * This,\r
- /* [out] */ \r
- __out_opt ULONG *pFirstPos,\r
- /* [out] */ \r
- __out_opt ULONG *pLength,\r
- /* [out] */ \r
- __deref_opt_out LPWSTR *ppsz,\r
- /* [out] */ \r
- __out_opt PROPVARIANT *pValue);\r
- \r
- END_INTERFACE\r
- } IRichChunkVtbl;\r
-\r
- interface IRichChunk\r
- {\r
- CONST_VTBL struct IRichChunkVtbl *lpVtbl;\r
- };\r
-\r
- \r
-\r
-#ifdef COBJMACROS\r
-\r
-\r
-#define IRichChunk_QueryInterface(This,riid,ppvObject) \\r
- ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r
-\r
-#define IRichChunk_AddRef(This) \\r
- ( (This)->lpVtbl -> AddRef(This) ) \r
-\r
-#define IRichChunk_Release(This) \\r
- ( (This)->lpVtbl -> Release(This) ) \r
-\r
-\r
-#define IRichChunk_GetData(This,pFirstPos,pLength,ppsz,pValue) \\r
- ( (This)->lpVtbl -> GetData(This,pFirstPos,pLength,ppsz,pValue) ) \r
-\r
-#endif /* COBJMACROS */\r
-\r
-\r
-#endif /* C style interface */\r
-\r
-\r
-\r
-\r
-#endif /* __IRichChunk_INTERFACE_DEFINED__ */\r
-\r
-\r
-#ifndef __IInterval_INTERFACE_DEFINED__\r
-#define __IInterval_INTERFACE_DEFINED__\r
-\r
-/* interface IInterval */\r
-/* [unique][uuid][object] */ \r
-\r
-\r
-EXTERN_C const IID IID_IInterval;\r
-\r
-#if defined(__cplusplus) && !defined(CINTERFACE)\r
- \r
- MIDL_INTERFACE("6BF0A714-3C18-430b-8B5D-83B1C234D3DB")\r
- IInterval : public IUnknown\r
- {\r
- public:\r
- virtual HRESULT STDMETHODCALLTYPE GetLimits( \r
- /* [out] */ __RPC__out INTERVAL_LIMIT_KIND *pilkLower,\r
- /* [out] */ __RPC__out PROPVARIANT *ppropvarLower,\r
- /* [out] */ __RPC__out INTERVAL_LIMIT_KIND *pilkUpper,\r
- /* [out] */ __RPC__out PROPVARIANT *ppropvarUpper) = 0;\r
- \r
- };\r
- \r
-#else /* C style interface */\r
-\r
- typedef struct IIntervalVtbl\r
- {\r
- BEGIN_INTERFACE\r
- \r
- HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r
- IInterval * This,\r
- /* [in] */ __RPC__in REFIID riid,\r
- /* [iid_is][out] */ \r
- __RPC__deref_out void **ppvObject);\r
- \r
- ULONG ( STDMETHODCALLTYPE *AddRef )( \r
- IInterval * This);\r
- \r
- ULONG ( STDMETHODCALLTYPE *Release )( \r
- IInterval * This);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetLimits )( \r
- IInterval * This,\r
- /* [out] */ __RPC__out INTERVAL_LIMIT_KIND *pilkLower,\r
- /* [out] */ __RPC__out PROPVARIANT *ppropvarLower,\r
- /* [out] */ __RPC__out INTERVAL_LIMIT_KIND *pilkUpper,\r
- /* [out] */ __RPC__out PROPVARIANT *ppropvarUpper);\r
- \r
- END_INTERFACE\r
- } IIntervalVtbl;\r
-\r
- interface IInterval\r
- {\r
- CONST_VTBL struct IIntervalVtbl *lpVtbl;\r
- };\r
-\r
- \r
-\r
-#ifdef COBJMACROS\r
-\r
-\r
-#define IInterval_QueryInterface(This,riid,ppvObject) \\r
- ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r
-\r
-#define IInterval_AddRef(This) \\r
- ( (This)->lpVtbl -> AddRef(This) ) \r
-\r
-#define IInterval_Release(This) \\r
- ( (This)->lpVtbl -> Release(This) ) \r
-\r
-\r
-#define IInterval_GetLimits(This,pilkLower,ppropvarLower,pilkUpper,ppropvarUpper) \\r
- ( (This)->lpVtbl -> GetLimits(This,pilkLower,ppropvarLower,pilkUpper,ppropvarUpper) ) \r
-\r
-#endif /* COBJMACROS */\r
-\r
-\r
-#endif /* C style interface */\r
-\r
-\r
-\r
-\r
-#endif /* __IInterval_INTERFACE_DEFINED__ */\r
-\r
-\r
-#ifndef __IMetaData_INTERFACE_DEFINED__\r
-#define __IMetaData_INTERFACE_DEFINED__\r
-\r
-/* interface IMetaData */\r
-/* [unique][uuid][object][helpstring] */ \r
-\r
-\r
-EXTERN_C const IID IID_IMetaData;\r
-\r
-#if defined(__cplusplus) && !defined(CINTERFACE)\r
- \r
- MIDL_INTERFACE("780102B0-C43B-4876-BC7B-5E9BA5C88794")\r
- IMetaData : public IUnknown\r
- {\r
- public:\r
- virtual /* [local] */ HRESULT STDMETHODCALLTYPE GetData( \r
- /* [out] */ \r
- __deref_opt_out LPWSTR *ppszKey,\r
- /* [out] */ \r
- __deref_opt_out LPWSTR *ppszValue) = 0;\r
- \r
- };\r
- \r
-#else /* C style interface */\r
-\r
- typedef struct IMetaDataVtbl\r
- {\r
- BEGIN_INTERFACE\r
- \r
- HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r
- IMetaData * This,\r
- /* [in] */ __RPC__in REFIID riid,\r
- /* [iid_is][out] */ \r
- __RPC__deref_out void **ppvObject);\r
- \r
- ULONG ( STDMETHODCALLTYPE *AddRef )( \r
- IMetaData * This);\r
- \r
- ULONG ( STDMETHODCALLTYPE *Release )( \r
- IMetaData * This);\r
- \r
- /* [local] */ HRESULT ( STDMETHODCALLTYPE *GetData )( \r
- IMetaData * This,\r
- /* [out] */ \r
- __deref_opt_out LPWSTR *ppszKey,\r
- /* [out] */ \r
- __deref_opt_out LPWSTR *ppszValue);\r
- \r
- END_INTERFACE\r
- } IMetaDataVtbl;\r
-\r
- interface IMetaData\r
- {\r
- CONST_VTBL struct IMetaDataVtbl *lpVtbl;\r
- };\r
-\r
- \r
-\r
-#ifdef COBJMACROS\r
-\r
-\r
-#define IMetaData_QueryInterface(This,riid,ppvObject) \\r
- ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r
-\r
-#define IMetaData_AddRef(This) \\r
- ( (This)->lpVtbl -> AddRef(This) ) \r
-\r
-#define IMetaData_Release(This) \\r
- ( (This)->lpVtbl -> Release(This) ) \r
-\r
-\r
-#define IMetaData_GetData(This,ppszKey,ppszValue) \\r
- ( (This)->lpVtbl -> GetData(This,ppszKey,ppszValue) ) \r
-\r
-#endif /* COBJMACROS */\r
-\r
-\r
-#endif /* C style interface */\r
-\r
-\r
-\r
-\r
-#endif /* __IMetaData_INTERFACE_DEFINED__ */\r
-\r
-\r
-/* interface __MIDL_itf_structuredquery_0000_0008 */\r
-/* [local] */ \r
-\r
-\r
-\r
-\r
-extern RPC_IF_HANDLE __MIDL_itf_structuredquery_0000_0008_v0_0_c_ifspec;\r
-extern RPC_IF_HANDLE __MIDL_itf_structuredquery_0000_0008_v0_0_s_ifspec;\r
-\r
-#ifndef __IEntity_INTERFACE_DEFINED__\r
-#define __IEntity_INTERFACE_DEFINED__\r
-\r
-/* interface IEntity */\r
-/* [unique][object][uuid][helpstring] */ \r
-\r
-\r
-EXTERN_C const IID IID_IEntity;\r
-\r
-#if defined(__cplusplus) && !defined(CINTERFACE)\r
- \r
- MIDL_INTERFACE("24264891-E80B-4fd3-B7CE-4FF2FAE8931F")\r
- IEntity : public IUnknown\r
- {\r
- public:\r
- virtual /* [local] */ HRESULT STDMETHODCALLTYPE Name( \r
- /* [retval][out] */ \r
- __deref_opt_out LPWSTR *ppszName) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE Base( \r
- /* [retval][out] */ __RPC__deref_out_opt IEntity **pBaseEntity) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE Relationships( \r
- /* [in] */ __RPC__in REFIID riid,\r
- /* [iid_is][retval][out] */ __RPC__deref_out_opt void **pRelationships) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE GetRelationship( \r
- /* [in] */ __RPC__in LPCWSTR pszRelationName,\r
- /* [retval][out] */ __RPC__deref_out_opt IRelationship **pRelationship) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE MetaData( \r
- /* [in] */ __RPC__in REFIID riid,\r
- /* [iid_is][retval][out] */ __RPC__deref_out_opt void **pMetaData) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE NamedEntities( \r
- /* [in] */ __RPC__in REFIID riid,\r
- /* [iid_is][retval][out] */ __RPC__deref_out_opt void **pNamedEntities) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE GetNamedEntity( \r
- /* [in] */ __RPC__in LPCWSTR pszValue,\r
- /* [retval][out] */ __RPC__deref_out_opt INamedEntity **ppNamedEntity) = 0;\r
- \r
- virtual /* [local] */ HRESULT STDMETHODCALLTYPE DefaultPhrase( \r
- /* [retval][out] */ \r
- __deref_opt_out LPWSTR *ppszPhrase) = 0;\r
- \r
- };\r
- \r
-#else /* C style interface */\r
-\r
- typedef struct IEntityVtbl\r
- {\r
- BEGIN_INTERFACE\r
- \r
- HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r
- IEntity * This,\r
- /* [in] */ __RPC__in REFIID riid,\r
- /* [iid_is][out] */ \r
- __RPC__deref_out void **ppvObject);\r
- \r
- ULONG ( STDMETHODCALLTYPE *AddRef )( \r
- IEntity * This);\r
- \r
- ULONG ( STDMETHODCALLTYPE *Release )( \r
- IEntity * This);\r
- \r
- /* [local] */ HRESULT ( STDMETHODCALLTYPE *Name )( \r
- IEntity * This,\r
- /* [retval][out] */ \r
- __deref_opt_out LPWSTR *ppszName);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *Base )( \r
- IEntity * This,\r
- /* [retval][out] */ __RPC__deref_out_opt IEntity **pBaseEntity);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *Relationships )( \r
- IEntity * This,\r
- /* [in] */ __RPC__in REFIID riid,\r
- /* [iid_is][retval][out] */ __RPC__deref_out_opt void **pRelationships);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetRelationship )( \r
- IEntity * This,\r
- /* [in] */ __RPC__in LPCWSTR pszRelationName,\r
- /* [retval][out] */ __RPC__deref_out_opt IRelationship **pRelationship);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *MetaData )( \r
- IEntity * This,\r
- /* [in] */ __RPC__in REFIID riid,\r
- /* [iid_is][retval][out] */ __RPC__deref_out_opt void **pMetaData);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *NamedEntities )( \r
- IEntity * This,\r
- /* [in] */ __RPC__in REFIID riid,\r
- /* [iid_is][retval][out] */ __RPC__deref_out_opt void **pNamedEntities);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetNamedEntity )( \r
- IEntity * This,\r
- /* [in] */ __RPC__in LPCWSTR pszValue,\r
- /* [retval][out] */ __RPC__deref_out_opt INamedEntity **ppNamedEntity);\r
- \r
- /* [local] */ HRESULT ( STDMETHODCALLTYPE *DefaultPhrase )( \r
- IEntity * This,\r
- /* [retval][out] */ \r
- __deref_opt_out LPWSTR *ppszPhrase);\r
- \r
- END_INTERFACE\r
- } IEntityVtbl;\r
-\r
- interface IEntity\r
- {\r
- CONST_VTBL struct IEntityVtbl *lpVtbl;\r
- };\r
-\r
- \r
-\r
-#ifdef COBJMACROS\r
-\r
-\r
-#define IEntity_QueryInterface(This,riid,ppvObject) \\r
- ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r
-\r
-#define IEntity_AddRef(This) \\r
- ( (This)->lpVtbl -> AddRef(This) ) \r
-\r
-#define IEntity_Release(This) \\r
- ( (This)->lpVtbl -> Release(This) ) \r
-\r
-\r
-#define IEntity_Name(This,ppszName) \\r
- ( (This)->lpVtbl -> Name(This,ppszName) ) \r
-\r
-#define IEntity_Base(This,pBaseEntity) \\r
- ( (This)->lpVtbl -> Base(This,pBaseEntity) ) \r
-\r
-#define IEntity_Relationships(This,riid,pRelationships) \\r
- ( (This)->lpVtbl -> Relationships(This,riid,pRelationships) ) \r
-\r
-#define IEntity_GetRelationship(This,pszRelationName,pRelationship) \\r
- ( (This)->lpVtbl -> GetRelationship(This,pszRelationName,pRelationship) ) \r
-\r
-#define IEntity_MetaData(This,riid,pMetaData) \\r
- ( (This)->lpVtbl -> MetaData(This,riid,pMetaData) ) \r
-\r
-#define IEntity_NamedEntities(This,riid,pNamedEntities) \\r
- ( (This)->lpVtbl -> NamedEntities(This,riid,pNamedEntities) ) \r
-\r
-#define IEntity_GetNamedEntity(This,pszValue,ppNamedEntity) \\r
- ( (This)->lpVtbl -> GetNamedEntity(This,pszValue,ppNamedEntity) ) \r
-\r
-#define IEntity_DefaultPhrase(This,ppszPhrase) \\r
- ( (This)->lpVtbl -> DefaultPhrase(This,ppszPhrase) ) \r
-\r
-#endif /* COBJMACROS */\r
-\r
-\r
-#endif /* C style interface */\r
-\r
-\r
-\r
-\r
-#endif /* __IEntity_INTERFACE_DEFINED__ */\r
-\r
-\r
-#ifndef __IRelationship_INTERFACE_DEFINED__\r
-#define __IRelationship_INTERFACE_DEFINED__\r
-\r
-/* interface IRelationship */\r
-/* [unique][object][uuid][helpstring] */ \r
-\r
-\r
-EXTERN_C const IID IID_IRelationship;\r
-\r
-#if defined(__cplusplus) && !defined(CINTERFACE)\r
- \r
- MIDL_INTERFACE("2769280B-5108-498c-9C7F-A51239B63147")\r
- IRelationship : public IUnknown\r
- {\r
- public:\r
- virtual /* [local] */ HRESULT STDMETHODCALLTYPE Name( \r
- /* [retval][out] */ \r
- __deref_opt_out LPWSTR *ppszName) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE IsReal( \r
- /* [retval][out] */ __RPC__out BOOL *pIsReal) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE Destination( \r
- /* [retval][out] */ __RPC__deref_out_opt IEntity **pDestinationEntity) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE MetaData( \r
- /* [in] */ __RPC__in REFIID riid,\r
- /* [iid_is][retval][out] */ __RPC__deref_out_opt void **pMetaData) = 0;\r
- \r
- virtual /* [local] */ HRESULT STDMETHODCALLTYPE DefaultPhrase( \r
- /* [retval][out] */ \r
- __deref_opt_out LPWSTR *ppszPhrase) = 0;\r
- \r
- };\r
- \r
-#else /* C style interface */\r
-\r
- typedef struct IRelationshipVtbl\r
- {\r
- BEGIN_INTERFACE\r
- \r
- HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r
- IRelationship * This,\r
- /* [in] */ __RPC__in REFIID riid,\r
- /* [iid_is][out] */ \r
- __RPC__deref_out void **ppvObject);\r
- \r
- ULONG ( STDMETHODCALLTYPE *AddRef )( \r
- IRelationship * This);\r
- \r
- ULONG ( STDMETHODCALLTYPE *Release )( \r
- IRelationship * This);\r
- \r
- /* [local] */ HRESULT ( STDMETHODCALLTYPE *Name )( \r
- IRelationship * This,\r
- /* [retval][out] */ \r
- __deref_opt_out LPWSTR *ppszName);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *IsReal )( \r
- IRelationship * This,\r
- /* [retval][out] */ __RPC__out BOOL *pIsReal);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *Destination )( \r
- IRelationship * This,\r
- /* [retval][out] */ __RPC__deref_out_opt IEntity **pDestinationEntity);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *MetaData )( \r
- IRelationship * This,\r
- /* [in] */ __RPC__in REFIID riid,\r
- /* [iid_is][retval][out] */ __RPC__deref_out_opt void **pMetaData);\r
- \r
- /* [local] */ HRESULT ( STDMETHODCALLTYPE *DefaultPhrase )( \r
- IRelationship * This,\r
- /* [retval][out] */ \r
- __deref_opt_out LPWSTR *ppszPhrase);\r
- \r
- END_INTERFACE\r
- } IRelationshipVtbl;\r
-\r
- interface IRelationship\r
- {\r
- CONST_VTBL struct IRelationshipVtbl *lpVtbl;\r
- };\r
-\r
- \r
-\r
-#ifdef COBJMACROS\r
-\r
-\r
-#define IRelationship_QueryInterface(This,riid,ppvObject) \\r
- ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r
-\r
-#define IRelationship_AddRef(This) \\r
- ( (This)->lpVtbl -> AddRef(This) ) \r
-\r
-#define IRelationship_Release(This) \\r
- ( (This)->lpVtbl -> Release(This) ) \r
-\r
-\r
-#define IRelationship_Name(This,ppszName) \\r
- ( (This)->lpVtbl -> Name(This,ppszName) ) \r
-\r
-#define IRelationship_IsReal(This,pIsReal) \\r
- ( (This)->lpVtbl -> IsReal(This,pIsReal) ) \r
-\r
-#define IRelationship_Destination(This,pDestinationEntity) \\r
- ( (This)->lpVtbl -> Destination(This,pDestinationEntity) ) \r
-\r
-#define IRelationship_MetaData(This,riid,pMetaData) \\r
- ( (This)->lpVtbl -> MetaData(This,riid,pMetaData) ) \r
-\r
-#define IRelationship_DefaultPhrase(This,ppszPhrase) \\r
- ( (This)->lpVtbl -> DefaultPhrase(This,ppszPhrase) ) \r
-\r
-#endif /* COBJMACROS */\r
-\r
-\r
-#endif /* C style interface */\r
-\r
-\r
-\r
-\r
-#endif /* __IRelationship_INTERFACE_DEFINED__ */\r
-\r
-\r
-#ifndef __INamedEntity_INTERFACE_DEFINED__\r
-#define __INamedEntity_INTERFACE_DEFINED__\r
-\r
-/* interface INamedEntity */\r
-/* [unique][uuid][object][helpstring] */ \r
-\r
-\r
-EXTERN_C const IID IID_INamedEntity;\r
-\r
-#if defined(__cplusplus) && !defined(CINTERFACE)\r
- \r
- MIDL_INTERFACE("ABDBD0B1-7D54-49fb-AB5C-BFF4130004CD")\r
- INamedEntity : public IUnknown\r
- {\r
- public:\r
- virtual HRESULT STDMETHODCALLTYPE GetValue( \r
- /* [retval][out] */ __RPC__deref_out_opt LPWSTR *ppszValue) = 0;\r
- \r
- virtual /* [local] */ HRESULT STDMETHODCALLTYPE DefaultPhrase( \r
- /* [retval][out] */ \r
- __deref_opt_out LPWSTR *ppszPhrase) = 0;\r
- \r
- };\r
- \r
-#else /* C style interface */\r
-\r
- typedef struct INamedEntityVtbl\r
- {\r
- BEGIN_INTERFACE\r
- \r
- HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r
- INamedEntity * This,\r
- /* [in] */ __RPC__in REFIID riid,\r
- /* [iid_is][out] */ \r
- __RPC__deref_out void **ppvObject);\r
- \r
- ULONG ( STDMETHODCALLTYPE *AddRef )( \r
- INamedEntity * This);\r
- \r
- ULONG ( STDMETHODCALLTYPE *Release )( \r
- INamedEntity * This);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetValue )( \r
- INamedEntity * This,\r
- /* [retval][out] */ __RPC__deref_out_opt LPWSTR *ppszValue);\r
- \r
- /* [local] */ HRESULT ( STDMETHODCALLTYPE *DefaultPhrase )( \r
- INamedEntity * This,\r
- /* [retval][out] */ \r
- __deref_opt_out LPWSTR *ppszPhrase);\r
- \r
- END_INTERFACE\r
- } INamedEntityVtbl;\r
-\r
- interface INamedEntity\r
- {\r
- CONST_VTBL struct INamedEntityVtbl *lpVtbl;\r
- };\r
-\r
- \r
-\r
-#ifdef COBJMACROS\r
-\r
-\r
-#define INamedEntity_QueryInterface(This,riid,ppvObject) \\r
- ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r
-\r
-#define INamedEntity_AddRef(This) \\r
- ( (This)->lpVtbl -> AddRef(This) ) \r
-\r
-#define INamedEntity_Release(This) \\r
- ( (This)->lpVtbl -> Release(This) ) \r
-\r
-\r
-#define INamedEntity_GetValue(This,ppszValue) \\r
- ( (This)->lpVtbl -> GetValue(This,ppszValue) ) \r
-\r
-#define INamedEntity_DefaultPhrase(This,ppszPhrase) \\r
- ( (This)->lpVtbl -> DefaultPhrase(This,ppszPhrase) ) \r
-\r
-#endif /* COBJMACROS */\r
-\r
-\r
-#endif /* C style interface */\r
-\r
-\r
-\r
-\r
-#endif /* __INamedEntity_INTERFACE_DEFINED__ */\r
-\r
-\r
-#ifndef __ISchemaProvider_INTERFACE_DEFINED__\r
-#define __ISchemaProvider_INTERFACE_DEFINED__\r
-\r
-/* interface ISchemaProvider */\r
-/* [unique][object][uuid][helpstring] */ \r
-\r
-\r
-EXTERN_C const IID IID_ISchemaProvider;\r
-\r
-#if defined(__cplusplus) && !defined(CINTERFACE)\r
- \r
- MIDL_INTERFACE("8CF89BCB-394C-49b2-AE28-A59DD4ED7F68")\r
- ISchemaProvider : public IUnknown\r
- {\r
- public:\r
- virtual HRESULT STDMETHODCALLTYPE Entities( \r
- /* [in] */ __RPC__in REFIID riid,\r
- /* [iid_is][retval][out] */ __RPC__deref_out_opt void **pEntities) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE RootEntity( \r
- /* [retval][out] */ __RPC__deref_out_opt IEntity **pRootEntity) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE GetEntity( \r
- /* [in] */ __RPC__in LPCWSTR pszEntityName,\r
- /* [retval][out] */ __RPC__deref_out_opt IEntity **pEntity) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE MetaData( \r
- /* [in] */ __RPC__in REFIID riid,\r
- /* [iid_is][retval][out] */ __RPC__deref_out_opt void **pMetaData) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE Localize( \r
- /* [in] */ LCID lcid,\r
- /* [in] */ __RPC__in_opt ISchemaLocalizerSupport *pSchemaLocalizerSupport) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE SaveBinary( \r
- /* [in] */ __RPC__in LPCWSTR pszSchemaBinaryPath) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE LookupAuthoredNamedEntity( \r
- /* [in] */ __RPC__in_opt IEntity *pEntity,\r
- /* [in] */ __RPC__in LPCWSTR pszInputString,\r
- /* [in] */ __RPC__in_opt ITokenCollection *pTokenCollection,\r
- /* [in] */ ULONG cTokensBegin,\r
- /* [out] */ __RPC__out ULONG *pcTokensLength,\r
- /* [out] */ __RPC__deref_out_opt LPWSTR *ppszValue) = 0;\r
- \r
- };\r
- \r
-#else /* C style interface */\r
-\r
- typedef struct ISchemaProviderVtbl\r
- {\r
- BEGIN_INTERFACE\r
- \r
- HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r
- ISchemaProvider * This,\r
- /* [in] */ __RPC__in REFIID riid,\r
- /* [iid_is][out] */ \r
- __RPC__deref_out void **ppvObject);\r
- \r
- ULONG ( STDMETHODCALLTYPE *AddRef )( \r
- ISchemaProvider * This);\r
- \r
- ULONG ( STDMETHODCALLTYPE *Release )( \r
- ISchemaProvider * This);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *Entities )( \r
- ISchemaProvider * This,\r
- /* [in] */ __RPC__in REFIID riid,\r
- /* [iid_is][retval][out] */ __RPC__deref_out_opt void **pEntities);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *RootEntity )( \r
- ISchemaProvider * This,\r
- /* [retval][out] */ __RPC__deref_out_opt IEntity **pRootEntity);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *GetEntity )( \r
- ISchemaProvider * This,\r
- /* [in] */ __RPC__in LPCWSTR pszEntityName,\r
- /* [retval][out] */ __RPC__deref_out_opt IEntity **pEntity);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *MetaData )( \r
- ISchemaProvider * This,\r
- /* [in] */ __RPC__in REFIID riid,\r
- /* [iid_is][retval][out] */ __RPC__deref_out_opt void **pMetaData);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *Localize )( \r
- ISchemaProvider * This,\r
- /* [in] */ LCID lcid,\r
- /* [in] */ __RPC__in_opt ISchemaLocalizerSupport *pSchemaLocalizerSupport);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *SaveBinary )( \r
- ISchemaProvider * This,\r
- /* [in] */ __RPC__in LPCWSTR pszSchemaBinaryPath);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *LookupAuthoredNamedEntity )( \r
- ISchemaProvider * This,\r
- /* [in] */ __RPC__in_opt IEntity *pEntity,\r
- /* [in] */ __RPC__in LPCWSTR pszInputString,\r
- /* [in] */ __RPC__in_opt ITokenCollection *pTokenCollection,\r
- /* [in] */ ULONG cTokensBegin,\r
- /* [out] */ __RPC__out ULONG *pcTokensLength,\r
- /* [out] */ __RPC__deref_out_opt LPWSTR *ppszValue);\r
- \r
- END_INTERFACE\r
- } ISchemaProviderVtbl;\r
-\r
- interface ISchemaProvider\r
- {\r
- CONST_VTBL struct ISchemaProviderVtbl *lpVtbl;\r
- };\r
-\r
- \r
-\r
-#ifdef COBJMACROS\r
-\r
-\r
-#define ISchemaProvider_QueryInterface(This,riid,ppvObject) \\r
- ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r
-\r
-#define ISchemaProvider_AddRef(This) \\r
- ( (This)->lpVtbl -> AddRef(This) ) \r
-\r
-#define ISchemaProvider_Release(This) \\r
- ( (This)->lpVtbl -> Release(This) ) \r
-\r
-\r
-#define ISchemaProvider_Entities(This,riid,pEntities) \\r
- ( (This)->lpVtbl -> Entities(This,riid,pEntities) ) \r
-\r
-#define ISchemaProvider_RootEntity(This,pRootEntity) \\r
- ( (This)->lpVtbl -> RootEntity(This,pRootEntity) ) \r
-\r
-#define ISchemaProvider_GetEntity(This,pszEntityName,pEntity) \\r
- ( (This)->lpVtbl -> GetEntity(This,pszEntityName,pEntity) ) \r
-\r
-#define ISchemaProvider_MetaData(This,riid,pMetaData) \\r
- ( (This)->lpVtbl -> MetaData(This,riid,pMetaData) ) \r
-\r
-#define ISchemaProvider_Localize(This,lcid,pSchemaLocalizerSupport) \\r
- ( (This)->lpVtbl -> Localize(This,lcid,pSchemaLocalizerSupport) ) \r
-\r
-#define ISchemaProvider_SaveBinary(This,pszSchemaBinaryPath) \\r
- ( (This)->lpVtbl -> SaveBinary(This,pszSchemaBinaryPath) ) \r
-\r
-#define ISchemaProvider_LookupAuthoredNamedEntity(This,pEntity,pszInputString,pTokenCollection,cTokensBegin,pcTokensLength,ppszValue) \\r
- ( (This)->lpVtbl -> LookupAuthoredNamedEntity(This,pEntity,pszInputString,pTokenCollection,cTokensBegin,pcTokensLength,ppszValue) ) \r
-\r
-#endif /* COBJMACROS */\r
-\r
-\r
-#endif /* C style interface */\r
-\r
-\r
-\r
-\r
-#endif /* __ISchemaProvider_INTERFACE_DEFINED__ */\r
-\r
-\r
-#ifndef __ITokenCollection_INTERFACE_DEFINED__\r
-#define __ITokenCollection_INTERFACE_DEFINED__\r
-\r
-/* interface ITokenCollection */\r
-/* [unique][object][uuid][helpstring] */ \r
-\r
-\r
-EXTERN_C const IID IID_ITokenCollection;\r
-\r
-#if defined(__cplusplus) && !defined(CINTERFACE)\r
- \r
- MIDL_INTERFACE("22D8B4F2-F577-4adb-A335-C2AE88416FAB")\r
- ITokenCollection : public IUnknown\r
- {\r
- public:\r
- virtual HRESULT STDMETHODCALLTYPE NumberOfTokens( \r
- __RPC__in ULONG *pCount) = 0;\r
- \r
- virtual /* [local] */ HRESULT STDMETHODCALLTYPE GetToken( \r
- /* [in] */ ULONG i,\r
- /* [out] */ \r
- __out_opt ULONG *pBegin,\r
- /* [out] */ \r
- __out_opt ULONG *pLength,\r
- /* [out] */ \r
- __deref_opt_out LPWSTR *ppsz) = 0;\r
- \r
- };\r
- \r
-#else /* C style interface */\r
-\r
- typedef struct ITokenCollectionVtbl\r
- {\r
- BEGIN_INTERFACE\r
- \r
- HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r
- ITokenCollection * This,\r
- /* [in] */ __RPC__in REFIID riid,\r
- /* [iid_is][out] */ \r
- __RPC__deref_out void **ppvObject);\r
- \r
- ULONG ( STDMETHODCALLTYPE *AddRef )( \r
- ITokenCollection * This);\r
- \r
- ULONG ( STDMETHODCALLTYPE *Release )( \r
- ITokenCollection * This);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *NumberOfTokens )( \r
- ITokenCollection * This,\r
- __RPC__in ULONG *pCount);\r
- \r
- /* [local] */ HRESULT ( STDMETHODCALLTYPE *GetToken )( \r
- ITokenCollection * This,\r
- /* [in] */ ULONG i,\r
- /* [out] */ \r
- __out_opt ULONG *pBegin,\r
- /* [out] */ \r
- __out_opt ULONG *pLength,\r
- /* [out] */ \r
- __deref_opt_out LPWSTR *ppsz);\r
- \r
- END_INTERFACE\r
- } ITokenCollectionVtbl;\r
-\r
- interface ITokenCollection\r
- {\r
- CONST_VTBL struct ITokenCollectionVtbl *lpVtbl;\r
- };\r
-\r
- \r
-\r
-#ifdef COBJMACROS\r
-\r
-\r
-#define ITokenCollection_QueryInterface(This,riid,ppvObject) \\r
- ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r
-\r
-#define ITokenCollection_AddRef(This) \\r
- ( (This)->lpVtbl -> AddRef(This) ) \r
-\r
-#define ITokenCollection_Release(This) \\r
- ( (This)->lpVtbl -> Release(This) ) \r
-\r
-\r
-#define ITokenCollection_NumberOfTokens(This,pCount) \\r
- ( (This)->lpVtbl -> NumberOfTokens(This,pCount) ) \r
-\r
-#define ITokenCollection_GetToken(This,i,pBegin,pLength,ppsz) \\r
- ( (This)->lpVtbl -> GetToken(This,i,pBegin,pLength,ppsz) ) \r
-\r
-#endif /* COBJMACROS */\r
-\r
-\r
-#endif /* C style interface */\r
-\r
-\r
-\r
-\r
-#endif /* __ITokenCollection_INTERFACE_DEFINED__ */\r
-\r
-\r
-/* interface __MIDL_itf_structuredquery_0000_0013 */\r
-/* [local] */ \r
-\r
-typedef /* [public][public][v1_enum] */ \r
-enum __MIDL___MIDL_itf_structuredquery_0000_0013_0001\r
- { NEC_LOW = 0,\r
- NEC_MEDIUM = ( NEC_LOW + 1 ) ,\r
- NEC_HIGH = ( NEC_MEDIUM + 1 ) \r
- } NAMED_ENTITY_CERTAINTY;\r
-\r
-\r
-\r
-extern RPC_IF_HANDLE __MIDL_itf_structuredquery_0000_0013_v0_0_c_ifspec;\r
-extern RPC_IF_HANDLE __MIDL_itf_structuredquery_0000_0013_v0_0_s_ifspec;\r
-\r
-#ifndef __INamedEntityCollector_INTERFACE_DEFINED__\r
-#define __INamedEntityCollector_INTERFACE_DEFINED__\r
-\r
-/* interface INamedEntityCollector */\r
-/* [unique][object][uuid][helpstring] */ \r
-\r
-\r
-EXTERN_C const IID IID_INamedEntityCollector;\r
-\r
-#if defined(__cplusplus) && !defined(CINTERFACE)\r
- \r
- MIDL_INTERFACE("AF2440F6-8AFC-47d0-9A7F-396A0ACFB43D")\r
- INamedEntityCollector : public IUnknown\r
- {\r
- public:\r
- virtual HRESULT STDMETHODCALLTYPE Add( \r
- /* [in] */ ULONG beginSpan,\r
- /* [in] */ ULONG endSpan,\r
- /* [in] */ ULONG beginActual,\r
- /* [in] */ ULONG endActual,\r
- /* [in] */ __RPC__in_opt IEntity *pType,\r
- /* [in] */ __RPC__in LPCWSTR pszValue,\r
- /* [in] */ NAMED_ENTITY_CERTAINTY certainty) = 0;\r
- \r
- };\r
- \r
-#else /* C style interface */\r
-\r
- typedef struct INamedEntityCollectorVtbl\r
- {\r
- BEGIN_INTERFACE\r
- \r
- HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r
- INamedEntityCollector * This,\r
- /* [in] */ __RPC__in REFIID riid,\r
- /* [iid_is][out] */ \r
- __RPC__deref_out void **ppvObject);\r
- \r
- ULONG ( STDMETHODCALLTYPE *AddRef )( \r
- INamedEntityCollector * This);\r
- \r
- ULONG ( STDMETHODCALLTYPE *Release )( \r
- INamedEntityCollector * This);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *Add )( \r
- INamedEntityCollector * This,\r
- /* [in] */ ULONG beginSpan,\r
- /* [in] */ ULONG endSpan,\r
- /* [in] */ ULONG beginActual,\r
- /* [in] */ ULONG endActual,\r
- /* [in] */ __RPC__in_opt IEntity *pType,\r
- /* [in] */ __RPC__in LPCWSTR pszValue,\r
- /* [in] */ NAMED_ENTITY_CERTAINTY certainty);\r
- \r
- END_INTERFACE\r
- } INamedEntityCollectorVtbl;\r
-\r
- interface INamedEntityCollector\r
- {\r
- CONST_VTBL struct INamedEntityCollectorVtbl *lpVtbl;\r
- };\r
-\r
- \r
-\r
-#ifdef COBJMACROS\r
-\r
-\r
-#define INamedEntityCollector_QueryInterface(This,riid,ppvObject) \\r
- ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r
-\r
-#define INamedEntityCollector_AddRef(This) \\r
- ( (This)->lpVtbl -> AddRef(This) ) \r
-\r
-#define INamedEntityCollector_Release(This) \\r
- ( (This)->lpVtbl -> Release(This) ) \r
-\r
-\r
-#define INamedEntityCollector_Add(This,beginSpan,endSpan,beginActual,endActual,pType,pszValue,certainty) \\r
- ( (This)->lpVtbl -> Add(This,beginSpan,endSpan,beginActual,endActual,pType,pszValue,certainty) ) \r
-\r
-#endif /* COBJMACROS */\r
-\r
-\r
-#endif /* C style interface */\r
-\r
-\r
-\r
-\r
-#endif /* __INamedEntityCollector_INTERFACE_DEFINED__ */\r
-\r
-\r
-#ifndef __ISchemaLocalizerSupport_INTERFACE_DEFINED__\r
-#define __ISchemaLocalizerSupport_INTERFACE_DEFINED__\r
-\r
-/* interface ISchemaLocalizerSupport */\r
-/* [unique][object][uuid] */ \r
-\r
-\r
-EXTERN_C const IID IID_ISchemaLocalizerSupport;\r
-\r
-#if defined(__cplusplus) && !defined(CINTERFACE)\r
- \r
- MIDL_INTERFACE("CA3FDCA2-BFBE-4eed-90D7-0CAEF0A1BDA1")\r
- ISchemaLocalizerSupport : public IUnknown\r
- {\r
- public:\r
- virtual HRESULT STDMETHODCALLTYPE Localize( \r
- /* [in] */ __RPC__in LPCWSTR pszGlobalString,\r
- /* [retval][out] */ __RPC__deref_out_opt LPWSTR *ppszLocalString) = 0;\r
- \r
- };\r
- \r
-#else /* C style interface */\r
-\r
- typedef struct ISchemaLocalizerSupportVtbl\r
- {\r
- BEGIN_INTERFACE\r
- \r
- HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r
- ISchemaLocalizerSupport * This,\r
- /* [in] */ __RPC__in REFIID riid,\r
- /* [iid_is][out] */ \r
- __RPC__deref_out void **ppvObject);\r
- \r
- ULONG ( STDMETHODCALLTYPE *AddRef )( \r
- ISchemaLocalizerSupport * This);\r
- \r
- ULONG ( STDMETHODCALLTYPE *Release )( \r
- ISchemaLocalizerSupport * This);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *Localize )( \r
- ISchemaLocalizerSupport * This,\r
- /* [in] */ __RPC__in LPCWSTR pszGlobalString,\r
- /* [retval][out] */ __RPC__deref_out_opt LPWSTR *ppszLocalString);\r
- \r
- END_INTERFACE\r
- } ISchemaLocalizerSupportVtbl;\r
-\r
- interface ISchemaLocalizerSupport\r
- {\r
- CONST_VTBL struct ISchemaLocalizerSupportVtbl *lpVtbl;\r
- };\r
-\r
- \r
-\r
-#ifdef COBJMACROS\r
-\r
-\r
-#define ISchemaLocalizerSupport_QueryInterface(This,riid,ppvObject) \\r
- ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r
-\r
-#define ISchemaLocalizerSupport_AddRef(This) \\r
- ( (This)->lpVtbl -> AddRef(This) ) \r
-\r
-#define ISchemaLocalizerSupport_Release(This) \\r
- ( (This)->lpVtbl -> Release(This) ) \r
-\r
-\r
-#define ISchemaLocalizerSupport_Localize(This,pszGlobalString,ppszLocalString) \\r
- ( (This)->lpVtbl -> Localize(This,pszGlobalString,ppszLocalString) ) \r
-\r
-#endif /* COBJMACROS */\r
-\r
-\r
-#endif /* C style interface */\r
-\r
-\r
-\r
-\r
-#endif /* __ISchemaLocalizerSupport_INTERFACE_DEFINED__ */\r
-\r
-\r
-#ifndef __IQueryParserManager_INTERFACE_DEFINED__\r
-#define __IQueryParserManager_INTERFACE_DEFINED__\r
-\r
-/* interface IQueryParserManager */\r
-/* [unique][object][uuid] */ \r
-\r
-\r
-EXTERN_C const IID IID_IQueryParserManager;\r
-\r
-#if defined(__cplusplus) && !defined(CINTERFACE)\r
- \r
- MIDL_INTERFACE("A879E3C4-AF77-44fb-8F37-EBD1487CF920")\r
- IQueryParserManager : public IUnknown\r
- {\r
- public:\r
- virtual HRESULT STDMETHODCALLTYPE CreateLoadedParser( \r
- /* [in] */ __RPC__in LPCWSTR pszCatalog,\r
- /* [in] */ LANGID langidForKeywords,\r
- /* [in] */ __RPC__in REFIID riid,\r
- /* [iid_is][retval][out] */ __RPC__deref_out_opt void **ppQueryParser) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE InitializeOptions( \r
- /* [in] */ BOOL fUnderstandNQS,\r
- /* [in] */ BOOL fAutoWildCard,\r
- /* [in] */ __RPC__in_opt IQueryParser *pQueryParser) = 0;\r
- \r
- virtual HRESULT STDMETHODCALLTYPE SetOption( \r
- /* [in] */ QUERY_PARSER_MANAGER_OPTION option,\r
- /* [in] */ __RPC__in const PROPVARIANT *pOptionValue) = 0;\r
- \r
- };\r
- \r
-#else /* C style interface */\r
-\r
- typedef struct IQueryParserManagerVtbl\r
- {\r
- BEGIN_INTERFACE\r
- \r
- HRESULT ( STDMETHODCALLTYPE *QueryInterface )( \r
- IQueryParserManager * This,\r
- /* [in] */ __RPC__in REFIID riid,\r
- /* [iid_is][out] */ \r
- __RPC__deref_out void **ppvObject);\r
- \r
- ULONG ( STDMETHODCALLTYPE *AddRef )( \r
- IQueryParserManager * This);\r
- \r
- ULONG ( STDMETHODCALLTYPE *Release )( \r
- IQueryParserManager * This);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *CreateLoadedParser )( \r
- IQueryParserManager * This,\r
- /* [in] */ __RPC__in LPCWSTR pszCatalog,\r
- /* [in] */ LANGID langidForKeywords,\r
- /* [in] */ __RPC__in REFIID riid,\r
- /* [iid_is][retval][out] */ __RPC__deref_out_opt void **ppQueryParser);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *InitializeOptions )( \r
- IQueryParserManager * This,\r
- /* [in] */ BOOL fUnderstandNQS,\r
- /* [in] */ BOOL fAutoWildCard,\r
- /* [in] */ __RPC__in_opt IQueryParser *pQueryParser);\r
- \r
- HRESULT ( STDMETHODCALLTYPE *SetOption )( \r
- IQueryParserManager * This,\r
- /* [in] */ QUERY_PARSER_MANAGER_OPTION option,\r
- /* [in] */ __RPC__in const PROPVARIANT *pOptionValue);\r
- \r
- END_INTERFACE\r
- } IQueryParserManagerVtbl;\r
-\r
- interface IQueryParserManager\r
- {\r
- CONST_VTBL struct IQueryParserManagerVtbl *lpVtbl;\r
- };\r
-\r
- \r
-\r
-#ifdef COBJMACROS\r
-\r
-\r
-#define IQueryParserManager_QueryInterface(This,riid,ppvObject) \\r
- ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) \r
-\r
-#define IQueryParserManager_AddRef(This) \\r
- ( (This)->lpVtbl -> AddRef(This) ) \r
-\r
-#define IQueryParserManager_Release(This) \\r
- ( (This)->lpVtbl -> Release(This) ) \r
-\r
-\r
-#define IQueryParserManager_CreateLoadedParser(This,pszCatalog,langidForKeywords,riid,ppQueryParser) \\r
- ( (This)->lpVtbl -> CreateLoadedParser(This,pszCatalog,langidForKeywords,riid,ppQueryParser) ) \r
-\r
-#define IQueryParserManager_InitializeOptions(This,fUnderstandNQS,fAutoWildCard,pQueryParser) \\r
- ( (This)->lpVtbl -> InitializeOptions(This,fUnderstandNQS,fAutoWildCard,pQueryParser) ) \r
-\r
-#define IQueryParserManager_SetOption(This,option,pOptionValue) \\r
- ( (This)->lpVtbl -> SetOption(This,option,pOptionValue) ) \r
-\r
-#endif /* COBJMACROS */\r
-\r
-\r
-#endif /* C style interface */\r
-\r
-\r
-\r
-\r
-#endif /* __IQueryParserManager_INTERFACE_DEFINED__ */\r
-\r
-\r
-\r
-#ifndef __StructuredQuery1_LIBRARY_DEFINED__\r
-#define __StructuredQuery1_LIBRARY_DEFINED__\r
-\r
-/* library StructuredQuery1 */\r
-/* [version][uuid] */ \r
-\r
-\r
-EXTERN_C const IID LIBID_StructuredQuery1;\r
-\r
-EXTERN_C const CLSID CLSID_QueryParser;\r
-\r
-#ifdef __cplusplus\r
-\r
-class DECLSPEC_UUID("B72F8FD8-0FAB-4dd9-BDBF-245A6CE1485B")\r
-QueryParser;\r
-#endif\r
-\r
-EXTERN_C const CLSID CLSID_NegationCondition;\r
-\r
-#ifdef __cplusplus\r
-\r
-class DECLSPEC_UUID("8DE9C74C-605A-4acd-BEE3-2B222AA2D23D")\r
-NegationCondition;\r
-#endif\r
-\r
-EXTERN_C const CLSID CLSID_CompoundCondition;\r
-\r
-#ifdef __cplusplus\r
-\r
-class DECLSPEC_UUID("116F8D13-101E-4fa5-84D4-FF8279381935")\r
-CompoundCondition;\r
-#endif\r
-\r
-EXTERN_C const CLSID CLSID_LeafCondition;\r
-\r
-#ifdef __cplusplus\r
-\r
-class DECLSPEC_UUID("52F15C89-5A17-48e1-BBCD-46A3F89C7CC2")\r
-LeafCondition;\r
-#endif\r
-\r
-EXTERN_C const CLSID CLSID_ConditionFactory;\r
-\r
-#ifdef __cplusplus\r
-\r
-class DECLSPEC_UUID("E03E85B0-7BE3-4000-BA98-6C13DE9FA486")\r
-ConditionFactory;\r
-#endif\r
-\r
-EXTERN_C const CLSID CLSID_Interval;\r
-\r
-#ifdef __cplusplus\r
-\r
-class DECLSPEC_UUID("D957171F-4BF9-4de2-BCD5-C70A7CA55836")\r
-Interval;\r
-#endif\r
-\r
-EXTERN_C const CLSID CLSID_QueryParserManager;\r
-\r
-#ifdef __cplusplus\r
-\r
-class DECLSPEC_UUID("5088B39A-29B4-4d9d-8245-4EE289222F66")\r
-QueryParserManager;\r
-#endif\r
-#endif /* __StructuredQuery1_LIBRARY_DEFINED__ */\r
-\r
-/* Additional Prototypes for ALL interfaces */\r
-\r
-unsigned long __RPC_USER BSTR_UserSize( unsigned long *, unsigned long , BSTR * ); \r
-unsigned char * __RPC_USER BSTR_UserMarshal( unsigned long *, unsigned char *, BSTR * ); \r
-unsigned char * __RPC_USER BSTR_UserUnmarshal(unsigned long *, unsigned char *, BSTR * ); \r
-void __RPC_USER BSTR_UserFree( unsigned long *, BSTR * ); \r
-\r
-unsigned long __RPC_USER LPSAFEARRAY_UserSize( unsigned long *, unsigned long , LPSAFEARRAY * ); \r
-unsigned char * __RPC_USER LPSAFEARRAY_UserMarshal( unsigned long *, unsigned char *, LPSAFEARRAY * ); \r
-unsigned char * __RPC_USER LPSAFEARRAY_UserUnmarshal(unsigned long *, unsigned char *, LPSAFEARRAY * ); \r
-void __RPC_USER LPSAFEARRAY_UserFree( unsigned long *, LPSAFEARRAY * ); \r
-\r
-/* end of Additional Prototypes */\r
-\r
-#ifdef __cplusplus\r
-}\r
-#endif\r
-\r
-#endif\r
-\r
-\r
-\r
+
+
+/* this ALWAYS GENERATED file contains the definitions for the interfaces */
+
+
+ /* File created by MIDL compiler version 7.00.0499 */
+/* Compiler settings for structuredquery.idl:
+ Oicf, W1, Zp8, env=Win32 (32b run)
+ protocol : dce , ms_ext, c_ext, robust
+ error checks: allocation ref bounds_check enum stub_data
+ VC __declspec() decoration level:
+ __declspec(uuid()), __declspec(selectany), __declspec(novtable)
+ DECLSPEC_UUID(), MIDL_INTERFACE()
+*/
+//@@MIDL_FILE_HEADING( )
+
+#pragma warning( disable: 4049 ) /* more than 64k source lines */
+
+
+/* verify that the <rpcndr.h> version is high enough to compile this file*/
+#ifndef __REQUIRED_RPCNDR_H_VERSION__
+#define __REQUIRED_RPCNDR_H_VERSION__ 475
+#endif
+
+/* verify that the <rpcsal.h> version is high enough to compile this file*/
+#ifndef __REQUIRED_RPCSAL_H_VERSION__
+#define __REQUIRED_RPCSAL_H_VERSION__ 100
+#endif
+
+#include "rpc.h"
+#include "rpcndr.h"
+
+#ifndef __RPCNDR_H_VERSION__
+#error this stub requires an updated version of <rpcndr.h>
+#endif // __RPCNDR_H_VERSION__
+
+#ifndef COM_NO_WINDOWS_H
+#include "windows.h"
+#include "ole2.h"
+#endif /*COM_NO_WINDOWS_H*/
+
+#ifndef __structuredquery_h__
+#define __structuredquery_h__
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#pragma once
+#endif
+
+/* Forward Declarations */
+
+#ifndef __IQueryParser_FWD_DEFINED__
+#define __IQueryParser_FWD_DEFINED__
+typedef interface IQueryParser IQueryParser;
+#endif /* __IQueryParser_FWD_DEFINED__ */
+
+
+#ifndef __IConditionFactory_FWD_DEFINED__
+#define __IConditionFactory_FWD_DEFINED__
+typedef interface IConditionFactory IConditionFactory;
+#endif /* __IConditionFactory_FWD_DEFINED__ */
+
+
+#ifndef __IQuerySolution_FWD_DEFINED__
+#define __IQuerySolution_FWD_DEFINED__
+typedef interface IQuerySolution IQuerySolution;
+#endif /* __IQuerySolution_FWD_DEFINED__ */
+
+
+#ifndef __ICondition_FWD_DEFINED__
+#define __ICondition_FWD_DEFINED__
+typedef interface ICondition ICondition;
+#endif /* __ICondition_FWD_DEFINED__ */
+
+
+#ifndef __IConditionGenerator_FWD_DEFINED__
+#define __IConditionGenerator_FWD_DEFINED__
+typedef interface IConditionGenerator IConditionGenerator;
+#endif /* __IConditionGenerator_FWD_DEFINED__ */
+
+
+#ifndef __IRichChunk_FWD_DEFINED__
+#define __IRichChunk_FWD_DEFINED__
+typedef interface IRichChunk IRichChunk;
+#endif /* __IRichChunk_FWD_DEFINED__ */
+
+
+#ifndef __IInterval_FWD_DEFINED__
+#define __IInterval_FWD_DEFINED__
+typedef interface IInterval IInterval;
+#endif /* __IInterval_FWD_DEFINED__ */
+
+
+#ifndef __IMetaData_FWD_DEFINED__
+#define __IMetaData_FWD_DEFINED__
+typedef interface IMetaData IMetaData;
+#endif /* __IMetaData_FWD_DEFINED__ */
+
+
+#ifndef __IEntity_FWD_DEFINED__
+#define __IEntity_FWD_DEFINED__
+typedef interface IEntity IEntity;
+#endif /* __IEntity_FWD_DEFINED__ */
+
+
+#ifndef __IRelationship_FWD_DEFINED__
+#define __IRelationship_FWD_DEFINED__
+typedef interface IRelationship IRelationship;
+#endif /* __IRelationship_FWD_DEFINED__ */
+
+
+#ifndef __INamedEntity_FWD_DEFINED__
+#define __INamedEntity_FWD_DEFINED__
+typedef interface INamedEntity INamedEntity;
+#endif /* __INamedEntity_FWD_DEFINED__ */
+
+
+#ifndef __ISchemaProvider_FWD_DEFINED__
+#define __ISchemaProvider_FWD_DEFINED__
+typedef interface ISchemaProvider ISchemaProvider;
+#endif /* __ISchemaProvider_FWD_DEFINED__ */
+
+
+#ifndef __ITokenCollection_FWD_DEFINED__
+#define __ITokenCollection_FWD_DEFINED__
+typedef interface ITokenCollection ITokenCollection;
+#endif /* __ITokenCollection_FWD_DEFINED__ */
+
+
+#ifndef __INamedEntityCollector_FWD_DEFINED__
+#define __INamedEntityCollector_FWD_DEFINED__
+typedef interface INamedEntityCollector INamedEntityCollector;
+#endif /* __INamedEntityCollector_FWD_DEFINED__ */
+
+
+#ifndef __ISchemaLocalizerSupport_FWD_DEFINED__
+#define __ISchemaLocalizerSupport_FWD_DEFINED__
+typedef interface ISchemaLocalizerSupport ISchemaLocalizerSupport;
+#endif /* __ISchemaLocalizerSupport_FWD_DEFINED__ */
+
+
+#ifndef __IQueryParserManager_FWD_DEFINED__
+#define __IQueryParserManager_FWD_DEFINED__
+typedef interface IQueryParserManager IQueryParserManager;
+#endif /* __IQueryParserManager_FWD_DEFINED__ */
+
+
+#ifndef __QueryParser_FWD_DEFINED__
+#define __QueryParser_FWD_DEFINED__
+
+#ifdef __cplusplus
+typedef class QueryParser QueryParser;
+#else
+typedef struct QueryParser QueryParser;
+#endif /* __cplusplus */
+
+#endif /* __QueryParser_FWD_DEFINED__ */
+
+
+#ifndef __NegationCondition_FWD_DEFINED__
+#define __NegationCondition_FWD_DEFINED__
+
+#ifdef __cplusplus
+typedef class NegationCondition NegationCondition;
+#else
+typedef struct NegationCondition NegationCondition;
+#endif /* __cplusplus */
+
+#endif /* __NegationCondition_FWD_DEFINED__ */
+
+
+#ifndef __CompoundCondition_FWD_DEFINED__
+#define __CompoundCondition_FWD_DEFINED__
+
+#ifdef __cplusplus
+typedef class CompoundCondition CompoundCondition;
+#else
+typedef struct CompoundCondition CompoundCondition;
+#endif /* __cplusplus */
+
+#endif /* __CompoundCondition_FWD_DEFINED__ */
+
+
+#ifndef __LeafCondition_FWD_DEFINED__
+#define __LeafCondition_FWD_DEFINED__
+
+#ifdef __cplusplus
+typedef class LeafCondition LeafCondition;
+#else
+typedef struct LeafCondition LeafCondition;
+#endif /* __cplusplus */
+
+#endif /* __LeafCondition_FWD_DEFINED__ */
+
+
+#ifndef __ConditionFactory_FWD_DEFINED__
+#define __ConditionFactory_FWD_DEFINED__
+
+#ifdef __cplusplus
+typedef class ConditionFactory ConditionFactory;
+#else
+typedef struct ConditionFactory ConditionFactory;
+#endif /* __cplusplus */
+
+#endif /* __ConditionFactory_FWD_DEFINED__ */
+
+
+#ifndef __Interval_FWD_DEFINED__
+#define __Interval_FWD_DEFINED__
+
+#ifdef __cplusplus
+typedef class Interval Interval;
+#else
+typedef struct Interval Interval;
+#endif /* __cplusplus */
+
+#endif /* __Interval_FWD_DEFINED__ */
+
+
+#ifndef __QueryParserManager_FWD_DEFINED__
+#define __QueryParserManager_FWD_DEFINED__
+
+#ifdef __cplusplus
+typedef class QueryParserManager QueryParserManager;
+#else
+typedef struct QueryParserManager QueryParserManager;
+#endif /* __cplusplus */
+
+#endif /* __QueryParserManager_FWD_DEFINED__ */
+
+
+/* header files for imported files */
+#include "oaidl.h"
+#include "ocidl.h"
+#include "propidl.h"
+
+#ifdef __cplusplus
+extern "C"{
+#endif
+
+
+/* interface __MIDL_itf_structuredquery_0000_0000 */
+/* [local] */
+
+
+
+
+
+
+
+
+
+
+
+typedef /* [v1_enum] */
+enum tagCONDITION_TYPE
+ { CT_AND_CONDITION = 0,
+ CT_OR_CONDITION = ( CT_AND_CONDITION + 1 ) ,
+ CT_NOT_CONDITION = ( CT_OR_CONDITION + 1 ) ,
+ CT_LEAF_CONDITION = ( CT_NOT_CONDITION + 1 )
+ } CONDITION_TYPE;
+
+typedef /* [v1_enum] */
+enum tagCONDITION_OPERATION
+ { COP_IMPLICIT = 0,
+ COP_EQUAL = ( COP_IMPLICIT + 1 ) ,
+ COP_NOTEQUAL = ( COP_EQUAL + 1 ) ,
+ COP_LESSTHAN = ( COP_NOTEQUAL + 1 ) ,
+ COP_GREATERTHAN = ( COP_LESSTHAN + 1 ) ,
+ COP_LESSTHANOREQUAL = ( COP_GREATERTHAN + 1 ) ,
+ COP_GREATERTHANOREQUAL = ( COP_LESSTHANOREQUAL + 1 ) ,
+ COP_VALUE_STARTSWITH = ( COP_GREATERTHANOREQUAL + 1 ) ,
+ COP_VALUE_ENDSWITH = ( COP_VALUE_STARTSWITH + 1 ) ,
+ COP_VALUE_CONTAINS = ( COP_VALUE_ENDSWITH + 1 ) ,
+ COP_VALUE_NOTCONTAINS = ( COP_VALUE_CONTAINS + 1 ) ,
+ COP_DOSWILDCARDS = ( COP_VALUE_NOTCONTAINS + 1 ) ,
+ COP_WORD_EQUAL = ( COP_DOSWILDCARDS + 1 ) ,
+ COP_WORD_STARTSWITH = ( COP_WORD_EQUAL + 1 ) ,
+ COP_APPLICATION_SPECIFIC = ( COP_WORD_STARTSWITH + 1 )
+ } CONDITION_OPERATION;
+
+typedef /* [v1_enum] */
+enum tagSTRUCTURED_QUERY_SINGLE_OPTION
+ { SQSO_SCHEMA = 0,
+ SQSO_LOCALE_WORD_BREAKING = ( SQSO_SCHEMA + 1 ) ,
+ SQSO_WORD_BREAKER = ( SQSO_LOCALE_WORD_BREAKING + 1 ) ,
+ SQSO_NATURAL_SYNTAX = ( SQSO_WORD_BREAKER + 1 ) ,
+ SQSO_AUTOMATIC_WILDCARD = ( SQSO_NATURAL_SYNTAX + 1 ) ,
+ SQSO_TRACE_LEVEL = ( SQSO_AUTOMATIC_WILDCARD + 1 ) ,
+ SQSO_LANGUAGE_KEYWORDS = ( SQSO_TRACE_LEVEL + 1 )
+ } STRUCTURED_QUERY_SINGLE_OPTION;
+
+typedef /* [v1_enum] */
+enum tagSTRUCTURED_QUERY_MULTIOPTION
+ { SQMO_VIRTUAL_PROPERTY = 0,
+ SQMO_DEFAULT_PROPERTY = ( SQMO_VIRTUAL_PROPERTY + 1 ) ,
+ SQMO_GENERATOR_FOR_TYPE = ( SQMO_DEFAULT_PROPERTY + 1 )
+ } STRUCTURED_QUERY_MULTIOPTION;
+
+typedef /* [v1_enum] */
+enum tagSTRUCTURED_QUERY_PARSE_ERROR
+ { SQPE_NONE = 0,
+ SQPE_EXTRA_OPENING_PARENTHESIS = ( SQPE_NONE + 1 ) ,
+ SQPE_EXTRA_CLOSING_PARENTHESIS = ( SQPE_EXTRA_OPENING_PARENTHESIS + 1 ) ,
+ SQPE_IGNORED_MODIFIER = ( SQPE_EXTRA_CLOSING_PARENTHESIS + 1 ) ,
+ SQPE_IGNORED_CONNECTOR = ( SQPE_IGNORED_MODIFIER + 1 ) ,
+ SQPE_IGNORED_KEYWORD = ( SQPE_IGNORED_CONNECTOR + 1 ) ,
+ SQPE_UNHANDLED = ( SQPE_IGNORED_KEYWORD + 1 )
+ } STRUCTURED_QUERY_PARSE_ERROR;
+
+/* [v1_enum] */
+enum tagSTRUCTURED_QUERY_RESOLVE_OPTION
+ { SQRO_DONT_RESOLVE_DATETIME = 0x1,
+ SQRO_ALWAYS_ONE_INTERVAL = 0x2,
+ SQRO_DONT_SIMPLIFY_CONDITION_TREES = 0x4,
+ SQRO_DONT_MAP_RELATIONS = 0x8,
+ SQRO_DONT_RESOLVE_RANGES = 0x10,
+ SQRO_DONT_REMOVE_UNRESTRICTED_KEYWORDS = 0x20,
+ SQRO_DONT_SPLIT_WORDS = 0x40,
+ SQRO_IGNORE_PHRASE_ORDER = 0x80
+ } ;
+typedef int STRUCTURED_QUERY_RESOLVE_OPTION;
+
+typedef /* [v1_enum] */
+enum tagINTERVAL_LIMIT_KIND
+ { ILK_EXPLICIT_INCLUDED = 0,
+ ILK_EXPLICIT_EXCLUDED = ( ILK_EXPLICIT_INCLUDED + 1 ) ,
+ ILK_NEGATIVE_INFINITY = ( ILK_EXPLICIT_EXCLUDED + 1 ) ,
+ ILK_POSITIVE_INFINITY = ( ILK_NEGATIVE_INFINITY + 1 )
+ } INTERVAL_LIMIT_KIND;
+
+typedef /* [v1_enum] */
+enum tagQUERY_PARSER_MANAGER_OPTION
+ { QPMO_SCHEMA_BINARY_NAME = 0,
+ QPMO_PRELOCALIZED_SCHEMA_BINARY_PATH = ( QPMO_SCHEMA_BINARY_NAME + 1 ) ,
+ QPMO_UNLOCALIZED_SCHEMA_BINARY_PATH = ( QPMO_PRELOCALIZED_SCHEMA_BINARY_PATH + 1 ) ,
+ QPMO_LOCALIZED_SCHEMA_BINARY_PATH = ( QPMO_UNLOCALIZED_SCHEMA_BINARY_PATH + 1 ) ,
+ QPMO_APPEND_LCID_TO_LOCALIZED_PATH = ( QPMO_LOCALIZED_SCHEMA_BINARY_PATH + 1 ) ,
+ QPMO_LOCALIZER_SUPPORT = ( QPMO_APPEND_LCID_TO_LOCALIZED_PATH + 1 )
+ } QUERY_PARSER_MANAGER_OPTION;
+
+
+
+extern RPC_IF_HANDLE __MIDL_itf_structuredquery_0000_0000_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_structuredquery_0000_0000_v0_0_s_ifspec;
+
+#ifndef __IQueryParser_INTERFACE_DEFINED__
+#define __IQueryParser_INTERFACE_DEFINED__
+
+/* interface IQueryParser */
+/* [unique][uuid][object] */
+
+
+EXTERN_C const IID IID_IQueryParser;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("2EBDEE67-3505-43f8-9946-EA44ABC8E5B0")
+ IQueryParser : public IUnknown
+ {
+ public:
+ virtual HRESULT STDMETHODCALLTYPE Parse(
+ /* [in] */ __RPC__in LPCWSTR pszInputString,
+ /* [in] */ __RPC__in_opt IEnumUnknown *pCustomProperties,
+ /* [retval][out] */ __RPC__deref_out_opt IQuerySolution **ppSolution) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE SetOption(
+ /* [in] */ STRUCTURED_QUERY_SINGLE_OPTION option,
+ /* [in] */ __RPC__in const PROPVARIANT *pOptionValue) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetOption(
+ /* [in] */ STRUCTURED_QUERY_SINGLE_OPTION option,
+ /* [retval][out] */ __RPC__out PROPVARIANT *pOptionValue) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE SetMultiOption(
+ /* [in] */ STRUCTURED_QUERY_MULTIOPTION option,
+ /* [in] */ __RPC__in LPCWSTR pszOptionKey,
+ /* [in] */ __RPC__in const PROPVARIANT *pOptionValue) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetSchemaProvider(
+ /* [retval][out] */ __RPC__deref_out_opt ISchemaProvider **ppSchemaProvider) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE RestateToString(
+ /* [in] */ __RPC__in_opt ICondition *pCondition,
+ /* [in] */ BOOL fUseEnglish,
+ /* [out] */ __RPC__deref_out_opt LPWSTR *ppszQueryString) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE ParsePropertyValue(
+ /* [in] */ __RPC__in LPCWSTR pszPropertyName,
+ /* [in] */ __RPC__in LPCWSTR pszInputString,
+ /* [retval][out] */ __RPC__deref_out_opt IQuerySolution **ppSolution) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE RestatePropertyValueToString(
+ /* [in] */ __RPC__in_opt ICondition *pCondition,
+ /* [in] */ BOOL fUseEnglish,
+ /* [out] */ __RPC__deref_out_opt LPWSTR *ppszPropertyName,
+ /* [out] */ __RPC__deref_out_opt LPWSTR *ppszQueryString) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct IQueryParserVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IQueryParser * This,
+ /* [in] */ __RPC__in REFIID riid,
+ /* [iid_is][out] */
+ __RPC__deref_out void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IQueryParser * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IQueryParser * This);
+
+ HRESULT ( STDMETHODCALLTYPE *Parse )(
+ IQueryParser * This,
+ /* [in] */ __RPC__in LPCWSTR pszInputString,
+ /* [in] */ __RPC__in_opt IEnumUnknown *pCustomProperties,
+ /* [retval][out] */ __RPC__deref_out_opt IQuerySolution **ppSolution);
+
+ HRESULT ( STDMETHODCALLTYPE *SetOption )(
+ IQueryParser * This,
+ /* [in] */ STRUCTURED_QUERY_SINGLE_OPTION option,
+ /* [in] */ __RPC__in const PROPVARIANT *pOptionValue);
+
+ HRESULT ( STDMETHODCALLTYPE *GetOption )(
+ IQueryParser * This,
+ /* [in] */ STRUCTURED_QUERY_SINGLE_OPTION option,
+ /* [retval][out] */ __RPC__out PROPVARIANT *pOptionValue);
+
+ HRESULT ( STDMETHODCALLTYPE *SetMultiOption )(
+ IQueryParser * This,
+ /* [in] */ STRUCTURED_QUERY_MULTIOPTION option,
+ /* [in] */ __RPC__in LPCWSTR pszOptionKey,
+ /* [in] */ __RPC__in const PROPVARIANT *pOptionValue);
+
+ HRESULT ( STDMETHODCALLTYPE *GetSchemaProvider )(
+ IQueryParser * This,
+ /* [retval][out] */ __RPC__deref_out_opt ISchemaProvider **ppSchemaProvider);
+
+ HRESULT ( STDMETHODCALLTYPE *RestateToString )(
+ IQueryParser * This,
+ /* [in] */ __RPC__in_opt ICondition *pCondition,
+ /* [in] */ BOOL fUseEnglish,
+ /* [out] */ __RPC__deref_out_opt LPWSTR *ppszQueryString);
+
+ HRESULT ( STDMETHODCALLTYPE *ParsePropertyValue )(
+ IQueryParser * This,
+ /* [in] */ __RPC__in LPCWSTR pszPropertyName,
+ /* [in] */ __RPC__in LPCWSTR pszInputString,
+ /* [retval][out] */ __RPC__deref_out_opt IQuerySolution **ppSolution);
+
+ HRESULT ( STDMETHODCALLTYPE *RestatePropertyValueToString )(
+ IQueryParser * This,
+ /* [in] */ __RPC__in_opt ICondition *pCondition,
+ /* [in] */ BOOL fUseEnglish,
+ /* [out] */ __RPC__deref_out_opt LPWSTR *ppszPropertyName,
+ /* [out] */ __RPC__deref_out_opt LPWSTR *ppszQueryString);
+
+ END_INTERFACE
+ } IQueryParserVtbl;
+
+ interface IQueryParser
+ {
+ CONST_VTBL struct IQueryParserVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IQueryParser_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IQueryParser_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IQueryParser_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IQueryParser_Parse(This,pszInputString,pCustomProperties,ppSolution) \
+ ( (This)->lpVtbl -> Parse(This,pszInputString,pCustomProperties,ppSolution) )
+
+#define IQueryParser_SetOption(This,option,pOptionValue) \
+ ( (This)->lpVtbl -> SetOption(This,option,pOptionValue) )
+
+#define IQueryParser_GetOption(This,option,pOptionValue) \
+ ( (This)->lpVtbl -> GetOption(This,option,pOptionValue) )
+
+#define IQueryParser_SetMultiOption(This,option,pszOptionKey,pOptionValue) \
+ ( (This)->lpVtbl -> SetMultiOption(This,option,pszOptionKey,pOptionValue) )
+
+#define IQueryParser_GetSchemaProvider(This,ppSchemaProvider) \
+ ( (This)->lpVtbl -> GetSchemaProvider(This,ppSchemaProvider) )
+
+#define IQueryParser_RestateToString(This,pCondition,fUseEnglish,ppszQueryString) \
+ ( (This)->lpVtbl -> RestateToString(This,pCondition,fUseEnglish,ppszQueryString) )
+
+#define IQueryParser_ParsePropertyValue(This,pszPropertyName,pszInputString,ppSolution) \
+ ( (This)->lpVtbl -> ParsePropertyValue(This,pszPropertyName,pszInputString,ppSolution) )
+
+#define IQueryParser_RestatePropertyValueToString(This,pCondition,fUseEnglish,ppszPropertyName,ppszQueryString) \
+ ( (This)->lpVtbl -> RestatePropertyValueToString(This,pCondition,fUseEnglish,ppszPropertyName,ppszQueryString) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IQueryParser_INTERFACE_DEFINED__ */
+
+
+#ifndef __IConditionFactory_INTERFACE_DEFINED__
+#define __IConditionFactory_INTERFACE_DEFINED__
+
+/* interface IConditionFactory */
+/* [unique][uuid][object] */
+
+
+EXTERN_C const IID IID_IConditionFactory;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("A5EFE073-B16F-474f-9F3E-9F8B497A3E08")
+ IConditionFactory : public IUnknown
+ {
+ public:
+ virtual HRESULT STDMETHODCALLTYPE MakeNot(
+ /* [in] */ __RPC__in_opt ICondition *pSubCondition,
+ /* [in] */ BOOL simplify,
+ /* [retval][out] */ __RPC__deref_out_opt ICondition **ppResultQuery) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE MakeAndOr(
+ /* [in] */ CONDITION_TYPE nodeType,
+ /* [in] */ __RPC__in_opt IEnumUnknown *pSubConditions,
+ /* [in] */ BOOL simplify,
+ /* [retval][out] */ __RPC__deref_out_opt ICondition **ppResultQuery) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE MakeLeaf(
+ /* [unique][in] */ __RPC__in_opt LPCWSTR pszPropertyName,
+ /* [in] */ CONDITION_OPERATION op,
+ /* [unique][in] */ __RPC__in_opt LPCWSTR pszValueType,
+ /* [in] */ __RPC__in const PROPVARIANT *pValue,
+ /* [in] */ __RPC__in_opt IRichChunk *pPropertyNameTerm,
+ /* [in] */ __RPC__in_opt IRichChunk *pOperationTerm,
+ /* [in] */ __RPC__in_opt IRichChunk *pValueTerm,
+ /* [in] */ BOOL expand,
+ /* [retval][out] */ __RPC__deref_out_opt ICondition **ppResultQuery) = 0;
+
+ virtual /* [local] */ HRESULT STDMETHODCALLTYPE Resolve(
+ /* [in] */
+ __in ICondition *pConditionTree,
+ /* [in] */
+ __in STRUCTURED_QUERY_RESOLVE_OPTION sqro,
+ /* [ref][in] */
+ __in_opt const SYSTEMTIME *pstReferenceTime,
+ /* [retval][out] */
+ __out ICondition **ppResolvedConditionTree) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct IConditionFactoryVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IConditionFactory * This,
+ /* [in] */ __RPC__in REFIID riid,
+ /* [iid_is][out] */
+ __RPC__deref_out void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IConditionFactory * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IConditionFactory * This);
+
+ HRESULT ( STDMETHODCALLTYPE *MakeNot )(
+ IConditionFactory * This,
+ /* [in] */ __RPC__in_opt ICondition *pSubCondition,
+ /* [in] */ BOOL simplify,
+ /* [retval][out] */ __RPC__deref_out_opt ICondition **ppResultQuery);
+
+ HRESULT ( STDMETHODCALLTYPE *MakeAndOr )(
+ IConditionFactory * This,
+ /* [in] */ CONDITION_TYPE nodeType,
+ /* [in] */ __RPC__in_opt IEnumUnknown *pSubConditions,
+ /* [in] */ BOOL simplify,
+ /* [retval][out] */ __RPC__deref_out_opt ICondition **ppResultQuery);
+
+ HRESULT ( STDMETHODCALLTYPE *MakeLeaf )(
+ IConditionFactory * This,
+ /* [unique][in] */ __RPC__in_opt LPCWSTR pszPropertyName,
+ /* [in] */ CONDITION_OPERATION op,
+ /* [unique][in] */ __RPC__in_opt LPCWSTR pszValueType,
+ /* [in] */ __RPC__in const PROPVARIANT *pValue,
+ /* [in] */ __RPC__in_opt IRichChunk *pPropertyNameTerm,
+ /* [in] */ __RPC__in_opt IRichChunk *pOperationTerm,
+ /* [in] */ __RPC__in_opt IRichChunk *pValueTerm,
+ /* [in] */ BOOL expand,
+ /* [retval][out] */ __RPC__deref_out_opt ICondition **ppResultQuery);
+
+ /* [local] */ HRESULT ( STDMETHODCALLTYPE *Resolve )(
+ IConditionFactory * This,
+ /* [in] */
+ __in ICondition *pConditionTree,
+ /* [in] */
+ __in STRUCTURED_QUERY_RESOLVE_OPTION sqro,
+ /* [ref][in] */
+ __in_opt const SYSTEMTIME *pstReferenceTime,
+ /* [retval][out] */
+ __out ICondition **ppResolvedConditionTree);
+
+ END_INTERFACE
+ } IConditionFactoryVtbl;
+
+ interface IConditionFactory
+ {
+ CONST_VTBL struct IConditionFactoryVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IConditionFactory_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IConditionFactory_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IConditionFactory_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IConditionFactory_MakeNot(This,pSubCondition,simplify,ppResultQuery) \
+ ( (This)->lpVtbl -> MakeNot(This,pSubCondition,simplify,ppResultQuery) )
+
+#define IConditionFactory_MakeAndOr(This,nodeType,pSubConditions,simplify,ppResultQuery) \
+ ( (This)->lpVtbl -> MakeAndOr(This,nodeType,pSubConditions,simplify,ppResultQuery) )
+
+#define IConditionFactory_MakeLeaf(This,pszPropertyName,op,pszValueType,pValue,pPropertyNameTerm,pOperationTerm,pValueTerm,expand,ppResultQuery) \
+ ( (This)->lpVtbl -> MakeLeaf(This,pszPropertyName,op,pszValueType,pValue,pPropertyNameTerm,pOperationTerm,pValueTerm,expand,ppResultQuery) )
+
+#define IConditionFactory_Resolve(This,pConditionTree,sqro,pstReferenceTime,ppResolvedConditionTree) \
+ ( (This)->lpVtbl -> Resolve(This,pConditionTree,sqro,pstReferenceTime,ppResolvedConditionTree) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IConditionFactory_INTERFACE_DEFINED__ */
+
+
+#ifndef __IQuerySolution_INTERFACE_DEFINED__
+#define __IQuerySolution_INTERFACE_DEFINED__
+
+/* interface IQuerySolution */
+/* [unique][uuid][object] */
+
+
+EXTERN_C const IID IID_IQuerySolution;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("D6EBC66B-8921-4193-AFDD-A1789FB7FF57")
+ IQuerySolution : public IConditionFactory
+ {
+ public:
+ virtual /* [local] */ HRESULT STDMETHODCALLTYPE GetQuery(
+ /* [out] */
+ __out_opt ICondition **ppQueryNode,
+ /* [out] */
+ __out_opt IEntity **ppMainType) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetErrors(
+ /* [in] */ __RPC__in REFIID riid,
+ /* [iid_is][retval][out] */ __RPC__deref_out_opt void **ppParseErrors) = 0;
+
+ virtual /* [local] */ HRESULT STDMETHODCALLTYPE GetLexicalData(
+ /* [out] */
+ __deref_opt_out LPWSTR *ppszInputString,
+ /* [out] */
+ __out_opt ITokenCollection **ppTokens,
+ /* [out] */
+ __out_opt LCID *pLocale,
+ /* [out] */
+ __out_opt IUnknown **ppWordBreaker) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct IQuerySolutionVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IQuerySolution * This,
+ /* [in] */ __RPC__in REFIID riid,
+ /* [iid_is][out] */
+ __RPC__deref_out void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IQuerySolution * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IQuerySolution * This);
+
+ HRESULT ( STDMETHODCALLTYPE *MakeNot )(
+ IQuerySolution * This,
+ /* [in] */ __RPC__in_opt ICondition *pSubCondition,
+ /* [in] */ BOOL simplify,
+ /* [retval][out] */ __RPC__deref_out_opt ICondition **ppResultQuery);
+
+ HRESULT ( STDMETHODCALLTYPE *MakeAndOr )(
+ IQuerySolution * This,
+ /* [in] */ CONDITION_TYPE nodeType,
+ /* [in] */ __RPC__in_opt IEnumUnknown *pSubConditions,
+ /* [in] */ BOOL simplify,
+ /* [retval][out] */ __RPC__deref_out_opt ICondition **ppResultQuery);
+
+ HRESULT ( STDMETHODCALLTYPE *MakeLeaf )(
+ IQuerySolution * This,
+ /* [unique][in] */ __RPC__in_opt LPCWSTR pszPropertyName,
+ /* [in] */ CONDITION_OPERATION op,
+ /* [unique][in] */ __RPC__in_opt LPCWSTR pszValueType,
+ /* [in] */ __RPC__in const PROPVARIANT *pValue,
+ /* [in] */ __RPC__in_opt IRichChunk *pPropertyNameTerm,
+ /* [in] */ __RPC__in_opt IRichChunk *pOperationTerm,
+ /* [in] */ __RPC__in_opt IRichChunk *pValueTerm,
+ /* [in] */ BOOL expand,
+ /* [retval][out] */ __RPC__deref_out_opt ICondition **ppResultQuery);
+
+ /* [local] */ HRESULT ( STDMETHODCALLTYPE *Resolve )(
+ IQuerySolution * This,
+ /* [in] */
+ __in ICondition *pConditionTree,
+ /* [in] */
+ __in STRUCTURED_QUERY_RESOLVE_OPTION sqro,
+ /* [ref][in] */
+ __in_opt const SYSTEMTIME *pstReferenceTime,
+ /* [retval][out] */
+ __out ICondition **ppResolvedConditionTree);
+
+ /* [local] */ HRESULT ( STDMETHODCALLTYPE *GetQuery )(
+ IQuerySolution * This,
+ /* [out] */
+ __out_opt ICondition **ppQueryNode,
+ /* [out] */
+ __out_opt IEntity **ppMainType);
+
+ HRESULT ( STDMETHODCALLTYPE *GetErrors )(
+ IQuerySolution * This,
+ /* [in] */ __RPC__in REFIID riid,
+ /* [iid_is][retval][out] */ __RPC__deref_out_opt void **ppParseErrors);
+
+ /* [local] */ HRESULT ( STDMETHODCALLTYPE *GetLexicalData )(
+ IQuerySolution * This,
+ /* [out] */
+ __deref_opt_out LPWSTR *ppszInputString,
+ /* [out] */
+ __out_opt ITokenCollection **ppTokens,
+ /* [out] */
+ __out_opt LCID *pLocale,
+ /* [out] */
+ __out_opt IUnknown **ppWordBreaker);
+
+ END_INTERFACE
+ } IQuerySolutionVtbl;
+
+ interface IQuerySolution
+ {
+ CONST_VTBL struct IQuerySolutionVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IQuerySolution_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IQuerySolution_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IQuerySolution_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IQuerySolution_MakeNot(This,pSubCondition,simplify,ppResultQuery) \
+ ( (This)->lpVtbl -> MakeNot(This,pSubCondition,simplify,ppResultQuery) )
+
+#define IQuerySolution_MakeAndOr(This,nodeType,pSubConditions,simplify,ppResultQuery) \
+ ( (This)->lpVtbl -> MakeAndOr(This,nodeType,pSubConditions,simplify,ppResultQuery) )
+
+#define IQuerySolution_MakeLeaf(This,pszPropertyName,op,pszValueType,pValue,pPropertyNameTerm,pOperationTerm,pValueTerm,expand,ppResultQuery) \
+ ( (This)->lpVtbl -> MakeLeaf(This,pszPropertyName,op,pszValueType,pValue,pPropertyNameTerm,pOperationTerm,pValueTerm,expand,ppResultQuery) )
+
+#define IQuerySolution_Resolve(This,pConditionTree,sqro,pstReferenceTime,ppResolvedConditionTree) \
+ ( (This)->lpVtbl -> Resolve(This,pConditionTree,sqro,pstReferenceTime,ppResolvedConditionTree) )
+
+
+#define IQuerySolution_GetQuery(This,ppQueryNode,ppMainType) \
+ ( (This)->lpVtbl -> GetQuery(This,ppQueryNode,ppMainType) )
+
+#define IQuerySolution_GetErrors(This,riid,ppParseErrors) \
+ ( (This)->lpVtbl -> GetErrors(This,riid,ppParseErrors) )
+
+#define IQuerySolution_GetLexicalData(This,ppszInputString,ppTokens,pLocale,ppWordBreaker) \
+ ( (This)->lpVtbl -> GetLexicalData(This,ppszInputString,ppTokens,pLocale,ppWordBreaker) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IQuerySolution_INTERFACE_DEFINED__ */
+
+
+#ifndef __ICondition_INTERFACE_DEFINED__
+#define __ICondition_INTERFACE_DEFINED__
+
+/* interface ICondition */
+/* [unique][uuid][object] */
+
+
+EXTERN_C const IID IID_ICondition;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("0FC988D4-C935-4b97-A973-46282EA175C8")
+ ICondition : public IPersistStream
+ {
+ public:
+ virtual HRESULT STDMETHODCALLTYPE GetConditionType(
+ /* [retval][out] */ __RPC__out CONDITION_TYPE *pNodeType) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetSubConditions(
+ /* [in] */ __RPC__in REFIID riid,
+ /* [iid_is][retval][out] */ __RPC__deref_out_opt void **ppv) = 0;
+
+ virtual /* [local] */ HRESULT STDMETHODCALLTYPE GetComparisonInfo(
+ /* [out] */
+ __deref_opt_out LPWSTR *ppszPropertyName,
+ /* [out] */
+ __out_opt CONDITION_OPERATION *pOperation,
+ /* [out] */
+ __out_opt PROPVARIANT *pValue) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetValueType(
+ /* [retval][out] */ __RPC__deref_out_opt LPWSTR *ppszValueTypeName) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetValueNormalization(
+ /* [retval][out] */ __RPC__deref_out_opt LPWSTR *ppszNormalization) = 0;
+
+ virtual /* [local] */ HRESULT STDMETHODCALLTYPE GetInputTerms(
+ /* [out] */
+ __out_opt IRichChunk **ppPropertyTerm,
+ /* [out] */
+ __out_opt IRichChunk **ppOperationTerm,
+ /* [out] */
+ __out_opt IRichChunk **ppValueTerm) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE Clone(
+ /* [retval][out] */ __RPC__deref_out_opt ICondition **ppc) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct IConditionVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ ICondition * This,
+ /* [in] */ __RPC__in REFIID riid,
+ /* [iid_is][out] */
+ __RPC__deref_out void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ ICondition * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ ICondition * This);
+
+ HRESULT ( STDMETHODCALLTYPE *GetClassID )(
+ ICondition * This,
+ /* [out] */ __RPC__out CLSID *pClassID);
+
+ HRESULT ( STDMETHODCALLTYPE *IsDirty )(
+ ICondition * This);
+
+ HRESULT ( STDMETHODCALLTYPE *Load )(
+ ICondition * This,
+ /* [unique][in] */ __RPC__in_opt IStream *pStm);
+
+ HRESULT ( STDMETHODCALLTYPE *Save )(
+ ICondition * This,
+ /* [unique][in] */ __RPC__in_opt IStream *pStm,
+ /* [in] */ BOOL fClearDirty);
+
+ HRESULT ( STDMETHODCALLTYPE *GetSizeMax )(
+ ICondition * This,
+ /* [out] */ __RPC__out ULARGE_INTEGER *pcbSize);
+
+ HRESULT ( STDMETHODCALLTYPE *GetConditionType )(
+ ICondition * This,
+ /* [retval][out] */ __RPC__out CONDITION_TYPE *pNodeType);
+
+ HRESULT ( STDMETHODCALLTYPE *GetSubConditions )(
+ ICondition * This,
+ /* [in] */ __RPC__in REFIID riid,
+ /* [iid_is][retval][out] */ __RPC__deref_out_opt void **ppv);
+
+ /* [local] */ HRESULT ( STDMETHODCALLTYPE *GetComparisonInfo )(
+ ICondition * This,
+ /* [out] */
+ __deref_opt_out LPWSTR *ppszPropertyName,
+ /* [out] */
+ __out_opt CONDITION_OPERATION *pOperation,
+ /* [out] */
+ __out_opt PROPVARIANT *pValue);
+
+ HRESULT ( STDMETHODCALLTYPE *GetValueType )(
+ ICondition * This,
+ /* [retval][out] */ __RPC__deref_out_opt LPWSTR *ppszValueTypeName);
+
+ HRESULT ( STDMETHODCALLTYPE *GetValueNormalization )(
+ ICondition * This,
+ /* [retval][out] */ __RPC__deref_out_opt LPWSTR *ppszNormalization);
+
+ /* [local] */ HRESULT ( STDMETHODCALLTYPE *GetInputTerms )(
+ ICondition * This,
+ /* [out] */
+ __out_opt IRichChunk **ppPropertyTerm,
+ /* [out] */
+ __out_opt IRichChunk **ppOperationTerm,
+ /* [out] */
+ __out_opt IRichChunk **ppValueTerm);
+
+ HRESULT ( STDMETHODCALLTYPE *Clone )(
+ ICondition * This,
+ /* [retval][out] */ __RPC__deref_out_opt ICondition **ppc);
+
+ END_INTERFACE
+ } IConditionVtbl;
+
+ interface ICondition
+ {
+ CONST_VTBL struct IConditionVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define ICondition_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define ICondition_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define ICondition_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define ICondition_GetClassID(This,pClassID) \
+ ( (This)->lpVtbl -> GetClassID(This,pClassID) )
+
+
+#define ICondition_IsDirty(This) \
+ ( (This)->lpVtbl -> IsDirty(This) )
+
+#define ICondition_Load(This,pStm) \
+ ( (This)->lpVtbl -> Load(This,pStm) )
+
+#define ICondition_Save(This,pStm,fClearDirty) \
+ ( (This)->lpVtbl -> Save(This,pStm,fClearDirty) )
+
+#define ICondition_GetSizeMax(This,pcbSize) \
+ ( (This)->lpVtbl -> GetSizeMax(This,pcbSize) )
+
+
+#define ICondition_GetConditionType(This,pNodeType) \
+ ( (This)->lpVtbl -> GetConditionType(This,pNodeType) )
+
+#define ICondition_GetSubConditions(This,riid,ppv) \
+ ( (This)->lpVtbl -> GetSubConditions(This,riid,ppv) )
+
+#define ICondition_GetComparisonInfo(This,ppszPropertyName,pOperation,pValue) \
+ ( (This)->lpVtbl -> GetComparisonInfo(This,ppszPropertyName,pOperation,pValue) )
+
+#define ICondition_GetValueType(This,ppszValueTypeName) \
+ ( (This)->lpVtbl -> GetValueType(This,ppszValueTypeName) )
+
+#define ICondition_GetValueNormalization(This,ppszNormalization) \
+ ( (This)->lpVtbl -> GetValueNormalization(This,ppszNormalization) )
+
+#define ICondition_GetInputTerms(This,ppPropertyTerm,ppOperationTerm,ppValueTerm) \
+ ( (This)->lpVtbl -> GetInputTerms(This,ppPropertyTerm,ppOperationTerm,ppValueTerm) )
+
+#define ICondition_Clone(This,ppc) \
+ ( (This)->lpVtbl -> Clone(This,ppc) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __ICondition_INTERFACE_DEFINED__ */
+
+
+#ifndef __IConditionGenerator_INTERFACE_DEFINED__
+#define __IConditionGenerator_INTERFACE_DEFINED__
+
+/* interface IConditionGenerator */
+/* [unique][uuid][object] */
+
+
+EXTERN_C const IID IID_IConditionGenerator;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("92D2CC58-4386-45a3-B98C-7E0CE64A4117")
+ IConditionGenerator : public IUnknown
+ {
+ public:
+ virtual HRESULT STDMETHODCALLTYPE Initialize(
+ /* [in] */ __RPC__in_opt ISchemaProvider *pSchemaProvider) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE RecognizeNamedEntities(
+ /* [in] */ __RPC__in LPCWSTR pszInputString,
+ /* [in] */ LCID lcid,
+ /* [in] */ __RPC__in_opt ITokenCollection *pTokenCollection,
+ /* [out][in] */ __RPC__inout_opt INamedEntityCollector *pNamedEntities) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GenerateForLeaf(
+ /* [in] */ __RPC__in_opt IConditionFactory *pConditionFactory,
+ /* [unique][in] */ __RPC__in_opt LPCWSTR pszPropertyName,
+ /* [in] */ CONDITION_OPERATION op,
+ /* [unique][in] */ __RPC__in_opt LPCWSTR pszValueType,
+ /* [in] */ __RPC__in LPCWSTR pszValue,
+ /* [unique][in] */ __RPC__in_opt LPCWSTR pszValue2,
+ /* [in] */ __RPC__in_opt IRichChunk *pPropertyNameTerm,
+ /* [in] */ __RPC__in_opt IRichChunk *pOperationTerm,
+ /* [in] */ __RPC__in_opt IRichChunk *pValueTerm,
+ /* [in] */ BOOL automaticWildcard,
+ /* [out] */ __RPC__out BOOL *pNoStringQuery,
+ /* [retval][out] */ __RPC__deref_out_opt ICondition **ppQueryExpression) = 0;
+
+ virtual /* [local] */ HRESULT STDMETHODCALLTYPE DefaultPhrase(
+ /* [unique][in] */ LPCWSTR pszValueType,
+ /* [in] */ const PROPVARIANT *ppropvar,
+ /* [in] */ BOOL fUseEnglish,
+ /* [retval][out] */
+ __deref_opt_out LPWSTR *ppszPhrase) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct IConditionGeneratorVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IConditionGenerator * This,
+ /* [in] */ __RPC__in REFIID riid,
+ /* [iid_is][out] */
+ __RPC__deref_out void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IConditionGenerator * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IConditionGenerator * This);
+
+ HRESULT ( STDMETHODCALLTYPE *Initialize )(
+ IConditionGenerator * This,
+ /* [in] */ __RPC__in_opt ISchemaProvider *pSchemaProvider);
+
+ HRESULT ( STDMETHODCALLTYPE *RecognizeNamedEntities )(
+ IConditionGenerator * This,
+ /* [in] */ __RPC__in LPCWSTR pszInputString,
+ /* [in] */ LCID lcid,
+ /* [in] */ __RPC__in_opt ITokenCollection *pTokenCollection,
+ /* [out][in] */ __RPC__inout_opt INamedEntityCollector *pNamedEntities);
+
+ HRESULT ( STDMETHODCALLTYPE *GenerateForLeaf )(
+ IConditionGenerator * This,
+ /* [in] */ __RPC__in_opt IConditionFactory *pConditionFactory,
+ /* [unique][in] */ __RPC__in_opt LPCWSTR pszPropertyName,
+ /* [in] */ CONDITION_OPERATION op,
+ /* [unique][in] */ __RPC__in_opt LPCWSTR pszValueType,
+ /* [in] */ __RPC__in LPCWSTR pszValue,
+ /* [unique][in] */ __RPC__in_opt LPCWSTR pszValue2,
+ /* [in] */ __RPC__in_opt IRichChunk *pPropertyNameTerm,
+ /* [in] */ __RPC__in_opt IRichChunk *pOperationTerm,
+ /* [in] */ __RPC__in_opt IRichChunk *pValueTerm,
+ /* [in] */ BOOL automaticWildcard,
+ /* [out] */ __RPC__out BOOL *pNoStringQuery,
+ /* [retval][out] */ __RPC__deref_out_opt ICondition **ppQueryExpression);
+
+ /* [local] */ HRESULT ( STDMETHODCALLTYPE *DefaultPhrase )(
+ IConditionGenerator * This,
+ /* [unique][in] */ LPCWSTR pszValueType,
+ /* [in] */ const PROPVARIANT *ppropvar,
+ /* [in] */ BOOL fUseEnglish,
+ /* [retval][out] */
+ __deref_opt_out LPWSTR *ppszPhrase);
+
+ END_INTERFACE
+ } IConditionGeneratorVtbl;
+
+ interface IConditionGenerator
+ {
+ CONST_VTBL struct IConditionGeneratorVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IConditionGenerator_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IConditionGenerator_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IConditionGenerator_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IConditionGenerator_Initialize(This,pSchemaProvider) \
+ ( (This)->lpVtbl -> Initialize(This,pSchemaProvider) )
+
+#define IConditionGenerator_RecognizeNamedEntities(This,pszInputString,lcid,pTokenCollection,pNamedEntities) \
+ ( (This)->lpVtbl -> RecognizeNamedEntities(This,pszInputString,lcid,pTokenCollection,pNamedEntities) )
+
+#define IConditionGenerator_GenerateForLeaf(This,pConditionFactory,pszPropertyName,op,pszValueType,pszValue,pszValue2,pPropertyNameTerm,pOperationTerm,pValueTerm,automaticWildcard,pNoStringQuery,ppQueryExpression) \
+ ( (This)->lpVtbl -> GenerateForLeaf(This,pConditionFactory,pszPropertyName,op,pszValueType,pszValue,pszValue2,pPropertyNameTerm,pOperationTerm,pValueTerm,automaticWildcard,pNoStringQuery,ppQueryExpression) )
+
+#define IConditionGenerator_DefaultPhrase(This,pszValueType,ppropvar,fUseEnglish,ppszPhrase) \
+ ( (This)->lpVtbl -> DefaultPhrase(This,pszValueType,ppropvar,fUseEnglish,ppszPhrase) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IConditionGenerator_INTERFACE_DEFINED__ */
+
+
+#ifndef __IRichChunk_INTERFACE_DEFINED__
+#define __IRichChunk_INTERFACE_DEFINED__
+
+/* interface IRichChunk */
+/* [unique][uuid][object] */
+
+
+EXTERN_C const IID IID_IRichChunk;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("4FDEF69C-DBC9-454e-9910-B34F3C64B510")
+ IRichChunk : public IUnknown
+ {
+ public:
+ virtual /* [local] */ HRESULT STDMETHODCALLTYPE GetData(
+ /* [out] */
+ __out_opt ULONG *pFirstPos,
+ /* [out] */
+ __out_opt ULONG *pLength,
+ /* [out] */
+ __deref_opt_out LPWSTR *ppsz,
+ /* [out] */
+ __out_opt PROPVARIANT *pValue) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct IRichChunkVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IRichChunk * This,
+ /* [in] */ __RPC__in REFIID riid,
+ /* [iid_is][out] */
+ __RPC__deref_out void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IRichChunk * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IRichChunk * This);
+
+ /* [local] */ HRESULT ( STDMETHODCALLTYPE *GetData )(
+ IRichChunk * This,
+ /* [out] */
+ __out_opt ULONG *pFirstPos,
+ /* [out] */
+ __out_opt ULONG *pLength,
+ /* [out] */
+ __deref_opt_out LPWSTR *ppsz,
+ /* [out] */
+ __out_opt PROPVARIANT *pValue);
+
+ END_INTERFACE
+ } IRichChunkVtbl;
+
+ interface IRichChunk
+ {
+ CONST_VTBL struct IRichChunkVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IRichChunk_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IRichChunk_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IRichChunk_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IRichChunk_GetData(This,pFirstPos,pLength,ppsz,pValue) \
+ ( (This)->lpVtbl -> GetData(This,pFirstPos,pLength,ppsz,pValue) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IRichChunk_INTERFACE_DEFINED__ */
+
+
+#ifndef __IInterval_INTERFACE_DEFINED__
+#define __IInterval_INTERFACE_DEFINED__
+
+/* interface IInterval */
+/* [unique][uuid][object] */
+
+
+EXTERN_C const IID IID_IInterval;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("6BF0A714-3C18-430b-8B5D-83B1C234D3DB")
+ IInterval : public IUnknown
+ {
+ public:
+ virtual HRESULT STDMETHODCALLTYPE GetLimits(
+ /* [out] */ __RPC__out INTERVAL_LIMIT_KIND *pilkLower,
+ /* [out] */ __RPC__out PROPVARIANT *ppropvarLower,
+ /* [out] */ __RPC__out INTERVAL_LIMIT_KIND *pilkUpper,
+ /* [out] */ __RPC__out PROPVARIANT *ppropvarUpper) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct IIntervalVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IInterval * This,
+ /* [in] */ __RPC__in REFIID riid,
+ /* [iid_is][out] */
+ __RPC__deref_out void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IInterval * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IInterval * This);
+
+ HRESULT ( STDMETHODCALLTYPE *GetLimits )(
+ IInterval * This,
+ /* [out] */ __RPC__out INTERVAL_LIMIT_KIND *pilkLower,
+ /* [out] */ __RPC__out PROPVARIANT *ppropvarLower,
+ /* [out] */ __RPC__out INTERVAL_LIMIT_KIND *pilkUpper,
+ /* [out] */ __RPC__out PROPVARIANT *ppropvarUpper);
+
+ END_INTERFACE
+ } IIntervalVtbl;
+
+ interface IInterval
+ {
+ CONST_VTBL struct IIntervalVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IInterval_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IInterval_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IInterval_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IInterval_GetLimits(This,pilkLower,ppropvarLower,pilkUpper,ppropvarUpper) \
+ ( (This)->lpVtbl -> GetLimits(This,pilkLower,ppropvarLower,pilkUpper,ppropvarUpper) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IInterval_INTERFACE_DEFINED__ */
+
+
+#ifndef __IMetaData_INTERFACE_DEFINED__
+#define __IMetaData_INTERFACE_DEFINED__
+
+/* interface IMetaData */
+/* [unique][uuid][object][helpstring] */
+
+
+EXTERN_C const IID IID_IMetaData;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("780102B0-C43B-4876-BC7B-5E9BA5C88794")
+ IMetaData : public IUnknown
+ {
+ public:
+ virtual /* [local] */ HRESULT STDMETHODCALLTYPE GetData(
+ /* [out] */
+ __deref_opt_out LPWSTR *ppszKey,
+ /* [out] */
+ __deref_opt_out LPWSTR *ppszValue) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct IMetaDataVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IMetaData * This,
+ /* [in] */ __RPC__in REFIID riid,
+ /* [iid_is][out] */
+ __RPC__deref_out void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IMetaData * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IMetaData * This);
+
+ /* [local] */ HRESULT ( STDMETHODCALLTYPE *GetData )(
+ IMetaData * This,
+ /* [out] */
+ __deref_opt_out LPWSTR *ppszKey,
+ /* [out] */
+ __deref_opt_out LPWSTR *ppszValue);
+
+ END_INTERFACE
+ } IMetaDataVtbl;
+
+ interface IMetaData
+ {
+ CONST_VTBL struct IMetaDataVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IMetaData_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IMetaData_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IMetaData_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IMetaData_GetData(This,ppszKey,ppszValue) \
+ ( (This)->lpVtbl -> GetData(This,ppszKey,ppszValue) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IMetaData_INTERFACE_DEFINED__ */
+
+
+/* interface __MIDL_itf_structuredquery_0000_0008 */
+/* [local] */
+
+
+
+
+extern RPC_IF_HANDLE __MIDL_itf_structuredquery_0000_0008_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_structuredquery_0000_0008_v0_0_s_ifspec;
+
+#ifndef __IEntity_INTERFACE_DEFINED__
+#define __IEntity_INTERFACE_DEFINED__
+
+/* interface IEntity */
+/* [unique][object][uuid][helpstring] */
+
+
+EXTERN_C const IID IID_IEntity;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("24264891-E80B-4fd3-B7CE-4FF2FAE8931F")
+ IEntity : public IUnknown
+ {
+ public:
+ virtual /* [local] */ HRESULT STDMETHODCALLTYPE Name(
+ /* [retval][out] */
+ __deref_opt_out LPWSTR *ppszName) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE Base(
+ /* [retval][out] */ __RPC__deref_out_opt IEntity **pBaseEntity) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE Relationships(
+ /* [in] */ __RPC__in REFIID riid,
+ /* [iid_is][retval][out] */ __RPC__deref_out_opt void **pRelationships) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetRelationship(
+ /* [in] */ __RPC__in LPCWSTR pszRelationName,
+ /* [retval][out] */ __RPC__deref_out_opt IRelationship **pRelationship) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE MetaData(
+ /* [in] */ __RPC__in REFIID riid,
+ /* [iid_is][retval][out] */ __RPC__deref_out_opt void **pMetaData) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE NamedEntities(
+ /* [in] */ __RPC__in REFIID riid,
+ /* [iid_is][retval][out] */ __RPC__deref_out_opt void **pNamedEntities) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetNamedEntity(
+ /* [in] */ __RPC__in LPCWSTR pszValue,
+ /* [retval][out] */ __RPC__deref_out_opt INamedEntity **ppNamedEntity) = 0;
+
+ virtual /* [local] */ HRESULT STDMETHODCALLTYPE DefaultPhrase(
+ /* [retval][out] */
+ __deref_opt_out LPWSTR *ppszPhrase) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct IEntityVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IEntity * This,
+ /* [in] */ __RPC__in REFIID riid,
+ /* [iid_is][out] */
+ __RPC__deref_out void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IEntity * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IEntity * This);
+
+ /* [local] */ HRESULT ( STDMETHODCALLTYPE *Name )(
+ IEntity * This,
+ /* [retval][out] */
+ __deref_opt_out LPWSTR *ppszName);
+
+ HRESULT ( STDMETHODCALLTYPE *Base )(
+ IEntity * This,
+ /* [retval][out] */ __RPC__deref_out_opt IEntity **pBaseEntity);
+
+ HRESULT ( STDMETHODCALLTYPE *Relationships )(
+ IEntity * This,
+ /* [in] */ __RPC__in REFIID riid,
+ /* [iid_is][retval][out] */ __RPC__deref_out_opt void **pRelationships);
+
+ HRESULT ( STDMETHODCALLTYPE *GetRelationship )(
+ IEntity * This,
+ /* [in] */ __RPC__in LPCWSTR pszRelationName,
+ /* [retval][out] */ __RPC__deref_out_opt IRelationship **pRelationship);
+
+ HRESULT ( STDMETHODCALLTYPE *MetaData )(
+ IEntity * This,
+ /* [in] */ __RPC__in REFIID riid,
+ /* [iid_is][retval][out] */ __RPC__deref_out_opt void **pMetaData);
+
+ HRESULT ( STDMETHODCALLTYPE *NamedEntities )(
+ IEntity * This,
+ /* [in] */ __RPC__in REFIID riid,
+ /* [iid_is][retval][out] */ __RPC__deref_out_opt void **pNamedEntities);
+
+ HRESULT ( STDMETHODCALLTYPE *GetNamedEntity )(
+ IEntity * This,
+ /* [in] */ __RPC__in LPCWSTR pszValue,
+ /* [retval][out] */ __RPC__deref_out_opt INamedEntity **ppNamedEntity);
+
+ /* [local] */ HRESULT ( STDMETHODCALLTYPE *DefaultPhrase )(
+ IEntity * This,
+ /* [retval][out] */
+ __deref_opt_out LPWSTR *ppszPhrase);
+
+ END_INTERFACE
+ } IEntityVtbl;
+
+ interface IEntity
+ {
+ CONST_VTBL struct IEntityVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IEntity_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IEntity_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IEntity_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IEntity_Name(This,ppszName) \
+ ( (This)->lpVtbl -> Name(This,ppszName) )
+
+#define IEntity_Base(This,pBaseEntity) \
+ ( (This)->lpVtbl -> Base(This,pBaseEntity) )
+
+#define IEntity_Relationships(This,riid,pRelationships) \
+ ( (This)->lpVtbl -> Relationships(This,riid,pRelationships) )
+
+#define IEntity_GetRelationship(This,pszRelationName,pRelationship) \
+ ( (This)->lpVtbl -> GetRelationship(This,pszRelationName,pRelationship) )
+
+#define IEntity_MetaData(This,riid,pMetaData) \
+ ( (This)->lpVtbl -> MetaData(This,riid,pMetaData) )
+
+#define IEntity_NamedEntities(This,riid,pNamedEntities) \
+ ( (This)->lpVtbl -> NamedEntities(This,riid,pNamedEntities) )
+
+#define IEntity_GetNamedEntity(This,pszValue,ppNamedEntity) \
+ ( (This)->lpVtbl -> GetNamedEntity(This,pszValue,ppNamedEntity) )
+
+#define IEntity_DefaultPhrase(This,ppszPhrase) \
+ ( (This)->lpVtbl -> DefaultPhrase(This,ppszPhrase) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IEntity_INTERFACE_DEFINED__ */
+
+
+#ifndef __IRelationship_INTERFACE_DEFINED__
+#define __IRelationship_INTERFACE_DEFINED__
+
+/* interface IRelationship */
+/* [unique][object][uuid][helpstring] */
+
+
+EXTERN_C const IID IID_IRelationship;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("2769280B-5108-498c-9C7F-A51239B63147")
+ IRelationship : public IUnknown
+ {
+ public:
+ virtual /* [local] */ HRESULT STDMETHODCALLTYPE Name(
+ /* [retval][out] */
+ __deref_opt_out LPWSTR *ppszName) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE IsReal(
+ /* [retval][out] */ __RPC__out BOOL *pIsReal) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE Destination(
+ /* [retval][out] */ __RPC__deref_out_opt IEntity **pDestinationEntity) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE MetaData(
+ /* [in] */ __RPC__in REFIID riid,
+ /* [iid_is][retval][out] */ __RPC__deref_out_opt void **pMetaData) = 0;
+
+ virtual /* [local] */ HRESULT STDMETHODCALLTYPE DefaultPhrase(
+ /* [retval][out] */
+ __deref_opt_out LPWSTR *ppszPhrase) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct IRelationshipVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IRelationship * This,
+ /* [in] */ __RPC__in REFIID riid,
+ /* [iid_is][out] */
+ __RPC__deref_out void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IRelationship * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IRelationship * This);
+
+ /* [local] */ HRESULT ( STDMETHODCALLTYPE *Name )(
+ IRelationship * This,
+ /* [retval][out] */
+ __deref_opt_out LPWSTR *ppszName);
+
+ HRESULT ( STDMETHODCALLTYPE *IsReal )(
+ IRelationship * This,
+ /* [retval][out] */ __RPC__out BOOL *pIsReal);
+
+ HRESULT ( STDMETHODCALLTYPE *Destination )(
+ IRelationship * This,
+ /* [retval][out] */ __RPC__deref_out_opt IEntity **pDestinationEntity);
+
+ HRESULT ( STDMETHODCALLTYPE *MetaData )(
+ IRelationship * This,
+ /* [in] */ __RPC__in REFIID riid,
+ /* [iid_is][retval][out] */ __RPC__deref_out_opt void **pMetaData);
+
+ /* [local] */ HRESULT ( STDMETHODCALLTYPE *DefaultPhrase )(
+ IRelationship * This,
+ /* [retval][out] */
+ __deref_opt_out LPWSTR *ppszPhrase);
+
+ END_INTERFACE
+ } IRelationshipVtbl;
+
+ interface IRelationship
+ {
+ CONST_VTBL struct IRelationshipVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IRelationship_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IRelationship_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IRelationship_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IRelationship_Name(This,ppszName) \
+ ( (This)->lpVtbl -> Name(This,ppszName) )
+
+#define IRelationship_IsReal(This,pIsReal) \
+ ( (This)->lpVtbl -> IsReal(This,pIsReal) )
+
+#define IRelationship_Destination(This,pDestinationEntity) \
+ ( (This)->lpVtbl -> Destination(This,pDestinationEntity) )
+
+#define IRelationship_MetaData(This,riid,pMetaData) \
+ ( (This)->lpVtbl -> MetaData(This,riid,pMetaData) )
+
+#define IRelationship_DefaultPhrase(This,ppszPhrase) \
+ ( (This)->lpVtbl -> DefaultPhrase(This,ppszPhrase) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IRelationship_INTERFACE_DEFINED__ */
+
+
+#ifndef __INamedEntity_INTERFACE_DEFINED__
+#define __INamedEntity_INTERFACE_DEFINED__
+
+/* interface INamedEntity */
+/* [unique][uuid][object][helpstring] */
+
+
+EXTERN_C const IID IID_INamedEntity;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("ABDBD0B1-7D54-49fb-AB5C-BFF4130004CD")
+ INamedEntity : public IUnknown
+ {
+ public:
+ virtual HRESULT STDMETHODCALLTYPE GetValue(
+ /* [retval][out] */ __RPC__deref_out_opt LPWSTR *ppszValue) = 0;
+
+ virtual /* [local] */ HRESULT STDMETHODCALLTYPE DefaultPhrase(
+ /* [retval][out] */
+ __deref_opt_out LPWSTR *ppszPhrase) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct INamedEntityVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ INamedEntity * This,
+ /* [in] */ __RPC__in REFIID riid,
+ /* [iid_is][out] */
+ __RPC__deref_out void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ INamedEntity * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ INamedEntity * This);
+
+ HRESULT ( STDMETHODCALLTYPE *GetValue )(
+ INamedEntity * This,
+ /* [retval][out] */ __RPC__deref_out_opt LPWSTR *ppszValue);
+
+ /* [local] */ HRESULT ( STDMETHODCALLTYPE *DefaultPhrase )(
+ INamedEntity * This,
+ /* [retval][out] */
+ __deref_opt_out LPWSTR *ppszPhrase);
+
+ END_INTERFACE
+ } INamedEntityVtbl;
+
+ interface INamedEntity
+ {
+ CONST_VTBL struct INamedEntityVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define INamedEntity_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define INamedEntity_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define INamedEntity_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define INamedEntity_GetValue(This,ppszValue) \
+ ( (This)->lpVtbl -> GetValue(This,ppszValue) )
+
+#define INamedEntity_DefaultPhrase(This,ppszPhrase) \
+ ( (This)->lpVtbl -> DefaultPhrase(This,ppszPhrase) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __INamedEntity_INTERFACE_DEFINED__ */
+
+
+#ifndef __ISchemaProvider_INTERFACE_DEFINED__
+#define __ISchemaProvider_INTERFACE_DEFINED__
+
+/* interface ISchemaProvider */
+/* [unique][object][uuid][helpstring] */
+
+
+EXTERN_C const IID IID_ISchemaProvider;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("8CF89BCB-394C-49b2-AE28-A59DD4ED7F68")
+ ISchemaProvider : public IUnknown
+ {
+ public:
+ virtual HRESULT STDMETHODCALLTYPE Entities(
+ /* [in] */ __RPC__in REFIID riid,
+ /* [iid_is][retval][out] */ __RPC__deref_out_opt void **pEntities) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE RootEntity(
+ /* [retval][out] */ __RPC__deref_out_opt IEntity **pRootEntity) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetEntity(
+ /* [in] */ __RPC__in LPCWSTR pszEntityName,
+ /* [retval][out] */ __RPC__deref_out_opt IEntity **pEntity) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE MetaData(
+ /* [in] */ __RPC__in REFIID riid,
+ /* [iid_is][retval][out] */ __RPC__deref_out_opt void **pMetaData) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE Localize(
+ /* [in] */ LCID lcid,
+ /* [in] */ __RPC__in_opt ISchemaLocalizerSupport *pSchemaLocalizerSupport) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE SaveBinary(
+ /* [in] */ __RPC__in LPCWSTR pszSchemaBinaryPath) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE LookupAuthoredNamedEntity(
+ /* [in] */ __RPC__in_opt IEntity *pEntity,
+ /* [in] */ __RPC__in LPCWSTR pszInputString,
+ /* [in] */ __RPC__in_opt ITokenCollection *pTokenCollection,
+ /* [in] */ ULONG cTokensBegin,
+ /* [out] */ __RPC__out ULONG *pcTokensLength,
+ /* [out] */ __RPC__deref_out_opt LPWSTR *ppszValue) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct ISchemaProviderVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ ISchemaProvider * This,
+ /* [in] */ __RPC__in REFIID riid,
+ /* [iid_is][out] */
+ __RPC__deref_out void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ ISchemaProvider * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ ISchemaProvider * This);
+
+ HRESULT ( STDMETHODCALLTYPE *Entities )(
+ ISchemaProvider * This,
+ /* [in] */ __RPC__in REFIID riid,
+ /* [iid_is][retval][out] */ __RPC__deref_out_opt void **pEntities);
+
+ HRESULT ( STDMETHODCALLTYPE *RootEntity )(
+ ISchemaProvider * This,
+ /* [retval][out] */ __RPC__deref_out_opt IEntity **pRootEntity);
+
+ HRESULT ( STDMETHODCALLTYPE *GetEntity )(
+ ISchemaProvider * This,
+ /* [in] */ __RPC__in LPCWSTR pszEntityName,
+ /* [retval][out] */ __RPC__deref_out_opt IEntity **pEntity);
+
+ HRESULT ( STDMETHODCALLTYPE *MetaData )(
+ ISchemaProvider * This,
+ /* [in] */ __RPC__in REFIID riid,
+ /* [iid_is][retval][out] */ __RPC__deref_out_opt void **pMetaData);
+
+ HRESULT ( STDMETHODCALLTYPE *Localize )(
+ ISchemaProvider * This,
+ /* [in] */ LCID lcid,
+ /* [in] */ __RPC__in_opt ISchemaLocalizerSupport *pSchemaLocalizerSupport);
+
+ HRESULT ( STDMETHODCALLTYPE *SaveBinary )(
+ ISchemaProvider * This,
+ /* [in] */ __RPC__in LPCWSTR pszSchemaBinaryPath);
+
+ HRESULT ( STDMETHODCALLTYPE *LookupAuthoredNamedEntity )(
+ ISchemaProvider * This,
+ /* [in] */ __RPC__in_opt IEntity *pEntity,
+ /* [in] */ __RPC__in LPCWSTR pszInputString,
+ /* [in] */ __RPC__in_opt ITokenCollection *pTokenCollection,
+ /* [in] */ ULONG cTokensBegin,
+ /* [out] */ __RPC__out ULONG *pcTokensLength,
+ /* [out] */ __RPC__deref_out_opt LPWSTR *ppszValue);
+
+ END_INTERFACE
+ } ISchemaProviderVtbl;
+
+ interface ISchemaProvider
+ {
+ CONST_VTBL struct ISchemaProviderVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define ISchemaProvider_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define ISchemaProvider_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define ISchemaProvider_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define ISchemaProvider_Entities(This,riid,pEntities) \
+ ( (This)->lpVtbl -> Entities(This,riid,pEntities) )
+
+#define ISchemaProvider_RootEntity(This,pRootEntity) \
+ ( (This)->lpVtbl -> RootEntity(This,pRootEntity) )
+
+#define ISchemaProvider_GetEntity(This,pszEntityName,pEntity) \
+ ( (This)->lpVtbl -> GetEntity(This,pszEntityName,pEntity) )
+
+#define ISchemaProvider_MetaData(This,riid,pMetaData) \
+ ( (This)->lpVtbl -> MetaData(This,riid,pMetaData) )
+
+#define ISchemaProvider_Localize(This,lcid,pSchemaLocalizerSupport) \
+ ( (This)->lpVtbl -> Localize(This,lcid,pSchemaLocalizerSupport) )
+
+#define ISchemaProvider_SaveBinary(This,pszSchemaBinaryPath) \
+ ( (This)->lpVtbl -> SaveBinary(This,pszSchemaBinaryPath) )
+
+#define ISchemaProvider_LookupAuthoredNamedEntity(This,pEntity,pszInputString,pTokenCollection,cTokensBegin,pcTokensLength,ppszValue) \
+ ( (This)->lpVtbl -> LookupAuthoredNamedEntity(This,pEntity,pszInputString,pTokenCollection,cTokensBegin,pcTokensLength,ppszValue) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __ISchemaProvider_INTERFACE_DEFINED__ */
+
+
+#ifndef __ITokenCollection_INTERFACE_DEFINED__
+#define __ITokenCollection_INTERFACE_DEFINED__
+
+/* interface ITokenCollection */
+/* [unique][object][uuid][helpstring] */
+
+
+EXTERN_C const IID IID_ITokenCollection;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("22D8B4F2-F577-4adb-A335-C2AE88416FAB")
+ ITokenCollection : public IUnknown
+ {
+ public:
+ virtual HRESULT STDMETHODCALLTYPE NumberOfTokens(
+ __RPC__in ULONG *pCount) = 0;
+
+ virtual /* [local] */ HRESULT STDMETHODCALLTYPE GetToken(
+ /* [in] */ ULONG i,
+ /* [out] */
+ __out_opt ULONG *pBegin,
+ /* [out] */
+ __out_opt ULONG *pLength,
+ /* [out] */
+ __deref_opt_out LPWSTR *ppsz) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct ITokenCollectionVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ ITokenCollection * This,
+ /* [in] */ __RPC__in REFIID riid,
+ /* [iid_is][out] */
+ __RPC__deref_out void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ ITokenCollection * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ ITokenCollection * This);
+
+ HRESULT ( STDMETHODCALLTYPE *NumberOfTokens )(
+ ITokenCollection * This,
+ __RPC__in ULONG *pCount);
+
+ /* [local] */ HRESULT ( STDMETHODCALLTYPE *GetToken )(
+ ITokenCollection * This,
+ /* [in] */ ULONG i,
+ /* [out] */
+ __out_opt ULONG *pBegin,
+ /* [out] */
+ __out_opt ULONG *pLength,
+ /* [out] */
+ __deref_opt_out LPWSTR *ppsz);
+
+ END_INTERFACE
+ } ITokenCollectionVtbl;
+
+ interface ITokenCollection
+ {
+ CONST_VTBL struct ITokenCollectionVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define ITokenCollection_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define ITokenCollection_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define ITokenCollection_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define ITokenCollection_NumberOfTokens(This,pCount) \
+ ( (This)->lpVtbl -> NumberOfTokens(This,pCount) )
+
+#define ITokenCollection_GetToken(This,i,pBegin,pLength,ppsz) \
+ ( (This)->lpVtbl -> GetToken(This,i,pBegin,pLength,ppsz) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __ITokenCollection_INTERFACE_DEFINED__ */
+
+
+/* interface __MIDL_itf_structuredquery_0000_0013 */
+/* [local] */
+
+typedef /* [public][public][v1_enum] */
+enum __MIDL___MIDL_itf_structuredquery_0000_0013_0001
+ { NEC_LOW = 0,
+ NEC_MEDIUM = ( NEC_LOW + 1 ) ,
+ NEC_HIGH = ( NEC_MEDIUM + 1 )
+ } NAMED_ENTITY_CERTAINTY;
+
+
+
+extern RPC_IF_HANDLE __MIDL_itf_structuredquery_0000_0013_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_structuredquery_0000_0013_v0_0_s_ifspec;
+
+#ifndef __INamedEntityCollector_INTERFACE_DEFINED__
+#define __INamedEntityCollector_INTERFACE_DEFINED__
+
+/* interface INamedEntityCollector */
+/* [unique][object][uuid][helpstring] */
+
+
+EXTERN_C const IID IID_INamedEntityCollector;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("AF2440F6-8AFC-47d0-9A7F-396A0ACFB43D")
+ INamedEntityCollector : public IUnknown
+ {
+ public:
+ virtual HRESULT STDMETHODCALLTYPE Add(
+ /* [in] */ ULONG beginSpan,
+ /* [in] */ ULONG endSpan,
+ /* [in] */ ULONG beginActual,
+ /* [in] */ ULONG endActual,
+ /* [in] */ __RPC__in_opt IEntity *pType,
+ /* [in] */ __RPC__in LPCWSTR pszValue,
+ /* [in] */ NAMED_ENTITY_CERTAINTY certainty) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct INamedEntityCollectorVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ INamedEntityCollector * This,
+ /* [in] */ __RPC__in REFIID riid,
+ /* [iid_is][out] */
+ __RPC__deref_out void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ INamedEntityCollector * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ INamedEntityCollector * This);
+
+ HRESULT ( STDMETHODCALLTYPE *Add )(
+ INamedEntityCollector * This,
+ /* [in] */ ULONG beginSpan,
+ /* [in] */ ULONG endSpan,
+ /* [in] */ ULONG beginActual,
+ /* [in] */ ULONG endActual,
+ /* [in] */ __RPC__in_opt IEntity *pType,
+ /* [in] */ __RPC__in LPCWSTR pszValue,
+ /* [in] */ NAMED_ENTITY_CERTAINTY certainty);
+
+ END_INTERFACE
+ } INamedEntityCollectorVtbl;
+
+ interface INamedEntityCollector
+ {
+ CONST_VTBL struct INamedEntityCollectorVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define INamedEntityCollector_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define INamedEntityCollector_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define INamedEntityCollector_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define INamedEntityCollector_Add(This,beginSpan,endSpan,beginActual,endActual,pType,pszValue,certainty) \
+ ( (This)->lpVtbl -> Add(This,beginSpan,endSpan,beginActual,endActual,pType,pszValue,certainty) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __INamedEntityCollector_INTERFACE_DEFINED__ */
+
+
+#ifndef __ISchemaLocalizerSupport_INTERFACE_DEFINED__
+#define __ISchemaLocalizerSupport_INTERFACE_DEFINED__
+
+/* interface ISchemaLocalizerSupport */
+/* [unique][object][uuid] */
+
+
+EXTERN_C const IID IID_ISchemaLocalizerSupport;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("CA3FDCA2-BFBE-4eed-90D7-0CAEF0A1BDA1")
+ ISchemaLocalizerSupport : public IUnknown
+ {
+ public:
+ virtual HRESULT STDMETHODCALLTYPE Localize(
+ /* [in] */ __RPC__in LPCWSTR pszGlobalString,
+ /* [retval][out] */ __RPC__deref_out_opt LPWSTR *ppszLocalString) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct ISchemaLocalizerSupportVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ ISchemaLocalizerSupport * This,
+ /* [in] */ __RPC__in REFIID riid,
+ /* [iid_is][out] */
+ __RPC__deref_out void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ ISchemaLocalizerSupport * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ ISchemaLocalizerSupport * This);
+
+ HRESULT ( STDMETHODCALLTYPE *Localize )(
+ ISchemaLocalizerSupport * This,
+ /* [in] */ __RPC__in LPCWSTR pszGlobalString,
+ /* [retval][out] */ __RPC__deref_out_opt LPWSTR *ppszLocalString);
+
+ END_INTERFACE
+ } ISchemaLocalizerSupportVtbl;
+
+ interface ISchemaLocalizerSupport
+ {
+ CONST_VTBL struct ISchemaLocalizerSupportVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define ISchemaLocalizerSupport_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define ISchemaLocalizerSupport_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define ISchemaLocalizerSupport_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define ISchemaLocalizerSupport_Localize(This,pszGlobalString,ppszLocalString) \
+ ( (This)->lpVtbl -> Localize(This,pszGlobalString,ppszLocalString) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __ISchemaLocalizerSupport_INTERFACE_DEFINED__ */
+
+
+#ifndef __IQueryParserManager_INTERFACE_DEFINED__
+#define __IQueryParserManager_INTERFACE_DEFINED__
+
+/* interface IQueryParserManager */
+/* [unique][object][uuid] */
+
+
+EXTERN_C const IID IID_IQueryParserManager;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("A879E3C4-AF77-44fb-8F37-EBD1487CF920")
+ IQueryParserManager : public IUnknown
+ {
+ public:
+ virtual HRESULT STDMETHODCALLTYPE CreateLoadedParser(
+ /* [in] */ __RPC__in LPCWSTR pszCatalog,
+ /* [in] */ LANGID langidForKeywords,
+ /* [in] */ __RPC__in REFIID riid,
+ /* [iid_is][retval][out] */ __RPC__deref_out_opt void **ppQueryParser) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE InitializeOptions(
+ /* [in] */ BOOL fUnderstandNQS,
+ /* [in] */ BOOL fAutoWildCard,
+ /* [in] */ __RPC__in_opt IQueryParser *pQueryParser) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE SetOption(
+ /* [in] */ QUERY_PARSER_MANAGER_OPTION option,
+ /* [in] */ __RPC__in const PROPVARIANT *pOptionValue) = 0;
+
+ };
+
+#else /* C style interface */
+
+ typedef struct IQueryParserManagerVtbl
+ {
+ BEGIN_INTERFACE
+
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ IQueryParserManager * This,
+ /* [in] */ __RPC__in REFIID riid,
+ /* [iid_is][out] */
+ __RPC__deref_out void **ppvObject);
+
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ IQueryParserManager * This);
+
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ IQueryParserManager * This);
+
+ HRESULT ( STDMETHODCALLTYPE *CreateLoadedParser )(
+ IQueryParserManager * This,
+ /* [in] */ __RPC__in LPCWSTR pszCatalog,
+ /* [in] */ LANGID langidForKeywords,
+ /* [in] */ __RPC__in REFIID riid,
+ /* [iid_is][retval][out] */ __RPC__deref_out_opt void **ppQueryParser);
+
+ HRESULT ( STDMETHODCALLTYPE *InitializeOptions )(
+ IQueryParserManager * This,
+ /* [in] */ BOOL fUnderstandNQS,
+ /* [in] */ BOOL fAutoWildCard,
+ /* [in] */ __RPC__in_opt IQueryParser *pQueryParser);
+
+ HRESULT ( STDMETHODCALLTYPE *SetOption )(
+ IQueryParserManager * This,
+ /* [in] */ QUERY_PARSER_MANAGER_OPTION option,
+ /* [in] */ __RPC__in const PROPVARIANT *pOptionValue);
+
+ END_INTERFACE
+ } IQueryParserManagerVtbl;
+
+ interface IQueryParserManager
+ {
+ CONST_VTBL struct IQueryParserManagerVtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define IQueryParserManager_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define IQueryParserManager_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define IQueryParserManager_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define IQueryParserManager_CreateLoadedParser(This,pszCatalog,langidForKeywords,riid,ppQueryParser) \
+ ( (This)->lpVtbl -> CreateLoadedParser(This,pszCatalog,langidForKeywords,riid,ppQueryParser) )
+
+#define IQueryParserManager_InitializeOptions(This,fUnderstandNQS,fAutoWildCard,pQueryParser) \
+ ( (This)->lpVtbl -> InitializeOptions(This,fUnderstandNQS,fAutoWildCard,pQueryParser) )
+
+#define IQueryParserManager_SetOption(This,option,pOptionValue) \
+ ( (This)->lpVtbl -> SetOption(This,option,pOptionValue) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __IQueryParserManager_INTERFACE_DEFINED__ */
+
+
+
+#ifndef __StructuredQuery1_LIBRARY_DEFINED__
+#define __StructuredQuery1_LIBRARY_DEFINED__
+
+/* library StructuredQuery1 */
+/* [version][uuid] */
+
+
+EXTERN_C const IID LIBID_StructuredQuery1;
+
+EXTERN_C const CLSID CLSID_QueryParser;
+
+#ifdef __cplusplus
+
+class DECLSPEC_UUID("B72F8FD8-0FAB-4dd9-BDBF-245A6CE1485B")
+QueryParser;
+#endif
+
+EXTERN_C const CLSID CLSID_NegationCondition;
+
+#ifdef __cplusplus
+
+class DECLSPEC_UUID("8DE9C74C-605A-4acd-BEE3-2B222AA2D23D")
+NegationCondition;
+#endif
+
+EXTERN_C const CLSID CLSID_CompoundCondition;
+
+#ifdef __cplusplus
+
+class DECLSPEC_UUID("116F8D13-101E-4fa5-84D4-FF8279381935")
+CompoundCondition;
+#endif
+
+EXTERN_C const CLSID CLSID_LeafCondition;
+
+#ifdef __cplusplus
+
+class DECLSPEC_UUID("52F15C89-5A17-48e1-BBCD-46A3F89C7CC2")
+LeafCondition;
+#endif
+
+EXTERN_C const CLSID CLSID_ConditionFactory;
+
+#ifdef __cplusplus
+
+class DECLSPEC_UUID("E03E85B0-7BE3-4000-BA98-6C13DE9FA486")
+ConditionFactory;
+#endif
+
+EXTERN_C const CLSID CLSID_Interval;
+
+#ifdef __cplusplus
+
+class DECLSPEC_UUID("D957171F-4BF9-4de2-BCD5-C70A7CA55836")
+Interval;
+#endif
+
+EXTERN_C const CLSID CLSID_QueryParserManager;
+
+#ifdef __cplusplus
+
+class DECLSPEC_UUID("5088B39A-29B4-4d9d-8245-4EE289222F66")
+QueryParserManager;
+#endif
+#endif /* __StructuredQuery1_LIBRARY_DEFINED__ */
+
+/* Additional Prototypes for ALL interfaces */
+
+unsigned long __RPC_USER BSTR_UserSize( unsigned long *, unsigned long , BSTR * );
+unsigned char * __RPC_USER BSTR_UserMarshal( unsigned long *, unsigned char *, BSTR * );
+unsigned char * __RPC_USER BSTR_UserUnmarshal(unsigned long *, unsigned char *, BSTR * );
+void __RPC_USER BSTR_UserFree( unsigned long *, BSTR * );
+
+unsigned long __RPC_USER LPSAFEARRAY_UserSize( unsigned long *, unsigned long , LPSAFEARRAY * );
+unsigned char * __RPC_USER LPSAFEARRAY_UserMarshal( unsigned long *, unsigned char *, LPSAFEARRAY * );
+unsigned char * __RPC_USER LPSAFEARRAY_UserUnmarshal(unsigned long *, unsigned char *, LPSAFEARRAY * );
+void __RPC_USER LPSAFEARRAY_UserFree( unsigned long *, LPSAFEARRAY * );
+
+/* end of Additional Prototypes */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
+
+
-/*\r
- * Portable Audio I/O Library WASAPI implementation\r
- * Copyright (c) 2006-2010 David Viens, Dmitry Kostjuchenko\r
- *\r
- * Based on the Open Source API proposed by Ross Bencina\r
- * Copyright (c) 1999-2002 Ross Bencina, Phil Burk\r
- *\r
- * Permission is hereby granted, free of charge, to any person obtaining\r
- * a copy of this software and associated documentation files\r
- * (the "Software"), to deal in the Software without restriction,\r
- * including without limitation the rights to use, copy, modify, merge,\r
- * publish, distribute, sublicense, and/or sell copies of the Software,\r
- * and to permit persons to whom the Software is furnished to do so,\r
- * subject to the following conditions:\r
- *\r
- * The above copyright notice and this permission notice shall be\r
- * included in all copies or substantial portions of the Software.\r
- *\r
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\r
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\r
- * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\r
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\r
- * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
- */\r
-\r
-/*\r
- * The text above constitutes the entire PortAudio license; however,\r
- * the PortAudio community also makes the following non-binding requests:\r
- *\r
- * Any person wishing to distribute modifications to the Software is\r
- * requested to send the modifications to the original developer so that\r
- * they can be incorporated into the canonical version. It is also\r
- * requested that these non-binding requests be included along with the\r
- * license above.\r
- */\r
-\r
-/** @file\r
- @ingroup hostapi_src\r
- @brief WASAPI implementation of support for a host API.\r
- @note pa_wasapi currently requires minimum VC 2005, and the latest Vista SDK\r
-*/\r
-\r
-#define WIN32_LEAN_AND_MEAN // exclude rare headers\r
-#include <windows.h>\r
-#include <stdio.h>\r
-#include <process.h>\r
-#include <assert.h>\r
-#include <mmsystem.h>\r
-#include <mmreg.h> // must be before other Wasapi headers\r
-#if defined(_MSC_VER) && (_MSC_VER >= 1400)\r
- #include <Avrt.h>\r
- #define COBJMACROS\r
- #include <Audioclient.h>\r
- #include <endpointvolume.h>\r
- #define INITGUID // Avoid additional linkage of static libs, excessive code will be optimized out by the compiler\r
- #include <mmdeviceapi.h>\r
- #include <functiondiscoverykeys.h>\r
- #include <devicetopology.h> // Used to get IKsJackDescription interface\r
- #undef INITGUID\r
-#endif\r
-#ifndef __MWERKS__\r
-#include <malloc.h>\r
-#include <memory.h>\r
-#endif /* __MWERKS__ */\r
-\r
-#include "pa_util.h"\r
-#include "pa_allocation.h"\r
-#include "pa_hostapi.h"\r
-#include "pa_stream.h"\r
-#include "pa_cpuload.h"\r
-#include "pa_process.h"\r
-#include "pa_win_wasapi.h"\r
-#include "pa_debugprint.h"\r
-#include "pa_ringbuffer.h"\r
-\r
-#include "pa_win_coinitialize.h"\r
-\r
-#ifndef NTDDI_VERSION\r
- \r
- #undef WINVER\r
- #undef _WIN32_WINNT\r
- #define WINVER 0x0600 // VISTA\r
- #define _WIN32_WINNT WINVER\r
-\r
- #ifndef _AVRT_ //<< fix MinGW dummy compile by defining missing type: AVRT_PRIORITY\r
- typedef enum _AVRT_PRIORITY\r
- {\r
- AVRT_PRIORITY_LOW = -1,\r
- AVRT_PRIORITY_NORMAL,\r
- AVRT_PRIORITY_HIGH,\r
- AVRT_PRIORITY_CRITICAL\r
- } AVRT_PRIORITY, *PAVRT_PRIORITY;\r
- #endif\r
-\r
- #include <basetyps.h> // << for IID/CLSID\r
- #include <rpcsal.h>\r
- #include <sal.h>\r
-\r
- #ifndef __LPCGUID_DEFINED__\r
- #define __LPCGUID_DEFINED__\r
- typedef const GUID *LPCGUID;\r
- #endif\r
-\r
- #ifndef PROPERTYKEY_DEFINED\r
- #define PROPERTYKEY_DEFINED\r
- typedef struct _tagpropertykey\r
- {\r
- GUID fmtid;\r
- DWORD pid;\r
- } PROPERTYKEY;\r
- #endif\r
-\r
- #ifdef __midl_proxy\r
- #define __MIDL_CONST\r
- #else\r
- #define __MIDL_CONST const\r
- #endif\r
-\r
- #ifdef WIN64\r
- #include <wtypes.h>\r
- typedef LONG NTSTATUS;\r
- #define FASTCALL\r
- #include <oleidl.h>\r
- #include <objidl.h>\r
- #else\r
- typedef struct _BYTE_BLOB\r
- {\r
- unsigned long clSize;\r
- unsigned char abData[ 1 ];\r
- } BYTE_BLOB;\r
- typedef /* [unique] */ __RPC_unique_pointer BYTE_BLOB *UP_BYTE_BLOB;\r
- typedef LONGLONG REFERENCE_TIME;\r
- #define NONAMELESSUNION\r
- #endif\r
- \r
- #ifndef WAVE_FORMAT_IEEE_FLOAT\r
- #define WAVE_FORMAT_IEEE_FLOAT 0x0003 // 32-bit floating-point\r
- #endif \r
- \r
- #ifndef __MINGW_EXTENSION\r
- #if defined(__GNUC__) || defined(__GNUG__)\r
- #define __MINGW_EXTENSION __extension__\r
- #else\r
- #define __MINGW_EXTENSION\r
- #endif\r
- #endif \r
-\r
- #include <sdkddkver.h>\r
- #include <propkeydef.h>\r
- #define COBJMACROS\r
- #define INITGUID // Avoid additional linkage of static libs, excessive code will be optimized out by the compiler\r
- #include <audioclient.h>\r
- #include <mmdeviceapi.h>\r
- #include <endpointvolume.h>\r
- #include <functiondiscoverykeys.h>\r
- #include <devicetopology.h> // Used to get IKsJackDescription interface\r
- #undef INITGUID\r
-\r
-#endif // NTDDI_VERSION\r
-\r
-#ifndef GUID_SECT\r
- #define GUID_SECT\r
-#endif\r
-\r
-#define __DEFINE_GUID(n,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) static const GUID n GUID_SECT = {l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}}\r
-#define __DEFINE_IID(n,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) static const IID n GUID_SECT = {l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}}\r
-#define __DEFINE_CLSID(n,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) static const CLSID n GUID_SECT = {l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}}\r
-#define PA_DEFINE_CLSID(className, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \\r
- __DEFINE_CLSID(pa_CLSID_##className, 0x##l, 0x##w1, 0x##w2, 0x##b1, 0x##b2, 0x##b3, 0x##b4, 0x##b5, 0x##b6, 0x##b7, 0x##b8)\r
-#define PA_DEFINE_IID(interfaceName, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \\r
- __DEFINE_IID(pa_IID_##interfaceName, 0x##l, 0x##w1, 0x##w2, 0x##b1, 0x##b2, 0x##b3, 0x##b4, 0x##b5, 0x##b6, 0x##b7, 0x##b8)\r
-\r
-// "1CB9AD4C-DBFA-4c32-B178-C2F568A703B2"\r
-PA_DEFINE_IID(IAudioClient, 1cb9ad4c, dbfa, 4c32, b1, 78, c2, f5, 68, a7, 03, b2);\r
-// "726778CD-F60A-4EDA-82DE-E47610CD78AA"\r
-PA_DEFINE_IID(IAudioClient2, 726778cd, f60a, 4eda, 82, de, e4, 76, 10, cd, 78, aa);\r
-// "1BE09788-6894-4089-8586-9A2A6C265AC5"\r
-PA_DEFINE_IID(IMMEndpoint, 1be09788, 6894, 4089, 85, 86, 9a, 2a, 6c, 26, 5a, c5);\r
-// "A95664D2-9614-4F35-A746-DE8DB63617E6"\r
-PA_DEFINE_IID(IMMDeviceEnumerator, a95664d2, 9614, 4f35, a7, 46, de, 8d, b6, 36, 17, e6);\r
-// "BCDE0395-E52F-467C-8E3D-C4579291692E"\r
-PA_DEFINE_CLSID(IMMDeviceEnumerator,bcde0395, e52f, 467c, 8e, 3d, c4, 57, 92, 91, 69, 2e);\r
-// "F294ACFC-3146-4483-A7BF-ADDCA7C260E2"\r
-PA_DEFINE_IID(IAudioRenderClient, f294acfc, 3146, 4483, a7, bf, ad, dc, a7, c2, 60, e2);\r
-// "C8ADBD64-E71E-48a0-A4DE-185C395CD317"\r
-PA_DEFINE_IID(IAudioCaptureClient, c8adbd64, e71e, 48a0, a4, de, 18, 5c, 39, 5c, d3, 17);\r
-// *2A07407E-6497-4A18-9787-32F79BD0D98F* Or this??\r
-PA_DEFINE_IID(IDeviceTopology, 2A07407E, 6497, 4A18, 97, 87, 32, f7, 9b, d0, d9, 8f);\r
-// *AE2DE0E4-5BCA-4F2D-AA46-5D13F8FDB3A9*\r
-PA_DEFINE_IID(IPart, AE2DE0E4, 5BCA, 4F2D, aa, 46, 5d, 13, f8, fd, b3, a9);\r
-// *4509F757-2D46-4637-8E62-CE7DB944F57B*\r
-PA_DEFINE_IID(IKsJackDescription, 4509F757, 2D46, 4637, 8e, 62, ce, 7d, b9, 44, f5, 7b);\r
-// Media formats:\r
-__DEFINE_GUID(pa_KSDATAFORMAT_SUBTYPE_PCM, 0x00000001, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71 );\r
-__DEFINE_GUID(pa_KSDATAFORMAT_SUBTYPE_ADPCM, 0x00000002, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71 );\r
-__DEFINE_GUID(pa_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT, 0x00000003, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71 );\r
-\r
-#ifdef __IAudioClient2_INTERFACE_DEFINED__\r
-typedef enum _pa_AUDCLNT_STREAMOPTIONS { \r
- pa_AUDCLNT_STREAMOPTIONS_NONE = 0x00,\r
- pa_AUDCLNT_STREAMOPTIONS_RAW = 0x01,\r
- pa_AUDCLNT_STREAMOPTIONS_MATCH_FORMAT = 0x02\r
-} pa_AUDCLNT_STREAMOPTIONS;\r
-typedef struct _pa_AudioClientProperties {\r
- UINT32 cbSize;\r
- BOOL bIsOffload;\r
- AUDIO_STREAM_CATEGORY eCategory;\r
- pa_AUDCLNT_STREAMOPTIONS Options;\r
-} pa_AudioClientProperties;\r
-#define PA_AUDIOCLIENTPROPERTIES_SIZE_CATEGORY (sizeof(pa_AudioClientProperties) - sizeof(pa_AUDCLNT_STREAMOPTIONS))\r
-#define PA_AUDIOCLIENTPROPERTIES_SIZE_OPTIONS sizeof(pa_AudioClientProperties)\r
-#endif // __IAudioClient2_INTERFACE_DEFINED__\r
-\r
-/* use CreateThread for CYGWIN/Windows Mobile, _beginthreadex for all others */\r
-#if !defined(__CYGWIN__) && !defined(_WIN32_WCE)\r
- #define CREATE_THREAD(PROC) (HANDLE)_beginthreadex( NULL, 0, (PROC), stream, 0, &stream->dwThreadId )\r
- #define PA_THREAD_FUNC static unsigned WINAPI\r
- #define PA_THREAD_ID unsigned\r
-#else\r
- #define CREATE_THREAD(PROC) CreateThread( NULL, 0, (PROC), stream, 0, &stream->dwThreadId )\r
- #define PA_THREAD_FUNC static DWORD WINAPI\r
- #define PA_THREAD_ID DWORD\r
-#endif\r
-\r
-// Thread function forward decl.\r
-PA_THREAD_FUNC ProcThreadEvent(void *param);\r
-PA_THREAD_FUNC ProcThreadPoll(void *param);\r
-\r
-// Availabe from Windows 7\r
-#ifndef AUDCLNT_E_BUFFER_ERROR\r
- #define AUDCLNT_E_BUFFER_ERROR AUDCLNT_ERR(0x018)\r
-#endif\r
-#ifndef AUDCLNT_E_BUFFER_SIZE_NOT_ALIGNED\r
- #define AUDCLNT_E_BUFFER_SIZE_NOT_ALIGNED AUDCLNT_ERR(0x019)\r
-#endif\r
-#ifndef AUDCLNT_E_INVALID_DEVICE_PERIOD\r
- #define AUDCLNT_E_INVALID_DEVICE_PERIOD AUDCLNT_ERR(0x020)\r
-#endif\r
-\r
-#define MAX_STR_LEN 512\r
-\r
-enum { S_INPUT = 0, S_OUTPUT = 1, S_COUNT = 2, S_FULLDUPLEX = 0 };\r
-\r
-// Number of packets which compose single contignous buffer. With trial and error it was calculated\r
-// that WASAPI Input sub-system uses 6 packets per whole buffer. Please provide more information\r
-// or corrections if available.\r
-enum { WASAPI_PACKETS_PER_INPUT_BUFFER = 6 };\r
-\r
-#define STATIC_ARRAY_SIZE(array) (sizeof(array)/sizeof(array[0]))\r
-\r
-#define PRINT(x) PA_DEBUG(x);\r
-\r
-#define PA_SKELETON_SET_LAST_HOST_ERROR( errorCode, errorText ) \\r
- PaUtil_SetLastHostErrorInfo( paWASAPI, errorCode, errorText )\r
-\r
-#define PA_WASAPI__IS_FULLDUPLEX(STREAM) ((STREAM)->in.clientProc && (STREAM)->out.clientProc)\r
-\r
-#ifndef IF_FAILED_JUMP\r
-#define IF_FAILED_JUMP(hr, label) if(FAILED(hr)) goto label;\r
-#endif\r
-\r
-#ifndef IF_FAILED_INTERNAL_ERROR_JUMP\r
-#define IF_FAILED_INTERNAL_ERROR_JUMP(hr, error, label) if(FAILED(hr)) { error = paInternalError; goto label; }\r
-#endif\r
-\r
-#define SAFE_CLOSE(h) if ((h) != NULL) { CloseHandle((h)); (h) = NULL; }\r
-#define SAFE_RELEASE(punk) if ((punk) != NULL) { (punk)->lpVtbl->Release((punk)); (punk) = NULL; }\r
-\r
-// Mixer function\r
-typedef void (*MixMonoToStereoF) (void *__to, void *__from, UINT32 count);\r
-\r
-// AVRT is the new "multimedia schedulling stuff"\r
-typedef BOOL (WINAPI *FAvRtCreateThreadOrderingGroup) (PHANDLE,PLARGE_INTEGER,GUID*,PLARGE_INTEGER);\r
-typedef BOOL (WINAPI *FAvRtDeleteThreadOrderingGroup) (HANDLE);\r
-typedef BOOL (WINAPI *FAvRtWaitOnThreadOrderingGroup) (HANDLE);\r
-typedef HANDLE (WINAPI *FAvSetMmThreadCharacteristics) (LPCSTR,LPDWORD);\r
-typedef BOOL (WINAPI *FAvRevertMmThreadCharacteristics)(HANDLE);\r
-typedef BOOL (WINAPI *FAvSetMmThreadPriority) (HANDLE,AVRT_PRIORITY);\r
-\r
-static HMODULE hDInputDLL = 0;\r
-FAvRtCreateThreadOrderingGroup pAvRtCreateThreadOrderingGroup = NULL;\r
-FAvRtDeleteThreadOrderingGroup pAvRtDeleteThreadOrderingGroup = NULL;\r
-FAvRtWaitOnThreadOrderingGroup pAvRtWaitOnThreadOrderingGroup = NULL;\r
-FAvSetMmThreadCharacteristics pAvSetMmThreadCharacteristics = NULL;\r
-FAvRevertMmThreadCharacteristics pAvRevertMmThreadCharacteristics = NULL;\r
-FAvSetMmThreadPriority pAvSetMmThreadPriority = NULL;\r
-\r
-#define _GetProc(fun, type, name) { \\r
- fun = (type) GetProcAddress(hDInputDLL,name); \\r
- if (fun == NULL) { \\r
- PRINT(("GetProcAddr failed for %s" ,name)); \\r
- return FALSE; \\r
- } \\r
- } \\r
-\r
-// ------------------------------------------------------------------------------------------\r
-/* prototypes for functions declared in this file */\r
-#ifdef __cplusplus\r
-extern "C"\r
-{\r
-#endif /* __cplusplus */\r
-PaError PaWasapi_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );\r
-#ifdef __cplusplus\r
-}\r
-#endif /* __cplusplus */\r
-// dummy entry point for other compilers and sdks\r
-// currently built using RC1 SDK (5600)\r
-//#if _MSC_VER < 1400\r
-//PaError PaWasapi_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex hostApiIndex )\r
-//{\r
- //return paNoError;\r
-//}\r
-//#else\r
-\r
-// ------------------------------------------------------------------------------------------\r
-static void Terminate( struct PaUtilHostApiRepresentation *hostApi );\r
-static PaError IsFormatSupported( struct PaUtilHostApiRepresentation *hostApi,\r
- const PaStreamParameters *inputParameters,\r
- const PaStreamParameters *outputParameters,\r
- double sampleRate );\r
-static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,\r
- PaStream** s,\r
- const PaStreamParameters *inputParameters,\r
- const PaStreamParameters *outputParameters,\r
- double sampleRate,\r
- unsigned long framesPerBuffer,\r
- PaStreamFlags streamFlags,\r
- PaStreamCallback *streamCallback,\r
- void *userData );\r
-static PaError CloseStream( PaStream* stream );\r
-static PaError StartStream( PaStream *stream );\r
-static PaError StopStream( PaStream *stream );\r
-static PaError AbortStream( PaStream *stream );\r
-static PaError IsStreamStopped( PaStream *s );\r
-static PaError IsStreamActive( PaStream *stream );\r
-static PaTime GetStreamTime( PaStream *stream );\r
-static double GetStreamCpuLoad( PaStream* stream );\r
-static PaError ReadStream( PaStream* stream, void *buffer, unsigned long frames );\r
-static PaError WriteStream( PaStream* stream, const void *buffer, unsigned long frames );\r
-static signed long GetStreamReadAvailable( PaStream* stream );\r
-static signed long GetStreamWriteAvailable( PaStream* stream );\r
-\r
-// ------------------------------------------------------------------------------------------\r
-/*\r
- These are fields that can be gathered from IDevice and IAudioDevice PRIOR to Initialize, and\r
- done in first pass i assume that neither of these will cause the Driver to "load", but again,\r
- who knows how they implement their stuff\r
- */\r
-typedef struct PaWasapiDeviceInfo\r
-{\r
- // Device\r
- IMMDevice *device;\r
-\r
- // from GetId\r
- WCHAR szDeviceID[MAX_STR_LEN];\r
-\r
- // from GetState\r
- DWORD state;\r
-\r
- // Fields filled from IMMEndpoint'sGetDataFlow\r
- EDataFlow flow;\r
-\r
- // Fields filled from IAudioDevice (_prior_ to Initialize)\r
- // from GetDevicePeriod(\r
- REFERENCE_TIME DefaultDevicePeriod;\r
- REFERENCE_TIME MinimumDevicePeriod;\r
-\r
- // from GetMixFormat\r
- // WAVEFORMATEX *MixFormat;//needs to be CoTaskMemFree'd after use!\r
-\r
- // Default format (setup through Control Panel by user)\r
- WAVEFORMATEXTENSIBLE DefaultFormat;\r
-\r
- // Formfactor\r
- EndpointFormFactor formFactor;\r
-}\r
-PaWasapiDeviceInfo;\r
-\r
-// ------------------------------------------------------------------------------------------\r
-/* PaWasapiHostApiRepresentation - host api datastructure specific to this implementation */\r
-typedef struct\r
-{\r
- PaUtilHostApiRepresentation inheritedHostApiRep;\r
- PaUtilStreamInterface callbackStreamInterface;\r
- PaUtilStreamInterface blockingStreamInterface;\r
-\r
- PaUtilAllocationGroup *allocations;\r
-\r
- /* implementation specific data goes here */\r
-\r
- PaWinUtilComInitializationResult comInitializationResult;\r
-\r
- //in case we later need the synch\r
- IMMDeviceEnumerator *enumerator;\r
-\r
- //this is the REAL number of devices, whether they are usefull to PA or not!\r
- UINT32 deviceCount;\r
-\r
- WCHAR defaultRenderer [MAX_STR_LEN];\r
- WCHAR defaultCapturer [MAX_STR_LEN];\r
-\r
- PaWasapiDeviceInfo *devInfo;\r
-\r
- // Is true when WOW64 Vista/7 Workaround is needed\r
- BOOL useWOW64Workaround;\r
-}\r
-PaWasapiHostApiRepresentation;\r
-\r
-// ------------------------------------------------------------------------------------------\r
-/* PaWasapiAudioClientParams - audio client parameters */\r
-typedef struct PaWasapiAudioClientParams\r
-{\r
- PaWasapiDeviceInfo *device_info;\r
- PaStreamParameters stream_params;\r
- PaWasapiStreamInfo wasapi_params;\r
- UINT32 frames_per_buffer;\r
- double sample_rate;\r
- BOOL blocking;\r
- BOOL full_duplex;\r
- BOOL wow64_workaround;\r
-}\r
-PaWasapiAudioClientParams;\r
-\r
-// ------------------------------------------------------------------------------------------\r
-/* PaWasapiStream - a stream data structure specifically for this implementation */\r
-typedef struct PaWasapiSubStream\r
-{\r
- IAudioClient *clientParent;\r
- IStream *clientStream;\r
- IAudioClient *clientProc;\r
-\r
- WAVEFORMATEXTENSIBLE wavex;\r
- UINT32 bufferSize;\r
- REFERENCE_TIME deviceLatency;\r
- REFERENCE_TIME period;\r
- double latencySeconds;\r
- UINT32 framesPerHostCallback;\r
- AUDCLNT_SHAREMODE shareMode;\r
- UINT32 streamFlags; // AUDCLNT_STREAMFLAGS_EVENTCALLBACK, ...\r
- UINT32 flags;\r
- PaWasapiAudioClientParams params; //!< parameters\r
-\r
- // Buffers\r
- UINT32 buffers; //!< number of buffers used (from host side)\r
- UINT32 framesPerBuffer; //!< number of frames per 1 buffer\r
- BOOL userBufferAndHostMatch;\r
-\r
- // Used for Mono >> Stereo workaround, if driver does not support it\r
- // (in Exclusive mode WASAPI usually refuses to operate with Mono (1-ch)\r
- void *monoBuffer; //!< pointer to buffer\r
- UINT32 monoBufferSize; //!< buffer size in bytes\r
- MixMonoToStereoF monoMixer; //!< pointer to mixer function\r
-\r
- PaUtilRingBuffer *tailBuffer; //!< buffer with trailing sample for blocking mode operations (only for Input)\r
- void *tailBufferMemory; //!< tail buffer memory region\r
-}\r
-PaWasapiSubStream;\r
-\r
-// ------------------------------------------------------------------------------------------\r
-/* PaWasapiHostProcessor - redirects processing data */\r
-typedef struct PaWasapiHostProcessor\r
-{\r
- PaWasapiHostProcessorCallback processor;\r
- void *userData;\r
-}\r
-PaWasapiHostProcessor;\r
-\r
-// ------------------------------------------------------------------------------------------\r
-typedef struct PaWasapiStream\r
-{\r
- /* IMPLEMENT ME: rename this */\r
- PaUtilStreamRepresentation streamRepresentation;\r
- PaUtilCpuLoadMeasurer cpuLoadMeasurer;\r
- PaUtilBufferProcessor bufferProcessor;\r
-\r
- // input\r
- PaWasapiSubStream in;\r
- IAudioCaptureClient *captureClientParent;\r
- IStream *captureClientStream;\r
- IAudioCaptureClient *captureClient;\r
- IAudioEndpointVolume *inVol;\r
-\r
- // output\r
- PaWasapiSubStream out;\r
- IAudioRenderClient *renderClientParent;\r
- IStream *renderClientStream;\r
- IAudioRenderClient *renderClient;\r
- IAudioEndpointVolume *outVol;\r
-\r
- // event handles for event-driven processing mode\r
- HANDLE event[S_COUNT];\r
-\r
- // buffer mode\r
- PaUtilHostBufferSizeMode bufferMode;\r
-\r
- // must be volatile to avoid race condition on user query while\r
- // thread is being started\r
- volatile BOOL running;\r
-\r
- PA_THREAD_ID dwThreadId;\r
- HANDLE hThread;\r
- HANDLE hCloseRequest;\r
- HANDLE hThreadStart; //!< signalled by thread on start\r
- HANDLE hThreadExit; //!< signalled by thread on exit\r
- HANDLE hBlockingOpStreamRD;\r
- HANDLE hBlockingOpStreamWR;\r
-\r
- // Host callback Output overrider\r
- PaWasapiHostProcessor hostProcessOverrideOutput;\r
-\r
- // Host callback Input overrider\r
- PaWasapiHostProcessor hostProcessOverrideInput;\r
-\r
- // Defines blocking/callback interface used\r
- BOOL bBlocking;\r
-\r
- // Av Task (MM thread management)\r
- HANDLE hAvTask;\r
-\r
- // Thread priority level\r
- PaWasapiThreadPriority nThreadPriority;\r
-}\r
-PaWasapiStream;\r
-\r
-// COM marshaling\r
-static HRESULT MarshalSubStreamComPointers(PaWasapiSubStream *substream);\r
-static HRESULT MarshalStreamComPointers(PaWasapiStream *stream);\r
-static HRESULT UnmarshalSubStreamComPointers(PaWasapiSubStream *substream);\r
-static HRESULT UnmarshalStreamComPointers(PaWasapiStream *stream);\r
-static void ReleaseUnmarshaledSubComPointers(PaWasapiSubStream *substream);\r
-static void ReleaseUnmarshaledComPointers(PaWasapiStream *stream);\r
-\r
-// Local stream methods\r
-static void _StreamOnStop(PaWasapiStream *stream);\r
-static void _StreamFinish(PaWasapiStream *stream);\r
-static void _StreamCleanup(PaWasapiStream *stream);\r
-static HRESULT _PollGetOutputFramesAvailable(PaWasapiStream *stream, UINT32 *available);\r
-static HRESULT _PollGetInputFramesAvailable(PaWasapiStream *stream, UINT32 *available);\r
-static void *PaWasapi_ReallocateMemory(void *ptr, size_t size);\r
-static void PaWasapi_FreeMemory(void *ptr);\r
-\r
-// Local statics\r
-\r
-// ------------------------------------------------------------------------------------------\r
-#define LogHostError(HRES) __LogHostError(HRES, __FUNCTION__, __FILE__, __LINE__)\r
-static HRESULT __LogHostError(HRESULT res, const char *func, const char *file, int line)\r
-{\r
- const char *text = NULL;\r
- switch (res)\r
- {\r
- case S_OK: return res;\r
- case E_POINTER :text ="E_POINTER"; break;\r
- case E_INVALIDARG :text ="E_INVALIDARG"; break;\r
-\r
- case AUDCLNT_E_NOT_INITIALIZED :text ="AUDCLNT_E_NOT_INITIALIZED"; break;\r
- case AUDCLNT_E_ALREADY_INITIALIZED :text ="AUDCLNT_E_ALREADY_INITIALIZED"; break;\r
- case AUDCLNT_E_WRONG_ENDPOINT_TYPE :text ="AUDCLNT_E_WRONG_ENDPOINT_TYPE"; break;\r
- case AUDCLNT_E_DEVICE_INVALIDATED :text ="AUDCLNT_E_DEVICE_INVALIDATED"; break;\r
- case AUDCLNT_E_NOT_STOPPED :text ="AUDCLNT_E_NOT_STOPPED"; break;\r
- case AUDCLNT_E_BUFFER_TOO_LARGE :text ="AUDCLNT_E_BUFFER_TOO_LARGE"; break;\r
- case AUDCLNT_E_OUT_OF_ORDER :text ="AUDCLNT_E_OUT_OF_ORDER"; break;\r
- case AUDCLNT_E_UNSUPPORTED_FORMAT :text ="AUDCLNT_E_UNSUPPORTED_FORMAT"; break;\r
- case AUDCLNT_E_INVALID_SIZE :text ="AUDCLNT_E_INVALID_SIZE"; break;\r
- case AUDCLNT_E_DEVICE_IN_USE :text ="AUDCLNT_E_DEVICE_IN_USE"; break;\r
- case AUDCLNT_E_BUFFER_OPERATION_PENDING :text ="AUDCLNT_E_BUFFER_OPERATION_PENDING"; break;\r
- case AUDCLNT_E_THREAD_NOT_REGISTERED :text ="AUDCLNT_E_THREAD_NOT_REGISTERED"; break;\r
- case AUDCLNT_E_EXCLUSIVE_MODE_NOT_ALLOWED :text ="AUDCLNT_E_EXCLUSIVE_MODE_NOT_ALLOWED"; break;\r
- case AUDCLNT_E_ENDPOINT_CREATE_FAILED :text ="AUDCLNT_E_ENDPOINT_CREATE_FAILED"; break;\r
- case AUDCLNT_E_SERVICE_NOT_RUNNING :text ="AUDCLNT_E_SERVICE_NOT_RUNNING"; break;\r
- case AUDCLNT_E_EVENTHANDLE_NOT_EXPECTED :text ="AUDCLNT_E_EVENTHANDLE_NOT_EXPECTED"; break;\r
- case AUDCLNT_E_EXCLUSIVE_MODE_ONLY :text ="AUDCLNT_E_EXCLUSIVE_MODE_ONLY"; break;\r
- case AUDCLNT_E_BUFDURATION_PERIOD_NOT_EQUAL :text ="AUDCLNT_E_BUFDURATION_PERIOD_NOT_EQUAL"; break;\r
- case AUDCLNT_E_EVENTHANDLE_NOT_SET :text ="AUDCLNT_E_EVENTHANDLE_NOT_SET"; break;\r
- case AUDCLNT_E_INCORRECT_BUFFER_SIZE :text ="AUDCLNT_E_INCORRECT_BUFFER_SIZE"; break;\r
- case AUDCLNT_E_BUFFER_SIZE_ERROR :text ="AUDCLNT_E_BUFFER_SIZE_ERROR"; break;\r
- case AUDCLNT_E_CPUUSAGE_EXCEEDED :text ="AUDCLNT_E_CPUUSAGE_EXCEEDED"; break;\r
- case AUDCLNT_E_BUFFER_ERROR :text ="AUDCLNT_E_BUFFER_ERROR"; break;\r
- case AUDCLNT_E_BUFFER_SIZE_NOT_ALIGNED :text ="AUDCLNT_E_BUFFER_SIZE_NOT_ALIGNED"; break;\r
- case AUDCLNT_E_INVALID_DEVICE_PERIOD :text ="AUDCLNT_E_INVALID_DEVICE_PERIOD"; break;\r
-\r
- case AUDCLNT_S_BUFFER_EMPTY :text ="AUDCLNT_S_BUFFER_EMPTY"; break;\r
- case AUDCLNT_S_THREAD_ALREADY_REGISTERED :text ="AUDCLNT_S_THREAD_ALREADY_REGISTERED"; break;\r
- case AUDCLNT_S_POSITION_STALLED :text ="AUDCLNT_S_POSITION_STALLED"; break;\r
-\r
- // other windows common errors:\r
- case CO_E_NOTINITIALIZED :text ="CO_E_NOTINITIALIZED: you must call CoInitialize() before Pa_OpenStream()"; break;\r
-\r
- default:\r
- text = "UNKNOWN ERROR";\r
- }\r
- PRINT(("WASAPI ERROR HRESULT: 0x%X : %s\n [FUNCTION: %s FILE: %s {LINE: %d}]\n", res, text, func, file, line));\r
- PA_SKELETON_SET_LAST_HOST_ERROR(res, text);\r
- return res;\r
-}\r
-\r
-// ------------------------------------------------------------------------------------------\r
-#define LogPaError(PAERR) __LogPaError(PAERR, __FUNCTION__, __FILE__, __LINE__)\r
-static PaError __LogPaError(PaError err, const char *func, const char *file, int line)\r
-{\r
- if (err == paNoError)\r
- return err;\r
- PRINT(("WASAPI ERROR PAERROR: %i : %s\n [FUNCTION: %s FILE: %s {LINE: %d}]\n", err, Pa_GetErrorText(err), func, file, line));\r
- return err;\r
-}\r
-\r
-// ------------------------------------------------------------------------------------------\r
-/*! \class ThreadSleepScheduler\r
- Allows to emulate thread sleep of less than 1 millisecond under Windows. Scheduler\r
- calculates number of times the thread must run untill next sleep of 1 millisecond.\r
- It does not make thread sleeping for real number of microseconds but rather controls\r
- how many of imaginary microseconds the thread task can allow thread to sleep.\r
-*/\r
-typedef struct ThreadIdleScheduler\r
-{\r
- UINT32 m_idle_microseconds; //!< number of microseconds to sleep\r
- UINT32 m_next_sleep; //!< next sleep round\r
- UINT32 m_i; //!< current round iterator position\r
- UINT32 m_resolution; //!< resolution in number of milliseconds\r
-}\r
-ThreadIdleScheduler;\r
-//! Setup scheduler.\r
-static void ThreadIdleScheduler_Setup(ThreadIdleScheduler *sched, UINT32 resolution, UINT32 microseconds)\r
-{\r
- assert(microseconds != 0);\r
- assert(resolution != 0);\r
- assert((resolution * 1000) >= microseconds);\r
-\r
- memset(sched, 0, sizeof(*sched));\r
-\r
- sched->m_idle_microseconds = microseconds;\r
- sched->m_resolution = resolution;\r
- sched->m_next_sleep = (resolution * 1000) / microseconds;\r
-}\r
-//! Iterate and check if can sleep.\r
-static UINT32 ThreadIdleScheduler_NextSleep(ThreadIdleScheduler *sched)\r
-{\r
- // advance and check if thread can sleep\r
- if (++ sched->m_i == sched->m_next_sleep)\r
- {\r
- sched->m_i = 0;\r
- return sched->m_resolution;\r
- }\r
- return 0;\r
-}\r
-\r
-// ------------------------------------------------------------------------------------------\r
-/*static double nano100ToMillis(REFERENCE_TIME ref)\r
-{\r
- // 1 nano = 0.000000001 seconds\r
- //100 nano = 0.0000001 seconds\r
- //100 nano = 0.0001 milliseconds\r
- return ((double)ref)*0.0001;\r
-}*/\r
-\r
-// ------------------------------------------------------------------------------------------\r
-static double nano100ToSeconds(REFERENCE_TIME ref)\r
-{\r
- // 1 nano = 0.000000001 seconds\r
- //100 nano = 0.0000001 seconds\r
- //100 nano = 0.0001 milliseconds\r
- return ((double)ref)*0.0000001;\r
-}\r
-\r
-// ------------------------------------------------------------------------------------------\r
-/*static REFERENCE_TIME MillisTonano100(double ref)\r
-{\r
- // 1 nano = 0.000000001 seconds\r
- //100 nano = 0.0000001 seconds\r
- //100 nano = 0.0001 milliseconds\r
- return (REFERENCE_TIME)(ref/0.0001);\r
-}*/\r
-\r
-// ------------------------------------------------------------------------------------------\r
-static REFERENCE_TIME SecondsTonano100(double ref)\r
-{\r
- // 1 nano = 0.000000001 seconds\r
- //100 nano = 0.0000001 seconds\r
- //100 nano = 0.0001 milliseconds\r
- return (REFERENCE_TIME)(ref/0.0000001);\r
-}\r
-\r
-// ------------------------------------------------------------------------------------------\r
-// Makes Hns period from frames and sample rate\r
-static REFERENCE_TIME MakeHnsPeriod(UINT32 nFrames, DWORD nSamplesPerSec)\r
-{\r
- return (REFERENCE_TIME)((10000.0 * 1000 / nSamplesPerSec * nFrames) + 0.5);\r
-}\r
-\r
-// ------------------------------------------------------------------------------------------\r
-// Converts PaSampleFormat to bits per sample value\r
-static WORD PaSampleFormatToBitsPerSample(PaSampleFormat format_id)\r
-{\r
- switch (format_id & ~paNonInterleaved)\r
- {\r
- case paFloat32:\r
- case paInt32: return 32;\r
- case paInt24: return 24;\r
- case paInt16: return 16;\r
- case paInt8:\r
- case paUInt8: return 8;\r
- }\r
- return 0;\r
-}\r
-\r
-// ------------------------------------------------------------------------------------------\r
-// Converts PaSampleFormat to bits per sample value\r
-/*static WORD PaSampleFormatToBytesPerSample(PaSampleFormat format_id)\r
-{\r
- return PaSampleFormatToBitsPerSample(format_id) >> 3; // 'bits/8'\r
-}*/\r
-\r
-// ------------------------------------------------------------------------------------------\r
-// Converts Hns period into number of frames\r
-static UINT32 MakeFramesFromHns(REFERENCE_TIME hnsPeriod, UINT32 nSamplesPerSec)\r
-{\r
- UINT32 nFrames = (UINT32)( // frames =\r
- 1.0 * hnsPeriod * // hns *\r
- nSamplesPerSec / // (frames / s) /\r
- 1000 / // (ms / s) /\r
- 10000 // (hns / s) /\r
- + 0.5 // rounding\r
- );\r
- return nFrames;\r
-}\r
-\r
-// Aligning function type\r
-typedef UINT32 (*ALIGN_FUNC) (UINT32 v, UINT32 align);\r
-\r
-// ------------------------------------------------------------------------------------------\r
-// Aligns 'v' backwards\r
-static UINT32 ALIGN_BWD(UINT32 v, UINT32 align)\r
-{\r
- return ((v - (align ? v % align : 0)));\r
-}\r
-\r
-// ------------------------------------------------------------------------------------------\r
-// Aligns 'v' forward\r
-static UINT32 ALIGN_FWD(UINT32 v, UINT32 align)\r
-{\r
- UINT32 remainder = (align ? (v % align) : 0);\r
- if (remainder == 0)\r
- return v;\r
- return v + (align - remainder);\r
-}\r
-\r
-// ------------------------------------------------------------------------------------------\r
-// Get next value power of 2\r
-UINT32 ALIGN_NEXT_POW2(UINT32 v)\r
-{\r
- UINT32 v2 = 1;\r
- while (v > (v2 <<= 1)) { }\r
- v = v2;\r
- return v;\r
-}\r
-\r
-// ------------------------------------------------------------------------------------------\r
-// Aligns WASAPI buffer to 128 byte packet boundary. HD Audio will fail to play if buffer\r
-// is misaligned. This problem was solved in Windows 7 were AUDCLNT_E_BUFFER_SIZE_NOT_ALIGNED\r
-// is thrown although we must align for Vista anyway.\r
-static UINT32 AlignFramesPerBuffer(UINT32 nFrames, UINT32 nSamplesPerSec, UINT32 nBlockAlign,\r
- ALIGN_FUNC pAlignFunc)\r
-{\r
-#define HDA_PACKET_SIZE (128)\r
-\r
- long frame_bytes = nFrames * nBlockAlign;\r
- long packets;\r
-\r
- // align to packet size\r
- frame_bytes = pAlignFunc(frame_bytes, HDA_PACKET_SIZE); // use ALIGN_FWD if bigger but safer period is more desired\r
-\r
- // atlest 1 frame must be available\r
- if (frame_bytes < HDA_PACKET_SIZE)\r
- frame_bytes = HDA_PACKET_SIZE;\r
-\r
- nFrames = frame_bytes / nBlockAlign;\r
- packets = frame_bytes / HDA_PACKET_SIZE;\r
-\r
- frame_bytes = packets * HDA_PACKET_SIZE;\r
- nFrames = frame_bytes / nBlockAlign;\r
-\r
- return nFrames;\r
-\r
-#undef HDA_PACKET_SIZE\r
-}\r
-\r
-// ------------------------------------------------------------------------------------------\r
-static UINT32 GetFramesSleepTime(UINT32 nFrames, UINT32 nSamplesPerSec)\r
-{\r
- REFERENCE_TIME nDuration;\r
- if (nSamplesPerSec == 0)\r
- return 0;\r
-#define REFTIMES_PER_SEC 10000000\r
-#define REFTIMES_PER_MILLISEC 10000\r
- // Calculate the actual duration of the allocated buffer.\r
- nDuration = (REFERENCE_TIME)((double)REFTIMES_PER_SEC * nFrames / nSamplesPerSec);\r
- return (UINT32)(nDuration/REFTIMES_PER_MILLISEC/2);\r
-}\r
-\r
-// ------------------------------------------------------------------------------------------\r
-static UINT32 GetFramesSleepTimeMicroseconds(UINT32 nFrames, UINT32 nSamplesPerSec)\r
-{\r
- REFERENCE_TIME nDuration;\r
- if (nSamplesPerSec == 0)\r
- return 0;\r
-#define REFTIMES_PER_SEC 10000000\r
-#define REFTIMES_PER_MILLISEC 10000\r
- // Calculate the actual duration of the allocated buffer.\r
- nDuration = (REFERENCE_TIME)((double)REFTIMES_PER_SEC * nFrames / nSamplesPerSec);\r
- return (UINT32)(nDuration/10/2);\r
-}\r
-\r
-// ------------------------------------------------------------------------------------------\r
-static BOOL SetupAVRT()\r
-{\r
- hDInputDLL = LoadLibraryA("avrt.dll");\r
- if (hDInputDLL == NULL)\r
- return FALSE;\r
-\r
- _GetProc(pAvRtCreateThreadOrderingGroup, FAvRtCreateThreadOrderingGroup, "AvRtCreateThreadOrderingGroup");\r
- _GetProc(pAvRtDeleteThreadOrderingGroup, FAvRtDeleteThreadOrderingGroup, "AvRtDeleteThreadOrderingGroup");\r
- _GetProc(pAvRtWaitOnThreadOrderingGroup, FAvRtWaitOnThreadOrderingGroup, "AvRtWaitOnThreadOrderingGroup");\r
- _GetProc(pAvSetMmThreadCharacteristics, FAvSetMmThreadCharacteristics, "AvSetMmThreadCharacteristicsA");\r
- _GetProc(pAvRevertMmThreadCharacteristics,FAvRevertMmThreadCharacteristics,"AvRevertMmThreadCharacteristics");\r
- _GetProc(pAvSetMmThreadPriority, FAvSetMmThreadPriority, "AvSetMmThreadPriority");\r
-\r
- return pAvRtCreateThreadOrderingGroup &&\r
- pAvRtDeleteThreadOrderingGroup &&\r
- pAvRtWaitOnThreadOrderingGroup &&\r
- pAvSetMmThreadCharacteristics &&\r
- pAvRevertMmThreadCharacteristics &&\r
- pAvSetMmThreadPriority;\r
-}\r
-\r
-// ------------------------------------------------------------------------------------------\r
-static void CloseAVRT()\r
-{\r
- if (hDInputDLL != NULL)\r
- FreeLibrary(hDInputDLL);\r
- hDInputDLL = NULL;\r
-}\r
-\r
-// ------------------------------------------------------------------------------------------\r
-static BOOL IsWow64()\r
-{\r
- // http://msdn.microsoft.com/en-us/library/ms684139(VS.85).aspx\r
-\r
- typedef BOOL (WINAPI *LPFN_ISWOW64PROCESS) (HANDLE, PBOOL);\r
- LPFN_ISWOW64PROCESS fnIsWow64Process;\r
-\r
- BOOL bIsWow64 = FALSE;\r
-\r
- // IsWow64Process is not available on all supported versions of Windows.\r
- // Use GetModuleHandle to get a handle to the DLL that contains the function\r
- // and GetProcAddress to get a pointer to the function if available.\r
-\r
- fnIsWow64Process = (LPFN_ISWOW64PROCESS) GetProcAddress(\r
- GetModuleHandleA("kernel32"), "IsWow64Process");\r
-\r
- if (fnIsWow64Process == NULL)\r
- return FALSE;\r
-\r
- if (!fnIsWow64Process(GetCurrentProcess(), &bIsWow64))\r
- return FALSE;\r
-\r
- return bIsWow64;\r
-}\r
-\r
-// ------------------------------------------------------------------------------------------\r
-typedef enum EWindowsVersion\r
-{\r
- WINDOWS_UNKNOWN = 0,\r
- WINDOWS_VISTA_SERVER2008,\r
- WINDOWS_7_SERVER2008R2,\r
- WINDOWS_8_SERVER2012,\r
- WINDOWS_8_1_SERVER2012R2,\r
- WINDOWS_10_SERVER2016,\r
- WINDOWS_FUTURE\r
-}\r
-EWindowsVersion;\r
-// Alternative way for checking Windows version (allows to check version on Windows 8.1 and up)\r
-static BOOL IsWindowsVersionOrGreater(WORD wMajorVersion, WORD wMinorVersion, WORD wServicePackMajor)\r
-{\r
- typedef ULONGLONG (NTAPI *LPFN_VERSETCONDITIONMASK)(ULONGLONG ConditionMask, DWORD TypeMask, BYTE Condition);\r
- typedef BOOL (WINAPI *LPFN_VERIFYVERSIONINFO)(LPOSVERSIONINFOEXA lpVersionInformation, DWORD dwTypeMask, DWORDLONG dwlConditionMask);\r
-\r
- LPFN_VERSETCONDITIONMASK fnVerSetConditionMask;\r
- LPFN_VERIFYVERSIONINFO fnVerifyVersionInfo;\r
- OSVERSIONINFOEXA osvi = { sizeof(osvi), 0, 0, 0, 0, {0}, 0, 0 };\r
- DWORDLONG dwlConditionMask;\r
-\r
- fnVerSetConditionMask = (LPFN_VERSETCONDITIONMASK)GetProcAddress(GetModuleHandleA("kernel32"), "VerSetConditionMask");\r
- fnVerifyVersionInfo = (LPFN_VERIFYVERSIONINFO)GetProcAddress(GetModuleHandleA("kernel32"), "VerifyVersionInfoA");\r
-\r
- if ((fnVerSetConditionMask == NULL) || (fnVerifyVersionInfo == NULL))\r
- return FALSE;\r
-\r
- dwlConditionMask = fnVerSetConditionMask(\r
- fnVerSetConditionMask(\r
- fnVerSetConditionMask(\r
- 0, VER_MAJORVERSION, VER_GREATER_EQUAL),\r
- VER_MINORVERSION, VER_GREATER_EQUAL),\r
- VER_SERVICEPACKMAJOR, VER_GREATER_EQUAL);\r
-\r
- osvi.dwMajorVersion = wMajorVersion;\r
- osvi.dwMinorVersion = wMinorVersion;\r
- osvi.wServicePackMajor = wServicePackMajor;\r
-\r
- return (fnVerifyVersionInfo(&osvi, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR, dwlConditionMask) != FALSE);\r
-}\r
-// Get Windows version\r
-static EWindowsVersion GetWindowsVersion()\r
-{\r
- static EWindowsVersion version = WINDOWS_UNKNOWN;\r
-\r
- if (version == WINDOWS_UNKNOWN)\r
- {\r
- DWORD dwVersion = 0;\r
- DWORD dwMajorVersion = 0;\r
- DWORD dwMinorVersion = 0;\r
- DWORD dwBuild = 0;\r
-\r
- typedef DWORD (WINAPI *LPFN_GETVERSION)(VOID);\r
- LPFN_GETVERSION fnGetVersion;\r
-\r
- fnGetVersion = (LPFN_GETVERSION)GetProcAddress(GetModuleHandleA("kernel32"), "GetVersion");\r
- if (fnGetVersion != NULL)\r
- {\r
- PRINT(("WASAPI: getting Windows version with GetVersion()\n"));\r
-\r
- dwVersion = fnGetVersion();\r
-\r
- // Get the Windows version\r
- dwMajorVersion = (DWORD)(LOBYTE(LOWORD(dwVersion)));\r
- dwMinorVersion = (DWORD)(HIBYTE(LOWORD(dwVersion)));\r
-\r
- // Get the build number\r
- if (dwVersion < 0x80000000)\r
- dwBuild = (DWORD)(HIWORD(dwVersion));\r
-\r
- switch (dwMajorVersion)\r
- {\r
- case 0:\r
- case 1:\r
- case 2:\r
- case 3:\r
- case 4:\r
- case 5:\r
- break; // skip lower\r
- case 6:\r
- switch (dwMinorVersion)\r
- {\r
- case 0: version = WINDOWS_VISTA_SERVER2008; break;\r
- case 1: version = WINDOWS_7_SERVER2008R2; break;\r
- case 2: version = WINDOWS_8_SERVER2012; break;\r
- case 3: version = WINDOWS_8_1_SERVER2012R2; break;\r
- default: version = WINDOWS_FUTURE; break;\r
- }\r
- break;\r
- case 10:\r
- switch (dwMinorVersion)\r
- {\r
- case 0: version = WINDOWS_10_SERVER2016; break;\r
- default: version = WINDOWS_FUTURE; break;\r
- }\r
- break;\r
- default:\r
- version = WINDOWS_FUTURE;\r
- break;\r
- }\r
- }\r
- else\r
- {\r
- PRINT(("WASAPI: getting Windows version with VerifyVersionInfo()\n"));\r
-\r
- if (IsWindowsVersionOrGreater(10, 0, 0))\r
- version = WINDOWS_10_SERVER2016;\r
- else\r
- if (IsWindowsVersionOrGreater(6, 3, 0))\r
- version = WINDOWS_8_1_SERVER2012R2;\r
- else\r
- if (IsWindowsVersionOrGreater(6, 2, 0))\r
- version = WINDOWS_8_SERVER2012;\r
- else\r
- if (IsWindowsVersionOrGreater(6, 1, 0))\r
- version = WINDOWS_7_SERVER2008R2;\r
- else\r
- if (IsWindowsVersionOrGreater(6, 0, 0))\r
- version = WINDOWS_VISTA_SERVER2008;\r
- else\r
- version = WINDOWS_FUTURE;\r
- }\r
-\r
- PRINT(("WASAPI: Windows version = %d\n", version));\r
- }\r
-\r
- return version;\r
-}\r
-\r
-// ------------------------------------------------------------------------------------------\r
-static BOOL UseWOW64Workaround()\r
-{\r
- // note: WOW64 bug is common to Windows Vista x64, thus we fall back to safe Poll-driven\r
- // method. Windows 7 x64 seems has WOW64 bug fixed.\r
-\r
- return (IsWow64() && (GetWindowsVersion() == WINDOWS_VISTA_SERVER2008));\r
-}\r
-\r
-// ------------------------------------------------------------------------------------------\r
-static UINT32 GetAudioClientVersion()\r
-{\r
- if (GetWindowsVersion() >= WINDOWS_10_SERVER2016)\r
- return 3;\r
- else\r
- if (GetWindowsVersion() >= WINDOWS_8_SERVER2012)\r
- return 2;\r
-\r
- return 1;\r
-}\r
-\r
-// ------------------------------------------------------------------------------------------\r
-static const IID *GetAudioClientIID()\r
-{\r
- static const IID *cli_iid = NULL;\r
- if (cli_iid == NULL)\r
- {\r
- UINT32 cli_version = GetAudioClientVersion();\r
- if (cli_version <= 1)\r
- {\r
- cli_iid = &pa_IID_IAudioClient;\r
- }\r
- else\r
- {\r
- switch (cli_version)\r
- {\r
- case 3: cli_iid = &pa_IID_IAudioClient2; cli_version = 2; break; // use IAudioClient2 for Windows 10+ until IAudioClient3 functions are required\r
- default: cli_iid = &pa_IID_IAudioClient2; cli_version = 2; break;\r
- }\r
- }\r
-\r
- PRINT(("WASAPI: IAudioClient version = %d\n", cli_version));\r
- }\r
-\r
- return cli_iid;\r
-}\r
-\r
-// ------------------------------------------------------------------------------------------\r
-typedef enum EMixerDir { MIX_DIR__1TO2, MIX_DIR__2TO1, MIX_DIR__2TO1_L } EMixerDir;\r
-\r
-// ------------------------------------------------------------------------------------------\r
-#define _WASAPI_MONO_TO_STEREO_MIXER_1_TO_2(TYPE)\\r
- TYPE * __restrict to = __to;\\r
- TYPE * __restrict from = __from;\\r
- TYPE * __restrict end = from + count;\\r
- while (from != end)\\r
- {\\r
- *to ++ = *from;\\r
- *to ++ = *from;\\r
- ++ from;\\r
- }\r
-\r
-// ------------------------------------------------------------------------------------------\r
-#define _WASAPI_MONO_TO_STEREO_MIXER_2_TO_1_FLT32(TYPE)\\r
- TYPE * __restrict to = (TYPE *)__to;\\r
- TYPE * __restrict from = (TYPE *)__from;\\r
- TYPE * __restrict end = to + count;\\r
- while (to != end)\\r
- {\\r
- *to ++ = (TYPE)((float)(from[0] + from[1]) * 0.5f);\\r
- from += 2;\\r
- }\r
-\r
-// ------------------------------------------------------------------------------------------\r
-#define _WASAPI_MONO_TO_STEREO_MIXER_2_TO_1_INT32(TYPE)\\r
- TYPE * __restrict to = (TYPE *)__to;\\r
- TYPE * __restrict from = (TYPE *)__from;\\r
- TYPE * __restrict end = to + count;\\r
- while (to != end)\\r
- {\\r
- *to ++ = (TYPE)(((INT32)from[0] + (INT32)from[1]) >> 1);\\r
- from += 2;\\r
- }\r
-\r
-// ------------------------------------------------------------------------------------------\r
-#define _WASAPI_MONO_TO_STEREO_MIXER_2_TO_1_INT64(TYPE)\\r
- TYPE * __restrict to = (TYPE *)__to;\\r
- TYPE * __restrict from = (TYPE *)__from;\\r
- TYPE * __restrict end = to + count;\\r
- while (to != end)\\r
- {\\r
- *to ++ = (TYPE)(((INT64)from[0] + (INT64)from[1]) >> 1);\\r
- from += 2;\\r
- }\r
-\r
-// ------------------------------------------------------------------------------------------\r
-#define _WASAPI_MONO_TO_STEREO_MIXER_2_TO_1_L(TYPE)\\r
- TYPE * __restrict to = (TYPE *)__to;\\r
- TYPE * __restrict from = (TYPE *)__from;\\r
- TYPE * __restrict end = to + count;\\r
- while (to != end)\\r
- {\\r
- *to ++ = from[0];\\r
- from += 2;\\r
- }\r
-\r
-// ------------------------------------------------------------------------------------------\r
-static void _MixMonoToStereo_1TO2_8(void *__to, void *__from, UINT32 count) { _WASAPI_MONO_TO_STEREO_MIXER_1_TO_2(BYTE); }\r
-static void _MixMonoToStereo_1TO2_16(void *__to, void *__from, UINT32 count) { _WASAPI_MONO_TO_STEREO_MIXER_1_TO_2(short); }\r
-static void _MixMonoToStereo_1TO2_24(void *__to, void *__from, UINT32 count) { _WASAPI_MONO_TO_STEREO_MIXER_1_TO_2(int); /* !!! int24 data is contained in 32-bit containers*/ }\r
-static void _MixMonoToStereo_1TO2_32(void *__to, void *__from, UINT32 count) { _WASAPI_MONO_TO_STEREO_MIXER_1_TO_2(int); }\r
-static void _MixMonoToStereo_1TO2_32f(void *__to, void *__from, UINT32 count) { _WASAPI_MONO_TO_STEREO_MIXER_1_TO_2(float); }\r
-\r
-// ------------------------------------------------------------------------------------------\r
-static void _MixMonoToStereo_2TO1_8(void *__to, void *__from, UINT32 count) { _WASAPI_MONO_TO_STEREO_MIXER_2_TO_1_INT32(BYTE); }\r
-static void _MixMonoToStereo_2TO1_16(void *__to, void *__from, UINT32 count) { _WASAPI_MONO_TO_STEREO_MIXER_2_TO_1_INT32(short); }\r
-static void _MixMonoToStereo_2TO1_24(void *__to, void *__from, UINT32 count) { _WASAPI_MONO_TO_STEREO_MIXER_2_TO_1_INT32(int); /* !!! int24 data is contained in 32-bit containers*/ }\r
-static void _MixMonoToStereo_2TO1_32(void *__to, void *__from, UINT32 count) { _WASAPI_MONO_TO_STEREO_MIXER_2_TO_1_INT64(int); }\r
-static void _MixMonoToStereo_2TO1_32f(void *__to, void *__from, UINT32 count) { _WASAPI_MONO_TO_STEREO_MIXER_2_TO_1_FLT32(float); }\r
-\r
-// ------------------------------------------------------------------------------------------\r
-static void _MixMonoToStereo_2TO1_8_L(void *__to, void *__from, UINT32 count) { _WASAPI_MONO_TO_STEREO_MIXER_2_TO_1_L(BYTE); }\r
-static void _MixMonoToStereo_2TO1_16_L(void *__to, void *__from, UINT32 count) { _WASAPI_MONO_TO_STEREO_MIXER_2_TO_1_L(short); }\r
-static void _MixMonoToStereo_2TO1_24_L(void *__to, void *__from, UINT32 count) { _WASAPI_MONO_TO_STEREO_MIXER_2_TO_1_L(int); /* !!! int24 data is contained in 32-bit containers*/ }\r
-static void _MixMonoToStereo_2TO1_32_L(void *__to, void *__from, UINT32 count) { _WASAPI_MONO_TO_STEREO_MIXER_2_TO_1_L(int); }\r
-static void _MixMonoToStereo_2TO1_32f_L(void *__to, void *__from, UINT32 count) { _WASAPI_MONO_TO_STEREO_MIXER_2_TO_1_L(float); }\r
-\r
-// ------------------------------------------------------------------------------------------\r
-static MixMonoToStereoF _GetMonoToStereoMixer(PaSampleFormat format, EMixerDir dir)\r
-{\r
- switch (dir)\r
- {\r
- case MIX_DIR__1TO2:\r
- switch (format & ~paNonInterleaved)\r
- {\r
- case paUInt8: return _MixMonoToStereo_1TO2_8;\r
- case paInt16: return _MixMonoToStereo_1TO2_16;\r
- case paInt24: return _MixMonoToStereo_1TO2_24;\r
- case paInt32: return _MixMonoToStereo_1TO2_32;\r
- case paFloat32: return _MixMonoToStereo_1TO2_32f;\r
- }\r
- break;\r
-\r
- case MIX_DIR__2TO1:\r
- switch (format & ~paNonInterleaved)\r
- {\r
- case paUInt8: return _MixMonoToStereo_2TO1_8;\r
- case paInt16: return _MixMonoToStereo_2TO1_16;\r
- case paInt24: return _MixMonoToStereo_2TO1_24;\r
- case paInt32: return _MixMonoToStereo_2TO1_32;\r
- case paFloat32: return _MixMonoToStereo_2TO1_32f;\r
- }\r
- break;\r
-\r
- case MIX_DIR__2TO1_L:\r
- switch (format & ~paNonInterleaved)\r
- {\r
- case paUInt8: return _MixMonoToStereo_2TO1_8_L;\r
- case paInt16: return _MixMonoToStereo_2TO1_16_L;\r
- case paInt24: return _MixMonoToStereo_2TO1_24_L;\r
- case paInt32: return _MixMonoToStereo_2TO1_32_L;\r
- case paFloat32: return _MixMonoToStereo_2TO1_32f_L;\r
- }\r
- break;\r
- }\r
-\r
- return NULL;\r
-}\r
-\r
-// ------------------------------------------------------------------------------------------\r
-PaError PaWasapi_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex hostApiIndex )\r
-{\r
- PaError result = paNoError;\r
- PaWasapiHostApiRepresentation *paWasapi;\r
- PaDeviceInfo *deviceInfoArray;\r
- HRESULT hr = S_OK;\r
- IMMDeviceCollection* pEndPoints = NULL;\r
- UINT i;\r
-\r
- if (!SetupAVRT())\r
- {\r
- PRINT(("WASAPI: No AVRT! (not VISTA?)"));\r
- return paNoError;\r
- }\r
-\r
- paWasapi = (PaWasapiHostApiRepresentation *)PaUtil_AllocateMemory( sizeof(PaWasapiHostApiRepresentation) );\r
- if (paWasapi == NULL)\r
- {\r
- result = paInsufficientMemory;\r
- goto error;\r
- }\r
- \r
- memset( paWasapi, 0, sizeof(PaWasapiHostApiRepresentation) ); /* ensure all fields are zeroed. especially paWasapi->allocations */\r
-\r
- result = PaWinUtil_CoInitialize( paWASAPI, &paWasapi->comInitializationResult );\r
- if( result != paNoError )\r
- {\r
- goto error;\r
- }\r
-\r
- paWasapi->allocations = PaUtil_CreateAllocationGroup();\r
- if (paWasapi->allocations == NULL)\r
- {\r
- result = paInsufficientMemory;\r
- goto error;\r
- }\r
-\r
- *hostApi = &paWasapi->inheritedHostApiRep;\r
- (*hostApi)->info.structVersion = 1;\r
- (*hostApi)->info.type = paWASAPI;\r
- (*hostApi)->info.name = "Windows WASAPI";\r
- (*hostApi)->info.deviceCount = 0;\r
- (*hostApi)->info.defaultInputDevice = paNoDevice;\r
- (*hostApi)->info.defaultOutputDevice = paNoDevice;\r
-\r
- paWasapi->enumerator = NULL;\r
- hr = CoCreateInstance(&pa_CLSID_IMMDeviceEnumerator, NULL, CLSCTX_INPROC_SERVER,\r
- &pa_IID_IMMDeviceEnumerator, (void **)&paWasapi->enumerator);\r
- \r
- // We need to set the result to a value otherwise we will return paNoError\r
- // [IF_FAILED_JUMP(hResult, error);]\r
- IF_FAILED_INTERNAL_ERROR_JUMP(hr, result, error);\r
-\r
- // getting default device ids in the eMultimedia "role"\r
- {\r
- {\r
- IMMDevice *defaultRenderer = NULL;\r
- hr = IMMDeviceEnumerator_GetDefaultAudioEndpoint(paWasapi->enumerator, eRender, eMultimedia, &defaultRenderer);\r
- if (hr != S_OK)\r
- {\r
- if (hr != E_NOTFOUND) {\r
- // We need to set the result to a value otherwise we will return paNoError\r
- // [IF_FAILED_JUMP(hResult, error);]\r
- IF_FAILED_INTERNAL_ERROR_JUMP(hr, result, error);\r
- }\r
- }\r
- else\r
- {\r
- WCHAR *pszDeviceId = NULL;\r
- hr = IMMDevice_GetId(defaultRenderer, &pszDeviceId);\r
- // We need to set the result to a value otherwise we will return paNoError\r
- // [IF_FAILED_JUMP(hResult, error);]\r
- IF_FAILED_INTERNAL_ERROR_JUMP(hr, result, error);\r
- wcsncpy(paWasapi->defaultRenderer, pszDeviceId, MAX_STR_LEN-1);\r
- CoTaskMemFree(pszDeviceId);\r
- IMMDevice_Release(defaultRenderer);\r
- }\r
- }\r
-\r
- {\r
- IMMDevice *defaultCapturer = NULL;\r
- hr = IMMDeviceEnumerator_GetDefaultAudioEndpoint(paWasapi->enumerator, eCapture, eMultimedia, &defaultCapturer);\r
- if (hr != S_OK)\r
- {\r
- if (hr != E_NOTFOUND) {\r
- // We need to set the result to a value otherwise we will return paNoError\r
- // [IF_FAILED_JUMP(hResult, error);]\r
- IF_FAILED_INTERNAL_ERROR_JUMP(hr, result, error);\r
- }\r
- }\r
- else\r
- {\r
- WCHAR *pszDeviceId = NULL;\r
- hr = IMMDevice_GetId(defaultCapturer, &pszDeviceId);\r
- // We need to set the result to a value otherwise we will return paNoError\r
- // [IF_FAILED_JUMP(hResult, error);]\r
- IF_FAILED_INTERNAL_ERROR_JUMP(hr, result, error);\r
- wcsncpy(paWasapi->defaultCapturer, pszDeviceId, MAX_STR_LEN-1);\r
- CoTaskMemFree(pszDeviceId);\r
- IMMDevice_Release(defaultCapturer);\r
- }\r
- }\r
- }\r
-\r
- hr = IMMDeviceEnumerator_EnumAudioEndpoints(paWasapi->enumerator, eAll, DEVICE_STATE_ACTIVE, &pEndPoints);\r
- // We need to set the result to a value otherwise we will return paNoError\r
- // [IF_FAILED_JUMP(hResult, error);]\r
- IF_FAILED_INTERNAL_ERROR_JUMP(hr, result, error);\r
-\r
- hr = IMMDeviceCollection_GetCount(pEndPoints, &paWasapi->deviceCount);\r
- // We need to set the result to a value otherwise we will return paNoError\r
- // [IF_FAILED_JUMP(hResult, error);]\r
- IF_FAILED_INTERNAL_ERROR_JUMP(hr, result, error);\r
-\r
- paWasapi->devInfo = (PaWasapiDeviceInfo *)PaUtil_AllocateMemory(sizeof(PaWasapiDeviceInfo) * paWasapi->deviceCount);\r
- if (paWasapi->devInfo == NULL)\r
- {\r
- result = paInsufficientMemory;\r
- goto error;\r
- }\r
- for (i = 0; i < paWasapi->deviceCount; ++i)\r
- memset(&paWasapi->devInfo[i], 0, sizeof(PaWasapiDeviceInfo));\r
-\r
- if (paWasapi->deviceCount > 0)\r
- {\r
- (*hostApi)->deviceInfos = (PaDeviceInfo **)PaUtil_GroupAllocateMemory(\r
- paWasapi->allocations, sizeof(PaDeviceInfo *) * paWasapi->deviceCount);\r
- if ((*hostApi)->deviceInfos == NULL)\r
- {\r
- result = paInsufficientMemory;\r
- goto error;\r
- }\r
-\r
- /* allocate all device info structs in a contiguous block */\r
- deviceInfoArray = (PaDeviceInfo *)PaUtil_GroupAllocateMemory(\r
- paWasapi->allocations, sizeof(PaDeviceInfo) * paWasapi->deviceCount);\r
- if (deviceInfoArray == NULL)\r
- {\r
- result = paInsufficientMemory;\r
- goto error;\r
- }\r
-\r
- for (i = 0; i < paWasapi->deviceCount; ++i)\r
- {\r
- DWORD state = 0;\r
- PaDeviceInfo *deviceInfo = &deviceInfoArray[i];\r
- deviceInfo->structVersion = 2;\r
- deviceInfo->hostApi = hostApiIndex;\r
-\r
- PA_DEBUG(("WASAPI: device idx: %02d\n", i));\r
- PA_DEBUG(("WASAPI: ---------------\n"));\r
-\r
- hr = IMMDeviceCollection_Item(pEndPoints, i, &paWasapi->devInfo[i].device);\r
- // We need to set the result to a value otherwise we will return paNoError\r
- // [IF_FAILED_JUMP(hResult, error);]\r
- IF_FAILED_INTERNAL_ERROR_JUMP(hr, result, error);\r
-\r
- // getting ID\r
- {\r
- WCHAR *pszDeviceId = NULL;\r
- hr = IMMDevice_GetId(paWasapi->devInfo[i].device, &pszDeviceId);\r
- // We need to set the result to a value otherwise we will return paNoError\r
- // [IF_FAILED_JUMP(hr, error);]\r
- IF_FAILED_INTERNAL_ERROR_JUMP(hr, result, error);\r
- wcsncpy(paWasapi->devInfo[i].szDeviceID, pszDeviceId, MAX_STR_LEN-1);\r
- CoTaskMemFree(pszDeviceId);\r
-\r
- if (lstrcmpW(paWasapi->devInfo[i].szDeviceID, paWasapi->defaultCapturer) == 0)\r
- {// we found the default input!\r
- (*hostApi)->info.defaultInputDevice = (*hostApi)->info.deviceCount;\r
- }\r
- if (lstrcmpW(paWasapi->devInfo[i].szDeviceID, paWasapi->defaultRenderer) == 0)\r
- {// we found the default output!\r
- (*hostApi)->info.defaultOutputDevice = (*hostApi)->info.deviceCount;\r
- }\r
- }\r
-\r
- hr = IMMDevice_GetState(paWasapi->devInfo[i].device, &paWasapi->devInfo[i].state);\r
- // We need to set the result to a value otherwise we will return paNoError\r
- // [IF_FAILED_JUMP(hResult, error);]\r
- IF_FAILED_INTERNAL_ERROR_JUMP(hr, result, error);\r
-\r
- if (paWasapi->devInfo[i].state != DEVICE_STATE_ACTIVE)\r
- {\r
- PRINT(("WASAPI device: %d is not currently available (state:%d)\n",i,state));\r
- }\r
-\r
- {\r
- IPropertyStore *pProperty;\r
- hr = IMMDevice_OpenPropertyStore(paWasapi->devInfo[i].device, STGM_READ, &pProperty);\r
- // We need to set the result to a value otherwise we will return paNoError\r
- // [IF_FAILED_JUMP(hResult, error);]\r
- IF_FAILED_INTERNAL_ERROR_JUMP(hr, result, error);\r
-\r
- // "Friendly" Name\r
- {\r
- char *deviceName;\r
- PROPVARIANT value;\r
- PropVariantInit(&value);\r
- hr = IPropertyStore_GetValue(pProperty, &PKEY_Device_FriendlyName, &value);\r
- // We need to set the result to a value otherwise we will return paNoError\r
- // [IF_FAILED_JUMP(hResult, error);]\r
- IF_FAILED_INTERNAL_ERROR_JUMP(hr, result, error);\r
- deviceInfo->name = NULL;\r
- deviceName = (char *)PaUtil_GroupAllocateMemory(paWasapi->allocations, MAX_STR_LEN + 1);\r
- if (deviceName == NULL)\r
- {\r
- result = paInsufficientMemory;\r
- goto error;\r
- }\r
- if (value.pwszVal)\r
- WideCharToMultiByte(CP_UTF8, 0, value.pwszVal, (int)wcslen(value.pwszVal), deviceName, MAX_STR_LEN-1, 0, 0);\r
- else\r
- _snprintf(deviceName, MAX_STR_LEN-1, "baddev%d", i);\r
- deviceInfo->name = deviceName;\r
- PropVariantClear(&value);\r
- PA_DEBUG(("WASAPI:%d| name[%s]\n", i, deviceInfo->name));\r
- }\r
-\r
- // Default format\r
- {\r
- PROPVARIANT value;\r
- PropVariantInit(&value);\r
- hr = IPropertyStore_GetValue(pProperty, &PKEY_AudioEngine_DeviceFormat, &value);\r
- // We need to set the result to a value otherwise we will return paNoError\r
- // [IF_FAILED_JUMP(hResult, error);]\r
- IF_FAILED_INTERNAL_ERROR_JUMP(hr, result, error);\r
- memcpy(&paWasapi->devInfo[i].DefaultFormat, value.blob.pBlobData, min(sizeof(paWasapi->devInfo[i].DefaultFormat), value.blob.cbSize));\r
- // cleanup\r
- PropVariantClear(&value);\r
- }\r
-\r
- // Formfactor\r
- {\r
- PROPVARIANT value;\r
- PropVariantInit(&value);\r
- hr = IPropertyStore_GetValue(pProperty, &PKEY_AudioEndpoint_FormFactor, &value);\r
- // We need to set the result to a value otherwise we will return paNoError\r
- // [IF_FAILED_JUMP(hResult, error);]\r
- IF_FAILED_INTERNAL_ERROR_JUMP(hr, result, error);\r
- // set\r
- #if defined(DUMMYUNIONNAME) && defined(NONAMELESSUNION)\r
- // avoid breaking strict-aliasing rules in such line: (EndpointFormFactor)(*((UINT *)(((WORD *)&value.wReserved3)+1)));\r
- UINT v;\r
- memcpy(&v, (((WORD *)&value.wReserved3)+1), sizeof(v));\r
- paWasapi->devInfo[i].formFactor = (EndpointFormFactor)v;\r
- #else\r
- paWasapi->devInfo[i].formFactor = (EndpointFormFactor)value.uintVal;\r
- #endif\r
- PA_DEBUG(("WASAPI:%d| form-factor[%d]\n", i, paWasapi->devInfo[i].formFactor));\r
- // cleanup\r
- PropVariantClear(&value);\r
- }\r
-\r
- SAFE_RELEASE(pProperty);\r
- }\r
-\r
-\r
- // Endpoint data\r
- {\r
- IMMEndpoint *endpoint = NULL;\r
- hr = IMMDevice_QueryInterface(paWasapi->devInfo[i].device, &pa_IID_IMMEndpoint, (void **)&endpoint);\r
- if (SUCCEEDED(hr))\r
- {\r
- hr = IMMEndpoint_GetDataFlow(endpoint, &paWasapi->devInfo[i].flow);\r
- SAFE_RELEASE(endpoint);\r
- }\r
- }\r
-\r
- // Getting a temporary IAudioClient for more fields\r
- // we make sure NOT to call Initialize yet!\r
- {\r
- IAudioClient *tmpClient = NULL;\r
-\r
- hr = IMMDevice_Activate(paWasapi->devInfo[i].device, GetAudioClientIID(),\r
- CLSCTX_INPROC_SERVER, NULL, (void **)&tmpClient);\r
- // We need to set the result to a value otherwise we will return paNoError\r
- // [IF_FAILED_JUMP(hResult, error);]\r
- IF_FAILED_INTERNAL_ERROR_JUMP(hr, result, error);\r
-\r
- hr = IAudioClient_GetDevicePeriod(tmpClient,\r
- &paWasapi->devInfo[i].DefaultDevicePeriod,\r
- &paWasapi->devInfo[i].MinimumDevicePeriod);\r
- if (FAILED(hr))\r
- {\r
- PA_DEBUG(("WASAPI:%d| failed getting min/default periods by IAudioClient::GetDevicePeriod() with error[%08X], will use 30000/100000 hns\n", i, (UINT32)hr));\r
-\r
- // assign WASAPI common values\r
- paWasapi->devInfo[i].DefaultDevicePeriod = 100000;\r
- paWasapi->devInfo[i].MinimumDevicePeriod = 30000;\r
-\r
- // ignore error, let continue further without failing with paInternalError\r
- hr = S_OK;\r
- }\r
-\r
- //hr = tmpClient->GetMixFormat(&paWasapi->devInfo[i].MixFormat);\r
-\r
- // Release client\r
- SAFE_RELEASE(tmpClient);\r
-\r
- if (hr != S_OK)\r
- {\r
- //davidv: this happened with my hardware, previously for that same device in DirectSound:\r
- //Digital Output (Realtek AC'97 Audio)'s GUID: {0x38f2cf50,0x7b4c,0x4740,0x86,0xeb,0xd4,0x38,0x66,0xd8,0xc8, 0x9f}\r
- //so something must be _really_ wrong with this device, TODO handle this better. We kind of need GetMixFormat\r
- LogHostError(hr);\r
- // We need to set the result to a value otherwise we will return paNoError\r
- result = paInternalError;\r
- goto error;\r
- }\r
- }\r
-\r
- // we can now fill in portaudio device data\r
- deviceInfo->maxInputChannels = 0;\r
- deviceInfo->maxOutputChannels = 0;\r
- deviceInfo->defaultSampleRate = paWasapi->devInfo[i].DefaultFormat.Format.nSamplesPerSec;\r
- switch (paWasapi->devInfo[i].flow)\r
- {\r
- case eRender: {\r
- deviceInfo->maxOutputChannels = paWasapi->devInfo[i].DefaultFormat.Format.nChannels;\r
- deviceInfo->defaultHighOutputLatency = nano100ToSeconds(paWasapi->devInfo[i].DefaultDevicePeriod);\r
- deviceInfo->defaultLowOutputLatency = nano100ToSeconds(paWasapi->devInfo[i].MinimumDevicePeriod);\r
- PA_DEBUG(("WASAPI:%d| def.SR[%d] max.CH[%d] latency{hi[%f] lo[%f]}\n", i, (UINT32)deviceInfo->defaultSampleRate,\r
- deviceInfo->maxOutputChannels, (float)deviceInfo->defaultHighOutputLatency, (float)deviceInfo->defaultLowOutputLatency));\r
- break;}\r
- case eCapture: {\r
- deviceInfo->maxInputChannels = paWasapi->devInfo[i].DefaultFormat.Format.nChannels;\r
- deviceInfo->defaultHighInputLatency = nano100ToSeconds(paWasapi->devInfo[i].DefaultDevicePeriod);\r
- deviceInfo->defaultLowInputLatency = nano100ToSeconds(paWasapi->devInfo[i].MinimumDevicePeriod);\r
- PA_DEBUG(("WASAPI:%d| def.SR[%d] max.CH[%d] latency{hi[%f] lo[%f]}\n", i, (UINT32)deviceInfo->defaultSampleRate,\r
- deviceInfo->maxInputChannels, (float)deviceInfo->defaultHighInputLatency, (float)deviceInfo->defaultLowInputLatency));\r
- break; }\r
- default:\r
- PRINT(("WASAPI:%d| bad Data Flow!\n", i));\r
- // We need to set the result to a value otherwise we will return paNoError\r
- result = paInternalError;\r
- //continue; // do not skip from list, allow to initialize\r
- break;\r
- }\r
-\r
- (*hostApi)->deviceInfos[i] = deviceInfo;\r
- ++(*hostApi)->info.deviceCount;\r
- }\r
- }\r
-\r
- (*hostApi)->Terminate = Terminate;\r
- (*hostApi)->OpenStream = OpenStream;\r
- (*hostApi)->IsFormatSupported = IsFormatSupported;\r
-\r
- PaUtil_InitializeStreamInterface( &paWasapi->callbackStreamInterface, CloseStream, StartStream,\r
- StopStream, AbortStream, IsStreamStopped, IsStreamActive,\r
- GetStreamTime, GetStreamCpuLoad,\r
- PaUtil_DummyRead, PaUtil_DummyWrite,\r
- PaUtil_DummyGetReadAvailable, PaUtil_DummyGetWriteAvailable );\r
-\r
- PaUtil_InitializeStreamInterface( &paWasapi->blockingStreamInterface, CloseStream, StartStream,\r
- StopStream, AbortStream, IsStreamStopped, IsStreamActive,\r
- GetStreamTime, PaUtil_DummyGetCpuLoad,\r
- ReadStream, WriteStream, GetStreamReadAvailable, GetStreamWriteAvailable );\r
-\r
-\r
- // findout if platform workaround is required\r
- paWasapi->useWOW64Workaround = UseWOW64Workaround();\r
-\r
- SAFE_RELEASE(pEndPoints);\r
-\r
- PRINT(("WASAPI: initialized ok\n"));\r
-\r
- return paNoError;\r
-\r
-error:\r
-\r
- PRINT(("WASAPI: failed %s error[%d|%s]\n", __FUNCTION__, result, Pa_GetErrorText(result)));\r
-\r
- SAFE_RELEASE(pEndPoints);\r
-\r
- Terminate((PaUtilHostApiRepresentation *)paWasapi);\r
-\r
- // Safety if error was not set so that we do not think initialize was a success\r
- if (result == paNoError) {\r
- result = paInternalError;\r
- }\r
-\r
- return result;\r
-}\r
-\r
-// ------------------------------------------------------------------------------------------\r
-static void Terminate( PaUtilHostApiRepresentation *hostApi )\r
-{\r
- UINT i;\r
- PaWasapiHostApiRepresentation *paWasapi = (PaWasapiHostApiRepresentation*)hostApi;\r
- if (paWasapi == NULL)\r
- return;\r
-\r
- // Release IMMDeviceEnumerator\r
- SAFE_RELEASE(paWasapi->enumerator);\r
-\r
- for (i = 0; i < paWasapi->deviceCount; ++i)\r
- {\r
- PaWasapiDeviceInfo *info = &paWasapi->devInfo[i];\r
- SAFE_RELEASE(info->device);\r
-\r
- //if (info->MixFormat)\r
- // CoTaskMemFree(info->MixFormat);\r
- }\r
- PaUtil_FreeMemory(paWasapi->devInfo);\r
-\r
- if (paWasapi->allocations)\r
- {\r
- PaUtil_FreeAllAllocations(paWasapi->allocations);\r
- PaUtil_DestroyAllocationGroup(paWasapi->allocations);\r
- }\r
-\r
- PaWinUtil_CoUninitialize( paWASAPI, &paWasapi->comInitializationResult );\r
-\r
- PaUtil_FreeMemory(paWasapi);\r
-\r
- // Close AVRT\r
- CloseAVRT();\r
-}\r
-\r
-// ------------------------------------------------------------------------------------------\r
-static PaWasapiHostApiRepresentation *_GetHostApi(PaError *_error)\r
-{\r
- PaError error;\r
-\r
- PaUtilHostApiRepresentation *pApi;\r
- if ((error = PaUtil_GetHostApiRepresentation(&pApi, paWASAPI)) != paNoError)\r
- {\r
- if (_error != NULL)\r
- (*_error) = error;\r
-\r
- return NULL;\r
- }\r
- return (PaWasapiHostApiRepresentation *)pApi;\r
-}\r
-\r
-// ------------------------------------------------------------------------------------------\r
-int PaWasapi_GetDeviceDefaultFormat( void *pFormat, unsigned int nFormatSize, PaDeviceIndex nDevice )\r
-{\r
- PaError ret;\r
- PaWasapiHostApiRepresentation *paWasapi;\r
- UINT32 size;\r
- PaDeviceIndex index;\r
-\r
- if (pFormat == NULL)\r
- return paBadBufferPtr;\r
- if (nFormatSize <= 0)\r
- return paBufferTooSmall;\r
-\r
- // Get API\r
- paWasapi = _GetHostApi(&ret);\r
- if (paWasapi == NULL)\r
- return ret;\r
-\r
- // Get device index\r
- ret = PaUtil_DeviceIndexToHostApiDeviceIndex(&index, nDevice, &paWasapi->inheritedHostApiRep);\r
- if (ret != paNoError)\r
- return ret;\r
-\r
- // Validate index\r
- if ((UINT32)index >= paWasapi->deviceCount)\r
- return paInvalidDevice;\r
-\r
- size = min(nFormatSize, (UINT32)sizeof(paWasapi->devInfo[ index ].DefaultFormat));\r
- memcpy(pFormat, &paWasapi->devInfo[ index ].DefaultFormat, size);\r
-\r
- return size;\r
-}\r
-\r
-// ------------------------------------------------------------------------------------------\r
-int PaWasapi_GetDeviceRole( PaDeviceIndex nDevice )\r
-{\r
- PaError ret;\r
- PaDeviceIndex index;\r
-\r
- // Get API\r
- PaWasapiHostApiRepresentation *paWasapi = _GetHostApi(&ret);\r
- if (paWasapi == NULL)\r
- return paNotInitialized;\r
-\r
- // Get device index\r
- ret = PaUtil_DeviceIndexToHostApiDeviceIndex(&index, nDevice, &paWasapi->inheritedHostApiRep);\r
- if (ret != paNoError)\r
- return ret;\r
-\r
- // Validate index\r
- if ((UINT32)index >= paWasapi->deviceCount)\r
- return paInvalidDevice;\r
-\r
- return paWasapi->devInfo[ index ].formFactor;\r
-}\r
-\r
-// ------------------------------------------------------------------------------------------\r
-PaError PaWasapi_GetFramesPerHostBuffer( PaStream *pStream, unsigned int *nInput, unsigned int *nOutput )\r
-{\r
- PaWasapiStream *stream = (PaWasapiStream *)pStream;\r
- if (stream == NULL)\r
- return paBadStreamPtr;\r
-\r
- if (nInput != NULL)\r
- (*nInput) = stream->in.framesPerHostCallback;\r
-\r
- if (nOutput != NULL)\r
- (*nOutput) = stream->out.framesPerHostCallback;\r
-\r
- return paNoError;\r
-}\r
-\r
-// ------------------------------------------------------------------------------------------\r
-static void LogWAVEFORMATEXTENSIBLE(const WAVEFORMATEXTENSIBLE *in)\r
-{\r
- const WAVEFORMATEX *old = (WAVEFORMATEX *)in;\r
- switch (old->wFormatTag)\r
- {\r
- case WAVE_FORMAT_EXTENSIBLE: {\r
-\r
- PRINT(("wFormatTag =WAVE_FORMAT_EXTENSIBLE\n"));\r
-\r
- if (IsEqualGUID(&in->SubFormat, &pa_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT))\r
- {\r
- PRINT(("SubFormat =KSDATAFORMAT_SUBTYPE_IEEE_FLOAT\n"));\r
- }\r
- else\r
- if (IsEqualGUID(&in->SubFormat, &pa_KSDATAFORMAT_SUBTYPE_PCM))\r
- {\r
- PRINT(("SubFormat =KSDATAFORMAT_SUBTYPE_PCM\n"));\r
- }\r
- else\r
- {\r
- PRINT(("SubFormat =CUSTOM GUID{%d:%d:%d:%d%d%d%d%d%d%d%d}\n",\r
- in->SubFormat.Data1,\r
- in->SubFormat.Data2,\r
- in->SubFormat.Data3,\r
- (int)in->SubFormat.Data4[0],\r
- (int)in->SubFormat.Data4[1],\r
- (int)in->SubFormat.Data4[2],\r
- (int)in->SubFormat.Data4[3],\r
- (int)in->SubFormat.Data4[4],\r
- (int)in->SubFormat.Data4[5],\r
- (int)in->SubFormat.Data4[6],\r
- (int)in->SubFormat.Data4[7]));\r
- }\r
- PRINT(("Samples.wValidBitsPerSample =%d\n", in->Samples.wValidBitsPerSample));\r
- PRINT(("dwChannelMask =0x%X\n",in->dwChannelMask));\r
-\r
- break; }\r
-\r
- case WAVE_FORMAT_PCM: PRINT(("wFormatTag =WAVE_FORMAT_PCM\n")); break;\r
- case WAVE_FORMAT_IEEE_FLOAT: PRINT(("wFormatTag =WAVE_FORMAT_IEEE_FLOAT\n")); break;\r
- default: \r
- PRINT(("wFormatTag =UNKNOWN(%d)\n",old->wFormatTag)); break;\r
- }\r
-\r
- PRINT(("nChannels =%d\n",old->nChannels));\r
- PRINT(("nSamplesPerSec =%d\n",old->nSamplesPerSec));\r
- PRINT(("nAvgBytesPerSec=%d\n",old->nAvgBytesPerSec));\r
- PRINT(("nBlockAlign =%d\n",old->nBlockAlign));\r
- PRINT(("wBitsPerSample =%d\n",old->wBitsPerSample));\r
- PRINT(("cbSize =%d\n",old->cbSize));\r
-}\r
-\r
-// ------------------------------------------------------------------------------------------\r
-static PaSampleFormat WaveToPaFormat(const WAVEFORMATEXTENSIBLE *in)\r
-{\r
- const WAVEFORMATEX *old = (WAVEFORMATEX *)in;\r
-\r
- switch (old->wFormatTag)\r
- {\r
- case WAVE_FORMAT_EXTENSIBLE: {\r
- if (IsEqualGUID(&in->SubFormat, &pa_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT))\r
- {\r
- if (in->Samples.wValidBitsPerSample == 32)\r
- return paFloat32;\r
- }\r
- else\r
- if (IsEqualGUID(&in->SubFormat, &pa_KSDATAFORMAT_SUBTYPE_PCM))\r
- {\r
- switch (old->wBitsPerSample)\r
- {\r
- case 32: return paInt32;\r
- case 24: return paInt24;\r
- case 8: return paUInt8;\r
- case 16: return paInt16;\r
- }\r
- }\r
- break; }\r
-\r
- case WAVE_FORMAT_IEEE_FLOAT:\r
- return paFloat32;\r
-\r
- case WAVE_FORMAT_PCM: {\r
- switch (old->wBitsPerSample)\r
- {\r
- case 32: return paInt32;\r
- case 24: return paInt24;\r
- case 8: return paUInt8;\r
- case 16: return paInt16;\r
- }\r
- break; }\r
- }\r
-\r
- return paCustomFormat;\r
-}\r
-\r
-// ------------------------------------------------------------------------------------------\r
-static PaError MakeWaveFormatFromParams(WAVEFORMATEXTENSIBLE *wavex, const PaStreamParameters *params,\r
- double sampleRate)\r
-{\r
- WORD bitsPerSample;\r
- WAVEFORMATEX *old;\r
- DWORD channelMask = 0;\r
- PaWasapiStreamInfo *streamInfo = (PaWasapiStreamInfo *)params->hostApiSpecificStreamInfo;\r
-\r
- // Get user assigned channel mask\r
- if ((streamInfo != NULL) && (streamInfo->flags & paWinWasapiUseChannelMask))\r
- channelMask = streamInfo->channelMask;\r
-\r
- // Convert PaSampleFormat to bits per sample\r
- if ((bitsPerSample = PaSampleFormatToBitsPerSample(params->sampleFormat)) == 0)\r
- return paSampleFormatNotSupported;\r
-\r
- memset(wavex, 0, sizeof(*wavex));\r
-\r
- old = (WAVEFORMATEX *)wavex;\r
- old->nChannels = (WORD)params->channelCount;\r
- old->nSamplesPerSec = (DWORD)sampleRate;\r
- if ((old->wBitsPerSample = bitsPerSample) > 16)\r
- {\r
- old->wBitsPerSample = 32; // 20 or 24 bits must go in 32 bit containers (ints)\r
- }\r
- old->nBlockAlign = (old->nChannels * (old->wBitsPerSample/8));\r
- old->nAvgBytesPerSec = (old->nSamplesPerSec * old->nBlockAlign);\r
-\r
- // WAVEFORMATEX\r
- if ((params->channelCount <= 2) && ((bitsPerSample == 16) || (bitsPerSample == 8)))\r
- {\r
- old->cbSize = 0;\r
- old->wFormatTag = WAVE_FORMAT_PCM;\r
- }\r
- // WAVEFORMATEXTENSIBLE\r
- else\r
- {\r
- old->wFormatTag = WAVE_FORMAT_EXTENSIBLE;\r
- old->cbSize = sizeof(WAVEFORMATEXTENSIBLE) - sizeof(WAVEFORMATEX);\r
-\r
- if ((params->sampleFormat & ~paNonInterleaved) == paFloat32)\r
- wavex->SubFormat = pa_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT;\r
- else\r
- wavex->SubFormat = pa_KSDATAFORMAT_SUBTYPE_PCM;\r
-\r
- wavex->Samples.wValidBitsPerSample = bitsPerSample; //no extra padding!\r
-\r
- // Set channel mask\r
- if (channelMask != 0)\r
- {\r
- wavex->dwChannelMask = channelMask;\r
- }\r
- else\r
- {\r
- switch (params->channelCount)\r
- {\r
- case 1: wavex->dwChannelMask = KSAUDIO_SPEAKER_MONO; break;\r
- case 2: wavex->dwChannelMask = KSAUDIO_SPEAKER_STEREO; break;\r
- case 3: wavex->dwChannelMask = KSAUDIO_SPEAKER_STEREO|SPEAKER_LOW_FREQUENCY; break;\r
- case 4: wavex->dwChannelMask = KSAUDIO_SPEAKER_QUAD; break;\r
- case 5: wavex->dwChannelMask = KSAUDIO_SPEAKER_QUAD|SPEAKER_LOW_FREQUENCY; break;\r
-#ifdef KSAUDIO_SPEAKER_5POINT1_SURROUND\r
- case 6: wavex->dwChannelMask = KSAUDIO_SPEAKER_5POINT1_SURROUND; break;\r
-#else\r
- case 6: wavex->dwChannelMask = KSAUDIO_SPEAKER_5POINT1; break;\r
-#endif\r
-#ifdef KSAUDIO_SPEAKER_5POINT1_SURROUND\r
- case 7: wavex->dwChannelMask = KSAUDIO_SPEAKER_5POINT1_SURROUND|SPEAKER_BACK_CENTER; break;\r
-#else\r
- case 7: wavex->dwChannelMask = KSAUDIO_SPEAKER_5POINT1|SPEAKER_BACK_CENTER; break;\r
-#endif \r
-#ifdef KSAUDIO_SPEAKER_7POINT1_SURROUND\r
- case 8: wavex->dwChannelMask = KSAUDIO_SPEAKER_7POINT1_SURROUND; break;\r
-#else\r
- case 8: wavex->dwChannelMask = KSAUDIO_SPEAKER_7POINT1; break;\r
-#endif\r
-\r
- default: wavex->dwChannelMask = 0;\r
- }\r
- }\r
- }\r
- return paNoError;\r
-}\r
-\r
-// ------------------------------------------------------------------------------------------\r
-/*static void wasapiFillWFEXT( WAVEFORMATEXTENSIBLE* pwfext, PaSampleFormat sampleFormat, double sampleRate, int channelCount)\r
-{\r
- PA_DEBUG(( "sampleFormat = %lx\n" , sampleFormat ));\r
- PA_DEBUG(( "sampleRate = %f\n" , sampleRate ));\r
- PA_DEBUG(( "chanelCount = %d\n", channelCount ));\r
-\r
- pwfext->Format.wFormatTag = WAVE_FORMAT_EXTENSIBLE;\r
- pwfext->Format.nChannels = (WORD)channelCount;\r
- pwfext->Format.nSamplesPerSec = (DWORD)sampleRate;\r
- if(channelCount == 1)\r
- pwfext->dwChannelMask = KSAUDIO_SPEAKER_DIRECTOUT;\r
- else\r
- pwfext->dwChannelMask = KSAUDIO_SPEAKER_STEREO;\r
- if(sampleFormat == paFloat32)\r
- {\r
- pwfext->Format.nBlockAlign = (WORD)(channelCount * 4);\r
- pwfext->Format.wBitsPerSample = 32;\r
- pwfext->Format.cbSize = sizeof(WAVEFORMATEXTENSIBLE)-sizeof(WAVEFORMATEX);\r
- pwfext->Samples.wValidBitsPerSample = 32;\r
- pwfext->SubFormat = pa_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT;\r
- }\r
- else if(sampleFormat == paInt32)\r
- {\r
- pwfext->Format.nBlockAlign = (WORD)(channelCount * 4);\r
- pwfext->Format.wBitsPerSample = 32;\r
- pwfext->Format.cbSize = sizeof(WAVEFORMATEXTENSIBLE)-sizeof(WAVEFORMATEX);\r
- pwfext->Samples.wValidBitsPerSample = 32;\r
- pwfext->SubFormat = pa_KSDATAFORMAT_SUBTYPE_PCM;\r
- }\r
- else if(sampleFormat == paInt24)\r
- {\r
- pwfext->Format.nBlockAlign = (WORD)(channelCount * 4);\r
- pwfext->Format.wBitsPerSample = 32; // 24-bit in 32-bit int container\r
- pwfext->Format.cbSize = sizeof(WAVEFORMATEXTENSIBLE)-sizeof(WAVEFORMATEX);\r
- pwfext->Samples.wValidBitsPerSample = 24;\r
- pwfext->SubFormat = pa_KSDATAFORMAT_SUBTYPE_PCM;\r
- }\r
- else if(sampleFormat == paInt16)\r
- {\r
- pwfext->Format.nBlockAlign = (WORD)(channelCount * 2);\r
- pwfext->Format.wBitsPerSample = 16;\r
- pwfext->Format.cbSize = sizeof(WAVEFORMATEXTENSIBLE)-sizeof(WAVEFORMATEX);\r
- pwfext->Samples.wValidBitsPerSample = 16;\r
- pwfext->SubFormat = pa_KSDATAFORMAT_SUBTYPE_PCM;\r
- }\r
- pwfext->Format.nAvgBytesPerSec = pwfext->Format.nSamplesPerSec * pwfext->Format.nBlockAlign;\r
-}*/\r
-\r
-// ------------------------------------------------------------------------------------------\r
-static PaError GetClosestFormat(IAudioClient *myClient, double sampleRate,\r
- const PaStreamParameters *_params, AUDCLNT_SHAREMODE shareMode, WAVEFORMATEXTENSIBLE *outWavex,\r
- BOOL output)\r
-{\r
- PaError answer = paInvalidSampleRate;\r
- WAVEFORMATEX *sharedClosestMatch = NULL;\r
- HRESULT hr = !S_OK;\r
- PaStreamParameters params = (*_params);\r
-\r
- /* It was not noticed that 24-bit Input producing no output while device accepts this format.\r
- To fix this issue let's ask for 32-bits and let PA converters convert host 32-bit data\r
- to 24-bit for user-space. The bug concerns Vista, if Windows 7 supports 24-bits for Input\r
- please report to PortAudio developers to exclude Windows 7.\r
- */\r
- /*if ((params.sampleFormat == paInt24) && (output == FALSE))\r
- params.sampleFormat = paFloat32;*/ // <<< The silence was due to missing Int32_To_Int24_Dither implementation\r
-\r
- MakeWaveFormatFromParams(outWavex, ¶ms, sampleRate);\r
-\r
- hr = IAudioClient_IsFormatSupported(myClient, shareMode, &outWavex->Format, (shareMode == AUDCLNT_SHAREMODE_SHARED ? &sharedClosestMatch : NULL));\r
- if (hr == S_OK)\r
- answer = paFormatIsSupported;\r
- else\r
- if (sharedClosestMatch)\r
- {\r
- WORD bitsPerSample;\r
- WAVEFORMATEXTENSIBLE *ext = (WAVEFORMATEXTENSIBLE*)sharedClosestMatch;\r
-\r
- GUID subf_guid = GUID_NULL;\r
- if (sharedClosestMatch->wFormatTag == WAVE_FORMAT_EXTENSIBLE)\r
- {\r
- memcpy(outWavex, sharedClosestMatch, sizeof(WAVEFORMATEXTENSIBLE));\r
- subf_guid = ext->SubFormat;\r
- }\r
- else\r
- memcpy(outWavex, sharedClosestMatch, sizeof(WAVEFORMATEX));\r
-\r
- CoTaskMemFree(sharedClosestMatch);\r
-\r
- // Make supported by default\r
- answer = paFormatIsSupported;\r
-\r
- // Validate SampleRate\r
- if ((DWORD)sampleRate != outWavex->Format.nSamplesPerSec)\r
- return paInvalidSampleRate;\r
-\r
- // Validate Channel count\r
- if ((WORD)params.channelCount != outWavex->Format.nChannels)\r
- {\r
- // If mono, then driver does not support 1 channel, we use internal workaround\r
- // of tiny software mixing functionality, e.g. we provide to user buffer 1 channel\r
- // but then mix into 2 for device buffer\r
- if ((params.channelCount == 1) && (outWavex->Format.nChannels == 2))\r
- return paFormatIsSupported;\r
- else\r
- return paInvalidChannelCount;\r
- }\r
-\r
- // Validate Sample format\r
- if ((bitsPerSample = PaSampleFormatToBitsPerSample(params.sampleFormat)) == 0)\r
- return paSampleFormatNotSupported;\r
-\r
- // Validate Sample format: bit size (WASAPI does not limit 'bit size')\r
- //if (bitsPerSample != outWavex->Format.wBitsPerSample)\r
- // return paSampleFormatNotSupported;\r
-\r
- // Validate Sample format: paFloat32 (WASAPI does not limit 'bit type')\r
- //if ((params->sampleFormat == paFloat32) && (subf_guid != KSDATAFORMAT_SUBTYPE_IEEE_FLOAT))\r
- // return paSampleFormatNotSupported;\r
-\r
- // Validate Sample format: paInt32 (WASAPI does not limit 'bit type')\r
- //if ((params->sampleFormat == paInt32) && (subf_guid != KSDATAFORMAT_SUBTYPE_PCM))\r
- // return paSampleFormatNotSupported;\r
- }\r
- else\r
- {\r
- static const int BestToWorst[] = { paFloat32, paInt24, paInt16 };\r
- int i;\r
-\r
- // Try combination stereo and we will use built-in mono-stereo mixer then\r
- if (params.channelCount == 1)\r
- {\r
- WAVEFORMATEXTENSIBLE stereo = { 0 };\r
-\r
- PaStreamParameters stereo_params = params;\r
- stereo_params.channelCount = 2;\r
-\r
- MakeWaveFormatFromParams(&stereo, &stereo_params, sampleRate);\r
-\r
- hr = IAudioClient_IsFormatSupported(myClient, shareMode, &stereo.Format, (shareMode == AUDCLNT_SHAREMODE_SHARED ? &sharedClosestMatch : NULL));\r
- if (hr == S_OK)\r
- {\r
- memcpy(outWavex, &stereo, sizeof(WAVEFORMATEXTENSIBLE));\r
- CoTaskMemFree(sharedClosestMatch);\r
- return (answer = paFormatIsSupported);\r
- }\r
-\r
- // Try selecting suitable sample type\r
- for (i = 0; i < STATIC_ARRAY_SIZE(BestToWorst); ++i)\r
- {\r
- WAVEFORMATEXTENSIBLE sample = { 0 };\r
-\r
- PaStreamParameters sample_params = stereo_params;\r
- sample_params.sampleFormat = BestToWorst[i];\r
-\r
- MakeWaveFormatFromParams(&sample, &sample_params, sampleRate);\r
-\r
- hr = IAudioClient_IsFormatSupported(myClient, shareMode, &sample.Format, (shareMode == AUDCLNT_SHAREMODE_SHARED ? &sharedClosestMatch : NULL));\r
- if (hr == S_OK)\r
- {\r
- memcpy(outWavex, &sample, sizeof(WAVEFORMATEXTENSIBLE));\r
- CoTaskMemFree(sharedClosestMatch);\r
- return (answer = paFormatIsSupported);\r
- }\r
- }\r
- }\r
-\r
- // Try selecting suitable sample type\r
- for (i = 0; i < STATIC_ARRAY_SIZE(BestToWorst); ++i)\r
- {\r
- WAVEFORMATEXTENSIBLE spfmt = { 0 };\r
-\r
- PaStreamParameters spfmt_params = params;\r
- spfmt_params.sampleFormat = BestToWorst[i];\r
-\r
- MakeWaveFormatFromParams(&spfmt, &spfmt_params, sampleRate);\r
-\r
- hr = IAudioClient_IsFormatSupported(myClient, shareMode, &spfmt.Format, (shareMode == AUDCLNT_SHAREMODE_SHARED ? &sharedClosestMatch : NULL));\r
- if (hr == S_OK)\r
- {\r
- memcpy(outWavex, &spfmt, sizeof(WAVEFORMATEXTENSIBLE));\r
- CoTaskMemFree(sharedClosestMatch);\r
- answer = paFormatIsSupported;\r
- break;\r
- }\r
- }\r
-\r
- // Nothing helped\r
- LogHostError(hr);\r
- }\r
-\r
- return answer;\r
-}\r
-\r
-// ------------------------------------------------------------------------------------------\r
-static PaError IsStreamParamsValid(struct PaUtilHostApiRepresentation *hostApi,\r
- const PaStreamParameters *inputParameters,\r
- const PaStreamParameters *outputParameters,\r
- double sampleRate)\r
-{\r
- if (hostApi == NULL)\r
- return paHostApiNotFound;\r
- if ((UINT32)sampleRate == 0)\r
- return paInvalidSampleRate;\r
-\r
- if (inputParameters != NULL)\r
- {\r
- /* all standard sample formats are supported by the buffer adapter,\r
- this implementation doesn't support any custom sample formats */\r
- if (inputParameters->sampleFormat & paCustomFormat)\r
- return paSampleFormatNotSupported;\r
-\r
- /* unless alternate device specification is supported, reject the use of\r
- paUseHostApiSpecificDeviceSpecification */\r
- if (inputParameters->device == paUseHostApiSpecificDeviceSpecification)\r
- return paInvalidDevice;\r
-\r
- /* check that input device can support inputChannelCount */\r
- if (inputParameters->channelCount > hostApi->deviceInfos[ inputParameters->device ]->maxInputChannels)\r
- return paInvalidChannelCount;\r
-\r
- /* validate inputStreamInfo */\r
- if (inputParameters->hostApiSpecificStreamInfo)\r
- {\r
- PaWasapiStreamInfo *inputStreamInfo = (PaWasapiStreamInfo *)inputParameters->hostApiSpecificStreamInfo;\r
- if ((inputStreamInfo->size != sizeof(PaWasapiStreamInfo)) ||\r
- (inputStreamInfo->version != 1) ||\r
- (inputStreamInfo->hostApiType != paWASAPI))\r
- {\r
- return paIncompatibleHostApiSpecificStreamInfo;\r
- }\r
- }\r
-\r
- return paNoError;\r
- }\r
-\r
- if (outputParameters != NULL)\r
- {\r
- /* all standard sample formats are supported by the buffer adapter,\r
- this implementation doesn't support any custom sample formats */\r
- if (outputParameters->sampleFormat & paCustomFormat)\r
- return paSampleFormatNotSupported;\r
-\r
- /* unless alternate device specification is supported, reject the use of\r
- paUseHostApiSpecificDeviceSpecification */\r
- if (outputParameters->device == paUseHostApiSpecificDeviceSpecification)\r
- return paInvalidDevice;\r
-\r
- /* check that output device can support outputChannelCount */\r
- if (outputParameters->channelCount > hostApi->deviceInfos[ outputParameters->device ]->maxOutputChannels)\r
- return paInvalidChannelCount;\r
-\r
- /* validate outputStreamInfo */\r
- if(outputParameters->hostApiSpecificStreamInfo)\r
- {\r
- PaWasapiStreamInfo *outputStreamInfo = (PaWasapiStreamInfo *)outputParameters->hostApiSpecificStreamInfo;\r
- if ((outputStreamInfo->size != sizeof(PaWasapiStreamInfo)) ||\r
- (outputStreamInfo->version != 1) ||\r
- (outputStreamInfo->hostApiType != paWASAPI))\r
- {\r
- return paIncompatibleHostApiSpecificStreamInfo;\r
- }\r
- }\r
-\r
- return paNoError;\r
- }\r
-\r
- return (inputParameters || outputParameters ? paNoError : paInternalError);\r
-}\r
-\r
-// ------------------------------------------------------------------------------------------\r
-static PaError IsFormatSupported( struct PaUtilHostApiRepresentation *hostApi,\r
- const PaStreamParameters *inputParameters,\r
- const PaStreamParameters *outputParameters,\r
- double sampleRate )\r
-{\r
- IAudioClient *tmpClient = NULL;\r
- PaWasapiHostApiRepresentation *paWasapi = (PaWasapiHostApiRepresentation*)hostApi;\r
- PaWasapiStreamInfo *inputStreamInfo = NULL, *outputStreamInfo = NULL;\r
-\r
- // Validate PaStreamParameters\r
- PaError error;\r
- if ((error = IsStreamParamsValid(hostApi, inputParameters, outputParameters, sampleRate)) != paNoError)\r
- return error;\r
-\r
- if (inputParameters != NULL)\r
- {\r
- WAVEFORMATEXTENSIBLE wavex;\r
- HRESULT hr;\r
- PaError answer;\r
- AUDCLNT_SHAREMODE shareMode = AUDCLNT_SHAREMODE_SHARED;\r
- inputStreamInfo = (PaWasapiStreamInfo *)inputParameters->hostApiSpecificStreamInfo;\r
-\r
- if (inputStreamInfo && (inputStreamInfo->flags & paWinWasapiExclusive))\r
- shareMode = AUDCLNT_SHAREMODE_EXCLUSIVE;\r
-\r
- hr = IMMDevice_Activate(paWasapi->devInfo[inputParameters->device].device,\r
- GetAudioClientIID(), CLSCTX_INPROC_SERVER, NULL, (void **)&tmpClient);\r
- if (hr != S_OK)\r
- {\r
- LogHostError(hr);\r
- return paInvalidDevice;\r
- }\r
-\r
- answer = GetClosestFormat(tmpClient, sampleRate, inputParameters, shareMode, &wavex, FALSE);\r
- SAFE_RELEASE(tmpClient);\r
-\r
- if (answer != paFormatIsSupported)\r
- return answer;\r
- }\r
-\r
- if (outputParameters != NULL)\r
- {\r
- HRESULT hr;\r
- WAVEFORMATEXTENSIBLE wavex;\r
- PaError answer;\r
- AUDCLNT_SHAREMODE shareMode = AUDCLNT_SHAREMODE_SHARED;\r
- outputStreamInfo = (PaWasapiStreamInfo *)outputParameters->hostApiSpecificStreamInfo;\r
-\r
- if (outputStreamInfo && (outputStreamInfo->flags & paWinWasapiExclusive))\r
- shareMode = AUDCLNT_SHAREMODE_EXCLUSIVE;\r
-\r
- hr = IMMDevice_Activate(paWasapi->devInfo[outputParameters->device].device,\r
- GetAudioClientIID(), CLSCTX_INPROC_SERVER, NULL, (void **)&tmpClient);\r
- if (hr != S_OK)\r
- {\r
- LogHostError(hr);\r
- return paInvalidDevice;\r
- }\r
-\r
- answer = GetClosestFormat(tmpClient, sampleRate, outputParameters, shareMode, &wavex, TRUE);\r
- SAFE_RELEASE(tmpClient);\r
-\r
- if (answer != paFormatIsSupported)\r
- return answer;\r
- }\r
-\r
- return paFormatIsSupported;\r
-}\r
-\r
-// ------------------------------------------------------------------------------------------\r
-static PaUint32 PaUtil_GetFramesPerHostBuffer(PaUint32 userFramesPerBuffer, PaTime suggestedLatency, double sampleRate, PaUint32 TimerJitterMs)\r
-{\r
- PaUint32 frames = userFramesPerBuffer + max( userFramesPerBuffer, (PaUint32)(suggestedLatency * sampleRate) );\r
- frames += (PaUint32)((sampleRate * 0.001) * TimerJitterMs);\r
- return frames;\r
-}\r
-\r
-// ------------------------------------------------------------------------------------------\r
-static void _RecalculateBuffersCount(PaWasapiSubStream *sub, UINT32 userFramesPerBuffer, UINT32 framesPerLatency, BOOL fullDuplex)\r
-{\r
- // Count buffers (must be at least 1)\r
- sub->buffers = (userFramesPerBuffer ? framesPerLatency / userFramesPerBuffer : 0);\r
- if (sub->buffers == 0)\r
- sub->buffers = 1;\r
-\r
- // Determine amount of buffers used:\r
- // - Full-duplex mode will lead to period difference, thus only 1.\r
- // - Input mode, only 1, as WASAPI allows extraction of only 1 packet.\r
- // - For Shared mode we use double buffering.\r
- if ((sub->shareMode == AUDCLNT_SHAREMODE_EXCLUSIVE) || fullDuplex)\r
- {\r
- // Exclusive mode does not allow >1 buffers be used for Event interface, e.g. GetBuffer\r
- // call must acquire max buffer size and it all must be processed.\r
- if (sub->streamFlags & AUDCLNT_STREAMFLAGS_EVENTCALLBACK)\r
- sub->userBufferAndHostMatch = 1;\r
-\r
- // Use paUtilBoundedHostBufferSize because exclusive mode will starve and produce\r
- // bad quality of audio\r
- sub->buffers = 1;\r
- }\r
-}\r
-\r
-// ------------------------------------------------------------------------------------------\r
-static void _CalculateAlignedPeriod(PaWasapiSubStream *pSub, UINT32 *nFramesPerLatency,\r
- ALIGN_FUNC pAlignFunc)\r
-{\r
- // Align frames to HD Audio packet size of 128 bytes for Exclusive mode only.\r
- // Not aligning on Windows Vista will cause Event timeout, although Windows 7 will\r
- // return AUDCLNT_E_BUFFER_SIZE_NOT_ALIGNED error to realign buffer. Aligning is necessary\r
- // for Exclusive mode only! when audio data is feeded directly to hardware.\r
- if (pSub->shareMode == AUDCLNT_SHAREMODE_EXCLUSIVE)\r
- {\r
- (*nFramesPerLatency) = AlignFramesPerBuffer((*nFramesPerLatency),\r
- pSub->wavex.Format.nSamplesPerSec, pSub->wavex.Format.nBlockAlign, pAlignFunc);\r
- }\r
-\r
- // Calculate period\r
- pSub->period = MakeHnsPeriod((*nFramesPerLatency), pSub->wavex.Format.nSamplesPerSec);\r
-}\r
-\r
-// ------------------------------------------------------------------------------------------\r
-static HRESULT CreateAudioClient(PaWasapiStream *pStream, PaWasapiSubStream *pSub, BOOL output, PaError *pa_error)\r
-{\r
- PaError error;\r
- HRESULT hr;\r
-\r
- const PaWasapiDeviceInfo *pInfo = pSub->params.device_info;\r
- const PaStreamParameters *params = &pSub->params.stream_params;\r
- UINT32 framesPerLatency = pSub->params.frames_per_buffer;\r
- double sampleRate = pSub->params.sample_rate;\r
- BOOL blocking = pSub->params.blocking;\r
- BOOL fullDuplex = pSub->params.full_duplex;\r
-\r
- const UINT32 userFramesPerBuffer = framesPerLatency;\r
- IAudioClient *audioClient = NULL;\r
-\r
- // Assume default failure due to some reason\r
- (*pa_error) = paInvalidDevice;\r
-\r
- // Validate parameters\r
- if (!pSub || !pInfo || !params)\r
- {\r
- (*pa_error) = paBadStreamPtr;\r
- return E_POINTER;\r
- }\r
- if ((UINT32)sampleRate == 0)\r
- {\r
- (*pa_error) = paInvalidSampleRate;\r
- return E_INVALIDARG;\r
- }\r
-\r
- // Get the audio client\r
- hr = IMMDevice_Activate(pInfo->device, GetAudioClientIID(), CLSCTX_ALL, NULL, (void **)&audioClient);\r
- if (hr != S_OK)\r
- {\r
- (*pa_error) = paInsufficientMemory;\r
- LogHostError(hr);\r
- goto done;\r
- }\r
-\r
- // Get closest format\r
- if ((error = GetClosestFormat(audioClient, sampleRate, params, pSub->shareMode, &pSub->wavex, output)) != paFormatIsSupported)\r
- {\r
- (*pa_error) = error;\r
- LogHostError(hr = AUDCLNT_E_UNSUPPORTED_FORMAT);\r
- goto done; // fail, format not supported\r
- }\r
-\r
- // Check for Mono <<>> Stereo workaround\r
- if ((params->channelCount == 1) && (pSub->wavex.Format.nChannels == 2))\r
- {\r
- /*if (blocking)\r
- {\r
- LogHostError(hr = AUDCLNT_E_UNSUPPORTED_FORMAT);\r
- goto done; // fail, blocking mode not supported\r
- }*/\r
-\r
- // select mixer\r
- pSub->monoMixer = _GetMonoToStereoMixer(WaveToPaFormat(&pSub->wavex), (pInfo->flow == eRender ? MIX_DIR__1TO2 : MIX_DIR__2TO1_L));\r
- if (pSub->monoMixer == NULL)\r
- {\r
- (*pa_error) = paInvalidChannelCount;\r
- LogHostError(hr = AUDCLNT_E_UNSUPPORTED_FORMAT);\r
- goto done; // fail, no mixer for format\r
- }\r
- }\r
-\r
-#if 0\r
- // Add suggestd latency\r
- framesPerLatency += MakeFramesFromHns(SecondsTonano100(params->suggestedLatency), pSub->wavex.Format.nSamplesPerSec);\r
-#else\r
- // Calculate host buffer size\r
- if ((pSub->shareMode != AUDCLNT_SHAREMODE_EXCLUSIVE) &&\r
- (!pSub->streamFlags || ((pSub->streamFlags & AUDCLNT_STREAMFLAGS_EVENTCALLBACK) == 0)))\r
- {\r
- framesPerLatency = PaUtil_GetFramesPerHostBuffer(userFramesPerBuffer,\r
- params->suggestedLatency, pSub->wavex.Format.nSamplesPerSec, 0/*,\r
- (pSub->streamFlags & AUDCLNT_STREAMFLAGS_EVENTCALLBACK ? 0 : 1)*/);\r
- }\r
- else\r
- {\r
- REFERENCE_TIME overall;\r
-\r
- // Work 1:1 with user buffer (only polling allows to use >1)\r
- framesPerLatency += MakeFramesFromHns(SecondsTonano100(params->suggestedLatency), pSub->wavex.Format.nSamplesPerSec);\r
-\r
- // Use Polling if overall latency is > 5ms as it allows to use 100% CPU in a callback,\r
- // or user specified latency parameter\r
- overall = MakeHnsPeriod(framesPerLatency, pSub->wavex.Format.nSamplesPerSec);\r
- if ((overall >= (106667*2)/*21.33ms*/) || ((INT32)(params->suggestedLatency*100000.0) != 0/*0.01 msec granularity*/))\r
- {\r
- framesPerLatency = PaUtil_GetFramesPerHostBuffer(userFramesPerBuffer,\r
- params->suggestedLatency, pSub->wavex.Format.nSamplesPerSec, 0/*,\r
- (streamFlags & AUDCLNT_STREAMFLAGS_EVENTCALLBACK ? 0 : 1)*/);\r
-\r
- // Use Polling interface\r
- pSub->streamFlags &= ~AUDCLNT_STREAMFLAGS_EVENTCALLBACK;\r
- PRINT(("WASAPI: CreateAudioClient: forcing POLL mode\n"));\r
- }\r
- }\r
-#endif\r
-\r
- // For full-duplex output resize buffer to be the same as for input\r
- if (output && fullDuplex)\r
- framesPerLatency = pStream->in.framesPerHostCallback;\r
-\r
- // Avoid 0 frames\r
- if (framesPerLatency == 0)\r
- framesPerLatency = MakeFramesFromHns(pInfo->DefaultDevicePeriod, pSub->wavex.Format.nSamplesPerSec);\r
-\r
- // Exclusive Input stream renders data in 6 packets, we must set then the size of\r
- // single packet, total buffer size, e.g. required latency will be PacketSize * 6\r
- if (!output && (pSub->shareMode == AUDCLNT_SHAREMODE_EXCLUSIVE))\r
- {\r
- // Do it only for Polling mode\r
- if ((pSub->streamFlags & AUDCLNT_STREAMFLAGS_EVENTCALLBACK) == 0)\r
- {\r
- framesPerLatency /= WASAPI_PACKETS_PER_INPUT_BUFFER;\r
- }\r
- }\r
-\r
- // Calculate aligned period\r
- _CalculateAlignedPeriod(pSub, &framesPerLatency, ALIGN_BWD);\r
-\r
- /*! Enforce min/max period for device in Shared mode to avoid bad audio quality.\r
- Avoid doing so for Exclusive mode as alignment will suffer.\r
- */\r
- if (pSub->shareMode == AUDCLNT_SHAREMODE_SHARED)\r
- {\r
- if (pSub->period < pInfo->DefaultDevicePeriod)\r
- {\r
- pSub->period = pInfo->DefaultDevicePeriod;\r
- // Recalculate aligned period\r
- framesPerLatency = MakeFramesFromHns(pSub->period, pSub->wavex.Format.nSamplesPerSec);\r
- _CalculateAlignedPeriod(pSub, &framesPerLatency, ALIGN_BWD);\r
- }\r
- }\r
- else\r
- {\r
- if (pSub->period < pInfo->MinimumDevicePeriod)\r
- {\r
- pSub->period = pInfo->MinimumDevicePeriod;\r
- // Recalculate aligned period\r
- framesPerLatency = MakeFramesFromHns(pSub->period, pSub->wavex.Format.nSamplesPerSec);\r
- _CalculateAlignedPeriod(pSub, &framesPerLatency, ALIGN_FWD);\r
- }\r
- }\r
-\r
- /*! Windows 7 does not allow to set latency lower than minimal device period and will\r
- return error: AUDCLNT_E_INVALID_DEVICE_PERIOD. Under Vista we enforce the same behavior\r
- manually for unified behavior on all platforms.\r
- */\r
- {\r
- /*! AUDCLNT_E_BUFFER_SIZE_ERROR: Applies to Windows 7 and later.\r
- Indicates that the buffer duration value requested by an exclusive-mode client is\r
- out of range. The requested duration value for pull mode must not be greater than\r
- 500 milliseconds; for push mode the duration value must not be greater than 2 seconds.\r
- */\r
- if (pSub->shareMode == AUDCLNT_SHAREMODE_EXCLUSIVE)\r
- {\r
- static const REFERENCE_TIME MAX_BUFFER_EVENT_DURATION = 500 * 10000;\r
- static const REFERENCE_TIME MAX_BUFFER_POLL_DURATION = 2000 * 10000;\r
-\r
- if (pSub->streamFlags & AUDCLNT_STREAMFLAGS_EVENTCALLBACK) // pull mode, max 500ms\r
- {\r
- if (pSub->period > MAX_BUFFER_EVENT_DURATION)\r
- {\r
- pSub->period = MAX_BUFFER_EVENT_DURATION;\r
- // Recalculate aligned period\r
- framesPerLatency = MakeFramesFromHns(pSub->period, pSub->wavex.Format.nSamplesPerSec);\r
- _CalculateAlignedPeriod(pSub, &framesPerLatency, ALIGN_BWD);\r
- }\r
- }\r
- else // push mode, max 2000ms\r
- {\r
- if (pSub->period > MAX_BUFFER_POLL_DURATION)\r
- {\r
- pSub->period = MAX_BUFFER_POLL_DURATION;\r
- // Recalculate aligned period\r
- framesPerLatency = MakeFramesFromHns(pSub->period, pSub->wavex.Format.nSamplesPerSec);\r
- _CalculateAlignedPeriod(pSub, &framesPerLatency, ALIGN_BWD);\r
- }\r
- }\r
- }\r
- }\r
-\r
- // Set Raw mode (applicable only to IAudioClient2)\r
-#ifdef __IAudioClient2_INTERFACE_DEFINED__\r
- if (GetAudioClientVersion() >= 2)\r
- {\r
- pa_AudioClientProperties audioProps = { 0 };\r
- audioProps.cbSize = sizeof(pa_AudioClientProperties);\r
- audioProps.bIsOffload = FALSE;\r
- audioProps.eCategory = (AUDIO_STREAM_CATEGORY)pSub->params.wasapi_params.streamCategory;\r
- switch (pSub->params.wasapi_params.streamOption)\r
- {\r
- case eStreamOptionRaw:\r
- if (GetWindowsVersion() >= WINDOWS_8_1_SERVER2012R2)\r
- audioProps.Options = pa_AUDCLNT_STREAMOPTIONS_RAW;\r
- break;\r
- case eStreamOptionMatchFormat:\r
- if (GetWindowsVersion() >= WINDOWS_10_SERVER2016)\r
- audioProps.Options = pa_AUDCLNT_STREAMOPTIONS_MATCH_FORMAT;\r
- break;\r
- }\r
-\r
- hr = IAudioClient2_SetClientProperties((IAudioClient2 *)audioClient, (AudioClientProperties *)&audioProps);\r
- if (hr != S_OK)\r
- {\r
- PRINT(("WASAPI: IAudioClient2_SetClientProperties(Category = %d, Options = %d) failed with error = %08X\n", audioProps.eCategory, audioProps.Options, (UINT32)hr));\r
- }\r
- else\r
- {\r
- PRINT(("WASAPI: IAudioClient2 set properties: IsOffload = %d, Category = %d, Options = %d\n", audioProps.bIsOffload, audioProps.eCategory, audioProps.Options));\r
- }\r
- }\r
-#endif\r
-\r
- // Open the stream and associate it with an audio session\r
- hr = IAudioClient_Initialize(audioClient,\r
- pSub->shareMode,\r
- pSub->streamFlags,\r
- pSub->period,\r
- (pSub->shareMode == AUDCLNT_SHAREMODE_EXCLUSIVE ? pSub->period : 0),\r
- &pSub->wavex.Format,\r
- NULL);\r
-\r
- /*! WASAPI is tricky on large device buffer, sometimes 2000ms can be allocated sometimes\r
- less. There is no known guaranteed level thus we make subsequent tries by decreasing\r
- buffer by 100ms per try.\r
- */\r
- while ((hr == E_OUTOFMEMORY) && (pSub->period > (100 * 10000)))\r
- {\r
- PRINT(("WASAPI: CreateAudioClient: decreasing buffer size to %d milliseconds\n", (pSub->period / 10000)));\r
-\r
- // Decrease by 100ms and try again\r
- pSub->period -= (100 * 10000);\r
-\r
- // Recalculate aligned period\r
- framesPerLatency = MakeFramesFromHns(pSub->period, pSub->wavex.Format.nSamplesPerSec);\r
- _CalculateAlignedPeriod(pSub, &framesPerLatency, ALIGN_BWD);\r
-\r
- // Release the previous allocations\r
- SAFE_RELEASE(audioClient);\r
-\r
- // Create a new audio client\r
- hr = IMMDevice_Activate(pInfo->device, GetAudioClientIID(), CLSCTX_ALL, NULL, (void**)&audioClient);\r
- if (hr != S_OK)\r
- {\r
- (*pa_error) = paInsufficientMemory;\r
- LogHostError(hr);\r
- goto done;\r
- }\r
-\r
- // Open the stream and associate it with an audio session\r
- hr = IAudioClient_Initialize(audioClient,\r
- pSub->shareMode,\r
- pSub->streamFlags,\r
- pSub->period,\r
- (pSub->shareMode == AUDCLNT_SHAREMODE_EXCLUSIVE ? pSub->period : 0),\r
- &pSub->wavex.Format,\r
- NULL);\r
- }\r
-\r
- /*! WASAPI buffer size failure. Fallback to using default size.\r
- */\r
- if (hr == AUDCLNT_E_BUFFER_SIZE_ERROR)\r
- {\r
- // Use default\r
- pSub->period = pInfo->DefaultDevicePeriod;\r
-\r
- PRINT(("WASAPI: CreateAudioClient: correcting buffer size to device default\n"));\r
-\r
- // Release the previous allocations\r
- SAFE_RELEASE(audioClient);\r
-\r
- // Create a new audio client\r
- hr = IMMDevice_Activate(pInfo->device, GetAudioClientIID(), CLSCTX_ALL, NULL, (void**)&audioClient);\r
- if (hr != S_OK)\r
- {\r
- (*pa_error) = paInsufficientMemory;\r
- LogHostError(hr);\r
- goto done;\r
- }\r
-\r
- // Open the stream and associate it with an audio session\r
- hr = IAudioClient_Initialize(audioClient,\r
- pSub->shareMode,\r
- pSub->streamFlags,\r
- pSub->period,\r
- (pSub->shareMode == AUDCLNT_SHAREMODE_EXCLUSIVE ? pSub->period : 0),\r
- &pSub->wavex.Format,\r
- NULL);\r
- }\r
-\r
- /*! If the requested buffer size is not aligned. Can be triggered by Windows 7 and up.\r
- Should not be be triggered ever as we do align buffers always with _CalculateAlignedPeriod.\r
- */\r
- if (hr == AUDCLNT_E_BUFFER_SIZE_NOT_ALIGNED)\r
- {\r
- UINT32 frames = 0;\r
-\r
- // Get the next aligned frame\r
- hr = IAudioClient_GetBufferSize(audioClient, &frames);\r
- if (hr != S_OK)\r
- {\r
- (*pa_error) = paInvalidDevice;\r
- LogHostError(hr);\r
- goto done;\r
- }\r
-\r
- PRINT(("WASAPI: CreateAudioClient: aligning buffer size to % frames\n", frames));\r
-\r
- // Release the previous allocations\r
- SAFE_RELEASE(audioClient);\r
-\r
- // Create a new audio client\r
- hr = IMMDevice_Activate(pInfo->device, GetAudioClientIID(), CLSCTX_ALL, NULL, (void**)&audioClient);\r
- if (hr != S_OK)\r
- {\r
- (*pa_error) = paInsufficientMemory;\r
- LogHostError(hr);\r
- goto done;\r
- }\r
-\r
- // Get closest format\r
- if ((error = GetClosestFormat(audioClient, sampleRate, params, pSub->shareMode, &pSub->wavex, output)) != paFormatIsSupported)\r
- {\r
- (*pa_error) = error;\r
- LogHostError(hr = AUDCLNT_E_UNSUPPORTED_FORMAT); // fail, format not supported\r
- goto done;\r
- }\r
-\r
- // Check for Mono >> Stereo workaround\r
- if ((params->channelCount == 1) && (pSub->wavex.Format.nChannels == 2))\r
- {\r
- /*if (blocking)\r
- {\r
- LogHostError(hr = AUDCLNT_E_UNSUPPORTED_FORMAT);\r
- goto done; // fail, blocking mode not supported\r
- }*/\r
-\r
- // Select mixer\r
- pSub->monoMixer = _GetMonoToStereoMixer(WaveToPaFormat(&pSub->wavex), (pInfo->flow == eRender ? MIX_DIR__1TO2 : MIX_DIR__2TO1_L));\r
- if (pSub->monoMixer == NULL)\r
- {\r
- (*pa_error) = paInvalidChannelCount;\r
- LogHostError(hr = AUDCLNT_E_UNSUPPORTED_FORMAT);\r
- goto done; // fail, no mixer for format\r
- }\r
- }\r
-\r
- // Calculate period\r
- pSub->period = MakeHnsPeriod(frames, pSub->wavex.Format.nSamplesPerSec);\r
-\r
- // Open the stream and associate it with an audio session\r
- hr = IAudioClient_Initialize(audioClient,\r
- pSub->shareMode,\r
- pSub->streamFlags,\r
- pSub->period,\r
- (pSub->shareMode == AUDCLNT_SHAREMODE_EXCLUSIVE ? pSub->period : 0),\r
- &pSub->wavex.Format,\r
- NULL);\r
- if (hr != S_OK)\r
- {\r
- (*pa_error) = paInvalidDevice;\r
- LogHostError(hr);\r
- goto done;\r
- }\r
- }\r
- else\r
- if (hr != S_OK)\r
- {\r
- (*pa_error) = paInvalidDevice;\r
- LogHostError(hr);\r
- goto done;\r
- }\r
-\r
- // Set client\r
- pSub->clientParent = audioClient;\r
- IAudioClient_AddRef(pSub->clientParent);\r
-\r
- // Recalculate buffers count\r
- _RecalculateBuffersCount(pSub,\r
- userFramesPerBuffer,\r
- MakeFramesFromHns(pSub->period, pSub->wavex.Format.nSamplesPerSec),\r
- fullDuplex);\r
-\r
- // No error, client is succesfully created\r
- (*pa_error) = paNoError;\r
-\r
-done:\r
-\r
- // Clean up\r
- SAFE_RELEASE(audioClient);\r
- return hr;\r
-}\r
-\r
-// ------------------------------------------------------------------------------------------\r
-static PaError ActivateAudioClientOutput(PaWasapiStream *stream)\r
-{\r
- HRESULT hr;\r
- PaError result;\r
-\r
- UINT32 maxBufferSize = 0;\r
- PaTime buffer_latency = 0;\r
- UINT32 framesPerBuffer = stream->out.params.frames_per_buffer;\r
-\r
- // Create Audio client\r
- hr = CreateAudioClient(stream, &stream->out, TRUE, &result);\r
- if (hr != S_OK)\r
- {\r
- LogPaError(result);\r
- goto error;\r
- }\r
- LogWAVEFORMATEXTENSIBLE(&stream->out.wavex);\r
-\r
- // Activate volume\r
- stream->outVol = NULL;\r
- /*hr = info->device->Activate(\r
- __uuidof(IAudioEndpointVolume), CLSCTX_INPROC_SERVER, NULL,\r
- (void**)&stream->outVol);\r
- if (hr != S_OK)\r
- return paInvalidDevice;*/\r
-\r
- // Get max possible buffer size to check if it is not less than that we request\r
- hr = IAudioClient_GetBufferSize(stream->out.clientParent, &maxBufferSize);\r
- if (hr != S_OK)\r
- {\r
- LogHostError(hr);\r
- LogPaError(result = paInvalidDevice);\r
- goto error;\r
- }\r
-\r
- // Correct buffer to max size if it maxed out result of GetBufferSize\r
- stream->out.bufferSize = maxBufferSize;\r
-\r
- // Get interface latency (actually uneeded as we calculate latency from the size\r
- // of maxBufferSize).\r
- hr = IAudioClient_GetStreamLatency(stream->out.clientParent, &stream->out.deviceLatency);\r
- if (hr != S_OK)\r
- {\r
- LogHostError(hr);\r
- LogPaError(result = paInvalidDevice);\r
- goto error;\r
- }\r
- //stream->out.latencySeconds = nano100ToSeconds(stream->out.deviceLatency);\r
-\r
- // Number of frames that are required at each period\r
- stream->out.framesPerHostCallback = maxBufferSize;\r
-\r
- // Calculate frames per single buffer, if buffers > 1 then always framesPerBuffer\r
- stream->out.framesPerBuffer =\r
- (stream->out.userBufferAndHostMatch ? stream->out.framesPerHostCallback : framesPerBuffer);\r
-\r
- // Calculate buffer latency\r
- buffer_latency = (PaTime)maxBufferSize / stream->out.wavex.Format.nSamplesPerSec;\r
-\r
- // Append buffer latency to interface latency in shared mode (see GetStreamLatency notes)\r
- stream->out.latencySeconds = buffer_latency;\r
-\r
- PRINT(("WASAPI::OpenStream(output): framesPerUser[ %d ] framesPerHost[ %d ] latency[ %.02fms ] exclusive[ %s ] wow64_fix[ %s ] mode[ %s ]\n", (UINT32)framesPerBuffer, (UINT32)stream->out.framesPerHostCallback, (float)(stream->out.latencySeconds*1000.0f), (stream->out.shareMode == AUDCLNT_SHAREMODE_EXCLUSIVE ? "YES" : "NO"), (stream->out.params.wow64_workaround ? "YES" : "NO"), (stream->out.streamFlags & AUDCLNT_STREAMFLAGS_EVENTCALLBACK ? "EVENT" : "POLL")));\r
-\r
- return paNoError;\r
-\r
-error:\r
-\r
- return result;\r
-}\r
-\r
-// ------------------------------------------------------------------------------------------\r
-static PaError ActivateAudioClientInput(PaWasapiStream *stream)\r
-{\r
- HRESULT hr;\r
- PaError result;\r
-\r
- UINT32 maxBufferSize = 0;\r
- PaTime buffer_latency = 0;\r
- UINT32 framesPerBuffer = stream->in.params.frames_per_buffer;\r
-\r
- // Create Audio client\r
- hr = CreateAudioClient(stream, &stream->in, FALSE, &result);\r
- if (hr != S_OK)\r
- {\r
- LogPaError(result);\r
- goto error;\r
- }\r
- LogWAVEFORMATEXTENSIBLE(&stream->in.wavex);\r
-\r
- // Create volume mgr\r
- stream->inVol = NULL;\r
- /*hr = info->device->Activate(\r
- __uuidof(IAudioEndpointVolume), CLSCTX_INPROC_SERVER, NULL,\r
- (void**)&stream->inVol);\r
- if (hr != S_OK)\r
- return paInvalidDevice;*/\r
-\r
- // Get max possible buffer size to check if it is not less than that we request\r
- hr = IAudioClient_GetBufferSize(stream->in.clientParent, &maxBufferSize);\r
- if (hr != S_OK)\r
- {\r
- LogHostError(hr);\r
- LogPaError(result = paInvalidDevice);\r
- goto error;\r
- }\r
-\r
- // Correct buffer to max size if it maxed out result of GetBufferSize\r
- stream->in.bufferSize = maxBufferSize;\r
-\r
- // Get interface latency (actually uneeded as we calculate latency from the size\r
- // of maxBufferSize).\r
- hr = IAudioClient_GetStreamLatency(stream->in.clientParent, &stream->in.deviceLatency);\r
- if (hr != S_OK)\r
- {\r
- LogHostError(hr);\r
- LogPaError(result = paInvalidDevice);\r
- goto error;\r
- }\r
- //stream->in.latencySeconds = nano100ToSeconds(stream->in.deviceLatency);\r
-\r
- // Number of frames that are required at each period\r
- stream->in.framesPerHostCallback = maxBufferSize;\r
-\r
- // Calculate frames per single buffer, if buffers > 1 then always framesPerBuffer\r
- stream->in.framesPerBuffer =\r
- (stream->in.userBufferAndHostMatch ? stream->in.framesPerHostCallback : framesPerBuffer);\r
-\r
- // Calculate buffer latency\r
- buffer_latency = (PaTime)maxBufferSize / stream->in.wavex.Format.nSamplesPerSec;\r
-\r
- // Append buffer latency to interface latency in shared mode (see GetStreamLatency notes)\r
- stream->in.latencySeconds = buffer_latency;\r
-\r
- PRINT(("WASAPI::OpenStream(input): framesPerUser[ %d ] framesPerHost[ %d ] latency[ %.02fms ] exclusive[ %s ] wow64_fix[ %s ] mode[ %s ]\n", (UINT32)framesPerBuffer, (UINT32)stream->in.framesPerHostCallback, (float)(stream->in.latencySeconds*1000.0f), (stream->in.shareMode == AUDCLNT_SHAREMODE_EXCLUSIVE ? "YES" : "NO"), (stream->in.params.wow64_workaround ? "YES" : "NO"), (stream->in.streamFlags & AUDCLNT_STREAMFLAGS_EVENTCALLBACK ? "EVENT" : "POLL")));\r
-\r
- return paNoError;\r
-\r
-error:\r
-\r
- return result;\r
-}\r
-\r
-// ------------------------------------------------------------------------------------------\r
-static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,\r
- PaStream** s,\r
- const PaStreamParameters *inputParameters,\r
- const PaStreamParameters *outputParameters,\r
- double sampleRate,\r
- unsigned long framesPerBuffer,\r
- PaStreamFlags streamFlags,\r
- PaStreamCallback *streamCallback,\r
- void *userData )\r
-{\r
- PaError result = paNoError;\r
- HRESULT hr;\r
- PaWasapiHostApiRepresentation *paWasapi = (PaWasapiHostApiRepresentation*)hostApi;\r
- PaWasapiStream *stream = NULL;\r
- int inputChannelCount, outputChannelCount;\r
- PaSampleFormat inputSampleFormat, outputSampleFormat;\r
- PaSampleFormat hostInputSampleFormat, hostOutputSampleFormat;\r
- PaWasapiStreamInfo *inputStreamInfo = NULL, *outputStreamInfo = NULL;\r
- PaWasapiDeviceInfo *info = NULL;\r
- ULONG framesPerHostCallback;\r
- PaUtilHostBufferSizeMode bufferMode;\r
- const BOOL fullDuplex = ((inputParameters != NULL) && (outputParameters != NULL));\r
-\r
- // validate PaStreamParameters\r
- if ((result = IsStreamParamsValid(hostApi, inputParameters, outputParameters, sampleRate)) != paNoError)\r
- return LogPaError(result);\r
-\r
- // Validate platform specific flags\r
- if ((streamFlags & paPlatformSpecificFlags) != 0)\r
- {\r
- LogPaError(result = paInvalidFlag); /* unexpected platform specific flag */\r
- goto error;\r
- }\r
-\r
- // Allocate memory for PaWasapiStream\r
- if ((stream = (PaWasapiStream *)PaUtil_AllocateMemory(sizeof(PaWasapiStream))) == NULL)\r
- {\r
- LogPaError(result = paInsufficientMemory);\r
- goto error;\r
- }\r
-\r
- // Default thread priority is Audio: for exclusive mode we will use Pro Audio.\r
- stream->nThreadPriority = eThreadPriorityAudio;\r
-\r
- // Set default number of frames: paFramesPerBufferUnspecified\r
- if (framesPerBuffer == paFramesPerBufferUnspecified)\r
- {\r
- UINT32 framesPerBufferIn = 0, framesPerBufferOut = 0;\r
- if (inputParameters != NULL)\r
- {\r
- info = &paWasapi->devInfo[inputParameters->device];\r
- framesPerBufferIn = MakeFramesFromHns(info->DefaultDevicePeriod, (UINT32)sampleRate);\r
- }\r
- if (outputParameters != NULL)\r
- {\r
- info = &paWasapi->devInfo[outputParameters->device];\r
- framesPerBufferOut = MakeFramesFromHns(info->DefaultDevicePeriod, (UINT32)sampleRate);\r
- }\r
- // choosing maximum default size\r
- framesPerBuffer = max(framesPerBufferIn, framesPerBufferOut);\r
- }\r
- if (framesPerBuffer == 0)\r
- framesPerBuffer = ((UINT32)sampleRate / 100) * 2;\r
-\r
- // Try create device: Input\r
- if (inputParameters != NULL)\r
- {\r
- inputChannelCount = inputParameters->channelCount;\r
- inputSampleFormat = inputParameters->sampleFormat;\r
- info = &paWasapi->devInfo[inputParameters->device];\r
-\r
- // default Shared Mode\r
- stream->in.shareMode = AUDCLNT_SHAREMODE_SHARED;\r
-\r
- // PaWasapiStreamInfo\r
- if (inputParameters->hostApiSpecificStreamInfo != NULL)\r
- {\r
- memcpy(&stream->in.params.wasapi_params, inputParameters->hostApiSpecificStreamInfo, min(sizeof(stream->in.params.wasapi_params), ((PaWasapiStreamInfo *)inputParameters->hostApiSpecificStreamInfo)->size));\r
- stream->in.params.wasapi_params.size = sizeof(stream->in.params.wasapi_params);\r
-\r
- stream->in.params.stream_params.hostApiSpecificStreamInfo = &stream->in.params.wasapi_params;\r
- inputStreamInfo = &stream->in.params.wasapi_params;\r
-\r
- stream->in.flags = inputStreamInfo->flags;\r
-\r
- // Exclusive Mode\r
- if (inputStreamInfo->flags & paWinWasapiExclusive)\r
- {\r
- // Boost thread priority\r
- stream->nThreadPriority = eThreadPriorityProAudio;\r
- // Make Exclusive\r
- stream->in.shareMode = AUDCLNT_SHAREMODE_EXCLUSIVE;\r
- }\r
-\r
- // explicit thread priority level\r
- if (inputStreamInfo->flags & paWinWasapiThreadPriority)\r
- {\r
- if ((inputStreamInfo->threadPriority > eThreadPriorityNone) &&\r
- (inputStreamInfo->threadPriority <= eThreadPriorityWindowManager))\r
- stream->nThreadPriority = inputStreamInfo->threadPriority;\r
- }\r
- }\r
-\r
- // Choose processing mode\r
- stream->in.streamFlags = (stream->in.shareMode == AUDCLNT_SHAREMODE_EXCLUSIVE ? AUDCLNT_STREAMFLAGS_EVENTCALLBACK : 0);\r
- if (paWasapi->useWOW64Workaround)\r
- stream->in.streamFlags = 0; // polling interface\r
- else\r
- if (streamCallback == NULL)\r
- stream->in.streamFlags = 0; // polling interface\r
- else\r
- if ((inputStreamInfo != NULL) && (inputStreamInfo->flags & paWinWasapiPolling))\r
- stream->in.streamFlags = 0; // polling interface\r
- else\r
- if (fullDuplex)\r
- stream->in.streamFlags = 0; // polling interface is implemented for full-duplex mode also\r
-\r
- // Fill parameters for Audio Client creation\r
- stream->in.params.device_info = info;\r
- stream->in.params.stream_params = (*inputParameters);\r
- stream->in.params.frames_per_buffer = framesPerBuffer;\r
- stream->in.params.sample_rate = sampleRate;\r
- stream->in.params.blocking = (streamCallback == NULL);\r
- stream->in.params.full_duplex = fullDuplex;\r
- stream->in.params.wow64_workaround = paWasapi->useWOW64Workaround;\r
-\r
- // Create and activate audio client\r
- hr = ActivateAudioClientInput(stream);\r
- if (hr != S_OK)\r
- {\r
- LogPaError(result = paInvalidDevice);\r
- goto error;\r
- }\r
-\r
- // Get closest format\r
- hostInputSampleFormat = PaUtil_SelectClosestAvailableFormat( WaveToPaFormat(&stream->in.wavex), inputSampleFormat );\r
-\r
- // Set user-side custom host processor\r
- if ((inputStreamInfo != NULL) &&\r
- (inputStreamInfo->flags & paWinWasapiRedirectHostProcessor))\r
- {\r
- stream->hostProcessOverrideInput.processor = inputStreamInfo->hostProcessorInput;\r
- stream->hostProcessOverrideInput.userData = userData;\r
- }\r
-\r
- // Only get IAudioCaptureClient input once here instead of getting it at multiple places based on the use\r
- hr = IAudioClient_GetService(stream->in.clientParent, &pa_IID_IAudioCaptureClient, (void **)&stream->captureClientParent);\r
- if (hr != S_OK)\r
- {\r
- LogHostError(hr);\r
- LogPaError(result = paUnanticipatedHostError);\r
- goto error;\r
- }\r
-\r
- // Create ring buffer for blocking mode (It is needed because we fetch Input packets, not frames,\r
- // and thus we have to save partial packet if such remains unread)\r
- if (stream->in.params.blocking == TRUE)\r
- {\r
- UINT32 bufferFrames = ALIGN_NEXT_POW2((stream->in.framesPerHostCallback / WASAPI_PACKETS_PER_INPUT_BUFFER) * 2);\r
- UINT32 frameSize = stream->in.wavex.Format.nBlockAlign;\r
-\r
- // buffer\r
- if ((stream->in.tailBuffer = PaUtil_AllocateMemory(sizeof(PaUtilRingBuffer))) == NULL)\r
- {\r
- LogPaError(result = paInsufficientMemory);\r
- goto error;\r
- }\r
- memset(stream->in.tailBuffer, 0, sizeof(PaUtilRingBuffer));\r
-\r
- // buffer memory region\r
- stream->in.tailBufferMemory = PaUtil_AllocateMemory(frameSize * bufferFrames);\r
- if (stream->in.tailBufferMemory == NULL)\r
- {\r
- LogPaError(result = paInsufficientMemory);\r
- goto error;\r
- }\r
-\r
- // initialize\r
- if (PaUtil_InitializeRingBuffer(stream->in.tailBuffer, frameSize, bufferFrames, stream->in.tailBufferMemory) != 0)\r
- {\r
- LogPaError(result = paInternalError);\r
- goto error;\r
- }\r
- }\r
- }\r
- else\r
- {\r
- inputChannelCount = 0;\r
- inputSampleFormat = hostInputSampleFormat = paInt16; /* Surpress 'uninitialised var' warnings. */\r
- }\r
-\r
- // Try create device: Output\r
- if (outputParameters != NULL)\r
- {\r
- outputChannelCount = outputParameters->channelCount;\r
- outputSampleFormat = outputParameters->sampleFormat;\r
- info = &paWasapi->devInfo[outputParameters->device];\r
-\r
- // default Shared Mode\r
- stream->out.shareMode = AUDCLNT_SHAREMODE_SHARED;\r
-\r
- // set PaWasapiStreamInfo\r
- if (outputParameters->hostApiSpecificStreamInfo != NULL)\r
- {\r
- memcpy(&stream->out.params.wasapi_params, outputParameters->hostApiSpecificStreamInfo, min(sizeof(stream->out.params.wasapi_params), ((PaWasapiStreamInfo *)outputParameters->hostApiSpecificStreamInfo)->size));\r
- stream->out.params.wasapi_params.size = sizeof(stream->out.params.wasapi_params);\r
-\r
- stream->out.params.stream_params.hostApiSpecificStreamInfo = &stream->out.params.wasapi_params;\r
- outputStreamInfo = &stream->out.params.wasapi_params;\r
-\r
- stream->out.flags = outputStreamInfo->flags;\r
-\r
- // Exclusive Mode\r
- if (outputStreamInfo->flags & paWinWasapiExclusive)\r
- {\r
- // Boost thread priority\r
- stream->nThreadPriority = eThreadPriorityProAudio;\r
- // Make Exclusive\r
- stream->out.shareMode = AUDCLNT_SHAREMODE_EXCLUSIVE;\r
- }\r
-\r
- // explicit thread priority level\r
- if (outputStreamInfo->flags & paWinWasapiThreadPriority)\r
- {\r
- if ((outputStreamInfo->threadPriority > eThreadPriorityNone) &&\r
- (outputStreamInfo->threadPriority <= eThreadPriorityWindowManager))\r
- stream->nThreadPriority = outputStreamInfo->threadPriority;\r
- }\r
- }\r
-\r
- // Choose processing mode\r
- stream->out.streamFlags = (stream->out.shareMode == AUDCLNT_SHAREMODE_EXCLUSIVE ? AUDCLNT_STREAMFLAGS_EVENTCALLBACK : 0);\r
- if (paWasapi->useWOW64Workaround)\r
- stream->out.streamFlags = 0; // polling interface\r
- else\r
- if (streamCallback == NULL)\r
- stream->out.streamFlags = 0; // polling interface\r
- else\r
- if ((outputStreamInfo != NULL) && (outputStreamInfo->flags & paWinWasapiPolling))\r
- stream->out.streamFlags = 0; // polling interface\r
- else\r
- if (fullDuplex)\r
- stream->out.streamFlags = 0; // polling interface is implemented for full-duplex mode also\r
-\r
- // Fill parameters for Audio Client creation\r
- stream->out.params.device_info = info;\r
- stream->out.params.stream_params = (*outputParameters);\r
- stream->out.params.frames_per_buffer = framesPerBuffer;\r
- stream->out.params.sample_rate = sampleRate;\r
- stream->out.params.blocking = (streamCallback == NULL);\r
- stream->out.params.full_duplex = fullDuplex;\r
- stream->out.params.wow64_workaround = paWasapi->useWOW64Workaround;\r
-\r
- // Create and activate audio client\r
- hr = ActivateAudioClientOutput(stream);\r
- if (hr != S_OK)\r
- {\r
- LogPaError(result = paInvalidDevice);\r
- goto error;\r
- }\r
-\r
- // Get closest format\r
- hostOutputSampleFormat = PaUtil_SelectClosestAvailableFormat( WaveToPaFormat(&stream->out.wavex), outputSampleFormat );\r
-\r
- // Set user-side custom host processor\r
- if ((outputStreamInfo != NULL) &&\r
- (outputStreamInfo->flags & paWinWasapiRedirectHostProcessor))\r
- {\r
- stream->hostProcessOverrideOutput.processor = outputStreamInfo->hostProcessorOutput;\r
- stream->hostProcessOverrideOutput.userData = userData;\r
- }\r
-\r
- // Only get IAudioCaptureClient output once here instead of getting it at multiple places based on the use\r
- hr = IAudioClient_GetService(stream->out.clientParent, &pa_IID_IAudioRenderClient, (void **)&stream->renderClientParent);\r
- if (hr != S_OK)\r
- {\r
- LogHostError(hr);\r
- LogPaError(result = paUnanticipatedHostError);\r
- goto error;\r
- }\r
- }\r
- else\r
- {\r
- outputChannelCount = 0;\r
- outputSampleFormat = hostOutputSampleFormat = paInt16; /* Surpress 'uninitialized var' warnings. */\r
- }\r
-\r
- // log full-duplex\r
- if (fullDuplex)\r
- PRINT(("WASAPI::OpenStream: full-duplex mode\n"));\r
-\r
- // paWinWasapiPolling must be on/or not on both streams\r
- if ((inputParameters != NULL) && (outputParameters != NULL))\r
- {\r
- if ((inputStreamInfo != NULL) && (outputStreamInfo != NULL))\r
- {\r
- if (((inputStreamInfo->flags & paWinWasapiPolling) &&\r
- !(outputStreamInfo->flags & paWinWasapiPolling))\r
- ||\r
- (!(inputStreamInfo->flags & paWinWasapiPolling) &&\r
- (outputStreamInfo->flags & paWinWasapiPolling)))\r
- {\r
- LogPaError(result = paInvalidFlag);\r
- goto error;\r
- }\r
- }\r
- }\r
-\r
- // Initialize stream representation\r
- if (streamCallback)\r
- {\r
- stream->bBlocking = FALSE;\r
- PaUtil_InitializeStreamRepresentation(&stream->streamRepresentation,\r
- &paWasapi->callbackStreamInterface,\r
- streamCallback, userData);\r
- }\r
- else\r
- {\r
- stream->bBlocking = TRUE;\r
- PaUtil_InitializeStreamRepresentation(&stream->streamRepresentation,\r
- &paWasapi->blockingStreamInterface,\r
- streamCallback, userData);\r
- }\r
-\r
- // Initialize CPU measurer\r
- PaUtil_InitializeCpuLoadMeasurer(&stream->cpuLoadMeasurer, sampleRate);\r
-\r
- if (outputParameters && inputParameters)\r
- {\r
- // serious problem #1 - No, Not a problem, especially concerning Exclusive mode.\r
- // Input device in exclusive mode somehow is getting large buffer always, thus we\r
- // adjust Output latency to reflect it, thus period will differ but playback will be\r
- // normal.\r
- /*if (stream->in.period != stream->out.period)\r
- {\r
- PRINT(("WASAPI: OpenStream: period discrepancy\n"));\r
- LogPaError(result = paBadIODeviceCombination);\r
- goto error;\r
- }*/\r
-\r
- // serious problem #2 - No, Not a problem, as framesPerHostCallback take into account\r
- // sample size while it is not a problem for PA full-duplex, we must care of\r
- // preriod only!\r
- /*if (stream->out.framesPerHostCallback != stream->in.framesPerHostCallback)\r
- {\r
- PRINT(("WASAPI: OpenStream: framesPerHostCallback discrepancy\n"));\r
- goto error;\r
- }*/\r
- }\r
-\r
- // Calculate frames per host for processor\r
- framesPerHostCallback = (outputParameters ? stream->out.framesPerBuffer : stream->in.framesPerBuffer);\r
-\r
- // Choose correct mode of buffer processing:\r
- // Exclusive/Shared non paWinWasapiPolling mode: paUtilFixedHostBufferSize - always fixed\r
- // Exclusive/Shared paWinWasapiPolling mode: paUtilBoundedHostBufferSize - may vary for Exclusive or Full-duplex\r
- bufferMode = paUtilFixedHostBufferSize;\r
- if (inputParameters) // !!! WASAPI IAudioCaptureClient::GetBuffer extracts not number of frames but 1 packet, thus we always must adapt\r
- bufferMode = paUtilBoundedHostBufferSize;\r
- else\r
- if (outputParameters)\r
- {\r
- if ((stream->out.buffers == 1) &&\r
- (!stream->out.streamFlags || ((stream->out.streamFlags & AUDCLNT_STREAMFLAGS_EVENTCALLBACK) == 0)))\r
- bufferMode = paUtilBoundedHostBufferSize;\r
- }\r
- stream->bufferMode = bufferMode;\r
-\r
- // Initialize buffer processor\r
- result = PaUtil_InitializeBufferProcessor(\r
- &stream->bufferProcessor,\r
- inputChannelCount,\r
- inputSampleFormat,\r
- hostInputSampleFormat,\r
- outputChannelCount,\r
- outputSampleFormat,\r
- hostOutputSampleFormat,\r
- sampleRate,\r
- streamFlags,\r
- framesPerBuffer,\r
- framesPerHostCallback,\r
- bufferMode,\r
- streamCallback,\r
- userData);\r
- if (result != paNoError)\r
- {\r
- LogPaError(result);\r
- goto error;\r
- }\r
-\r
- // Set Input latency\r
- stream->streamRepresentation.streamInfo.inputLatency =\r
- ((double)PaUtil_GetBufferProcessorInputLatencyFrames(&stream->bufferProcessor) / sampleRate)\r
- + ((inputParameters)?stream->in.latencySeconds : 0);\r
-\r
- // Set Output latency\r
- stream->streamRepresentation.streamInfo.outputLatency =\r
- ((double)PaUtil_GetBufferProcessorOutputLatencyFrames(&stream->bufferProcessor) / sampleRate)\r
- + ((outputParameters)?stream->out.latencySeconds : 0);\r
-\r
- // Set SR\r
- stream->streamRepresentation.streamInfo.sampleRate = sampleRate;\r
-\r
- (*s) = (PaStream *)stream;\r
- return result;\r
-\r
-error:\r
-\r
- if (stream != NULL)\r
- CloseStream(stream);\r
-\r
- return result;\r
-}\r
-\r
-// ------------------------------------------------------------------------------------------\r
-static PaError CloseStream( PaStream* s )\r
-{\r
- PaError result = paNoError;\r
- PaWasapiStream *stream = (PaWasapiStream*)s;\r
-\r
- // abort active stream\r
- if (IsStreamActive(s))\r
- {\r
- result = AbortStream(s);\r
- }\r
-\r
- SAFE_RELEASE(stream->captureClientParent);\r
- SAFE_RELEASE(stream->renderClientParent);\r
- SAFE_RELEASE(stream->out.clientParent);\r
- SAFE_RELEASE(stream->in.clientParent);\r
- SAFE_RELEASE(stream->inVol);\r
- SAFE_RELEASE(stream->outVol);\r
-\r
- CloseHandle(stream->event[S_INPUT]);\r
- CloseHandle(stream->event[S_OUTPUT]);\r
-\r
- _StreamCleanup(stream);\r
-\r
- PaWasapi_FreeMemory(stream->in.monoBuffer);\r
- PaWasapi_FreeMemory(stream->out.monoBuffer);\r
-\r
- PaUtil_FreeMemory(stream->in.tailBuffer);\r
- PaUtil_FreeMemory(stream->in.tailBufferMemory);\r
-\r
- PaUtil_FreeMemory(stream->out.tailBuffer);\r
- PaUtil_FreeMemory(stream->out.tailBufferMemory);\r
-\r
- PaUtil_TerminateBufferProcessor(&stream->bufferProcessor);\r
- PaUtil_TerminateStreamRepresentation(&stream->streamRepresentation);\r
- PaUtil_FreeMemory(stream);\r
-\r
- return result;\r
-}\r
-\r
-// ------------------------------------------------------------------------------------------\r
-HRESULT UnmarshalSubStreamComPointers(PaWasapiSubStream *substream) \r
-{\r
- HRESULT hResult = S_OK;\r
- HRESULT hFirstBadResult = S_OK;\r
- substream->clientProc = NULL;\r
-\r
- // IAudioClient\r
- hResult = CoGetInterfaceAndReleaseStream(substream->clientStream, GetAudioClientIID(), (LPVOID*)&substream->clientProc);\r
- substream->clientStream = NULL;\r
- if (hResult != S_OK) \r
- {\r
- hFirstBadResult = (hFirstBadResult == S_OK) ? hResult : hFirstBadResult;\r
- }\r
-\r
- return hFirstBadResult;\r
-}\r
-\r
-// ------------------------------------------------------------------------------------------\r
-HRESULT UnmarshalStreamComPointers(PaWasapiStream *stream) \r
-{\r
- HRESULT hResult = S_OK;\r
- HRESULT hFirstBadResult = S_OK;\r
- stream->captureClient = NULL;\r
- stream->renderClient = NULL;\r
- stream->in.clientProc = NULL;\r
- stream->out.clientProc = NULL;\r
-\r
- if (NULL != stream->in.clientParent) \r
- {\r
- // SubStream pointers\r
- hResult = UnmarshalSubStreamComPointers(&stream->in);\r
- if (hResult != S_OK) \r
- {\r
- hFirstBadResult = (hFirstBadResult == S_OK) ? hResult : hFirstBadResult;\r
- }\r
-\r
- // IAudioCaptureClient\r
- hResult = CoGetInterfaceAndReleaseStream(stream->captureClientStream, &pa_IID_IAudioCaptureClient, (LPVOID*)&stream->captureClient);\r
- stream->captureClientStream = NULL;\r
- if (hResult != S_OK) \r
- {\r
- hFirstBadResult = (hFirstBadResult == S_OK) ? hResult : hFirstBadResult;\r
- }\r
- }\r
-\r
- if (NULL != stream->out.clientParent) \r
- {\r
- // SubStream pointers\r
- hResult = UnmarshalSubStreamComPointers(&stream->out);\r
- if (hResult != S_OK) \r
- {\r
- hFirstBadResult = (hFirstBadResult == S_OK) ? hResult : hFirstBadResult;\r
- }\r
-\r
- // IAudioRenderClient\r
- hResult = CoGetInterfaceAndReleaseStream(stream->renderClientStream, &pa_IID_IAudioRenderClient, (LPVOID*)&stream->renderClient);\r
- stream->renderClientStream = NULL;\r
- if (hResult != S_OK) \r
- {\r
- hFirstBadResult = (hFirstBadResult == S_OK) ? hResult : hFirstBadResult;\r
- }\r
- }\r
-\r
- return hFirstBadResult;\r
-}\r
-\r
-// -----------------------------------------------------------------------------------------\r
-void ReleaseUnmarshaledSubComPointers(PaWasapiSubStream *substream) \r
-{\r
- SAFE_RELEASE(substream->clientProc);\r
-}\r
-\r
-// -----------------------------------------------------------------------------------------\r
-void ReleaseUnmarshaledComPointers(PaWasapiStream *stream) \r
-{\r
- // Release AudioClient services first\r
- SAFE_RELEASE(stream->captureClient);\r
- SAFE_RELEASE(stream->renderClient);\r
-\r
- // Release AudioClients\r
- ReleaseUnmarshaledSubComPointers(&stream->in);\r
- ReleaseUnmarshaledSubComPointers(&stream->out);\r
-}\r
-\r
-// ------------------------------------------------------------------------------------------\r
-HRESULT MarshalSubStreamComPointers(PaWasapiSubStream *substream) \r
-{\r
- HRESULT hResult;\r
- substream->clientStream = NULL;\r
-\r
- // IAudioClient\r
- hResult = CoMarshalInterThreadInterfaceInStream(GetAudioClientIID(), (LPUNKNOWN)substream->clientParent, &substream->clientStream);\r
- if (hResult != S_OK)\r
- goto marshal_sub_error;\r
-\r
- return hResult;\r
-\r
- // If marshaling error occurred, make sure to release everything.\r
-marshal_sub_error:\r
-\r
- UnmarshalSubStreamComPointers(substream);\r
- ReleaseUnmarshaledSubComPointers(substream);\r
- return hResult;\r
-}\r
-\r
-// ------------------------------------------------------------------------------------------\r
-HRESULT MarshalStreamComPointers(PaWasapiStream *stream) \r
-{\r
- HRESULT hResult = S_OK;\r
- stream->captureClientStream = NULL;\r
- stream->in.clientStream = NULL;\r
- stream->renderClientStream = NULL;\r
- stream->out.clientStream = NULL;\r
-\r
- if (NULL != stream->in.clientParent) \r
- {\r
- // SubStream pointers\r
- hResult = MarshalSubStreamComPointers(&stream->in);\r
- if (hResult != S_OK) \r
- goto marshal_error;\r
-\r
- // IAudioCaptureClient\r
- hResult = CoMarshalInterThreadInterfaceInStream(&pa_IID_IAudioCaptureClient, (LPUNKNOWN)stream->captureClientParent, &stream->captureClientStream);\r
- if (hResult != S_OK) \r
- goto marshal_error;\r
- }\r
-\r
- if (NULL != stream->out.clientParent) \r
- {\r
- // SubStream pointers\r
- hResult = MarshalSubStreamComPointers(&stream->out);\r
- if (hResult != S_OK) \r
- goto marshal_error;\r
-\r
- // IAudioRenderClient\r
- hResult = CoMarshalInterThreadInterfaceInStream(&pa_IID_IAudioRenderClient, (LPUNKNOWN)stream->renderClientParent, &stream->renderClientStream);\r
- if (hResult != S_OK) \r
- goto marshal_error;\r
- }\r
-\r
- return hResult;\r
-\r
- // If marshaling error occurred, make sure to release everything.\r
-marshal_error:\r
-\r
- UnmarshalStreamComPointers(stream);\r
- ReleaseUnmarshaledComPointers(stream);\r
- return hResult;\r
-}\r
-\r
-// ------------------------------------------------------------------------------------------\r
-static PaError StartStream( PaStream *s )\r
-{\r
- HRESULT hr;\r
- PaWasapiStream *stream = (PaWasapiStream*)s;\r
- PaError result = paNoError;\r
-\r
- // check if stream is active already\r
- if (IsStreamActive(s))\r
- return paStreamIsNotStopped;\r
-\r
- PaUtil_ResetBufferProcessor(&stream->bufferProcessor);\r
-\r
- // Cleanup handles (may be necessary if stream was stopped by itself due to error)\r
- _StreamCleanup(stream);\r
-\r
- // Create close event\r
- if ((stream->hCloseRequest = CreateEvent(NULL, TRUE, FALSE, NULL)) == NULL) \r
- {\r
- result = paInsufficientMemory;\r
- goto start_error;\r
- }\r
-\r
- // Create thread\r
- if (!stream->bBlocking)\r
- {\r
- // Create thread events\r
- stream->hThreadStart = CreateEvent(NULL, TRUE, FALSE, NULL);\r
- stream->hThreadExit = CreateEvent(NULL, TRUE, FALSE, NULL);\r
- if ((stream->hThreadStart == NULL) || (stream->hThreadExit == NULL))\r
- {\r
- result = paInsufficientMemory;\r
- goto start_error;\r
- }\r
-\r
- // Marshal WASAPI interface pointers for safe use in thread created below.\r
- if ((hr = MarshalStreamComPointers(stream)) != S_OK) \r
- {\r
- PRINT(("Failed marshaling stream COM pointers."));\r
- result = paUnanticipatedHostError;\r
- goto nonblocking_start_error;\r
- }\r
-\r
- if ((stream->in.clientParent && (stream->in.streamFlags & AUDCLNT_STREAMFLAGS_EVENTCALLBACK)) ||\r
- (stream->out.clientParent && (stream->out.streamFlags & AUDCLNT_STREAMFLAGS_EVENTCALLBACK)))\r
- {\r
- if ((stream->hThread = CREATE_THREAD(ProcThreadEvent)) == NULL) \r
- {\r
- PRINT(("Failed creating thread: ProcThreadEvent."));\r
- result = paUnanticipatedHostError;\r
- goto nonblocking_start_error;\r
- }\r
- }\r
- else\r
- {\r
- if ((stream->hThread = CREATE_THREAD(ProcThreadPoll)) == NULL) \r
- {\r
- PRINT(("Failed creating thread: ProcThreadPoll."));\r
- result = paUnanticipatedHostError;\r
- goto nonblocking_start_error;\r
- }\r
- }\r
-\r
- // Wait for thread to start\r
- if (WaitForSingleObject(stream->hThreadStart, 60*1000) == WAIT_TIMEOUT) \r
- {\r
- PRINT(("Failed starting thread: timeout."));\r
- result = paUnanticipatedHostError;\r
- goto nonblocking_start_error;\r
- }\r
- }\r
- else\r
- {\r
- // Create blocking operation events (non-signaled event means - blocking operation is pending)\r
- if (stream->out.clientParent != NULL) \r
- {\r
- if ((stream->hBlockingOpStreamWR = CreateEvent(NULL, TRUE, TRUE, NULL)) == NULL) \r
- {\r
- result = paInsufficientMemory;\r
- goto start_error;\r
- }\r
- }\r
- if (stream->in.clientParent != NULL) \r
- {\r
- if ((stream->hBlockingOpStreamRD = CreateEvent(NULL, TRUE, TRUE, NULL)) == NULL) \r
- {\r
- result = paInsufficientMemory;\r
- goto start_error;\r
- }\r
- }\r
-\r
- // Initialize event & start INPUT stream\r
- if (stream->in.clientParent != NULL)\r
- {\r
- if ((hr = IAudioClient_Start(stream->in.clientParent)) != S_OK)\r
- {\r
- LogHostError(hr);\r
- result = paUnanticipatedHostError;\r
- goto start_error;\r
- }\r
- }\r
-\r
- // Initialize event & start OUTPUT stream\r
- if (stream->out.clientParent != NULL)\r
- {\r
- // Start\r
- if ((hr = IAudioClient_Start(stream->out.clientParent)) != S_OK)\r
- {\r
- LogHostError(hr);\r
- result = paUnanticipatedHostError;\r
- goto start_error;\r
- }\r
- }\r
-\r
- // Set parent to working pointers to use shared functions.\r
- stream->captureClient = stream->captureClientParent;\r
- stream->renderClient = stream->renderClientParent;\r
- stream->in.clientProc = stream->in.clientParent;\r
- stream->out.clientProc = stream->out.clientParent;\r
-\r
- // Signal: stream running.\r
- stream->running = TRUE;\r
- }\r
-\r
- return result;\r
-\r
-nonblocking_start_error:\r
-\r
- // Set hThreadExit event to prevent blocking during cleanup\r
- SetEvent(stream->hThreadExit);\r
- UnmarshalStreamComPointers(stream);\r
- ReleaseUnmarshaledComPointers(stream);\r
-\r
-start_error:\r
-\r
- StopStream(s);\r
- return result;\r
-}\r
-\r
-// ------------------------------------------------------------------------------------------\r
-void _StreamFinish(PaWasapiStream *stream)\r
-{\r
- // Issue command to thread to stop processing and wait for thread exit\r
- if (!stream->bBlocking)\r
- {\r
- SignalObjectAndWait(stream->hCloseRequest, stream->hThreadExit, INFINITE, FALSE);\r
- }\r
- else\r
- // Blocking mode does not own thread\r
- {\r
- // Signal close event and wait for each of 2 blocking operations to complete\r
- if (stream->out.clientParent)\r
- SignalObjectAndWait(stream->hCloseRequest, stream->hBlockingOpStreamWR, INFINITE, TRUE);\r
- if (stream->out.clientParent)\r
- SignalObjectAndWait(stream->hCloseRequest, stream->hBlockingOpStreamRD, INFINITE, TRUE);\r
-\r
- // Process stop\r
- _StreamOnStop(stream);\r
- }\r
-\r
- // Cleanup handles\r
- _StreamCleanup(stream);\r
-\r
- stream->running = FALSE;\r
-}\r
-\r
-// ------------------------------------------------------------------------------------------\r
-void _StreamCleanup(PaWasapiStream *stream)\r
-{\r
- // Close thread handles to allow restart\r
- SAFE_CLOSE(stream->hThread);\r
- SAFE_CLOSE(stream->hThreadStart);\r
- SAFE_CLOSE(stream->hThreadExit);\r
- SAFE_CLOSE(stream->hCloseRequest);\r
- SAFE_CLOSE(stream->hBlockingOpStreamRD);\r
- SAFE_CLOSE(stream->hBlockingOpStreamWR);\r
-}\r
-\r
-// ------------------------------------------------------------------------------------------\r
-static PaError StopStream( PaStream *s )\r
-{\r
- // Finish stream\r
- _StreamFinish((PaWasapiStream *)s);\r
- return paNoError;\r
-}\r
-\r
-// ------------------------------------------------------------------------------------------\r
-static PaError AbortStream( PaStream *s )\r
-{\r
- // Finish stream\r
- _StreamFinish((PaWasapiStream *)s);\r
- return paNoError;\r
-}\r
-\r
-// ------------------------------------------------------------------------------------------\r
-static PaError IsStreamStopped( PaStream *s )\r
-{\r
- return !((PaWasapiStream *)s)->running;\r
-}\r
-\r
-// ------------------------------------------------------------------------------------------\r
-static PaError IsStreamActive( PaStream *s )\r
-{\r
- return ((PaWasapiStream *)s)->running;\r
-}\r
-\r
-// ------------------------------------------------------------------------------------------\r
-static PaTime GetStreamTime( PaStream *s )\r
-{\r
- PaWasapiStream *stream = (PaWasapiStream*)s;\r
-\r
- /* suppress unused variable warnings */\r
- (void) stream;\r
-\r
- return PaUtil_GetTime();\r
-}\r
-\r
-// ------------------------------------------------------------------------------------------\r
-static double GetStreamCpuLoad( PaStream* s )\r
-{\r
- return PaUtil_GetCpuLoad(&((PaWasapiStream *)s)->cpuLoadMeasurer);\r
-}\r
-\r
-// ------------------------------------------------------------------------------------------\r
-static PaError ReadStream( PaStream* s, void *_buffer, unsigned long frames )\r
-{\r
- PaWasapiStream *stream = (PaWasapiStream*)s;\r
-\r
- HRESULT hr = S_OK;\r
- BYTE *user_buffer = (BYTE *)_buffer;\r
- BYTE *wasapi_buffer = NULL;\r
- DWORD flags = 0;\r
- UINT32 i, available, sleep = 0;\r
- unsigned long processed;\r
- ThreadIdleScheduler sched;\r
-\r
- // validate\r
- if (!stream->running)\r
- return paStreamIsStopped;\r
- if (stream->captureClient == NULL)\r
- return paBadStreamPtr;\r
-\r
- // Notify blocking op has begun\r
- ResetEvent(stream->hBlockingOpStreamRD);\r
-\r
- // Use thread scheduling for 500 microseconds (emulated) when wait time for frames is less than\r
- // 1 milliseconds, emulation helps to normalize CPU consumption and avoids too busy waiting\r
- ThreadIdleScheduler_Setup(&sched, 1, 250/* microseconds */);\r
-\r
- // Make a local copy of the user buffer pointer(s), this is necessary\r
- // because PaUtil_CopyOutput() advances these pointers every time it is called\r
- if (!stream->bufferProcessor.userInputIsInterleaved)\r
- {\r
- user_buffer = (BYTE *)alloca(sizeof(BYTE *) * stream->bufferProcessor.inputChannelCount);\r
- if (user_buffer == NULL)\r
- return paInsufficientMemory;\r
-\r
- for (i = 0; i < stream->bufferProcessor.inputChannelCount; ++i)\r
- ((BYTE **)user_buffer)[i] = ((BYTE **)_buffer)[i];\r
- }\r
-\r
- // Findout if there are tail frames, flush them all before reading hardware\r
- if ((available = PaUtil_GetRingBufferReadAvailable(stream->in.tailBuffer)) != 0)\r
- {\r
- ring_buffer_size_t buf1_size = 0, buf2_size = 0, read, desired;\r
- void *buf1 = NULL, *buf2 = NULL;\r
-\r
- // Limit desired to amount of requested frames\r
- desired = available;\r
- if ((UINT32)desired > frames)\r
- desired = frames;\r
- \r
- // Get pointers to read regions\r
- read = PaUtil_GetRingBufferReadRegions(stream->in.tailBuffer, desired, &buf1, &buf1_size, &buf2, &buf2_size);\r
-\r
- if (buf1 != NULL)\r
- {\r
- // Register available frames to processor\r
- PaUtil_SetInputFrameCount(&stream->bufferProcessor, buf1_size);\r
-\r
- // Register host buffer pointer to processor\r
- PaUtil_SetInterleavedInputChannels(&stream->bufferProcessor, 0, buf1, stream->bufferProcessor.inputChannelCount);\r
-\r
- // Copy user data to host buffer (with conversion if applicable)\r
- processed = PaUtil_CopyInput(&stream->bufferProcessor, (void **)&user_buffer, buf1_size);\r
- frames -= processed;\r
- }\r
-\r
- if (buf2 != NULL)\r
- {\r
- // Register available frames to processor\r
- PaUtil_SetInputFrameCount(&stream->bufferProcessor, buf2_size);\r
-\r
- // Register host buffer pointer to processor\r
- PaUtil_SetInterleavedInputChannels(&stream->bufferProcessor, 0, buf2, stream->bufferProcessor.inputChannelCount);\r
-\r
- // Copy user data to host buffer (with conversion if applicable)\r
- processed = PaUtil_CopyInput(&stream->bufferProcessor, (void **)&user_buffer, buf2_size);\r
- frames -= processed;\r
- }\r
-\r
- // Advance\r
- PaUtil_AdvanceRingBufferReadIndex(stream->in.tailBuffer, read);\r
- }\r
-\r
- // Read hardware\r
- while (frames != 0)\r
- {\r
- // Check if blocking call must be interrupted\r
- if (WaitForSingleObject(stream->hCloseRequest, sleep) != WAIT_TIMEOUT)\r
- break;\r
-\r
- // Get available frames (must be finding out available frames before call to IAudioCaptureClient_GetBuffer\r
- // othervise audio glitches will occur inExclusive mode as it seems that WASAPI has some scheduling/\r
- // processing problems when such busy polling with IAudioCaptureClient_GetBuffer occurs)\r
- if ((hr = _PollGetInputFramesAvailable(stream, &available)) != S_OK)\r
- {\r
- LogHostError(hr);\r
- return paUnanticipatedHostError;\r
- }\r
-\r
- // Wait for more frames to become available\r
- if (available == 0)\r
- {\r
- // Exclusive mode may require latency of 1 millisecond, thus we shall sleep\r
- // around 500 microseconds (emulated) to collect packets in time\r
- if (stream->in.shareMode != AUDCLNT_SHAREMODE_EXCLUSIVE)\r
- {\r
- UINT32 sleep_frames = (frames < stream->in.framesPerHostCallback ? frames : stream->in.framesPerHostCallback);\r
-\r
- sleep = GetFramesSleepTime(sleep_frames, stream->in.wavex.Format.nSamplesPerSec);\r
- sleep /= 4; // wait only for 1/4 of the buffer\r
-\r
- // WASAPI input provides packets, thus expiring packet will result in bad audio\r
- // limit waiting time to 2 seconds (will always work for smallest buffer in Shared)\r
- if (sleep > 2)\r
- sleep = 2;\r
-\r
- // Avoid busy waiting, schedule next 1 millesecond wait\r
- if (sleep == 0)\r
- sleep = ThreadIdleScheduler_NextSleep(&sched);\r
- }\r
- else\r
- {\r
- if ((sleep = ThreadIdleScheduler_NextSleep(&sched)) != 0)\r
- {\r
- Sleep(sleep);\r
- sleep = 0;\r
- }\r
- }\r
-\r
- continue;\r
- }\r
-\r
- // Get the available data in the shared buffer.\r
- if ((hr = IAudioCaptureClient_GetBuffer(stream->captureClient, &wasapi_buffer, &available, &flags, NULL, NULL)) != S_OK)\r
- {\r
- // Buffer size is too small, waiting\r
- if (hr != AUDCLNT_S_BUFFER_EMPTY)\r
- {\r
- LogHostError(hr);\r
- goto end;\r
- }\r
-\r
- continue;\r
- }\r
-\r
- // Register available frames to processor\r
- PaUtil_SetInputFrameCount(&stream->bufferProcessor, available);\r
-\r
- // Register host buffer pointer to processor\r
- PaUtil_SetInterleavedInputChannels(&stream->bufferProcessor, 0, wasapi_buffer, stream->bufferProcessor.inputChannelCount);\r
-\r
- // Copy user data to host buffer (with conversion if applicable)\r
- processed = PaUtil_CopyInput(&stream->bufferProcessor, (void **)&user_buffer, frames);\r
- frames -= processed;\r
-\r
- // Save tail into buffer\r
- if ((frames == 0) && (available > processed))\r
- {\r
- UINT32 bytes_processed = processed * stream->in.wavex.Format.nBlockAlign;\r
- UINT32 frames_to_save = available - processed;\r
-\r
- PaUtil_WriteRingBuffer(stream->in.tailBuffer, wasapi_buffer + bytes_processed, frames_to_save);\r
- }\r
-\r
- // Release host buffer\r
- if ((hr = IAudioCaptureClient_ReleaseBuffer(stream->captureClient, available)) != S_OK)\r
- {\r
- LogHostError(hr);\r
- goto end;\r
- }\r
- }\r
-\r
-end:\r
-\r
- // Notify blocking op has ended\r
- SetEvent(stream->hBlockingOpStreamRD);\r
-\r
- return (hr != S_OK ? paUnanticipatedHostError : paNoError);\r
-}\r
-\r
-// ------------------------------------------------------------------------------------------\r
-static PaError WriteStream( PaStream* s, const void *_buffer, unsigned long frames )\r
-{\r
- PaWasapiStream *stream = (PaWasapiStream*)s;\r
-\r
- //UINT32 frames;\r
- const BYTE *user_buffer = (const BYTE *)_buffer;\r
- BYTE *wasapi_buffer;\r
- HRESULT hr = S_OK;\r
- UINT32 i, available, sleep = 0;\r
- unsigned long processed;\r
- ThreadIdleScheduler sched;\r
-\r
- // validate\r
- if (!stream->running)\r
- return paStreamIsStopped;\r
- if (stream->renderClient == NULL)\r
- return paBadStreamPtr;\r
-\r
- // Notify blocking op has begun\r
- ResetEvent(stream->hBlockingOpStreamWR);\r
-\r
- // Use thread scheduling for 500 microseconds (emulated) when wait time for frames is less than\r
- // 1 milliseconds, emulation helps to normalize CPU consumption and avoids too busy waiting\r
- ThreadIdleScheduler_Setup(&sched, 1, 500/* microseconds */);\r
-\r
- // Make a local copy of the user buffer pointer(s), this is necessary\r
- // because PaUtil_CopyOutput() advances these pointers every time it is called\r
- if (!stream->bufferProcessor.userOutputIsInterleaved)\r
- {\r
- user_buffer = (const BYTE *)alloca(sizeof(const BYTE *) * stream->bufferProcessor.outputChannelCount);\r
- if (user_buffer == NULL)\r
- return paInsufficientMemory;\r
-\r
- for (i = 0; i < stream->bufferProcessor.outputChannelCount; ++i)\r
- ((const BYTE **)user_buffer)[i] = ((const BYTE **)_buffer)[i];\r
- }\r
-\r
- // Blocking (potentially, untill 'frames' are consumed) loop\r
- while (frames != 0)\r
- {\r
- // Check if blocking call must be interrupted\r
- if (WaitForSingleObject(stream->hCloseRequest, sleep) != WAIT_TIMEOUT)\r
- break;\r
-\r
- // Get frames available\r
- if ((hr = _PollGetOutputFramesAvailable(stream, &available)) != S_OK)\r
- {\r
- LogHostError(hr);\r
- goto end;\r
- }\r
-\r
- // Wait for more frames to become available\r
- if (available == 0)\r
- {\r
- UINT32 sleep_frames = (frames < stream->out.framesPerHostCallback ? frames : stream->out.framesPerHostCallback);\r
-\r
- sleep = GetFramesSleepTime(sleep_frames, stream->out.wavex.Format.nSamplesPerSec);\r
- sleep /= 2; // wait only for half of the buffer\r
-\r
- // Avoid busy waiting, schedule next 1 millesecond wait\r
- if (sleep == 0)\r
- sleep = ThreadIdleScheduler_NextSleep(&sched);\r
-\r
- continue;\r
- }\r
-\r
- // Keep in 'frmaes' range\r
- if (available > frames)\r
- available = frames;\r
-\r
- // Get pointer to host buffer\r
- if ((hr = IAudioRenderClient_GetBuffer(stream->renderClient, available, &wasapi_buffer)) != S_OK)\r
- {\r
- // Buffer size is too big, waiting\r
- if (hr == AUDCLNT_E_BUFFER_TOO_LARGE)\r
- continue;\r
-\r
- LogHostError(hr);\r
- goto end;\r
- }\r
-\r
- // Keep waiting again (on Vista it was noticed that WASAPI could SOMETIMES return NULL pointer \r
- // to buffer without returning AUDCLNT_E_BUFFER_TOO_LARGE instead)\r
- if (wasapi_buffer == NULL)\r
- continue;\r
-\r
- // Register available frames to processor\r
- PaUtil_SetOutputFrameCount(&stream->bufferProcessor, available);\r
-\r
- // Register host buffer pointer to processor\r
- PaUtil_SetInterleavedOutputChannels(&stream->bufferProcessor, 0, wasapi_buffer, stream->bufferProcessor.outputChannelCount);\r
-\r
- // Copy user data to host buffer (with conversion if applicable), this call will advance\r
- // pointer 'user_buffer' to consumed portion of data\r
- processed = PaUtil_CopyOutput(&stream->bufferProcessor, (const void **)&user_buffer, frames);\r
- frames -= processed;\r
-\r
- // Release host buffer\r
- if ((hr = IAudioRenderClient_ReleaseBuffer(stream->renderClient, available, 0)) != S_OK)\r
- {\r
- LogHostError(hr);\r
- goto end;\r
- }\r
- }\r
-\r
-end:\r
-\r
- // Notify blocking op has ended\r
- SetEvent(stream->hBlockingOpStreamWR);\r
-\r
- return (hr != S_OK ? paUnanticipatedHostError : paNoError);\r
-}\r
-\r
-unsigned long PaUtil_GetOutputFrameCount( PaUtilBufferProcessor* bp )\r
-{\r
- return bp->hostOutputFrameCount[0];\r
-}\r
-\r
-// ------------------------------------------------------------------------------------------\r
-static signed long GetStreamReadAvailable( PaStream* s )\r
-{\r
- PaWasapiStream *stream = (PaWasapiStream*)s;\r
-\r
- HRESULT hr;\r
- UINT32 available = 0;\r
-\r
- // validate\r
- if (!stream->running)\r
- return paStreamIsStopped;\r
- if (stream->captureClient == NULL)\r
- return paBadStreamPtr;\r
-\r
- // available in hardware buffer\r
- if ((hr = _PollGetInputFramesAvailable(stream, &available)) != S_OK)\r
- {\r
- LogHostError(hr);\r
- return paUnanticipatedHostError;\r
- }\r
-\r
- // available in software tail buffer\r
- available += PaUtil_GetRingBufferReadAvailable(stream->in.tailBuffer);\r
-\r
- return available;\r
-}\r
-\r
-// ------------------------------------------------------------------------------------------\r
-static signed long GetStreamWriteAvailable( PaStream* s )\r
-{\r
- PaWasapiStream *stream = (PaWasapiStream*)s;\r
- HRESULT hr;\r
- UINT32 available = 0;\r
-\r
- // validate\r
- if (!stream->running)\r
- return paStreamIsStopped;\r
- if (stream->renderClient == NULL)\r
- return paBadStreamPtr;\r
-\r
- if ((hr = _PollGetOutputFramesAvailable(stream, &available)) != S_OK)\r
- {\r
- LogHostError(hr);\r
- return paUnanticipatedHostError;\r
- }\r
-\r
- return (signed long)available;\r
-}\r
-\r
-\r
-// ------------------------------------------------------------------------------------------\r
-static void WaspiHostProcessingLoop( void *inputBuffer, long inputFrames,\r
- void *outputBuffer, long outputFrames,\r
- void *userData )\r
-{\r
- PaWasapiStream *stream = (PaWasapiStream*)userData;\r
- PaStreamCallbackTimeInfo timeInfo = {0,0,0};\r
- PaStreamCallbackFlags flags = 0;\r
- int callbackResult;\r
- unsigned long framesProcessed;\r
- HRESULT hr;\r
- UINT32 pending;\r
-\r
- PaUtil_BeginCpuLoadMeasurement( &stream->cpuLoadMeasurer );\r
-\r
- /*\r
- Pa_GetStreamTime:\r
- - generate timing information\r
- - handle buffer slips\r
- */\r
- timeInfo.currentTime = PaUtil_GetTime();\r
- // Query input latency\r
- if (stream->in.clientProc != NULL)\r
- {\r
- PaTime pending_time;\r
- if ((hr = IAudioClient_GetCurrentPadding(stream->in.clientProc, &pending)) == S_OK)\r
- pending_time = (PaTime)pending / (PaTime)stream->in.wavex.Format.nSamplesPerSec;\r
- else\r
- pending_time = (PaTime)stream->in.latencySeconds;\r
-\r
- timeInfo.inputBufferAdcTime = timeInfo.currentTime + pending_time;\r
- }\r
- // Query output current latency\r
- if (stream->out.clientProc != NULL)\r
- {\r
- PaTime pending_time;\r
- if ((hr = IAudioClient_GetCurrentPadding(stream->out.clientProc, &pending)) == S_OK)\r
- pending_time = (PaTime)pending / (PaTime)stream->out.wavex.Format.nSamplesPerSec;\r
- else\r
- pending_time = (PaTime)stream->out.latencySeconds;\r
-\r
- timeInfo.outputBufferDacTime = timeInfo.currentTime + pending_time;\r
- }\r
-\r
- /*\r
- If you need to byte swap or shift inputBuffer to convert it into a\r
- portaudio format, do it here.\r
- */\r
-\r
- PaUtil_BeginBufferProcessing( &stream->bufferProcessor, &timeInfo, flags );\r
-\r
- /*\r
- depending on whether the host buffers are interleaved, non-interleaved\r
- or a mixture, you will want to call PaUtil_SetInterleaved*Channels(),\r
- PaUtil_SetNonInterleaved*Channel() or PaUtil_Set*Channel() here.\r
- */\r
-\r
- if (stream->bufferProcessor.inputChannelCount > 0)\r
- {\r
- PaUtil_SetInputFrameCount( &stream->bufferProcessor, inputFrames );\r
- PaUtil_SetInterleavedInputChannels( &stream->bufferProcessor,\r
- 0, /* first channel of inputBuffer is channel 0 */\r
- inputBuffer,\r
- 0 ); /* 0 - use inputChannelCount passed to init buffer processor */\r
- }\r
-\r
- if (stream->bufferProcessor.outputChannelCount > 0)\r
- {\r
- PaUtil_SetOutputFrameCount( &stream->bufferProcessor, outputFrames);\r
- PaUtil_SetInterleavedOutputChannels( &stream->bufferProcessor,\r
- 0, /* first channel of outputBuffer is channel 0 */\r
- outputBuffer,\r
- 0 ); /* 0 - use outputChannelCount passed to init buffer processor */\r
- }\r
-\r
- /* you must pass a valid value of callback result to PaUtil_EndBufferProcessing()\r
- in general you would pass paContinue for normal operation, and\r
- paComplete to drain the buffer processor's internal output buffer.\r
- You can check whether the buffer processor's output buffer is empty\r
- using PaUtil_IsBufferProcessorOuputEmpty( bufferProcessor )\r
- */\r
- callbackResult = paContinue;\r
- framesProcessed = PaUtil_EndBufferProcessing( &stream->bufferProcessor, &callbackResult );\r
-\r
- /*\r
- If you need to byte swap or shift outputBuffer to convert it to\r
- host format, do it here.\r
- */\r
-\r
- PaUtil_EndCpuLoadMeasurement( &stream->cpuLoadMeasurer, framesProcessed );\r
-\r
- if (callbackResult == paContinue)\r
- {\r
- /* nothing special to do */\r
- }\r
- else\r
- if (callbackResult == paAbort)\r
- {\r
- // stop stream\r
- SetEvent(stream->hCloseRequest);\r
- }\r
- else\r
- {\r
- // stop stream\r
- SetEvent(stream->hCloseRequest);\r
- }\r
-}\r
-\r
-// ------------------------------------------------------------------------------------------\r
-HANDLE MMCSS_activate(const char *name)\r
-{\r
- DWORD task_idx = 0;\r
- HANDLE hTask = pAvSetMmThreadCharacteristics(name, &task_idx);\r
- if (hTask == NULL)\r
- {\r
- PRINT(("WASAPI: AvSetMmThreadCharacteristics failed!\n"));\r
- }\r
-\r
- /*BOOL priority_ok = pAvSetMmThreadPriority(hTask, AVRT_PRIORITY_NORMAL);\r
- if (priority_ok == FALSE)\r
- {\r
- PRINT(("WASAPI: AvSetMmThreadPriority failed!\n"));\r
- }*/\r
-\r
- // debug\r
- {\r
- int cur_priority = GetThreadPriority(GetCurrentThread());\r
- DWORD cur_priority_class = GetPriorityClass(GetCurrentProcess());\r
- PRINT(("WASAPI: thread[ priority-0x%X class-0x%X ]\n", cur_priority, cur_priority_class));\r
- }\r
-\r
- return hTask;\r
-}\r
-\r
-// ------------------------------------------------------------------------------------------\r
-void MMCSS_deactivate(HANDLE hTask)\r
-{\r
- if (!hTask)\r
- return;\r
-\r
- if (pAvRevertMmThreadCharacteristics(hTask) == FALSE)\r
- {\r
- PRINT(("WASAPI: AvRevertMmThreadCharacteristics failed!\n"));\r
- }\r
-}\r
-\r
-// ------------------------------------------------------------------------------------------\r
-PaError PaWasapi_ThreadPriorityBoost(void **hTask, PaWasapiThreadPriority nPriorityClass)\r
-{\r
- static const char *mmcs_name[] =\r
- {\r
- NULL,\r
- "Audio",\r
- "Capture",\r
- "Distribution",\r
- "Games",\r
- "Playback",\r
- "Pro Audio",\r
- "Window Manager"\r
- };\r
- HANDLE task;\r
-\r
- if (hTask == NULL)\r
- return paUnanticipatedHostError;\r
-\r
- if ((UINT32)nPriorityClass >= STATIC_ARRAY_SIZE(mmcs_name))\r
- return paUnanticipatedHostError;\r
-\r
- task = MMCSS_activate(mmcs_name[nPriorityClass]);\r
- if (task == NULL)\r
- return paUnanticipatedHostError;\r
-\r
- (*hTask) = task;\r
- return paNoError;\r
-}\r
-\r
-// ------------------------------------------------------------------------------------------\r
-PaError PaWasapi_ThreadPriorityRevert(void *hTask)\r
-{\r
- if (hTask == NULL)\r
- return paUnanticipatedHostError;\r
-\r
- MMCSS_deactivate((HANDLE)hTask);\r
-\r
- return paNoError;\r
-}\r
-\r
-// ------------------------------------------------------------------------------------------\r
-// Described at:\r
-// http://msdn.microsoft.com/en-us/library/dd371387(v=VS.85).aspx\r
-\r
-PaError PaWasapi_GetJackCount(PaDeviceIndex nDevice, int *jcount)\r
-{\r
- PaError ret;\r
- HRESULT hr = S_OK;\r
- PaDeviceIndex index;\r
- IDeviceTopology *pDeviceTopology = NULL;\r
- IConnector *pConnFrom = NULL;\r
- IConnector *pConnTo = NULL;\r
- IPart *pPart = NULL;\r
- IKsJackDescription *pJackDesc = NULL;\r
- UINT jackCount = 0;\r
-\r
- PaWasapiHostApiRepresentation *paWasapi = _GetHostApi(&ret);\r
- if (paWasapi == NULL)\r
- return paNotInitialized;\r
-\r
- // Get device index.\r
- ret = PaUtil_DeviceIndexToHostApiDeviceIndex(&index, nDevice, &paWasapi->inheritedHostApiRep);\r
- if (ret != paNoError)\r
- return ret;\r
-\r
- // Validate index.\r
- if ((UINT32)index >= paWasapi->deviceCount)\r
- return paInvalidDevice;\r
-\r
- // Get the endpoint device's IDeviceTopology interface.\r
- hr = IMMDevice_Activate(paWasapi->devInfo[index].device, &pa_IID_IDeviceTopology,\r
- CLSCTX_INPROC_SERVER, NULL, (void**)&pDeviceTopology);\r
- IF_FAILED_JUMP(hr, error);\r
-\r
- // The device topology for an endpoint device always contains just one connector (connector number 0).\r
- hr = IDeviceTopology_GetConnector(pDeviceTopology, 0, &pConnFrom);\r
- IF_FAILED_JUMP(hr, error);\r
-\r
- // Step across the connection to the jack on the adapter.\r
- hr = IConnector_GetConnectedTo(pConnFrom, &pConnTo);\r
- if (HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND) == hr)\r
- {\r
- // The adapter device is not currently active.\r
- hr = E_NOINTERFACE;\r
- }\r
- IF_FAILED_JUMP(hr, error);\r
-\r
- // Get the connector's IPart interface.\r
- hr = IConnector_QueryInterface(pConnTo, &pa_IID_IPart, (void**)&pPart);\r
- IF_FAILED_JUMP(hr, error);\r
-\r
- // Activate the connector's IKsJackDescription interface.\r
- hr = IPart_Activate(pPart, CLSCTX_INPROC_SERVER, &pa_IID_IKsJackDescription, (void**)&pJackDesc);\r
- IF_FAILED_JUMP(hr, error);\r
-\r
- // Return jack count for this device.\r
- hr = IKsJackDescription_GetJackCount(pJackDesc, &jackCount);\r
- IF_FAILED_JUMP(hr, error);\r
-\r
- // Set.\r
- (*jcount) = jackCount;\r
-\r
- // Ok.\r
- ret = paNoError;\r
-\r
-error:\r
-\r
- SAFE_RELEASE(pDeviceTopology);\r
- SAFE_RELEASE(pConnFrom);\r
- SAFE_RELEASE(pConnTo);\r
- SAFE_RELEASE(pPart);\r
- SAFE_RELEASE(pJackDesc);\r
-\r
- LogHostError(hr);\r
- return paNoError;\r
-}\r
-\r
-// ------------------------------------------------------------------------------------------\r
-static PaWasapiJackConnectionType ConvertJackConnectionTypeWASAPIToPA(int connType)\r
-{\r
- switch (connType)\r
- {\r
- case eConnTypeUnknown: return eJackConnTypeUnknown;\r
-#ifdef _KS_\r
- case eConnType3Point5mm: return eJackConnType3Point5mm;\r
-#else\r
- case eConnTypeEighth: return eJackConnType3Point5mm;\r
-#endif\r
- case eConnTypeQuarter: return eJackConnTypeQuarter;\r
- case eConnTypeAtapiInternal: return eJackConnTypeAtapiInternal;\r
- case eConnTypeRCA: return eJackConnTypeRCA;\r
- case eConnTypeOptical: return eJackConnTypeOptical;\r
- case eConnTypeOtherDigital: return eJackConnTypeOtherDigital;\r
- case eConnTypeOtherAnalog: return eJackConnTypeOtherAnalog;\r
- case eConnTypeMultichannelAnalogDIN: return eJackConnTypeMultichannelAnalogDIN;\r
- case eConnTypeXlrProfessional: return eJackConnTypeXlrProfessional;\r
- case eConnTypeRJ11Modem: return eJackConnTypeRJ11Modem;\r
- case eConnTypeCombination: return eJackConnTypeCombination;\r
- }\r
- return eJackConnTypeUnknown;\r
-}\r
-\r
-// ------------------------------------------------------------------------------------------\r
-static PaWasapiJackGeoLocation ConvertJackGeoLocationWASAPIToPA(int geoLoc)\r
-{\r
- switch (geoLoc)\r
- {\r
- case eGeoLocRear: return eJackGeoLocRear;\r
- case eGeoLocFront: return eJackGeoLocFront;\r
- case eGeoLocLeft: return eJackGeoLocLeft;\r
- case eGeoLocRight: return eJackGeoLocRight;\r
- case eGeoLocTop: return eJackGeoLocTop;\r
- case eGeoLocBottom: return eJackGeoLocBottom;\r
-#ifdef _KS_\r
- case eGeoLocRearPanel: return eJackGeoLocRearPanel;\r
-#else\r
- case eGeoLocRearOPanel: return eJackGeoLocRearPanel;\r
-#endif\r
- case eGeoLocRiser: return eJackGeoLocRiser;\r
- case eGeoLocInsideMobileLid: return eJackGeoLocInsideMobileLid;\r
- case eGeoLocDrivebay: return eJackGeoLocDrivebay;\r
- case eGeoLocHDMI: return eJackGeoLocHDMI;\r
- case eGeoLocOutsideMobileLid: return eJackGeoLocOutsideMobileLid;\r
- case eGeoLocATAPI: return eJackGeoLocATAPI;\r
- }\r
- return eJackGeoLocUnk;\r
-}\r
-\r
-// ------------------------------------------------------------------------------------------\r
-static PaWasapiJackGenLocation ConvertJackGenLocationWASAPIToPA(int genLoc)\r
-{\r
- switch (genLoc)\r
- {\r
- case eGenLocPrimaryBox: return eJackGenLocPrimaryBox;\r
- case eGenLocInternal: return eJackGenLocInternal;\r
-#ifdef _KS_\r
- case eGenLocSeparate: return eJackGenLocSeparate;\r
-#else\r
- case eGenLocSeperate: return eJackGenLocSeparate;\r
-#endif\r
- case eGenLocOther: return eJackGenLocOther;\r
- }\r
- return eJackGenLocPrimaryBox;\r
-}\r
-\r
-// ------------------------------------------------------------------------------------------\r
-static PaWasapiJackPortConnection ConvertJackPortConnectionWASAPIToPA(int portConn)\r
-{\r
- switch (portConn)\r
- {\r
- case ePortConnJack: return eJackPortConnJack;\r
- case ePortConnIntegratedDevice: return eJackPortConnIntegratedDevice;\r
- case ePortConnBothIntegratedAndJack:return eJackPortConnBothIntegratedAndJack;\r
- case ePortConnUnknown: return eJackPortConnUnknown;\r
- }\r
- return eJackPortConnJack;\r
-}\r
-\r
-// ------------------------------------------------------------------------------------------\r
-// Described at:\r
-// http://msdn.microsoft.com/en-us/library/dd371387(v=VS.85).aspx\r
-\r
-PaError PaWasapi_GetJackDescription(PaDeviceIndex nDevice, int jindex, PaWasapiJackDescription *pJackDescription)\r
-{\r
- PaError ret;\r
- HRESULT hr = S_OK;\r
- PaDeviceIndex index;\r
- IDeviceTopology *pDeviceTopology = NULL;\r
- IConnector *pConnFrom = NULL;\r
- IConnector *pConnTo = NULL;\r
- IPart *pPart = NULL;\r
- IKsJackDescription *pJackDesc = NULL;\r
- KSJACK_DESCRIPTION jack = { 0 };\r
-\r
- PaWasapiHostApiRepresentation *paWasapi = _GetHostApi(&ret);\r
- if (paWasapi == NULL)\r
- return paNotInitialized;\r
-\r
- // Get device index.\r
- ret = PaUtil_DeviceIndexToHostApiDeviceIndex(&index, nDevice, &paWasapi->inheritedHostApiRep);\r
- if (ret != paNoError)\r
- return ret;\r
-\r
- // Validate index.\r
- if ((UINT32)index >= paWasapi->deviceCount)\r
- return paInvalidDevice;\r
-\r
- // Get the endpoint device's IDeviceTopology interface.\r
- hr = IMMDevice_Activate(paWasapi->devInfo[index].device, &pa_IID_IDeviceTopology,\r
- CLSCTX_INPROC_SERVER, NULL, (void**)&pDeviceTopology);\r
- IF_FAILED_JUMP(hr, error);\r
-\r
- // The device topology for an endpoint device always contains just one connector (connector number 0).\r
- hr = IDeviceTopology_GetConnector(pDeviceTopology, 0, &pConnFrom);\r
- IF_FAILED_JUMP(hr, error);\r
-\r
- // Step across the connection to the jack on the adapter.\r
- hr = IConnector_GetConnectedTo(pConnFrom, &pConnTo);\r
- if (HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND) == hr)\r
- {\r
- // The adapter device is not currently active.\r
- hr = E_NOINTERFACE;\r
- }\r
- IF_FAILED_JUMP(hr, error);\r
-\r
- // Get the connector's IPart interface.\r
- hr = IConnector_QueryInterface(pConnTo, &pa_IID_IPart, (void**)&pPart);\r
- IF_FAILED_JUMP(hr, error);\r
-\r
- // Activate the connector's IKsJackDescription interface.\r
- hr = IPart_Activate(pPart, CLSCTX_INPROC_SERVER, &pa_IID_IKsJackDescription, (void**)&pJackDesc);\r
- IF_FAILED_JUMP(hr, error);\r
-\r
- // Test to return jack description struct for index 0.\r
- hr = IKsJackDescription_GetJackDescription(pJackDesc, jindex, &jack);\r
- IF_FAILED_JUMP(hr, error);\r
-\r
- // Convert WASAPI values to PA format.\r
- pJackDescription->channelMapping = jack.ChannelMapping;\r
- pJackDescription->color = jack.Color;\r
- pJackDescription->connectionType = ConvertJackConnectionTypeWASAPIToPA(jack.ConnectionType);\r
- pJackDescription->genLocation = ConvertJackGenLocationWASAPIToPA(jack.GenLocation);\r
- pJackDescription->geoLocation = ConvertJackGeoLocationWASAPIToPA(jack.GeoLocation);\r
- pJackDescription->isConnected = jack.IsConnected;\r
- pJackDescription->portConnection = ConvertJackPortConnectionWASAPIToPA(jack.PortConnection);\r
-\r
- // Ok.\r
- ret = paNoError;\r
-\r
-error:\r
-\r
- SAFE_RELEASE(pDeviceTopology);\r
- SAFE_RELEASE(pConnFrom);\r
- SAFE_RELEASE(pConnTo);\r
- SAFE_RELEASE(pPart);\r
- SAFE_RELEASE(pJackDesc);\r
-\r
- LogHostError(hr);\r
- return ret;\r
-}\r
-\r
-// ------------------------------------------------------------------------------------------\r
-HRESULT _PollGetOutputFramesAvailable(PaWasapiStream *stream, UINT32 *available)\r
-{\r
- HRESULT hr;\r
- UINT32 frames = stream->out.framesPerHostCallback,\r
- padding = 0;\r
-\r
- (*available) = 0;\r
-\r
- // get read position\r
- if ((hr = IAudioClient_GetCurrentPadding(stream->out.clientProc, &padding)) != S_OK)\r
- return LogHostError(hr);\r
-\r
- // get available\r
- frames -= padding;\r
-\r
- // set\r
- (*available) = frames;\r
- return hr;\r
-}\r
-\r
-// ------------------------------------------------------------------------------------------\r
-HRESULT _PollGetInputFramesAvailable(PaWasapiStream *stream, UINT32 *available)\r
-{\r
- HRESULT hr;\r
-\r
- (*available) = 0;\r
-\r
- // GetCurrentPadding() has opposite meaning to Output stream \r
- if ((hr = IAudioClient_GetCurrentPadding(stream->in.clientProc, available)) != S_OK)\r
- return LogHostError(hr);\r
-\r
- return hr;\r
-}\r
-\r
-// ------------------------------------------------------------------------------------------\r
-HRESULT ProcessOutputBuffer(PaWasapiStream *stream, PaWasapiHostProcessor *processor, UINT32 frames)\r
-{\r
- HRESULT hr;\r
- BYTE *data = NULL;\r
-\r
- // Get buffer\r
- if ((hr = IAudioRenderClient_GetBuffer(stream->renderClient, frames, &data)) != S_OK)\r
- {\r
- if (stream->out.shareMode == AUDCLNT_SHAREMODE_SHARED)\r
- {\r
- // Using GetCurrentPadding to overcome AUDCLNT_E_BUFFER_TOO_LARGE in\r
- // shared mode results in no sound in Event-driven mode (MSDN does not\r
- // document this, or is it WASAPI bug?), thus we better\r
- // try to acquire buffer next time when GetBuffer allows to do so.\r
-#if 0\r
- // Get Read position\r
- UINT32 padding = 0;\r
- hr = IAudioClient_GetCurrentPadding(stream->out.clientProc, &padding);\r
- if (hr != S_OK)\r
- return LogHostError(hr);\r
-\r
- // Get frames to write\r
- frames -= padding;\r
- if (frames == 0)\r
- return S_OK;\r
-\r
- if ((hr = IAudioRenderClient_GetBuffer(stream->renderClient, frames, &data)) != S_OK)\r
- return LogHostError(hr);\r
-#else\r
- if (hr == AUDCLNT_E_BUFFER_TOO_LARGE)\r
- return S_OK; // be silent in shared mode, try again next time\r
-#endif\r
- }\r
- else\r
- return LogHostError(hr);\r
- }\r
-\r
- // Process data\r
- if (stream->out.monoMixer != NULL)\r
- {\r
- // expand buffer\r
- UINT32 mono_frames_size = frames * (stream->out.wavex.Format.wBitsPerSample / 8);\r
- if (mono_frames_size > stream->out.monoBufferSize)\r
- stream->out.monoBuffer = PaWasapi_ReallocateMemory(stream->out.monoBuffer, (stream->out.monoBufferSize = mono_frames_size));\r
-\r
- // process\r
- processor[S_OUTPUT].processor(NULL, 0, (BYTE *)stream->out.monoBuffer, frames, processor[S_OUTPUT].userData);\r
-\r
- // mix 1 to 2 channels\r
- stream->out.monoMixer(data, stream->out.monoBuffer, frames);\r
- }\r
- else\r
- {\r
- processor[S_OUTPUT].processor(NULL, 0, data, frames, processor[S_OUTPUT].userData);\r
- }\r
-\r
- // Release buffer\r
- if ((hr = IAudioRenderClient_ReleaseBuffer(stream->renderClient, frames, 0)) != S_OK)\r
- LogHostError(hr);\r
-\r
- return hr;\r
-}\r
-\r
-// ------------------------------------------------------------------------------------------\r
-HRESULT ProcessInputBuffer(PaWasapiStream *stream, PaWasapiHostProcessor *processor)\r
-{\r
- HRESULT hr = S_OK;\r
- UINT32 frames;\r
- BYTE *data = NULL;\r
- DWORD flags = 0;\r
-\r
- for (;;)\r
- {\r
- // Check if blocking call must be interrupted\r
- if (WaitForSingleObject(stream->hCloseRequest, 0) != WAIT_TIMEOUT)\r
- break;\r
-\r
- // Findout if any frames available\r
- frames = 0;\r
- if ((hr = _PollGetInputFramesAvailable(stream, &frames)) != S_OK)\r
- return hr;\r
-\r
- // Empty/consumed buffer\r
- if (frames == 0)\r
- break;\r
-\r
- // Get the available data in the shared buffer.\r
- if ((hr = IAudioCaptureClient_GetBuffer(stream->captureClient, &data, &frames, &flags, NULL, NULL)) != S_OK)\r
- {\r
- if (hr == AUDCLNT_S_BUFFER_EMPTY)\r
- {\r
- hr = S_OK;\r
- break; // Empty/consumed buffer\r
- }\r
-\r
- return LogHostError(hr);\r
- break;\r
- }\r
-\r
- // Detect silence\r
- // if (flags & AUDCLNT_BUFFERFLAGS_SILENT)\r
- // data = NULL;\r
-\r
- // Process data\r
- if (stream->in.monoMixer != NULL)\r
- {\r
- // expand buffer\r
- UINT32 mono_frames_size = frames * (stream->in.wavex.Format.wBitsPerSample / 8);\r
- if (mono_frames_size > stream->in.monoBufferSize)\r
- stream->in.monoBuffer = PaWasapi_ReallocateMemory(stream->in.monoBuffer, (stream->in.monoBufferSize = mono_frames_size));\r
-\r
- // mix 1 to 2 channels\r
- stream->in.monoMixer(stream->in.monoBuffer, data, frames);\r
-\r
- // process\r
- processor[S_INPUT].processor((BYTE *)stream->in.monoBuffer, frames, NULL, 0, processor[S_INPUT].userData);\r
- }\r
- else\r
- {\r
- processor[S_INPUT].processor(data, frames, NULL, 0, processor[S_INPUT].userData);\r
- }\r
-\r
- // Release buffer\r
- if ((hr = IAudioCaptureClient_ReleaseBuffer(stream->captureClient, frames)) != S_OK)\r
- return LogHostError(hr);\r
-\r
- //break;\r
- }\r
-\r
- return hr;\r
-}\r
-\r
-// ------------------------------------------------------------------------------------------\r
-void _StreamOnStop(PaWasapiStream *stream)\r
-{\r
- // Stop INPUT/OUTPUT clients\r
- if (!stream->bBlocking) \r
- {\r
- if (stream->in.clientProc != NULL)\r
- IAudioClient_Stop(stream->in.clientProc);\r
- if (stream->out.clientProc != NULL)\r
- IAudioClient_Stop(stream->out.clientProc);\r
- } \r
- else \r
- {\r
- if (stream->in.clientParent != NULL)\r
- IAudioClient_Stop(stream->in.clientParent);\r
- if (stream->out.clientParent != NULL)\r
- IAudioClient_Stop(stream->out.clientParent);\r
- }\r
-\r
- // Restore thread priority\r
- if (stream->hAvTask != NULL)\r
- {\r
- PaWasapi_ThreadPriorityRevert(stream->hAvTask);\r
- stream->hAvTask = NULL;\r
- }\r
-\r
- // Notify\r
- if (stream->streamRepresentation.streamFinishedCallback != NULL)\r
- stream->streamRepresentation.streamFinishedCallback(stream->streamRepresentation.userData);\r
-}\r
-\r
-// ------------------------------------------------------------------------------------------\r
-PA_THREAD_FUNC ProcThreadEvent(void *param)\r
-{\r
- PaWasapiHostProcessor processor[S_COUNT];\r
- HRESULT hr;\r
- DWORD dwResult;\r
- PaWasapiStream *stream = (PaWasapiStream *)param;\r
- PaWasapiHostProcessor defaultProcessor;\r
- BOOL set_event[S_COUNT] = { FALSE, FALSE };\r
- BOOL bWaitAllEvents = FALSE;\r
- BOOL bThreadComInitialized = FALSE;\r
-\r
- /*\r
- If COM is already initialized CoInitialize will either return\r
- FALSE, or RPC_E_CHANGED_MODE if it was initialized in a different\r
- threading mode. In either case we shouldn't consider it an error\r
- but we need to be careful to not call CoUninitialize() if \r
- RPC_E_CHANGED_MODE was returned.\r
- */\r
- hr = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);\r
- if (FAILED(hr) && (hr != RPC_E_CHANGED_MODE))\r
- {\r
- PRINT(("WASAPI: failed ProcThreadEvent CoInitialize"));\r
- return paUnanticipatedHostError;\r
- }\r
- if (hr != RPC_E_CHANGED_MODE)\r
- bThreadComInitialized = TRUE;\r
-\r
- // Unmarshal stream pointers for safe COM operation\r
- hr = UnmarshalStreamComPointers(stream);\r
- if (hr != S_OK) {\r
- PRINT(("Error unmarshaling stream COM pointers. HRESULT: %i\n", hr));\r
- goto thread_end;\r
- }\r
-\r
- // Waiting on all events in case of Full-Duplex/Exclusive mode.\r
- if ((stream->in.clientProc != NULL) && (stream->out.clientProc != NULL))\r
- {\r
- bWaitAllEvents = (stream->in.shareMode == AUDCLNT_SHAREMODE_EXCLUSIVE) &&\r
- (stream->out.shareMode == AUDCLNT_SHAREMODE_EXCLUSIVE);\r
- }\r
-\r
- // Setup data processors\r
- defaultProcessor.processor = WaspiHostProcessingLoop;\r
- defaultProcessor.userData = stream;\r
- processor[S_INPUT] = (stream->hostProcessOverrideInput.processor != NULL ? stream->hostProcessOverrideInput : defaultProcessor);\r
- processor[S_OUTPUT] = (stream->hostProcessOverrideOutput.processor != NULL ? stream->hostProcessOverrideOutput : defaultProcessor);\r
-\r
- // Boost thread priority\r
- PaWasapi_ThreadPriorityBoost((void **)&stream->hAvTask, stream->nThreadPriority);\r
-\r
- // Create events\r
- if (stream->event[S_OUTPUT] == NULL)\r
- {\r
- stream->event[S_OUTPUT] = CreateEvent(NULL, FALSE, FALSE, NULL);\r
- set_event[S_OUTPUT] = TRUE;\r
- }\r
- if (stream->event[S_INPUT] == NULL)\r
- {\r
- stream->event[S_INPUT] = CreateEvent(NULL, FALSE, FALSE, NULL);\r
- set_event[S_INPUT] = TRUE;\r
- }\r
- if ((stream->event[S_OUTPUT] == NULL) || (stream->event[S_INPUT] == NULL))\r
- {\r
- PRINT(("WASAPI Thread: failed creating Input/Output event handle\n"));\r
- goto thread_error;\r
- }\r
-\r
- // Initialize event & start INPUT stream\r
- if (stream->in.clientProc)\r
- {\r
- // Create & set handle\r
- if (set_event[S_INPUT])\r
- {\r
- if ((hr = IAudioClient_SetEventHandle(stream->in.clientProc, stream->event[S_INPUT])) != S_OK)\r
- {\r
- LogHostError(hr);\r
- goto thread_error;\r
- }\r
- }\r
-\r
- // Start\r
- if ((hr = IAudioClient_Start(stream->in.clientProc)) != S_OK)\r
- {\r
- LogHostError(hr);\r
- goto thread_error;\r
- }\r
- }\r
-\r
- // Initialize event & start OUTPUT stream\r
- if (stream->out.clientProc)\r
- {\r
- // Create & set handle\r
- if (set_event[S_OUTPUT])\r
- {\r
- if ((hr = IAudioClient_SetEventHandle(stream->out.clientProc, stream->event[S_OUTPUT])) != S_OK)\r
- {\r
- LogHostError(hr);\r
- goto thread_error;\r
- }\r
- }\r
-\r
- // Preload buffer before start\r
- if ((hr = ProcessOutputBuffer(stream, processor, stream->out.framesPerBuffer)) != S_OK)\r
- {\r
- LogHostError(hr);\r
- goto thread_error;\r
- }\r
-\r
- // Start\r
- if ((hr = IAudioClient_Start(stream->out.clientProc)) != S_OK)\r
- {\r
- LogHostError(hr);\r
- goto thread_error;\r
- }\r
-\r
- }\r
-\r
- // Signal: stream running\r
- stream->running = TRUE;\r
-\r
- // Notify: thread started\r
- SetEvent(stream->hThreadStart);\r
-\r
- // Processing Loop\r
- for (;;)\r
- {\r
- // 10 sec timeout (on timeout stream will auto-stop when processed by WAIT_TIMEOUT case)\r
- dwResult = WaitForMultipleObjects(S_COUNT, stream->event, bWaitAllEvents, 10*1000);\r
-\r
- // Check for close event (after wait for buffers to avoid any calls to user\r
- // callback when hCloseRequest was set)\r
- if (WaitForSingleObject(stream->hCloseRequest, 0) != WAIT_TIMEOUT)\r
- break;\r
-\r
- // Process S_INPUT/S_OUTPUT\r
- switch (dwResult)\r
- {\r
- case WAIT_TIMEOUT: {\r
- PRINT(("WASAPI Thread: WAIT_TIMEOUT - probably bad audio driver or Vista x64 bug: use paWinWasapiPolling instead\n"));\r
- goto thread_end;\r
- break; }\r
-\r
- // Input stream\r
- case WAIT_OBJECT_0 + S_INPUT: {\r
-\r
- if (stream->captureClient == NULL)\r
- break;\r
-\r
- if ((hr = ProcessInputBuffer(stream, processor)) != S_OK)\r
- {\r
- LogHostError(hr);\r
- goto thread_error;\r
- }\r
-\r
- break; }\r
-\r
- // Output stream\r
- case WAIT_OBJECT_0 + S_OUTPUT: {\r
-\r
- if (stream->renderClient == NULL)\r
- break;\r
-\r
- if ((hr = ProcessOutputBuffer(stream, processor, stream->out.framesPerBuffer)) != S_OK)\r
- {\r
- LogHostError(hr);\r
- goto thread_error;\r
- }\r
-\r
- break; }\r
- }\r
- }\r
-\r
-thread_end:\r
-\r
- // Process stop\r
- _StreamOnStop(stream);\r
-\r
- // Release unmarshaled COM pointers\r
- ReleaseUnmarshaledComPointers(stream);\r
-\r
- // Cleanup COM for this thread\r
- if (bThreadComInitialized == TRUE)\r
- CoUninitialize();\r
-\r
- // Notify: not running\r
- stream->running = FALSE;\r
-\r
- // Notify: thread exited\r
- SetEvent(stream->hThreadExit);\r
-\r
- return 0;\r
-\r
-thread_error:\r
-\r
- // Prevent deadlocking in Pa_StreamStart\r
- SetEvent(stream->hThreadStart);\r
-\r
- // Exit\r
- goto thread_end;\r
-}\r
-\r
-// ------------------------------------------------------------------------------------------\r
-PA_THREAD_FUNC ProcThreadPoll(void *param)\r
-{\r
- PaWasapiHostProcessor processor[S_COUNT];\r
- HRESULT hr;\r
- PaWasapiStream *stream = (PaWasapiStream *)param;\r
- PaWasapiHostProcessor defaultProcessor;\r
- INT32 i;\r
- ThreadIdleScheduler scheduler;\r
-\r
- // Calculate the actual duration of the allocated buffer.\r
- DWORD sleep_ms = 0;\r
- DWORD sleep_ms_in;\r
- DWORD sleep_ms_out;\r
-\r
- BOOL bThreadComInitialized = FALSE;\r
-\r
- /*\r
- If COM is already initialized CoInitialize will either return\r
- FALSE, or RPC_E_CHANGED_MODE if it was initialized in a different\r
- threading mode. In either case we shouldn't consider it an error\r
- but we need to be careful to not call CoUninitialize() if \r
- RPC_E_CHANGED_MODE was returned.\r
- */\r
- hr = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);\r
- if (FAILED(hr) && (hr != RPC_E_CHANGED_MODE))\r
- {\r
- PRINT(("WASAPI: failed ProcThreadPoll CoInitialize"));\r
- return paUnanticipatedHostError;\r
- }\r
- if (hr != RPC_E_CHANGED_MODE)\r
- bThreadComInitialized = TRUE;\r
-\r
- // Unmarshal stream pointers for safe COM operation\r
- hr = UnmarshalStreamComPointers(stream);\r
- if (hr != S_OK) \r
- {\r
- PRINT(("Error unmarshaling stream COM pointers. HRESULT: %i\n", hr));\r
- return 0;\r
- }\r
-\r
- // Calculate timeout for next polling attempt.\r
- sleep_ms_in = GetFramesSleepTime(stream->in.framesPerHostCallback/WASAPI_PACKETS_PER_INPUT_BUFFER, stream->in.wavex.Format.nSamplesPerSec);\r
- sleep_ms_out = GetFramesSleepTime(stream->out.framesPerBuffer, stream->out.wavex.Format.nSamplesPerSec);\r
-\r
- // WASAPI Input packets tend to expire very easily, let's limit sleep time to 2 milliseconds\r
- // for all cases. Please propose better solution if any.\r
- if (sleep_ms_in > 2)\r
- sleep_ms_in = 2;\r
-\r
- // Adjust polling time for non-paUtilFixedHostBufferSize. Input stream is not adjustable as it is being\r
- // polled according its packet length.\r
- if (stream->bufferMode != paUtilFixedHostBufferSize)\r
- {\r
- //sleep_ms_in = GetFramesSleepTime(stream->bufferProcessor.framesPerUserBuffer, stream->in.wavex.Format.nSamplesPerSec);\r
- sleep_ms_out = GetFramesSleepTime(stream->bufferProcessor.framesPerUserBuffer, stream->out.wavex.Format.nSamplesPerSec);\r
- }\r
-\r
- // Choose smallest\r
- if ((sleep_ms_in != 0) && (sleep_ms_out != 0))\r
- sleep_ms = min(sleep_ms_in, sleep_ms_out);\r
- else\r
- {\r
- sleep_ms = (sleep_ms_in ? sleep_ms_in : sleep_ms_out);\r
- }\r
- // Make sure not 0, othervise use ThreadIdleScheduler\r
- if (sleep_ms == 0)\r
- {\r
- sleep_ms_in = GetFramesSleepTimeMicroseconds(stream->in.framesPerHostCallback/WASAPI_PACKETS_PER_INPUT_BUFFER, stream->in.wavex.Format.nSamplesPerSec);\r
- sleep_ms_out = GetFramesSleepTimeMicroseconds(stream->bufferProcessor.framesPerUserBuffer, stream->out.wavex.Format.nSamplesPerSec);\r
-\r
- // Choose smallest\r
- if ((sleep_ms_in != 0) && (sleep_ms_out != 0))\r
- sleep_ms = min(sleep_ms_in, sleep_ms_out);\r
- else\r
- {\r
- sleep_ms = (sleep_ms_in ? sleep_ms_in : sleep_ms_out);\r
- }\r
-\r
- // Setup thread sleep scheduler\r
- ThreadIdleScheduler_Setup(&scheduler, 1, sleep_ms/* microseconds here */);\r
- sleep_ms = 0;\r
- }\r
-\r
- // Setup data processors\r
- defaultProcessor.processor = WaspiHostProcessingLoop;\r
- defaultProcessor.userData = stream;\r
- processor[S_INPUT] = (stream->hostProcessOverrideInput.processor != NULL ? stream->hostProcessOverrideInput : defaultProcessor);\r
- processor[S_OUTPUT] = (stream->hostProcessOverrideOutput.processor != NULL ? stream->hostProcessOverrideOutput : defaultProcessor);\r
-\r
- // Boost thread priority\r
- PaWasapi_ThreadPriorityBoost((void **)&stream->hAvTask, stream->nThreadPriority);\r
-\r
- // Initialize event & start INPUT stream\r
- if (stream->in.clientProc)\r
- {\r
- if ((hr = IAudioClient_Start(stream->in.clientProc)) != S_OK)\r
- {\r
- LogHostError(hr);\r
- goto thread_error;\r
- }\r
- }\r
-\r
- // Initialize event & start OUTPUT stream\r
- if (stream->out.clientProc)\r
- {\r
- // Preload buffer (obligatory, othervise ->Start() will fail), avoid processing\r
- // when in full-duplex mode as it requires input processing as well\r
- if (!PA_WASAPI__IS_FULLDUPLEX(stream))\r
- {\r
- UINT32 frames = 0;\r
- if ((hr = _PollGetOutputFramesAvailable(stream, &frames)) == S_OK)\r
- {\r
- if (stream->bufferMode == paUtilFixedHostBufferSize)\r
- {\r
- if (frames >= stream->out.framesPerBuffer)\r
- {\r
- frames = stream->out.framesPerBuffer;\r
-\r
- if ((hr = ProcessOutputBuffer(stream, processor, frames)) != S_OK)\r
- {\r
- LogHostError(hr); // not fatal, just log\r
- }\r
- }\r
- }\r
- else\r
- {\r
- if (frames != 0)\r
- {\r
- if ((hr = ProcessOutputBuffer(stream, processor, frames)) != S_OK)\r
- {\r
- LogHostError(hr); // not fatal, just log\r
- }\r
- }\r
- }\r
- }\r
- else\r
- {\r
- LogHostError(hr); // not fatal, just log\r
- }\r
- }\r
-\r
- // Start\r
- if ((hr = IAudioClient_Start(stream->out.clientProc)) != S_OK)\r
- {\r
- LogHostError(hr);\r
- goto thread_error;\r
- }\r
- }\r
-\r
- // Signal: stream running\r
- stream->running = TRUE;\r
-\r
- // Notify: thread started\r
- SetEvent(stream->hThreadStart);\r
-\r
- if (!PA_WASAPI__IS_FULLDUPLEX(stream))\r
- {\r
- // Processing Loop\r
- UINT32 next_sleep = sleep_ms;\r
- while (WaitForSingleObject(stream->hCloseRequest, next_sleep) == WAIT_TIMEOUT)\r
- {\r
- // Get next sleep time\r
- if (sleep_ms == 0)\r
- {\r
- next_sleep = ThreadIdleScheduler_NextSleep(&scheduler);\r
- }\r
-\r
- for (i = 0; i < S_COUNT; ++i)\r
- {\r
- // Process S_INPUT/S_OUTPUT\r
- switch (i)\r
- {\r
- // Input stream\r
- case S_INPUT: {\r
-\r
- if (stream->captureClient == NULL)\r
- break;\r
-\r
- if ((hr = ProcessInputBuffer(stream, processor)) != S_OK)\r
- {\r
- LogHostError(hr);\r
- goto thread_error;\r
- }\r
-\r
- break; }\r
-\r
- // Output stream\r
- case S_OUTPUT: {\r
-\r
- UINT32 frames;\r
- if (stream->renderClient == NULL)\r
- break;\r
-\r
- // get available frames\r
- if ((hr = _PollGetOutputFramesAvailable(stream, &frames)) != S_OK)\r
- {\r
- LogHostError(hr);\r
- goto thread_error;\r
- }\r
-\r
- // output\r
- if (stream->bufferMode == paUtilFixedHostBufferSize)\r
- {\r
- while (frames >= stream->out.framesPerBuffer)\r
- {\r
- if ((hr = ProcessOutputBuffer(stream, processor, stream->out.framesPerBuffer)) != S_OK)\r
- {\r
- LogHostError(hr);\r
- goto thread_error;\r
- }\r
-\r
- frames -= stream->out.framesPerBuffer;\r
- }\r
- }\r
- else\r
- {\r
- if (frames != 0)\r
- {\r
- if ((hr = ProcessOutputBuffer(stream, processor, frames)) != S_OK)\r
- {\r
- LogHostError(hr);\r
- goto thread_error;\r
- }\r
- }\r
- }\r
-\r
- break; }\r
- }\r
- }\r
- }\r
- }\r
- else\r
- {\r
-#if 0\r
- // Processing Loop\r
- while (WaitForSingleObject(stream->hCloseRequest, 1) == WAIT_TIMEOUT)\r
- {\r
- UINT32 i_frames = 0, i_processed = 0;\r
- BYTE *i_data = NULL, *o_data = NULL, *o_data_host = NULL;\r
- DWORD i_flags = 0;\r
- UINT32 o_frames = 0;\r
-\r
- // get host input buffer\r
- if ((hr = IAudioCaptureClient_GetBuffer(stream->captureClient, &i_data, &i_frames, &i_flags, NULL, NULL)) != S_OK)\r
- {\r
- if (hr == AUDCLNT_S_BUFFER_EMPTY)\r
- continue; // no data in capture buffer\r
-\r
- LogHostError(hr);\r
- break;\r
- }\r
-\r
- // get available frames\r
- if ((hr = _PollGetOutputFramesAvailable(stream, &o_frames)) != S_OK)\r
- {\r
- // release input buffer\r
- IAudioCaptureClient_ReleaseBuffer(stream->captureClient, 0);\r
-\r
- LogHostError(hr);\r
- break;\r
- }\r
-\r
- // process equal ammount of frames\r
- if (o_frames >= i_frames)\r
- {\r
- // process input ammount of frames\r
- UINT32 o_processed = i_frames;\r
-\r
- // get host output buffer\r
- if ((hr = IAudioRenderClient_GetBuffer(stream->procRCClient, o_processed, &o_data)) == S_OK)\r
- {\r
- // processed amount of i_frames\r
- i_processed = i_frames;\r
- o_data_host = o_data;\r
-\r
- // convert output mono\r
- if (stream->out.monoMixer)\r
- {\r
- UINT32 mono_frames_size = o_processed * (stream->out.wavex.Format.wBitsPerSample / 8);\r
- // expand buffer\r
- if (mono_frames_size > stream->out.monoBufferSize)\r
- {\r
- stream->out.monoBuffer = PaWasapi_ReallocateMemory(stream->out.monoBuffer, (stream->out.monoBufferSize = mono_frames_size));\r
- if (stream->out.monoBuffer == NULL)\r
- {\r
- // release input buffer\r
- IAudioCaptureClient_ReleaseBuffer(stream->captureClient, 0);\r
- // release output buffer\r
- IAudioRenderClient_ReleaseBuffer(stream->renderClient, 0, 0);\r
-\r
- LogPaError(paInsufficientMemory);\r
- break;\r
- }\r
- }\r
-\r
- // replace buffer pointer\r
- o_data = (BYTE *)stream->out.monoBuffer;\r
- }\r
-\r
- // convert input mono\r
- if (stream->in.monoMixer)\r
- {\r
- UINT32 mono_frames_size = i_processed * (stream->in.wavex.Format.wBitsPerSample / 8);\r
- // expand buffer\r
- if (mono_frames_size > stream->in.monoBufferSize)\r
- {\r
- stream->in.monoBuffer = PaWasapi_ReallocateMemory(stream->in.monoBuffer, (stream->in.monoBufferSize = mono_frames_size));\r
- if (stream->in.monoBuffer == NULL)\r
- {\r
- // release input buffer\r
- IAudioCaptureClient_ReleaseBuffer(stream->captureClient, 0);\r
- // release output buffer\r
- IAudioRenderClient_ReleaseBuffer(stream->renderClient, 0, 0);\r
-\r
- LogPaError(paInsufficientMemory);\r
- break;\r
- }\r
- }\r
-\r
- // mix 2 to 1 input channels\r
- stream->in.monoMixer(stream->in.monoBuffer, i_data, i_processed);\r
-\r
- // replace buffer pointer\r
- i_data = (BYTE *)stream->in.monoBuffer;\r
- }\r
-\r
- // process\r
- processor[S_FULLDUPLEX].processor(i_data, i_processed, o_data, o_processed, processor[S_FULLDUPLEX].userData);\r
-\r
- // mix 1 to 2 output channels\r
- if (stream->out.monoBuffer)\r
- stream->out.monoMixer(o_data_host, stream->out.monoBuffer, o_processed);\r
-\r
- // release host output buffer\r
- if ((hr = IAudioRenderClient_ReleaseBuffer(stream->renderClient, o_processed, 0)) != S_OK)\r
- LogHostError(hr);\r
- }\r
- else\r
- {\r
- if (stream->out.shareMode != AUDCLNT_SHAREMODE_SHARED)\r
- LogHostError(hr); // be silent in shared mode, try again next time\r
- }\r
- }\r
-\r
- // release host input buffer\r
- if ((hr = IAudioCaptureClient_ReleaseBuffer(stream->captureClient, i_processed)) != S_OK)\r
- {\r
- LogHostError(hr);\r
- break;\r
- }\r
- }\r
-#else\r
- // Processing Loop\r
- UINT32 next_sleep = sleep_ms;\r
- while (WaitForSingleObject(stream->hCloseRequest, next_sleep) == WAIT_TIMEOUT)\r
- {\r
- UINT32 i_frames = 0, i_processed = 0;\r
- BYTE *i_data = NULL, *o_data = NULL, *o_data_host = NULL;\r
- DWORD i_flags = 0;\r
- UINT32 o_frames = 0;\r
-\r
- // Get next sleep time\r
- if (sleep_ms == 0)\r
- {\r
- next_sleep = ThreadIdleScheduler_NextSleep(&scheduler);\r
- }\r
-\r
- // get available frames\r
- if ((hr = _PollGetOutputFramesAvailable(stream, &o_frames)) != S_OK)\r
- {\r
- LogHostError(hr);\r
- break;\r
- }\r
-\r
- while (o_frames != 0)\r
- {\r
- // get host input buffer\r
- if ((hr = IAudioCaptureClient_GetBuffer(stream->captureClient, &i_data, &i_frames, &i_flags, NULL, NULL)) != S_OK)\r
- {\r
- if (hr == AUDCLNT_S_BUFFER_EMPTY)\r
- break; // no data in capture buffer\r
-\r
- LogHostError(hr);\r
- break;\r
- }\r
-\r
- // process equal ammount of frames\r
- if (o_frames >= i_frames)\r
- {\r
- // process input ammount of frames\r
- UINT32 o_processed = i_frames;\r
-\r
- // get host output buffer\r
- if ((hr = IAudioRenderClient_GetBuffer(stream->renderClient, o_processed, &o_data)) == S_OK)\r
- {\r
- // processed amount of i_frames\r
- i_processed = i_frames;\r
- o_data_host = o_data;\r
-\r
- // convert output mono\r
- if (stream->out.monoMixer)\r
- {\r
- UINT32 mono_frames_size = o_processed * (stream->out.wavex.Format.wBitsPerSample / 8);\r
- // expand buffer\r
- if (mono_frames_size > stream->out.monoBufferSize)\r
- {\r
- stream->out.monoBuffer = PaWasapi_ReallocateMemory(stream->out.monoBuffer, (stream->out.monoBufferSize = mono_frames_size));\r
- if (stream->out.monoBuffer == NULL)\r
- {\r
- // release input buffer\r
- IAudioCaptureClient_ReleaseBuffer(stream->captureClient, 0);\r
- // release output buffer\r
- IAudioRenderClient_ReleaseBuffer(stream->renderClient, 0, 0);\r
-\r
- LogPaError(paInsufficientMemory);\r
- goto thread_error;\r
- }\r
- }\r
-\r
- // replace buffer pointer\r
- o_data = (BYTE *)stream->out.monoBuffer;\r
- }\r
-\r
- // convert input mono\r
- if (stream->in.monoMixer)\r
- {\r
- UINT32 mono_frames_size = i_processed * (stream->in.wavex.Format.wBitsPerSample / 8);\r
- // expand buffer\r
- if (mono_frames_size > stream->in.monoBufferSize)\r
- {\r
- stream->in.monoBuffer = PaWasapi_ReallocateMemory(stream->in.monoBuffer, (stream->in.monoBufferSize = mono_frames_size));\r
- if (stream->in.monoBuffer == NULL)\r
- {\r
- // release input buffer\r
- IAudioCaptureClient_ReleaseBuffer(stream->captureClient, 0);\r
- // release output buffer\r
- IAudioRenderClient_ReleaseBuffer(stream->renderClient, 0, 0);\r
-\r
- LogPaError(paInsufficientMemory);\r
- goto thread_error;\r
- }\r
- }\r
-\r
- // mix 2 to 1 input channels\r
- stream->in.monoMixer(stream->in.monoBuffer, i_data, i_processed);\r
-\r
- // replace buffer pointer\r
- i_data = (BYTE *)stream->in.monoBuffer;\r
- }\r
-\r
- // process\r
- processor[S_FULLDUPLEX].processor(i_data, i_processed, o_data, o_processed, processor[S_FULLDUPLEX].userData);\r
-\r
- // mix 1 to 2 output channels\r
- if (stream->out.monoBuffer)\r
- stream->out.monoMixer(o_data_host, stream->out.monoBuffer, o_processed);\r
-\r
- // release host output buffer\r
- if ((hr = IAudioRenderClient_ReleaseBuffer(stream->renderClient, o_processed, 0)) != S_OK)\r
- LogHostError(hr);\r
-\r
- o_frames -= o_processed;\r
- }\r
- else\r
- {\r
- if (stream->out.shareMode != AUDCLNT_SHAREMODE_SHARED)\r
- LogHostError(hr); // be silent in shared mode, try again next time\r
- }\r
- }\r
- else\r
- {\r
- i_processed = 0;\r
- goto fd_release_buffer_in;\r
- }\r
-\r
-fd_release_buffer_in:\r
-\r
- // release host input buffer\r
- if ((hr = IAudioCaptureClient_ReleaseBuffer(stream->captureClient, i_processed)) != S_OK)\r
- {\r
- LogHostError(hr);\r
- break;\r
- }\r
-\r
- // break processing, input hasn't been accumulated yet\r
- if (i_processed == 0)\r
- break;\r
- }\r
- }\r
-#endif\r
- }\r
-\r
-thread_end:\r
-\r
- // Process stop\r
- _StreamOnStop(stream);\r
-\r
- // Release unmarshaled COM pointers\r
- ReleaseUnmarshaledComPointers(stream);\r
-\r
- // Cleanup COM for this thread\r
- if (bThreadComInitialized == TRUE)\r
- CoUninitialize();\r
-\r
- // Notify: not running\r
- stream->running = FALSE;\r
-\r
- // Notify: thread exited\r
- SetEvent(stream->hThreadExit);\r
-\r
- return 0;\r
-\r
-thread_error:\r
-\r
- // Prevent deadlocking in Pa_StreamStart\r
- SetEvent(stream->hThreadStart);\r
-\r
- // Exit\r
- goto thread_end;\r
-}\r
-\r
-// ------------------------------------------------------------------------------------------\r
-void *PaWasapi_ReallocateMemory(void *ptr, size_t size)\r
-{\r
- return realloc(ptr, size);\r
-}\r
-\r
-// ------------------------------------------------------------------------------------------\r
-void PaWasapi_FreeMemory(void *ptr)\r
-{\r
- free(ptr);\r
-}\r
-\r
-//#endif //VC 2005\r
-\r
-\r
-\r
-\r
-#if 0\r
- if(bFirst) {\r
- float masteur;\r
- hr = stream->outVol->GetMasterVolumeLevelScalar(&masteur);\r
- if (hr != S_OK)\r
- LogHostError(hr);\r
- float chan1, chan2;\r
- hr = stream->outVol->GetChannelVolumeLevelScalar(0, &chan1);\r
- if (hr != S_OK)\r
- LogHostError(hr);\r
- hr = stream->outVol->GetChannelVolumeLevelScalar(1, &chan2);\r
- if (hr != S_OK)\r
- LogHostError(hr);\r
-\r
- BOOL bMute;\r
- hr = stream->outVol->GetMute(&bMute);\r
- if (hr != S_OK)\r
- LogHostError(hr);\r
-\r
- stream->outVol->SetMasterVolumeLevelScalar(0.5, NULL);\r
- stream->outVol->SetChannelVolumeLevelScalar(0, 0.5, NULL);\r
- stream->outVol->SetChannelVolumeLevelScalar(1, 0.5, NULL);\r
- stream->outVol->SetMute(FALSE, NULL);\r
- bFirst = FALSE;\r
- }\r
-#endif\r
+/*
+ * Portable Audio I/O Library WASAPI implementation
+ * Copyright (c) 2006-2010 David Viens, Dmitry Kostjuchenko
+ *
+ * Based on the Open Source API proposed by Ross Bencina
+ * Copyright (c) 1999-2002 Ross Bencina, Phil Burk
+ *
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * The text above constitutes the entire PortAudio license; however,
+ * the PortAudio community also makes the following non-binding requests:
+ *
+ * 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. It is also
+ * requested that these non-binding requests be included along with the
+ * license above.
+ */
+
+/** @file
+ @ingroup hostapi_src
+ @brief WASAPI implementation of support for a host API.
+ @note pa_wasapi currently requires minimum VC 2005, and the latest Vista SDK
+*/
+
+#define WIN32_LEAN_AND_MEAN // exclude rare headers
+#include <windows.h>
+#include <stdio.h>
+#include <process.h>
+#include <assert.h>
+#include <mmsystem.h>
+#include <mmreg.h> // must be before other Wasapi headers
+#if defined(_MSC_VER) && (_MSC_VER >= 1400)
+ #include <Avrt.h>
+ #define COBJMACROS
+ #include <Audioclient.h>
+ #include <endpointvolume.h>
+ #define INITGUID // Avoid additional linkage of static libs, excessive code will be optimized out by the compiler
+ #include <mmdeviceapi.h>
+ #include <functiondiscoverykeys.h>
+ #include <devicetopology.h> // Used to get IKsJackDescription interface
+ #undef INITGUID
+#endif
+#ifndef __MWERKS__
+#include <malloc.h>
+#include <memory.h>
+#endif /* __MWERKS__ */
+
+#include "pa_util.h"
+#include "pa_allocation.h"
+#include "pa_hostapi.h"
+#include "pa_stream.h"
+#include "pa_cpuload.h"
+#include "pa_process.h"
+#include "pa_win_wasapi.h"
+#include "pa_debugprint.h"
+#include "pa_ringbuffer.h"
+
+#include "pa_win_coinitialize.h"
+
+#ifndef NTDDI_VERSION
+
+ #undef WINVER
+ #undef _WIN32_WINNT
+ #define WINVER 0x0600 // VISTA
+ #define _WIN32_WINNT WINVER
+
+ #ifndef _AVRT_ //<< fix MinGW dummy compile by defining missing type: AVRT_PRIORITY
+ typedef enum _AVRT_PRIORITY
+ {
+ AVRT_PRIORITY_LOW = -1,
+ AVRT_PRIORITY_NORMAL,
+ AVRT_PRIORITY_HIGH,
+ AVRT_PRIORITY_CRITICAL
+ } AVRT_PRIORITY, *PAVRT_PRIORITY;
+ #endif
+
+ #include <basetyps.h> // << for IID/CLSID
+ #include <rpcsal.h>
+ #include <sal.h>
+
+ #ifndef __LPCGUID_DEFINED__
+ #define __LPCGUID_DEFINED__
+ typedef const GUID *LPCGUID;
+ #endif
+
+ #ifndef PROPERTYKEY_DEFINED
+ #define PROPERTYKEY_DEFINED
+ typedef struct _tagpropertykey
+ {
+ GUID fmtid;
+ DWORD pid;
+ } PROPERTYKEY;
+ #endif
+
+ #ifdef __midl_proxy
+ #define __MIDL_CONST
+ #else
+ #define __MIDL_CONST const
+ #endif
+
+ #ifdef WIN64
+ #include <wtypes.h>
+ typedef LONG NTSTATUS;
+ #define FASTCALL
+ #include <oleidl.h>
+ #include <objidl.h>
+ #else
+ typedef struct _BYTE_BLOB
+ {
+ unsigned long clSize;
+ unsigned char abData[ 1 ];
+ } BYTE_BLOB;
+ typedef /* [unique] */ __RPC_unique_pointer BYTE_BLOB *UP_BYTE_BLOB;
+ typedef LONGLONG REFERENCE_TIME;
+ #define NONAMELESSUNION
+ #endif
+
+ #ifndef WAVE_FORMAT_IEEE_FLOAT
+ #define WAVE_FORMAT_IEEE_FLOAT 0x0003 // 32-bit floating-point
+ #endif
+
+ #ifndef __MINGW_EXTENSION
+ #if defined(__GNUC__) || defined(__GNUG__)
+ #define __MINGW_EXTENSION __extension__
+ #else
+ #define __MINGW_EXTENSION
+ #endif
+ #endif
+
+ #include <sdkddkver.h>
+ #include <propkeydef.h>
+ #define COBJMACROS
+ #define INITGUID // Avoid additional linkage of static libs, excessive code will be optimized out by the compiler
+ #include <audioclient.h>
+ #include <mmdeviceapi.h>
+ #include <endpointvolume.h>
+ #include <functiondiscoverykeys.h>
+ #include <devicetopology.h> // Used to get IKsJackDescription interface
+ #undef INITGUID
+
+#endif // NTDDI_VERSION
+
+#ifndef GUID_SECT
+ #define GUID_SECT
+#endif
+
+#define __DEFINE_GUID(n,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) static const GUID n GUID_SECT = {l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}}
+#define __DEFINE_IID(n,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) static const IID n GUID_SECT = {l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}}
+#define __DEFINE_CLSID(n,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) static const CLSID n GUID_SECT = {l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}}
+#define PA_DEFINE_CLSID(className, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
+ __DEFINE_CLSID(pa_CLSID_##className, 0x##l, 0x##w1, 0x##w2, 0x##b1, 0x##b2, 0x##b3, 0x##b4, 0x##b5, 0x##b6, 0x##b7, 0x##b8)
+#define PA_DEFINE_IID(interfaceName, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
+ __DEFINE_IID(pa_IID_##interfaceName, 0x##l, 0x##w1, 0x##w2, 0x##b1, 0x##b2, 0x##b3, 0x##b4, 0x##b5, 0x##b6, 0x##b7, 0x##b8)
+
+// "1CB9AD4C-DBFA-4c32-B178-C2F568A703B2"
+PA_DEFINE_IID(IAudioClient, 1cb9ad4c, dbfa, 4c32, b1, 78, c2, f5, 68, a7, 03, b2);
+// "726778CD-F60A-4EDA-82DE-E47610CD78AA"
+PA_DEFINE_IID(IAudioClient2, 726778cd, f60a, 4eda, 82, de, e4, 76, 10, cd, 78, aa);
+// "1BE09788-6894-4089-8586-9A2A6C265AC5"
+PA_DEFINE_IID(IMMEndpoint, 1be09788, 6894, 4089, 85, 86, 9a, 2a, 6c, 26, 5a, c5);
+// "A95664D2-9614-4F35-A746-DE8DB63617E6"
+PA_DEFINE_IID(IMMDeviceEnumerator, a95664d2, 9614, 4f35, a7, 46, de, 8d, b6, 36, 17, e6);
+// "BCDE0395-E52F-467C-8E3D-C4579291692E"
+PA_DEFINE_CLSID(IMMDeviceEnumerator,bcde0395, e52f, 467c, 8e, 3d, c4, 57, 92, 91, 69, 2e);
+// "F294ACFC-3146-4483-A7BF-ADDCA7C260E2"
+PA_DEFINE_IID(IAudioRenderClient, f294acfc, 3146, 4483, a7, bf, ad, dc, a7, c2, 60, e2);
+// "C8ADBD64-E71E-48a0-A4DE-185C395CD317"
+PA_DEFINE_IID(IAudioCaptureClient, c8adbd64, e71e, 48a0, a4, de, 18, 5c, 39, 5c, d3, 17);
+// *2A07407E-6497-4A18-9787-32F79BD0D98F* Or this??
+PA_DEFINE_IID(IDeviceTopology, 2A07407E, 6497, 4A18, 97, 87, 32, f7, 9b, d0, d9, 8f);
+// *AE2DE0E4-5BCA-4F2D-AA46-5D13F8FDB3A9*
+PA_DEFINE_IID(IPart, AE2DE0E4, 5BCA, 4F2D, aa, 46, 5d, 13, f8, fd, b3, a9);
+// *4509F757-2D46-4637-8E62-CE7DB944F57B*
+PA_DEFINE_IID(IKsJackDescription, 4509F757, 2D46, 4637, 8e, 62, ce, 7d, b9, 44, f5, 7b);
+// Media formats:
+__DEFINE_GUID(pa_KSDATAFORMAT_SUBTYPE_PCM, 0x00000001, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71 );
+__DEFINE_GUID(pa_KSDATAFORMAT_SUBTYPE_ADPCM, 0x00000002, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71 );
+__DEFINE_GUID(pa_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT, 0x00000003, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71 );
+
+#ifdef __IAudioClient2_INTERFACE_DEFINED__
+typedef enum _pa_AUDCLNT_STREAMOPTIONS {
+ pa_AUDCLNT_STREAMOPTIONS_NONE = 0x00,
+ pa_AUDCLNT_STREAMOPTIONS_RAW = 0x01,
+ pa_AUDCLNT_STREAMOPTIONS_MATCH_FORMAT = 0x02
+} pa_AUDCLNT_STREAMOPTIONS;
+typedef struct _pa_AudioClientProperties {
+ UINT32 cbSize;
+ BOOL bIsOffload;
+ AUDIO_STREAM_CATEGORY eCategory;
+ pa_AUDCLNT_STREAMOPTIONS Options;
+} pa_AudioClientProperties;
+#define PA_AUDIOCLIENTPROPERTIES_SIZE_CATEGORY (sizeof(pa_AudioClientProperties) - sizeof(pa_AUDCLNT_STREAMOPTIONS))
+#define PA_AUDIOCLIENTPROPERTIES_SIZE_OPTIONS sizeof(pa_AudioClientProperties)
+#endif // __IAudioClient2_INTERFACE_DEFINED__
+
+/* use CreateThread for CYGWIN/Windows Mobile, _beginthreadex for all others */
+#if !defined(__CYGWIN__) && !defined(_WIN32_WCE)
+ #define CREATE_THREAD(PROC) (HANDLE)_beginthreadex( NULL, 0, (PROC), stream, 0, &stream->dwThreadId )
+ #define PA_THREAD_FUNC static unsigned WINAPI
+ #define PA_THREAD_ID unsigned
+#else
+ #define CREATE_THREAD(PROC) CreateThread( NULL, 0, (PROC), stream, 0, &stream->dwThreadId )
+ #define PA_THREAD_FUNC static DWORD WINAPI
+ #define PA_THREAD_ID DWORD
+#endif
+
+// Thread function forward decl.
+PA_THREAD_FUNC ProcThreadEvent(void *param);
+PA_THREAD_FUNC ProcThreadPoll(void *param);
+
+// Availabe from Windows 7
+#ifndef AUDCLNT_E_BUFFER_ERROR
+ #define AUDCLNT_E_BUFFER_ERROR AUDCLNT_ERR(0x018)
+#endif
+#ifndef AUDCLNT_E_BUFFER_SIZE_NOT_ALIGNED
+ #define AUDCLNT_E_BUFFER_SIZE_NOT_ALIGNED AUDCLNT_ERR(0x019)
+#endif
+#ifndef AUDCLNT_E_INVALID_DEVICE_PERIOD
+ #define AUDCLNT_E_INVALID_DEVICE_PERIOD AUDCLNT_ERR(0x020)
+#endif
+
+#define MAX_STR_LEN 512
+
+enum { S_INPUT = 0, S_OUTPUT = 1, S_COUNT = 2, S_FULLDUPLEX = 0 };
+
+// Number of packets which compose single contignous buffer. With trial and error it was calculated
+// that WASAPI Input sub-system uses 6 packets per whole buffer. Please provide more information
+// or corrections if available.
+enum { WASAPI_PACKETS_PER_INPUT_BUFFER = 6 };
+
+#define STATIC_ARRAY_SIZE(array) (sizeof(array)/sizeof(array[0]))
+
+#define PRINT(x) PA_DEBUG(x);
+
+#define PA_SKELETON_SET_LAST_HOST_ERROR( errorCode, errorText ) \
+ PaUtil_SetLastHostErrorInfo( paWASAPI, errorCode, errorText )
+
+#define PA_WASAPI__IS_FULLDUPLEX(STREAM) ((STREAM)->in.clientProc && (STREAM)->out.clientProc)
+
+#ifndef IF_FAILED_JUMP
+#define IF_FAILED_JUMP(hr, label) if(FAILED(hr)) goto label;
+#endif
+
+#ifndef IF_FAILED_INTERNAL_ERROR_JUMP
+#define IF_FAILED_INTERNAL_ERROR_JUMP(hr, error, label) if(FAILED(hr)) { error = paInternalError; goto label; }
+#endif
+
+#define SAFE_CLOSE(h) if ((h) != NULL) { CloseHandle((h)); (h) = NULL; }
+#define SAFE_RELEASE(punk) if ((punk) != NULL) { (punk)->lpVtbl->Release((punk)); (punk) = NULL; }
+
+// Mixer function
+typedef void (*MixMonoToStereoF) (void *__to, void *__from, UINT32 count);
+
+// AVRT is the new "multimedia schedulling stuff"
+typedef BOOL (WINAPI *FAvRtCreateThreadOrderingGroup) (PHANDLE,PLARGE_INTEGER,GUID*,PLARGE_INTEGER);
+typedef BOOL (WINAPI *FAvRtDeleteThreadOrderingGroup) (HANDLE);
+typedef BOOL (WINAPI *FAvRtWaitOnThreadOrderingGroup) (HANDLE);
+typedef HANDLE (WINAPI *FAvSetMmThreadCharacteristics) (LPCSTR,LPDWORD);
+typedef BOOL (WINAPI *FAvRevertMmThreadCharacteristics)(HANDLE);
+typedef BOOL (WINAPI *FAvSetMmThreadPriority) (HANDLE,AVRT_PRIORITY);
+
+static HMODULE hDInputDLL = 0;
+FAvRtCreateThreadOrderingGroup pAvRtCreateThreadOrderingGroup = NULL;
+FAvRtDeleteThreadOrderingGroup pAvRtDeleteThreadOrderingGroup = NULL;
+FAvRtWaitOnThreadOrderingGroup pAvRtWaitOnThreadOrderingGroup = NULL;
+FAvSetMmThreadCharacteristics pAvSetMmThreadCharacteristics = NULL;
+FAvRevertMmThreadCharacteristics pAvRevertMmThreadCharacteristics = NULL;
+FAvSetMmThreadPriority pAvSetMmThreadPriority = NULL;
+
+#define _GetProc(fun, type, name) { \
+ fun = (type) GetProcAddress(hDInputDLL,name); \
+ if (fun == NULL) { \
+ PRINT(("GetProcAddr failed for %s" ,name)); \
+ return FALSE; \
+ } \
+ } \
+
+// ------------------------------------------------------------------------------------------
+/* prototypes for functions declared in this file */
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+PaError PaWasapi_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+// dummy entry point for other compilers and sdks
+// currently built using RC1 SDK (5600)
+//#if _MSC_VER < 1400
+//PaError PaWasapi_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex hostApiIndex )
+//{
+ //return paNoError;
+//}
+//#else
+
+// ------------------------------------------------------------------------------------------
+static void Terminate( struct PaUtilHostApiRepresentation *hostApi );
+static PaError IsFormatSupported( struct PaUtilHostApiRepresentation *hostApi,
+ const PaStreamParameters *inputParameters,
+ const PaStreamParameters *outputParameters,
+ double sampleRate );
+static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
+ PaStream** s,
+ const PaStreamParameters *inputParameters,
+ const PaStreamParameters *outputParameters,
+ double sampleRate,
+ unsigned long framesPerBuffer,
+ PaStreamFlags streamFlags,
+ PaStreamCallback *streamCallback,
+ void *userData );
+static PaError CloseStream( PaStream* stream );
+static PaError StartStream( PaStream *stream );
+static PaError StopStream( PaStream *stream );
+static PaError AbortStream( PaStream *stream );
+static PaError IsStreamStopped( PaStream *s );
+static PaError IsStreamActive( PaStream *stream );
+static PaTime GetStreamTime( PaStream *stream );
+static double GetStreamCpuLoad( PaStream* stream );
+static PaError ReadStream( PaStream* stream, void *buffer, unsigned long frames );
+static PaError WriteStream( PaStream* stream, const void *buffer, unsigned long frames );
+static signed long GetStreamReadAvailable( PaStream* stream );
+static signed long GetStreamWriteAvailable( PaStream* stream );
+
+// ------------------------------------------------------------------------------------------
+/*
+ These are fields that can be gathered from IDevice and IAudioDevice PRIOR to Initialize, and
+ done in first pass i assume that neither of these will cause the Driver to "load", but again,
+ who knows how they implement their stuff
+ */
+typedef struct PaWasapiDeviceInfo
+{
+ // Device
+ IMMDevice *device;
+
+ // from GetId
+ WCHAR szDeviceID[MAX_STR_LEN];
+
+ // from GetState
+ DWORD state;
+
+ // Fields filled from IMMEndpoint'sGetDataFlow
+ EDataFlow flow;
+
+ // Fields filled from IAudioDevice (_prior_ to Initialize)
+ // from GetDevicePeriod(
+ REFERENCE_TIME DefaultDevicePeriod;
+ REFERENCE_TIME MinimumDevicePeriod;
+
+ // from GetMixFormat
+ // WAVEFORMATEX *MixFormat;//needs to be CoTaskMemFree'd after use!
+
+ // Default format (setup through Control Panel by user)
+ WAVEFORMATEXTENSIBLE DefaultFormat;
+
+ // Formfactor
+ EndpointFormFactor formFactor;
+}
+PaWasapiDeviceInfo;
+
+// ------------------------------------------------------------------------------------------
+/* PaWasapiHostApiRepresentation - host api datastructure specific to this implementation */
+typedef struct
+{
+ PaUtilHostApiRepresentation inheritedHostApiRep;
+ PaUtilStreamInterface callbackStreamInterface;
+ PaUtilStreamInterface blockingStreamInterface;
+
+ PaUtilAllocationGroup *allocations;
+
+ /* implementation specific data goes here */
+
+ PaWinUtilComInitializationResult comInitializationResult;
+
+ //in case we later need the synch
+ IMMDeviceEnumerator *enumerator;
+
+ //this is the REAL number of devices, whether they are usefull to PA or not!
+ UINT32 deviceCount;
+
+ WCHAR defaultRenderer [MAX_STR_LEN];
+ WCHAR defaultCapturer [MAX_STR_LEN];
+
+ PaWasapiDeviceInfo *devInfo;
+
+ // Is true when WOW64 Vista/7 Workaround is needed
+ BOOL useWOW64Workaround;
+}
+PaWasapiHostApiRepresentation;
+
+// ------------------------------------------------------------------------------------------
+/* PaWasapiAudioClientParams - audio client parameters */
+typedef struct PaWasapiAudioClientParams
+{
+ PaWasapiDeviceInfo *device_info;
+ PaStreamParameters stream_params;
+ PaWasapiStreamInfo wasapi_params;
+ UINT32 frames_per_buffer;
+ double sample_rate;
+ BOOL blocking;
+ BOOL full_duplex;
+ BOOL wow64_workaround;
+}
+PaWasapiAudioClientParams;
+
+// ------------------------------------------------------------------------------------------
+/* PaWasapiStream - a stream data structure specifically for this implementation */
+typedef struct PaWasapiSubStream
+{
+ IAudioClient *clientParent;
+ IStream *clientStream;
+ IAudioClient *clientProc;
+
+ WAVEFORMATEXTENSIBLE wavex;
+ UINT32 bufferSize;
+ REFERENCE_TIME deviceLatency;
+ REFERENCE_TIME period;
+ double latencySeconds;
+ UINT32 framesPerHostCallback;
+ AUDCLNT_SHAREMODE shareMode;
+ UINT32 streamFlags; // AUDCLNT_STREAMFLAGS_EVENTCALLBACK, ...
+ UINT32 flags;
+ PaWasapiAudioClientParams params; //!< parameters
+
+ // Buffers
+ UINT32 buffers; //!< number of buffers used (from host side)
+ UINT32 framesPerBuffer; //!< number of frames per 1 buffer
+ BOOL userBufferAndHostMatch;
+
+ // Used for Mono >> Stereo workaround, if driver does not support it
+ // (in Exclusive mode WASAPI usually refuses to operate with Mono (1-ch)
+ void *monoBuffer; //!< pointer to buffer
+ UINT32 monoBufferSize; //!< buffer size in bytes
+ MixMonoToStereoF monoMixer; //!< pointer to mixer function
+
+ PaUtilRingBuffer *tailBuffer; //!< buffer with trailing sample for blocking mode operations (only for Input)
+ void *tailBufferMemory; //!< tail buffer memory region
+}
+PaWasapiSubStream;
+
+// ------------------------------------------------------------------------------------------
+/* PaWasapiHostProcessor - redirects processing data */
+typedef struct PaWasapiHostProcessor
+{
+ PaWasapiHostProcessorCallback processor;
+ void *userData;
+}
+PaWasapiHostProcessor;
+
+// ------------------------------------------------------------------------------------------
+typedef struct PaWasapiStream
+{
+ /* IMPLEMENT ME: rename this */
+ PaUtilStreamRepresentation streamRepresentation;
+ PaUtilCpuLoadMeasurer cpuLoadMeasurer;
+ PaUtilBufferProcessor bufferProcessor;
+
+ // input
+ PaWasapiSubStream in;
+ IAudioCaptureClient *captureClientParent;
+ IStream *captureClientStream;
+ IAudioCaptureClient *captureClient;
+ IAudioEndpointVolume *inVol;
+
+ // output
+ PaWasapiSubStream out;
+ IAudioRenderClient *renderClientParent;
+ IStream *renderClientStream;
+ IAudioRenderClient *renderClient;
+ IAudioEndpointVolume *outVol;
+
+ // event handles for event-driven processing mode
+ HANDLE event[S_COUNT];
+
+ // buffer mode
+ PaUtilHostBufferSizeMode bufferMode;
+
+ // must be volatile to avoid race condition on user query while
+ // thread is being started
+ volatile BOOL running;
+
+ PA_THREAD_ID dwThreadId;
+ HANDLE hThread;
+ HANDLE hCloseRequest;
+ HANDLE hThreadStart; //!< signalled by thread on start
+ HANDLE hThreadExit; //!< signalled by thread on exit
+ HANDLE hBlockingOpStreamRD;
+ HANDLE hBlockingOpStreamWR;
+
+ // Host callback Output overrider
+ PaWasapiHostProcessor hostProcessOverrideOutput;
+
+ // Host callback Input overrider
+ PaWasapiHostProcessor hostProcessOverrideInput;
+
+ // Defines blocking/callback interface used
+ BOOL bBlocking;
+
+ // Av Task (MM thread management)
+ HANDLE hAvTask;
+
+ // Thread priority level
+ PaWasapiThreadPriority nThreadPriority;
+}
+PaWasapiStream;
+
+// COM marshaling
+static HRESULT MarshalSubStreamComPointers(PaWasapiSubStream *substream);
+static HRESULT MarshalStreamComPointers(PaWasapiStream *stream);
+static HRESULT UnmarshalSubStreamComPointers(PaWasapiSubStream *substream);
+static HRESULT UnmarshalStreamComPointers(PaWasapiStream *stream);
+static void ReleaseUnmarshaledSubComPointers(PaWasapiSubStream *substream);
+static void ReleaseUnmarshaledComPointers(PaWasapiStream *stream);
+
+// Local stream methods
+static void _StreamOnStop(PaWasapiStream *stream);
+static void _StreamFinish(PaWasapiStream *stream);
+static void _StreamCleanup(PaWasapiStream *stream);
+static HRESULT _PollGetOutputFramesAvailable(PaWasapiStream *stream, UINT32 *available);
+static HRESULT _PollGetInputFramesAvailable(PaWasapiStream *stream, UINT32 *available);
+static void *PaWasapi_ReallocateMemory(void *ptr, size_t size);
+static void PaWasapi_FreeMemory(void *ptr);
+
+// Local statics
+
+// ------------------------------------------------------------------------------------------
+#define LogHostError(HRES) __LogHostError(HRES, __FUNCTION__, __FILE__, __LINE__)
+static HRESULT __LogHostError(HRESULT res, const char *func, const char *file, int line)
+{
+ const char *text = NULL;
+ switch (res)
+ {
+ case S_OK: return res;
+ case E_POINTER :text ="E_POINTER"; break;
+ case E_INVALIDARG :text ="E_INVALIDARG"; break;
+
+ case AUDCLNT_E_NOT_INITIALIZED :text ="AUDCLNT_E_NOT_INITIALIZED"; break;
+ case AUDCLNT_E_ALREADY_INITIALIZED :text ="AUDCLNT_E_ALREADY_INITIALIZED"; break;
+ case AUDCLNT_E_WRONG_ENDPOINT_TYPE :text ="AUDCLNT_E_WRONG_ENDPOINT_TYPE"; break;
+ case AUDCLNT_E_DEVICE_INVALIDATED :text ="AUDCLNT_E_DEVICE_INVALIDATED"; break;
+ case AUDCLNT_E_NOT_STOPPED :text ="AUDCLNT_E_NOT_STOPPED"; break;
+ case AUDCLNT_E_BUFFER_TOO_LARGE :text ="AUDCLNT_E_BUFFER_TOO_LARGE"; break;
+ case AUDCLNT_E_OUT_OF_ORDER :text ="AUDCLNT_E_OUT_OF_ORDER"; break;
+ case AUDCLNT_E_UNSUPPORTED_FORMAT :text ="AUDCLNT_E_UNSUPPORTED_FORMAT"; break;
+ case AUDCLNT_E_INVALID_SIZE :text ="AUDCLNT_E_INVALID_SIZE"; break;
+ case AUDCLNT_E_DEVICE_IN_USE :text ="AUDCLNT_E_DEVICE_IN_USE"; break;
+ case AUDCLNT_E_BUFFER_OPERATION_PENDING :text ="AUDCLNT_E_BUFFER_OPERATION_PENDING"; break;
+ case AUDCLNT_E_THREAD_NOT_REGISTERED :text ="AUDCLNT_E_THREAD_NOT_REGISTERED"; break;
+ case AUDCLNT_E_EXCLUSIVE_MODE_NOT_ALLOWED :text ="AUDCLNT_E_EXCLUSIVE_MODE_NOT_ALLOWED"; break;
+ case AUDCLNT_E_ENDPOINT_CREATE_FAILED :text ="AUDCLNT_E_ENDPOINT_CREATE_FAILED"; break;
+ case AUDCLNT_E_SERVICE_NOT_RUNNING :text ="AUDCLNT_E_SERVICE_NOT_RUNNING"; break;
+ case AUDCLNT_E_EVENTHANDLE_NOT_EXPECTED :text ="AUDCLNT_E_EVENTHANDLE_NOT_EXPECTED"; break;
+ case AUDCLNT_E_EXCLUSIVE_MODE_ONLY :text ="AUDCLNT_E_EXCLUSIVE_MODE_ONLY"; break;
+ case AUDCLNT_E_BUFDURATION_PERIOD_NOT_EQUAL :text ="AUDCLNT_E_BUFDURATION_PERIOD_NOT_EQUAL"; break;
+ case AUDCLNT_E_EVENTHANDLE_NOT_SET :text ="AUDCLNT_E_EVENTHANDLE_NOT_SET"; break;
+ case AUDCLNT_E_INCORRECT_BUFFER_SIZE :text ="AUDCLNT_E_INCORRECT_BUFFER_SIZE"; break;
+ case AUDCLNT_E_BUFFER_SIZE_ERROR :text ="AUDCLNT_E_BUFFER_SIZE_ERROR"; break;
+ case AUDCLNT_E_CPUUSAGE_EXCEEDED :text ="AUDCLNT_E_CPUUSAGE_EXCEEDED"; break;
+ case AUDCLNT_E_BUFFER_ERROR :text ="AUDCLNT_E_BUFFER_ERROR"; break;
+ case AUDCLNT_E_BUFFER_SIZE_NOT_ALIGNED :text ="AUDCLNT_E_BUFFER_SIZE_NOT_ALIGNED"; break;
+ case AUDCLNT_E_INVALID_DEVICE_PERIOD :text ="AUDCLNT_E_INVALID_DEVICE_PERIOD"; break;
+
+ case AUDCLNT_S_BUFFER_EMPTY :text ="AUDCLNT_S_BUFFER_EMPTY"; break;
+ case AUDCLNT_S_THREAD_ALREADY_REGISTERED :text ="AUDCLNT_S_THREAD_ALREADY_REGISTERED"; break;
+ case AUDCLNT_S_POSITION_STALLED :text ="AUDCLNT_S_POSITION_STALLED"; break;
+
+ // other windows common errors:
+ case CO_E_NOTINITIALIZED :text ="CO_E_NOTINITIALIZED: you must call CoInitialize() before Pa_OpenStream()"; break;
+
+ default:
+ text = "UNKNOWN ERROR";
+ }
+ PRINT(("WASAPI ERROR HRESULT: 0x%X : %s\n [FUNCTION: %s FILE: %s {LINE: %d}]\n", res, text, func, file, line));
+ PA_SKELETON_SET_LAST_HOST_ERROR(res, text);
+ return res;
+}
+
+// ------------------------------------------------------------------------------------------
+#define LogPaError(PAERR) __LogPaError(PAERR, __FUNCTION__, __FILE__, __LINE__)
+static PaError __LogPaError(PaError err, const char *func, const char *file, int line)
+{
+ if (err == paNoError)
+ return err;
+ PRINT(("WASAPI ERROR PAERROR: %i : %s\n [FUNCTION: %s FILE: %s {LINE: %d}]\n", err, Pa_GetErrorText(err), func, file, line));
+ return err;
+}
+
+// ------------------------------------------------------------------------------------------
+/*! \class ThreadSleepScheduler
+ Allows to emulate thread sleep of less than 1 millisecond under Windows. Scheduler
+ calculates number of times the thread must run untill next sleep of 1 millisecond.
+ It does not make thread sleeping for real number of microseconds but rather controls
+ how many of imaginary microseconds the thread task can allow thread to sleep.
+*/
+typedef struct ThreadIdleScheduler
+{
+ UINT32 m_idle_microseconds; //!< number of microseconds to sleep
+ UINT32 m_next_sleep; //!< next sleep round
+ UINT32 m_i; //!< current round iterator position
+ UINT32 m_resolution; //!< resolution in number of milliseconds
+}
+ThreadIdleScheduler;
+//! Setup scheduler.
+static void ThreadIdleScheduler_Setup(ThreadIdleScheduler *sched, UINT32 resolution, UINT32 microseconds)
+{
+ assert(microseconds != 0);
+ assert(resolution != 0);
+ assert((resolution * 1000) >= microseconds);
+
+ memset(sched, 0, sizeof(*sched));
+
+ sched->m_idle_microseconds = microseconds;
+ sched->m_resolution = resolution;
+ sched->m_next_sleep = (resolution * 1000) / microseconds;
+}
+//! Iterate and check if can sleep.
+static UINT32 ThreadIdleScheduler_NextSleep(ThreadIdleScheduler *sched)
+{
+ // advance and check if thread can sleep
+ if (++ sched->m_i == sched->m_next_sleep)
+ {
+ sched->m_i = 0;
+ return sched->m_resolution;
+ }
+ return 0;
+}
+
+// ------------------------------------------------------------------------------------------
+/*static double nano100ToMillis(REFERENCE_TIME ref)
+{
+ // 1 nano = 0.000000001 seconds
+ //100 nano = 0.0000001 seconds
+ //100 nano = 0.0001 milliseconds
+ return ((double)ref)*0.0001;
+}*/
+
+// ------------------------------------------------------------------------------------------
+static double nano100ToSeconds(REFERENCE_TIME ref)
+{
+ // 1 nano = 0.000000001 seconds
+ //100 nano = 0.0000001 seconds
+ //100 nano = 0.0001 milliseconds
+ return ((double)ref)*0.0000001;
+}
+
+// ------------------------------------------------------------------------------------------
+/*static REFERENCE_TIME MillisTonano100(double ref)
+{
+ // 1 nano = 0.000000001 seconds
+ //100 nano = 0.0000001 seconds
+ //100 nano = 0.0001 milliseconds
+ return (REFERENCE_TIME)(ref/0.0001);
+}*/
+
+// ------------------------------------------------------------------------------------------
+static REFERENCE_TIME SecondsTonano100(double ref)
+{
+ // 1 nano = 0.000000001 seconds
+ //100 nano = 0.0000001 seconds
+ //100 nano = 0.0001 milliseconds
+ return (REFERENCE_TIME)(ref/0.0000001);
+}
+
+// ------------------------------------------------------------------------------------------
+// Makes Hns period from frames and sample rate
+static REFERENCE_TIME MakeHnsPeriod(UINT32 nFrames, DWORD nSamplesPerSec)
+{
+ return (REFERENCE_TIME)((10000.0 * 1000 / nSamplesPerSec * nFrames) + 0.5);
+}
+
+// ------------------------------------------------------------------------------------------
+// Converts PaSampleFormat to bits per sample value
+static WORD PaSampleFormatToBitsPerSample(PaSampleFormat format_id)
+{
+ switch (format_id & ~paNonInterleaved)
+ {
+ case paFloat32:
+ case paInt32: return 32;
+ case paInt24: return 24;
+ case paInt16: return 16;
+ case paInt8:
+ case paUInt8: return 8;
+ }
+ return 0;
+}
+
+// ------------------------------------------------------------------------------------------
+// Converts PaSampleFormat to bits per sample value
+/*static WORD PaSampleFormatToBytesPerSample(PaSampleFormat format_id)
+{
+ return PaSampleFormatToBitsPerSample(format_id) >> 3; // 'bits/8'
+}*/
+
+// ------------------------------------------------------------------------------------------
+// Converts Hns period into number of frames
+static UINT32 MakeFramesFromHns(REFERENCE_TIME hnsPeriod, UINT32 nSamplesPerSec)
+{
+ UINT32 nFrames = (UINT32)( // frames =
+ 1.0 * hnsPeriod * // hns *
+ nSamplesPerSec / // (frames / s) /
+ 1000 / // (ms / s) /
+ 10000 // (hns / s) /
+ + 0.5 // rounding
+ );
+ return nFrames;
+}
+
+// Aligning function type
+typedef UINT32 (*ALIGN_FUNC) (UINT32 v, UINT32 align);
+
+// ------------------------------------------------------------------------------------------
+// Aligns 'v' backwards
+static UINT32 ALIGN_BWD(UINT32 v, UINT32 align)
+{
+ return ((v - (align ? v % align : 0)));
+}
+
+// ------------------------------------------------------------------------------------------
+// Aligns 'v' forward
+static UINT32 ALIGN_FWD(UINT32 v, UINT32 align)
+{
+ UINT32 remainder = (align ? (v % align) : 0);
+ if (remainder == 0)
+ return v;
+ return v + (align - remainder);
+}
+
+// ------------------------------------------------------------------------------------------
+// Get next value power of 2
+UINT32 ALIGN_NEXT_POW2(UINT32 v)
+{
+ UINT32 v2 = 1;
+ while (v > (v2 <<= 1)) { }
+ v = v2;
+ return v;
+}
+
+// ------------------------------------------------------------------------------------------
+// Aligns WASAPI buffer to 128 byte packet boundary. HD Audio will fail to play if buffer
+// is misaligned. This problem was solved in Windows 7 were AUDCLNT_E_BUFFER_SIZE_NOT_ALIGNED
+// is thrown although we must align for Vista anyway.
+static UINT32 AlignFramesPerBuffer(UINT32 nFrames, UINT32 nSamplesPerSec, UINT32 nBlockAlign,
+ ALIGN_FUNC pAlignFunc)
+{
+#define HDA_PACKET_SIZE (128)
+
+ long frame_bytes = nFrames * nBlockAlign;
+ long packets;
+
+ // align to packet size
+ frame_bytes = pAlignFunc(frame_bytes, HDA_PACKET_SIZE); // use ALIGN_FWD if bigger but safer period is more desired
+
+ // atlest 1 frame must be available
+ if (frame_bytes < HDA_PACKET_SIZE)
+ frame_bytes = HDA_PACKET_SIZE;
+
+ nFrames = frame_bytes / nBlockAlign;
+ packets = frame_bytes / HDA_PACKET_SIZE;
+
+ frame_bytes = packets * HDA_PACKET_SIZE;
+ nFrames = frame_bytes / nBlockAlign;
+
+ return nFrames;
+
+#undef HDA_PACKET_SIZE
+}
+
+// ------------------------------------------------------------------------------------------
+static UINT32 GetFramesSleepTime(UINT32 nFrames, UINT32 nSamplesPerSec)
+{
+ REFERENCE_TIME nDuration;
+ if (nSamplesPerSec == 0)
+ return 0;
+#define REFTIMES_PER_SEC 10000000
+#define REFTIMES_PER_MILLISEC 10000
+ // Calculate the actual duration of the allocated buffer.
+ nDuration = (REFERENCE_TIME)((double)REFTIMES_PER_SEC * nFrames / nSamplesPerSec);
+ return (UINT32)(nDuration/REFTIMES_PER_MILLISEC/2);
+}
+
+// ------------------------------------------------------------------------------------------
+static UINT32 GetFramesSleepTimeMicroseconds(UINT32 nFrames, UINT32 nSamplesPerSec)
+{
+ REFERENCE_TIME nDuration;
+ if (nSamplesPerSec == 0)
+ return 0;
+#define REFTIMES_PER_SEC 10000000
+#define REFTIMES_PER_MILLISEC 10000
+ // Calculate the actual duration of the allocated buffer.
+ nDuration = (REFERENCE_TIME)((double)REFTIMES_PER_SEC * nFrames / nSamplesPerSec);
+ return (UINT32)(nDuration/10/2);
+}
+
+// ------------------------------------------------------------------------------------------
+static BOOL SetupAVRT()
+{
+ hDInputDLL = LoadLibraryA("avrt.dll");
+ if (hDInputDLL == NULL)
+ return FALSE;
+
+ _GetProc(pAvRtCreateThreadOrderingGroup, FAvRtCreateThreadOrderingGroup, "AvRtCreateThreadOrderingGroup");
+ _GetProc(pAvRtDeleteThreadOrderingGroup, FAvRtDeleteThreadOrderingGroup, "AvRtDeleteThreadOrderingGroup");
+ _GetProc(pAvRtWaitOnThreadOrderingGroup, FAvRtWaitOnThreadOrderingGroup, "AvRtWaitOnThreadOrderingGroup");
+ _GetProc(pAvSetMmThreadCharacteristics, FAvSetMmThreadCharacteristics, "AvSetMmThreadCharacteristicsA");
+ _GetProc(pAvRevertMmThreadCharacteristics,FAvRevertMmThreadCharacteristics,"AvRevertMmThreadCharacteristics");
+ _GetProc(pAvSetMmThreadPriority, FAvSetMmThreadPriority, "AvSetMmThreadPriority");
+
+ return pAvRtCreateThreadOrderingGroup &&
+ pAvRtDeleteThreadOrderingGroup &&
+ pAvRtWaitOnThreadOrderingGroup &&
+ pAvSetMmThreadCharacteristics &&
+ pAvRevertMmThreadCharacteristics &&
+ pAvSetMmThreadPriority;
+}
+
+// ------------------------------------------------------------------------------------------
+static void CloseAVRT()
+{
+ if (hDInputDLL != NULL)
+ FreeLibrary(hDInputDLL);
+ hDInputDLL = NULL;
+}
+
+// ------------------------------------------------------------------------------------------
+static BOOL IsWow64()
+{
+ // http://msdn.microsoft.com/en-us/library/ms684139(VS.85).aspx
+
+ typedef BOOL (WINAPI *LPFN_ISWOW64PROCESS) (HANDLE, PBOOL);
+ LPFN_ISWOW64PROCESS fnIsWow64Process;
+
+ BOOL bIsWow64 = FALSE;
+
+ // IsWow64Process is not available on all supported versions of Windows.
+ // Use GetModuleHandle to get a handle to the DLL that contains the function
+ // and GetProcAddress to get a pointer to the function if available.
+
+ fnIsWow64Process = (LPFN_ISWOW64PROCESS) GetProcAddress(
+ GetModuleHandleA("kernel32"), "IsWow64Process");
+
+ if (fnIsWow64Process == NULL)
+ return FALSE;
+
+ if (!fnIsWow64Process(GetCurrentProcess(), &bIsWow64))
+ return FALSE;
+
+ return bIsWow64;
+}
+
+// ------------------------------------------------------------------------------------------
+typedef enum EWindowsVersion
+{
+ WINDOWS_UNKNOWN = 0,
+ WINDOWS_VISTA_SERVER2008,
+ WINDOWS_7_SERVER2008R2,
+ WINDOWS_8_SERVER2012,
+ WINDOWS_8_1_SERVER2012R2,
+ WINDOWS_10_SERVER2016,
+ WINDOWS_FUTURE
+}
+EWindowsVersion;
+// Alternative way for checking Windows version (allows to check version on Windows 8.1 and up)
+static BOOL IsWindowsVersionOrGreater(WORD wMajorVersion, WORD wMinorVersion, WORD wServicePackMajor)
+{
+ typedef ULONGLONG (NTAPI *LPFN_VERSETCONDITIONMASK)(ULONGLONG ConditionMask, DWORD TypeMask, BYTE Condition);
+ typedef BOOL (WINAPI *LPFN_VERIFYVERSIONINFO)(LPOSVERSIONINFOEXA lpVersionInformation, DWORD dwTypeMask, DWORDLONG dwlConditionMask);
+
+ LPFN_VERSETCONDITIONMASK fnVerSetConditionMask;
+ LPFN_VERIFYVERSIONINFO fnVerifyVersionInfo;
+ OSVERSIONINFOEXA osvi = { sizeof(osvi), 0, 0, 0, 0, {0}, 0, 0 };
+ DWORDLONG dwlConditionMask;
+
+ fnVerSetConditionMask = (LPFN_VERSETCONDITIONMASK)GetProcAddress(GetModuleHandleA("kernel32"), "VerSetConditionMask");
+ fnVerifyVersionInfo = (LPFN_VERIFYVERSIONINFO)GetProcAddress(GetModuleHandleA("kernel32"), "VerifyVersionInfoA");
+
+ if ((fnVerSetConditionMask == NULL) || (fnVerifyVersionInfo == NULL))
+ return FALSE;
+
+ dwlConditionMask = fnVerSetConditionMask(
+ fnVerSetConditionMask(
+ fnVerSetConditionMask(
+ 0, VER_MAJORVERSION, VER_GREATER_EQUAL),
+ VER_MINORVERSION, VER_GREATER_EQUAL),
+ VER_SERVICEPACKMAJOR, VER_GREATER_EQUAL);
+
+ osvi.dwMajorVersion = wMajorVersion;
+ osvi.dwMinorVersion = wMinorVersion;
+ osvi.wServicePackMajor = wServicePackMajor;
+
+ return (fnVerifyVersionInfo(&osvi, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR, dwlConditionMask) != FALSE);
+}
+// Get Windows version
+static EWindowsVersion GetWindowsVersion()
+{
+ static EWindowsVersion version = WINDOWS_UNKNOWN;
+
+ if (version == WINDOWS_UNKNOWN)
+ {
+ DWORD dwVersion = 0;
+ DWORD dwMajorVersion = 0;
+ DWORD dwMinorVersion = 0;
+ DWORD dwBuild = 0;
+
+ typedef DWORD (WINAPI *LPFN_GETVERSION)(VOID);
+ LPFN_GETVERSION fnGetVersion;
+
+ fnGetVersion = (LPFN_GETVERSION)GetProcAddress(GetModuleHandleA("kernel32"), "GetVersion");
+ if (fnGetVersion != NULL)
+ {
+ PRINT(("WASAPI: getting Windows version with GetVersion()\n"));
+
+ dwVersion = fnGetVersion();
+
+ // Get the Windows version
+ dwMajorVersion = (DWORD)(LOBYTE(LOWORD(dwVersion)));
+ dwMinorVersion = (DWORD)(HIBYTE(LOWORD(dwVersion)));
+
+ // Get the build number
+ if (dwVersion < 0x80000000)
+ dwBuild = (DWORD)(HIWORD(dwVersion));
+
+ switch (dwMajorVersion)
+ {
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ case 4:
+ case 5:
+ break; // skip lower
+ case 6:
+ switch (dwMinorVersion)
+ {
+ case 0: version = WINDOWS_VISTA_SERVER2008; break;
+ case 1: version = WINDOWS_7_SERVER2008R2; break;
+ case 2: version = WINDOWS_8_SERVER2012; break;
+ case 3: version = WINDOWS_8_1_SERVER2012R2; break;
+ default: version = WINDOWS_FUTURE; break;
+ }
+ break;
+ case 10:
+ switch (dwMinorVersion)
+ {
+ case 0: version = WINDOWS_10_SERVER2016; break;
+ default: version = WINDOWS_FUTURE; break;
+ }
+ break;
+ default:
+ version = WINDOWS_FUTURE;
+ break;
+ }
+ }
+ else
+ {
+ PRINT(("WASAPI: getting Windows version with VerifyVersionInfo()\n"));
+
+ if (IsWindowsVersionOrGreater(10, 0, 0))
+ version = WINDOWS_10_SERVER2016;
+ else
+ if (IsWindowsVersionOrGreater(6, 3, 0))
+ version = WINDOWS_8_1_SERVER2012R2;
+ else
+ if (IsWindowsVersionOrGreater(6, 2, 0))
+ version = WINDOWS_8_SERVER2012;
+ else
+ if (IsWindowsVersionOrGreater(6, 1, 0))
+ version = WINDOWS_7_SERVER2008R2;
+ else
+ if (IsWindowsVersionOrGreater(6, 0, 0))
+ version = WINDOWS_VISTA_SERVER2008;
+ else
+ version = WINDOWS_FUTURE;
+ }
+
+ PRINT(("WASAPI: Windows version = %d\n", version));
+ }
+
+ return version;
+}
+
+// ------------------------------------------------------------------------------------------
+static BOOL UseWOW64Workaround()
+{
+ // note: WOW64 bug is common to Windows Vista x64, thus we fall back to safe Poll-driven
+ // method. Windows 7 x64 seems has WOW64 bug fixed.
+
+ return (IsWow64() && (GetWindowsVersion() == WINDOWS_VISTA_SERVER2008));
+}
+
+// ------------------------------------------------------------------------------------------
+static UINT32 GetAudioClientVersion()
+{
+ if (GetWindowsVersion() >= WINDOWS_10_SERVER2016)
+ return 3;
+ else
+ if (GetWindowsVersion() >= WINDOWS_8_SERVER2012)
+ return 2;
+
+ return 1;
+}
+
+// ------------------------------------------------------------------------------------------
+static const IID *GetAudioClientIID()
+{
+ static const IID *cli_iid = NULL;
+ if (cli_iid == NULL)
+ {
+ UINT32 cli_version = GetAudioClientVersion();
+ if (cli_version <= 1)
+ {
+ cli_iid = &pa_IID_IAudioClient;
+ }
+ else
+ {
+ switch (cli_version)
+ {
+ case 3: cli_iid = &pa_IID_IAudioClient2; cli_version = 2; break; // use IAudioClient2 for Windows 10+ until IAudioClient3 functions are required
+ default: cli_iid = &pa_IID_IAudioClient2; cli_version = 2; break;
+ }
+ }
+
+ PRINT(("WASAPI: IAudioClient version = %d\n", cli_version));
+ }
+
+ return cli_iid;
+}
+
+// ------------------------------------------------------------------------------------------
+typedef enum EMixerDir { MIX_DIR__1TO2, MIX_DIR__2TO1, MIX_DIR__2TO1_L } EMixerDir;
+
+// ------------------------------------------------------------------------------------------
+#define _WASAPI_MONO_TO_STEREO_MIXER_1_TO_2(TYPE)\
+ TYPE * __restrict to = __to;\
+ TYPE * __restrict from = __from;\
+ TYPE * __restrict end = from + count;\
+ while (from != end)\
+ {\
+ *to ++ = *from;\
+ *to ++ = *from;\
+ ++ from;\
+ }
+
+// ------------------------------------------------------------------------------------------
+#define _WASAPI_MONO_TO_STEREO_MIXER_2_TO_1_FLT32(TYPE)\
+ TYPE * __restrict to = (TYPE *)__to;\
+ TYPE * __restrict from = (TYPE *)__from;\
+ TYPE * __restrict end = to + count;\
+ while (to != end)\
+ {\
+ *to ++ = (TYPE)((float)(from[0] + from[1]) * 0.5f);\
+ from += 2;\
+ }
+
+// ------------------------------------------------------------------------------------------
+#define _WASAPI_MONO_TO_STEREO_MIXER_2_TO_1_INT32(TYPE)\
+ TYPE * __restrict to = (TYPE *)__to;\
+ TYPE * __restrict from = (TYPE *)__from;\
+ TYPE * __restrict end = to + count;\
+ while (to != end)\
+ {\
+ *to ++ = (TYPE)(((INT32)from[0] + (INT32)from[1]) >> 1);\
+ from += 2;\
+ }
+
+// ------------------------------------------------------------------------------------------
+#define _WASAPI_MONO_TO_STEREO_MIXER_2_TO_1_INT64(TYPE)\
+ TYPE * __restrict to = (TYPE *)__to;\
+ TYPE * __restrict from = (TYPE *)__from;\
+ TYPE * __restrict end = to + count;\
+ while (to != end)\
+ {\
+ *to ++ = (TYPE)(((INT64)from[0] + (INT64)from[1]) >> 1);\
+ from += 2;\
+ }
+
+// ------------------------------------------------------------------------------------------
+#define _WASAPI_MONO_TO_STEREO_MIXER_2_TO_1_L(TYPE)\
+ TYPE * __restrict to = (TYPE *)__to;\
+ TYPE * __restrict from = (TYPE *)__from;\
+ TYPE * __restrict end = to + count;\
+ while (to != end)\
+ {\
+ *to ++ = from[0];\
+ from += 2;\
+ }
+
+// ------------------------------------------------------------------------------------------
+static void _MixMonoToStereo_1TO2_8(void *__to, void *__from, UINT32 count) { _WASAPI_MONO_TO_STEREO_MIXER_1_TO_2(BYTE); }
+static void _MixMonoToStereo_1TO2_16(void *__to, void *__from, UINT32 count) { _WASAPI_MONO_TO_STEREO_MIXER_1_TO_2(short); }
+static void _MixMonoToStereo_1TO2_24(void *__to, void *__from, UINT32 count) { _WASAPI_MONO_TO_STEREO_MIXER_1_TO_2(int); /* !!! int24 data is contained in 32-bit containers*/ }
+static void _MixMonoToStereo_1TO2_32(void *__to, void *__from, UINT32 count) { _WASAPI_MONO_TO_STEREO_MIXER_1_TO_2(int); }
+static void _MixMonoToStereo_1TO2_32f(void *__to, void *__from, UINT32 count) { _WASAPI_MONO_TO_STEREO_MIXER_1_TO_2(float); }
+
+// ------------------------------------------------------------------------------------------
+static void _MixMonoToStereo_2TO1_8(void *__to, void *__from, UINT32 count) { _WASAPI_MONO_TO_STEREO_MIXER_2_TO_1_INT32(BYTE); }
+static void _MixMonoToStereo_2TO1_16(void *__to, void *__from, UINT32 count) { _WASAPI_MONO_TO_STEREO_MIXER_2_TO_1_INT32(short); }
+static void _MixMonoToStereo_2TO1_24(void *__to, void *__from, UINT32 count) { _WASAPI_MONO_TO_STEREO_MIXER_2_TO_1_INT32(int); /* !!! int24 data is contained in 32-bit containers*/ }
+static void _MixMonoToStereo_2TO1_32(void *__to, void *__from, UINT32 count) { _WASAPI_MONO_TO_STEREO_MIXER_2_TO_1_INT64(int); }
+static void _MixMonoToStereo_2TO1_32f(void *__to, void *__from, UINT32 count) { _WASAPI_MONO_TO_STEREO_MIXER_2_TO_1_FLT32(float); }
+
+// ------------------------------------------------------------------------------------------
+static void _MixMonoToStereo_2TO1_8_L(void *__to, void *__from, UINT32 count) { _WASAPI_MONO_TO_STEREO_MIXER_2_TO_1_L(BYTE); }
+static void _MixMonoToStereo_2TO1_16_L(void *__to, void *__from, UINT32 count) { _WASAPI_MONO_TO_STEREO_MIXER_2_TO_1_L(short); }
+static void _MixMonoToStereo_2TO1_24_L(void *__to, void *__from, UINT32 count) { _WASAPI_MONO_TO_STEREO_MIXER_2_TO_1_L(int); /* !!! int24 data is contained in 32-bit containers*/ }
+static void _MixMonoToStereo_2TO1_32_L(void *__to, void *__from, UINT32 count) { _WASAPI_MONO_TO_STEREO_MIXER_2_TO_1_L(int); }
+static void _MixMonoToStereo_2TO1_32f_L(void *__to, void *__from, UINT32 count) { _WASAPI_MONO_TO_STEREO_MIXER_2_TO_1_L(float); }
+
+// ------------------------------------------------------------------------------------------
+static MixMonoToStereoF _GetMonoToStereoMixer(PaSampleFormat format, EMixerDir dir)
+{
+ switch (dir)
+ {
+ case MIX_DIR__1TO2:
+ switch (format & ~paNonInterleaved)
+ {
+ case paUInt8: return _MixMonoToStereo_1TO2_8;
+ case paInt16: return _MixMonoToStereo_1TO2_16;
+ case paInt24: return _MixMonoToStereo_1TO2_24;
+ case paInt32: return _MixMonoToStereo_1TO2_32;
+ case paFloat32: return _MixMonoToStereo_1TO2_32f;
+ }
+ break;
+
+ case MIX_DIR__2TO1:
+ switch (format & ~paNonInterleaved)
+ {
+ case paUInt8: return _MixMonoToStereo_2TO1_8;
+ case paInt16: return _MixMonoToStereo_2TO1_16;
+ case paInt24: return _MixMonoToStereo_2TO1_24;
+ case paInt32: return _MixMonoToStereo_2TO1_32;
+ case paFloat32: return _MixMonoToStereo_2TO1_32f;
+ }
+ break;
+
+ case MIX_DIR__2TO1_L:
+ switch (format & ~paNonInterleaved)
+ {
+ case paUInt8: return _MixMonoToStereo_2TO1_8_L;
+ case paInt16: return _MixMonoToStereo_2TO1_16_L;
+ case paInt24: return _MixMonoToStereo_2TO1_24_L;
+ case paInt32: return _MixMonoToStereo_2TO1_32_L;
+ case paFloat32: return _MixMonoToStereo_2TO1_32f_L;
+ }
+ break;
+ }
+
+ return NULL;
+}
+
+// ------------------------------------------------------------------------------------------
+PaError PaWasapi_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex hostApiIndex )
+{
+ PaError result = paNoError;
+ PaWasapiHostApiRepresentation *paWasapi;
+ PaDeviceInfo *deviceInfoArray;
+ HRESULT hr = S_OK;
+ IMMDeviceCollection* pEndPoints = NULL;
+ UINT i;
+
+ if (!SetupAVRT())
+ {
+ PRINT(("WASAPI: No AVRT! (not VISTA?)"));
+ return paNoError;
+ }
+
+ paWasapi = (PaWasapiHostApiRepresentation *)PaUtil_AllocateMemory( sizeof(PaWasapiHostApiRepresentation) );
+ if (paWasapi == NULL)
+ {
+ result = paInsufficientMemory;
+ goto error;
+ }
+
+ memset( paWasapi, 0, sizeof(PaWasapiHostApiRepresentation) ); /* ensure all fields are zeroed. especially paWasapi->allocations */
+
+ result = PaWinUtil_CoInitialize( paWASAPI, &paWasapi->comInitializationResult );
+ if( result != paNoError )
+ {
+ goto error;
+ }
+
+ paWasapi->allocations = PaUtil_CreateAllocationGroup();
+ if (paWasapi->allocations == NULL)
+ {
+ result = paInsufficientMemory;
+ goto error;
+ }
+
+ *hostApi = &paWasapi->inheritedHostApiRep;
+ (*hostApi)->info.structVersion = 1;
+ (*hostApi)->info.type = paWASAPI;
+ (*hostApi)->info.name = "Windows WASAPI";
+ (*hostApi)->info.deviceCount = 0;
+ (*hostApi)->info.defaultInputDevice = paNoDevice;
+ (*hostApi)->info.defaultOutputDevice = paNoDevice;
+
+ paWasapi->enumerator = NULL;
+ hr = CoCreateInstance(&pa_CLSID_IMMDeviceEnumerator, NULL, CLSCTX_INPROC_SERVER,
+ &pa_IID_IMMDeviceEnumerator, (void **)&paWasapi->enumerator);
+
+ // We need to set the result to a value otherwise we will return paNoError
+ // [IF_FAILED_JUMP(hResult, error);]
+ IF_FAILED_INTERNAL_ERROR_JUMP(hr, result, error);
+
+ // getting default device ids in the eMultimedia "role"
+ {
+ {
+ IMMDevice *defaultRenderer = NULL;
+ hr = IMMDeviceEnumerator_GetDefaultAudioEndpoint(paWasapi->enumerator, eRender, eMultimedia, &defaultRenderer);
+ if (hr != S_OK)
+ {
+ if (hr != E_NOTFOUND) {
+ // We need to set the result to a value otherwise we will return paNoError
+ // [IF_FAILED_JUMP(hResult, error);]
+ IF_FAILED_INTERNAL_ERROR_JUMP(hr, result, error);
+ }
+ }
+ else
+ {
+ WCHAR *pszDeviceId = NULL;
+ hr = IMMDevice_GetId(defaultRenderer, &pszDeviceId);
+ // We need to set the result to a value otherwise we will return paNoError
+ // [IF_FAILED_JUMP(hResult, error);]
+ IF_FAILED_INTERNAL_ERROR_JUMP(hr, result, error);
+ wcsncpy(paWasapi->defaultRenderer, pszDeviceId, MAX_STR_LEN-1);
+ CoTaskMemFree(pszDeviceId);
+ IMMDevice_Release(defaultRenderer);
+ }
+ }
+
+ {
+ IMMDevice *defaultCapturer = NULL;
+ hr = IMMDeviceEnumerator_GetDefaultAudioEndpoint(paWasapi->enumerator, eCapture, eMultimedia, &defaultCapturer);
+ if (hr != S_OK)
+ {
+ if (hr != E_NOTFOUND) {
+ // We need to set the result to a value otherwise we will return paNoError
+ // [IF_FAILED_JUMP(hResult, error);]
+ IF_FAILED_INTERNAL_ERROR_JUMP(hr, result, error);
+ }
+ }
+ else
+ {
+ WCHAR *pszDeviceId = NULL;
+ hr = IMMDevice_GetId(defaultCapturer, &pszDeviceId);
+ // We need to set the result to a value otherwise we will return paNoError
+ // [IF_FAILED_JUMP(hResult, error);]
+ IF_FAILED_INTERNAL_ERROR_JUMP(hr, result, error);
+ wcsncpy(paWasapi->defaultCapturer, pszDeviceId, MAX_STR_LEN-1);
+ CoTaskMemFree(pszDeviceId);
+ IMMDevice_Release(defaultCapturer);
+ }
+ }
+ }
+
+ hr = IMMDeviceEnumerator_EnumAudioEndpoints(paWasapi->enumerator, eAll, DEVICE_STATE_ACTIVE, &pEndPoints);
+ // We need to set the result to a value otherwise we will return paNoError
+ // [IF_FAILED_JUMP(hResult, error);]
+ IF_FAILED_INTERNAL_ERROR_JUMP(hr, result, error);
+
+ hr = IMMDeviceCollection_GetCount(pEndPoints, &paWasapi->deviceCount);
+ // We need to set the result to a value otherwise we will return paNoError
+ // [IF_FAILED_JUMP(hResult, error);]
+ IF_FAILED_INTERNAL_ERROR_JUMP(hr, result, error);
+
+ paWasapi->devInfo = (PaWasapiDeviceInfo *)PaUtil_AllocateMemory(sizeof(PaWasapiDeviceInfo) * paWasapi->deviceCount);
+ if (paWasapi->devInfo == NULL)
+ {
+ result = paInsufficientMemory;
+ goto error;
+ }
+ for (i = 0; i < paWasapi->deviceCount; ++i)
+ memset(&paWasapi->devInfo[i], 0, sizeof(PaWasapiDeviceInfo));
+
+ if (paWasapi->deviceCount > 0)
+ {
+ (*hostApi)->deviceInfos = (PaDeviceInfo **)PaUtil_GroupAllocateMemory(
+ paWasapi->allocations, sizeof(PaDeviceInfo *) * paWasapi->deviceCount);
+ if ((*hostApi)->deviceInfos == NULL)
+ {
+ result = paInsufficientMemory;
+ goto error;
+ }
+
+ /* allocate all device info structs in a contiguous block */
+ deviceInfoArray = (PaDeviceInfo *)PaUtil_GroupAllocateMemory(
+ paWasapi->allocations, sizeof(PaDeviceInfo) * paWasapi->deviceCount);
+ if (deviceInfoArray == NULL)
+ {
+ result = paInsufficientMemory;
+ goto error;
+ }
+
+ for (i = 0; i < paWasapi->deviceCount; ++i)
+ {
+ DWORD state = 0;
+ PaDeviceInfo *deviceInfo = &deviceInfoArray[i];
+ deviceInfo->structVersion = 2;
+ deviceInfo->hostApi = hostApiIndex;
+
+ PA_DEBUG(("WASAPI: device idx: %02d\n", i));
+ PA_DEBUG(("WASAPI: ---------------\n"));
+
+ hr = IMMDeviceCollection_Item(pEndPoints, i, &paWasapi->devInfo[i].device);
+ // We need to set the result to a value otherwise we will return paNoError
+ // [IF_FAILED_JUMP(hResult, error);]
+ IF_FAILED_INTERNAL_ERROR_JUMP(hr, result, error);
+
+ // getting ID
+ {
+ WCHAR *pszDeviceId = NULL;
+ hr = IMMDevice_GetId(paWasapi->devInfo[i].device, &pszDeviceId);
+ // We need to set the result to a value otherwise we will return paNoError
+ // [IF_FAILED_JUMP(hr, error);]
+ IF_FAILED_INTERNAL_ERROR_JUMP(hr, result, error);
+ wcsncpy(paWasapi->devInfo[i].szDeviceID, pszDeviceId, MAX_STR_LEN-1);
+ CoTaskMemFree(pszDeviceId);
+
+ if (lstrcmpW(paWasapi->devInfo[i].szDeviceID, paWasapi->defaultCapturer) == 0)
+ {// we found the default input!
+ (*hostApi)->info.defaultInputDevice = (*hostApi)->info.deviceCount;
+ }
+ if (lstrcmpW(paWasapi->devInfo[i].szDeviceID, paWasapi->defaultRenderer) == 0)
+ {// we found the default output!
+ (*hostApi)->info.defaultOutputDevice = (*hostApi)->info.deviceCount;
+ }
+ }
+
+ hr = IMMDevice_GetState(paWasapi->devInfo[i].device, &paWasapi->devInfo[i].state);
+ // We need to set the result to a value otherwise we will return paNoError
+ // [IF_FAILED_JUMP(hResult, error);]
+ IF_FAILED_INTERNAL_ERROR_JUMP(hr, result, error);
+
+ if (paWasapi->devInfo[i].state != DEVICE_STATE_ACTIVE)
+ {
+ PRINT(("WASAPI device: %d is not currently available (state:%d)\n",i,state));
+ }
+
+ {
+ IPropertyStore *pProperty;
+ hr = IMMDevice_OpenPropertyStore(paWasapi->devInfo[i].device, STGM_READ, &pProperty);
+ // We need to set the result to a value otherwise we will return paNoError
+ // [IF_FAILED_JUMP(hResult, error);]
+ IF_FAILED_INTERNAL_ERROR_JUMP(hr, result, error);
+
+ // "Friendly" Name
+ {
+ char *deviceName;
+ PROPVARIANT value;
+ PropVariantInit(&value);
+ hr = IPropertyStore_GetValue(pProperty, &PKEY_Device_FriendlyName, &value);
+ // We need to set the result to a value otherwise we will return paNoError
+ // [IF_FAILED_JUMP(hResult, error);]
+ IF_FAILED_INTERNAL_ERROR_JUMP(hr, result, error);
+ deviceInfo->name = NULL;
+ deviceName = (char *)PaUtil_GroupAllocateMemory(paWasapi->allocations, MAX_STR_LEN + 1);
+ if (deviceName == NULL)
+ {
+ result = paInsufficientMemory;
+ goto error;
+ }
+ if (value.pwszVal)
+ WideCharToMultiByte(CP_UTF8, 0, value.pwszVal, (int)wcslen(value.pwszVal), deviceName, MAX_STR_LEN-1, 0, 0);
+ else
+ _snprintf(deviceName, MAX_STR_LEN-1, "baddev%d", i);
+ deviceInfo->name = deviceName;
+ PropVariantClear(&value);
+ PA_DEBUG(("WASAPI:%d| name[%s]\n", i, deviceInfo->name));
+ }
+
+ // Default format
+ {
+ PROPVARIANT value;
+ PropVariantInit(&value);
+ hr = IPropertyStore_GetValue(pProperty, &PKEY_AudioEngine_DeviceFormat, &value);
+ // We need to set the result to a value otherwise we will return paNoError
+ // [IF_FAILED_JUMP(hResult, error);]
+ IF_FAILED_INTERNAL_ERROR_JUMP(hr, result, error);
+ memcpy(&paWasapi->devInfo[i].DefaultFormat, value.blob.pBlobData, min(sizeof(paWasapi->devInfo[i].DefaultFormat), value.blob.cbSize));
+ // cleanup
+ PropVariantClear(&value);
+ }
+
+ // Formfactor
+ {
+ PROPVARIANT value;
+ PropVariantInit(&value);
+ hr = IPropertyStore_GetValue(pProperty, &PKEY_AudioEndpoint_FormFactor, &value);
+ // We need to set the result to a value otherwise we will return paNoError
+ // [IF_FAILED_JUMP(hResult, error);]
+ IF_FAILED_INTERNAL_ERROR_JUMP(hr, result, error);
+ // set
+ #if defined(DUMMYUNIONNAME) && defined(NONAMELESSUNION)
+ // avoid breaking strict-aliasing rules in such line: (EndpointFormFactor)(*((UINT *)(((WORD *)&value.wReserved3)+1)));
+ UINT v;
+ memcpy(&v, (((WORD *)&value.wReserved3)+1), sizeof(v));
+ paWasapi->devInfo[i].formFactor = (EndpointFormFactor)v;
+ #else
+ paWasapi->devInfo[i].formFactor = (EndpointFormFactor)value.uintVal;
+ #endif
+ PA_DEBUG(("WASAPI:%d| form-factor[%d]\n", i, paWasapi->devInfo[i].formFactor));
+ // cleanup
+ PropVariantClear(&value);
+ }
+
+ SAFE_RELEASE(pProperty);
+ }
+
+
+ // Endpoint data
+ {
+ IMMEndpoint *endpoint = NULL;
+ hr = IMMDevice_QueryInterface(paWasapi->devInfo[i].device, &pa_IID_IMMEndpoint, (void **)&endpoint);
+ if (SUCCEEDED(hr))
+ {
+ hr = IMMEndpoint_GetDataFlow(endpoint, &paWasapi->devInfo[i].flow);
+ SAFE_RELEASE(endpoint);
+ }
+ }
+
+ // Getting a temporary IAudioClient for more fields
+ // we make sure NOT to call Initialize yet!
+ {
+ IAudioClient *tmpClient = NULL;
+
+ hr = IMMDevice_Activate(paWasapi->devInfo[i].device, GetAudioClientIID(),
+ CLSCTX_INPROC_SERVER, NULL, (void **)&tmpClient);
+ // We need to set the result to a value otherwise we will return paNoError
+ // [IF_FAILED_JUMP(hResult, error);]
+ IF_FAILED_INTERNAL_ERROR_JUMP(hr, result, error);
+
+ hr = IAudioClient_GetDevicePeriod(tmpClient,
+ &paWasapi->devInfo[i].DefaultDevicePeriod,
+ &paWasapi->devInfo[i].MinimumDevicePeriod);
+ if (FAILED(hr))
+ {
+ PA_DEBUG(("WASAPI:%d| failed getting min/default periods by IAudioClient::GetDevicePeriod() with error[%08X], will use 30000/100000 hns\n", i, (UINT32)hr));
+
+ // assign WASAPI common values
+ paWasapi->devInfo[i].DefaultDevicePeriod = 100000;
+ paWasapi->devInfo[i].MinimumDevicePeriod = 30000;
+
+ // ignore error, let continue further without failing with paInternalError
+ hr = S_OK;
+ }
+
+ //hr = tmpClient->GetMixFormat(&paWasapi->devInfo[i].MixFormat);
+
+ // Release client
+ SAFE_RELEASE(tmpClient);
+
+ if (hr != S_OK)
+ {
+ //davidv: this happened with my hardware, previously for that same device in DirectSound:
+ //Digital Output (Realtek AC'97 Audio)'s GUID: {0x38f2cf50,0x7b4c,0x4740,0x86,0xeb,0xd4,0x38,0x66,0xd8,0xc8, 0x9f}
+ //so something must be _really_ wrong with this device, TODO handle this better. We kind of need GetMixFormat
+ LogHostError(hr);
+ // We need to set the result to a value otherwise we will return paNoError
+ result = paInternalError;
+ goto error;
+ }
+ }
+
+ // we can now fill in portaudio device data
+ deviceInfo->maxInputChannels = 0;
+ deviceInfo->maxOutputChannels = 0;
+ deviceInfo->defaultSampleRate = paWasapi->devInfo[i].DefaultFormat.Format.nSamplesPerSec;
+ switch (paWasapi->devInfo[i].flow)
+ {
+ case eRender: {
+ deviceInfo->maxOutputChannels = paWasapi->devInfo[i].DefaultFormat.Format.nChannels;
+ deviceInfo->defaultHighOutputLatency = nano100ToSeconds(paWasapi->devInfo[i].DefaultDevicePeriod);
+ deviceInfo->defaultLowOutputLatency = nano100ToSeconds(paWasapi->devInfo[i].MinimumDevicePeriod);
+ PA_DEBUG(("WASAPI:%d| def.SR[%d] max.CH[%d] latency{hi[%f] lo[%f]}\n", i, (UINT32)deviceInfo->defaultSampleRate,
+ deviceInfo->maxOutputChannels, (float)deviceInfo->defaultHighOutputLatency, (float)deviceInfo->defaultLowOutputLatency));
+ break;}
+ case eCapture: {
+ deviceInfo->maxInputChannels = paWasapi->devInfo[i].DefaultFormat.Format.nChannels;
+ deviceInfo->defaultHighInputLatency = nano100ToSeconds(paWasapi->devInfo[i].DefaultDevicePeriod);
+ deviceInfo->defaultLowInputLatency = nano100ToSeconds(paWasapi->devInfo[i].MinimumDevicePeriod);
+ PA_DEBUG(("WASAPI:%d| def.SR[%d] max.CH[%d] latency{hi[%f] lo[%f]}\n", i, (UINT32)deviceInfo->defaultSampleRate,
+ deviceInfo->maxInputChannels, (float)deviceInfo->defaultHighInputLatency, (float)deviceInfo->defaultLowInputLatency));
+ break; }
+ default:
+ PRINT(("WASAPI:%d| bad Data Flow!\n", i));
+ // We need to set the result to a value otherwise we will return paNoError
+ result = paInternalError;
+ //continue; // do not skip from list, allow to initialize
+ break;
+ }
+
+ (*hostApi)->deviceInfos[i] = deviceInfo;
+ ++(*hostApi)->info.deviceCount;
+ }
+ }
+
+ (*hostApi)->Terminate = Terminate;
+ (*hostApi)->OpenStream = OpenStream;
+ (*hostApi)->IsFormatSupported = IsFormatSupported;
+
+ PaUtil_InitializeStreamInterface( &paWasapi->callbackStreamInterface, CloseStream, StartStream,
+ StopStream, AbortStream, IsStreamStopped, IsStreamActive,
+ GetStreamTime, GetStreamCpuLoad,
+ PaUtil_DummyRead, PaUtil_DummyWrite,
+ PaUtil_DummyGetReadAvailable, PaUtil_DummyGetWriteAvailable );
+
+ PaUtil_InitializeStreamInterface( &paWasapi->blockingStreamInterface, CloseStream, StartStream,
+ StopStream, AbortStream, IsStreamStopped, IsStreamActive,
+ GetStreamTime, PaUtil_DummyGetCpuLoad,
+ ReadStream, WriteStream, GetStreamReadAvailable, GetStreamWriteAvailable );
+
+
+ // findout if platform workaround is required
+ paWasapi->useWOW64Workaround = UseWOW64Workaround();
+
+ SAFE_RELEASE(pEndPoints);
+
+ PRINT(("WASAPI: initialized ok\n"));
+
+ return paNoError;
+
+error:
+
+ PRINT(("WASAPI: failed %s error[%d|%s]\n", __FUNCTION__, result, Pa_GetErrorText(result)));
+
+ SAFE_RELEASE(pEndPoints);
+
+ Terminate((PaUtilHostApiRepresentation *)paWasapi);
+
+ // Safety if error was not set so that we do not think initialize was a success
+ if (result == paNoError) {
+ result = paInternalError;
+ }
+
+ return result;
+}
+
+// ------------------------------------------------------------------------------------------
+static void Terminate( PaUtilHostApiRepresentation *hostApi )
+{
+ UINT i;
+ PaWasapiHostApiRepresentation *paWasapi = (PaWasapiHostApiRepresentation*)hostApi;
+ if (paWasapi == NULL)
+ return;
+
+ // Release IMMDeviceEnumerator
+ SAFE_RELEASE(paWasapi->enumerator);
+
+ for (i = 0; i < paWasapi->deviceCount; ++i)
+ {
+ PaWasapiDeviceInfo *info = &paWasapi->devInfo[i];
+ SAFE_RELEASE(info->device);
+
+ //if (info->MixFormat)
+ // CoTaskMemFree(info->MixFormat);
+ }
+ PaUtil_FreeMemory(paWasapi->devInfo);
+
+ if (paWasapi->allocations)
+ {
+ PaUtil_FreeAllAllocations(paWasapi->allocations);
+ PaUtil_DestroyAllocationGroup(paWasapi->allocations);
+ }
+
+ PaWinUtil_CoUninitialize( paWASAPI, &paWasapi->comInitializationResult );
+
+ PaUtil_FreeMemory(paWasapi);
+
+ // Close AVRT
+ CloseAVRT();
+}
+
+// ------------------------------------------------------------------------------------------
+static PaWasapiHostApiRepresentation *_GetHostApi(PaError *_error)
+{
+ PaError error;
+
+ PaUtilHostApiRepresentation *pApi;
+ if ((error = PaUtil_GetHostApiRepresentation(&pApi, paWASAPI)) != paNoError)
+ {
+ if (_error != NULL)
+ (*_error) = error;
+
+ return NULL;
+ }
+ return (PaWasapiHostApiRepresentation *)pApi;
+}
+
+// ------------------------------------------------------------------------------------------
+int PaWasapi_GetDeviceDefaultFormat( void *pFormat, unsigned int nFormatSize, PaDeviceIndex nDevice )
+{
+ PaError ret;
+ PaWasapiHostApiRepresentation *paWasapi;
+ UINT32 size;
+ PaDeviceIndex index;
+
+ if (pFormat == NULL)
+ return paBadBufferPtr;
+ if (nFormatSize <= 0)
+ return paBufferTooSmall;
+
+ // Get API
+ paWasapi = _GetHostApi(&ret);
+ if (paWasapi == NULL)
+ return ret;
+
+ // Get device index
+ ret = PaUtil_DeviceIndexToHostApiDeviceIndex(&index, nDevice, &paWasapi->inheritedHostApiRep);
+ if (ret != paNoError)
+ return ret;
+
+ // Validate index
+ if ((UINT32)index >= paWasapi->deviceCount)
+ return paInvalidDevice;
+
+ size = min(nFormatSize, (UINT32)sizeof(paWasapi->devInfo[ index ].DefaultFormat));
+ memcpy(pFormat, &paWasapi->devInfo[ index ].DefaultFormat, size);
+
+ return size;
+}
+
+// ------------------------------------------------------------------------------------------
+int PaWasapi_GetDeviceRole( PaDeviceIndex nDevice )
+{
+ PaError ret;
+ PaDeviceIndex index;
+
+ // Get API
+ PaWasapiHostApiRepresentation *paWasapi = _GetHostApi(&ret);
+ if (paWasapi == NULL)
+ return paNotInitialized;
+
+ // Get device index
+ ret = PaUtil_DeviceIndexToHostApiDeviceIndex(&index, nDevice, &paWasapi->inheritedHostApiRep);
+ if (ret != paNoError)
+ return ret;
+
+ // Validate index
+ if ((UINT32)index >= paWasapi->deviceCount)
+ return paInvalidDevice;
+
+ return paWasapi->devInfo[ index ].formFactor;
+}
+
+// ------------------------------------------------------------------------------------------
+PaError PaWasapi_GetFramesPerHostBuffer( PaStream *pStream, unsigned int *nInput, unsigned int *nOutput )
+{
+ PaWasapiStream *stream = (PaWasapiStream *)pStream;
+ if (stream == NULL)
+ return paBadStreamPtr;
+
+ if (nInput != NULL)
+ (*nInput) = stream->in.framesPerHostCallback;
+
+ if (nOutput != NULL)
+ (*nOutput) = stream->out.framesPerHostCallback;
+
+ return paNoError;
+}
+
+// ------------------------------------------------------------------------------------------
+static void LogWAVEFORMATEXTENSIBLE(const WAVEFORMATEXTENSIBLE *in)
+{
+ const WAVEFORMATEX *old = (WAVEFORMATEX *)in;
+ switch (old->wFormatTag)
+ {
+ case WAVE_FORMAT_EXTENSIBLE: {
+
+ PRINT(("wFormatTag =WAVE_FORMAT_EXTENSIBLE\n"));
+
+ if (IsEqualGUID(&in->SubFormat, &pa_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT))
+ {
+ PRINT(("SubFormat =KSDATAFORMAT_SUBTYPE_IEEE_FLOAT\n"));
+ }
+ else
+ if (IsEqualGUID(&in->SubFormat, &pa_KSDATAFORMAT_SUBTYPE_PCM))
+ {
+ PRINT(("SubFormat =KSDATAFORMAT_SUBTYPE_PCM\n"));
+ }
+ else
+ {
+ PRINT(("SubFormat =CUSTOM GUID{%d:%d:%d:%d%d%d%d%d%d%d%d}\n",
+ in->SubFormat.Data1,
+ in->SubFormat.Data2,
+ in->SubFormat.Data3,
+ (int)in->SubFormat.Data4[0],
+ (int)in->SubFormat.Data4[1],
+ (int)in->SubFormat.Data4[2],
+ (int)in->SubFormat.Data4[3],
+ (int)in->SubFormat.Data4[4],
+ (int)in->SubFormat.Data4[5],
+ (int)in->SubFormat.Data4[6],
+ (int)in->SubFormat.Data4[7]));
+ }
+ PRINT(("Samples.wValidBitsPerSample =%d\n", in->Samples.wValidBitsPerSample));
+ PRINT(("dwChannelMask =0x%X\n",in->dwChannelMask));
+
+ break; }
+
+ case WAVE_FORMAT_PCM: PRINT(("wFormatTag =WAVE_FORMAT_PCM\n")); break;
+ case WAVE_FORMAT_IEEE_FLOAT: PRINT(("wFormatTag =WAVE_FORMAT_IEEE_FLOAT\n")); break;
+ default:
+ PRINT(("wFormatTag =UNKNOWN(%d)\n",old->wFormatTag)); break;
+ }
+
+ PRINT(("nChannels =%d\n",old->nChannels));
+ PRINT(("nSamplesPerSec =%d\n",old->nSamplesPerSec));
+ PRINT(("nAvgBytesPerSec=%d\n",old->nAvgBytesPerSec));
+ PRINT(("nBlockAlign =%d\n",old->nBlockAlign));
+ PRINT(("wBitsPerSample =%d\n",old->wBitsPerSample));
+ PRINT(("cbSize =%d\n",old->cbSize));
+}
+
+// ------------------------------------------------------------------------------------------
+static PaSampleFormat WaveToPaFormat(const WAVEFORMATEXTENSIBLE *in)
+{
+ const WAVEFORMATEX *old = (WAVEFORMATEX *)in;
+
+ switch (old->wFormatTag)
+ {
+ case WAVE_FORMAT_EXTENSIBLE: {
+ if (IsEqualGUID(&in->SubFormat, &pa_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT))
+ {
+ if (in->Samples.wValidBitsPerSample == 32)
+ return paFloat32;
+ }
+ else
+ if (IsEqualGUID(&in->SubFormat, &pa_KSDATAFORMAT_SUBTYPE_PCM))
+ {
+ switch (old->wBitsPerSample)
+ {
+ case 32: return paInt32;
+ case 24: return paInt24;
+ case 8: return paUInt8;
+ case 16: return paInt16;
+ }
+ }
+ break; }
+
+ case WAVE_FORMAT_IEEE_FLOAT:
+ return paFloat32;
+
+ case WAVE_FORMAT_PCM: {
+ switch (old->wBitsPerSample)
+ {
+ case 32: return paInt32;
+ case 24: return paInt24;
+ case 8: return paUInt8;
+ case 16: return paInt16;
+ }
+ break; }
+ }
+
+ return paCustomFormat;
+}
+
+// ------------------------------------------------------------------------------------------
+static PaError MakeWaveFormatFromParams(WAVEFORMATEXTENSIBLE *wavex, const PaStreamParameters *params,
+ double sampleRate)
+{
+ WORD bitsPerSample;
+ WAVEFORMATEX *old;
+ DWORD channelMask = 0;
+ PaWasapiStreamInfo *streamInfo = (PaWasapiStreamInfo *)params->hostApiSpecificStreamInfo;
+
+ // Get user assigned channel mask
+ if ((streamInfo != NULL) && (streamInfo->flags & paWinWasapiUseChannelMask))
+ channelMask = streamInfo->channelMask;
+
+ // Convert PaSampleFormat to bits per sample
+ if ((bitsPerSample = PaSampleFormatToBitsPerSample(params->sampleFormat)) == 0)
+ return paSampleFormatNotSupported;
+
+ memset(wavex, 0, sizeof(*wavex));
+
+ old = (WAVEFORMATEX *)wavex;
+ old->nChannels = (WORD)params->channelCount;
+ old->nSamplesPerSec = (DWORD)sampleRate;
+ if ((old->wBitsPerSample = bitsPerSample) > 16)
+ {
+ old->wBitsPerSample = 32; // 20 or 24 bits must go in 32 bit containers (ints)
+ }
+ old->nBlockAlign = (old->nChannels * (old->wBitsPerSample/8));
+ old->nAvgBytesPerSec = (old->nSamplesPerSec * old->nBlockAlign);
+
+ // WAVEFORMATEX
+ if ((params->channelCount <= 2) && ((bitsPerSample == 16) || (bitsPerSample == 8)))
+ {
+ old->cbSize = 0;
+ old->wFormatTag = WAVE_FORMAT_PCM;
+ }
+ // WAVEFORMATEXTENSIBLE
+ else
+ {
+ old->wFormatTag = WAVE_FORMAT_EXTENSIBLE;
+ old->cbSize = sizeof(WAVEFORMATEXTENSIBLE) - sizeof(WAVEFORMATEX);
+
+ if ((params->sampleFormat & ~paNonInterleaved) == paFloat32)
+ wavex->SubFormat = pa_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT;
+ else
+ wavex->SubFormat = pa_KSDATAFORMAT_SUBTYPE_PCM;
+
+ wavex->Samples.wValidBitsPerSample = bitsPerSample; //no extra padding!
+
+ // Set channel mask
+ if (channelMask != 0)
+ {
+ wavex->dwChannelMask = channelMask;
+ }
+ else
+ {
+ switch (params->channelCount)
+ {
+ case 1: wavex->dwChannelMask = KSAUDIO_SPEAKER_MONO; break;
+ case 2: wavex->dwChannelMask = KSAUDIO_SPEAKER_STEREO; break;
+ case 3: wavex->dwChannelMask = KSAUDIO_SPEAKER_STEREO|SPEAKER_LOW_FREQUENCY; break;
+ case 4: wavex->dwChannelMask = KSAUDIO_SPEAKER_QUAD; break;
+ case 5: wavex->dwChannelMask = KSAUDIO_SPEAKER_QUAD|SPEAKER_LOW_FREQUENCY; break;
+#ifdef KSAUDIO_SPEAKER_5POINT1_SURROUND
+ case 6: wavex->dwChannelMask = KSAUDIO_SPEAKER_5POINT1_SURROUND; break;
+#else
+ case 6: wavex->dwChannelMask = KSAUDIO_SPEAKER_5POINT1; break;
+#endif
+#ifdef KSAUDIO_SPEAKER_5POINT1_SURROUND
+ case 7: wavex->dwChannelMask = KSAUDIO_SPEAKER_5POINT1_SURROUND|SPEAKER_BACK_CENTER; break;
+#else
+ case 7: wavex->dwChannelMask = KSAUDIO_SPEAKER_5POINT1|SPEAKER_BACK_CENTER; break;
+#endif
+#ifdef KSAUDIO_SPEAKER_7POINT1_SURROUND
+ case 8: wavex->dwChannelMask = KSAUDIO_SPEAKER_7POINT1_SURROUND; break;
+#else
+ case 8: wavex->dwChannelMask = KSAUDIO_SPEAKER_7POINT1; break;
+#endif
+
+ default: wavex->dwChannelMask = 0;
+ }
+ }
+ }
+ return paNoError;
+}
+
+// ------------------------------------------------------------------------------------------
+/*static void wasapiFillWFEXT( WAVEFORMATEXTENSIBLE* pwfext, PaSampleFormat sampleFormat, double sampleRate, int channelCount)
+{
+ PA_DEBUG(( "sampleFormat = %lx\n" , sampleFormat ));
+ PA_DEBUG(( "sampleRate = %f\n" , sampleRate ));
+ PA_DEBUG(( "chanelCount = %d\n", channelCount ));
+
+ pwfext->Format.wFormatTag = WAVE_FORMAT_EXTENSIBLE;
+ pwfext->Format.nChannels = (WORD)channelCount;
+ pwfext->Format.nSamplesPerSec = (DWORD)sampleRate;
+ if(channelCount == 1)
+ pwfext->dwChannelMask = KSAUDIO_SPEAKER_DIRECTOUT;
+ else
+ pwfext->dwChannelMask = KSAUDIO_SPEAKER_STEREO;
+ if(sampleFormat == paFloat32)
+ {
+ pwfext->Format.nBlockAlign = (WORD)(channelCount * 4);
+ pwfext->Format.wBitsPerSample = 32;
+ pwfext->Format.cbSize = sizeof(WAVEFORMATEXTENSIBLE)-sizeof(WAVEFORMATEX);
+ pwfext->Samples.wValidBitsPerSample = 32;
+ pwfext->SubFormat = pa_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT;
+ }
+ else if(sampleFormat == paInt32)
+ {
+ pwfext->Format.nBlockAlign = (WORD)(channelCount * 4);
+ pwfext->Format.wBitsPerSample = 32;
+ pwfext->Format.cbSize = sizeof(WAVEFORMATEXTENSIBLE)-sizeof(WAVEFORMATEX);
+ pwfext->Samples.wValidBitsPerSample = 32;
+ pwfext->SubFormat = pa_KSDATAFORMAT_SUBTYPE_PCM;
+ }
+ else if(sampleFormat == paInt24)
+ {
+ pwfext->Format.nBlockAlign = (WORD)(channelCount * 4);
+ pwfext->Format.wBitsPerSample = 32; // 24-bit in 32-bit int container
+ pwfext->Format.cbSize = sizeof(WAVEFORMATEXTENSIBLE)-sizeof(WAVEFORMATEX);
+ pwfext->Samples.wValidBitsPerSample = 24;
+ pwfext->SubFormat = pa_KSDATAFORMAT_SUBTYPE_PCM;
+ }
+ else if(sampleFormat == paInt16)
+ {
+ pwfext->Format.nBlockAlign = (WORD)(channelCount * 2);
+ pwfext->Format.wBitsPerSample = 16;
+ pwfext->Format.cbSize = sizeof(WAVEFORMATEXTENSIBLE)-sizeof(WAVEFORMATEX);
+ pwfext->Samples.wValidBitsPerSample = 16;
+ pwfext->SubFormat = pa_KSDATAFORMAT_SUBTYPE_PCM;
+ }
+ pwfext->Format.nAvgBytesPerSec = pwfext->Format.nSamplesPerSec * pwfext->Format.nBlockAlign;
+}*/
+
+// ------------------------------------------------------------------------------------------
+static PaError GetClosestFormat(IAudioClient *myClient, double sampleRate,
+ const PaStreamParameters *_params, AUDCLNT_SHAREMODE shareMode, WAVEFORMATEXTENSIBLE *outWavex,
+ BOOL output)
+{
+ PaError answer = paInvalidSampleRate;
+ WAVEFORMATEX *sharedClosestMatch = NULL;
+ HRESULT hr = !S_OK;
+ PaStreamParameters params = (*_params);
+
+ /* It was not noticed that 24-bit Input producing no output while device accepts this format.
+ To fix this issue let's ask for 32-bits and let PA converters convert host 32-bit data
+ to 24-bit for user-space. The bug concerns Vista, if Windows 7 supports 24-bits for Input
+ please report to PortAudio developers to exclude Windows 7.
+ */
+ /*if ((params.sampleFormat == paInt24) && (output == FALSE))
+ params.sampleFormat = paFloat32;*/ // <<< The silence was due to missing Int32_To_Int24_Dither implementation
+
+ MakeWaveFormatFromParams(outWavex, ¶ms, sampleRate);
+
+ hr = IAudioClient_IsFormatSupported(myClient, shareMode, &outWavex->Format, (shareMode == AUDCLNT_SHAREMODE_SHARED ? &sharedClosestMatch : NULL));
+ if (hr == S_OK)
+ answer = paFormatIsSupported;
+ else
+ if (sharedClosestMatch)
+ {
+ WORD bitsPerSample;
+ WAVEFORMATEXTENSIBLE *ext = (WAVEFORMATEXTENSIBLE*)sharedClosestMatch;
+
+ GUID subf_guid = GUID_NULL;
+ if (sharedClosestMatch->wFormatTag == WAVE_FORMAT_EXTENSIBLE)
+ {
+ memcpy(outWavex, sharedClosestMatch, sizeof(WAVEFORMATEXTENSIBLE));
+ subf_guid = ext->SubFormat;
+ }
+ else
+ memcpy(outWavex, sharedClosestMatch, sizeof(WAVEFORMATEX));
+
+ CoTaskMemFree(sharedClosestMatch);
+
+ // Make supported by default
+ answer = paFormatIsSupported;
+
+ // Validate SampleRate
+ if ((DWORD)sampleRate != outWavex->Format.nSamplesPerSec)
+ return paInvalidSampleRate;
+
+ // Validate Channel count
+ if ((WORD)params.channelCount != outWavex->Format.nChannels)
+ {
+ // If mono, then driver does not support 1 channel, we use internal workaround
+ // of tiny software mixing functionality, e.g. we provide to user buffer 1 channel
+ // but then mix into 2 for device buffer
+ if ((params.channelCount == 1) && (outWavex->Format.nChannels == 2))
+ return paFormatIsSupported;
+ else
+ return paInvalidChannelCount;
+ }
+
+ // Validate Sample format
+ if ((bitsPerSample = PaSampleFormatToBitsPerSample(params.sampleFormat)) == 0)
+ return paSampleFormatNotSupported;
+
+ // Validate Sample format: bit size (WASAPI does not limit 'bit size')
+ //if (bitsPerSample != outWavex->Format.wBitsPerSample)
+ // return paSampleFormatNotSupported;
+
+ // Validate Sample format: paFloat32 (WASAPI does not limit 'bit type')
+ //if ((params->sampleFormat == paFloat32) && (subf_guid != KSDATAFORMAT_SUBTYPE_IEEE_FLOAT))
+ // return paSampleFormatNotSupported;
+
+ // Validate Sample format: paInt32 (WASAPI does not limit 'bit type')
+ //if ((params->sampleFormat == paInt32) && (subf_guid != KSDATAFORMAT_SUBTYPE_PCM))
+ // return paSampleFormatNotSupported;
+ }
+ else
+ {
+ static const int BestToWorst[] = { paFloat32, paInt24, paInt16 };
+ int i;
+
+ // Try combination stereo and we will use built-in mono-stereo mixer then
+ if (params.channelCount == 1)
+ {
+ WAVEFORMATEXTENSIBLE stereo = { 0 };
+
+ PaStreamParameters stereo_params = params;
+ stereo_params.channelCount = 2;
+
+ MakeWaveFormatFromParams(&stereo, &stereo_params, sampleRate);
+
+ hr = IAudioClient_IsFormatSupported(myClient, shareMode, &stereo.Format, (shareMode == AUDCLNT_SHAREMODE_SHARED ? &sharedClosestMatch : NULL));
+ if (hr == S_OK)
+ {
+ memcpy(outWavex, &stereo, sizeof(WAVEFORMATEXTENSIBLE));
+ CoTaskMemFree(sharedClosestMatch);
+ return (answer = paFormatIsSupported);
+ }
+
+ // Try selecting suitable sample type
+ for (i = 0; i < STATIC_ARRAY_SIZE(BestToWorst); ++i)
+ {
+ WAVEFORMATEXTENSIBLE sample = { 0 };
+
+ PaStreamParameters sample_params = stereo_params;
+ sample_params.sampleFormat = BestToWorst[i];
+
+ MakeWaveFormatFromParams(&sample, &sample_params, sampleRate);
+
+ hr = IAudioClient_IsFormatSupported(myClient, shareMode, &sample.Format, (shareMode == AUDCLNT_SHAREMODE_SHARED ? &sharedClosestMatch : NULL));
+ if (hr == S_OK)
+ {
+ memcpy(outWavex, &sample, sizeof(WAVEFORMATEXTENSIBLE));
+ CoTaskMemFree(sharedClosestMatch);
+ return (answer = paFormatIsSupported);
+ }
+ }
+ }
+
+ // Try selecting suitable sample type
+ for (i = 0; i < STATIC_ARRAY_SIZE(BestToWorst); ++i)
+ {
+ WAVEFORMATEXTENSIBLE spfmt = { 0 };
+
+ PaStreamParameters spfmt_params = params;
+ spfmt_params.sampleFormat = BestToWorst[i];
+
+ MakeWaveFormatFromParams(&spfmt, &spfmt_params, sampleRate);
+
+ hr = IAudioClient_IsFormatSupported(myClient, shareMode, &spfmt.Format, (shareMode == AUDCLNT_SHAREMODE_SHARED ? &sharedClosestMatch : NULL));
+ if (hr == S_OK)
+ {
+ memcpy(outWavex, &spfmt, sizeof(WAVEFORMATEXTENSIBLE));
+ CoTaskMemFree(sharedClosestMatch);
+ answer = paFormatIsSupported;
+ break;
+ }
+ }
+
+ // Nothing helped
+ LogHostError(hr);
+ }
+
+ return answer;
+}
+
+// ------------------------------------------------------------------------------------------
+static PaError IsStreamParamsValid(struct PaUtilHostApiRepresentation *hostApi,
+ const PaStreamParameters *inputParameters,
+ const PaStreamParameters *outputParameters,
+ double sampleRate)
+{
+ if (hostApi == NULL)
+ return paHostApiNotFound;
+ if ((UINT32)sampleRate == 0)
+ return paInvalidSampleRate;
+
+ if (inputParameters != NULL)
+ {
+ /* all standard sample formats are supported by the buffer adapter,
+ this implementation doesn't support any custom sample formats */
+ if (inputParameters->sampleFormat & paCustomFormat)
+ return paSampleFormatNotSupported;
+
+ /* unless alternate device specification is supported, reject the use of
+ paUseHostApiSpecificDeviceSpecification */
+ if (inputParameters->device == paUseHostApiSpecificDeviceSpecification)
+ return paInvalidDevice;
+
+ /* check that input device can support inputChannelCount */
+ if (inputParameters->channelCount > hostApi->deviceInfos[ inputParameters->device ]->maxInputChannels)
+ return paInvalidChannelCount;
+
+ /* validate inputStreamInfo */
+ if (inputParameters->hostApiSpecificStreamInfo)
+ {
+ PaWasapiStreamInfo *inputStreamInfo = (PaWasapiStreamInfo *)inputParameters->hostApiSpecificStreamInfo;
+ if ((inputStreamInfo->size != sizeof(PaWasapiStreamInfo)) ||
+ (inputStreamInfo->version != 1) ||
+ (inputStreamInfo->hostApiType != paWASAPI))
+ {
+ return paIncompatibleHostApiSpecificStreamInfo;
+ }
+ }
+
+ return paNoError;
+ }
+
+ if (outputParameters != NULL)
+ {
+ /* all standard sample formats are supported by the buffer adapter,
+ this implementation doesn't support any custom sample formats */
+ if (outputParameters->sampleFormat & paCustomFormat)
+ return paSampleFormatNotSupported;
+
+ /* unless alternate device specification is supported, reject the use of
+ paUseHostApiSpecificDeviceSpecification */
+ if (outputParameters->device == paUseHostApiSpecificDeviceSpecification)
+ return paInvalidDevice;
+
+ /* check that output device can support outputChannelCount */
+ if (outputParameters->channelCount > hostApi->deviceInfos[ outputParameters->device ]->maxOutputChannels)
+ return paInvalidChannelCount;
+
+ /* validate outputStreamInfo */
+ if(outputParameters->hostApiSpecificStreamInfo)
+ {
+ PaWasapiStreamInfo *outputStreamInfo = (PaWasapiStreamInfo *)outputParameters->hostApiSpecificStreamInfo;
+ if ((outputStreamInfo->size != sizeof(PaWasapiStreamInfo)) ||
+ (outputStreamInfo->version != 1) ||
+ (outputStreamInfo->hostApiType != paWASAPI))
+ {
+ return paIncompatibleHostApiSpecificStreamInfo;
+ }
+ }
+
+ return paNoError;
+ }
+
+ return (inputParameters || outputParameters ? paNoError : paInternalError);
+}
+
+// ------------------------------------------------------------------------------------------
+static PaError IsFormatSupported( struct PaUtilHostApiRepresentation *hostApi,
+ const PaStreamParameters *inputParameters,
+ const PaStreamParameters *outputParameters,
+ double sampleRate )
+{
+ IAudioClient *tmpClient = NULL;
+ PaWasapiHostApiRepresentation *paWasapi = (PaWasapiHostApiRepresentation*)hostApi;
+ PaWasapiStreamInfo *inputStreamInfo = NULL, *outputStreamInfo = NULL;
+
+ // Validate PaStreamParameters
+ PaError error;
+ if ((error = IsStreamParamsValid(hostApi, inputParameters, outputParameters, sampleRate)) != paNoError)
+ return error;
+
+ if (inputParameters != NULL)
+ {
+ WAVEFORMATEXTENSIBLE wavex;
+ HRESULT hr;
+ PaError answer;
+ AUDCLNT_SHAREMODE shareMode = AUDCLNT_SHAREMODE_SHARED;
+ inputStreamInfo = (PaWasapiStreamInfo *)inputParameters->hostApiSpecificStreamInfo;
+
+ if (inputStreamInfo && (inputStreamInfo->flags & paWinWasapiExclusive))
+ shareMode = AUDCLNT_SHAREMODE_EXCLUSIVE;
+
+ hr = IMMDevice_Activate(paWasapi->devInfo[inputParameters->device].device,
+ GetAudioClientIID(), CLSCTX_INPROC_SERVER, NULL, (void **)&tmpClient);
+ if (hr != S_OK)
+ {
+ LogHostError(hr);
+ return paInvalidDevice;
+ }
+
+ answer = GetClosestFormat(tmpClient, sampleRate, inputParameters, shareMode, &wavex, FALSE);
+ SAFE_RELEASE(tmpClient);
+
+ if (answer != paFormatIsSupported)
+ return answer;
+ }
+
+ if (outputParameters != NULL)
+ {
+ HRESULT hr;
+ WAVEFORMATEXTENSIBLE wavex;
+ PaError answer;
+ AUDCLNT_SHAREMODE shareMode = AUDCLNT_SHAREMODE_SHARED;
+ outputStreamInfo = (PaWasapiStreamInfo *)outputParameters->hostApiSpecificStreamInfo;
+
+ if (outputStreamInfo && (outputStreamInfo->flags & paWinWasapiExclusive))
+ shareMode = AUDCLNT_SHAREMODE_EXCLUSIVE;
+
+ hr = IMMDevice_Activate(paWasapi->devInfo[outputParameters->device].device,
+ GetAudioClientIID(), CLSCTX_INPROC_SERVER, NULL, (void **)&tmpClient);
+ if (hr != S_OK)
+ {
+ LogHostError(hr);
+ return paInvalidDevice;
+ }
+
+ answer = GetClosestFormat(tmpClient, sampleRate, outputParameters, shareMode, &wavex, TRUE);
+ SAFE_RELEASE(tmpClient);
+
+ if (answer != paFormatIsSupported)
+ return answer;
+ }
+
+ return paFormatIsSupported;
+}
+
+// ------------------------------------------------------------------------------------------
+static PaUint32 PaUtil_GetFramesPerHostBuffer(PaUint32 userFramesPerBuffer, PaTime suggestedLatency, double sampleRate, PaUint32 TimerJitterMs)
+{
+ PaUint32 frames = userFramesPerBuffer + max( userFramesPerBuffer, (PaUint32)(suggestedLatency * sampleRate) );
+ frames += (PaUint32)((sampleRate * 0.001) * TimerJitterMs);
+ return frames;
+}
+
+// ------------------------------------------------------------------------------------------
+static void _RecalculateBuffersCount(PaWasapiSubStream *sub, UINT32 userFramesPerBuffer, UINT32 framesPerLatency, BOOL fullDuplex)
+{
+ // Count buffers (must be at least 1)
+ sub->buffers = (userFramesPerBuffer ? framesPerLatency / userFramesPerBuffer : 0);
+ if (sub->buffers == 0)
+ sub->buffers = 1;
+
+ // Determine amount of buffers used:
+ // - Full-duplex mode will lead to period difference, thus only 1.
+ // - Input mode, only 1, as WASAPI allows extraction of only 1 packet.
+ // - For Shared mode we use double buffering.
+ if ((sub->shareMode == AUDCLNT_SHAREMODE_EXCLUSIVE) || fullDuplex)
+ {
+ // Exclusive mode does not allow >1 buffers be used for Event interface, e.g. GetBuffer
+ // call must acquire max buffer size and it all must be processed.
+ if (sub->streamFlags & AUDCLNT_STREAMFLAGS_EVENTCALLBACK)
+ sub->userBufferAndHostMatch = 1;
+
+ // Use paUtilBoundedHostBufferSize because exclusive mode will starve and produce
+ // bad quality of audio
+ sub->buffers = 1;
+ }
+}
+
+// ------------------------------------------------------------------------------------------
+static void _CalculateAlignedPeriod(PaWasapiSubStream *pSub, UINT32 *nFramesPerLatency,
+ ALIGN_FUNC pAlignFunc)
+{
+ // Align frames to HD Audio packet size of 128 bytes for Exclusive mode only.
+ // Not aligning on Windows Vista will cause Event timeout, although Windows 7 will
+ // return AUDCLNT_E_BUFFER_SIZE_NOT_ALIGNED error to realign buffer. Aligning is necessary
+ // for Exclusive mode only! when audio data is feeded directly to hardware.
+ if (pSub->shareMode == AUDCLNT_SHAREMODE_EXCLUSIVE)
+ {
+ (*nFramesPerLatency) = AlignFramesPerBuffer((*nFramesPerLatency),
+ pSub->wavex.Format.nSamplesPerSec, pSub->wavex.Format.nBlockAlign, pAlignFunc);
+ }
+
+ // Calculate period
+ pSub->period = MakeHnsPeriod((*nFramesPerLatency), pSub->wavex.Format.nSamplesPerSec);
+}
+
+// ------------------------------------------------------------------------------------------
+static HRESULT CreateAudioClient(PaWasapiStream *pStream, PaWasapiSubStream *pSub, BOOL output, PaError *pa_error)
+{
+ PaError error;
+ HRESULT hr;
+
+ const PaWasapiDeviceInfo *pInfo = pSub->params.device_info;
+ const PaStreamParameters *params = &pSub->params.stream_params;
+ UINT32 framesPerLatency = pSub->params.frames_per_buffer;
+ double sampleRate = pSub->params.sample_rate;
+ BOOL blocking = pSub->params.blocking;
+ BOOL fullDuplex = pSub->params.full_duplex;
+
+ const UINT32 userFramesPerBuffer = framesPerLatency;
+ IAudioClient *audioClient = NULL;
+
+ // Assume default failure due to some reason
+ (*pa_error) = paInvalidDevice;
+
+ // Validate parameters
+ if (!pSub || !pInfo || !params)
+ {
+ (*pa_error) = paBadStreamPtr;
+ return E_POINTER;
+ }
+ if ((UINT32)sampleRate == 0)
+ {
+ (*pa_error) = paInvalidSampleRate;
+ return E_INVALIDARG;
+ }
+
+ // Get the audio client
+ hr = IMMDevice_Activate(pInfo->device, GetAudioClientIID(), CLSCTX_ALL, NULL, (void **)&audioClient);
+ if (hr != S_OK)
+ {
+ (*pa_error) = paInsufficientMemory;
+ LogHostError(hr);
+ goto done;
+ }
+
+ // Get closest format
+ if ((error = GetClosestFormat(audioClient, sampleRate, params, pSub->shareMode, &pSub->wavex, output)) != paFormatIsSupported)
+ {
+ (*pa_error) = error;
+ LogHostError(hr = AUDCLNT_E_UNSUPPORTED_FORMAT);
+ goto done; // fail, format not supported
+ }
+
+ // Check for Mono <<>> Stereo workaround
+ if ((params->channelCount == 1) && (pSub->wavex.Format.nChannels == 2))
+ {
+ /*if (blocking)
+ {
+ LogHostError(hr = AUDCLNT_E_UNSUPPORTED_FORMAT);
+ goto done; // fail, blocking mode not supported
+ }*/
+
+ // select mixer
+ pSub->monoMixer = _GetMonoToStereoMixer(WaveToPaFormat(&pSub->wavex), (pInfo->flow == eRender ? MIX_DIR__1TO2 : MIX_DIR__2TO1_L));
+ if (pSub->monoMixer == NULL)
+ {
+ (*pa_error) = paInvalidChannelCount;
+ LogHostError(hr = AUDCLNT_E_UNSUPPORTED_FORMAT);
+ goto done; // fail, no mixer for format
+ }
+ }
+
+#if 0
+ // Add suggestd latency
+ framesPerLatency += MakeFramesFromHns(SecondsTonano100(params->suggestedLatency), pSub->wavex.Format.nSamplesPerSec);
+#else
+ // Calculate host buffer size
+ if ((pSub->shareMode != AUDCLNT_SHAREMODE_EXCLUSIVE) &&
+ (!pSub->streamFlags || ((pSub->streamFlags & AUDCLNT_STREAMFLAGS_EVENTCALLBACK) == 0)))
+ {
+ framesPerLatency = PaUtil_GetFramesPerHostBuffer(userFramesPerBuffer,
+ params->suggestedLatency, pSub->wavex.Format.nSamplesPerSec, 0/*,
+ (pSub->streamFlags & AUDCLNT_STREAMFLAGS_EVENTCALLBACK ? 0 : 1)*/);
+ }
+ else
+ {
+ REFERENCE_TIME overall;
+
+ // Work 1:1 with user buffer (only polling allows to use >1)
+ framesPerLatency += MakeFramesFromHns(SecondsTonano100(params->suggestedLatency), pSub->wavex.Format.nSamplesPerSec);
+
+ // Use Polling if overall latency is > 5ms as it allows to use 100% CPU in a callback,
+ // or user specified latency parameter
+ overall = MakeHnsPeriod(framesPerLatency, pSub->wavex.Format.nSamplesPerSec);
+ if ((overall >= (106667*2)/*21.33ms*/) || ((INT32)(params->suggestedLatency*100000.0) != 0/*0.01 msec granularity*/))
+ {
+ framesPerLatency = PaUtil_GetFramesPerHostBuffer(userFramesPerBuffer,
+ params->suggestedLatency, pSub->wavex.Format.nSamplesPerSec, 0/*,
+ (streamFlags & AUDCLNT_STREAMFLAGS_EVENTCALLBACK ? 0 : 1)*/);
+
+ // Use Polling interface
+ pSub->streamFlags &= ~AUDCLNT_STREAMFLAGS_EVENTCALLBACK;
+ PRINT(("WASAPI: CreateAudioClient: forcing POLL mode\n"));
+ }
+ }
+#endif
+
+ // For full-duplex output resize buffer to be the same as for input
+ if (output && fullDuplex)
+ framesPerLatency = pStream->in.framesPerHostCallback;
+
+ // Avoid 0 frames
+ if (framesPerLatency == 0)
+ framesPerLatency = MakeFramesFromHns(pInfo->DefaultDevicePeriod, pSub->wavex.Format.nSamplesPerSec);
+
+ // Exclusive Input stream renders data in 6 packets, we must set then the size of
+ // single packet, total buffer size, e.g. required latency will be PacketSize * 6
+ if (!output && (pSub->shareMode == AUDCLNT_SHAREMODE_EXCLUSIVE))
+ {
+ // Do it only for Polling mode
+ if ((pSub->streamFlags & AUDCLNT_STREAMFLAGS_EVENTCALLBACK) == 0)
+ {
+ framesPerLatency /= WASAPI_PACKETS_PER_INPUT_BUFFER;
+ }
+ }
+
+ // Calculate aligned period
+ _CalculateAlignedPeriod(pSub, &framesPerLatency, ALIGN_BWD);
+
+ /*! Enforce min/max period for device in Shared mode to avoid bad audio quality.
+ Avoid doing so for Exclusive mode as alignment will suffer.
+ */
+ if (pSub->shareMode == AUDCLNT_SHAREMODE_SHARED)
+ {
+ if (pSub->period < pInfo->DefaultDevicePeriod)
+ {
+ pSub->period = pInfo->DefaultDevicePeriod;
+ // Recalculate aligned period
+ framesPerLatency = MakeFramesFromHns(pSub->period, pSub->wavex.Format.nSamplesPerSec);
+ _CalculateAlignedPeriod(pSub, &framesPerLatency, ALIGN_BWD);
+ }
+ }
+ else
+ {
+ if (pSub->period < pInfo->MinimumDevicePeriod)
+ {
+ pSub->period = pInfo->MinimumDevicePeriod;
+ // Recalculate aligned period
+ framesPerLatency = MakeFramesFromHns(pSub->period, pSub->wavex.Format.nSamplesPerSec);
+ _CalculateAlignedPeriod(pSub, &framesPerLatency, ALIGN_FWD);
+ }
+ }
+
+ /*! Windows 7 does not allow to set latency lower than minimal device period and will
+ return error: AUDCLNT_E_INVALID_DEVICE_PERIOD. Under Vista we enforce the same behavior
+ manually for unified behavior on all platforms.
+ */
+ {
+ /*! AUDCLNT_E_BUFFER_SIZE_ERROR: Applies to Windows 7 and later.
+ Indicates that the buffer duration value requested by an exclusive-mode client is
+ out of range. The requested duration value for pull mode must not be greater than
+ 500 milliseconds; for push mode the duration value must not be greater than 2 seconds.
+ */
+ if (pSub->shareMode == AUDCLNT_SHAREMODE_EXCLUSIVE)
+ {
+ static const REFERENCE_TIME MAX_BUFFER_EVENT_DURATION = 500 * 10000;
+ static const REFERENCE_TIME MAX_BUFFER_POLL_DURATION = 2000 * 10000;
+
+ if (pSub->streamFlags & AUDCLNT_STREAMFLAGS_EVENTCALLBACK) // pull mode, max 500ms
+ {
+ if (pSub->period > MAX_BUFFER_EVENT_DURATION)
+ {
+ pSub->period = MAX_BUFFER_EVENT_DURATION;
+ // Recalculate aligned period
+ framesPerLatency = MakeFramesFromHns(pSub->period, pSub->wavex.Format.nSamplesPerSec);
+ _CalculateAlignedPeriod(pSub, &framesPerLatency, ALIGN_BWD);
+ }
+ }
+ else // push mode, max 2000ms
+ {
+ if (pSub->period > MAX_BUFFER_POLL_DURATION)
+ {
+ pSub->period = MAX_BUFFER_POLL_DURATION;
+ // Recalculate aligned period
+ framesPerLatency = MakeFramesFromHns(pSub->period, pSub->wavex.Format.nSamplesPerSec);
+ _CalculateAlignedPeriod(pSub, &framesPerLatency, ALIGN_BWD);
+ }
+ }
+ }
+ }
+
+ // Set Raw mode (applicable only to IAudioClient2)
+#ifdef __IAudioClient2_INTERFACE_DEFINED__
+ if (GetAudioClientVersion() >= 2)
+ {
+ pa_AudioClientProperties audioProps = { 0 };
+ audioProps.cbSize = sizeof(pa_AudioClientProperties);
+ audioProps.bIsOffload = FALSE;
+ audioProps.eCategory = (AUDIO_STREAM_CATEGORY)pSub->params.wasapi_params.streamCategory;
+ switch (pSub->params.wasapi_params.streamOption)
+ {
+ case eStreamOptionRaw:
+ if (GetWindowsVersion() >= WINDOWS_8_1_SERVER2012R2)
+ audioProps.Options = pa_AUDCLNT_STREAMOPTIONS_RAW;
+ break;
+ case eStreamOptionMatchFormat:
+ if (GetWindowsVersion() >= WINDOWS_10_SERVER2016)
+ audioProps.Options = pa_AUDCLNT_STREAMOPTIONS_MATCH_FORMAT;
+ break;
+ }
+
+ hr = IAudioClient2_SetClientProperties((IAudioClient2 *)audioClient, (AudioClientProperties *)&audioProps);
+ if (hr != S_OK)
+ {
+ PRINT(("WASAPI: IAudioClient2_SetClientProperties(Category = %d, Options = %d) failed with error = %08X\n", audioProps.eCategory, audioProps.Options, (UINT32)hr));
+ }
+ else
+ {
+ PRINT(("WASAPI: IAudioClient2 set properties: IsOffload = %d, Category = %d, Options = %d\n", audioProps.bIsOffload, audioProps.eCategory, audioProps.Options));
+ }
+ }
+#endif
+
+ // Open the stream and associate it with an audio session
+ hr = IAudioClient_Initialize(audioClient,
+ pSub->shareMode,
+ pSub->streamFlags,
+ pSub->period,
+ (pSub->shareMode == AUDCLNT_SHAREMODE_EXCLUSIVE ? pSub->period : 0),
+ &pSub->wavex.Format,
+ NULL);
+
+ /*! WASAPI is tricky on large device buffer, sometimes 2000ms can be allocated sometimes
+ less. There is no known guaranteed level thus we make subsequent tries by decreasing
+ buffer by 100ms per try.
+ */
+ while ((hr == E_OUTOFMEMORY) && (pSub->period > (100 * 10000)))
+ {
+ PRINT(("WASAPI: CreateAudioClient: decreasing buffer size to %d milliseconds\n", (pSub->period / 10000)));
+
+ // Decrease by 100ms and try again
+ pSub->period -= (100 * 10000);
+
+ // Recalculate aligned period
+ framesPerLatency = MakeFramesFromHns(pSub->period, pSub->wavex.Format.nSamplesPerSec);
+ _CalculateAlignedPeriod(pSub, &framesPerLatency, ALIGN_BWD);
+
+ // Release the previous allocations
+ SAFE_RELEASE(audioClient);
+
+ // Create a new audio client
+ hr = IMMDevice_Activate(pInfo->device, GetAudioClientIID(), CLSCTX_ALL, NULL, (void**)&audioClient);
+ if (hr != S_OK)
+ {
+ (*pa_error) = paInsufficientMemory;
+ LogHostError(hr);
+ goto done;
+ }
+
+ // Open the stream and associate it with an audio session
+ hr = IAudioClient_Initialize(audioClient,
+ pSub->shareMode,
+ pSub->streamFlags,
+ pSub->period,
+ (pSub->shareMode == AUDCLNT_SHAREMODE_EXCLUSIVE ? pSub->period : 0),
+ &pSub->wavex.Format,
+ NULL);
+ }
+
+ /*! WASAPI buffer size failure. Fallback to using default size.
+ */
+ if (hr == AUDCLNT_E_BUFFER_SIZE_ERROR)
+ {
+ // Use default
+ pSub->period = pInfo->DefaultDevicePeriod;
+
+ PRINT(("WASAPI: CreateAudioClient: correcting buffer size to device default\n"));
+
+ // Release the previous allocations
+ SAFE_RELEASE(audioClient);
+
+ // Create a new audio client
+ hr = IMMDevice_Activate(pInfo->device, GetAudioClientIID(), CLSCTX_ALL, NULL, (void**)&audioClient);
+ if (hr != S_OK)
+ {
+ (*pa_error) = paInsufficientMemory;
+ LogHostError(hr);
+ goto done;
+ }
+
+ // Open the stream and associate it with an audio session
+ hr = IAudioClient_Initialize(audioClient,
+ pSub->shareMode,
+ pSub->streamFlags,
+ pSub->period,
+ (pSub->shareMode == AUDCLNT_SHAREMODE_EXCLUSIVE ? pSub->period : 0),
+ &pSub->wavex.Format,
+ NULL);
+ }
+
+ /*! If the requested buffer size is not aligned. Can be triggered by Windows 7 and up.
+ Should not be be triggered ever as we do align buffers always with _CalculateAlignedPeriod.
+ */
+ if (hr == AUDCLNT_E_BUFFER_SIZE_NOT_ALIGNED)
+ {
+ UINT32 frames = 0;
+
+ // Get the next aligned frame
+ hr = IAudioClient_GetBufferSize(audioClient, &frames);
+ if (hr != S_OK)
+ {
+ (*pa_error) = paInvalidDevice;
+ LogHostError(hr);
+ goto done;
+ }
+
+ PRINT(("WASAPI: CreateAudioClient: aligning buffer size to % frames\n", frames));
+
+ // Release the previous allocations
+ SAFE_RELEASE(audioClient);
+
+ // Create a new audio client
+ hr = IMMDevice_Activate(pInfo->device, GetAudioClientIID(), CLSCTX_ALL, NULL, (void**)&audioClient);
+ if (hr != S_OK)
+ {
+ (*pa_error) = paInsufficientMemory;
+ LogHostError(hr);
+ goto done;
+ }
+
+ // Get closest format
+ if ((error = GetClosestFormat(audioClient, sampleRate, params, pSub->shareMode, &pSub->wavex, output)) != paFormatIsSupported)
+ {
+ (*pa_error) = error;
+ LogHostError(hr = AUDCLNT_E_UNSUPPORTED_FORMAT); // fail, format not supported
+ goto done;
+ }
+
+ // Check for Mono >> Stereo workaround
+ if ((params->channelCount == 1) && (pSub->wavex.Format.nChannels == 2))
+ {
+ /*if (blocking)
+ {
+ LogHostError(hr = AUDCLNT_E_UNSUPPORTED_FORMAT);
+ goto done; // fail, blocking mode not supported
+ }*/
+
+ // Select mixer
+ pSub->monoMixer = _GetMonoToStereoMixer(WaveToPaFormat(&pSub->wavex), (pInfo->flow == eRender ? MIX_DIR__1TO2 : MIX_DIR__2TO1_L));
+ if (pSub->monoMixer == NULL)
+ {
+ (*pa_error) = paInvalidChannelCount;
+ LogHostError(hr = AUDCLNT_E_UNSUPPORTED_FORMAT);
+ goto done; // fail, no mixer for format
+ }
+ }
+
+ // Calculate period
+ pSub->period = MakeHnsPeriod(frames, pSub->wavex.Format.nSamplesPerSec);
+
+ // Open the stream and associate it with an audio session
+ hr = IAudioClient_Initialize(audioClient,
+ pSub->shareMode,
+ pSub->streamFlags,
+ pSub->period,
+ (pSub->shareMode == AUDCLNT_SHAREMODE_EXCLUSIVE ? pSub->period : 0),
+ &pSub->wavex.Format,
+ NULL);
+ if (hr != S_OK)
+ {
+ (*pa_error) = paInvalidDevice;
+ LogHostError(hr);
+ goto done;
+ }
+ }
+ else
+ if (hr != S_OK)
+ {
+ (*pa_error) = paInvalidDevice;
+ LogHostError(hr);
+ goto done;
+ }
+
+ // Set client
+ pSub->clientParent = audioClient;
+ IAudioClient_AddRef(pSub->clientParent);
+
+ // Recalculate buffers count
+ _RecalculateBuffersCount(pSub,
+ userFramesPerBuffer,
+ MakeFramesFromHns(pSub->period, pSub->wavex.Format.nSamplesPerSec),
+ fullDuplex);
+
+ // No error, client is succesfully created
+ (*pa_error) = paNoError;
+
+done:
+
+ // Clean up
+ SAFE_RELEASE(audioClient);
+ return hr;
+}
+
+// ------------------------------------------------------------------------------------------
+static PaError ActivateAudioClientOutput(PaWasapiStream *stream)
+{
+ HRESULT hr;
+ PaError result;
+
+ UINT32 maxBufferSize = 0;
+ PaTime buffer_latency = 0;
+ UINT32 framesPerBuffer = stream->out.params.frames_per_buffer;
+
+ // Create Audio client
+ hr = CreateAudioClient(stream, &stream->out, TRUE, &result);
+ if (hr != S_OK)
+ {
+ LogPaError(result);
+ goto error;
+ }
+ LogWAVEFORMATEXTENSIBLE(&stream->out.wavex);
+
+ // Activate volume
+ stream->outVol = NULL;
+ /*hr = info->device->Activate(
+ __uuidof(IAudioEndpointVolume), CLSCTX_INPROC_SERVER, NULL,
+ (void**)&stream->outVol);
+ if (hr != S_OK)
+ return paInvalidDevice;*/
+
+ // Get max possible buffer size to check if it is not less than that we request
+ hr = IAudioClient_GetBufferSize(stream->out.clientParent, &maxBufferSize);
+ if (hr != S_OK)
+ {
+ LogHostError(hr);
+ LogPaError(result = paInvalidDevice);
+ goto error;
+ }
+
+ // Correct buffer to max size if it maxed out result of GetBufferSize
+ stream->out.bufferSize = maxBufferSize;
+
+ // Get interface latency (actually uneeded as we calculate latency from the size
+ // of maxBufferSize).
+ hr = IAudioClient_GetStreamLatency(stream->out.clientParent, &stream->out.deviceLatency);
+ if (hr != S_OK)
+ {
+ LogHostError(hr);
+ LogPaError(result = paInvalidDevice);
+ goto error;
+ }
+ //stream->out.latencySeconds = nano100ToSeconds(stream->out.deviceLatency);
+
+ // Number of frames that are required at each period
+ stream->out.framesPerHostCallback = maxBufferSize;
+
+ // Calculate frames per single buffer, if buffers > 1 then always framesPerBuffer
+ stream->out.framesPerBuffer =
+ (stream->out.userBufferAndHostMatch ? stream->out.framesPerHostCallback : framesPerBuffer);
+
+ // Calculate buffer latency
+ buffer_latency = (PaTime)maxBufferSize / stream->out.wavex.Format.nSamplesPerSec;
+
+ // Append buffer latency to interface latency in shared mode (see GetStreamLatency notes)
+ stream->out.latencySeconds = buffer_latency;
+
+ PRINT(("WASAPI::OpenStream(output): framesPerUser[ %d ] framesPerHost[ %d ] latency[ %.02fms ] exclusive[ %s ] wow64_fix[ %s ] mode[ %s ]\n", (UINT32)framesPerBuffer, (UINT32)stream->out.framesPerHostCallback, (float)(stream->out.latencySeconds*1000.0f), (stream->out.shareMode == AUDCLNT_SHAREMODE_EXCLUSIVE ? "YES" : "NO"), (stream->out.params.wow64_workaround ? "YES" : "NO"), (stream->out.streamFlags & AUDCLNT_STREAMFLAGS_EVENTCALLBACK ? "EVENT" : "POLL")));
+
+ return paNoError;
+
+error:
+
+ return result;
+}
+
+// ------------------------------------------------------------------------------------------
+static PaError ActivateAudioClientInput(PaWasapiStream *stream)
+{
+ HRESULT hr;
+ PaError result;
+
+ UINT32 maxBufferSize = 0;
+ PaTime buffer_latency = 0;
+ UINT32 framesPerBuffer = stream->in.params.frames_per_buffer;
+
+ // Create Audio client
+ hr = CreateAudioClient(stream, &stream->in, FALSE, &result);
+ if (hr != S_OK)
+ {
+ LogPaError(result);
+ goto error;
+ }
+ LogWAVEFORMATEXTENSIBLE(&stream->in.wavex);
+
+ // Create volume mgr
+ stream->inVol = NULL;
+ /*hr = info->device->Activate(
+ __uuidof(IAudioEndpointVolume), CLSCTX_INPROC_SERVER, NULL,
+ (void**)&stream->inVol);
+ if (hr != S_OK)
+ return paInvalidDevice;*/
+
+ // Get max possible buffer size to check if it is not less than that we request
+ hr = IAudioClient_GetBufferSize(stream->in.clientParent, &maxBufferSize);
+ if (hr != S_OK)
+ {
+ LogHostError(hr);
+ LogPaError(result = paInvalidDevice);
+ goto error;
+ }
+
+ // Correct buffer to max size if it maxed out result of GetBufferSize
+ stream->in.bufferSize = maxBufferSize;
+
+ // Get interface latency (actually uneeded as we calculate latency from the size
+ // of maxBufferSize).
+ hr = IAudioClient_GetStreamLatency(stream->in.clientParent, &stream->in.deviceLatency);
+ if (hr != S_OK)
+ {
+ LogHostError(hr);
+ LogPaError(result = paInvalidDevice);
+ goto error;
+ }
+ //stream->in.latencySeconds = nano100ToSeconds(stream->in.deviceLatency);
+
+ // Number of frames that are required at each period
+ stream->in.framesPerHostCallback = maxBufferSize;
+
+ // Calculate frames per single buffer, if buffers > 1 then always framesPerBuffer
+ stream->in.framesPerBuffer =
+ (stream->in.userBufferAndHostMatch ? stream->in.framesPerHostCallback : framesPerBuffer);
+
+ // Calculate buffer latency
+ buffer_latency = (PaTime)maxBufferSize / stream->in.wavex.Format.nSamplesPerSec;
+
+ // Append buffer latency to interface latency in shared mode (see GetStreamLatency notes)
+ stream->in.latencySeconds = buffer_latency;
+
+ PRINT(("WASAPI::OpenStream(input): framesPerUser[ %d ] framesPerHost[ %d ] latency[ %.02fms ] exclusive[ %s ] wow64_fix[ %s ] mode[ %s ]\n", (UINT32)framesPerBuffer, (UINT32)stream->in.framesPerHostCallback, (float)(stream->in.latencySeconds*1000.0f), (stream->in.shareMode == AUDCLNT_SHAREMODE_EXCLUSIVE ? "YES" : "NO"), (stream->in.params.wow64_workaround ? "YES" : "NO"), (stream->in.streamFlags & AUDCLNT_STREAMFLAGS_EVENTCALLBACK ? "EVENT" : "POLL")));
+
+ return paNoError;
+
+error:
+
+ return result;
+}
+
+// ------------------------------------------------------------------------------------------
+static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
+ PaStream** s,
+ const PaStreamParameters *inputParameters,
+ const PaStreamParameters *outputParameters,
+ double sampleRate,
+ unsigned long framesPerBuffer,
+ PaStreamFlags streamFlags,
+ PaStreamCallback *streamCallback,
+ void *userData )
+{
+ PaError result = paNoError;
+ HRESULT hr;
+ PaWasapiHostApiRepresentation *paWasapi = (PaWasapiHostApiRepresentation*)hostApi;
+ PaWasapiStream *stream = NULL;
+ int inputChannelCount, outputChannelCount;
+ PaSampleFormat inputSampleFormat, outputSampleFormat;
+ PaSampleFormat hostInputSampleFormat, hostOutputSampleFormat;
+ PaWasapiStreamInfo *inputStreamInfo = NULL, *outputStreamInfo = NULL;
+ PaWasapiDeviceInfo *info = NULL;
+ ULONG framesPerHostCallback;
+ PaUtilHostBufferSizeMode bufferMode;
+ const BOOL fullDuplex = ((inputParameters != NULL) && (outputParameters != NULL));
+
+ // validate PaStreamParameters
+ if ((result = IsStreamParamsValid(hostApi, inputParameters, outputParameters, sampleRate)) != paNoError)
+ return LogPaError(result);
+
+ // Validate platform specific flags
+ if ((streamFlags & paPlatformSpecificFlags) != 0)
+ {
+ LogPaError(result = paInvalidFlag); /* unexpected platform specific flag */
+ goto error;
+ }
+
+ // Allocate memory for PaWasapiStream
+ if ((stream = (PaWasapiStream *)PaUtil_AllocateMemory(sizeof(PaWasapiStream))) == NULL)
+ {
+ LogPaError(result = paInsufficientMemory);
+ goto error;
+ }
+
+ // Default thread priority is Audio: for exclusive mode we will use Pro Audio.
+ stream->nThreadPriority = eThreadPriorityAudio;
+
+ // Set default number of frames: paFramesPerBufferUnspecified
+ if (framesPerBuffer == paFramesPerBufferUnspecified)
+ {
+ UINT32 framesPerBufferIn = 0, framesPerBufferOut = 0;
+ if (inputParameters != NULL)
+ {
+ info = &paWasapi->devInfo[inputParameters->device];
+ framesPerBufferIn = MakeFramesFromHns(info->DefaultDevicePeriod, (UINT32)sampleRate);
+ }
+ if (outputParameters != NULL)
+ {
+ info = &paWasapi->devInfo[outputParameters->device];
+ framesPerBufferOut = MakeFramesFromHns(info->DefaultDevicePeriod, (UINT32)sampleRate);
+ }
+ // choosing maximum default size
+ framesPerBuffer = max(framesPerBufferIn, framesPerBufferOut);
+ }
+ if (framesPerBuffer == 0)
+ framesPerBuffer = ((UINT32)sampleRate / 100) * 2;
+
+ // Try create device: Input
+ if (inputParameters != NULL)
+ {
+ inputChannelCount = inputParameters->channelCount;
+ inputSampleFormat = inputParameters->sampleFormat;
+ info = &paWasapi->devInfo[inputParameters->device];
+
+ // default Shared Mode
+ stream->in.shareMode = AUDCLNT_SHAREMODE_SHARED;
+
+ // PaWasapiStreamInfo
+ if (inputParameters->hostApiSpecificStreamInfo != NULL)
+ {
+ memcpy(&stream->in.params.wasapi_params, inputParameters->hostApiSpecificStreamInfo, min(sizeof(stream->in.params.wasapi_params), ((PaWasapiStreamInfo *)inputParameters->hostApiSpecificStreamInfo)->size));
+ stream->in.params.wasapi_params.size = sizeof(stream->in.params.wasapi_params);
+
+ stream->in.params.stream_params.hostApiSpecificStreamInfo = &stream->in.params.wasapi_params;
+ inputStreamInfo = &stream->in.params.wasapi_params;
+
+ stream->in.flags = inputStreamInfo->flags;
+
+ // Exclusive Mode
+ if (inputStreamInfo->flags & paWinWasapiExclusive)
+ {
+ // Boost thread priority
+ stream->nThreadPriority = eThreadPriorityProAudio;
+ // Make Exclusive
+ stream->in.shareMode = AUDCLNT_SHAREMODE_EXCLUSIVE;
+ }
+
+ // explicit thread priority level
+ if (inputStreamInfo->flags & paWinWasapiThreadPriority)
+ {
+ if ((inputStreamInfo->threadPriority > eThreadPriorityNone) &&
+ (inputStreamInfo->threadPriority <= eThreadPriorityWindowManager))
+ stream->nThreadPriority = inputStreamInfo->threadPriority;
+ }
+ }
+
+ // Choose processing mode
+ stream->in.streamFlags = (stream->in.shareMode == AUDCLNT_SHAREMODE_EXCLUSIVE ? AUDCLNT_STREAMFLAGS_EVENTCALLBACK : 0);
+ if (paWasapi->useWOW64Workaround)
+ stream->in.streamFlags = 0; // polling interface
+ else
+ if (streamCallback == NULL)
+ stream->in.streamFlags = 0; // polling interface
+ else
+ if ((inputStreamInfo != NULL) && (inputStreamInfo->flags & paWinWasapiPolling))
+ stream->in.streamFlags = 0; // polling interface
+ else
+ if (fullDuplex)
+ stream->in.streamFlags = 0; // polling interface is implemented for full-duplex mode also
+
+ // Fill parameters for Audio Client creation
+ stream->in.params.device_info = info;
+ stream->in.params.stream_params = (*inputParameters);
+ stream->in.params.frames_per_buffer = framesPerBuffer;
+ stream->in.params.sample_rate = sampleRate;
+ stream->in.params.blocking = (streamCallback == NULL);
+ stream->in.params.full_duplex = fullDuplex;
+ stream->in.params.wow64_workaround = paWasapi->useWOW64Workaround;
+
+ // Create and activate audio client
+ hr = ActivateAudioClientInput(stream);
+ if (hr != S_OK)
+ {
+ LogPaError(result = paInvalidDevice);
+ goto error;
+ }
+
+ // Get closest format
+ hostInputSampleFormat = PaUtil_SelectClosestAvailableFormat( WaveToPaFormat(&stream->in.wavex), inputSampleFormat );
+
+ // Set user-side custom host processor
+ if ((inputStreamInfo != NULL) &&
+ (inputStreamInfo->flags & paWinWasapiRedirectHostProcessor))
+ {
+ stream->hostProcessOverrideInput.processor = inputStreamInfo->hostProcessorInput;
+ stream->hostProcessOverrideInput.userData = userData;
+ }
+
+ // Only get IAudioCaptureClient input once here instead of getting it at multiple places based on the use
+ hr = IAudioClient_GetService(stream->in.clientParent, &pa_IID_IAudioCaptureClient, (void **)&stream->captureClientParent);
+ if (hr != S_OK)
+ {
+ LogHostError(hr);
+ LogPaError(result = paUnanticipatedHostError);
+ goto error;
+ }
+
+ // Create ring buffer for blocking mode (It is needed because we fetch Input packets, not frames,
+ // and thus we have to save partial packet if such remains unread)
+ if (stream->in.params.blocking == TRUE)
+ {
+ UINT32 bufferFrames = ALIGN_NEXT_POW2((stream->in.framesPerHostCallback / WASAPI_PACKETS_PER_INPUT_BUFFER) * 2);
+ UINT32 frameSize = stream->in.wavex.Format.nBlockAlign;
+
+ // buffer
+ if ((stream->in.tailBuffer = PaUtil_AllocateMemory(sizeof(PaUtilRingBuffer))) == NULL)
+ {
+ LogPaError(result = paInsufficientMemory);
+ goto error;
+ }
+ memset(stream->in.tailBuffer, 0, sizeof(PaUtilRingBuffer));
+
+ // buffer memory region
+ stream->in.tailBufferMemory = PaUtil_AllocateMemory(frameSize * bufferFrames);
+ if (stream->in.tailBufferMemory == NULL)
+ {
+ LogPaError(result = paInsufficientMemory);
+ goto error;
+ }
+
+ // initialize
+ if (PaUtil_InitializeRingBuffer(stream->in.tailBuffer, frameSize, bufferFrames, stream->in.tailBufferMemory) != 0)
+ {
+ LogPaError(result = paInternalError);
+ goto error;
+ }
+ }
+ }
+ else
+ {
+ inputChannelCount = 0;
+ inputSampleFormat = hostInputSampleFormat = paInt16; /* Surpress 'uninitialised var' warnings. */
+ }
+
+ // Try create device: Output
+ if (outputParameters != NULL)
+ {
+ outputChannelCount = outputParameters->channelCount;
+ outputSampleFormat = outputParameters->sampleFormat;
+ info = &paWasapi->devInfo[outputParameters->device];
+
+ // default Shared Mode
+ stream->out.shareMode = AUDCLNT_SHAREMODE_SHARED;
+
+ // set PaWasapiStreamInfo
+ if (outputParameters->hostApiSpecificStreamInfo != NULL)
+ {
+ memcpy(&stream->out.params.wasapi_params, outputParameters->hostApiSpecificStreamInfo, min(sizeof(stream->out.params.wasapi_params), ((PaWasapiStreamInfo *)outputParameters->hostApiSpecificStreamInfo)->size));
+ stream->out.params.wasapi_params.size = sizeof(stream->out.params.wasapi_params);
+
+ stream->out.params.stream_params.hostApiSpecificStreamInfo = &stream->out.params.wasapi_params;
+ outputStreamInfo = &stream->out.params.wasapi_params;
+
+ stream->out.flags = outputStreamInfo->flags;
+
+ // Exclusive Mode
+ if (outputStreamInfo->flags & paWinWasapiExclusive)
+ {
+ // Boost thread priority
+ stream->nThreadPriority = eThreadPriorityProAudio;
+ // Make Exclusive
+ stream->out.shareMode = AUDCLNT_SHAREMODE_EXCLUSIVE;
+ }
+
+ // explicit thread priority level
+ if (outputStreamInfo->flags & paWinWasapiThreadPriority)
+ {
+ if ((outputStreamInfo->threadPriority > eThreadPriorityNone) &&
+ (outputStreamInfo->threadPriority <= eThreadPriorityWindowManager))
+ stream->nThreadPriority = outputStreamInfo->threadPriority;
+ }
+ }
+
+ // Choose processing mode
+ stream->out.streamFlags = (stream->out.shareMode == AUDCLNT_SHAREMODE_EXCLUSIVE ? AUDCLNT_STREAMFLAGS_EVENTCALLBACK : 0);
+ if (paWasapi->useWOW64Workaround)
+ stream->out.streamFlags = 0; // polling interface
+ else
+ if (streamCallback == NULL)
+ stream->out.streamFlags = 0; // polling interface
+ else
+ if ((outputStreamInfo != NULL) && (outputStreamInfo->flags & paWinWasapiPolling))
+ stream->out.streamFlags = 0; // polling interface
+ else
+ if (fullDuplex)
+ stream->out.streamFlags = 0; // polling interface is implemented for full-duplex mode also
+
+ // Fill parameters for Audio Client creation
+ stream->out.params.device_info = info;
+ stream->out.params.stream_params = (*outputParameters);
+ stream->out.params.frames_per_buffer = framesPerBuffer;
+ stream->out.params.sample_rate = sampleRate;
+ stream->out.params.blocking = (streamCallback == NULL);
+ stream->out.params.full_duplex = fullDuplex;
+ stream->out.params.wow64_workaround = paWasapi->useWOW64Workaround;
+
+ // Create and activate audio client
+ hr = ActivateAudioClientOutput(stream);
+ if (hr != S_OK)
+ {
+ LogPaError(result = paInvalidDevice);
+ goto error;
+ }
+
+ // Get closest format
+ hostOutputSampleFormat = PaUtil_SelectClosestAvailableFormat( WaveToPaFormat(&stream->out.wavex), outputSampleFormat );
+
+ // Set user-side custom host processor
+ if ((outputStreamInfo != NULL) &&
+ (outputStreamInfo->flags & paWinWasapiRedirectHostProcessor))
+ {
+ stream->hostProcessOverrideOutput.processor = outputStreamInfo->hostProcessorOutput;
+ stream->hostProcessOverrideOutput.userData = userData;
+ }
+
+ // Only get IAudioCaptureClient output once here instead of getting it at multiple places based on the use
+ hr = IAudioClient_GetService(stream->out.clientParent, &pa_IID_IAudioRenderClient, (void **)&stream->renderClientParent);
+ if (hr != S_OK)
+ {
+ LogHostError(hr);
+ LogPaError(result = paUnanticipatedHostError);
+ goto error;
+ }
+ }
+ else
+ {
+ outputChannelCount = 0;
+ outputSampleFormat = hostOutputSampleFormat = paInt16; /* Surpress 'uninitialized var' warnings. */
+ }
+
+ // log full-duplex
+ if (fullDuplex)
+ PRINT(("WASAPI::OpenStream: full-duplex mode\n"));
+
+ // paWinWasapiPolling must be on/or not on both streams
+ if ((inputParameters != NULL) && (outputParameters != NULL))
+ {
+ if ((inputStreamInfo != NULL) && (outputStreamInfo != NULL))
+ {
+ if (((inputStreamInfo->flags & paWinWasapiPolling) &&
+ !(outputStreamInfo->flags & paWinWasapiPolling))
+ ||
+ (!(inputStreamInfo->flags & paWinWasapiPolling) &&
+ (outputStreamInfo->flags & paWinWasapiPolling)))
+ {
+ LogPaError(result = paInvalidFlag);
+ goto error;
+ }
+ }
+ }
+
+ // Initialize stream representation
+ if (streamCallback)
+ {
+ stream->bBlocking = FALSE;
+ PaUtil_InitializeStreamRepresentation(&stream->streamRepresentation,
+ &paWasapi->callbackStreamInterface,
+ streamCallback, userData);
+ }
+ else
+ {
+ stream->bBlocking = TRUE;
+ PaUtil_InitializeStreamRepresentation(&stream->streamRepresentation,
+ &paWasapi->blockingStreamInterface,
+ streamCallback, userData);
+ }
+
+ // Initialize CPU measurer
+ PaUtil_InitializeCpuLoadMeasurer(&stream->cpuLoadMeasurer, sampleRate);
+
+ if (outputParameters && inputParameters)
+ {
+ // serious problem #1 - No, Not a problem, especially concerning Exclusive mode.
+ // Input device in exclusive mode somehow is getting large buffer always, thus we
+ // adjust Output latency to reflect it, thus period will differ but playback will be
+ // normal.
+ /*if (stream->in.period != stream->out.period)
+ {
+ PRINT(("WASAPI: OpenStream: period discrepancy\n"));
+ LogPaError(result = paBadIODeviceCombination);
+ goto error;
+ }*/
+
+ // serious problem #2 - No, Not a problem, as framesPerHostCallback take into account
+ // sample size while it is not a problem for PA full-duplex, we must care of
+ // preriod only!
+ /*if (stream->out.framesPerHostCallback != stream->in.framesPerHostCallback)
+ {
+ PRINT(("WASAPI: OpenStream: framesPerHostCallback discrepancy\n"));
+ goto error;
+ }*/
+ }
+
+ // Calculate frames per host for processor
+ framesPerHostCallback = (outputParameters ? stream->out.framesPerBuffer : stream->in.framesPerBuffer);
+
+ // Choose correct mode of buffer processing:
+ // Exclusive/Shared non paWinWasapiPolling mode: paUtilFixedHostBufferSize - always fixed
+ // Exclusive/Shared paWinWasapiPolling mode: paUtilBoundedHostBufferSize - may vary for Exclusive or Full-duplex
+ bufferMode = paUtilFixedHostBufferSize;
+ if (inputParameters) // !!! WASAPI IAudioCaptureClient::GetBuffer extracts not number of frames but 1 packet, thus we always must adapt
+ bufferMode = paUtilBoundedHostBufferSize;
+ else
+ if (outputParameters)
+ {
+ if ((stream->out.buffers == 1) &&
+ (!stream->out.streamFlags || ((stream->out.streamFlags & AUDCLNT_STREAMFLAGS_EVENTCALLBACK) == 0)))
+ bufferMode = paUtilBoundedHostBufferSize;
+ }
+ stream->bufferMode = bufferMode;
+
+ // Initialize buffer processor
+ result = PaUtil_InitializeBufferProcessor(
+ &stream->bufferProcessor,
+ inputChannelCount,
+ inputSampleFormat,
+ hostInputSampleFormat,
+ outputChannelCount,
+ outputSampleFormat,
+ hostOutputSampleFormat,
+ sampleRate,
+ streamFlags,
+ framesPerBuffer,
+ framesPerHostCallback,
+ bufferMode,
+ streamCallback,
+ userData);
+ if (result != paNoError)
+ {
+ LogPaError(result);
+ goto error;
+ }
+
+ // Set Input latency
+ stream->streamRepresentation.streamInfo.inputLatency =
+ ((double)PaUtil_GetBufferProcessorInputLatencyFrames(&stream->bufferProcessor) / sampleRate)
+ + ((inputParameters)?stream->in.latencySeconds : 0);
+
+ // Set Output latency
+ stream->streamRepresentation.streamInfo.outputLatency =
+ ((double)PaUtil_GetBufferProcessorOutputLatencyFrames(&stream->bufferProcessor) / sampleRate)
+ + ((outputParameters)?stream->out.latencySeconds : 0);
+
+ // Set SR
+ stream->streamRepresentation.streamInfo.sampleRate = sampleRate;
+
+ (*s) = (PaStream *)stream;
+ return result;
+
+error:
+
+ if (stream != NULL)
+ CloseStream(stream);
+
+ return result;
+}
+
+// ------------------------------------------------------------------------------------------
+static PaError CloseStream( PaStream* s )
+{
+ PaError result = paNoError;
+ PaWasapiStream *stream = (PaWasapiStream*)s;
+
+ // abort active stream
+ if (IsStreamActive(s))
+ {
+ result = AbortStream(s);
+ }
+
+ SAFE_RELEASE(stream->captureClientParent);
+ SAFE_RELEASE(stream->renderClientParent);
+ SAFE_RELEASE(stream->out.clientParent);
+ SAFE_RELEASE(stream->in.clientParent);
+ SAFE_RELEASE(stream->inVol);
+ SAFE_RELEASE(stream->outVol);
+
+ CloseHandle(stream->event[S_INPUT]);
+ CloseHandle(stream->event[S_OUTPUT]);
+
+ _StreamCleanup(stream);
+
+ PaWasapi_FreeMemory(stream->in.monoBuffer);
+ PaWasapi_FreeMemory(stream->out.monoBuffer);
+
+ PaUtil_FreeMemory(stream->in.tailBuffer);
+ PaUtil_FreeMemory(stream->in.tailBufferMemory);
+
+ PaUtil_FreeMemory(stream->out.tailBuffer);
+ PaUtil_FreeMemory(stream->out.tailBufferMemory);
+
+ PaUtil_TerminateBufferProcessor(&stream->bufferProcessor);
+ PaUtil_TerminateStreamRepresentation(&stream->streamRepresentation);
+ PaUtil_FreeMemory(stream);
+
+ return result;
+}
+
+// ------------------------------------------------------------------------------------------
+HRESULT UnmarshalSubStreamComPointers(PaWasapiSubStream *substream)
+{
+ HRESULT hResult = S_OK;
+ HRESULT hFirstBadResult = S_OK;
+ substream->clientProc = NULL;
+
+ // IAudioClient
+ hResult = CoGetInterfaceAndReleaseStream(substream->clientStream, GetAudioClientIID(), (LPVOID*)&substream->clientProc);
+ substream->clientStream = NULL;
+ if (hResult != S_OK)
+ {
+ hFirstBadResult = (hFirstBadResult == S_OK) ? hResult : hFirstBadResult;
+ }
+
+ return hFirstBadResult;
+}
+
+// ------------------------------------------------------------------------------------------
+HRESULT UnmarshalStreamComPointers(PaWasapiStream *stream)
+{
+ HRESULT hResult = S_OK;
+ HRESULT hFirstBadResult = S_OK;
+ stream->captureClient = NULL;
+ stream->renderClient = NULL;
+ stream->in.clientProc = NULL;
+ stream->out.clientProc = NULL;
+
+ if (NULL != stream->in.clientParent)
+ {
+ // SubStream pointers
+ hResult = UnmarshalSubStreamComPointers(&stream->in);
+ if (hResult != S_OK)
+ {
+ hFirstBadResult = (hFirstBadResult == S_OK) ? hResult : hFirstBadResult;
+ }
+
+ // IAudioCaptureClient
+ hResult = CoGetInterfaceAndReleaseStream(stream->captureClientStream, &pa_IID_IAudioCaptureClient, (LPVOID*)&stream->captureClient);
+ stream->captureClientStream = NULL;
+ if (hResult != S_OK)
+ {
+ hFirstBadResult = (hFirstBadResult == S_OK) ? hResult : hFirstBadResult;
+ }
+ }
+
+ if (NULL != stream->out.clientParent)
+ {
+ // SubStream pointers
+ hResult = UnmarshalSubStreamComPointers(&stream->out);
+ if (hResult != S_OK)
+ {
+ hFirstBadResult = (hFirstBadResult == S_OK) ? hResult : hFirstBadResult;
+ }
+
+ // IAudioRenderClient
+ hResult = CoGetInterfaceAndReleaseStream(stream->renderClientStream, &pa_IID_IAudioRenderClient, (LPVOID*)&stream->renderClient);
+ stream->renderClientStream = NULL;
+ if (hResult != S_OK)
+ {
+ hFirstBadResult = (hFirstBadResult == S_OK) ? hResult : hFirstBadResult;
+ }
+ }
+
+ return hFirstBadResult;
+}
+
+// -----------------------------------------------------------------------------------------
+void ReleaseUnmarshaledSubComPointers(PaWasapiSubStream *substream)
+{
+ SAFE_RELEASE(substream->clientProc);
+}
+
+// -----------------------------------------------------------------------------------------
+void ReleaseUnmarshaledComPointers(PaWasapiStream *stream)
+{
+ // Release AudioClient services first
+ SAFE_RELEASE(stream->captureClient);
+ SAFE_RELEASE(stream->renderClient);
+
+ // Release AudioClients
+ ReleaseUnmarshaledSubComPointers(&stream->in);
+ ReleaseUnmarshaledSubComPointers(&stream->out);
+}
+
+// ------------------------------------------------------------------------------------------
+HRESULT MarshalSubStreamComPointers(PaWasapiSubStream *substream)
+{
+ HRESULT hResult;
+ substream->clientStream = NULL;
+
+ // IAudioClient
+ hResult = CoMarshalInterThreadInterfaceInStream(GetAudioClientIID(), (LPUNKNOWN)substream->clientParent, &substream->clientStream);
+ if (hResult != S_OK)
+ goto marshal_sub_error;
+
+ return hResult;
+
+ // If marshaling error occurred, make sure to release everything.
+marshal_sub_error:
+
+ UnmarshalSubStreamComPointers(substream);
+ ReleaseUnmarshaledSubComPointers(substream);
+ return hResult;
+}
+
+// ------------------------------------------------------------------------------------------
+HRESULT MarshalStreamComPointers(PaWasapiStream *stream)
+{
+ HRESULT hResult = S_OK;
+ stream->captureClientStream = NULL;
+ stream->in.clientStream = NULL;
+ stream->renderClientStream = NULL;
+ stream->out.clientStream = NULL;
+
+ if (NULL != stream->in.clientParent)
+ {
+ // SubStream pointers
+ hResult = MarshalSubStreamComPointers(&stream->in);
+ if (hResult != S_OK)
+ goto marshal_error;
+
+ // IAudioCaptureClient
+ hResult = CoMarshalInterThreadInterfaceInStream(&pa_IID_IAudioCaptureClient, (LPUNKNOWN)stream->captureClientParent, &stream->captureClientStream);
+ if (hResult != S_OK)
+ goto marshal_error;
+ }
+
+ if (NULL != stream->out.clientParent)
+ {
+ // SubStream pointers
+ hResult = MarshalSubStreamComPointers(&stream->out);
+ if (hResult != S_OK)
+ goto marshal_error;
+
+ // IAudioRenderClient
+ hResult = CoMarshalInterThreadInterfaceInStream(&pa_IID_IAudioRenderClient, (LPUNKNOWN)stream->renderClientParent, &stream->renderClientStream);
+ if (hResult != S_OK)
+ goto marshal_error;
+ }
+
+ return hResult;
+
+ // If marshaling error occurred, make sure to release everything.
+marshal_error:
+
+ UnmarshalStreamComPointers(stream);
+ ReleaseUnmarshaledComPointers(stream);
+ return hResult;
+}
+
+// ------------------------------------------------------------------------------------------
+static PaError StartStream( PaStream *s )
+{
+ HRESULT hr;
+ PaWasapiStream *stream = (PaWasapiStream*)s;
+ PaError result = paNoError;
+
+ // check if stream is active already
+ if (IsStreamActive(s))
+ return paStreamIsNotStopped;
+
+ PaUtil_ResetBufferProcessor(&stream->bufferProcessor);
+
+ // Cleanup handles (may be necessary if stream was stopped by itself due to error)
+ _StreamCleanup(stream);
+
+ // Create close event
+ if ((stream->hCloseRequest = CreateEvent(NULL, TRUE, FALSE, NULL)) == NULL)
+ {
+ result = paInsufficientMemory;
+ goto start_error;
+ }
+
+ // Create thread
+ if (!stream->bBlocking)
+ {
+ // Create thread events
+ stream->hThreadStart = CreateEvent(NULL, TRUE, FALSE, NULL);
+ stream->hThreadExit = CreateEvent(NULL, TRUE, FALSE, NULL);
+ if ((stream->hThreadStart == NULL) || (stream->hThreadExit == NULL))
+ {
+ result = paInsufficientMemory;
+ goto start_error;
+ }
+
+ // Marshal WASAPI interface pointers for safe use in thread created below.
+ if ((hr = MarshalStreamComPointers(stream)) != S_OK)
+ {
+ PRINT(("Failed marshaling stream COM pointers."));
+ result = paUnanticipatedHostError;
+ goto nonblocking_start_error;
+ }
+
+ if ((stream->in.clientParent && (stream->in.streamFlags & AUDCLNT_STREAMFLAGS_EVENTCALLBACK)) ||
+ (stream->out.clientParent && (stream->out.streamFlags & AUDCLNT_STREAMFLAGS_EVENTCALLBACK)))
+ {
+ if ((stream->hThread = CREATE_THREAD(ProcThreadEvent)) == NULL)
+ {
+ PRINT(("Failed creating thread: ProcThreadEvent."));
+ result = paUnanticipatedHostError;
+ goto nonblocking_start_error;
+ }
+ }
+ else
+ {
+ if ((stream->hThread = CREATE_THREAD(ProcThreadPoll)) == NULL)
+ {
+ PRINT(("Failed creating thread: ProcThreadPoll."));
+ result = paUnanticipatedHostError;
+ goto nonblocking_start_error;
+ }
+ }
+
+ // Wait for thread to start
+ if (WaitForSingleObject(stream->hThreadStart, 60*1000) == WAIT_TIMEOUT)
+ {
+ PRINT(("Failed starting thread: timeout."));
+ result = paUnanticipatedHostError;
+ goto nonblocking_start_error;
+ }
+ }
+ else
+ {
+ // Create blocking operation events (non-signaled event means - blocking operation is pending)
+ if (stream->out.clientParent != NULL)
+ {
+ if ((stream->hBlockingOpStreamWR = CreateEvent(NULL, TRUE, TRUE, NULL)) == NULL)
+ {
+ result = paInsufficientMemory;
+ goto start_error;
+ }
+ }
+ if (stream->in.clientParent != NULL)
+ {
+ if ((stream->hBlockingOpStreamRD = CreateEvent(NULL, TRUE, TRUE, NULL)) == NULL)
+ {
+ result = paInsufficientMemory;
+ goto start_error;
+ }
+ }
+
+ // Initialize event & start INPUT stream
+ if (stream->in.clientParent != NULL)
+ {
+ if ((hr = IAudioClient_Start(stream->in.clientParent)) != S_OK)
+ {
+ LogHostError(hr);
+ result = paUnanticipatedHostError;
+ goto start_error;
+ }
+ }
+
+ // Initialize event & start OUTPUT stream
+ if (stream->out.clientParent != NULL)
+ {
+ // Start
+ if ((hr = IAudioClient_Start(stream->out.clientParent)) != S_OK)
+ {
+ LogHostError(hr);
+ result = paUnanticipatedHostError;
+ goto start_error;
+ }
+ }
+
+ // Set parent to working pointers to use shared functions.
+ stream->captureClient = stream->captureClientParent;
+ stream->renderClient = stream->renderClientParent;
+ stream->in.clientProc = stream->in.clientParent;
+ stream->out.clientProc = stream->out.clientParent;
+
+ // Signal: stream running.
+ stream->running = TRUE;
+ }
+
+ return result;
+
+nonblocking_start_error:
+
+ // Set hThreadExit event to prevent blocking during cleanup
+ SetEvent(stream->hThreadExit);
+ UnmarshalStreamComPointers(stream);
+ ReleaseUnmarshaledComPointers(stream);
+
+start_error:
+
+ StopStream(s);
+ return result;
+}
+
+// ------------------------------------------------------------------------------------------
+void _StreamFinish(PaWasapiStream *stream)
+{
+ // Issue command to thread to stop processing and wait for thread exit
+ if (!stream->bBlocking)
+ {
+ SignalObjectAndWait(stream->hCloseRequest, stream->hThreadExit, INFINITE, FALSE);
+ }
+ else
+ // Blocking mode does not own thread
+ {
+ // Signal close event and wait for each of 2 blocking operations to complete
+ if (stream->out.clientParent)
+ SignalObjectAndWait(stream->hCloseRequest, stream->hBlockingOpStreamWR, INFINITE, TRUE);
+ if (stream->out.clientParent)
+ SignalObjectAndWait(stream->hCloseRequest, stream->hBlockingOpStreamRD, INFINITE, TRUE);
+
+ // Process stop
+ _StreamOnStop(stream);
+ }
+
+ // Cleanup handles
+ _StreamCleanup(stream);
+
+ stream->running = FALSE;
+}
+
+// ------------------------------------------------------------------------------------------
+void _StreamCleanup(PaWasapiStream *stream)
+{
+ // Close thread handles to allow restart
+ SAFE_CLOSE(stream->hThread);
+ SAFE_CLOSE(stream->hThreadStart);
+ SAFE_CLOSE(stream->hThreadExit);
+ SAFE_CLOSE(stream->hCloseRequest);
+ SAFE_CLOSE(stream->hBlockingOpStreamRD);
+ SAFE_CLOSE(stream->hBlockingOpStreamWR);
+}
+
+// ------------------------------------------------------------------------------------------
+static PaError StopStream( PaStream *s )
+{
+ // Finish stream
+ _StreamFinish((PaWasapiStream *)s);
+ return paNoError;
+}
+
+// ------------------------------------------------------------------------------------------
+static PaError AbortStream( PaStream *s )
+{
+ // Finish stream
+ _StreamFinish((PaWasapiStream *)s);
+ return paNoError;
+}
+
+// ------------------------------------------------------------------------------------------
+static PaError IsStreamStopped( PaStream *s )
+{
+ return !((PaWasapiStream *)s)->running;
+}
+
+// ------------------------------------------------------------------------------------------
+static PaError IsStreamActive( PaStream *s )
+{
+ return ((PaWasapiStream *)s)->running;
+}
+
+// ------------------------------------------------------------------------------------------
+static PaTime GetStreamTime( PaStream *s )
+{
+ PaWasapiStream *stream = (PaWasapiStream*)s;
+
+ /* suppress unused variable warnings */
+ (void) stream;
+
+ return PaUtil_GetTime();
+}
+
+// ------------------------------------------------------------------------------------------
+static double GetStreamCpuLoad( PaStream* s )
+{
+ return PaUtil_GetCpuLoad(&((PaWasapiStream *)s)->cpuLoadMeasurer);
+}
+
+// ------------------------------------------------------------------------------------------
+static PaError ReadStream( PaStream* s, void *_buffer, unsigned long frames )
+{
+ PaWasapiStream *stream = (PaWasapiStream*)s;
+
+ HRESULT hr = S_OK;
+ BYTE *user_buffer = (BYTE *)_buffer;
+ BYTE *wasapi_buffer = NULL;
+ DWORD flags = 0;
+ UINT32 i, available, sleep = 0;
+ unsigned long processed;
+ ThreadIdleScheduler sched;
+
+ // validate
+ if (!stream->running)
+ return paStreamIsStopped;
+ if (stream->captureClient == NULL)
+ return paBadStreamPtr;
+
+ // Notify blocking op has begun
+ ResetEvent(stream->hBlockingOpStreamRD);
+
+ // Use thread scheduling for 500 microseconds (emulated) when wait time for frames is less than
+ // 1 milliseconds, emulation helps to normalize CPU consumption and avoids too busy waiting
+ ThreadIdleScheduler_Setup(&sched, 1, 250/* microseconds */);
+
+ // Make a local copy of the user buffer pointer(s), this is necessary
+ // because PaUtil_CopyOutput() advances these pointers every time it is called
+ if (!stream->bufferProcessor.userInputIsInterleaved)
+ {
+ user_buffer = (BYTE *)alloca(sizeof(BYTE *) * stream->bufferProcessor.inputChannelCount);
+ if (user_buffer == NULL)
+ return paInsufficientMemory;
+
+ for (i = 0; i < stream->bufferProcessor.inputChannelCount; ++i)
+ ((BYTE **)user_buffer)[i] = ((BYTE **)_buffer)[i];
+ }
+
+ // Findout if there are tail frames, flush them all before reading hardware
+ if ((available = PaUtil_GetRingBufferReadAvailable(stream->in.tailBuffer)) != 0)
+ {
+ ring_buffer_size_t buf1_size = 0, buf2_size = 0, read, desired;
+ void *buf1 = NULL, *buf2 = NULL;
+
+ // Limit desired to amount of requested frames
+ desired = available;
+ if ((UINT32)desired > frames)
+ desired = frames;
+
+ // Get pointers to read regions
+ read = PaUtil_GetRingBufferReadRegions(stream->in.tailBuffer, desired, &buf1, &buf1_size, &buf2, &buf2_size);
+
+ if (buf1 != NULL)
+ {
+ // Register available frames to processor
+ PaUtil_SetInputFrameCount(&stream->bufferProcessor, buf1_size);
+
+ // Register host buffer pointer to processor
+ PaUtil_SetInterleavedInputChannels(&stream->bufferProcessor, 0, buf1, stream->bufferProcessor.inputChannelCount);
+
+ // Copy user data to host buffer (with conversion if applicable)
+ processed = PaUtil_CopyInput(&stream->bufferProcessor, (void **)&user_buffer, buf1_size);
+ frames -= processed;
+ }
+
+ if (buf2 != NULL)
+ {
+ // Register available frames to processor
+ PaUtil_SetInputFrameCount(&stream->bufferProcessor, buf2_size);
+
+ // Register host buffer pointer to processor
+ PaUtil_SetInterleavedInputChannels(&stream->bufferProcessor, 0, buf2, stream->bufferProcessor.inputChannelCount);
+
+ // Copy user data to host buffer (with conversion if applicable)
+ processed = PaUtil_CopyInput(&stream->bufferProcessor, (void **)&user_buffer, buf2_size);
+ frames -= processed;
+ }
+
+ // Advance
+ PaUtil_AdvanceRingBufferReadIndex(stream->in.tailBuffer, read);
+ }
+
+ // Read hardware
+ while (frames != 0)
+ {
+ // Check if blocking call must be interrupted
+ if (WaitForSingleObject(stream->hCloseRequest, sleep) != WAIT_TIMEOUT)
+ break;
+
+ // Get available frames (must be finding out available frames before call to IAudioCaptureClient_GetBuffer
+ // othervise audio glitches will occur inExclusive mode as it seems that WASAPI has some scheduling/
+ // processing problems when such busy polling with IAudioCaptureClient_GetBuffer occurs)
+ if ((hr = _PollGetInputFramesAvailable(stream, &available)) != S_OK)
+ {
+ LogHostError(hr);
+ return paUnanticipatedHostError;
+ }
+
+ // Wait for more frames to become available
+ if (available == 0)
+ {
+ // Exclusive mode may require latency of 1 millisecond, thus we shall sleep
+ // around 500 microseconds (emulated) to collect packets in time
+ if (stream->in.shareMode != AUDCLNT_SHAREMODE_EXCLUSIVE)
+ {
+ UINT32 sleep_frames = (frames < stream->in.framesPerHostCallback ? frames : stream->in.framesPerHostCallback);
+
+ sleep = GetFramesSleepTime(sleep_frames, stream->in.wavex.Format.nSamplesPerSec);
+ sleep /= 4; // wait only for 1/4 of the buffer
+
+ // WASAPI input provides packets, thus expiring packet will result in bad audio
+ // limit waiting time to 2 seconds (will always work for smallest buffer in Shared)
+ if (sleep > 2)
+ sleep = 2;
+
+ // Avoid busy waiting, schedule next 1 millesecond wait
+ if (sleep == 0)
+ sleep = ThreadIdleScheduler_NextSleep(&sched);
+ }
+ else
+ {
+ if ((sleep = ThreadIdleScheduler_NextSleep(&sched)) != 0)
+ {
+ Sleep(sleep);
+ sleep = 0;
+ }
+ }
+
+ continue;
+ }
+
+ // Get the available data in the shared buffer.
+ if ((hr = IAudioCaptureClient_GetBuffer(stream->captureClient, &wasapi_buffer, &available, &flags, NULL, NULL)) != S_OK)
+ {
+ // Buffer size is too small, waiting
+ if (hr != AUDCLNT_S_BUFFER_EMPTY)
+ {
+ LogHostError(hr);
+ goto end;
+ }
+
+ continue;
+ }
+
+ // Register available frames to processor
+ PaUtil_SetInputFrameCount(&stream->bufferProcessor, available);
+
+ // Register host buffer pointer to processor
+ PaUtil_SetInterleavedInputChannels(&stream->bufferProcessor, 0, wasapi_buffer, stream->bufferProcessor.inputChannelCount);
+
+ // Copy user data to host buffer (with conversion if applicable)
+ processed = PaUtil_CopyInput(&stream->bufferProcessor, (void **)&user_buffer, frames);
+ frames -= processed;
+
+ // Save tail into buffer
+ if ((frames == 0) && (available > processed))
+ {
+ UINT32 bytes_processed = processed * stream->in.wavex.Format.nBlockAlign;
+ UINT32 frames_to_save = available - processed;
+
+ PaUtil_WriteRingBuffer(stream->in.tailBuffer, wasapi_buffer + bytes_processed, frames_to_save);
+ }
+
+ // Release host buffer
+ if ((hr = IAudioCaptureClient_ReleaseBuffer(stream->captureClient, available)) != S_OK)
+ {
+ LogHostError(hr);
+ goto end;
+ }
+ }
+
+end:
+
+ // Notify blocking op has ended
+ SetEvent(stream->hBlockingOpStreamRD);
+
+ return (hr != S_OK ? paUnanticipatedHostError : paNoError);
+}
+
+// ------------------------------------------------------------------------------------------
+static PaError WriteStream( PaStream* s, const void *_buffer, unsigned long frames )
+{
+ PaWasapiStream *stream = (PaWasapiStream*)s;
+
+ //UINT32 frames;
+ const BYTE *user_buffer = (const BYTE *)_buffer;
+ BYTE *wasapi_buffer;
+ HRESULT hr = S_OK;
+ UINT32 i, available, sleep = 0;
+ unsigned long processed;
+ ThreadIdleScheduler sched;
+
+ // validate
+ if (!stream->running)
+ return paStreamIsStopped;
+ if (stream->renderClient == NULL)
+ return paBadStreamPtr;
+
+ // Notify blocking op has begun
+ ResetEvent(stream->hBlockingOpStreamWR);
+
+ // Use thread scheduling for 500 microseconds (emulated) when wait time for frames is less than
+ // 1 milliseconds, emulation helps to normalize CPU consumption and avoids too busy waiting
+ ThreadIdleScheduler_Setup(&sched, 1, 500/* microseconds */);
+
+ // Make a local copy of the user buffer pointer(s), this is necessary
+ // because PaUtil_CopyOutput() advances these pointers every time it is called
+ if (!stream->bufferProcessor.userOutputIsInterleaved)
+ {
+ user_buffer = (const BYTE *)alloca(sizeof(const BYTE *) * stream->bufferProcessor.outputChannelCount);
+ if (user_buffer == NULL)
+ return paInsufficientMemory;
+
+ for (i = 0; i < stream->bufferProcessor.outputChannelCount; ++i)
+ ((const BYTE **)user_buffer)[i] = ((const BYTE **)_buffer)[i];
+ }
+
+ // Blocking (potentially, untill 'frames' are consumed) loop
+ while (frames != 0)
+ {
+ // Check if blocking call must be interrupted
+ if (WaitForSingleObject(stream->hCloseRequest, sleep) != WAIT_TIMEOUT)
+ break;
+
+ // Get frames available
+ if ((hr = _PollGetOutputFramesAvailable(stream, &available)) != S_OK)
+ {
+ LogHostError(hr);
+ goto end;
+ }
+
+ // Wait for more frames to become available
+ if (available == 0)
+ {
+ UINT32 sleep_frames = (frames < stream->out.framesPerHostCallback ? frames : stream->out.framesPerHostCallback);
+
+ sleep = GetFramesSleepTime(sleep_frames, stream->out.wavex.Format.nSamplesPerSec);
+ sleep /= 2; // wait only for half of the buffer
+
+ // Avoid busy waiting, schedule next 1 millesecond wait
+ if (sleep == 0)
+ sleep = ThreadIdleScheduler_NextSleep(&sched);
+
+ continue;
+ }
+
+ // Keep in 'frmaes' range
+ if (available > frames)
+ available = frames;
+
+ // Get pointer to host buffer
+ if ((hr = IAudioRenderClient_GetBuffer(stream->renderClient, available, &wasapi_buffer)) != S_OK)
+ {
+ // Buffer size is too big, waiting
+ if (hr == AUDCLNT_E_BUFFER_TOO_LARGE)
+ continue;
+
+ LogHostError(hr);
+ goto end;
+ }
+
+ // Keep waiting again (on Vista it was noticed that WASAPI could SOMETIMES return NULL pointer
+ // to buffer without returning AUDCLNT_E_BUFFER_TOO_LARGE instead)
+ if (wasapi_buffer == NULL)
+ continue;
+
+ // Register available frames to processor
+ PaUtil_SetOutputFrameCount(&stream->bufferProcessor, available);
+
+ // Register host buffer pointer to processor
+ PaUtil_SetInterleavedOutputChannels(&stream->bufferProcessor, 0, wasapi_buffer, stream->bufferProcessor.outputChannelCount);
+
+ // Copy user data to host buffer (with conversion if applicable), this call will advance
+ // pointer 'user_buffer' to consumed portion of data
+ processed = PaUtil_CopyOutput(&stream->bufferProcessor, (const void **)&user_buffer, frames);
+ frames -= processed;
+
+ // Release host buffer
+ if ((hr = IAudioRenderClient_ReleaseBuffer(stream->renderClient, available, 0)) != S_OK)
+ {
+ LogHostError(hr);
+ goto end;
+ }
+ }
+
+end:
+
+ // Notify blocking op has ended
+ SetEvent(stream->hBlockingOpStreamWR);
+
+ return (hr != S_OK ? paUnanticipatedHostError : paNoError);
+}
+
+unsigned long PaUtil_GetOutputFrameCount( PaUtilBufferProcessor* bp )
+{
+ return bp->hostOutputFrameCount[0];
+}
+
+// ------------------------------------------------------------------------------------------
+static signed long GetStreamReadAvailable( PaStream* s )
+{
+ PaWasapiStream *stream = (PaWasapiStream*)s;
+
+ HRESULT hr;
+ UINT32 available = 0;
+
+ // validate
+ if (!stream->running)
+ return paStreamIsStopped;
+ if (stream->captureClient == NULL)
+ return paBadStreamPtr;
+
+ // available in hardware buffer
+ if ((hr = _PollGetInputFramesAvailable(stream, &available)) != S_OK)
+ {
+ LogHostError(hr);
+ return paUnanticipatedHostError;
+ }
+
+ // available in software tail buffer
+ available += PaUtil_GetRingBufferReadAvailable(stream->in.tailBuffer);
+
+ return available;
+}
+
+// ------------------------------------------------------------------------------------------
+static signed long GetStreamWriteAvailable( PaStream* s )
+{
+ PaWasapiStream *stream = (PaWasapiStream*)s;
+ HRESULT hr;
+ UINT32 available = 0;
+
+ // validate
+ if (!stream->running)
+ return paStreamIsStopped;
+ if (stream->renderClient == NULL)
+ return paBadStreamPtr;
+
+ if ((hr = _PollGetOutputFramesAvailable(stream, &available)) != S_OK)
+ {
+ LogHostError(hr);
+ return paUnanticipatedHostError;
+ }
+
+ return (signed long)available;
+}
+
+
+// ------------------------------------------------------------------------------------------
+static void WaspiHostProcessingLoop( void *inputBuffer, long inputFrames,
+ void *outputBuffer, long outputFrames,
+ void *userData )
+{
+ PaWasapiStream *stream = (PaWasapiStream*)userData;
+ PaStreamCallbackTimeInfo timeInfo = {0,0,0};
+ PaStreamCallbackFlags flags = 0;
+ int callbackResult;
+ unsigned long framesProcessed;
+ HRESULT hr;
+ UINT32 pending;
+
+ PaUtil_BeginCpuLoadMeasurement( &stream->cpuLoadMeasurer );
+
+ /*
+ Pa_GetStreamTime:
+ - generate timing information
+ - handle buffer slips
+ */
+ timeInfo.currentTime = PaUtil_GetTime();
+ // Query input latency
+ if (stream->in.clientProc != NULL)
+ {
+ PaTime pending_time;
+ if ((hr = IAudioClient_GetCurrentPadding(stream->in.clientProc, &pending)) == S_OK)
+ pending_time = (PaTime)pending / (PaTime)stream->in.wavex.Format.nSamplesPerSec;
+ else
+ pending_time = (PaTime)stream->in.latencySeconds;
+
+ timeInfo.inputBufferAdcTime = timeInfo.currentTime + pending_time;
+ }
+ // Query output current latency
+ if (stream->out.clientProc != NULL)
+ {
+ PaTime pending_time;
+ if ((hr = IAudioClient_GetCurrentPadding(stream->out.clientProc, &pending)) == S_OK)
+ pending_time = (PaTime)pending / (PaTime)stream->out.wavex.Format.nSamplesPerSec;
+ else
+ pending_time = (PaTime)stream->out.latencySeconds;
+
+ timeInfo.outputBufferDacTime = timeInfo.currentTime + pending_time;
+ }
+
+ /*
+ If you need to byte swap or shift inputBuffer to convert it into a
+ portaudio format, do it here.
+ */
+
+ PaUtil_BeginBufferProcessing( &stream->bufferProcessor, &timeInfo, flags );
+
+ /*
+ depending on whether the host buffers are interleaved, non-interleaved
+ or a mixture, you will want to call PaUtil_SetInterleaved*Channels(),
+ PaUtil_SetNonInterleaved*Channel() or PaUtil_Set*Channel() here.
+ */
+
+ if (stream->bufferProcessor.inputChannelCount > 0)
+ {
+ PaUtil_SetInputFrameCount( &stream->bufferProcessor, inputFrames );
+ PaUtil_SetInterleavedInputChannels( &stream->bufferProcessor,
+ 0, /* first channel of inputBuffer is channel 0 */
+ inputBuffer,
+ 0 ); /* 0 - use inputChannelCount passed to init buffer processor */
+ }
+
+ if (stream->bufferProcessor.outputChannelCount > 0)
+ {
+ PaUtil_SetOutputFrameCount( &stream->bufferProcessor, outputFrames);
+ PaUtil_SetInterleavedOutputChannels( &stream->bufferProcessor,
+ 0, /* first channel of outputBuffer is channel 0 */
+ outputBuffer,
+ 0 ); /* 0 - use outputChannelCount passed to init buffer processor */
+ }
+
+ /* you must pass a valid value of callback result to PaUtil_EndBufferProcessing()
+ in general you would pass paContinue for normal operation, and
+ paComplete to drain the buffer processor's internal output buffer.
+ You can check whether the buffer processor's output buffer is empty
+ using PaUtil_IsBufferProcessorOuputEmpty( bufferProcessor )
+ */
+ callbackResult = paContinue;
+ framesProcessed = PaUtil_EndBufferProcessing( &stream->bufferProcessor, &callbackResult );
+
+ /*
+ If you need to byte swap or shift outputBuffer to convert it to
+ host format, do it here.
+ */
+
+ PaUtil_EndCpuLoadMeasurement( &stream->cpuLoadMeasurer, framesProcessed );
+
+ if (callbackResult == paContinue)
+ {
+ /* nothing special to do */
+ }
+ else
+ if (callbackResult == paAbort)
+ {
+ // stop stream
+ SetEvent(stream->hCloseRequest);
+ }
+ else
+ {
+ // stop stream
+ SetEvent(stream->hCloseRequest);
+ }
+}
+
+// ------------------------------------------------------------------------------------------
+HANDLE MMCSS_activate(const char *name)
+{
+ DWORD task_idx = 0;
+ HANDLE hTask = pAvSetMmThreadCharacteristics(name, &task_idx);
+ if (hTask == NULL)
+ {
+ PRINT(("WASAPI: AvSetMmThreadCharacteristics failed!\n"));
+ }
+
+ /*BOOL priority_ok = pAvSetMmThreadPriority(hTask, AVRT_PRIORITY_NORMAL);
+ if (priority_ok == FALSE)
+ {
+ PRINT(("WASAPI: AvSetMmThreadPriority failed!\n"));
+ }*/
+
+ // debug
+ {
+ int cur_priority = GetThreadPriority(GetCurrentThread());
+ DWORD cur_priority_class = GetPriorityClass(GetCurrentProcess());
+ PRINT(("WASAPI: thread[ priority-0x%X class-0x%X ]\n", cur_priority, cur_priority_class));
+ }
+
+ return hTask;
+}
+
+// ------------------------------------------------------------------------------------------
+void MMCSS_deactivate(HANDLE hTask)
+{
+ if (!hTask)
+ return;
+
+ if (pAvRevertMmThreadCharacteristics(hTask) == FALSE)
+ {
+ PRINT(("WASAPI: AvRevertMmThreadCharacteristics failed!\n"));
+ }
+}
+
+// ------------------------------------------------------------------------------------------
+PaError PaWasapi_ThreadPriorityBoost(void **hTask, PaWasapiThreadPriority nPriorityClass)
+{
+ static const char *mmcs_name[] =
+ {
+ NULL,
+ "Audio",
+ "Capture",
+ "Distribution",
+ "Games",
+ "Playback",
+ "Pro Audio",
+ "Window Manager"
+ };
+ HANDLE task;
+
+ if (hTask == NULL)
+ return paUnanticipatedHostError;
+
+ if ((UINT32)nPriorityClass >= STATIC_ARRAY_SIZE(mmcs_name))
+ return paUnanticipatedHostError;
+
+ task = MMCSS_activate(mmcs_name[nPriorityClass]);
+ if (task == NULL)
+ return paUnanticipatedHostError;
+
+ (*hTask) = task;
+ return paNoError;
+}
+
+// ------------------------------------------------------------------------------------------
+PaError PaWasapi_ThreadPriorityRevert(void *hTask)
+{
+ if (hTask == NULL)
+ return paUnanticipatedHostError;
+
+ MMCSS_deactivate((HANDLE)hTask);
+
+ return paNoError;
+}
+
+// ------------------------------------------------------------------------------------------
+// Described at:
+// http://msdn.microsoft.com/en-us/library/dd371387(v=VS.85).aspx
+
+PaError PaWasapi_GetJackCount(PaDeviceIndex nDevice, int *jcount)
+{
+ PaError ret;
+ HRESULT hr = S_OK;
+ PaDeviceIndex index;
+ IDeviceTopology *pDeviceTopology = NULL;
+ IConnector *pConnFrom = NULL;
+ IConnector *pConnTo = NULL;
+ IPart *pPart = NULL;
+ IKsJackDescription *pJackDesc = NULL;
+ UINT jackCount = 0;
+
+ PaWasapiHostApiRepresentation *paWasapi = _GetHostApi(&ret);
+ if (paWasapi == NULL)
+ return paNotInitialized;
+
+ // Get device index.
+ ret = PaUtil_DeviceIndexToHostApiDeviceIndex(&index, nDevice, &paWasapi->inheritedHostApiRep);
+ if (ret != paNoError)
+ return ret;
+
+ // Validate index.
+ if ((UINT32)index >= paWasapi->deviceCount)
+ return paInvalidDevice;
+
+ // Get the endpoint device's IDeviceTopology interface.
+ hr = IMMDevice_Activate(paWasapi->devInfo[index].device, &pa_IID_IDeviceTopology,
+ CLSCTX_INPROC_SERVER, NULL, (void**)&pDeviceTopology);
+ IF_FAILED_JUMP(hr, error);
+
+ // The device topology for an endpoint device always contains just one connector (connector number 0).
+ hr = IDeviceTopology_GetConnector(pDeviceTopology, 0, &pConnFrom);
+ IF_FAILED_JUMP(hr, error);
+
+ // Step across the connection to the jack on the adapter.
+ hr = IConnector_GetConnectedTo(pConnFrom, &pConnTo);
+ if (HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND) == hr)
+ {
+ // The adapter device is not currently active.
+ hr = E_NOINTERFACE;
+ }
+ IF_FAILED_JUMP(hr, error);
+
+ // Get the connector's IPart interface.
+ hr = IConnector_QueryInterface(pConnTo, &pa_IID_IPart, (void**)&pPart);
+ IF_FAILED_JUMP(hr, error);
+
+ // Activate the connector's IKsJackDescription interface.
+ hr = IPart_Activate(pPart, CLSCTX_INPROC_SERVER, &pa_IID_IKsJackDescription, (void**)&pJackDesc);
+ IF_FAILED_JUMP(hr, error);
+
+ // Return jack count for this device.
+ hr = IKsJackDescription_GetJackCount(pJackDesc, &jackCount);
+ IF_FAILED_JUMP(hr, error);
+
+ // Set.
+ (*jcount) = jackCount;
+
+ // Ok.
+ ret = paNoError;
+
+error:
+
+ SAFE_RELEASE(pDeviceTopology);
+ SAFE_RELEASE(pConnFrom);
+ SAFE_RELEASE(pConnTo);
+ SAFE_RELEASE(pPart);
+ SAFE_RELEASE(pJackDesc);
+
+ LogHostError(hr);
+ return paNoError;
+}
+
+// ------------------------------------------------------------------------------------------
+static PaWasapiJackConnectionType ConvertJackConnectionTypeWASAPIToPA(int connType)
+{
+ switch (connType)
+ {
+ case eConnTypeUnknown: return eJackConnTypeUnknown;
+#ifdef _KS_
+ case eConnType3Point5mm: return eJackConnType3Point5mm;
+#else
+ case eConnTypeEighth: return eJackConnType3Point5mm;
+#endif
+ case eConnTypeQuarter: return eJackConnTypeQuarter;
+ case eConnTypeAtapiInternal: return eJackConnTypeAtapiInternal;
+ case eConnTypeRCA: return eJackConnTypeRCA;
+ case eConnTypeOptical: return eJackConnTypeOptical;
+ case eConnTypeOtherDigital: return eJackConnTypeOtherDigital;
+ case eConnTypeOtherAnalog: return eJackConnTypeOtherAnalog;
+ case eConnTypeMultichannelAnalogDIN: return eJackConnTypeMultichannelAnalogDIN;
+ case eConnTypeXlrProfessional: return eJackConnTypeXlrProfessional;
+ case eConnTypeRJ11Modem: return eJackConnTypeRJ11Modem;
+ case eConnTypeCombination: return eJackConnTypeCombination;
+ }
+ return eJackConnTypeUnknown;
+}
+
+// ------------------------------------------------------------------------------------------
+static PaWasapiJackGeoLocation ConvertJackGeoLocationWASAPIToPA(int geoLoc)
+{
+ switch (geoLoc)
+ {
+ case eGeoLocRear: return eJackGeoLocRear;
+ case eGeoLocFront: return eJackGeoLocFront;
+ case eGeoLocLeft: return eJackGeoLocLeft;
+ case eGeoLocRight: return eJackGeoLocRight;
+ case eGeoLocTop: return eJackGeoLocTop;
+ case eGeoLocBottom: return eJackGeoLocBottom;
+#ifdef _KS_
+ case eGeoLocRearPanel: return eJackGeoLocRearPanel;
+#else
+ case eGeoLocRearOPanel: return eJackGeoLocRearPanel;
+#endif
+ case eGeoLocRiser: return eJackGeoLocRiser;
+ case eGeoLocInsideMobileLid: return eJackGeoLocInsideMobileLid;
+ case eGeoLocDrivebay: return eJackGeoLocDrivebay;
+ case eGeoLocHDMI: return eJackGeoLocHDMI;
+ case eGeoLocOutsideMobileLid: return eJackGeoLocOutsideMobileLid;
+ case eGeoLocATAPI: return eJackGeoLocATAPI;
+ }
+ return eJackGeoLocUnk;
+}
+
+// ------------------------------------------------------------------------------------------
+static PaWasapiJackGenLocation ConvertJackGenLocationWASAPIToPA(int genLoc)
+{
+ switch (genLoc)
+ {
+ case eGenLocPrimaryBox: return eJackGenLocPrimaryBox;
+ case eGenLocInternal: return eJackGenLocInternal;
+#ifdef _KS_
+ case eGenLocSeparate: return eJackGenLocSeparate;
+#else
+ case eGenLocSeperate: return eJackGenLocSeparate;
+#endif
+ case eGenLocOther: return eJackGenLocOther;
+ }
+ return eJackGenLocPrimaryBox;
+}
+
+// ------------------------------------------------------------------------------------------
+static PaWasapiJackPortConnection ConvertJackPortConnectionWASAPIToPA(int portConn)
+{
+ switch (portConn)
+ {
+ case ePortConnJack: return eJackPortConnJack;
+ case ePortConnIntegratedDevice: return eJackPortConnIntegratedDevice;
+ case ePortConnBothIntegratedAndJack:return eJackPortConnBothIntegratedAndJack;
+ case ePortConnUnknown: return eJackPortConnUnknown;
+ }
+ return eJackPortConnJack;
+}
+
+// ------------------------------------------------------------------------------------------
+// Described at:
+// http://msdn.microsoft.com/en-us/library/dd371387(v=VS.85).aspx
+
+PaError PaWasapi_GetJackDescription(PaDeviceIndex nDevice, int jindex, PaWasapiJackDescription *pJackDescription)
+{
+ PaError ret;
+ HRESULT hr = S_OK;
+ PaDeviceIndex index;
+ IDeviceTopology *pDeviceTopology = NULL;
+ IConnector *pConnFrom = NULL;
+ IConnector *pConnTo = NULL;
+ IPart *pPart = NULL;
+ IKsJackDescription *pJackDesc = NULL;
+ KSJACK_DESCRIPTION jack = { 0 };
+
+ PaWasapiHostApiRepresentation *paWasapi = _GetHostApi(&ret);
+ if (paWasapi == NULL)
+ return paNotInitialized;
+
+ // Get device index.
+ ret = PaUtil_DeviceIndexToHostApiDeviceIndex(&index, nDevice, &paWasapi->inheritedHostApiRep);
+ if (ret != paNoError)
+ return ret;
+
+ // Validate index.
+ if ((UINT32)index >= paWasapi->deviceCount)
+ return paInvalidDevice;
+
+ // Get the endpoint device's IDeviceTopology interface.
+ hr = IMMDevice_Activate(paWasapi->devInfo[index].device, &pa_IID_IDeviceTopology,
+ CLSCTX_INPROC_SERVER, NULL, (void**)&pDeviceTopology);
+ IF_FAILED_JUMP(hr, error);
+
+ // The device topology for an endpoint device always contains just one connector (connector number 0).
+ hr = IDeviceTopology_GetConnector(pDeviceTopology, 0, &pConnFrom);
+ IF_FAILED_JUMP(hr, error);
+
+ // Step across the connection to the jack on the adapter.
+ hr = IConnector_GetConnectedTo(pConnFrom, &pConnTo);
+ if (HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND) == hr)
+ {
+ // The adapter device is not currently active.
+ hr = E_NOINTERFACE;
+ }
+ IF_FAILED_JUMP(hr, error);
+
+ // Get the connector's IPart interface.
+ hr = IConnector_QueryInterface(pConnTo, &pa_IID_IPart, (void**)&pPart);
+ IF_FAILED_JUMP(hr, error);
+
+ // Activate the connector's IKsJackDescription interface.
+ hr = IPart_Activate(pPart, CLSCTX_INPROC_SERVER, &pa_IID_IKsJackDescription, (void**)&pJackDesc);
+ IF_FAILED_JUMP(hr, error);
+
+ // Test to return jack description struct for index 0.
+ hr = IKsJackDescription_GetJackDescription(pJackDesc, jindex, &jack);
+ IF_FAILED_JUMP(hr, error);
+
+ // Convert WASAPI values to PA format.
+ pJackDescription->channelMapping = jack.ChannelMapping;
+ pJackDescription->color = jack.Color;
+ pJackDescription->connectionType = ConvertJackConnectionTypeWASAPIToPA(jack.ConnectionType);
+ pJackDescription->genLocation = ConvertJackGenLocationWASAPIToPA(jack.GenLocation);
+ pJackDescription->geoLocation = ConvertJackGeoLocationWASAPIToPA(jack.GeoLocation);
+ pJackDescription->isConnected = jack.IsConnected;
+ pJackDescription->portConnection = ConvertJackPortConnectionWASAPIToPA(jack.PortConnection);
+
+ // Ok.
+ ret = paNoError;
+
+error:
+
+ SAFE_RELEASE(pDeviceTopology);
+ SAFE_RELEASE(pConnFrom);
+ SAFE_RELEASE(pConnTo);
+ SAFE_RELEASE(pPart);
+ SAFE_RELEASE(pJackDesc);
+
+ LogHostError(hr);
+ return ret;
+}
+
+// ------------------------------------------------------------------------------------------
+HRESULT _PollGetOutputFramesAvailable(PaWasapiStream *stream, UINT32 *available)
+{
+ HRESULT hr;
+ UINT32 frames = stream->out.framesPerHostCallback,
+ padding = 0;
+
+ (*available) = 0;
+
+ // get read position
+ if ((hr = IAudioClient_GetCurrentPadding(stream->out.clientProc, &padding)) != S_OK)
+ return LogHostError(hr);
+
+ // get available
+ frames -= padding;
+
+ // set
+ (*available) = frames;
+ return hr;
+}
+
+// ------------------------------------------------------------------------------------------
+HRESULT _PollGetInputFramesAvailable(PaWasapiStream *stream, UINT32 *available)
+{
+ HRESULT hr;
+
+ (*available) = 0;
+
+ // GetCurrentPadding() has opposite meaning to Output stream
+ if ((hr = IAudioClient_GetCurrentPadding(stream->in.clientProc, available)) != S_OK)
+ return LogHostError(hr);
+
+ return hr;
+}
+
+// ------------------------------------------------------------------------------------------
+HRESULT ProcessOutputBuffer(PaWasapiStream *stream, PaWasapiHostProcessor *processor, UINT32 frames)
+{
+ HRESULT hr;
+ BYTE *data = NULL;
+
+ // Get buffer
+ if ((hr = IAudioRenderClient_GetBuffer(stream->renderClient, frames, &data)) != S_OK)
+ {
+ if (stream->out.shareMode == AUDCLNT_SHAREMODE_SHARED)
+ {
+ // Using GetCurrentPadding to overcome AUDCLNT_E_BUFFER_TOO_LARGE in
+ // shared mode results in no sound in Event-driven mode (MSDN does not
+ // document this, or is it WASAPI bug?), thus we better
+ // try to acquire buffer next time when GetBuffer allows to do so.
+#if 0
+ // Get Read position
+ UINT32 padding = 0;
+ hr = IAudioClient_GetCurrentPadding(stream->out.clientProc, &padding);
+ if (hr != S_OK)
+ return LogHostError(hr);
+
+ // Get frames to write
+ frames -= padding;
+ if (frames == 0)
+ return S_OK;
+
+ if ((hr = IAudioRenderClient_GetBuffer(stream->renderClient, frames, &data)) != S_OK)
+ return LogHostError(hr);
+#else
+ if (hr == AUDCLNT_E_BUFFER_TOO_LARGE)
+ return S_OK; // be silent in shared mode, try again next time
+#endif
+ }
+ else
+ return LogHostError(hr);
+ }
+
+ // Process data
+ if (stream->out.monoMixer != NULL)
+ {
+ // expand buffer
+ UINT32 mono_frames_size = frames * (stream->out.wavex.Format.wBitsPerSample / 8);
+ if (mono_frames_size > stream->out.monoBufferSize)
+ stream->out.monoBuffer = PaWasapi_ReallocateMemory(stream->out.monoBuffer, (stream->out.monoBufferSize = mono_frames_size));
+
+ // process
+ processor[S_OUTPUT].processor(NULL, 0, (BYTE *)stream->out.monoBuffer, frames, processor[S_OUTPUT].userData);
+
+ // mix 1 to 2 channels
+ stream->out.monoMixer(data, stream->out.monoBuffer, frames);
+ }
+ else
+ {
+ processor[S_OUTPUT].processor(NULL, 0, data, frames, processor[S_OUTPUT].userData);
+ }
+
+ // Release buffer
+ if ((hr = IAudioRenderClient_ReleaseBuffer(stream->renderClient, frames, 0)) != S_OK)
+ LogHostError(hr);
+
+ return hr;
+}
+
+// ------------------------------------------------------------------------------------------
+HRESULT ProcessInputBuffer(PaWasapiStream *stream, PaWasapiHostProcessor *processor)
+{
+ HRESULT hr = S_OK;
+ UINT32 frames;
+ BYTE *data = NULL;
+ DWORD flags = 0;
+
+ for (;;)
+ {
+ // Check if blocking call must be interrupted
+ if (WaitForSingleObject(stream->hCloseRequest, 0) != WAIT_TIMEOUT)
+ break;
+
+ // Findout if any frames available
+ frames = 0;
+ if ((hr = _PollGetInputFramesAvailable(stream, &frames)) != S_OK)
+ return hr;
+
+ // Empty/consumed buffer
+ if (frames == 0)
+ break;
+
+ // Get the available data in the shared buffer.
+ if ((hr = IAudioCaptureClient_GetBuffer(stream->captureClient, &data, &frames, &flags, NULL, NULL)) != S_OK)
+ {
+ if (hr == AUDCLNT_S_BUFFER_EMPTY)
+ {
+ hr = S_OK;
+ break; // Empty/consumed buffer
+ }
+
+ return LogHostError(hr);
+ break;
+ }
+
+ // Detect silence
+ // if (flags & AUDCLNT_BUFFERFLAGS_SILENT)
+ // data = NULL;
+
+ // Process data
+ if (stream->in.monoMixer != NULL)
+ {
+ // expand buffer
+ UINT32 mono_frames_size = frames * (stream->in.wavex.Format.wBitsPerSample / 8);
+ if (mono_frames_size > stream->in.monoBufferSize)
+ stream->in.monoBuffer = PaWasapi_ReallocateMemory(stream->in.monoBuffer, (stream->in.monoBufferSize = mono_frames_size));
+
+ // mix 1 to 2 channels
+ stream->in.monoMixer(stream->in.monoBuffer, data, frames);
+
+ // process
+ processor[S_INPUT].processor((BYTE *)stream->in.monoBuffer, frames, NULL, 0, processor[S_INPUT].userData);
+ }
+ else
+ {
+ processor[S_INPUT].processor(data, frames, NULL, 0, processor[S_INPUT].userData);
+ }
+
+ // Release buffer
+ if ((hr = IAudioCaptureClient_ReleaseBuffer(stream->captureClient, frames)) != S_OK)
+ return LogHostError(hr);
+
+ //break;
+ }
+
+ return hr;
+}
+
+// ------------------------------------------------------------------------------------------
+void _StreamOnStop(PaWasapiStream *stream)
+{
+ // Stop INPUT/OUTPUT clients
+ if (!stream->bBlocking)
+ {
+ if (stream->in.clientProc != NULL)
+ IAudioClient_Stop(stream->in.clientProc);
+ if (stream->out.clientProc != NULL)
+ IAudioClient_Stop(stream->out.clientProc);
+ }
+ else
+ {
+ if (stream->in.clientParent != NULL)
+ IAudioClient_Stop(stream->in.clientParent);
+ if (stream->out.clientParent != NULL)
+ IAudioClient_Stop(stream->out.clientParent);
+ }
+
+ // Restore thread priority
+ if (stream->hAvTask != NULL)
+ {
+ PaWasapi_ThreadPriorityRevert(stream->hAvTask);
+ stream->hAvTask = NULL;
+ }
+
+ // Notify
+ if (stream->streamRepresentation.streamFinishedCallback != NULL)
+ stream->streamRepresentation.streamFinishedCallback(stream->streamRepresentation.userData);
+}
+
+// ------------------------------------------------------------------------------------------
+PA_THREAD_FUNC ProcThreadEvent(void *param)
+{
+ PaWasapiHostProcessor processor[S_COUNT];
+ HRESULT hr;
+ DWORD dwResult;
+ PaWasapiStream *stream = (PaWasapiStream *)param;
+ PaWasapiHostProcessor defaultProcessor;
+ BOOL set_event[S_COUNT] = { FALSE, FALSE };
+ BOOL bWaitAllEvents = FALSE;
+ BOOL bThreadComInitialized = FALSE;
+
+ /*
+ If COM is already initialized CoInitialize will either return
+ FALSE, or RPC_E_CHANGED_MODE if it was initialized in a different
+ threading mode. In either case we shouldn't consider it an error
+ but we need to be careful to not call CoUninitialize() if
+ RPC_E_CHANGED_MODE was returned.
+ */
+ hr = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
+ if (FAILED(hr) && (hr != RPC_E_CHANGED_MODE))
+ {
+ PRINT(("WASAPI: failed ProcThreadEvent CoInitialize"));
+ return paUnanticipatedHostError;
+ }
+ if (hr != RPC_E_CHANGED_MODE)
+ bThreadComInitialized = TRUE;
+
+ // Unmarshal stream pointers for safe COM operation
+ hr = UnmarshalStreamComPointers(stream);
+ if (hr != S_OK) {
+ PRINT(("Error unmarshaling stream COM pointers. HRESULT: %i\n", hr));
+ goto thread_end;
+ }
+
+ // Waiting on all events in case of Full-Duplex/Exclusive mode.
+ if ((stream->in.clientProc != NULL) && (stream->out.clientProc != NULL))
+ {
+ bWaitAllEvents = (stream->in.shareMode == AUDCLNT_SHAREMODE_EXCLUSIVE) &&
+ (stream->out.shareMode == AUDCLNT_SHAREMODE_EXCLUSIVE);
+ }
+
+ // Setup data processors
+ defaultProcessor.processor = WaspiHostProcessingLoop;
+ defaultProcessor.userData = stream;
+ processor[S_INPUT] = (stream->hostProcessOverrideInput.processor != NULL ? stream->hostProcessOverrideInput : defaultProcessor);
+ processor[S_OUTPUT] = (stream->hostProcessOverrideOutput.processor != NULL ? stream->hostProcessOverrideOutput : defaultProcessor);
+
+ // Boost thread priority
+ PaWasapi_ThreadPriorityBoost((void **)&stream->hAvTask, stream->nThreadPriority);
+
+ // Create events
+ if (stream->event[S_OUTPUT] == NULL)
+ {
+ stream->event[S_OUTPUT] = CreateEvent(NULL, FALSE, FALSE, NULL);
+ set_event[S_OUTPUT] = TRUE;
+ }
+ if (stream->event[S_INPUT] == NULL)
+ {
+ stream->event[S_INPUT] = CreateEvent(NULL, FALSE, FALSE, NULL);
+ set_event[S_INPUT] = TRUE;
+ }
+ if ((stream->event[S_OUTPUT] == NULL) || (stream->event[S_INPUT] == NULL))
+ {
+ PRINT(("WASAPI Thread: failed creating Input/Output event handle\n"));
+ goto thread_error;
+ }
+
+ // Initialize event & start INPUT stream
+ if (stream->in.clientProc)
+ {
+ // Create & set handle
+ if (set_event[S_INPUT])
+ {
+ if ((hr = IAudioClient_SetEventHandle(stream->in.clientProc, stream->event[S_INPUT])) != S_OK)
+ {
+ LogHostError(hr);
+ goto thread_error;
+ }
+ }
+
+ // Start
+ if ((hr = IAudioClient_Start(stream->in.clientProc)) != S_OK)
+ {
+ LogHostError(hr);
+ goto thread_error;
+ }
+ }
+
+ // Initialize event & start OUTPUT stream
+ if (stream->out.clientProc)
+ {
+ // Create & set handle
+ if (set_event[S_OUTPUT])
+ {
+ if ((hr = IAudioClient_SetEventHandle(stream->out.clientProc, stream->event[S_OUTPUT])) != S_OK)
+ {
+ LogHostError(hr);
+ goto thread_error;
+ }
+ }
+
+ // Preload buffer before start
+ if ((hr = ProcessOutputBuffer(stream, processor, stream->out.framesPerBuffer)) != S_OK)
+ {
+ LogHostError(hr);
+ goto thread_error;
+ }
+
+ // Start
+ if ((hr = IAudioClient_Start(stream->out.clientProc)) != S_OK)
+ {
+ LogHostError(hr);
+ goto thread_error;
+ }
+
+ }
+
+ // Signal: stream running
+ stream->running = TRUE;
+
+ // Notify: thread started
+ SetEvent(stream->hThreadStart);
+
+ // Processing Loop
+ for (;;)
+ {
+ // 10 sec timeout (on timeout stream will auto-stop when processed by WAIT_TIMEOUT case)
+ dwResult = WaitForMultipleObjects(S_COUNT, stream->event, bWaitAllEvents, 10*1000);
+
+ // Check for close event (after wait for buffers to avoid any calls to user
+ // callback when hCloseRequest was set)
+ if (WaitForSingleObject(stream->hCloseRequest, 0) != WAIT_TIMEOUT)
+ break;
+
+ // Process S_INPUT/S_OUTPUT
+ switch (dwResult)
+ {
+ case WAIT_TIMEOUT: {
+ PRINT(("WASAPI Thread: WAIT_TIMEOUT - probably bad audio driver or Vista x64 bug: use paWinWasapiPolling instead\n"));
+ goto thread_end;
+ break; }
+
+ // Input stream
+ case WAIT_OBJECT_0 + S_INPUT: {
+
+ if (stream->captureClient == NULL)
+ break;
+
+ if ((hr = ProcessInputBuffer(stream, processor)) != S_OK)
+ {
+ LogHostError(hr);
+ goto thread_error;
+ }
+
+ break; }
+
+ // Output stream
+ case WAIT_OBJECT_0 + S_OUTPUT: {
+
+ if (stream->renderClient == NULL)
+ break;
+
+ if ((hr = ProcessOutputBuffer(stream, processor, stream->out.framesPerBuffer)) != S_OK)
+ {
+ LogHostError(hr);
+ goto thread_error;
+ }
+
+ break; }
+ }
+ }
+
+thread_end:
+
+ // Process stop
+ _StreamOnStop(stream);
+
+ // Release unmarshaled COM pointers
+ ReleaseUnmarshaledComPointers(stream);
+
+ // Cleanup COM for this thread
+ if (bThreadComInitialized == TRUE)
+ CoUninitialize();
+
+ // Notify: not running
+ stream->running = FALSE;
+
+ // Notify: thread exited
+ SetEvent(stream->hThreadExit);
+
+ return 0;
+
+thread_error:
+
+ // Prevent deadlocking in Pa_StreamStart
+ SetEvent(stream->hThreadStart);
+
+ // Exit
+ goto thread_end;
+}
+
+// ------------------------------------------------------------------------------------------
+PA_THREAD_FUNC ProcThreadPoll(void *param)
+{
+ PaWasapiHostProcessor processor[S_COUNT];
+ HRESULT hr;
+ PaWasapiStream *stream = (PaWasapiStream *)param;
+ PaWasapiHostProcessor defaultProcessor;
+ INT32 i;
+ ThreadIdleScheduler scheduler;
+
+ // Calculate the actual duration of the allocated buffer.
+ DWORD sleep_ms = 0;
+ DWORD sleep_ms_in;
+ DWORD sleep_ms_out;
+
+ BOOL bThreadComInitialized = FALSE;
+
+ /*
+ If COM is already initialized CoInitialize will either return
+ FALSE, or RPC_E_CHANGED_MODE if it was initialized in a different
+ threading mode. In either case we shouldn't consider it an error
+ but we need to be careful to not call CoUninitialize() if
+ RPC_E_CHANGED_MODE was returned.
+ */
+ hr = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
+ if (FAILED(hr) && (hr != RPC_E_CHANGED_MODE))
+ {
+ PRINT(("WASAPI: failed ProcThreadPoll CoInitialize"));
+ return paUnanticipatedHostError;
+ }
+ if (hr != RPC_E_CHANGED_MODE)
+ bThreadComInitialized = TRUE;
+
+ // Unmarshal stream pointers for safe COM operation
+ hr = UnmarshalStreamComPointers(stream);
+ if (hr != S_OK)
+ {
+ PRINT(("Error unmarshaling stream COM pointers. HRESULT: %i\n", hr));
+ return 0;
+ }
+
+ // Calculate timeout for next polling attempt.
+ sleep_ms_in = GetFramesSleepTime(stream->in.framesPerHostCallback/WASAPI_PACKETS_PER_INPUT_BUFFER, stream->in.wavex.Format.nSamplesPerSec);
+ sleep_ms_out = GetFramesSleepTime(stream->out.framesPerBuffer, stream->out.wavex.Format.nSamplesPerSec);
+
+ // WASAPI Input packets tend to expire very easily, let's limit sleep time to 2 milliseconds
+ // for all cases. Please propose better solution if any.
+ if (sleep_ms_in > 2)
+ sleep_ms_in = 2;
+
+ // Adjust polling time for non-paUtilFixedHostBufferSize. Input stream is not adjustable as it is being
+ // polled according its packet length.
+ if (stream->bufferMode != paUtilFixedHostBufferSize)
+ {
+ //sleep_ms_in = GetFramesSleepTime(stream->bufferProcessor.framesPerUserBuffer, stream->in.wavex.Format.nSamplesPerSec);
+ sleep_ms_out = GetFramesSleepTime(stream->bufferProcessor.framesPerUserBuffer, stream->out.wavex.Format.nSamplesPerSec);
+ }
+
+ // Choose smallest
+ if ((sleep_ms_in != 0) && (sleep_ms_out != 0))
+ sleep_ms = min(sleep_ms_in, sleep_ms_out);
+ else
+ {
+ sleep_ms = (sleep_ms_in ? sleep_ms_in : sleep_ms_out);
+ }
+ // Make sure not 0, othervise use ThreadIdleScheduler
+ if (sleep_ms == 0)
+ {
+ sleep_ms_in = GetFramesSleepTimeMicroseconds(stream->in.framesPerHostCallback/WASAPI_PACKETS_PER_INPUT_BUFFER, stream->in.wavex.Format.nSamplesPerSec);
+ sleep_ms_out = GetFramesSleepTimeMicroseconds(stream->bufferProcessor.framesPerUserBuffer, stream->out.wavex.Format.nSamplesPerSec);
+
+ // Choose smallest
+ if ((sleep_ms_in != 0) && (sleep_ms_out != 0))
+ sleep_ms = min(sleep_ms_in, sleep_ms_out);
+ else
+ {
+ sleep_ms = (sleep_ms_in ? sleep_ms_in : sleep_ms_out);
+ }
+
+ // Setup thread sleep scheduler
+ ThreadIdleScheduler_Setup(&scheduler, 1, sleep_ms/* microseconds here */);
+ sleep_ms = 0;
+ }
+
+ // Setup data processors
+ defaultProcessor.processor = WaspiHostProcessingLoop;
+ defaultProcessor.userData = stream;
+ processor[S_INPUT] = (stream->hostProcessOverrideInput.processor != NULL ? stream->hostProcessOverrideInput : defaultProcessor);
+ processor[S_OUTPUT] = (stream->hostProcessOverrideOutput.processor != NULL ? stream->hostProcessOverrideOutput : defaultProcessor);
+
+ // Boost thread priority
+ PaWasapi_ThreadPriorityBoost((void **)&stream->hAvTask, stream->nThreadPriority);
+
+ // Initialize event & start INPUT stream
+ if (stream->in.clientProc)
+ {
+ if ((hr = IAudioClient_Start(stream->in.clientProc)) != S_OK)
+ {
+ LogHostError(hr);
+ goto thread_error;
+ }
+ }
+
+ // Initialize event & start OUTPUT stream
+ if (stream->out.clientProc)
+ {
+ // Preload buffer (obligatory, othervise ->Start() will fail), avoid processing
+ // when in full-duplex mode as it requires input processing as well
+ if (!PA_WASAPI__IS_FULLDUPLEX(stream))
+ {
+ UINT32 frames = 0;
+ if ((hr = _PollGetOutputFramesAvailable(stream, &frames)) == S_OK)
+ {
+ if (stream->bufferMode == paUtilFixedHostBufferSize)
+ {
+ if (frames >= stream->out.framesPerBuffer)
+ {
+ frames = stream->out.framesPerBuffer;
+
+ if ((hr = ProcessOutputBuffer(stream, processor, frames)) != S_OK)
+ {
+ LogHostError(hr); // not fatal, just log
+ }
+ }
+ }
+ else
+ {
+ if (frames != 0)
+ {
+ if ((hr = ProcessOutputBuffer(stream, processor, frames)) != S_OK)
+ {
+ LogHostError(hr); // not fatal, just log
+ }
+ }
+ }
+ }
+ else
+ {
+ LogHostError(hr); // not fatal, just log
+ }
+ }
+
+ // Start
+ if ((hr = IAudioClient_Start(stream->out.clientProc)) != S_OK)
+ {
+ LogHostError(hr);
+ goto thread_error;
+ }
+ }
+
+ // Signal: stream running
+ stream->running = TRUE;
+
+ // Notify: thread started
+ SetEvent(stream->hThreadStart);
+
+ if (!PA_WASAPI__IS_FULLDUPLEX(stream))
+ {
+ // Processing Loop
+ UINT32 next_sleep = sleep_ms;
+ while (WaitForSingleObject(stream->hCloseRequest, next_sleep) == WAIT_TIMEOUT)
+ {
+ // Get next sleep time
+ if (sleep_ms == 0)
+ {
+ next_sleep = ThreadIdleScheduler_NextSleep(&scheduler);
+ }
+
+ for (i = 0; i < S_COUNT; ++i)
+ {
+ // Process S_INPUT/S_OUTPUT
+ switch (i)
+ {
+ // Input stream
+ case S_INPUT: {
+
+ if (stream->captureClient == NULL)
+ break;
+
+ if ((hr = ProcessInputBuffer(stream, processor)) != S_OK)
+ {
+ LogHostError(hr);
+ goto thread_error;
+ }
+
+ break; }
+
+ // Output stream
+ case S_OUTPUT: {
+
+ UINT32 frames;
+ if (stream->renderClient == NULL)
+ break;
+
+ // get available frames
+ if ((hr = _PollGetOutputFramesAvailable(stream, &frames)) != S_OK)
+ {
+ LogHostError(hr);
+ goto thread_error;
+ }
+
+ // output
+ if (stream->bufferMode == paUtilFixedHostBufferSize)
+ {
+ while (frames >= stream->out.framesPerBuffer)
+ {
+ if ((hr = ProcessOutputBuffer(stream, processor, stream->out.framesPerBuffer)) != S_OK)
+ {
+ LogHostError(hr);
+ goto thread_error;
+ }
+
+ frames -= stream->out.framesPerBuffer;
+ }
+ }
+ else
+ {
+ if (frames != 0)
+ {
+ if ((hr = ProcessOutputBuffer(stream, processor, frames)) != S_OK)
+ {
+ LogHostError(hr);
+ goto thread_error;
+ }
+ }
+ }
+
+ break; }
+ }
+ }
+ }
+ }
+ else
+ {
+#if 0
+ // Processing Loop
+ while (WaitForSingleObject(stream->hCloseRequest, 1) == WAIT_TIMEOUT)
+ {
+ UINT32 i_frames = 0, i_processed = 0;
+ BYTE *i_data = NULL, *o_data = NULL, *o_data_host = NULL;
+ DWORD i_flags = 0;
+ UINT32 o_frames = 0;
+
+ // get host input buffer
+ if ((hr = IAudioCaptureClient_GetBuffer(stream->captureClient, &i_data, &i_frames, &i_flags, NULL, NULL)) != S_OK)
+ {
+ if (hr == AUDCLNT_S_BUFFER_EMPTY)
+ continue; // no data in capture buffer
+
+ LogHostError(hr);
+ break;
+ }
+
+ // get available frames
+ if ((hr = _PollGetOutputFramesAvailable(stream, &o_frames)) != S_OK)
+ {
+ // release input buffer
+ IAudioCaptureClient_ReleaseBuffer(stream->captureClient, 0);
+
+ LogHostError(hr);
+ break;
+ }
+
+ // process equal ammount of frames
+ if (o_frames >= i_frames)
+ {
+ // process input ammount of frames
+ UINT32 o_processed = i_frames;
+
+ // get host output buffer
+ if ((hr = IAudioRenderClient_GetBuffer(stream->procRCClient, o_processed, &o_data)) == S_OK)
+ {
+ // processed amount of i_frames
+ i_processed = i_frames;
+ o_data_host = o_data;
+
+ // convert output mono
+ if (stream->out.monoMixer)
+ {
+ UINT32 mono_frames_size = o_processed * (stream->out.wavex.Format.wBitsPerSample / 8);
+ // expand buffer
+ if (mono_frames_size > stream->out.monoBufferSize)
+ {
+ stream->out.monoBuffer = PaWasapi_ReallocateMemory(stream->out.monoBuffer, (stream->out.monoBufferSize = mono_frames_size));
+ if (stream->out.monoBuffer == NULL)
+ {
+ // release input buffer
+ IAudioCaptureClient_ReleaseBuffer(stream->captureClient, 0);
+ // release output buffer
+ IAudioRenderClient_ReleaseBuffer(stream->renderClient, 0, 0);
+
+ LogPaError(paInsufficientMemory);
+ break;
+ }
+ }
+
+ // replace buffer pointer
+ o_data = (BYTE *)stream->out.monoBuffer;
+ }
+
+ // convert input mono
+ if (stream->in.monoMixer)
+ {
+ UINT32 mono_frames_size = i_processed * (stream->in.wavex.Format.wBitsPerSample / 8);
+ // expand buffer
+ if (mono_frames_size > stream->in.monoBufferSize)
+ {
+ stream->in.monoBuffer = PaWasapi_ReallocateMemory(stream->in.monoBuffer, (stream->in.monoBufferSize = mono_frames_size));
+ if (stream->in.monoBuffer == NULL)
+ {
+ // release input buffer
+ IAudioCaptureClient_ReleaseBuffer(stream->captureClient, 0);
+ // release output buffer
+ IAudioRenderClient_ReleaseBuffer(stream->renderClient, 0, 0);
+
+ LogPaError(paInsufficientMemory);
+ break;
+ }
+ }
+
+ // mix 2 to 1 input channels
+ stream->in.monoMixer(stream->in.monoBuffer, i_data, i_processed);
+
+ // replace buffer pointer
+ i_data = (BYTE *)stream->in.monoBuffer;
+ }
+
+ // process
+ processor[S_FULLDUPLEX].processor(i_data, i_processed, o_data, o_processed, processor[S_FULLDUPLEX].userData);
+
+ // mix 1 to 2 output channels
+ if (stream->out.monoBuffer)
+ stream->out.monoMixer(o_data_host, stream->out.monoBuffer, o_processed);
+
+ // release host output buffer
+ if ((hr = IAudioRenderClient_ReleaseBuffer(stream->renderClient, o_processed, 0)) != S_OK)
+ LogHostError(hr);
+ }
+ else
+ {
+ if (stream->out.shareMode != AUDCLNT_SHAREMODE_SHARED)
+ LogHostError(hr); // be silent in shared mode, try again next time
+ }
+ }
+
+ // release host input buffer
+ if ((hr = IAudioCaptureClient_ReleaseBuffer(stream->captureClient, i_processed)) != S_OK)
+ {
+ LogHostError(hr);
+ break;
+ }
+ }
+#else
+ // Processing Loop
+ UINT32 next_sleep = sleep_ms;
+ while (WaitForSingleObject(stream->hCloseRequest, next_sleep) == WAIT_TIMEOUT)
+ {
+ UINT32 i_frames = 0, i_processed = 0;
+ BYTE *i_data = NULL, *o_data = NULL, *o_data_host = NULL;
+ DWORD i_flags = 0;
+ UINT32 o_frames = 0;
+
+ // Get next sleep time
+ if (sleep_ms == 0)
+ {
+ next_sleep = ThreadIdleScheduler_NextSleep(&scheduler);
+ }
+
+ // get available frames
+ if ((hr = _PollGetOutputFramesAvailable(stream, &o_frames)) != S_OK)
+ {
+ LogHostError(hr);
+ break;
+ }
+
+ while (o_frames != 0)
+ {
+ // get host input buffer
+ if ((hr = IAudioCaptureClient_GetBuffer(stream->captureClient, &i_data, &i_frames, &i_flags, NULL, NULL)) != S_OK)
+ {
+ if (hr == AUDCLNT_S_BUFFER_EMPTY)
+ break; // no data in capture buffer
+
+ LogHostError(hr);
+ break;
+ }
+
+ // process equal ammount of frames
+ if (o_frames >= i_frames)
+ {
+ // process input ammount of frames
+ UINT32 o_processed = i_frames;
+
+ // get host output buffer
+ if ((hr = IAudioRenderClient_GetBuffer(stream->renderClient, o_processed, &o_data)) == S_OK)
+ {
+ // processed amount of i_frames
+ i_processed = i_frames;
+ o_data_host = o_data;
+
+ // convert output mono
+ if (stream->out.monoMixer)
+ {
+ UINT32 mono_frames_size = o_processed * (stream->out.wavex.Format.wBitsPerSample / 8);
+ // expand buffer
+ if (mono_frames_size > stream->out.monoBufferSize)
+ {
+ stream->out.monoBuffer = PaWasapi_ReallocateMemory(stream->out.monoBuffer, (stream->out.monoBufferSize = mono_frames_size));
+ if (stream->out.monoBuffer == NULL)
+ {
+ // release input buffer
+ IAudioCaptureClient_ReleaseBuffer(stream->captureClient, 0);
+ // release output buffer
+ IAudioRenderClient_ReleaseBuffer(stream->renderClient, 0, 0);
+
+ LogPaError(paInsufficientMemory);
+ goto thread_error;
+ }
+ }
+
+ // replace buffer pointer
+ o_data = (BYTE *)stream->out.monoBuffer;
+ }
+
+ // convert input mono
+ if (stream->in.monoMixer)
+ {
+ UINT32 mono_frames_size = i_processed * (stream->in.wavex.Format.wBitsPerSample / 8);
+ // expand buffer
+ if (mono_frames_size > stream->in.monoBufferSize)
+ {
+ stream->in.monoBuffer = PaWasapi_ReallocateMemory(stream->in.monoBuffer, (stream->in.monoBufferSize = mono_frames_size));
+ if (stream->in.monoBuffer == NULL)
+ {
+ // release input buffer
+ IAudioCaptureClient_ReleaseBuffer(stream->captureClient, 0);
+ // release output buffer
+ IAudioRenderClient_ReleaseBuffer(stream->renderClient, 0, 0);
+
+ LogPaError(paInsufficientMemory);
+ goto thread_error;
+ }
+ }
+
+ // mix 2 to 1 input channels
+ stream->in.monoMixer(stream->in.monoBuffer, i_data, i_processed);
+
+ // replace buffer pointer
+ i_data = (BYTE *)stream->in.monoBuffer;
+ }
+
+ // process
+ processor[S_FULLDUPLEX].processor(i_data, i_processed, o_data, o_processed, processor[S_FULLDUPLEX].userData);
+
+ // mix 1 to 2 output channels
+ if (stream->out.monoBuffer)
+ stream->out.monoMixer(o_data_host, stream->out.monoBuffer, o_processed);
+
+ // release host output buffer
+ if ((hr = IAudioRenderClient_ReleaseBuffer(stream->renderClient, o_processed, 0)) != S_OK)
+ LogHostError(hr);
+
+ o_frames -= o_processed;
+ }
+ else
+ {
+ if (stream->out.shareMode != AUDCLNT_SHAREMODE_SHARED)
+ LogHostError(hr); // be silent in shared mode, try again next time
+ }
+ }
+ else
+ {
+ i_processed = 0;
+ goto fd_release_buffer_in;
+ }
+
+fd_release_buffer_in:
+
+ // release host input buffer
+ if ((hr = IAudioCaptureClient_ReleaseBuffer(stream->captureClient, i_processed)) != S_OK)
+ {
+ LogHostError(hr);
+ break;
+ }
+
+ // break processing, input hasn't been accumulated yet
+ if (i_processed == 0)
+ break;
+ }
+ }
+#endif
+ }
+
+thread_end:
+
+ // Process stop
+ _StreamOnStop(stream);
+
+ // Release unmarshaled COM pointers
+ ReleaseUnmarshaledComPointers(stream);
+
+ // Cleanup COM for this thread
+ if (bThreadComInitialized == TRUE)
+ CoUninitialize();
+
+ // Notify: not running
+ stream->running = FALSE;
+
+ // Notify: thread exited
+ SetEvent(stream->hThreadExit);
+
+ return 0;
+
+thread_error:
+
+ // Prevent deadlocking in Pa_StreamStart
+ SetEvent(stream->hThreadStart);
+
+ // Exit
+ goto thread_end;
+}
+
+// ------------------------------------------------------------------------------------------
+void *PaWasapi_ReallocateMemory(void *ptr, size_t size)
+{
+ return realloc(ptr, size);
+}
+
+// ------------------------------------------------------------------------------------------
+void PaWasapi_FreeMemory(void *ptr)
+{
+ free(ptr);
+}
+
+//#endif //VC 2005
+
+
+
+
+#if 0
+ if(bFirst) {
+ float masteur;
+ hr = stream->outVol->GetMasterVolumeLevelScalar(&masteur);
+ if (hr != S_OK)
+ LogHostError(hr);
+ float chan1, chan2;
+ hr = stream->outVol->GetChannelVolumeLevelScalar(0, &chan1);
+ if (hr != S_OK)
+ LogHostError(hr);
+ hr = stream->outVol->GetChannelVolumeLevelScalar(1, &chan2);
+ if (hr != S_OK)
+ LogHostError(hr);
+
+ BOOL bMute;
+ hr = stream->outVol->GetMute(&bMute);
+ if (hr != S_OK)
+ LogHostError(hr);
+
+ stream->outVol->SetMasterVolumeLevelScalar(0.5, NULL);
+ stream->outVol->SetChannelVolumeLevelScalar(0, 0.5, NULL);
+ stream->outVol->SetChannelVolumeLevelScalar(1, 0.5, NULL);
+ stream->outVol->SetMute(FALSE, NULL);
+ bFirst = FALSE;
+ }
+#endif
-/*\r
- * Microsoft COM initialization routines\r
- * Copyright (c) 1999-2011 Ross Bencina, Dmitry Kostjuchenko\r
- *\r
- * Based on the Open Source API proposed by Ross Bencina\r
- * Copyright (c) 1999-2011 Ross Bencina, Phil Burk\r
- *\r
- * Permission is hereby granted, free of charge, to any person obtaining\r
- * a copy of this software and associated documentation files\r
- * (the "Software"), to deal in the Software without restriction,\r
- * including without limitation the rights to use, copy, modify, merge,\r
- * publish, distribute, sublicense, and/or sell copies of the Software,\r
- * and to permit persons to whom the Software is furnished to do so,\r
- * subject to the following conditions:\r
- *\r
- * The above copyright notice and this permission notice shall be\r
- * included in all copies or substantial portions of the Software.\r
- *\r
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\r
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\r
- * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\r
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\r
- * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
- */\r
-\r
-/*\r
- * The text above constitutes the entire PortAudio license; however,\r
- * the PortAudio community also makes the following non-binding requests:\r
- *\r
- * Any person wishing to distribute modifications to the Software is\r
- * requested to send the modifications to the original developer so that\r
- * they can be incorporated into the canonical version. It is also\r
- * requested that these non-binding requests be included along with the\r
- * license above.\r
- */\r
-\r
-/** @file\r
- @ingroup win_src\r
-\r
- @brief Microsoft COM initialization routines.\r
-*/\r
-\r
-#include <windows.h>\r
-#include <objbase.h>\r
-\r
-#include "portaudio.h"\r
-#include "pa_util.h"\r
-#include "pa_debugprint.h"\r
-\r
-#include "pa_win_coinitialize.h"\r
-\r
-\r
-#if (defined(WIN32) && (defined(_MSC_VER) && (_MSC_VER >= 1200))) && !defined(_WIN32_WCE) /* MSC version 6 and above */\r
-#pragma comment( lib, "ole32.lib" )\r
-#endif\r
-\r
-\r
-/* use some special bit patterns here to try to guard against uninitialized memory errors */\r
-#define PAWINUTIL_COM_INITIALIZED (0xb38f)\r
-#define PAWINUTIL_COM_NOT_INITIALIZED (0xf1cd)\r
-\r
-\r
-PaError PaWinUtil_CoInitialize( PaHostApiTypeId hostApiType, PaWinUtilComInitializationResult *comInitializationResult )\r
-{\r
- HRESULT hr;\r
-\r
- comInitializationResult->state = PAWINUTIL_COM_NOT_INITIALIZED;\r
-\r
- /*\r
- If COM is already initialized CoInitialize will either return\r
- FALSE, or RPC_E_CHANGED_MODE if it was initialised in a different\r
- threading mode. In either case we shouldn't consider it an error\r
- but we need to be careful to not call CoUninitialize() if \r
- RPC_E_CHANGED_MODE was returned.\r
- */\r
-\r
- hr = CoInitialize(0); /* use legacy-safe equivalent to CoInitializeEx(NULL, COINIT_APARTMENTTHREADED) */\r
- if( FAILED(hr) && hr != RPC_E_CHANGED_MODE )\r
- {\r
- PA_DEBUG(("CoInitialize(0) failed. hr=%d\n", hr));\r
-\r
- if( hr == E_OUTOFMEMORY )\r
- return paInsufficientMemory;\r
-\r
- {\r
- char *lpMsgBuf;\r
- FormatMessage(\r
- FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,\r
- NULL,\r
- hr,\r
- MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),\r
- (LPTSTR) &lpMsgBuf,\r
- 0,\r
- NULL\r
- );\r
- PaUtil_SetLastHostErrorInfo( hostApiType, hr, lpMsgBuf );\r
- LocalFree( lpMsgBuf );\r
- }\r
-\r
- return paUnanticipatedHostError;\r
- }\r
-\r
- if( hr != RPC_E_CHANGED_MODE )\r
- {\r
- comInitializationResult->state = PAWINUTIL_COM_INITIALIZED;\r
-\r
- /*\r
- Memorize calling thread id and report warning on Uninitialize if \r
- calling thread is different as CoInitialize must match CoUninitialize \r
- in the same thread.\r
- */\r
- comInitializationResult->initializingThreadId = GetCurrentThreadId();\r
- }\r
-\r
- return paNoError;\r
-}\r
-\r
-\r
-void PaWinUtil_CoUninitialize( PaHostApiTypeId hostApiType, PaWinUtilComInitializationResult *comInitializationResult )\r
-{\r
- if( comInitializationResult->state != PAWINUTIL_COM_NOT_INITIALIZED\r
- && comInitializationResult->state != PAWINUTIL_COM_INITIALIZED ){\r
- \r
- PA_DEBUG(("ERROR: PaWinUtil_CoUninitialize called without calling PaWinUtil_CoInitialize\n"));\r
- }\r
-\r
- if( comInitializationResult->state == PAWINUTIL_COM_INITIALIZED )\r
- {\r
- DWORD currentThreadId = GetCurrentThreadId();\r
- if( comInitializationResult->initializingThreadId != currentThreadId )\r
- {\r
- PA_DEBUG(("ERROR: failed PaWinUtil_CoUninitialize calling thread[%d] does not match initializing thread[%d]\n",\r
- currentThreadId, comInitializationResult->initializingThreadId));\r
- }\r
- else\r
- {\r
- CoUninitialize();\r
-\r
- comInitializationResult->state = PAWINUTIL_COM_NOT_INITIALIZED;\r
- }\r
- }\r
+/*
+ * Microsoft COM initialization routines
+ * Copyright (c) 1999-2011 Ross Bencina, Dmitry Kostjuchenko
+ *
+ * Based on the Open Source API proposed by Ross Bencina
+ * Copyright (c) 1999-2011 Ross Bencina, Phil Burk
+ *
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * The text above constitutes the entire PortAudio license; however,
+ * the PortAudio community also makes the following non-binding requests:
+ *
+ * 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. It is also
+ * requested that these non-binding requests be included along with the
+ * license above.
+ */
+
+/** @file
+ @ingroup win_src
+
+ @brief Microsoft COM initialization routines.
+*/
+
+#include <windows.h>
+#include <objbase.h>
+
+#include "portaudio.h"
+#include "pa_util.h"
+#include "pa_debugprint.h"
+
+#include "pa_win_coinitialize.h"
+
+
+#if (defined(WIN32) && (defined(_MSC_VER) && (_MSC_VER >= 1200))) && !defined(_WIN32_WCE) /* MSC version 6 and above */
+#pragma comment( lib, "ole32.lib" )
+#endif
+
+
+/* use some special bit patterns here to try to guard against uninitialized memory errors */
+#define PAWINUTIL_COM_INITIALIZED (0xb38f)
+#define PAWINUTIL_COM_NOT_INITIALIZED (0xf1cd)
+
+
+PaError PaWinUtil_CoInitialize( PaHostApiTypeId hostApiType, PaWinUtilComInitializationResult *comInitializationResult )
+{
+ HRESULT hr;
+
+ comInitializationResult->state = PAWINUTIL_COM_NOT_INITIALIZED;
+
+ /*
+ If COM is already initialized CoInitialize will either return
+ FALSE, or RPC_E_CHANGED_MODE if it was initialised in a different
+ threading mode. In either case we shouldn't consider it an error
+ but we need to be careful to not call CoUninitialize() if
+ RPC_E_CHANGED_MODE was returned.
+ */
+
+ hr = CoInitialize(0); /* use legacy-safe equivalent to CoInitializeEx(NULL, COINIT_APARTMENTTHREADED) */
+ if( FAILED(hr) && hr != RPC_E_CHANGED_MODE )
+ {
+ PA_DEBUG(("CoInitialize(0) failed. hr=%d\n", hr));
+
+ if( hr == E_OUTOFMEMORY )
+ return paInsufficientMemory;
+
+ {
+ char *lpMsgBuf;
+ FormatMessage(
+ FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
+ NULL,
+ hr,
+ MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
+ (LPTSTR) &lpMsgBuf,
+ 0,
+ NULL
+ );
+ PaUtil_SetLastHostErrorInfo( hostApiType, hr, lpMsgBuf );
+ LocalFree( lpMsgBuf );
+ }
+
+ return paUnanticipatedHostError;
+ }
+
+ if( hr != RPC_E_CHANGED_MODE )
+ {
+ comInitializationResult->state = PAWINUTIL_COM_INITIALIZED;
+
+ /*
+ Memorize calling thread id and report warning on Uninitialize if
+ calling thread is different as CoInitialize must match CoUninitialize
+ in the same thread.
+ */
+ comInitializationResult->initializingThreadId = GetCurrentThreadId();
+ }
+
+ return paNoError;
+}
+
+
+void PaWinUtil_CoUninitialize( PaHostApiTypeId hostApiType, PaWinUtilComInitializationResult *comInitializationResult )
+{
+ if( comInitializationResult->state != PAWINUTIL_COM_NOT_INITIALIZED
+ && comInitializationResult->state != PAWINUTIL_COM_INITIALIZED ){
+
+ PA_DEBUG(("ERROR: PaWinUtil_CoUninitialize called without calling PaWinUtil_CoInitialize\n"));
+ }
+
+ if( comInitializationResult->state == PAWINUTIL_COM_INITIALIZED )
+ {
+ DWORD currentThreadId = GetCurrentThreadId();
+ if( comInitializationResult->initializingThreadId != currentThreadId )
+ {
+ PA_DEBUG(("ERROR: failed PaWinUtil_CoUninitialize calling thread[%d] does not match initializing thread[%d]\n",
+ currentThreadId, comInitializationResult->initializingThreadId));
+ }
+ else
+ {
+ CoUninitialize();
+
+ comInitializationResult->state = PAWINUTIL_COM_NOT_INITIALIZED;
+ }
+ }
}
\ No newline at end of file
-/*\r
- * Microsoft COM initialization routines\r
- * Copyright (c) 1999-2011 Ross Bencina, Phil Burk\r
- *\r
- * Permission is hereby granted, free of charge, to any person obtaining\r
- * a copy of this software and associated documentation files\r
- * (the "Software"), to deal in the Software without restriction,\r
- * including without limitation the rights to use, copy, modify, merge,\r
- * publish, distribute, sublicense, and/or sell copies of the Software,\r
- * and to permit persons to whom the Software is furnished to do so,\r
- * subject to the following conditions:\r
- *\r
- * The above copyright notice and this permission notice shall be\r
- * included in all copies or substantial portions of the Software.\r
- *\r
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\r
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\r
- * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\r
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\r
- * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
- */\r
-\r
-/*\r
- * The text above constitutes the entire PortAudio license; however, \r
- * the PortAudio community also makes the following non-binding requests:\r
- *\r
- * Any person wishing to distribute modifications to the Software is\r
- * requested to send the modifications to the original developer so that\r
- * they can be incorporated into the canonical version. It is also \r
- * requested that these non-binding requests be included along with the \r
- * license above.\r
- */\r
-\r
-/** @file\r
- @ingroup win_src\r
-\r
- @brief Microsoft COM initialization routines.\r
-*/\r
-\r
-#ifndef PA_WIN_COINITIALIZE_H\r
-#define PA_WIN_COINITIALIZE_H\r
-\r
-#ifdef __cplusplus\r
-extern "C"\r
-{\r
-#endif /* __cplusplus */\r
-\r
-\r
-/**\r
- @brief Data type used to hold the result of an attempt to initialize COM\r
- using PaWinUtil_CoInitialize. Must be retained between a call to \r
- PaWinUtil_CoInitialize and a matching call to PaWinUtil_CoUninitialize.\r
-*/\r
-typedef struct PaWinUtilComInitializationResult{\r
- int state;\r
- int initializingThreadId;\r
-} PaWinUtilComInitializationResult;\r
-\r
-\r
-/**\r
- @brief Initialize Microsoft COM subsystem on the current thread.\r
-\r
- @param hostApiType the host API type id of the caller. Used for error reporting.\r
-\r
- @param comInitializationResult An output parameter. The value pointed to by \r
- this parameter stores information required by PaWinUtil_CoUninitialize \r
- to correctly uninitialize COM. The value should be retained and later \r
- passed to PaWinUtil_CoUninitialize.\r
-\r
- If PaWinUtil_CoInitialize returns paNoError, the caller must later call\r
- PaWinUtil_CoUninitialize once.\r
-*/\r
-PaError PaWinUtil_CoInitialize( PaHostApiTypeId hostApiType, PaWinUtilComInitializationResult *comInitializationResult );\r
-\r
-\r
-/**\r
- @brief Uninitialize the Microsoft COM subsystem on the current thread using \r
- the result of a previous call to PaWinUtil_CoInitialize. Must be called on the same\r
- thread as PaWinUtil_CoInitialize.\r
-\r
- @param hostApiType the host API type id of the caller. Used for error reporting.\r
-\r
- @param comInitializationResult An input parameter. A pointer to a value previously\r
- initialized by a call to PaWinUtil_CoInitialize.\r
-*/\r
-void PaWinUtil_CoUninitialize( PaHostApiTypeId hostApiType, PaWinUtilComInitializationResult *comInitializationResult );\r
-\r
-\r
-#ifdef __cplusplus\r
-}\r
-#endif /* __cplusplus */\r
-#endif /* PA_WIN_COINITIALIZE_H */\r
+/*
+ * Microsoft COM initialization routines
+ * Copyright (c) 1999-2011 Ross Bencina, Phil Burk
+ *
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * The text above constitutes the entire PortAudio license; however,
+ * the PortAudio community also makes the following non-binding requests:
+ *
+ * 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. It is also
+ * requested that these non-binding requests be included along with the
+ * license above.
+ */
+
+/** @file
+ @ingroup win_src
+
+ @brief Microsoft COM initialization routines.
+*/
+
+#ifndef PA_WIN_COINITIALIZE_H
+#define PA_WIN_COINITIALIZE_H
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+
+/**
+ @brief Data type used to hold the result of an attempt to initialize COM
+ using PaWinUtil_CoInitialize. Must be retained between a call to
+ PaWinUtil_CoInitialize and a matching call to PaWinUtil_CoUninitialize.
+*/
+typedef struct PaWinUtilComInitializationResult{
+ int state;
+ int initializingThreadId;
+} PaWinUtilComInitializationResult;
+
+
+/**
+ @brief Initialize Microsoft COM subsystem on the current thread.
+
+ @param hostApiType the host API type id of the caller. Used for error reporting.
+
+ @param comInitializationResult An output parameter. The value pointed to by
+ this parameter stores information required by PaWinUtil_CoUninitialize
+ to correctly uninitialize COM. The value should be retained and later
+ passed to PaWinUtil_CoUninitialize.
+
+ If PaWinUtil_CoInitialize returns paNoError, the caller must later call
+ PaWinUtil_CoUninitialize once.
+*/
+PaError PaWinUtil_CoInitialize( PaHostApiTypeId hostApiType, PaWinUtilComInitializationResult *comInitializationResult );
+
+
+/**
+ @brief Uninitialize the Microsoft COM subsystem on the current thread using
+ the result of a previous call to PaWinUtil_CoInitialize. Must be called on the same
+ thread as PaWinUtil_CoInitialize.
+
+ @param hostApiType the host API type id of the caller. Used for error reporting.
+
+ @param comInitializationResult An input parameter. A pointer to a value previously
+ initialized by a call to PaWinUtil_CoInitialize.
+*/
+void PaWinUtil_CoUninitialize( PaHostApiTypeId hostApiType, PaWinUtilComInitializationResult *comInitializationResult );
+
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+#endif /* PA_WIN_COINITIALIZE_H */
-/*\r
- * PortAudio Portable Real-Time Audio Library\r
- * Windows WAVEFORMAT* data structure utilities\r
- * portaudio.h should be included before this file.\r
- *\r
- * Copyright (c) 2007 Ross Bencina\r
- *\r
- * Permission is hereby granted, free of charge, to any person obtaining\r
- * a copy of this software and associated documentation files\r
- * (the "Software"), to deal in the Software without restriction,\r
- * including without limitation the rights to use, copy, modify, merge,\r
- * publish, distribute, sublicense, and/or sell copies of the Software,\r
- * and to permit persons to whom the Software is furnished to do so,\r
- * subject to the following conditions:\r
- *\r
- * The above copyright notice and this permission notice shall be\r
- * included in all copies or substantial portions of the Software.\r
- *\r
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\r
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\r
- * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\r
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\r
- * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
- */\r
-\r
-/*\r
- * The text above constitutes the entire PortAudio license; however, \r
- * the PortAudio community also makes the following non-binding requests:\r
- *\r
- * Any person wishing to distribute modifications to the Software is\r
- * requested to send the modifications to the original developer so that\r
- * they can be incorporated into the canonical version. It is also \r
- * requested that these non-binding requests be included along with the \r
- * license above.\r
- */\r
-\r
-#include <windows.h>\r
-#include <mmsystem.h>\r
-\r
-#include "portaudio.h"\r
-#include "pa_win_waveformat.h"\r
-\r
-\r
-#if !defined(WAVE_FORMAT_EXTENSIBLE)\r
-#define WAVE_FORMAT_EXTENSIBLE 0xFFFE\r
-#endif\r
-\r
-static GUID pawin_ksDataFormatSubtypeGuidBase = \r
- { (USHORT)(WAVE_FORMAT_PCM), 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71 };\r
-\r
-\r
-int PaWin_SampleFormatToLinearWaveFormatTag( PaSampleFormat sampleFormat )\r
-{\r
- if( sampleFormat == paFloat32 )\r
- return PAWIN_WAVE_FORMAT_IEEE_FLOAT;\r
- \r
- return PAWIN_WAVE_FORMAT_PCM;\r
-}\r
-\r
-\r
-void PaWin_InitializeWaveFormatEx( PaWinWaveFormat *waveFormat, \r
- int numChannels, PaSampleFormat sampleFormat, int waveFormatTag, double sampleRate )\r
-{\r
- WAVEFORMATEX *waveFormatEx = (WAVEFORMATEX*)waveFormat;\r
- int bytesPerSample = Pa_GetSampleSize(sampleFormat);\r
- unsigned long bytesPerFrame = numChannels * bytesPerSample;\r
- \r
- waveFormatEx->wFormatTag = waveFormatTag;\r
- waveFormatEx->nChannels = (WORD)numChannels;\r
- waveFormatEx->nSamplesPerSec = (DWORD)sampleRate;\r
- waveFormatEx->nAvgBytesPerSec = waveFormatEx->nSamplesPerSec * bytesPerFrame;\r
- waveFormatEx->nBlockAlign = (WORD)bytesPerFrame;\r
- waveFormatEx->wBitsPerSample = bytesPerSample * 8;\r
- waveFormatEx->cbSize = 0;\r
-}\r
-\r
-\r
-void PaWin_InitializeWaveFormatExtensible( PaWinWaveFormat *waveFormat, \r
- int numChannels, PaSampleFormat sampleFormat, int waveFormatTag, double sampleRate,\r
- PaWinWaveFormatChannelMask channelMask )\r
-{\r
- WAVEFORMATEX *waveFormatEx = (WAVEFORMATEX*)waveFormat;\r
- int bytesPerSample = Pa_GetSampleSize(sampleFormat);\r
- unsigned long bytesPerFrame = numChannels * bytesPerSample;\r
- GUID guid;\r
-\r
- waveFormatEx->wFormatTag = WAVE_FORMAT_EXTENSIBLE;\r
- waveFormatEx->nChannels = (WORD)numChannels;\r
- waveFormatEx->nSamplesPerSec = (DWORD)sampleRate;\r
- waveFormatEx->nAvgBytesPerSec = waveFormatEx->nSamplesPerSec * bytesPerFrame;\r
- waveFormatEx->nBlockAlign = (WORD)bytesPerFrame;\r
- waveFormatEx->wBitsPerSample = bytesPerSample * 8;\r
- waveFormatEx->cbSize = 22;\r
-\r
- *((WORD*)&waveFormat->fields[PAWIN_INDEXOF_WVALIDBITSPERSAMPLE]) =\r
- waveFormatEx->wBitsPerSample;\r
-\r
- *((DWORD*)&waveFormat->fields[PAWIN_INDEXOF_DWCHANNELMASK]) = channelMask;\r
- \r
- guid = pawin_ksDataFormatSubtypeGuidBase;\r
- guid.Data1 = (USHORT)waveFormatTag;\r
- *((GUID*)&waveFormat->fields[PAWIN_INDEXOF_SUBFORMAT]) = guid;\r
-}\r
-\r
-PaWinWaveFormatChannelMask PaWin_DefaultChannelMask( int numChannels )\r
-{\r
- switch( numChannels ){\r
- case 1:\r
- return PAWIN_SPEAKER_MONO;\r
- case 2:\r
- return PAWIN_SPEAKER_STEREO; \r
- case 3:\r
- return PAWIN_SPEAKER_FRONT_LEFT | PAWIN_SPEAKER_FRONT_CENTER | PAWIN_SPEAKER_FRONT_RIGHT;\r
- case 4:\r
- return PAWIN_SPEAKER_QUAD;\r
- case 5:\r
- return PAWIN_SPEAKER_QUAD | PAWIN_SPEAKER_FRONT_CENTER;\r
- case 6:\r
- /* The meaning of the PAWIN_SPEAKER_5POINT1 flag has changed over time:\r
- http://msdn2.microsoft.com/en-us/library/aa474707.aspx\r
- We use PAWIN_SPEAKER_5POINT1 (not PAWIN_SPEAKER_5POINT1_SURROUND)\r
- because on some cards (eg Audigy) PAWIN_SPEAKER_5POINT1_SURROUND \r
- results in a virtual mixdown placing the rear output in the \r
- front _and_ rear speakers.\r
- */\r
- return PAWIN_SPEAKER_5POINT1; \r
- /* case 7: */\r
- case 8:\r
- /* RoBi: PAWIN_SPEAKER_7POINT1_SURROUND fits normal surround sound setups better than PAWIN_SPEAKER_7POINT1, f.i. NVidia HDMI Audio\r
- output is silent on channels 5&6 with NVidia drivers, and channel 7&8 with Micrsoft HD Audio driver using PAWIN_SPEAKER_7POINT1. \r
- With PAWIN_SPEAKER_7POINT1_SURROUND both setups work OK. */\r
- return PAWIN_SPEAKER_7POINT1_SURROUND;\r
- }\r
-\r
- /* Apparently some Audigy drivers will output silence \r
- if the direct-out constant (0) is used. So this is not ideal. \r
-\r
- RoBi 2012-12-19: Also, NVidia driver seem to output garbage instead. Again not very ideal.\r
- */\r
- return PAWIN_SPEAKER_DIRECTOUT;\r
-\r
- /* Note that Alec Rogers proposed the following as an alternate method to \r
- generate the default channel mask, however it doesn't seem to be an improvement\r
- over the above, since some drivers will matrix outputs mapping to non-present\r
- speakers accross multiple physical speakers.\r
-\r
- if(nChannels==1) {\r
- pwfFormat->dwChannelMask = SPEAKER_FRONT_CENTER;\r
- }\r
- else {\r
- pwfFormat->dwChannelMask = 0;\r
- for(i=0; i<nChannels; i++)\r
- pwfFormat->dwChannelMask = (pwfFormat->dwChannelMask << 1) | 0x1;\r
- }\r
- */\r
-}\r
+/*
+ * PortAudio Portable Real-Time Audio Library
+ * Windows WAVEFORMAT* data structure utilities
+ * portaudio.h should be included before this file.
+ *
+ * Copyright (c) 2007 Ross Bencina
+ *
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * The text above constitutes the entire PortAudio license; however,
+ * the PortAudio community also makes the following non-binding requests:
+ *
+ * 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. It is also
+ * requested that these non-binding requests be included along with the
+ * license above.
+ */
+
+#include <windows.h>
+#include <mmsystem.h>
+
+#include "portaudio.h"
+#include "pa_win_waveformat.h"
+
+
+#if !defined(WAVE_FORMAT_EXTENSIBLE)
+#define WAVE_FORMAT_EXTENSIBLE 0xFFFE
+#endif
+
+static GUID pawin_ksDataFormatSubtypeGuidBase =
+ { (USHORT)(WAVE_FORMAT_PCM), 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71 };
+
+
+int PaWin_SampleFormatToLinearWaveFormatTag( PaSampleFormat sampleFormat )
+{
+ if( sampleFormat == paFloat32 )
+ return PAWIN_WAVE_FORMAT_IEEE_FLOAT;
+
+ return PAWIN_WAVE_FORMAT_PCM;
+}
+
+
+void PaWin_InitializeWaveFormatEx( PaWinWaveFormat *waveFormat,
+ int numChannels, PaSampleFormat sampleFormat, int waveFormatTag, double sampleRate )
+{
+ WAVEFORMATEX *waveFormatEx = (WAVEFORMATEX*)waveFormat;
+ int bytesPerSample = Pa_GetSampleSize(sampleFormat);
+ unsigned long bytesPerFrame = numChannels * bytesPerSample;
+
+ waveFormatEx->wFormatTag = waveFormatTag;
+ waveFormatEx->nChannels = (WORD)numChannels;
+ waveFormatEx->nSamplesPerSec = (DWORD)sampleRate;
+ waveFormatEx->nAvgBytesPerSec = waveFormatEx->nSamplesPerSec * bytesPerFrame;
+ waveFormatEx->nBlockAlign = (WORD)bytesPerFrame;
+ waveFormatEx->wBitsPerSample = bytesPerSample * 8;
+ waveFormatEx->cbSize = 0;
+}
+
+
+void PaWin_InitializeWaveFormatExtensible( PaWinWaveFormat *waveFormat,
+ int numChannels, PaSampleFormat sampleFormat, int waveFormatTag, double sampleRate,
+ PaWinWaveFormatChannelMask channelMask )
+{
+ WAVEFORMATEX *waveFormatEx = (WAVEFORMATEX*)waveFormat;
+ int bytesPerSample = Pa_GetSampleSize(sampleFormat);
+ unsigned long bytesPerFrame = numChannels * bytesPerSample;
+ GUID guid;
+
+ waveFormatEx->wFormatTag = WAVE_FORMAT_EXTENSIBLE;
+ waveFormatEx->nChannels = (WORD)numChannels;
+ waveFormatEx->nSamplesPerSec = (DWORD)sampleRate;
+ waveFormatEx->nAvgBytesPerSec = waveFormatEx->nSamplesPerSec * bytesPerFrame;
+ waveFormatEx->nBlockAlign = (WORD)bytesPerFrame;
+ waveFormatEx->wBitsPerSample = bytesPerSample * 8;
+ waveFormatEx->cbSize = 22;
+
+ *((WORD*)&waveFormat->fields[PAWIN_INDEXOF_WVALIDBITSPERSAMPLE]) =
+ waveFormatEx->wBitsPerSample;
+
+ *((DWORD*)&waveFormat->fields[PAWIN_INDEXOF_DWCHANNELMASK]) = channelMask;
+
+ guid = pawin_ksDataFormatSubtypeGuidBase;
+ guid.Data1 = (USHORT)waveFormatTag;
+ *((GUID*)&waveFormat->fields[PAWIN_INDEXOF_SUBFORMAT]) = guid;
+}
+
+PaWinWaveFormatChannelMask PaWin_DefaultChannelMask( int numChannels )
+{
+ switch( numChannels ){
+ case 1:
+ return PAWIN_SPEAKER_MONO;
+ case 2:
+ return PAWIN_SPEAKER_STEREO;
+ case 3:
+ return PAWIN_SPEAKER_FRONT_LEFT | PAWIN_SPEAKER_FRONT_CENTER | PAWIN_SPEAKER_FRONT_RIGHT;
+ case 4:
+ return PAWIN_SPEAKER_QUAD;
+ case 5:
+ return PAWIN_SPEAKER_QUAD | PAWIN_SPEAKER_FRONT_CENTER;
+ case 6:
+ /* The meaning of the PAWIN_SPEAKER_5POINT1 flag has changed over time:
+ http://msdn2.microsoft.com/en-us/library/aa474707.aspx
+ We use PAWIN_SPEAKER_5POINT1 (not PAWIN_SPEAKER_5POINT1_SURROUND)
+ because on some cards (eg Audigy) PAWIN_SPEAKER_5POINT1_SURROUND
+ results in a virtual mixdown placing the rear output in the
+ front _and_ rear speakers.
+ */
+ return PAWIN_SPEAKER_5POINT1;
+ /* case 7: */
+ case 8:
+ /* RoBi: PAWIN_SPEAKER_7POINT1_SURROUND fits normal surround sound setups better than PAWIN_SPEAKER_7POINT1, f.i. NVidia HDMI Audio
+ output is silent on channels 5&6 with NVidia drivers, and channel 7&8 with Micrsoft HD Audio driver using PAWIN_SPEAKER_7POINT1.
+ With PAWIN_SPEAKER_7POINT1_SURROUND both setups work OK. */
+ return PAWIN_SPEAKER_7POINT1_SURROUND;
+ }
+
+ /* Apparently some Audigy drivers will output silence
+ if the direct-out constant (0) is used. So this is not ideal.
+
+ RoBi 2012-12-19: Also, NVidia driver seem to output garbage instead. Again not very ideal.
+ */
+ return PAWIN_SPEAKER_DIRECTOUT;
+
+ /* Note that Alec Rogers proposed the following as an alternate method to
+ generate the default channel mask, however it doesn't seem to be an improvement
+ over the above, since some drivers will matrix outputs mapping to non-present
+ speakers accross multiple physical speakers.
+
+ if(nChannels==1) {
+ pwfFormat->dwChannelMask = SPEAKER_FRONT_CENTER;
+ }
+ else {
+ pwfFormat->dwChannelMask = 0;
+ for(i=0; i<nChannels; i++)
+ pwfFormat->dwChannelMask = (pwfFormat->dwChannelMask << 1) | 0x1;
+ }
+ */
+}
-/*\r
- * PortAudio Portable Real-Time Audio Library\r
- * Windows WDM KS utilities\r
- *\r
- * Copyright (c) 1999 - 2007 Andrew Baldwin, Ross Bencina\r
- *\r
- * Permission is hereby granted, free of charge, to any person obtaining\r
- * a copy of this software and associated documentation files\r
- * (the "Software"), to deal in the Software without restriction,\r
- * including without limitation the rights to use, copy, modify, merge,\r
- * publish, distribute, sublicense, and/or sell copies of the Software,\r
- * and to permit persons to whom the Software is furnished to do so,\r
- * subject to the following conditions:\r
- *\r
- * The above copyright notice and this permission notice shall be\r
- * included in all copies or substantial portions of the Software.\r
- *\r
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\r
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\r
- * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\r
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\r
- * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
- */\r
-\r
-/*\r
- * The text above constitutes the entire PortAudio license; however, \r
- * the PortAudio community also makes the following non-binding requests:\r
- *\r
- * Any person wishing to distribute modifications to the Software is\r
- * requested to send the modifications to the original developer so that\r
- * they can be incorporated into the canonical version. It is also \r
- * requested that these non-binding requests be included along with the \r
- * license above.\r
- */\r
-\r
-#include <windows.h>\r
-#include <mmreg.h>\r
-#ifndef WAVE_FORMAT_IEEE_FLOAT\r
- #define WAVE_FORMAT_IEEE_FLOAT 0x0003 // MinGW32 does not define this\r
-#endif \r
-#ifndef _WAVEFORMATEXTENSIBLE_\r
- #define _WAVEFORMATEXTENSIBLE_ // MinGW32 does not define this\r
-#endif\r
-#ifndef _INC_MMREG\r
- #define _INC_MMREG // for STATIC_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT\r
-#endif\r
-#include <winioctl.h> // MinGW32 does not define this automatically\r
-\r
-#if defined(__GNUC__)\r
-\r
-#include "../../hostapi/wasapi/mingw-include/ks.h"\r
-#include "../../hostapi/wasapi/mingw-include/ksmedia.h"\r
-\r
-#else\r
-\r
-#include <ks.h>\r
-#include <ksmedia.h>\r
-\r
-#endif\r
-\r
-#include <stdio.h> // just for some development printfs\r
-\r
-#include "portaudio.h"\r
-#include "pa_util.h"\r
-#include "pa_win_wdmks_utils.h"\r
-\r
-\r
-/* PortAudio-local instances of GUIDs previously sourced from ksguid.lib */\r
-\r
-/* GUID KSDATAFORMAT_TYPE_AUDIO */\r
-static const GUID pa_KSDATAFORMAT_TYPE_AUDIO = { STATIC_KSDATAFORMAT_TYPE_AUDIO };\r
-\r
-/* GUID KSDATAFORMAT_SUBTYPE_IEEE_FLOAT */\r
-static const GUID pa_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT = { STATIC_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT };\r
-\r
-/* GUID KSDATAFORMAT_SUBTYPE_PCM */\r
-static const GUID pa_KSDATAFORMAT_SUBTYPE_PCM = { STATIC_KSDATAFORMAT_SUBTYPE_PCM };\r
-\r
-/* GUID KSDATAFORMAT_SUBTYPE_WAVEFORMATEX */\r
-static const GUID pa_KSDATAFORMAT_SUBTYPE_WAVEFORMATEX = { STATIC_KSDATAFORMAT_SUBTYPE_WAVEFORMATEX };\r
-\r
-/* GUID KSMEDIUMSETID_Standard */\r
-static const GUID pa_KSMEDIUMSETID_Standard = { STATIC_KSMEDIUMSETID_Standard };\r
-\r
-/* GUID KSINTERFACESETID_Standard */\r
-static const GUID pa_KSINTERFACESETID_Standard = { STATIC_KSINTERFACESETID_Standard };\r
-\r
-/* GUID KSPROPSETID_Pin */\r
-static const GUID pa_KSPROPSETID_Pin = { STATIC_KSPROPSETID_Pin };\r
-\r
-#define pa_IS_VALID_WAVEFORMATEX_GUID(Guid)\\r
- (!memcmp(((PUSHORT)&pa_KSDATAFORMAT_SUBTYPE_WAVEFORMATEX) + 1, ((PUSHORT)(Guid)) + 1, sizeof(GUID) - sizeof(USHORT)))\r
-\r
-\r
-static PaError WdmGetPinPropertySimple(\r
- HANDLE handle,\r
- unsigned long pinId,\r
- unsigned long property,\r
- void* value,\r
- unsigned long valueSize )\r
-{\r
- DWORD bytesReturned;\r
- KSP_PIN ksPProp;\r
- ksPProp.Property.Set = pa_KSPROPSETID_Pin;\r
- ksPProp.Property.Id = property;\r
- ksPProp.Property.Flags = KSPROPERTY_TYPE_GET;\r
- ksPProp.PinId = pinId;\r
- ksPProp.Reserved = 0;\r
-\r
- if( DeviceIoControl( handle, IOCTL_KS_PROPERTY, &ksPProp, sizeof(KSP_PIN),\r
- value, valueSize, &bytesReturned, NULL ) == 0 || bytesReturned != valueSize )\r
- {\r
- return paUnanticipatedHostError;\r
- }\r
- else\r
- {\r
- return paNoError;\r
- }\r
-}\r
-\r
-\r
-static PaError WdmGetPinPropertyMulti(\r
- HANDLE handle,\r
- unsigned long pinId,\r
- unsigned long property,\r
- KSMULTIPLE_ITEM** ksMultipleItem)\r
-{\r
- unsigned long multipleItemSize = 0;\r
- KSP_PIN ksPProp;\r
- DWORD bytesReturned;\r
-\r
- *ksMultipleItem = 0;\r
-\r
- ksPProp.Property.Set = pa_KSPROPSETID_Pin;\r
- ksPProp.Property.Id = property;\r
- ksPProp.Property.Flags = KSPROPERTY_TYPE_GET;\r
- ksPProp.PinId = pinId;\r
- ksPProp.Reserved = 0;\r
-\r
- if( DeviceIoControl( handle, IOCTL_KS_PROPERTY, &ksPProp.Property,\r
- sizeof(KSP_PIN), NULL, 0, &multipleItemSize, NULL ) == 0 && GetLastError() != ERROR_MORE_DATA )\r
- {\r
- return paUnanticipatedHostError;\r
- }\r
-\r
- *ksMultipleItem = (KSMULTIPLE_ITEM*)PaUtil_AllocateMemory( multipleItemSize );\r
- if( !*ksMultipleItem )\r
- {\r
- return paInsufficientMemory;\r
- }\r
-\r
- if( DeviceIoControl( handle, IOCTL_KS_PROPERTY, &ksPProp, sizeof(KSP_PIN),\r
- (void*)*ksMultipleItem, multipleItemSize, &bytesReturned, NULL ) == 0 || bytesReturned != multipleItemSize )\r
- {\r
- PaUtil_FreeMemory( ksMultipleItem );\r
- return paUnanticipatedHostError;\r
- }\r
-\r
- return paNoError;\r
-}\r
-\r
-\r
-static int GetKSFilterPinCount( HANDLE deviceHandle )\r
-{\r
- DWORD result;\r
-\r
- if( WdmGetPinPropertySimple( deviceHandle, 0, KSPROPERTY_PIN_CTYPES, &result, sizeof(result) ) == paNoError ){\r
- return result;\r
- }else{\r
- return 0;\r
- }\r
-}\r
-\r
-\r
-static KSPIN_COMMUNICATION GetKSFilterPinPropertyCommunication( HANDLE deviceHandle, int pinId )\r
-{\r
- KSPIN_COMMUNICATION result;\r
-\r
- if( WdmGetPinPropertySimple( deviceHandle, pinId, KSPROPERTY_PIN_COMMUNICATION, &result, sizeof(result) ) == paNoError ){\r
- return result;\r
- }else{\r
- return KSPIN_COMMUNICATION_NONE;\r
- }\r
-}\r
-\r
-\r
-static KSPIN_DATAFLOW GetKSFilterPinPropertyDataflow( HANDLE deviceHandle, int pinId )\r
-{\r
- KSPIN_DATAFLOW result;\r
-\r
- if( WdmGetPinPropertySimple( deviceHandle, pinId, KSPROPERTY_PIN_DATAFLOW, &result, sizeof(result) ) == paNoError ){\r
- return result;\r
- }else{\r
- return (KSPIN_DATAFLOW)0;\r
- }\r
-}\r
-\r
-\r
-static int KSFilterPinPropertyIdentifiersInclude( \r
- HANDLE deviceHandle, int pinId, unsigned long property, const GUID *identifierSet, unsigned long identifierId )\r
-{\r
- KSMULTIPLE_ITEM* item = NULL;\r
- KSIDENTIFIER* identifier;\r
- int i;\r
- int result = 0;\r
-\r
- if( WdmGetPinPropertyMulti( deviceHandle, pinId, property, &item) != paNoError )\r
- return 0;\r
- \r
- identifier = (KSIDENTIFIER*)(item+1);\r
-\r
- for( i = 0; i < (int)item->Count; i++ )\r
- {\r
- if( !memcmp( (void*)&identifier[i].Set, (void*)identifierSet, sizeof( GUID ) ) &&\r
- ( identifier[i].Id == identifierId ) )\r
- {\r
- result = 1;\r
- break;\r
- }\r
- }\r
-\r
- PaUtil_FreeMemory( item );\r
-\r
- return result;\r
-}\r
-\r
-\r
-/* return the maximum channel count supported by any pin on the device. \r
- if isInput is non-zero we query input pins, otherwise output pins.\r
-*/\r
-int PaWin_WDMKS_QueryFilterMaximumChannelCount( void *wcharDevicePath, int isInput )\r
-{\r
- HANDLE deviceHandle;\r
- ULONG i;\r
- int pinCount, pinId;\r
- int result = 0;\r
- KSPIN_DATAFLOW requiredDataflowDirection = (isInput ? KSPIN_DATAFLOW_OUT : KSPIN_DATAFLOW_IN );\r
- \r
- if( !wcharDevicePath )\r
- return 0;\r
-\r
- deviceHandle = CreateFileW( (LPCWSTR)wcharDevicePath, FILE_SHARE_READ|FILE_SHARE_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL );\r
- if( deviceHandle == INVALID_HANDLE_VALUE )\r
- return 0;\r
-\r
- pinCount = GetKSFilterPinCount( deviceHandle );\r
- for( pinId = 0; pinId < pinCount; ++pinId )\r
- {\r
- KSPIN_COMMUNICATION communication = GetKSFilterPinPropertyCommunication( deviceHandle, pinId );\r
- KSPIN_DATAFLOW dataflow = GetKSFilterPinPropertyDataflow( deviceHandle, pinId );\r
- if( ( dataflow == requiredDataflowDirection ) &&\r
- (( communication == KSPIN_COMMUNICATION_SINK) ||\r
- ( communication == KSPIN_COMMUNICATION_BOTH)) \r
- && ( KSFilterPinPropertyIdentifiersInclude( deviceHandle, pinId, \r
- KSPROPERTY_PIN_INTERFACES, &pa_KSINTERFACESETID_Standard, KSINTERFACE_STANDARD_STREAMING )\r
- || KSFilterPinPropertyIdentifiersInclude( deviceHandle, pinId, \r
- KSPROPERTY_PIN_INTERFACES, &pa_KSINTERFACESETID_Standard, KSINTERFACE_STANDARD_LOOPED_STREAMING ) )\r
- && KSFilterPinPropertyIdentifiersInclude( deviceHandle, pinId, \r
- KSPROPERTY_PIN_MEDIUMS, &pa_KSMEDIUMSETID_Standard, KSMEDIUM_STANDARD_DEVIO ) )\r
- {\r
- KSMULTIPLE_ITEM* item = NULL;\r
- if( WdmGetPinPropertyMulti( deviceHandle, pinId, KSPROPERTY_PIN_DATARANGES, &item ) == paNoError )\r
- {\r
- KSDATARANGE *dataRange = (KSDATARANGE*)(item+1);\r
-\r
- for( i=0; i < item->Count; ++i ){\r
-\r
- if( pa_IS_VALID_WAVEFORMATEX_GUID(&dataRange->SubFormat)\r
- || memcmp( (void*)&dataRange->SubFormat, (void*)&pa_KSDATAFORMAT_SUBTYPE_PCM, sizeof(GUID) ) == 0\r
- || memcmp( (void*)&dataRange->SubFormat, (void*)&pa_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT, sizeof(GUID) ) == 0\r
- || ( ( memcmp( (void*)&dataRange->MajorFormat, (void*)&pa_KSDATAFORMAT_TYPE_AUDIO, sizeof(GUID) ) == 0 )\r
- && ( memcmp( (void*)&dataRange->SubFormat, (void*)&KSDATAFORMAT_SUBTYPE_WILDCARD, sizeof(GUID) ) == 0 ) ) )\r
- {\r
- KSDATARANGE_AUDIO *dataRangeAudio = (KSDATARANGE_AUDIO*)dataRange;\r
- \r
- /*\r
- printf( ">>> %d %d %d %d %S\n", isInput, dataflow, communication, dataRangeAudio->MaximumChannels, devicePath );\r
- \r
- if( memcmp((void*)&dataRange->Specifier, (void*)&KSDATAFORMAT_SPECIFIER_WAVEFORMATEX, sizeof(GUID) ) == 0 )\r
- printf( "\tspecifier: KSDATAFORMAT_SPECIFIER_WAVEFORMATEX\n" );\r
- else if( memcmp((void*)&dataRange->Specifier, (void*)&KSDATAFORMAT_SPECIFIER_DSOUND, sizeof(GUID) ) == 0 )\r
- printf( "\tspecifier: KSDATAFORMAT_SPECIFIER_DSOUND\n" );\r
- else if( memcmp((void*)&dataRange->Specifier, (void*)&KSDATAFORMAT_SPECIFIER_WILDCARD, sizeof(GUID) ) == 0 )\r
- printf( "\tspecifier: KSDATAFORMAT_SPECIFIER_WILDCARD\n" );\r
- else\r
- printf( "\tspecifier: ?\n" );\r
- */\r
-\r
- /*\r
- We assume that very high values for MaximumChannels are not useful and indicate\r
- that the driver isn't prepared to tell us the real number of channels which it supports.\r
- */\r
- if( dataRangeAudio->MaximumChannels < 0xFFFFUL && (int)dataRangeAudio->MaximumChannels > result )\r
- result = (int)dataRangeAudio->MaximumChannels;\r
- }\r
- \r
- dataRange = (KSDATARANGE*)( ((char*)dataRange) + dataRange->FormatSize);\r
- }\r
-\r
- PaUtil_FreeMemory( item );\r
- }\r
- }\r
- }\r
- \r
- CloseHandle( deviceHandle );\r
- return result;\r
-}\r
+/*
+ * PortAudio Portable Real-Time Audio Library
+ * Windows WDM KS utilities
+ *
+ * Copyright (c) 1999 - 2007 Andrew Baldwin, Ross Bencina
+ *
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * The text above constitutes the entire PortAudio license; however,
+ * the PortAudio community also makes the following non-binding requests:
+ *
+ * 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. It is also
+ * requested that these non-binding requests be included along with the
+ * license above.
+ */
+
+#include <windows.h>
+#include <mmreg.h>
+#ifndef WAVE_FORMAT_IEEE_FLOAT
+ #define WAVE_FORMAT_IEEE_FLOAT 0x0003 // MinGW32 does not define this
+#endif
+#ifndef _WAVEFORMATEXTENSIBLE_
+ #define _WAVEFORMATEXTENSIBLE_ // MinGW32 does not define this
+#endif
+#ifndef _INC_MMREG
+ #define _INC_MMREG // for STATIC_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT
+#endif
+#include <winioctl.h> // MinGW32 does not define this automatically
+
+#if defined(__GNUC__)
+
+#include "../../hostapi/wasapi/mingw-include/ks.h"
+#include "../../hostapi/wasapi/mingw-include/ksmedia.h"
+
+#else
+
+#include <ks.h>
+#include <ksmedia.h>
+
+#endif
+
+#include <stdio.h> // just for some development printfs
+
+#include "portaudio.h"
+#include "pa_util.h"
+#include "pa_win_wdmks_utils.h"
+
+
+/* PortAudio-local instances of GUIDs previously sourced from ksguid.lib */
+
+/* GUID KSDATAFORMAT_TYPE_AUDIO */
+static const GUID pa_KSDATAFORMAT_TYPE_AUDIO = { STATIC_KSDATAFORMAT_TYPE_AUDIO };
+
+/* GUID KSDATAFORMAT_SUBTYPE_IEEE_FLOAT */
+static const GUID pa_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT = { STATIC_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT };
+
+/* GUID KSDATAFORMAT_SUBTYPE_PCM */
+static const GUID pa_KSDATAFORMAT_SUBTYPE_PCM = { STATIC_KSDATAFORMAT_SUBTYPE_PCM };
+
+/* GUID KSDATAFORMAT_SUBTYPE_WAVEFORMATEX */
+static const GUID pa_KSDATAFORMAT_SUBTYPE_WAVEFORMATEX = { STATIC_KSDATAFORMAT_SUBTYPE_WAVEFORMATEX };
+
+/* GUID KSMEDIUMSETID_Standard */
+static const GUID pa_KSMEDIUMSETID_Standard = { STATIC_KSMEDIUMSETID_Standard };
+
+/* GUID KSINTERFACESETID_Standard */
+static const GUID pa_KSINTERFACESETID_Standard = { STATIC_KSINTERFACESETID_Standard };
+
+/* GUID KSPROPSETID_Pin */
+static const GUID pa_KSPROPSETID_Pin = { STATIC_KSPROPSETID_Pin };
+
+#define pa_IS_VALID_WAVEFORMATEX_GUID(Guid)\
+ (!memcmp(((PUSHORT)&pa_KSDATAFORMAT_SUBTYPE_WAVEFORMATEX) + 1, ((PUSHORT)(Guid)) + 1, sizeof(GUID) - sizeof(USHORT)))
+
+
+static PaError WdmGetPinPropertySimple(
+ HANDLE handle,
+ unsigned long pinId,
+ unsigned long property,
+ void* value,
+ unsigned long valueSize )
+{
+ DWORD bytesReturned;
+ KSP_PIN ksPProp;
+ ksPProp.Property.Set = pa_KSPROPSETID_Pin;
+ ksPProp.Property.Id = property;
+ ksPProp.Property.Flags = KSPROPERTY_TYPE_GET;
+ ksPProp.PinId = pinId;
+ ksPProp.Reserved = 0;
+
+ if( DeviceIoControl( handle, IOCTL_KS_PROPERTY, &ksPProp, sizeof(KSP_PIN),
+ value, valueSize, &bytesReturned, NULL ) == 0 || bytesReturned != valueSize )
+ {
+ return paUnanticipatedHostError;
+ }
+ else
+ {
+ return paNoError;
+ }
+}
+
+
+static PaError WdmGetPinPropertyMulti(
+ HANDLE handle,
+ unsigned long pinId,
+ unsigned long property,
+ KSMULTIPLE_ITEM** ksMultipleItem)
+{
+ unsigned long multipleItemSize = 0;
+ KSP_PIN ksPProp;
+ DWORD bytesReturned;
+
+ *ksMultipleItem = 0;
+
+ ksPProp.Property.Set = pa_KSPROPSETID_Pin;
+ ksPProp.Property.Id = property;
+ ksPProp.Property.Flags = KSPROPERTY_TYPE_GET;
+ ksPProp.PinId = pinId;
+ ksPProp.Reserved = 0;
+
+ if( DeviceIoControl( handle, IOCTL_KS_PROPERTY, &ksPProp.Property,
+ sizeof(KSP_PIN), NULL, 0, &multipleItemSize, NULL ) == 0 && GetLastError() != ERROR_MORE_DATA )
+ {
+ return paUnanticipatedHostError;
+ }
+
+ *ksMultipleItem = (KSMULTIPLE_ITEM*)PaUtil_AllocateMemory( multipleItemSize );
+ if( !*ksMultipleItem )
+ {
+ return paInsufficientMemory;
+ }
+
+ if( DeviceIoControl( handle, IOCTL_KS_PROPERTY, &ksPProp, sizeof(KSP_PIN),
+ (void*)*ksMultipleItem, multipleItemSize, &bytesReturned, NULL ) == 0 || bytesReturned != multipleItemSize )
+ {
+ PaUtil_FreeMemory( ksMultipleItem );
+ return paUnanticipatedHostError;
+ }
+
+ return paNoError;
+}
+
+
+static int GetKSFilterPinCount( HANDLE deviceHandle )
+{
+ DWORD result;
+
+ if( WdmGetPinPropertySimple( deviceHandle, 0, KSPROPERTY_PIN_CTYPES, &result, sizeof(result) ) == paNoError ){
+ return result;
+ }else{
+ return 0;
+ }
+}
+
+
+static KSPIN_COMMUNICATION GetKSFilterPinPropertyCommunication( HANDLE deviceHandle, int pinId )
+{
+ KSPIN_COMMUNICATION result;
+
+ if( WdmGetPinPropertySimple( deviceHandle, pinId, KSPROPERTY_PIN_COMMUNICATION, &result, sizeof(result) ) == paNoError ){
+ return result;
+ }else{
+ return KSPIN_COMMUNICATION_NONE;
+ }
+}
+
+
+static KSPIN_DATAFLOW GetKSFilterPinPropertyDataflow( HANDLE deviceHandle, int pinId )
+{
+ KSPIN_DATAFLOW result;
+
+ if( WdmGetPinPropertySimple( deviceHandle, pinId, KSPROPERTY_PIN_DATAFLOW, &result, sizeof(result) ) == paNoError ){
+ return result;
+ }else{
+ return (KSPIN_DATAFLOW)0;
+ }
+}
+
+
+static int KSFilterPinPropertyIdentifiersInclude(
+ HANDLE deviceHandle, int pinId, unsigned long property, const GUID *identifierSet, unsigned long identifierId )
+{
+ KSMULTIPLE_ITEM* item = NULL;
+ KSIDENTIFIER* identifier;
+ int i;
+ int result = 0;
+
+ if( WdmGetPinPropertyMulti( deviceHandle, pinId, property, &item) != paNoError )
+ return 0;
+
+ identifier = (KSIDENTIFIER*)(item+1);
+
+ for( i = 0; i < (int)item->Count; i++ )
+ {
+ if( !memcmp( (void*)&identifier[i].Set, (void*)identifierSet, sizeof( GUID ) ) &&
+ ( identifier[i].Id == identifierId ) )
+ {
+ result = 1;
+ break;
+ }
+ }
+
+ PaUtil_FreeMemory( item );
+
+ return result;
+}
+
+
+/* return the maximum channel count supported by any pin on the device.
+ if isInput is non-zero we query input pins, otherwise output pins.
+*/
+int PaWin_WDMKS_QueryFilterMaximumChannelCount( void *wcharDevicePath, int isInput )
+{
+ HANDLE deviceHandle;
+ ULONG i;
+ int pinCount, pinId;
+ int result = 0;
+ KSPIN_DATAFLOW requiredDataflowDirection = (isInput ? KSPIN_DATAFLOW_OUT : KSPIN_DATAFLOW_IN );
+
+ if( !wcharDevicePath )
+ return 0;
+
+ deviceHandle = CreateFileW( (LPCWSTR)wcharDevicePath, FILE_SHARE_READ|FILE_SHARE_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL );
+ if( deviceHandle == INVALID_HANDLE_VALUE )
+ return 0;
+
+ pinCount = GetKSFilterPinCount( deviceHandle );
+ for( pinId = 0; pinId < pinCount; ++pinId )
+ {
+ KSPIN_COMMUNICATION communication = GetKSFilterPinPropertyCommunication( deviceHandle, pinId );
+ KSPIN_DATAFLOW dataflow = GetKSFilterPinPropertyDataflow( deviceHandle, pinId );
+ if( ( dataflow == requiredDataflowDirection ) &&
+ (( communication == KSPIN_COMMUNICATION_SINK) ||
+ ( communication == KSPIN_COMMUNICATION_BOTH))
+ && ( KSFilterPinPropertyIdentifiersInclude( deviceHandle, pinId,
+ KSPROPERTY_PIN_INTERFACES, &pa_KSINTERFACESETID_Standard, KSINTERFACE_STANDARD_STREAMING )
+ || KSFilterPinPropertyIdentifiersInclude( deviceHandle, pinId,
+ KSPROPERTY_PIN_INTERFACES, &pa_KSINTERFACESETID_Standard, KSINTERFACE_STANDARD_LOOPED_STREAMING ) )
+ && KSFilterPinPropertyIdentifiersInclude( deviceHandle, pinId,
+ KSPROPERTY_PIN_MEDIUMS, &pa_KSMEDIUMSETID_Standard, KSMEDIUM_STANDARD_DEVIO ) )
+ {
+ KSMULTIPLE_ITEM* item = NULL;
+ if( WdmGetPinPropertyMulti( deviceHandle, pinId, KSPROPERTY_PIN_DATARANGES, &item ) == paNoError )
+ {
+ KSDATARANGE *dataRange = (KSDATARANGE*)(item+1);
+
+ for( i=0; i < item->Count; ++i ){
+
+ if( pa_IS_VALID_WAVEFORMATEX_GUID(&dataRange->SubFormat)
+ || memcmp( (void*)&dataRange->SubFormat, (void*)&pa_KSDATAFORMAT_SUBTYPE_PCM, sizeof(GUID) ) == 0
+ || memcmp( (void*)&dataRange->SubFormat, (void*)&pa_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT, sizeof(GUID) ) == 0
+ || ( ( memcmp( (void*)&dataRange->MajorFormat, (void*)&pa_KSDATAFORMAT_TYPE_AUDIO, sizeof(GUID) ) == 0 )
+ && ( memcmp( (void*)&dataRange->SubFormat, (void*)&KSDATAFORMAT_SUBTYPE_WILDCARD, sizeof(GUID) ) == 0 ) ) )
+ {
+ KSDATARANGE_AUDIO *dataRangeAudio = (KSDATARANGE_AUDIO*)dataRange;
+
+ /*
+ printf( ">>> %d %d %d %d %S\n", isInput, dataflow, communication, dataRangeAudio->MaximumChannels, devicePath );
+
+ if( memcmp((void*)&dataRange->Specifier, (void*)&KSDATAFORMAT_SPECIFIER_WAVEFORMATEX, sizeof(GUID) ) == 0 )
+ printf( "\tspecifier: KSDATAFORMAT_SPECIFIER_WAVEFORMATEX\n" );
+ else if( memcmp((void*)&dataRange->Specifier, (void*)&KSDATAFORMAT_SPECIFIER_DSOUND, sizeof(GUID) ) == 0 )
+ printf( "\tspecifier: KSDATAFORMAT_SPECIFIER_DSOUND\n" );
+ else if( memcmp((void*)&dataRange->Specifier, (void*)&KSDATAFORMAT_SPECIFIER_WILDCARD, sizeof(GUID) ) == 0 )
+ printf( "\tspecifier: KSDATAFORMAT_SPECIFIER_WILDCARD\n" );
+ else
+ printf( "\tspecifier: ?\n" );
+ */
+
+ /*
+ We assume that very high values for MaximumChannels are not useful and indicate
+ that the driver isn't prepared to tell us the real number of channels which it supports.
+ */
+ if( dataRangeAudio->MaximumChannels < 0xFFFFUL && (int)dataRangeAudio->MaximumChannels > result )
+ result = (int)dataRangeAudio->MaximumChannels;
+ }
+
+ dataRange = (KSDATARANGE*)( ((char*)dataRange) + dataRange->FormatSize);
+ }
+
+ PaUtil_FreeMemory( item );
+ }
+ }
+ }
+
+ CloseHandle( deviceHandle );
+ return result;
+}
-#ifndef PA_WIN_WDMKS_UTILS_H\r
-#define PA_WIN_WDMKS_UTILS_H\r
-\r
-/*\r
- * PortAudio Portable Real-Time Audio Library\r
- * Windows WDM KS utilities\r
- *\r
- * Copyright (c) 1999 - 2007 Ross Bencina, Andrew Baldwin\r
- *\r
- * Permission is hereby granted, free of charge, to any person obtaining\r
- * a copy of this software and associated documentation files\r
- * (the "Software"), to deal in the Software without restriction,\r
- * including without limitation the rights to use, copy, modify, merge,\r
- * publish, distribute, sublicense, and/or sell copies of the Software,\r
- * and to permit persons to whom the Software is furnished to do so,\r
- * subject to the following conditions:\r
- *\r
- * The above copyright notice and this permission notice shall be\r
- * included in all copies or substantial portions of the Software.\r
- *\r
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\r
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\r
- * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\r
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\r
- * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
- */\r
-\r
-/*\r
- * The text above constitutes the entire PortAudio license; however, \r
- * the PortAudio community also makes the following non-binding requests:\r
- *\r
- * Any person wishing to distribute modifications to the Software is\r
- * requested to send the modifications to the original developer so that\r
- * they can be incorporated into the canonical version. It is also \r
- * requested that these non-binding requests be included along with the \r
- * license above.\r
- */\r
-\r
-/** @file\r
- @brief Utilities for working with the Windows WDM KS API\r
-*/\r
-\r
-#ifdef __cplusplus\r
-extern "C" {\r
-#endif\r
-\r
-/**\r
- Query for the maximum number of channels supported by any pin of the\r
- specified device. Returns 0 if the query fails for any reason.\r
-\r
- @param wcharDevicePath A system level PnP interface path, supplied as a WCHAR unicode string.\r
- Declard as void* to avoid introducing a dependency on wchar_t here.\r
-\r
- @param isInput A flag specifying whether to query for input (non-zero) or output (zero) channels.\r
-*/\r
-int PaWin_WDMKS_QueryFilterMaximumChannelCount( void *wcharDevicePath, int isInput );\r
-\r
-\r
-#ifdef __cplusplus\r
-}\r
-#endif /* __cplusplus */\r
-\r
+#ifndef PA_WIN_WDMKS_UTILS_H
+#define PA_WIN_WDMKS_UTILS_H
+
+/*
+ * PortAudio Portable Real-Time Audio Library
+ * Windows WDM KS utilities
+ *
+ * Copyright (c) 1999 - 2007 Ross Bencina, Andrew Baldwin
+ *
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * The text above constitutes the entire PortAudio license; however,
+ * the PortAudio community also makes the following non-binding requests:
+ *
+ * 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. It is also
+ * requested that these non-binding requests be included along with the
+ * license above.
+ */
+
+/** @file
+ @brief Utilities for working with the Windows WDM KS API
+*/
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ Query for the maximum number of channels supported by any pin of the
+ specified device. Returns 0 if the query fails for any reason.
+
+ @param wcharDevicePath A system level PnP interface path, supplied as a WCHAR unicode string.
+ Declard as void* to avoid introducing a dependency on wchar_t here.
+
+ @param isInput A flag specifying whether to query for input (non-zero) or output (zero) channels.
+*/
+int PaWin_WDMKS_QueryFilterMaximumChannelCount( void *wcharDevicePath, int isInput );
+
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#endif /* PA_WIN_WDMKS_UTILS_H */
\ No newline at end of file
-/** @file patest_converters.c\r
- @ingroup test_src\r
- @brief Tests the converter functions in pa_converters.c\r
- @author Ross Bencina <rossb@audiomulch.com>\r
-\r
- Link with pa_dither.c and pa_converters.c\r
-\r
- see http://www.portaudio.com/trac/wiki/V19ConvertersStatus for a discussion of this.\r
-*/\r
-/*\r
- * $Id: $\r
- *\r
- * This program uses the PortAudio Portable Audio Library.\r
- * For more information see: http://www.portaudio.com/\r
- * Copyright (c) 1999-2008 Ross Bencina and Phil Burk\r
- *\r
- * Permission is hereby granted, free of charge, to any person obtaining\r
- * a copy of this software and associated documentation files\r
- * (the "Software"), to deal in the Software without restriction,\r
- * including without limitation the rights to use, copy, modify, merge,\r
- * publish, distribute, sublicense, and/or sell copies of the Software,\r
- * and to permit persons to whom the Software is furnished to do so,\r
- * subject to the following conditions:\r
- *\r
- * The above copyright notice and this permission notice shall be\r
- * included in all copies or substantial portions of the Software.\r
- *\r
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\r
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\r
- * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\r
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\r
- * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
- */\r
-\r
-/*\r
- * The text above constitutes the entire PortAudio license; however, \r
- * the PortAudio community also makes the following non-binding requests:\r
- *\r
- * Any person wishing to distribute modifications to the Software is\r
- * requested to send the modifications to the original developer so that\r
- * they can be incorporated into the canonical version. It is also \r
- * requested that these non-binding requests be included along with the \r
- * license above.\r
- */\r
-#include <stdio.h>\r
-#include <stdlib.h>\r
-#include <string.h>\r
-#include <math.h>\r
-\r
-#include "portaudio.h"\r
-#include "pa_converters.h"\r
-#include "pa_dither.h"\r
-#include "pa_types.h"\r
-#include "pa_endianness.h"\r
-\r
-#ifndef M_PI\r
-#define M_PI (3.14159265)\r
-#endif\r
-\r
-#define MAX_PER_CHANNEL_FRAME_COUNT (2048)\r
-#define MAX_CHANNEL_COUNT (8)\r
-\r
-\r
-#define SAMPLE_FORMAT_COUNT (6)\r
-\r
-static PaSampleFormat sampleFormats_[ SAMPLE_FORMAT_COUNT ] = \r
- { paFloat32, paInt32, paInt24, paInt16, paInt8, paUInt8 }; /* all standard PA sample formats */\r
-\r
-static const char* sampleFormatNames_[SAMPLE_FORMAT_COUNT] = \r
- { "paFloat32", "paInt32", "paInt24", "paInt16", "paInt8", "paUInt8" };\r
-\r
-\r
-static const char* abbreviatedSampleFormatNames_[SAMPLE_FORMAT_COUNT] = \r
- { "f32", "i32", "i24", "i16", " i8", "ui8" };\r
-\r
-\r
-PaError My_Pa_GetSampleSize( PaSampleFormat format );\r
-\r
-/*\r
- available flags are paClipOff and paDitherOff\r
- clipping is usually applied for float -> int conversions\r
- dither is usually applied for all downconversions (ie anything but 8bit->8bit conversions\r
-*/\r
-\r
-static int CanClip( PaSampleFormat sourceFormat, PaSampleFormat destinationFormat )\r
-{\r
- if( sourceFormat == paFloat32 && destinationFormat != sourceFormat )\r
- return 1;\r
- else\r
- return 0;\r
-}\r
-\r
-static int CanDither( PaSampleFormat sourceFormat, PaSampleFormat destinationFormat )\r
-{\r
- if( sourceFormat < destinationFormat && sourceFormat != paInt8 )\r
- return 1;\r
- else\r
- return 0;\r
-}\r
-\r
-static void GenerateOneCycleSineReference( double *out, int frameCount, int strideFrames )\r
-{\r
- int i;\r
- for( i=0; i < frameCount; ++i ){\r
- *out = sin( ((double)i/(double)frameCount) * 2. * M_PI );\r
- out += strideFrames;\r
- }\r
-}\r
-\r
-\r
-static void GenerateOneCycleSine( PaSampleFormat format, void *buffer, int frameCount, int strideFrames )\r
-{\r
- switch( format ){\r
-\r
- case paFloat32:\r
- {\r
- int i;\r
- float *out = (float*)buffer;\r
- for( i=0; i < frameCount; ++i ){\r
- *out = (float).9 * sin( ((double)i/(double)frameCount) * 2. * M_PI );\r
- out += strideFrames;\r
- }\r
- }\r
- break;\r
- case paInt32:\r
- {\r
- int i;\r
- PaInt32 *out = (PaInt32*)buffer;\r
- for( i=0; i < frameCount; ++i ){\r
- *out = (PaInt32)(.9 * sin( ((double)i/(double)frameCount) * 2. * M_PI ) * 0x7FFFFFFF);\r
- out += strideFrames;\r
- }\r
- }\r
- break;\r
- case paInt24:\r
- {\r
- int i;\r
- unsigned char *out = (unsigned char*)buffer;\r
- for( i=0; i < frameCount; ++i ){\r
- signed long temp = (PaInt32)(.9 * sin( ((double)i/(double)frameCount) * 2. * M_PI ) * 0x7FFFFFFF);\r
- \r
- #if defined(PA_LITTLE_ENDIAN)\r
- out[0] = (unsigned char)(temp >> 8) & 0xFF;\r
- out[1] = (unsigned char)(temp >> 16) & 0xFF;\r
- out[2] = (unsigned char)(temp >> 24) & 0xFF;\r
- #elif defined(PA_BIG_ENDIAN)\r
- out[0] = (unsigned char)(temp >> 24) & 0xFF;\r
- out[1] = (unsigned char)(temp >> 16) & 0xFF;\r
- out[2] = (unsigned char)(temp >> 8) & 0xFF;\r
- #endif\r
- out += 3;\r
- }\r
- }\r
- break;\r
- case paInt16:\r
- {\r
- int i;\r
- PaInt16 *out = (PaInt16*)buffer;\r
- for( i=0; i < frameCount; ++i ){\r
- *out = (PaInt16)(.9 * sin( ((double)i/(double)frameCount) * 2. * M_PI ) * 0x7FFF );\r
- out += strideFrames;\r
- }\r
- }\r
- break;\r
- case paInt8:\r
- {\r
- int i;\r
- signed char *out = (signed char*)buffer;\r
- for( i=0; i < frameCount; ++i ){\r
- *out = (signed char)(.9 * sin( ((double)i/(double)frameCount) * 2. * M_PI ) * 0x7F );\r
- out += strideFrames;\r
- }\r
- }\r
- break;\r
- case paUInt8:\r
- {\r
- int i;\r
- unsigned char *out = (unsigned char*)buffer;\r
- for( i=0; i < frameCount; ++i ){\r
- *out = (unsigned char)( .5 * (1. + (.9 * sin( ((double)i/(double)frameCount) * 2. * M_PI ))) * 0xFF );\r
- out += strideFrames;\r
- }\r
- }\r
- break;\r
- }\r
-}\r
-\r
-int TestNonZeroPresent( void *buffer, int size )\r
-{\r
- char *p = (char*)buffer;\r
- int i;\r
-\r
- for( i=0; i < size; ++i ){\r
- \r
- if( *p != 0 )\r
- return 1;\r
- ++p;\r
- } \r
-\r
- return 0;\r
-}\r
-\r
-float MaximumAbsDifference( float* sourceBuffer, float* referenceBuffer, int count )\r
-{\r
- float result = 0;\r
- float difference;\r
- while( count-- ){\r
- difference = fabs( *sourceBuffer++ - *referenceBuffer++ );\r
- if( difference > result )\r
- result = difference;\r
- }\r
-\r
- return result;\r
-} \r
-\r
-int main( const char **argv, int argc )\r
-{\r
- PaUtilTriangularDitherGenerator ditherState;\r
- PaUtilConverter *converter;\r
- void *destinationBuffer, *sourceBuffer;\r
- double *referenceBuffer;\r
- int sourceFormatIndex, destinationFormatIndex;\r
- PaSampleFormat sourceFormat, destinationFormat;\r
- PaStreamFlags flags;\r
- int passFailMatrix[SAMPLE_FORMAT_COUNT][SAMPLE_FORMAT_COUNT]; // [source][destination]\r
- float noiseAmplitudeMatrix[SAMPLE_FORMAT_COUNT][SAMPLE_FORMAT_COUNT]; // [source][destination]\r
- float amp;\r
-\r
-#define FLAG_COMBINATION_COUNT (4)\r
- PaStreamFlags flagCombinations[FLAG_COMBINATION_COUNT] = { paNoFlag, paClipOff, paDitherOff, paClipOff | paDitherOff };\r
- const char *flagCombinationNames[FLAG_COMBINATION_COUNT] = { "paNoFlag", "paClipOff", "paDitherOff", "paClipOff | paDitherOff" };\r
- int flagCombinationIndex;\r
-\r
- PaUtil_InitializeTriangularDitherState( &ditherState );\r
-\r
- /* allocate more than enough space, we use sizeof(float) but we need to fit any 32 bit datum */\r
-\r
- destinationBuffer = (void*)malloc( MAX_PER_CHANNEL_FRAME_COUNT * MAX_CHANNEL_COUNT * sizeof(float) );\r
- sourceBuffer = (void*)malloc( MAX_PER_CHANNEL_FRAME_COUNT * MAX_CHANNEL_COUNT * sizeof(float) );\r
- referenceBuffer = (void*)malloc( MAX_PER_CHANNEL_FRAME_COUNT * MAX_CHANNEL_COUNT * sizeof(float) );\r
-\r
-\r
- /* the first round of tests simply iterates through the buffer combinations testing\r
- that putting something in gives something out */\r
-\r
- printf( "= Sine wave in, something out =\n" );\r
-\r
- printf( "\n" );\r
-\r
- GenerateOneCycleSine( paFloat32, referenceBuffer, MAX_PER_CHANNEL_FRAME_COUNT, 1 );\r
-\r
- for( flagCombinationIndex = 0; flagCombinationIndex < FLAG_COMBINATION_COUNT; ++flagCombinationIndex ){\r
- flags = flagCombinations[flagCombinationIndex];\r
-\r
- printf( "\n" );\r
- printf( "== flags = %s ==\n", flagCombinationNames[flagCombinationIndex] );\r
-\r
- for( sourceFormatIndex = 0; sourceFormatIndex < SAMPLE_FORMAT_COUNT; ++sourceFormatIndex ){\r
- for( destinationFormatIndex = 0; destinationFormatIndex < SAMPLE_FORMAT_COUNT; ++destinationFormatIndex ){\r
- sourceFormat = sampleFormats_[sourceFormatIndex];\r
- destinationFormat = sampleFormats_[destinationFormatIndex];\r
- //printf( "%s -> %s ", sampleFormatNames_[ sourceFormatIndex ], sampleFormatNames_[ destinationFormatIndex ] );\r
-\r
- converter = PaUtil_SelectConverter( sourceFormat, destinationFormat, flags );\r
-\r
- /* source is a sinewave */\r
- GenerateOneCycleSine( sourceFormat, sourceBuffer, MAX_PER_CHANNEL_FRAME_COUNT, 1 );\r
-\r
- /* zero destination */\r
- memset( destinationBuffer, 0, MAX_PER_CHANNEL_FRAME_COUNT * My_Pa_GetSampleSize( destinationFormat ) );\r
-\r
- (*converter)( destinationBuffer, 1, sourceBuffer, 1, MAX_PER_CHANNEL_FRAME_COUNT, &ditherState );\r
-\r
- /*\r
- Other ways we could test this would be:\r
- - pass a constant, check for a constant (wouldn't work with dither)\r
- - pass alternating +/-, check for the same...\r
- */\r
- if( TestNonZeroPresent( destinationBuffer, MAX_PER_CHANNEL_FRAME_COUNT * My_Pa_GetSampleSize( destinationFormat ) ) ){\r
- //printf( "PASSED\n" );\r
- passFailMatrix[sourceFormatIndex][destinationFormatIndex] = 1;\r
- }else{\r
- //printf( "FAILED\n" );\r
- passFailMatrix[sourceFormatIndex][destinationFormatIndex] = 0;\r
- }\r
-\r
- \r
- /* try to measure the noise floor (comparing output signal to a float32 sine wave) */\r
-\r
- if( passFailMatrix[sourceFormatIndex][destinationFormatIndex] ){\r
-\r
- /* convert destination back to paFloat32 into source */\r
- converter = PaUtil_SelectConverter( destinationFormat, paFloat32, paNoFlag );\r
-\r
- memset( sourceBuffer, 0, MAX_PER_CHANNEL_FRAME_COUNT * My_Pa_GetSampleSize( paFloat32 ) );\r
- (*converter)( sourceBuffer, 1, destinationBuffer, 1, MAX_PER_CHANNEL_FRAME_COUNT, &ditherState );\r
-\r
- if( TestNonZeroPresent( sourceBuffer, MAX_PER_CHANNEL_FRAME_COUNT * My_Pa_GetSampleSize( paFloat32 ) ) ){\r
- \r
- noiseAmplitudeMatrix[sourceFormatIndex][destinationFormatIndex] = MaximumAbsDifference( (float*)sourceBuffer, (float*)referenceBuffer, MAX_PER_CHANNEL_FRAME_COUNT );\r
- \r
- }else{\r
- /* can't test noise floor because there is no conversion from dest format to float available */\r
- noiseAmplitudeMatrix[sourceFormatIndex][destinationFormatIndex] = -1; // mark as failed\r
- }\r
- }else{\r
- noiseAmplitudeMatrix[sourceFormatIndex][destinationFormatIndex] = -1; // mark as failed\r
- }\r
- }\r
- }\r
-\r
- printf( "\n" );\r
- printf( "=== Output contains non-zero data ===\n" );\r
- printf( "Key: . - pass, X - fail\n" );\r
- printf( "{{{\n" ); // trac preformated text tag\r
- printf( "in| out: " );\r
- for( destinationFormatIndex = 0; destinationFormatIndex < SAMPLE_FORMAT_COUNT; ++destinationFormatIndex ){\r
- printf( " %s ", abbreviatedSampleFormatNames_[destinationFormatIndex] );\r
- }\r
- printf( "\n" );\r
-\r
- for( sourceFormatIndex = 0; sourceFormatIndex < SAMPLE_FORMAT_COUNT; ++sourceFormatIndex ){\r
- printf( "%s ", abbreviatedSampleFormatNames_[sourceFormatIndex] );\r
- for( destinationFormatIndex = 0; destinationFormatIndex < SAMPLE_FORMAT_COUNT; ++destinationFormatIndex ){\r
- printf( " %s ", (passFailMatrix[sourceFormatIndex][destinationFormatIndex])? " ." : " X" );\r
- }\r
- printf( "\n" );\r
- }\r
- printf( "}}}\n" ); // trac preformated text tag\r
-\r
- printf( "\n" );\r
- printf( "=== Combined dynamic range (src->dest->float32) ===\n" );\r
- printf( "Key: Noise amplitude in dBfs, X - fail (either above failed or dest->float32 failed)\n" );\r
- printf( "{{{\n" ); // trac preformated text tag\r
- printf( "in| out: " );\r
- for( destinationFormatIndex = 0; destinationFormatIndex < SAMPLE_FORMAT_COUNT; ++destinationFormatIndex ){\r
- printf( " %s ", abbreviatedSampleFormatNames_[destinationFormatIndex] );\r
- }\r
- printf( "\n" );\r
-\r
- for( sourceFormatIndex = 0; sourceFormatIndex < SAMPLE_FORMAT_COUNT; ++sourceFormatIndex ){\r
- printf( " %s ", abbreviatedSampleFormatNames_[sourceFormatIndex] );\r
- for( destinationFormatIndex = 0; destinationFormatIndex < SAMPLE_FORMAT_COUNT; ++destinationFormatIndex ){\r
- amp = noiseAmplitudeMatrix[sourceFormatIndex][destinationFormatIndex];\r
- if( amp < 0. )\r
- printf( " X " );\r
- else\r
- printf( " % 6.1f ", 20.*log10(amp) );\r
- }\r
- printf( "\n" );\r
- }\r
- printf( "}}}\n" ); // trac preformated text tag\r
- }\r
-\r
-\r
- free( destinationBuffer );\r
- free( sourceBuffer );\r
- free( referenceBuffer );\r
-}\r
-\r
-// copied here for now otherwise we need to include the world just for this function.\r
-PaError My_Pa_GetSampleSize( PaSampleFormat format )\r
-{\r
- int result;\r
-\r
- switch( format & ~paNonInterleaved )\r
- {\r
-\r
- case paUInt8:\r
- case paInt8:\r
- result = 1;\r
- break;\r
-\r
- case paInt16:\r
- result = 2;\r
- break;\r
-\r
- case paInt24:\r
- result = 3;\r
- break;\r
-\r
- case paFloat32:\r
- case paInt32:\r
- result = 4;\r
- break;\r
-\r
- default:\r
- result = paSampleFormatNotSupported;\r
- break;\r
- }\r
-\r
- return (PaError) result;\r
-}\r
+/** @file patest_converters.c
+ @ingroup test_src
+ @brief Tests the converter functions in pa_converters.c
+ @author Ross Bencina <rossb@audiomulch.com>
+
+ Link with pa_dither.c and pa_converters.c
+
+ see http://www.portaudio.com/trac/wiki/V19ConvertersStatus for a discussion of this.
+*/
+/*
+ * $Id: $
+ *
+ * This program uses the PortAudio Portable Audio Library.
+ * For more information see: http://www.portaudio.com/
+ * Copyright (c) 1999-2008 Ross Bencina and Phil Burk
+ *
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * The text above constitutes the entire PortAudio license; however,
+ * the PortAudio community also makes the following non-binding requests:
+ *
+ * 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. It is also
+ * requested that these non-binding requests be included along with the
+ * license above.
+ */
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <math.h>
+
+#include "portaudio.h"
+#include "pa_converters.h"
+#include "pa_dither.h"
+#include "pa_types.h"
+#include "pa_endianness.h"
+
+#ifndef M_PI
+#define M_PI (3.14159265)
+#endif
+
+#define MAX_PER_CHANNEL_FRAME_COUNT (2048)
+#define MAX_CHANNEL_COUNT (8)
+
+
+#define SAMPLE_FORMAT_COUNT (6)
+
+static PaSampleFormat sampleFormats_[ SAMPLE_FORMAT_COUNT ] =
+ { paFloat32, paInt32, paInt24, paInt16, paInt8, paUInt8 }; /* all standard PA sample formats */
+
+static const char* sampleFormatNames_[SAMPLE_FORMAT_COUNT] =
+ { "paFloat32", "paInt32", "paInt24", "paInt16", "paInt8", "paUInt8" };
+
+
+static const char* abbreviatedSampleFormatNames_[SAMPLE_FORMAT_COUNT] =
+ { "f32", "i32", "i24", "i16", " i8", "ui8" };
+
+
+PaError My_Pa_GetSampleSize( PaSampleFormat format );
+
+/*
+ available flags are paClipOff and paDitherOff
+ clipping is usually applied for float -> int conversions
+ dither is usually applied for all downconversions (ie anything but 8bit->8bit conversions
+*/
+
+static int CanClip( PaSampleFormat sourceFormat, PaSampleFormat destinationFormat )
+{
+ if( sourceFormat == paFloat32 && destinationFormat != sourceFormat )
+ return 1;
+ else
+ return 0;
+}
+
+static int CanDither( PaSampleFormat sourceFormat, PaSampleFormat destinationFormat )
+{
+ if( sourceFormat < destinationFormat && sourceFormat != paInt8 )
+ return 1;
+ else
+ return 0;
+}
+
+static void GenerateOneCycleSineReference( double *out, int frameCount, int strideFrames )
+{
+ int i;
+ for( i=0; i < frameCount; ++i ){
+ *out = sin( ((double)i/(double)frameCount) * 2. * M_PI );
+ out += strideFrames;
+ }
+}
+
+
+static void GenerateOneCycleSine( PaSampleFormat format, void *buffer, int frameCount, int strideFrames )
+{
+ switch( format ){
+
+ case paFloat32:
+ {
+ int i;
+ float *out = (float*)buffer;
+ for( i=0; i < frameCount; ++i ){
+ *out = (float).9 * sin( ((double)i/(double)frameCount) * 2. * M_PI );
+ out += strideFrames;
+ }
+ }
+ break;
+ case paInt32:
+ {
+ int i;
+ PaInt32 *out = (PaInt32*)buffer;
+ for( i=0; i < frameCount; ++i ){
+ *out = (PaInt32)(.9 * sin( ((double)i/(double)frameCount) * 2. * M_PI ) * 0x7FFFFFFF);
+ out += strideFrames;
+ }
+ }
+ break;
+ case paInt24:
+ {
+ int i;
+ unsigned char *out = (unsigned char*)buffer;
+ for( i=0; i < frameCount; ++i ){
+ signed long temp = (PaInt32)(.9 * sin( ((double)i/(double)frameCount) * 2. * M_PI ) * 0x7FFFFFFF);
+
+ #if defined(PA_LITTLE_ENDIAN)
+ out[0] = (unsigned char)(temp >> 8) & 0xFF;
+ out[1] = (unsigned char)(temp >> 16) & 0xFF;
+ out[2] = (unsigned char)(temp >> 24) & 0xFF;
+ #elif defined(PA_BIG_ENDIAN)
+ out[0] = (unsigned char)(temp >> 24) & 0xFF;
+ out[1] = (unsigned char)(temp >> 16) & 0xFF;
+ out[2] = (unsigned char)(temp >> 8) & 0xFF;
+ #endif
+ out += 3;
+ }
+ }
+ break;
+ case paInt16:
+ {
+ int i;
+ PaInt16 *out = (PaInt16*)buffer;
+ for( i=0; i < frameCount; ++i ){
+ *out = (PaInt16)(.9 * sin( ((double)i/(double)frameCount) * 2. * M_PI ) * 0x7FFF );
+ out += strideFrames;
+ }
+ }
+ break;
+ case paInt8:
+ {
+ int i;
+ signed char *out = (signed char*)buffer;
+ for( i=0; i < frameCount; ++i ){
+ *out = (signed char)(.9 * sin( ((double)i/(double)frameCount) * 2. * M_PI ) * 0x7F );
+ out += strideFrames;
+ }
+ }
+ break;
+ case paUInt8:
+ {
+ int i;
+ unsigned char *out = (unsigned char*)buffer;
+ for( i=0; i < frameCount; ++i ){
+ *out = (unsigned char)( .5 * (1. + (.9 * sin( ((double)i/(double)frameCount) * 2. * M_PI ))) * 0xFF );
+ out += strideFrames;
+ }
+ }
+ break;
+ }
+}
+
+int TestNonZeroPresent( void *buffer, int size )
+{
+ char *p = (char*)buffer;
+ int i;
+
+ for( i=0; i < size; ++i ){
+
+ if( *p != 0 )
+ return 1;
+ ++p;
+ }
+
+ return 0;
+}
+
+float MaximumAbsDifference( float* sourceBuffer, float* referenceBuffer, int count )
+{
+ float result = 0;
+ float difference;
+ while( count-- ){
+ difference = fabs( *sourceBuffer++ - *referenceBuffer++ );
+ if( difference > result )
+ result = difference;
+ }
+
+ return result;
+}
+
+int main( const char **argv, int argc )
+{
+ PaUtilTriangularDitherGenerator ditherState;
+ PaUtilConverter *converter;
+ void *destinationBuffer, *sourceBuffer;
+ double *referenceBuffer;
+ int sourceFormatIndex, destinationFormatIndex;
+ PaSampleFormat sourceFormat, destinationFormat;
+ PaStreamFlags flags;
+ int passFailMatrix[SAMPLE_FORMAT_COUNT][SAMPLE_FORMAT_COUNT]; // [source][destination]
+ float noiseAmplitudeMatrix[SAMPLE_FORMAT_COUNT][SAMPLE_FORMAT_COUNT]; // [source][destination]
+ float amp;
+
+#define FLAG_COMBINATION_COUNT (4)
+ PaStreamFlags flagCombinations[FLAG_COMBINATION_COUNT] = { paNoFlag, paClipOff, paDitherOff, paClipOff | paDitherOff };
+ const char *flagCombinationNames[FLAG_COMBINATION_COUNT] = { "paNoFlag", "paClipOff", "paDitherOff", "paClipOff | paDitherOff" };
+ int flagCombinationIndex;
+
+ PaUtil_InitializeTriangularDitherState( &ditherState );
+
+ /* allocate more than enough space, we use sizeof(float) but we need to fit any 32 bit datum */
+
+ destinationBuffer = (void*)malloc( MAX_PER_CHANNEL_FRAME_COUNT * MAX_CHANNEL_COUNT * sizeof(float) );
+ sourceBuffer = (void*)malloc( MAX_PER_CHANNEL_FRAME_COUNT * MAX_CHANNEL_COUNT * sizeof(float) );
+ referenceBuffer = (void*)malloc( MAX_PER_CHANNEL_FRAME_COUNT * MAX_CHANNEL_COUNT * sizeof(float) );
+
+
+ /* the first round of tests simply iterates through the buffer combinations testing
+ that putting something in gives something out */
+
+ printf( "= Sine wave in, something out =\n" );
+
+ printf( "\n" );
+
+ GenerateOneCycleSine( paFloat32, referenceBuffer, MAX_PER_CHANNEL_FRAME_COUNT, 1 );
+
+ for( flagCombinationIndex = 0; flagCombinationIndex < FLAG_COMBINATION_COUNT; ++flagCombinationIndex ){
+ flags = flagCombinations[flagCombinationIndex];
+
+ printf( "\n" );
+ printf( "== flags = %s ==\n", flagCombinationNames[flagCombinationIndex] );
+
+ for( sourceFormatIndex = 0; sourceFormatIndex < SAMPLE_FORMAT_COUNT; ++sourceFormatIndex ){
+ for( destinationFormatIndex = 0; destinationFormatIndex < SAMPLE_FORMAT_COUNT; ++destinationFormatIndex ){
+ sourceFormat = sampleFormats_[sourceFormatIndex];
+ destinationFormat = sampleFormats_[destinationFormatIndex];
+ //printf( "%s -> %s ", sampleFormatNames_[ sourceFormatIndex ], sampleFormatNames_[ destinationFormatIndex ] );
+
+ converter = PaUtil_SelectConverter( sourceFormat, destinationFormat, flags );
+
+ /* source is a sinewave */
+ GenerateOneCycleSine( sourceFormat, sourceBuffer, MAX_PER_CHANNEL_FRAME_COUNT, 1 );
+
+ /* zero destination */
+ memset( destinationBuffer, 0, MAX_PER_CHANNEL_FRAME_COUNT * My_Pa_GetSampleSize( destinationFormat ) );
+
+ (*converter)( destinationBuffer, 1, sourceBuffer, 1, MAX_PER_CHANNEL_FRAME_COUNT, &ditherState );
+
+ /*
+ Other ways we could test this would be:
+ - pass a constant, check for a constant (wouldn't work with dither)
+ - pass alternating +/-, check for the same...
+ */
+ if( TestNonZeroPresent( destinationBuffer, MAX_PER_CHANNEL_FRAME_COUNT * My_Pa_GetSampleSize( destinationFormat ) ) ){
+ //printf( "PASSED\n" );
+ passFailMatrix[sourceFormatIndex][destinationFormatIndex] = 1;
+ }else{
+ //printf( "FAILED\n" );
+ passFailMatrix[sourceFormatIndex][destinationFormatIndex] = 0;
+ }
+
+
+ /* try to measure the noise floor (comparing output signal to a float32 sine wave) */
+
+ if( passFailMatrix[sourceFormatIndex][destinationFormatIndex] ){
+
+ /* convert destination back to paFloat32 into source */
+ converter = PaUtil_SelectConverter( destinationFormat, paFloat32, paNoFlag );
+
+ memset( sourceBuffer, 0, MAX_PER_CHANNEL_FRAME_COUNT * My_Pa_GetSampleSize( paFloat32 ) );
+ (*converter)( sourceBuffer, 1, destinationBuffer, 1, MAX_PER_CHANNEL_FRAME_COUNT, &ditherState );
+
+ if( TestNonZeroPresent( sourceBuffer, MAX_PER_CHANNEL_FRAME_COUNT * My_Pa_GetSampleSize( paFloat32 ) ) ){
+
+ noiseAmplitudeMatrix[sourceFormatIndex][destinationFormatIndex] = MaximumAbsDifference( (float*)sourceBuffer, (float*)referenceBuffer, MAX_PER_CHANNEL_FRAME_COUNT );
+
+ }else{
+ /* can't test noise floor because there is no conversion from dest format to float available */
+ noiseAmplitudeMatrix[sourceFormatIndex][destinationFormatIndex] = -1; // mark as failed
+ }
+ }else{
+ noiseAmplitudeMatrix[sourceFormatIndex][destinationFormatIndex] = -1; // mark as failed
+ }
+ }
+ }
+
+ printf( "\n" );
+ printf( "=== Output contains non-zero data ===\n" );
+ printf( "Key: . - pass, X - fail\n" );
+ printf( "{{{\n" ); // trac preformated text tag
+ printf( "in| out: " );
+ for( destinationFormatIndex = 0; destinationFormatIndex < SAMPLE_FORMAT_COUNT; ++destinationFormatIndex ){
+ printf( " %s ", abbreviatedSampleFormatNames_[destinationFormatIndex] );
+ }
+ printf( "\n" );
+
+ for( sourceFormatIndex = 0; sourceFormatIndex < SAMPLE_FORMAT_COUNT; ++sourceFormatIndex ){
+ printf( "%s ", abbreviatedSampleFormatNames_[sourceFormatIndex] );
+ for( destinationFormatIndex = 0; destinationFormatIndex < SAMPLE_FORMAT_COUNT; ++destinationFormatIndex ){
+ printf( " %s ", (passFailMatrix[sourceFormatIndex][destinationFormatIndex])? " ." : " X" );
+ }
+ printf( "\n" );
+ }
+ printf( "}}}\n" ); // trac preformated text tag
+
+ printf( "\n" );
+ printf( "=== Combined dynamic range (src->dest->float32) ===\n" );
+ printf( "Key: Noise amplitude in dBfs, X - fail (either above failed or dest->float32 failed)\n" );
+ printf( "{{{\n" ); // trac preformated text tag
+ printf( "in| out: " );
+ for( destinationFormatIndex = 0; destinationFormatIndex < SAMPLE_FORMAT_COUNT; ++destinationFormatIndex ){
+ printf( " %s ", abbreviatedSampleFormatNames_[destinationFormatIndex] );
+ }
+ printf( "\n" );
+
+ for( sourceFormatIndex = 0; sourceFormatIndex < SAMPLE_FORMAT_COUNT; ++sourceFormatIndex ){
+ printf( " %s ", abbreviatedSampleFormatNames_[sourceFormatIndex] );
+ for( destinationFormatIndex = 0; destinationFormatIndex < SAMPLE_FORMAT_COUNT; ++destinationFormatIndex ){
+ amp = noiseAmplitudeMatrix[sourceFormatIndex][destinationFormatIndex];
+ if( amp < 0. )
+ printf( " X " );
+ else
+ printf( " % 6.1f ", 20.*log10(amp) );
+ }
+ printf( "\n" );
+ }
+ printf( "}}}\n" ); // trac preformated text tag
+ }
+
+
+ free( destinationBuffer );
+ free( sourceBuffer );
+ free( referenceBuffer );
+}
+
+// copied here for now otherwise we need to include the world just for this function.
+PaError My_Pa_GetSampleSize( PaSampleFormat format )
+{
+ int result;
+
+ switch( format & ~paNonInterleaved )
+ {
+
+ case paUInt8:
+ case paInt8:
+ result = 1;
+ break;
+
+ case paInt16:
+ result = 2;
+ break;
+
+ case paInt24:
+ result = 3;
+ break;
+
+ case paFloat32:
+ case paInt32:
+ result = 4;
+ break;
+
+ default:
+ result = paSampleFormatNotSupported;
+ break;
+ }
+
+ return (PaError) result;
+}
-/*\r
- * $Id: $\r
- * Portable Audio I/O Library\r
- * Windows DirectSound low level buffer user guided parameters search\r
- *\r
- * Copyright (c) 2010-2011 Ross Bencina\r
- *\r
- * Permission is hereby granted, free of charge, to any person obtaining\r
- * a copy of this software and associated documentation files\r
- * (the "Software"), to deal in the Software without restriction,\r
- * including without limitation the rights to use, copy, modify, merge,\r
- * publish, distribute, sublicense, and/or sell copies of the Software,\r
- * and to permit persons to whom the Software is furnished to do so,\r
- * subject to the following conditions:\r
- *\r
- * The above copyright notice and this permission notice shall be\r
- * included in all copies or substantial portions of the Software.\r
- *\r
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\r
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\r
- * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\r
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\r
- * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
- */\r
-\r
-/*\r
- * The text above constitutes the entire PortAudio license; however, \r
- * the PortAudio community also makes the following non-binding requests:\r
- *\r
- * Any person wishing to distribute modifications to the Software is\r
- * requested to send the modifications to the original developer so that\r
- * they can be incorporated into the canonical version. It is also \r
- * requested that these non-binding requests be included along with the \r
- * license above.\r
- */\r
-\r
-#include <stdio.h>\r
-#include <time.h>\r
-#include <math.h>\r
-\r
-#define _WIN32_WINNT 0x0501 /* for GetNativeSystemInfo */ \r
-#include <windows.h>\r
-//#include <mmsystem.h> /* required when using pa_win_wmme.h */\r
-\r
-#include <conio.h> /* for _getch */\r
-\r
-\r
-#include "portaudio.h"\r
-#include "pa_win_ds.h"\r
-\r
-\r
-#define DEFAULT_SAMPLE_RATE (44100.)\r
-\r
-#ifndef M_PI\r
-#define M_PI (3.14159265)\r
-#endif\r
-\r
-#define TABLE_SIZE (2048)\r
-\r
-#define CHANNEL_COUNT (2)\r
-\r
-\r
-/*******************************************************************/\r
-/* functions to query and print Windows version information */\r
-\r
-typedef BOOL (WINAPI *LPFN_ISWOW64PROCESS) (HANDLE, PBOOL);\r
-\r
-LPFN_ISWOW64PROCESS fnIsWow64Process;\r
-\r
-static BOOL IsWow64()\r
-{\r
- BOOL bIsWow64 = FALSE;\r
-\r
- //IsWow64Process is not available on all supported versions of Windows.\r
- //Use GetModuleHandle to get a handle to the DLL that contains the function\r
- //and GetProcAddress to get a pointer to the function if available.\r
-\r
- fnIsWow64Process = (LPFN_ISWOW64PROCESS) GetProcAddress(\r
- GetModuleHandle(TEXT("kernel32")),"IsWow64Process" );\r
-\r
- if(NULL != fnIsWow64Process)\r
- {\r
- if (!fnIsWow64Process(GetCurrentProcess(),&bIsWow64))\r
- {\r
- //handle error\r
- }\r
- }\r
- return bIsWow64;\r
-}\r
-\r
-static void printWindowsVersionInfo( FILE *fp )\r
-{\r
- OSVERSIONINFOEX osVersionInfoEx;\r
- SYSTEM_INFO systemInfo;\r
- const char *osName = "Unknown";\r
- const char *osProductType = "";\r
- const char *processorArchitecture = "Unknown";\r
-\r
- memset( &osVersionInfoEx, 0, sizeof(OSVERSIONINFOEX) );\r
- osVersionInfoEx.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);\r
- GetVersionEx( &osVersionInfoEx );\r
-\r
- \r
- if( osVersionInfoEx.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS ){\r
- switch( osVersionInfoEx.dwMinorVersion ){\r
- case 0: osName = "Windows 95"; break;\r
- case 10: osName = "Windows 98"; break; // could also be 98SE (I've seen code discriminate based \r
- // on osInfo.Version.Revision.ToString() == "2222A")\r
- case 90: osName = "Windows Me"; break;\r
- }\r
- }else if( osVersionInfoEx.dwPlatformId == VER_PLATFORM_WIN32_NT ){\r
- switch( osVersionInfoEx.dwMajorVersion ){\r
- case 3: osName = "Windows NT 3.51"; break;\r
- case 4: osName = "Windows NT 4.0"; break;\r
- case 5: switch( osVersionInfoEx.dwMinorVersion ){\r
- case 0: osName = "Windows 2000"; break;\r
- case 1: osName = "Windows XP"; break;\r
- case 2:\r
- if( osVersionInfoEx.wSuiteMask & 0x00008000 /*VER_SUITE_WH_SERVER*/ ){\r
- osName = "Windows Home Server";\r
- }else{\r
- if( osVersionInfoEx.wProductType == VER_NT_WORKSTATION ){\r
- osName = "Windows XP Professional x64 Edition (?)";\r
- }else{\r
- if( GetSystemMetrics(/*SM_SERVERR2*/89) == 0 )\r
- osName = "Windows Server 2003";\r
- else\r
- osName = "Windows Server 2003 R2";\r
- }\r
- }break;\r
- }break;\r
- case 6:switch( osVersionInfoEx.dwMinorVersion ){\r
- case 0: \r
- if( osVersionInfoEx.wProductType == VER_NT_WORKSTATION )\r
- osName = "Windows Vista";\r
- else\r
- osName = "Windows Server 2008";\r
- break;\r
- case 1: \r
- if( osVersionInfoEx.wProductType == VER_NT_WORKSTATION )\r
- osName = "Windows 7";\r
- else\r
- osName = "Windows Server 2008 R2";\r
- break;\r
- }break;\r
- }\r
- }\r
-\r
- if(osVersionInfoEx.dwMajorVersion == 4)\r
- {\r
- if(osVersionInfoEx.wProductType == VER_NT_WORKSTATION)\r
- osProductType = "Workstation";\r
- else if(osVersionInfoEx.wProductType == VER_NT_SERVER)\r
- osProductType = "Server";\r
- }\r
- else if(osVersionInfoEx.dwMajorVersion == 5)\r
- {\r
- if(osVersionInfoEx.wProductType == VER_NT_WORKSTATION)\r
- {\r
- if((osVersionInfoEx.wSuiteMask & VER_SUITE_PERSONAL) == VER_SUITE_PERSONAL)\r
- osProductType = "Home Edition"; // Windows XP Home Edition\r
- else\r
- osProductType = "Professional"; // Windows XP / Windows 2000 Professional\r
- }\r
- else if(osVersionInfoEx.wProductType == VER_NT_SERVER)\r
- {\r
- if(osVersionInfoEx.dwMinorVersion == 0) \r
- {\r
- if((osVersionInfoEx.wSuiteMask & VER_SUITE_DATACENTER) == VER_SUITE_DATACENTER)\r
- osProductType = "Datacenter Server"; // Windows 2000 Datacenter Server\r
- else if((osVersionInfoEx.wSuiteMask & VER_SUITE_ENTERPRISE) == VER_SUITE_ENTERPRISE)\r
- osProductType = "Advanced Server"; // Windows 2000 Advanced Server\r
- else\r
- osProductType = "Server"; // Windows 2000 Server\r
- }\r
- }\r
- else\r
- {\r
- if((osVersionInfoEx.wSuiteMask & VER_SUITE_DATACENTER) == VER_SUITE_DATACENTER)\r
- osProductType = "Datacenter Edition"; // Windows Server 2003 Datacenter Edition\r
- else if((osVersionInfoEx.wSuiteMask & VER_SUITE_ENTERPRISE) == VER_SUITE_ENTERPRISE)\r
- osProductType = "Enterprise Edition"; // Windows Server 2003 Enterprise Edition\r
- else if((osVersionInfoEx.wSuiteMask & VER_SUITE_BLADE) == VER_SUITE_BLADE)\r
- osProductType = "Web Edition"; // Windows Server 2003 Web Edition\r
- else\r
- osProductType = "Standard Edition"; // Windows Server 2003 Standard Edition\r
- }\r
- }\r
-\r
- memset( &systemInfo, 0, sizeof(SYSTEM_INFO) );\r
- GetNativeSystemInfo( &systemInfo );\r
-\r
- if( systemInfo.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_INTEL )\r
- processorArchitecture = "x86";\r
- else if( systemInfo.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64 )\r
- processorArchitecture = "x64";\r
- else if( systemInfo.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_IA64 )\r
- processorArchitecture = "Itanium";\r
-\r
-\r
- fprintf( fp, "OS name and edition: %s %s\n", osName, osProductType );\r
- fprintf( fp, "OS version: %d.%d.%d %S\n", \r
- osVersionInfoEx.dwMajorVersion, osVersionInfoEx.dwMinorVersion, \r
- osVersionInfoEx.dwBuildNumber, osVersionInfoEx.szCSDVersion );\r
- fprintf( fp, "Processor architecture: %s\n", processorArchitecture );\r
- fprintf( fp, "WoW64 process: %s\n", IsWow64() ? "Yes" : "No" );\r
-}\r
-\r
-static void printTimeAndDate( FILE *fp )\r
-{\r
- struct tm *local;\r
- time_t t;\r
-\r
- t = time(NULL);\r
- local = localtime(&t);\r
- fprintf(fp, "Local time and date: %s", asctime(local));\r
- local = gmtime(&t);\r
- fprintf(fp, "UTC time and date: %s", asctime(local));\r
-}\r
-\r
-/*******************************************************************/\r
-\r
-typedef struct\r
-{\r
- float sine[TABLE_SIZE];\r
- double phase;\r
- double phaseIncrement;\r
- volatile int fadeIn;\r
- volatile int fadeOut;\r
- double amp;\r
-}\r
-paTestData;\r
-\r
-static paTestData data;\r
-\r
-/* This routine will be called by the PortAudio engine when audio is needed.\r
-** It may called at interrupt level on some machines so don't do anything\r
-** that could mess up the system like calling malloc() or free().\r
-*/\r
-static int patestCallback( const void *inputBuffer, void *outputBuffer,\r
- unsigned long framesPerBuffer,\r
- const PaStreamCallbackTimeInfo* timeInfo,\r
- PaStreamCallbackFlags statusFlags,\r
- void *userData )\r
-{\r
- paTestData *data = (paTestData*)userData;\r
- float *out = (float*)outputBuffer;\r
- unsigned long i,j;\r
-\r
- (void) timeInfo; /* Prevent unused variable warnings. */\r
- (void) statusFlags;\r
- (void) inputBuffer;\r
- \r
- for( i=0; i<framesPerBuffer; i++ )\r
- {\r
- float x = data->sine[(int)data->phase];\r
- data->phase += data->phaseIncrement;\r
- if( data->phase >= TABLE_SIZE ){\r
- data->phase -= TABLE_SIZE;\r
- }\r
-\r
- x *= data->amp;\r
- if( data->fadeIn ){\r
- data->amp += .001;\r
- if( data->amp >= 1. )\r
- data->fadeIn = 0;\r
- }else if( data->fadeOut ){\r
- if( data->amp > 0 )\r
- data->amp -= .001;\r
- }\r
-\r
- for( j = 0; j < CHANNEL_COUNT; ++j ){\r
- *out++ = x;\r
- }\r
- }\r
- \r
- if( data->amp > 0 )\r
- return paContinue;\r
- else\r
- return paComplete;\r
-}\r
-\r
-\r
-#define YES 1\r
-#define NO 0\r
-\r
-\r
-static int playUntilKeyPress( int deviceIndex, float sampleRate, \r
- int framesPerUserBuffer, int framesPerDSoundBuffer )\r
-{\r
- PaStreamParameters outputParameters;\r
- PaWinDirectSoundStreamInfo directSoundStreamInfo;\r
- PaStream *stream;\r
- PaError err;\r
- int c;\r
-\r
- outputParameters.device = deviceIndex;\r
- outputParameters.channelCount = CHANNEL_COUNT;\r
- outputParameters.sampleFormat = paFloat32; /* 32 bit floating point processing */\r
- outputParameters.suggestedLatency = 0; /*Pa_GetDeviceInfo( outputParameters.device )->defaultLowOutputLatency;*/\r
- outputParameters.hostApiSpecificStreamInfo = NULL;\r
-\r
- directSoundStreamInfo.size = sizeof(PaWinDirectSoundStreamInfo);\r
- directSoundStreamInfo.hostApiType = paDirectSound; \r
- directSoundStreamInfo.version = 2;\r
- directSoundStreamInfo.flags = paWinDirectSoundUseLowLevelLatencyParameters;\r
- directSoundStreamInfo.framesPerBuffer = framesPerDSoundBuffer;\r
- outputParameters.hostApiSpecificStreamInfo = &directSoundStreamInfo;\r
-\r
- err = Pa_OpenStream(\r
- &stream,\r
- NULL, /* no input */\r
- &outputParameters,\r
- sampleRate,\r
- framesPerUserBuffer,\r
- paClipOff | paPrimeOutputBuffersUsingStreamCallback, /* we won't output out of range samples so don't bother clipping them */\r
- patestCallback,\r
- &data );\r
- if( err != paNoError ) goto error;\r
-\r
- data.amp = 0;\r
- data.fadeIn = 1;\r
- data.fadeOut = 0;\r
- data.phase = 0;\r
- data.phaseIncrement = 15 + ((rand()%100) / 10); // randomise pitch\r
-\r
- err = Pa_StartStream( stream );\r
- if( err != paNoError ) goto error;\r
-\r
-\r
- do{\r
- printf( "Trying buffer size %d.\nIf it sounds smooth (without clicks or glitches) press 'y', if it sounds bad press 'n' ('q' to quit)\n", framesPerDSoundBuffer );\r
- c = tolower(_getch());\r
- if( c == 'q' ){\r
- Pa_Terminate();\r
- exit(0);\r
- }\r
- }while( c != 'y' && c != 'n' );\r
-\r
- data.fadeOut = 1;\r
- while( Pa_IsStreamActive(stream) == 1 )\r
- Pa_Sleep( 100 );\r
-\r
- err = Pa_StopStream( stream );\r
- if( err != paNoError ) goto error;\r
-\r
- err = Pa_CloseStream( stream );\r
- if( err != paNoError ) goto error;\r
-\r
- return (c == 'y') ? YES : NO;\r
-\r
-error:\r
- return err;\r
-}\r
-\r
-/*******************************************************************/\r
-static void usage( int dsoundHostApiIndex )\r
-{\r
- int i;\r
-\r
- fprintf( stderr, "PortAudio DirectSound output latency user guided test\n" );\r
- fprintf( stderr, "Usage: x.exe dsound-device-index [sampleRate]\n" );\r
- fprintf( stderr, "Invalid device index. Use one of these:\n" );\r
- for( i=0; i < Pa_GetDeviceCount(); ++i ){\r
-\r
- if( Pa_GetDeviceInfo(i)->hostApi == dsoundHostApiIndex && Pa_GetDeviceInfo(i)->maxOutputChannels > 0 )\r
- fprintf( stderr, "%d (%s)\n", i, Pa_GetDeviceInfo(i)->name );\r
- }\r
- Pa_Terminate();\r
- exit(-1);\r
-}\r
-\r
-/*\r
- ideas: \r
- o- could be testing with 80% CPU load\r
- o- could test with different channel counts\r
-*/\r
-\r
-int main(int argc, char* argv[])\r
-{\r
- PaError err;\r
- int i;\r
- int deviceIndex;\r
- int dsoundBufferSize, smallestWorkingBufferSize;\r
- int smallestWorkingBufferingLatencyFrames;\r
- int min, max, mid;\r
- int testResult;\r
- FILE *resultsFp;\r
- int dsoundHostApiIndex;\r
- const PaHostApiInfo *dsoundHostApiInfo;\r
- double sampleRate = DEFAULT_SAMPLE_RATE;\r
-\r
- err = Pa_Initialize();\r
- if( err != paNoError ) goto error;\r
-\r
- dsoundHostApiIndex = Pa_HostApiTypeIdToHostApiIndex( paDirectSound );\r
- dsoundHostApiInfo = Pa_GetHostApiInfo( dsoundHostApiIndex );\r
-\r
- if( argc > 3 )\r
- usage(dsoundHostApiIndex);\r
-\r
- deviceIndex = dsoundHostApiInfo->defaultOutputDevice;\r
- if( argc >= 2 ){\r
- deviceIndex = -1;\r
- if( sscanf( argv[1], "%d", &deviceIndex ) != 1 )\r
- usage(dsoundHostApiInfo);\r
- if( deviceIndex < 0 || deviceIndex >= Pa_GetDeviceCount() || Pa_GetDeviceInfo(deviceIndex)->hostApi != dsoundHostApiIndex ){\r
- usage(dsoundHostApiInfo);\r
- }\r
- }\r
-\r
- printf( "Using device id %d (%s)\n", deviceIndex, Pa_GetDeviceInfo(deviceIndex)->name );\r
-\r
- if( argc >= 3 ){\r
- if( sscanf( argv[2], "%lf", &sampleRate ) != 1 )\r
- usage(dsoundHostApiIndex);\r
- }\r
-\r
- printf( "Testing with sample rate %f.\n", (float)sampleRate );\r
-\r
- \r
-\r
- /* initialise sinusoidal wavetable */\r
- for( i=0; i<TABLE_SIZE; i++ )\r
- {\r
- data.sine[i] = (float) sin( ((double)i/(double)TABLE_SIZE) * M_PI * 2. );\r
- }\r
-\r
- data.phase = 0;\r
-\r
- resultsFp = fopen( "results.txt", "at" );\r
- fprintf( resultsFp, "*** DirectSound smallest working output buffer sizes\n" );\r
-\r
- printTimeAndDate( resultsFp );\r
- printWindowsVersionInfo( resultsFp );\r
- \r
- fprintf( resultsFp, "audio device: %s\n", Pa_GetDeviceInfo( deviceIndex )->name );\r
- fflush( resultsFp );\r
-\r
- fprintf( resultsFp, "Sample rate: %f\n", (float)sampleRate );\r
- fprintf( resultsFp, "Smallest working buffer size (frames), Smallest working buffering latency (frames), Smallest working buffering latency (Seconds)\n" );\r
-\r
-\r
- /*\r
- Binary search after Niklaus Wirth\r
- from http://en.wikipedia.org/wiki/Binary_search_algorithm#The_algorithm\r
- */\r
- min = 1;\r
- max = (int)(sampleRate * .3); /* we assume that this size works 300ms */\r
- smallestWorkingBufferSize = 0;\r
-\r
- do{\r
- mid = min + ((max - min) / 2);\r
-\r
- dsoundBufferSize = mid;\r
- testResult = playUntilKeyPress( deviceIndex, sampleRate, 0, dsoundBufferSize );\r
-\r
- if( testResult == YES ){\r
- max = mid - 1;\r
- smallestWorkingBufferSize = dsoundBufferSize;\r
- }else{\r
- min = mid + 1;\r
- }\r
- \r
- }while( (min <= max) && (testResult == YES || testResult == NO) );\r
-\r
- smallestWorkingBufferingLatencyFrames = smallestWorkingBufferSize; /* not strictly true, but we're using an unspecified callback size, so kind of */\r
-\r
- printf( "Smallest working buffer size is: %d\n", smallestWorkingBufferSize );\r
- printf( "Corresponding to buffering latency of %d frames, or %f seconds.\n", smallestWorkingBufferingLatencyFrames, smallestWorkingBufferingLatencyFrames / sampleRate );\r
-\r
- fprintf( resultsFp, "%d, %d, %f\n", smallestWorkingBufferSize, smallestWorkingBufferingLatencyFrames, smallestWorkingBufferingLatencyFrames / sampleRate );\r
- fflush( resultsFp );\r
-\r
-\r
- /* power of 2 test. iterate to the smallest power of two that works */\r
-\r
- smallestWorkingBufferSize = 0;\r
- dsoundBufferSize = 64;\r
-\r
- do{\r
- testResult = playUntilKeyPress( deviceIndex, sampleRate, 0, dsoundBufferSize );\r
-\r
- if( testResult == YES ){\r
- smallestWorkingBufferSize = dsoundBufferSize;\r
- }else{\r
- dsoundBufferSize *= 2;\r
- }\r
-\r
- }while( (dsoundBufferSize <= (int)(sampleRate * .3)) && testResult == NO );\r
- \r
- smallestWorkingBufferingLatencyFrames = smallestWorkingBufferSize; /* not strictly true, but we're using an unspecified callback size, so kind of */\r
-\r
- fprintf( resultsFp, "%d, %d, %f\n", smallestWorkingBufferSize, smallestWorkingBufferingLatencyFrames, smallestWorkingBufferingLatencyFrames / sampleRate );\r
- fflush( resultsFp );\r
-\r
-\r
- fprintf( resultsFp, "###\n" );\r
- fclose( resultsFp );\r
- \r
- Pa_Terminate();\r
- printf("Test finished.\n");\r
- \r
- return err;\r
-error:\r
- Pa_Terminate();\r
- fprintf( stderr, "An error occurred while using the PortAudio stream\n" );\r
- fprintf( stderr, "Error number: %d\n", err );\r
- fprintf( stderr, "Error message: %s\n", Pa_GetErrorText( err ) );\r
- return err;\r
-}\r
-\r
+/*
+ * $Id: $
+ * Portable Audio I/O Library
+ * Windows DirectSound low level buffer user guided parameters search
+ *
+ * Copyright (c) 2010-2011 Ross Bencina
+ *
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * The text above constitutes the entire PortAudio license; however,
+ * the PortAudio community also makes the following non-binding requests:
+ *
+ * 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. It is also
+ * requested that these non-binding requests be included along with the
+ * license above.
+ */
+
+#include <stdio.h>
+#include <time.h>
+#include <math.h>
+
+#define _WIN32_WINNT 0x0501 /* for GetNativeSystemInfo */
+#include <windows.h>
+//#include <mmsystem.h> /* required when using pa_win_wmme.h */
+
+#include <conio.h> /* for _getch */
+
+
+#include "portaudio.h"
+#include "pa_win_ds.h"
+
+
+#define DEFAULT_SAMPLE_RATE (44100.)
+
+#ifndef M_PI
+#define M_PI (3.14159265)
+#endif
+
+#define TABLE_SIZE (2048)
+
+#define CHANNEL_COUNT (2)
+
+
+/*******************************************************************/
+/* functions to query and print Windows version information */
+
+typedef BOOL (WINAPI *LPFN_ISWOW64PROCESS) (HANDLE, PBOOL);
+
+LPFN_ISWOW64PROCESS fnIsWow64Process;
+
+static BOOL IsWow64()
+{
+ BOOL bIsWow64 = FALSE;
+
+ //IsWow64Process is not available on all supported versions of Windows.
+ //Use GetModuleHandle to get a handle to the DLL that contains the function
+ //and GetProcAddress to get a pointer to the function if available.
+
+ fnIsWow64Process = (LPFN_ISWOW64PROCESS) GetProcAddress(
+ GetModuleHandle(TEXT("kernel32")),"IsWow64Process" );
+
+ if(NULL != fnIsWow64Process)
+ {
+ if (!fnIsWow64Process(GetCurrentProcess(),&bIsWow64))
+ {
+ //handle error
+ }
+ }
+ return bIsWow64;
+}
+
+static void printWindowsVersionInfo( FILE *fp )
+{
+ OSVERSIONINFOEX osVersionInfoEx;
+ SYSTEM_INFO systemInfo;
+ const char *osName = "Unknown";
+ const char *osProductType = "";
+ const char *processorArchitecture = "Unknown";
+
+ memset( &osVersionInfoEx, 0, sizeof(OSVERSIONINFOEX) );
+ osVersionInfoEx.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
+ GetVersionEx( &osVersionInfoEx );
+
+
+ if( osVersionInfoEx.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS ){
+ switch( osVersionInfoEx.dwMinorVersion ){
+ case 0: osName = "Windows 95"; break;
+ case 10: osName = "Windows 98"; break; // could also be 98SE (I've seen code discriminate based
+ // on osInfo.Version.Revision.ToString() == "2222A")
+ case 90: osName = "Windows Me"; break;
+ }
+ }else if( osVersionInfoEx.dwPlatformId == VER_PLATFORM_WIN32_NT ){
+ switch( osVersionInfoEx.dwMajorVersion ){
+ case 3: osName = "Windows NT 3.51"; break;
+ case 4: osName = "Windows NT 4.0"; break;
+ case 5: switch( osVersionInfoEx.dwMinorVersion ){
+ case 0: osName = "Windows 2000"; break;
+ case 1: osName = "Windows XP"; break;
+ case 2:
+ if( osVersionInfoEx.wSuiteMask & 0x00008000 /*VER_SUITE_WH_SERVER*/ ){
+ osName = "Windows Home Server";
+ }else{
+ if( osVersionInfoEx.wProductType == VER_NT_WORKSTATION ){
+ osName = "Windows XP Professional x64 Edition (?)";
+ }else{
+ if( GetSystemMetrics(/*SM_SERVERR2*/89) == 0 )
+ osName = "Windows Server 2003";
+ else
+ osName = "Windows Server 2003 R2";
+ }
+ }break;
+ }break;
+ case 6:switch( osVersionInfoEx.dwMinorVersion ){
+ case 0:
+ if( osVersionInfoEx.wProductType == VER_NT_WORKSTATION )
+ osName = "Windows Vista";
+ else
+ osName = "Windows Server 2008";
+ break;
+ case 1:
+ if( osVersionInfoEx.wProductType == VER_NT_WORKSTATION )
+ osName = "Windows 7";
+ else
+ osName = "Windows Server 2008 R2";
+ break;
+ }break;
+ }
+ }
+
+ if(osVersionInfoEx.dwMajorVersion == 4)
+ {
+ if(osVersionInfoEx.wProductType == VER_NT_WORKSTATION)
+ osProductType = "Workstation";
+ else if(osVersionInfoEx.wProductType == VER_NT_SERVER)
+ osProductType = "Server";
+ }
+ else if(osVersionInfoEx.dwMajorVersion == 5)
+ {
+ if(osVersionInfoEx.wProductType == VER_NT_WORKSTATION)
+ {
+ if((osVersionInfoEx.wSuiteMask & VER_SUITE_PERSONAL) == VER_SUITE_PERSONAL)
+ osProductType = "Home Edition"; // Windows XP Home Edition
+ else
+ osProductType = "Professional"; // Windows XP / Windows 2000 Professional
+ }
+ else if(osVersionInfoEx.wProductType == VER_NT_SERVER)
+ {
+ if(osVersionInfoEx.dwMinorVersion == 0)
+ {
+ if((osVersionInfoEx.wSuiteMask & VER_SUITE_DATACENTER) == VER_SUITE_DATACENTER)
+ osProductType = "Datacenter Server"; // Windows 2000 Datacenter Server
+ else if((osVersionInfoEx.wSuiteMask & VER_SUITE_ENTERPRISE) == VER_SUITE_ENTERPRISE)
+ osProductType = "Advanced Server"; // Windows 2000 Advanced Server
+ else
+ osProductType = "Server"; // Windows 2000 Server
+ }
+ }
+ else
+ {
+ if((osVersionInfoEx.wSuiteMask & VER_SUITE_DATACENTER) == VER_SUITE_DATACENTER)
+ osProductType = "Datacenter Edition"; // Windows Server 2003 Datacenter Edition
+ else if((osVersionInfoEx.wSuiteMask & VER_SUITE_ENTERPRISE) == VER_SUITE_ENTERPRISE)
+ osProductType = "Enterprise Edition"; // Windows Server 2003 Enterprise Edition
+ else if((osVersionInfoEx.wSuiteMask & VER_SUITE_BLADE) == VER_SUITE_BLADE)
+ osProductType = "Web Edition"; // Windows Server 2003 Web Edition
+ else
+ osProductType = "Standard Edition"; // Windows Server 2003 Standard Edition
+ }
+ }
+
+ memset( &systemInfo, 0, sizeof(SYSTEM_INFO) );
+ GetNativeSystemInfo( &systemInfo );
+
+ if( systemInfo.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_INTEL )
+ processorArchitecture = "x86";
+ else if( systemInfo.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64 )
+ processorArchitecture = "x64";
+ else if( systemInfo.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_IA64 )
+ processorArchitecture = "Itanium";
+
+
+ fprintf( fp, "OS name and edition: %s %s\n", osName, osProductType );
+ fprintf( fp, "OS version: %d.%d.%d %S\n",
+ osVersionInfoEx.dwMajorVersion, osVersionInfoEx.dwMinorVersion,
+ osVersionInfoEx.dwBuildNumber, osVersionInfoEx.szCSDVersion );
+ fprintf( fp, "Processor architecture: %s\n", processorArchitecture );
+ fprintf( fp, "WoW64 process: %s\n", IsWow64() ? "Yes" : "No" );
+}
+
+static void printTimeAndDate( FILE *fp )
+{
+ struct tm *local;
+ time_t t;
+
+ t = time(NULL);
+ local = localtime(&t);
+ fprintf(fp, "Local time and date: %s", asctime(local));
+ local = gmtime(&t);
+ fprintf(fp, "UTC time and date: %s", asctime(local));
+}
+
+/*******************************************************************/
+
+typedef struct
+{
+ float sine[TABLE_SIZE];
+ double phase;
+ double phaseIncrement;
+ volatile int fadeIn;
+ volatile int fadeOut;
+ double amp;
+}
+paTestData;
+
+static paTestData data;
+
+/* This routine will be called by the PortAudio engine when audio is needed.
+** It may called at interrupt level on some machines so don't do anything
+** that could mess up the system like calling malloc() or free().
+*/
+static int patestCallback( const void *inputBuffer, void *outputBuffer,
+ unsigned long framesPerBuffer,
+ const PaStreamCallbackTimeInfo* timeInfo,
+ PaStreamCallbackFlags statusFlags,
+ void *userData )
+{
+ paTestData *data = (paTestData*)userData;
+ float *out = (float*)outputBuffer;
+ unsigned long i,j;
+
+ (void) timeInfo; /* Prevent unused variable warnings. */
+ (void) statusFlags;
+ (void) inputBuffer;
+
+ for( i=0; i<framesPerBuffer; i++ )
+ {
+ float x = data->sine[(int)data->phase];
+ data->phase += data->phaseIncrement;
+ if( data->phase >= TABLE_SIZE ){
+ data->phase -= TABLE_SIZE;
+ }
+
+ x *= data->amp;
+ if( data->fadeIn ){
+ data->amp += .001;
+ if( data->amp >= 1. )
+ data->fadeIn = 0;
+ }else if( data->fadeOut ){
+ if( data->amp > 0 )
+ data->amp -= .001;
+ }
+
+ for( j = 0; j < CHANNEL_COUNT; ++j ){
+ *out++ = x;
+ }
+ }
+
+ if( data->amp > 0 )
+ return paContinue;
+ else
+ return paComplete;
+}
+
+
+#define YES 1
+#define NO 0
+
+
+static int playUntilKeyPress( int deviceIndex, float sampleRate,
+ int framesPerUserBuffer, int framesPerDSoundBuffer )
+{
+ PaStreamParameters outputParameters;
+ PaWinDirectSoundStreamInfo directSoundStreamInfo;
+ PaStream *stream;
+ PaError err;
+ int c;
+
+ outputParameters.device = deviceIndex;
+ outputParameters.channelCount = CHANNEL_COUNT;
+ outputParameters.sampleFormat = paFloat32; /* 32 bit floating point processing */
+ outputParameters.suggestedLatency = 0; /*Pa_GetDeviceInfo( outputParameters.device )->defaultLowOutputLatency;*/
+ outputParameters.hostApiSpecificStreamInfo = NULL;
+
+ directSoundStreamInfo.size = sizeof(PaWinDirectSoundStreamInfo);
+ directSoundStreamInfo.hostApiType = paDirectSound;
+ directSoundStreamInfo.version = 2;
+ directSoundStreamInfo.flags = paWinDirectSoundUseLowLevelLatencyParameters;
+ directSoundStreamInfo.framesPerBuffer = framesPerDSoundBuffer;
+ outputParameters.hostApiSpecificStreamInfo = &directSoundStreamInfo;
+
+ err = Pa_OpenStream(
+ &stream,
+ NULL, /* no input */
+ &outputParameters,
+ sampleRate,
+ framesPerUserBuffer,
+ paClipOff | paPrimeOutputBuffersUsingStreamCallback, /* we won't output out of range samples so don't bother clipping them */
+ patestCallback,
+ &data );
+ if( err != paNoError ) goto error;
+
+ data.amp = 0;
+ data.fadeIn = 1;
+ data.fadeOut = 0;
+ data.phase = 0;
+ data.phaseIncrement = 15 + ((rand()%100) / 10); // randomise pitch
+
+ err = Pa_StartStream( stream );
+ if( err != paNoError ) goto error;
+
+
+ do{
+ printf( "Trying buffer size %d.\nIf it sounds smooth (without clicks or glitches) press 'y', if it sounds bad press 'n' ('q' to quit)\n", framesPerDSoundBuffer );
+ c = tolower(_getch());
+ if( c == 'q' ){
+ Pa_Terminate();
+ exit(0);
+ }
+ }while( c != 'y' && c != 'n' );
+
+ data.fadeOut = 1;
+ while( Pa_IsStreamActive(stream) == 1 )
+ Pa_Sleep( 100 );
+
+ err = Pa_StopStream( stream );
+ if( err != paNoError ) goto error;
+
+ err = Pa_CloseStream( stream );
+ if( err != paNoError ) goto error;
+
+ return (c == 'y') ? YES : NO;
+
+error:
+ return err;
+}
+
+/*******************************************************************/
+static void usage( int dsoundHostApiIndex )
+{
+ int i;
+
+ fprintf( stderr, "PortAudio DirectSound output latency user guided test\n" );
+ fprintf( stderr, "Usage: x.exe dsound-device-index [sampleRate]\n" );
+ fprintf( stderr, "Invalid device index. Use one of these:\n" );
+ for( i=0; i < Pa_GetDeviceCount(); ++i ){
+
+ if( Pa_GetDeviceInfo(i)->hostApi == dsoundHostApiIndex && Pa_GetDeviceInfo(i)->maxOutputChannels > 0 )
+ fprintf( stderr, "%d (%s)\n", i, Pa_GetDeviceInfo(i)->name );
+ }
+ Pa_Terminate();
+ exit(-1);
+}
+
+/*
+ ideas:
+ o- could be testing with 80% CPU load
+ o- could test with different channel counts
+*/
+
+int main(int argc, char* argv[])
+{
+ PaError err;
+ int i;
+ int deviceIndex;
+ int dsoundBufferSize, smallestWorkingBufferSize;
+ int smallestWorkingBufferingLatencyFrames;
+ int min, max, mid;
+ int testResult;
+ FILE *resultsFp;
+ int dsoundHostApiIndex;
+ const PaHostApiInfo *dsoundHostApiInfo;
+ double sampleRate = DEFAULT_SAMPLE_RATE;
+
+ err = Pa_Initialize();
+ if( err != paNoError ) goto error;
+
+ dsoundHostApiIndex = Pa_HostApiTypeIdToHostApiIndex( paDirectSound );
+ dsoundHostApiInfo = Pa_GetHostApiInfo( dsoundHostApiIndex );
+
+ if( argc > 3 )
+ usage(dsoundHostApiIndex);
+
+ deviceIndex = dsoundHostApiInfo->defaultOutputDevice;
+ if( argc >= 2 ){
+ deviceIndex = -1;
+ if( sscanf( argv[1], "%d", &deviceIndex ) != 1 )
+ usage(dsoundHostApiInfo);
+ if( deviceIndex < 0 || deviceIndex >= Pa_GetDeviceCount() || Pa_GetDeviceInfo(deviceIndex)->hostApi != dsoundHostApiIndex ){
+ usage(dsoundHostApiInfo);
+ }
+ }
+
+ printf( "Using device id %d (%s)\n", deviceIndex, Pa_GetDeviceInfo(deviceIndex)->name );
+
+ if( argc >= 3 ){
+ if( sscanf( argv[2], "%lf", &sampleRate ) != 1 )
+ usage(dsoundHostApiIndex);
+ }
+
+ printf( "Testing with sample rate %f.\n", (float)sampleRate );
+
+
+
+ /* initialise sinusoidal wavetable */
+ for( i=0; i<TABLE_SIZE; i++ )
+ {
+ data.sine[i] = (float) sin( ((double)i/(double)TABLE_SIZE) * M_PI * 2. );
+ }
+
+ data.phase = 0;
+
+ resultsFp = fopen( "results.txt", "at" );
+ fprintf( resultsFp, "*** DirectSound smallest working output buffer sizes\n" );
+
+ printTimeAndDate( resultsFp );
+ printWindowsVersionInfo( resultsFp );
+
+ fprintf( resultsFp, "audio device: %s\n", Pa_GetDeviceInfo( deviceIndex )->name );
+ fflush( resultsFp );
+
+ fprintf( resultsFp, "Sample rate: %f\n", (float)sampleRate );
+ fprintf( resultsFp, "Smallest working buffer size (frames), Smallest working buffering latency (frames), Smallest working buffering latency (Seconds)\n" );
+
+
+ /*
+ Binary search after Niklaus Wirth
+ from http://en.wikipedia.org/wiki/Binary_search_algorithm#The_algorithm
+ */
+ min = 1;
+ max = (int)(sampleRate * .3); /* we assume that this size works 300ms */
+ smallestWorkingBufferSize = 0;
+
+ do{
+ mid = min + ((max - min) / 2);
+
+ dsoundBufferSize = mid;
+ testResult = playUntilKeyPress( deviceIndex, sampleRate, 0, dsoundBufferSize );
+
+ if( testResult == YES ){
+ max = mid - 1;
+ smallestWorkingBufferSize = dsoundBufferSize;
+ }else{
+ min = mid + 1;
+ }
+
+ }while( (min <= max) && (testResult == YES || testResult == NO) );
+
+ smallestWorkingBufferingLatencyFrames = smallestWorkingBufferSize; /* not strictly true, but we're using an unspecified callback size, so kind of */
+
+ printf( "Smallest working buffer size is: %d\n", smallestWorkingBufferSize );
+ printf( "Corresponding to buffering latency of %d frames, or %f seconds.\n", smallestWorkingBufferingLatencyFrames, smallestWorkingBufferingLatencyFrames / sampleRate );
+
+ fprintf( resultsFp, "%d, %d, %f\n", smallestWorkingBufferSize, smallestWorkingBufferingLatencyFrames, smallestWorkingBufferingLatencyFrames / sampleRate );
+ fflush( resultsFp );
+
+
+ /* power of 2 test. iterate to the smallest power of two that works */
+
+ smallestWorkingBufferSize = 0;
+ dsoundBufferSize = 64;
+
+ do{
+ testResult = playUntilKeyPress( deviceIndex, sampleRate, 0, dsoundBufferSize );
+
+ if( testResult == YES ){
+ smallestWorkingBufferSize = dsoundBufferSize;
+ }else{
+ dsoundBufferSize *= 2;
+ }
+
+ }while( (dsoundBufferSize <= (int)(sampleRate * .3)) && testResult == NO );
+
+ smallestWorkingBufferingLatencyFrames = smallestWorkingBufferSize; /* not strictly true, but we're using an unspecified callback size, so kind of */
+
+ fprintf( resultsFp, "%d, %d, %f\n", smallestWorkingBufferSize, smallestWorkingBufferingLatencyFrames, smallestWorkingBufferingLatencyFrames / sampleRate );
+ fflush( resultsFp );
+
+
+ fprintf( resultsFp, "###\n" );
+ fclose( resultsFp );
+
+ Pa_Terminate();
+ printf("Test finished.\n");
+
+ return err;
+error:
+ Pa_Terminate();
+ fprintf( stderr, "An error occurred while using the PortAudio stream\n" );
+ fprintf( stderr, "Error number: %d\n", err );
+ fprintf( stderr, "Error message: %s\n", Pa_GetErrorText( err ) );
+ return err;
+}
+
-/*\r
- * $Id: $\r
- * Portable Audio I/O Library\r
- * Windows DirectSound low level buffer parameters test\r
- *\r
- * Copyright (c) 2011 Ross Bencina\r
- *\r
- * Permission is hereby granted, free of charge, to any person obtaining\r
- * a copy of this software and associated documentation files\r
- * (the "Software"), to deal in the Software without restriction,\r
- * including without limitation the rights to use, copy, modify, merge,\r
- * publish, distribute, sublicense, and/or sell copies of the Software,\r
- * and to permit persons to whom the Software is furnished to do so,\r
- * subject to the following conditions:\r
- *\r
- * The above copyright notice and this permission notice shall be\r
- * included in all copies or substantial portions of the Software.\r
- *\r
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\r
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\r
- * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\r
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\r
- * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
- */\r
-\r
-/*\r
- * The text above constitutes the entire PortAudio license; however, \r
- * the PortAudio community also makes the following non-binding requests:\r
- *\r
- * Any person wishing to distribute modifications to the Software is\r
- * requested to send the modifications to the original developer so that\r
- * they can be incorporated into the canonical version. It is also \r
- * requested that these non-binding requests be included along with the \r
- * license above.\r
- */\r
-\r
-#include <stdio.h>\r
-#include <math.h>\r
-\r
-#include "portaudio.h"\r
-#include "pa_win_ds.h"\r
-\r
-#define NUM_SECONDS (6)\r
-#define SAMPLE_RATE (44100)\r
-\r
-#define DSOUND_FRAMES_PER_HOST_BUFFER (256*2) //(440*10)\r
-\r
-#define FRAMES_PER_BUFFER 256\r
-\r
-#ifndef M_PI\r
-#define M_PI (3.14159265)\r
-#endif\r
-\r
-#define TABLE_SIZE (2048)\r
-\r
-#define CHANNEL_COUNT (2)\r
-\r
-\r
-typedef struct\r
-{\r
- float sine[TABLE_SIZE];\r
- double phase;\r
-}\r
-paTestData;\r
-\r
-/* This routine will be called by the PortAudio engine when audio is needed.\r
-** It may called at interrupt level on some machines so don't do anything\r
-** that could mess up the system like calling malloc() or free().\r
-*/\r
-static int patestCallback( const void *inputBuffer, void *outputBuffer,\r
- unsigned long framesPerBuffer,\r
- const PaStreamCallbackTimeInfo* timeInfo,\r
- PaStreamCallbackFlags statusFlags,\r
- void *userData )\r
-{\r
- paTestData *data = (paTestData*)userData;\r
- float *out = (float*)outputBuffer;\r
- unsigned long i,j;\r
-\r
- (void) timeInfo; /* Prevent unused variable warnings. */\r
- (void) statusFlags;\r
- (void) inputBuffer;\r
- \r
- for( i=0; i<framesPerBuffer; i++ )\r
- {\r
- float x = data->sine[(int)data->phase];\r
- data->phase += 20;\r
- if( data->phase >= TABLE_SIZE ){\r
- data->phase -= TABLE_SIZE;\r
- }\r
-\r
- for( j = 0; j < CHANNEL_COUNT; ++j ){\r
- *out++ = x;\r
- }\r
- }\r
- \r
- return paContinue;\r
-}\r
-\r
-/*******************************************************************/\r
-int main(int argc, char* argv[])\r
-{\r
- PaStreamParameters outputParameters;\r
- PaWinDirectSoundStreamInfo dsoundStreamInfo;\r
- PaStream *stream;\r
- PaError err;\r
- paTestData data;\r
- int i;\r
- int deviceIndex;\r
-\r
- printf("PortAudio Test: output a sine blip on each channel. SR = %d, BufSize = %d, Chans = %d\n", SAMPLE_RATE, FRAMES_PER_BUFFER, CHANNEL_COUNT);\r
-\r
- err = Pa_Initialize();\r
- if( err != paNoError ) goto error;\r
-\r
- deviceIndex = Pa_GetHostApiInfo( Pa_HostApiTypeIdToHostApiIndex( paDirectSound ) )->defaultOutputDevice;\r
- if( argc == 2 ){\r
- sscanf( argv[1], "%d", &deviceIndex );\r
- }\r
-\r
- printf( "using device id %d (%s)\n", deviceIndex, Pa_GetDeviceInfo(deviceIndex)->name );\r
-\r
- /* initialise sinusoidal wavetable */\r
- for( i=0; i<TABLE_SIZE; i++ )\r
- {\r
- data.sine[i] = (float) sin( ((double)i/(double)TABLE_SIZE) * M_PI * 2. );\r
- }\r
-\r
- data.phase = 0;\r
-\r
- outputParameters.device = deviceIndex;\r
- outputParameters.channelCount = CHANNEL_COUNT;\r
- outputParameters.sampleFormat = paFloat32; /* 32 bit floating point processing */\r
- outputParameters.suggestedLatency = 0; /*Pa_GetDeviceInfo( outputParameters.device )->defaultLowOutputLatency;*/\r
- outputParameters.hostApiSpecificStreamInfo = NULL;\r
-\r
- dsoundStreamInfo.size = sizeof(PaWinDirectSoundStreamInfo);\r
- dsoundStreamInfo.hostApiType = paDirectSound; \r
- dsoundStreamInfo.version = 2;\r
- dsoundStreamInfo.flags = paWinDirectSoundUseLowLevelLatencyParameters;\r
- dsoundStreamInfo.framesPerBuffer = DSOUND_FRAMES_PER_HOST_BUFFER;\r
- outputParameters.hostApiSpecificStreamInfo = &dsoundStreamInfo;\r
- \r
-\r
- if( Pa_IsFormatSupported( 0, &outputParameters, SAMPLE_RATE ) == paFormatIsSupported ){\r
- printf( "Pa_IsFormatSupported reports device will support %d channels.\n", CHANNEL_COUNT );\r
- }else{\r
- printf( "Pa_IsFormatSupported reports device will not support %d channels.\n", CHANNEL_COUNT );\r
- }\r
-\r
- err = Pa_OpenStream(\r
- &stream,\r
- NULL, /* no input */\r
- &outputParameters,\r
- SAMPLE_RATE,\r
- FRAMES_PER_BUFFER,\r
- paClipOff, /* we won't output out of range samples so don't bother clipping them */\r
- patestCallback,\r
- &data );\r
- if( err != paNoError ) goto error;\r
-\r
- err = Pa_StartStream( stream );\r
- if( err != paNoError ) goto error;\r
-\r
- printf("Play for %d seconds.\n", NUM_SECONDS );\r
- Pa_Sleep( NUM_SECONDS * 1000 );\r
-\r
- err = Pa_StopStream( stream );\r
- if( err != paNoError ) goto error;\r
-\r
- err = Pa_CloseStream( stream );\r
- if( err != paNoError ) goto error;\r
-\r
- Pa_Terminate();\r
- printf("Test finished.\n");\r
- \r
- return err;\r
-error:\r
- Pa_Terminate();\r
- fprintf( stderr, "An error occured while using the portaudio stream\n" );\r
- fprintf( stderr, "Error number: %d\n", err );\r
- fprintf( stderr, "Error message: %s\n", Pa_GetErrorText( err ) );\r
- return err;\r
-}\r
-\r
+/*
+ * $Id: $
+ * Portable Audio I/O Library
+ * Windows DirectSound low level buffer parameters test
+ *
+ * Copyright (c) 2011 Ross Bencina
+ *
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * The text above constitutes the entire PortAudio license; however,
+ * the PortAudio community also makes the following non-binding requests:
+ *
+ * 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. It is also
+ * requested that these non-binding requests be included along with the
+ * license above.
+ */
+
+#include <stdio.h>
+#include <math.h>
+
+#include "portaudio.h"
+#include "pa_win_ds.h"
+
+#define NUM_SECONDS (6)
+#define SAMPLE_RATE (44100)
+
+#define DSOUND_FRAMES_PER_HOST_BUFFER (256*2) //(440*10)
+
+#define FRAMES_PER_BUFFER 256
+
+#ifndef M_PI
+#define M_PI (3.14159265)
+#endif
+
+#define TABLE_SIZE (2048)
+
+#define CHANNEL_COUNT (2)
+
+
+typedef struct
+{
+ float sine[TABLE_SIZE];
+ double phase;
+}
+paTestData;
+
+/* This routine will be called by the PortAudio engine when audio is needed.
+** It may called at interrupt level on some machines so don't do anything
+** that could mess up the system like calling malloc() or free().
+*/
+static int patestCallback( const void *inputBuffer, void *outputBuffer,
+ unsigned long framesPerBuffer,
+ const PaStreamCallbackTimeInfo* timeInfo,
+ PaStreamCallbackFlags statusFlags,
+ void *userData )
+{
+ paTestData *data = (paTestData*)userData;
+ float *out = (float*)outputBuffer;
+ unsigned long i,j;
+
+ (void) timeInfo; /* Prevent unused variable warnings. */
+ (void) statusFlags;
+ (void) inputBuffer;
+
+ for( i=0; i<framesPerBuffer; i++ )
+ {
+ float x = data->sine[(int)data->phase];
+ data->phase += 20;
+ if( data->phase >= TABLE_SIZE ){
+ data->phase -= TABLE_SIZE;
+ }
+
+ for( j = 0; j < CHANNEL_COUNT; ++j ){
+ *out++ = x;
+ }
+ }
+
+ return paContinue;
+}
+
+/*******************************************************************/
+int main(int argc, char* argv[])
+{
+ PaStreamParameters outputParameters;
+ PaWinDirectSoundStreamInfo dsoundStreamInfo;
+ PaStream *stream;
+ PaError err;
+ paTestData data;
+ int i;
+ int deviceIndex;
+
+ printf("PortAudio Test: output a sine blip on each channel. SR = %d, BufSize = %d, Chans = %d\n", SAMPLE_RATE, FRAMES_PER_BUFFER, CHANNEL_COUNT);
+
+ err = Pa_Initialize();
+ if( err != paNoError ) goto error;
+
+ deviceIndex = Pa_GetHostApiInfo( Pa_HostApiTypeIdToHostApiIndex( paDirectSound ) )->defaultOutputDevice;
+ if( argc == 2 ){
+ sscanf( argv[1], "%d", &deviceIndex );
+ }
+
+ printf( "using device id %d (%s)\n", deviceIndex, Pa_GetDeviceInfo(deviceIndex)->name );
+
+ /* initialise sinusoidal wavetable */
+ for( i=0; i<TABLE_SIZE; i++ )
+ {
+ data.sine[i] = (float) sin( ((double)i/(double)TABLE_SIZE) * M_PI * 2. );
+ }
+
+ data.phase = 0;
+
+ outputParameters.device = deviceIndex;
+ outputParameters.channelCount = CHANNEL_COUNT;
+ outputParameters.sampleFormat = paFloat32; /* 32 bit floating point processing */
+ outputParameters.suggestedLatency = 0; /*Pa_GetDeviceInfo( outputParameters.device )->defaultLowOutputLatency;*/
+ outputParameters.hostApiSpecificStreamInfo = NULL;
+
+ dsoundStreamInfo.size = sizeof(PaWinDirectSoundStreamInfo);
+ dsoundStreamInfo.hostApiType = paDirectSound;
+ dsoundStreamInfo.version = 2;
+ dsoundStreamInfo.flags = paWinDirectSoundUseLowLevelLatencyParameters;
+ dsoundStreamInfo.framesPerBuffer = DSOUND_FRAMES_PER_HOST_BUFFER;
+ outputParameters.hostApiSpecificStreamInfo = &dsoundStreamInfo;
+
+
+ if( Pa_IsFormatSupported( 0, &outputParameters, SAMPLE_RATE ) == paFormatIsSupported ){
+ printf( "Pa_IsFormatSupported reports device will support %d channels.\n", CHANNEL_COUNT );
+ }else{
+ printf( "Pa_IsFormatSupported reports device will not support %d channels.\n", CHANNEL_COUNT );
+ }
+
+ err = Pa_OpenStream(
+ &stream,
+ NULL, /* no input */
+ &outputParameters,
+ SAMPLE_RATE,
+ FRAMES_PER_BUFFER,
+ paClipOff, /* we won't output out of range samples so don't bother clipping them */
+ patestCallback,
+ &data );
+ if( err != paNoError ) goto error;
+
+ err = Pa_StartStream( stream );
+ if( err != paNoError ) goto error;
+
+ printf("Play for %d seconds.\n", NUM_SECONDS );
+ Pa_Sleep( NUM_SECONDS * 1000 );
+
+ err = Pa_StopStream( stream );
+ if( err != paNoError ) goto error;
+
+ err = Pa_CloseStream( stream );
+ if( err != paNoError ) goto error;
+
+ Pa_Terminate();
+ printf("Test finished.\n");
+
+ return err;
+error:
+ Pa_Terminate();
+ fprintf( stderr, "An error occured while using the portaudio stream\n" );
+ fprintf( stderr, "Error number: %d\n", err );
+ fprintf( stderr, "Error message: %s\n", Pa_GetErrorText( err ) );
+ return err;
+}
+
-/*\r
- * $Id: $\r
- * Portable Audio I/O Library\r
- * Windows DirectSound surround sound output test\r
- *\r
- * Copyright (c) 2007 Ross Bencina\r
- *\r
- * Permission is hereby granted, free of charge, to any person obtaining\r
- * a copy of this software and associated documentation files\r
- * (the "Software"), to deal in the Software without restriction,\r
- * including without limitation the rights to use, copy, modify, merge,\r
- * publish, distribute, sublicense, and/or sell copies of the Software,\r
- * and to permit persons to whom the Software is furnished to do so,\r
- * subject to the following conditions:\r
- *\r
- * The above copyright notice and this permission notice shall be\r
- * included in all copies or substantial portions of the Software.\r
- *\r
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\r
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\r
- * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\r
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\r
- * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
- */\r
-\r
-/*\r
- * The text above constitutes the entire PortAudio license; however, \r
- * the PortAudio community also makes the following non-binding requests:\r
- *\r
- * Any person wishing to distribute modifications to the Software is\r
- * requested to send the modifications to the original developer so that\r
- * they can be incorporated into the canonical version. It is also \r
- * requested that these non-binding requests be included along with the \r
- * license above.\r
- */\r
-\r
-#include <stdio.h>\r
-#include <math.h>\r
-\r
-#include <windows.h> /* required when using pa_win_wmme.h */\r
-#include <mmsystem.h> /* required when using pa_win_wmme.h */\r
-\r
-#include "portaudio.h"\r
-#include "pa_win_ds.h"\r
-\r
-#define NUM_SECONDS (12)\r
-#define SAMPLE_RATE (44100)\r
-#define FRAMES_PER_BUFFER (64)\r
-\r
-#ifndef M_PI\r
-#define M_PI (3.14159265)\r
-#endif\r
-\r
-#define TABLE_SIZE (100)\r
-\r
-#define CHANNEL_COUNT (6)\r
-\r
-\r
-\r
-typedef struct\r
-{\r
- float sine[TABLE_SIZE];\r
- int phase;\r
- int currentChannel;\r
- int cycleCount;\r
-}\r
-paTestData;\r
-\r
-/* This routine will be called by the PortAudio engine when audio is needed.\r
-** It may called at interrupt level on some machines so don't do anything\r
-** that could mess up the system like calling malloc() or free().\r
-*/\r
-static int patestCallback( const void *inputBuffer, void *outputBuffer,\r
- unsigned long framesPerBuffer,\r
- const PaStreamCallbackTimeInfo* timeInfo,\r
- PaStreamCallbackFlags statusFlags,\r
- void *userData )\r
-{\r
- paTestData *data = (paTestData*)userData;\r
- float *out = (float*)outputBuffer;\r
- unsigned long i,j;\r
-\r
- (void) timeInfo; /* Prevent unused variable warnings. */\r
- (void) statusFlags;\r
- (void) inputBuffer;\r
- \r
- for( i=0; i<framesPerBuffer; i++ )\r
- {\r
- for( j = 0; j < CHANNEL_COUNT; ++j ){\r
- if( j == data->currentChannel && data->cycleCount < 4410 ){\r
- *out++ = data->sine[data->phase];\r
- data->phase += 1 + j; // play each channel at a different pitch so they can be distinguished\r
- if( data->phase >= TABLE_SIZE ){\r
- data->phase -= TABLE_SIZE;\r
- }\r
- }else{\r
- *out++ = 0;\r
- }\r
- }\r
- \r
- data->cycleCount++;\r
- if( data->cycleCount > 44100 ){\r
- data->cycleCount = 0;\r
-\r
- ++data->currentChannel;\r
- if( data->currentChannel >= CHANNEL_COUNT )\r
- data->currentChannel -= CHANNEL_COUNT;\r
- }\r
- }\r
- \r
- return paContinue;\r
-}\r
-\r
-/*******************************************************************/\r
-int main(int argc, char* argv[])\r
-{\r
- PaStreamParameters outputParameters;\r
- PaWinDirectSoundStreamInfo directSoundStreamInfo;\r
- PaStream *stream;\r
- PaError err;\r
- paTestData data;\r
- int i;\r
- int deviceIndex;\r
-\r
- printf("PortAudio Test: output a sine blip on each channel. SR = %d, BufSize = %d, Chans = %d\n", SAMPLE_RATE, FRAMES_PER_BUFFER, CHANNEL_COUNT);\r
-\r
- err = Pa_Initialize();\r
- if( err != paNoError ) goto error;\r
-\r
- deviceIndex = Pa_GetHostApiInfo( Pa_HostApiTypeIdToHostApiIndex( paDirectSound ) )->defaultOutputDevice;\r
- if( argc == 2 ){\r
- sscanf( argv[1], "%d", &deviceIndex );\r
- }\r
-\r
- printf( "using device id %d (%s)\n", deviceIndex, Pa_GetDeviceInfo(deviceIndex)->name );\r
-\r
- /* initialise sinusoidal wavetable */\r
- for( i=0; i<TABLE_SIZE; i++ )\r
- {\r
- data.sine[i] = (float) sin( ((double)i/(double)TABLE_SIZE) * M_PI * 2. );\r
- }\r
-\r
- data.phase = 0;\r
- data.currentChannel = 0;\r
- data.cycleCount = 0;\r
-\r
- outputParameters.device = deviceIndex;\r
- outputParameters.channelCount = CHANNEL_COUNT;\r
- outputParameters.sampleFormat = paFloat32; /* 32 bit floating point processing */\r
- outputParameters.suggestedLatency = Pa_GetDeviceInfo( outputParameters.device )->defaultLowOutputLatency;\r
- outputParameters.hostApiSpecificStreamInfo = NULL;\r
-\r
- /* it's not strictly necessary to provide a channelMask for surround sound\r
- output. But if you want to be sure which channel mask PortAudio will use\r
- then you should supply one */\r
- directSoundStreamInfo.size = sizeof(PaWinDirectSoundStreamInfo);\r
- directSoundStreamInfo.hostApiType = paDirectSound; \r
- directSoundStreamInfo.version = 1;\r
- directSoundStreamInfo.flags = paWinDirectSoundUseChannelMask;\r
- directSoundStreamInfo.channelMask = PAWIN_SPEAKER_5POINT1; /* request 5.1 output format */\r
- outputParameters.hostApiSpecificStreamInfo = &directSoundStreamInfo;\r
-\r
- if( Pa_IsFormatSupported( 0, &outputParameters, SAMPLE_RATE ) == paFormatIsSupported ){\r
- printf( "Pa_IsFormatSupported reports device will support %d channels.\n", CHANNEL_COUNT );\r
- }else{\r
- printf( "Pa_IsFormatSupported reports device will not support %d channels.\n", CHANNEL_COUNT );\r
- }\r
-\r
- err = Pa_OpenStream(\r
- &stream,\r
- NULL, /* no input */\r
- &outputParameters,\r
- SAMPLE_RATE,\r
- FRAMES_PER_BUFFER,\r
- paClipOff, /* we won't output out of range samples so don't bother clipping them */\r
- patestCallback,\r
- &data );\r
- if( err != paNoError ) goto error;\r
-\r
- err = Pa_StartStream( stream );\r
- if( err != paNoError ) goto error;\r
-\r
- printf("Play for %d seconds.\n", NUM_SECONDS );\r
- Pa_Sleep( NUM_SECONDS * 1000 );\r
-\r
- err = Pa_StopStream( stream );\r
- if( err != paNoError ) goto error;\r
-\r
- err = Pa_CloseStream( stream );\r
- if( err != paNoError ) goto error;\r
-\r
- Pa_Terminate();\r
- printf("Test finished.\n");\r
- \r
- return err;\r
-error:\r
- Pa_Terminate();\r
- fprintf( stderr, "An error occured while using the portaudio stream\n" );\r
- fprintf( stderr, "Error number: %d\n", err );\r
- fprintf( stderr, "Error message: %s\n", Pa_GetErrorText( err ) );\r
- return err;\r
-}\r
-\r
+/*
+ * $Id: $
+ * Portable Audio I/O Library
+ * Windows DirectSound surround sound output test
+ *
+ * Copyright (c) 2007 Ross Bencina
+ *
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * The text above constitutes the entire PortAudio license; however,
+ * the PortAudio community also makes the following non-binding requests:
+ *
+ * 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. It is also
+ * requested that these non-binding requests be included along with the
+ * license above.
+ */
+
+#include <stdio.h>
+#include <math.h>
+
+#include <windows.h> /* required when using pa_win_wmme.h */
+#include <mmsystem.h> /* required when using pa_win_wmme.h */
+
+#include "portaudio.h"
+#include "pa_win_ds.h"
+
+#define NUM_SECONDS (12)
+#define SAMPLE_RATE (44100)
+#define FRAMES_PER_BUFFER (64)
+
+#ifndef M_PI
+#define M_PI (3.14159265)
+#endif
+
+#define TABLE_SIZE (100)
+
+#define CHANNEL_COUNT (6)
+
+
+
+typedef struct
+{
+ float sine[TABLE_SIZE];
+ int phase;
+ int currentChannel;
+ int cycleCount;
+}
+paTestData;
+
+/* This routine will be called by the PortAudio engine when audio is needed.
+** It may called at interrupt level on some machines so don't do anything
+** that could mess up the system like calling malloc() or free().
+*/
+static int patestCallback( const void *inputBuffer, void *outputBuffer,
+ unsigned long framesPerBuffer,
+ const PaStreamCallbackTimeInfo* timeInfo,
+ PaStreamCallbackFlags statusFlags,
+ void *userData )
+{
+ paTestData *data = (paTestData*)userData;
+ float *out = (float*)outputBuffer;
+ unsigned long i,j;
+
+ (void) timeInfo; /* Prevent unused variable warnings. */
+ (void) statusFlags;
+ (void) inputBuffer;
+
+ for( i=0; i<framesPerBuffer; i++ )
+ {
+ for( j = 0; j < CHANNEL_COUNT; ++j ){
+ if( j == data->currentChannel && data->cycleCount < 4410 ){
+ *out++ = data->sine[data->phase];
+ data->phase += 1 + j; // play each channel at a different pitch so they can be distinguished
+ if( data->phase >= TABLE_SIZE ){
+ data->phase -= TABLE_SIZE;
+ }
+ }else{
+ *out++ = 0;
+ }
+ }
+
+ data->cycleCount++;
+ if( data->cycleCount > 44100 ){
+ data->cycleCount = 0;
+
+ ++data->currentChannel;
+ if( data->currentChannel >= CHANNEL_COUNT )
+ data->currentChannel -= CHANNEL_COUNT;
+ }
+ }
+
+ return paContinue;
+}
+
+/*******************************************************************/
+int main(int argc, char* argv[])
+{
+ PaStreamParameters outputParameters;
+ PaWinDirectSoundStreamInfo directSoundStreamInfo;
+ PaStream *stream;
+ PaError err;
+ paTestData data;
+ int i;
+ int deviceIndex;
+
+ printf("PortAudio Test: output a sine blip on each channel. SR = %d, BufSize = %d, Chans = %d\n", SAMPLE_RATE, FRAMES_PER_BUFFER, CHANNEL_COUNT);
+
+ err = Pa_Initialize();
+ if( err != paNoError ) goto error;
+
+ deviceIndex = Pa_GetHostApiInfo( Pa_HostApiTypeIdToHostApiIndex( paDirectSound ) )->defaultOutputDevice;
+ if( argc == 2 ){
+ sscanf( argv[1], "%d", &deviceIndex );
+ }
+
+ printf( "using device id %d (%s)\n", deviceIndex, Pa_GetDeviceInfo(deviceIndex)->name );
+
+ /* initialise sinusoidal wavetable */
+ for( i=0; i<TABLE_SIZE; i++ )
+ {
+ data.sine[i] = (float) sin( ((double)i/(double)TABLE_SIZE) * M_PI * 2. );
+ }
+
+ data.phase = 0;
+ data.currentChannel = 0;
+ data.cycleCount = 0;
+
+ outputParameters.device = deviceIndex;
+ outputParameters.channelCount = CHANNEL_COUNT;
+ outputParameters.sampleFormat = paFloat32; /* 32 bit floating point processing */
+ outputParameters.suggestedLatency = Pa_GetDeviceInfo( outputParameters.device )->defaultLowOutputLatency;
+ outputParameters.hostApiSpecificStreamInfo = NULL;
+
+ /* it's not strictly necessary to provide a channelMask for surround sound
+ output. But if you want to be sure which channel mask PortAudio will use
+ then you should supply one */
+ directSoundStreamInfo.size = sizeof(PaWinDirectSoundStreamInfo);
+ directSoundStreamInfo.hostApiType = paDirectSound;
+ directSoundStreamInfo.version = 1;
+ directSoundStreamInfo.flags = paWinDirectSoundUseChannelMask;
+ directSoundStreamInfo.channelMask = PAWIN_SPEAKER_5POINT1; /* request 5.1 output format */
+ outputParameters.hostApiSpecificStreamInfo = &directSoundStreamInfo;
+
+ if( Pa_IsFormatSupported( 0, &outputParameters, SAMPLE_RATE ) == paFormatIsSupported ){
+ printf( "Pa_IsFormatSupported reports device will support %d channels.\n", CHANNEL_COUNT );
+ }else{
+ printf( "Pa_IsFormatSupported reports device will not support %d channels.\n", CHANNEL_COUNT );
+ }
+
+ err = Pa_OpenStream(
+ &stream,
+ NULL, /* no input */
+ &outputParameters,
+ SAMPLE_RATE,
+ FRAMES_PER_BUFFER,
+ paClipOff, /* we won't output out of range samples so don't bother clipping them */
+ patestCallback,
+ &data );
+ if( err != paNoError ) goto error;
+
+ err = Pa_StartStream( stream );
+ if( err != paNoError ) goto error;
+
+ printf("Play for %d seconds.\n", NUM_SECONDS );
+ Pa_Sleep( NUM_SECONDS * 1000 );
+
+ err = Pa_StopStream( stream );
+ if( err != paNoError ) goto error;
+
+ err = Pa_CloseStream( stream );
+ if( err != paNoError ) goto error;
+
+ Pa_Terminate();
+ printf("Test finished.\n");
+
+ return err;
+error:
+ Pa_Terminate();
+ fprintf( stderr, "An error occured while using the portaudio stream\n" );
+ fprintf( stderr, "Error number: %d\n", err );
+ fprintf( stderr, "Error message: %s\n", Pa_GetErrorText( err ) );
+ return err;
+}
+
-/** @file pa_test_jack_wasapi.c\r
- @ingroup test_src\r
- @brief Print out jack information for WASAPI endpoints\r
- @author Reid Bishop <rbish@attglobal.net>\r
-*/\r
-/*\r
- * $Id: pa_test_jack_wasapi.c 1368 2008-03-01 00:38:27Z rbishop $\r
- *\r
- * This program uses the PortAudio Portable Audio Library.\r
- * For more information see: http://www.portaudio.com/\r
- * Copyright (c) 1999-2010 Ross Bencina and Phil Burk\r
- *\r
- * Permission is hereby granted, free of charge, to any person obtaining\r
- * a copy of this software and associated documentation files\r
- * (the "Software"), to deal in the Software without restriction,\r
- * including without limitation the rights to use, copy, modify, merge,\r
- * publish, distribute, sublicense, and/or sell copies of the Software,\r
- * and to permit persons to whom the Software is furnished to do so,\r
- * subject to the following conditions:\r
- *\r
- * The above copyright notice and this permission notice shall be\r
- * included in all copies or substantial portions of the Software.\r
- *\r
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\r
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\r
- * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\r
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\r
- * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
- */\r
-\r
-/*\r
- * The text above constitutes the entire PortAudio license; however, \r
- * the PortAudio community also makes the following non-binding requests:\r
- *\r
- * Any person wishing to distribute modifications to the Software is\r
- * requested to send the modifications to the original developer so that\r
- * they can be incorporated into the canonical version. It is also \r
- * requested that these non-binding requests be included along with the \r
- * license above.\r
- */\r
-#include <stdio.h>\r
-#include "portaudio.h"\r
-#include "pa_win_wasapi.h"\r
-\r
-\r
-/*\r
-* Helper function to determine if a given enum is present in mask variable\r
-*\r
-*/\r
-static int IsInMask(int val, int val2)\r
-{\r
- return ((val & val2) == val2);\r
-}\r
-\r
-/*\r
-* This routine enumerates through the ChannelMapping for the IJackDescription\r
-*/\r
-\r
-static void EnumIJackChannels(int channelMapping)\r
-{\r
- printf("Channel Mapping: ");\r
- if(channelMapping == PAWIN_SPEAKER_DIRECTOUT)\r
- {\r
- printf("DIRECTOUT\n");\r
- return;\r
- }\r
- if(IsInMask(channelMapping, PAWIN_SPEAKER_FRONT_LEFT))\r
- printf("FRONT_LEFT, ");\r
- if(IsInMask(channelMapping, PAWIN_SPEAKER_FRONT_RIGHT))\r
- printf("FRONT_RIGHT, ");\r
- if(IsInMask(channelMapping, PAWIN_SPEAKER_FRONT_CENTER))\r
- printf("FRONT_CENTER, ");\r
- if(IsInMask(channelMapping, PAWIN_SPEAKER_LOW_FREQUENCY))\r
- printf("LOW_FREQUENCY, ");\r
- if(IsInMask(channelMapping, PAWIN_SPEAKER_BACK_LEFT))\r
- printf("BACK_LEFT, ");\r
- if(IsInMask(channelMapping,PAWIN_SPEAKER_BACK_RIGHT))\r
- printf("BACK_RIGHT, ");\r
- if(IsInMask(channelMapping, PAWIN_SPEAKER_FRONT_LEFT_OF_CENTER))\r
- printf("FRONT_LEFT_OF_CENTER, ");\r
- if(IsInMask(channelMapping, PAWIN_SPEAKER_FRONT_RIGHT_OF_CENTER))\r
- printf("FRONT_RIGHT_OF_CENTER, ");\r
- if(IsInMask(channelMapping, PAWIN_SPEAKER_BACK_CENTER))\r
- printf("BACK_CENTER, ");\r
- if(IsInMask(channelMapping,PAWIN_SPEAKER_SIDE_LEFT))\r
- printf("SIDE_LEFT, ");\r
- if(IsInMask(channelMapping,PAWIN_SPEAKER_SIDE_RIGHT))\r
- printf("SIDE_RIGHT, ");\r
- if(IsInMask(channelMapping, PAWIN_SPEAKER_TOP_CENTER))\r
- printf("TOP_CENTER, ");\r
- if(IsInMask(channelMapping, PAWIN_SPEAKER_TOP_FRONT_LEFT))\r
- printf("TOP_FRONT_LEFT, ");\r
- if(IsInMask(channelMapping, PAWIN_SPEAKER_TOP_FRONT_CENTER))\r
- printf("TOP_FRONT_CENTER, ");\r
- if(IsInMask(channelMapping, PAWIN_SPEAKER_TOP_FRONT_RIGHT))\r
- printf("TOP_FRONT_RIGHT, ");\r
- if(IsInMask(channelMapping, PAWIN_SPEAKER_TOP_BACK_LEFT))\r
- printf("TOP_BACK_LEFT, ");\r
- if(IsInMask(channelMapping, PAWIN_SPEAKER_TOP_BACK_CENTER))\r
- printf("TOP_BACK_CENTER, ");\r
- if(IsInMask(channelMapping, PAWIN_SPEAKER_TOP_BACK_RIGHT))\r
- printf("TOP_BACK_RIGHT, ");\r
-\r
- printf("\n");\r
-}\r
-\r
-/*\r
-* This routine enumerates through the Jack Connection Types enums for IJackDescription\r
-*/\r
-static void EnumIJackConnectionType(int cType)\r
-{\r
- printf("Connection Type: ");\r
- switch(cType)\r
- {\r
- case eJackConnTypeUnknown:\r
- printf("eJackConnTypeUnknown");\r
- break;\r
- case eJackConnType3Point5mm:\r
- printf("eJackConnType3Point5mm");\r
- break;\r
- case eJackConnTypeQuarter:\r
- printf("eJackConnTypeQuarter");\r
- break;\r
- case eJackConnTypeAtapiInternal:\r
- printf("eJackConnTypeAtapiInternal");\r
- break;\r
- case eJackConnTypeRCA:\r
- printf("eJackConnTypeRCA");\r
- break;\r
- case eJackConnTypeOptical:\r
- printf("eJackConnTypeOptical");\r
- break;\r
- case eJackConnTypeOtherDigital:\r
- printf("eJackConnTypeOtherDigital");\r
- break;\r
- case eJackConnTypeOtherAnalog:\r
- printf("eJackConnTypeOtherAnalog");\r
- break;\r
- case eJackConnTypeMultichannelAnalogDIN:\r
- printf("eJackConnTypeMultichannelAnalogDIN");\r
- break;\r
- case eJackConnTypeXlrProfessional:\r
- printf("eJackConnTypeXlrProfessional");\r
- break;\r
- case eJackConnTypeRJ11Modem:\r
- printf("eJackConnTypeRJ11Modem");\r
- break;\r
- case eJackConnTypeCombination:\r
- printf("eJackConnTypeCombination");\r
- break;\r
- }\r
- printf("\n");\r
-}\r
-\r
-/*\r
-* This routine enumerates through the GeoLocation enums for the IJackDescription\r
-*/\r
-static void EnumIJackGeoLocation(int iVal)\r
-{\r
- printf("Geometric Location: ");\r
- switch(iVal)\r
- {\r
- case eJackGeoLocRear:\r
- printf("eJackGeoLocRear");\r
- break;\r
- case eJackGeoLocFront:\r
- printf("eJackGeoLocFront");\r
- break;\r
- case eJackGeoLocLeft:\r
- printf("eJackGeoLocLeft");\r
- break;\r
- case eJackGeoLocRight:\r
- printf("eJackGeoLocRight");\r
- break;\r
- case eJackGeoLocTop:\r
- printf("eJackGeoLocTop");\r
- break;\r
- case eJackGeoLocBottom:\r
- printf("eJackGeoLocBottom");\r
- break;\r
- case eJackGeoLocRearPanel:\r
- printf("eJackGeoLocRearPanel");\r
- break;\r
- case eJackGeoLocRiser:\r
- printf("eJackGeoLocRiser");\r
- break;\r
- case eJackGeoLocInsideMobileLid:\r
- printf("eJackGeoLocInsideMobileLid");\r
- break;\r
- case eJackGeoLocDrivebay:\r
- printf("eJackGeoLocDrivebay");\r
- break;\r
- case eJackGeoLocHDMI:\r
- printf("eJackGeoLocHDMI");\r
- break;\r
- case eJackGeoLocOutsideMobileLid:\r
- printf("eJackGeoLocOutsideMobileLid");\r
- break;\r
- case eJackGeoLocATAPI:\r
- printf("eJackGeoLocATAPI");\r
- break;\r
- }\r
- printf("\n");\r
-}\r
-\r
-/*\r
-* This routine enumerates through the GenLocation enums for the IJackDescription\r
-*/\r
-static void EnumIJackGenLocation(int iVal)\r
-{\r
- printf("General Location: ");\r
- switch(iVal)\r
- {\r
- case eJackGenLocPrimaryBox:\r
- printf("eJackGenLocPrimaryBox");\r
- break;\r
- case eJackGenLocInternal:\r
- printf("eJackGenLocInternal");\r
- break;\r
- case eJackGenLocSeparate:\r
- printf("eJackGenLocSeparate");\r
- break;\r
- case eJackGenLocOther:\r
- printf("eJackGenLocOther");\r
- break;\r
- }\r
- printf("\n");\r
-}\r
-\r
-/*\r
-* This routine enumerates through the PortConnection enums for the IJackDescription\r
-*/\r
-static void EnumIJackPortConnection(int iVal)\r
-{\r
- printf("Port Type: ");\r
- switch(iVal)\r
- {\r
- case eJackPortConnJack:\r
- printf("eJackPortConnJack");\r
- break;\r
- case eJackPortConnIntegratedDevice:\r
- printf("eJackPortConnIntegratedDevice");\r
- break;\r
- case eJackPortConnBothIntegratedAndJack:\r
- printf("eJackPortConnBothIntegratedAndJack");\r
- break;\r
- case eJackPortConnUnknown:\r
- printf("eJackPortConnUnknown");\r
- break;\r
- }\r
- printf("\n");\r
-}\r
-\r
-/*\r
-* This routine retrieves and parses the KSJACK_DESCRIPTION structure for\r
-* the provided device ID.\r
-*/\r
-static PaError GetJackInformation(int deviceId)\r
-{\r
- PaError err;\r
- int i;\r
- int jackCount = 0;\r
- PaWasapiJackDescription jackDesc;\r
-\r
- err = PaWasapi_GetJackCount(deviceId, &jackCount);\r
- if( err != paNoError ) return err;\r
-\r
- fprintf( stderr,"Number of Jacks: %d \n", jackCount );\r
-\r
- for( i = 0; i<jackCount; i++ )\r
- {\r
- fprintf( stderr,"Jack #%d:\n", i );\r
-\r
- err = PaWasapi_GetJackDescription(deviceId, i, &jackDesc);\r
- if( err != paNoError ) \r
- {\r
- fprintf( stderr,"Failed getting description." );\r
- continue;\r
- }\r
- else\r
- {\r
- printf("Is connected: %s\n",(jackDesc.isConnected)?"true":"false");\r
- EnumIJackChannels(jackDesc.channelMapping);\r
- EnumIJackConnectionType(jackDesc.connectionType);\r
- EnumIJackGeoLocation(jackDesc.geoLocation);\r
- EnumIJackGenLocation(jackDesc.genLocation);\r
- EnumIJackPortConnection(jackDesc.portConnection);\r
- printf("Jack Color: 0x%06X\n", jackDesc.color);\r
- printf("\n");\r
- }\r
- }\r
- return 0;\r
-}\r
-\r
-\r
-/*******************************************************************/\r
-int main(void);\r
-int main(void)\r
-{\r
- PaError err;\r
- const PaDeviceInfo *device;\r
- int i;\r
- int jackCount = 0;\r
- int isInput = 0;\r
-\r
- printf("PortAudio Test: WASAPI Jack Configuratin");\r
- err = Pa_Initialize();\r
- if( err != paNoError ) goto error;\r
-\r
- /* Find all WASAPI devices */\r
- for( i = 0; i < Pa_GetDeviceCount(); ++i )\r
- {\r
- device = Pa_GetDeviceInfo(i);\r
- if( Pa_GetDeviceInfo(i)->hostApi == Pa_HostApiTypeIdToHostApiIndex(paWASAPI) )\r
- {\r
- if( device->maxOutputChannels == 0 )\r
- {\r
- isInput = 1;\r
- }\r
- printf("------------------------------------------\n");\r
- printf("Device: %s",device->name);\r
- if(isInput)\r
- printf(" (Input) %d Channels\n",device->maxInputChannels);\r
- else\r
- printf(" (Output) %d Channels\n",device->maxOutputChannels);\r
- // Try to see if this WASAPI device can provide Jack information\r
- err = GetJackInformation(i);\r
- if( err != paNoError ) goto error;\r
- }\r
- }\r
- Pa_Terminate();\r
- printf("Test finished.\n");\r
- return err;\r
-\r
-error:\r
- Pa_Terminate();\r
- fprintf( stderr, "An error occured while using the portaudio stream\n" );\r
- fprintf( stderr, "Error number: %d\n", err );\r
- fprintf( stderr, "Error message: %s\n", Pa_GetErrorText( err ) );\r
- return err;\r
-}\r
+/** @file pa_test_jack_wasapi.c
+ @ingroup test_src
+ @brief Print out jack information for WASAPI endpoints
+ @author Reid Bishop <rbish@attglobal.net>
+*/
+/*
+ * $Id: pa_test_jack_wasapi.c 1368 2008-03-01 00:38:27Z rbishop $
+ *
+ * This program uses the PortAudio Portable Audio Library.
+ * For more information see: http://www.portaudio.com/
+ * Copyright (c) 1999-2010 Ross Bencina and Phil Burk
+ *
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * The text above constitutes the entire PortAudio license; however,
+ * the PortAudio community also makes the following non-binding requests:
+ *
+ * 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. It is also
+ * requested that these non-binding requests be included along with the
+ * license above.
+ */
+#include <stdio.h>
+#include "portaudio.h"
+#include "pa_win_wasapi.h"
+
+
+/*
+* Helper function to determine if a given enum is present in mask variable
+*
+*/
+static int IsInMask(int val, int val2)
+{
+ return ((val & val2) == val2);
+}
+
+/*
+* This routine enumerates through the ChannelMapping for the IJackDescription
+*/
+
+static void EnumIJackChannels(int channelMapping)
+{
+ printf("Channel Mapping: ");
+ if(channelMapping == PAWIN_SPEAKER_DIRECTOUT)
+ {
+ printf("DIRECTOUT\n");
+ return;
+ }
+ if(IsInMask(channelMapping, PAWIN_SPEAKER_FRONT_LEFT))
+ printf("FRONT_LEFT, ");
+ if(IsInMask(channelMapping, PAWIN_SPEAKER_FRONT_RIGHT))
+ printf("FRONT_RIGHT, ");
+ if(IsInMask(channelMapping, PAWIN_SPEAKER_FRONT_CENTER))
+ printf("FRONT_CENTER, ");
+ if(IsInMask(channelMapping, PAWIN_SPEAKER_LOW_FREQUENCY))
+ printf("LOW_FREQUENCY, ");
+ if(IsInMask(channelMapping, PAWIN_SPEAKER_BACK_LEFT))
+ printf("BACK_LEFT, ");
+ if(IsInMask(channelMapping,PAWIN_SPEAKER_BACK_RIGHT))
+ printf("BACK_RIGHT, ");
+ if(IsInMask(channelMapping, PAWIN_SPEAKER_FRONT_LEFT_OF_CENTER))
+ printf("FRONT_LEFT_OF_CENTER, ");
+ if(IsInMask(channelMapping, PAWIN_SPEAKER_FRONT_RIGHT_OF_CENTER))
+ printf("FRONT_RIGHT_OF_CENTER, ");
+ if(IsInMask(channelMapping, PAWIN_SPEAKER_BACK_CENTER))
+ printf("BACK_CENTER, ");
+ if(IsInMask(channelMapping,PAWIN_SPEAKER_SIDE_LEFT))
+ printf("SIDE_LEFT, ");
+ if(IsInMask(channelMapping,PAWIN_SPEAKER_SIDE_RIGHT))
+ printf("SIDE_RIGHT, ");
+ if(IsInMask(channelMapping, PAWIN_SPEAKER_TOP_CENTER))
+ printf("TOP_CENTER, ");
+ if(IsInMask(channelMapping, PAWIN_SPEAKER_TOP_FRONT_LEFT))
+ printf("TOP_FRONT_LEFT, ");
+ if(IsInMask(channelMapping, PAWIN_SPEAKER_TOP_FRONT_CENTER))
+ printf("TOP_FRONT_CENTER, ");
+ if(IsInMask(channelMapping, PAWIN_SPEAKER_TOP_FRONT_RIGHT))
+ printf("TOP_FRONT_RIGHT, ");
+ if(IsInMask(channelMapping, PAWIN_SPEAKER_TOP_BACK_LEFT))
+ printf("TOP_BACK_LEFT, ");
+ if(IsInMask(channelMapping, PAWIN_SPEAKER_TOP_BACK_CENTER))
+ printf("TOP_BACK_CENTER, ");
+ if(IsInMask(channelMapping, PAWIN_SPEAKER_TOP_BACK_RIGHT))
+ printf("TOP_BACK_RIGHT, ");
+
+ printf("\n");
+}
+
+/*
+* This routine enumerates through the Jack Connection Types enums for IJackDescription
+*/
+static void EnumIJackConnectionType(int cType)
+{
+ printf("Connection Type: ");
+ switch(cType)
+ {
+ case eJackConnTypeUnknown:
+ printf("eJackConnTypeUnknown");
+ break;
+ case eJackConnType3Point5mm:
+ printf("eJackConnType3Point5mm");
+ break;
+ case eJackConnTypeQuarter:
+ printf("eJackConnTypeQuarter");
+ break;
+ case eJackConnTypeAtapiInternal:
+ printf("eJackConnTypeAtapiInternal");
+ break;
+ case eJackConnTypeRCA:
+ printf("eJackConnTypeRCA");
+ break;
+ case eJackConnTypeOptical:
+ printf("eJackConnTypeOptical");
+ break;
+ case eJackConnTypeOtherDigital:
+ printf("eJackConnTypeOtherDigital");
+ break;
+ case eJackConnTypeOtherAnalog:
+ printf("eJackConnTypeOtherAnalog");
+ break;
+ case eJackConnTypeMultichannelAnalogDIN:
+ printf("eJackConnTypeMultichannelAnalogDIN");
+ break;
+ case eJackConnTypeXlrProfessional:
+ printf("eJackConnTypeXlrProfessional");
+ break;
+ case eJackConnTypeRJ11Modem:
+ printf("eJackConnTypeRJ11Modem");
+ break;
+ case eJackConnTypeCombination:
+ printf("eJackConnTypeCombination");
+ break;
+ }
+ printf("\n");
+}
+
+/*
+* This routine enumerates through the GeoLocation enums for the IJackDescription
+*/
+static void EnumIJackGeoLocation(int iVal)
+{
+ printf("Geometric Location: ");
+ switch(iVal)
+ {
+ case eJackGeoLocRear:
+ printf("eJackGeoLocRear");
+ break;
+ case eJackGeoLocFront:
+ printf("eJackGeoLocFront");
+ break;
+ case eJackGeoLocLeft:
+ printf("eJackGeoLocLeft");
+ break;
+ case eJackGeoLocRight:
+ printf("eJackGeoLocRight");
+ break;
+ case eJackGeoLocTop:
+ printf("eJackGeoLocTop");
+ break;
+ case eJackGeoLocBottom:
+ printf("eJackGeoLocBottom");
+ break;
+ case eJackGeoLocRearPanel:
+ printf("eJackGeoLocRearPanel");
+ break;
+ case eJackGeoLocRiser:
+ printf("eJackGeoLocRiser");
+ break;
+ case eJackGeoLocInsideMobileLid:
+ printf("eJackGeoLocInsideMobileLid");
+ break;
+ case eJackGeoLocDrivebay:
+ printf("eJackGeoLocDrivebay");
+ break;
+ case eJackGeoLocHDMI:
+ printf("eJackGeoLocHDMI");
+ break;
+ case eJackGeoLocOutsideMobileLid:
+ printf("eJackGeoLocOutsideMobileLid");
+ break;
+ case eJackGeoLocATAPI:
+ printf("eJackGeoLocATAPI");
+ break;
+ }
+ printf("\n");
+}
+
+/*
+* This routine enumerates through the GenLocation enums for the IJackDescription
+*/
+static void EnumIJackGenLocation(int iVal)
+{
+ printf("General Location: ");
+ switch(iVal)
+ {
+ case eJackGenLocPrimaryBox:
+ printf("eJackGenLocPrimaryBox");
+ break;
+ case eJackGenLocInternal:
+ printf("eJackGenLocInternal");
+ break;
+ case eJackGenLocSeparate:
+ printf("eJackGenLocSeparate");
+ break;
+ case eJackGenLocOther:
+ printf("eJackGenLocOther");
+ break;
+ }
+ printf("\n");
+}
+
+/*
+* This routine enumerates through the PortConnection enums for the IJackDescription
+*/
+static void EnumIJackPortConnection(int iVal)
+{
+ printf("Port Type: ");
+ switch(iVal)
+ {
+ case eJackPortConnJack:
+ printf("eJackPortConnJack");
+ break;
+ case eJackPortConnIntegratedDevice:
+ printf("eJackPortConnIntegratedDevice");
+ break;
+ case eJackPortConnBothIntegratedAndJack:
+ printf("eJackPortConnBothIntegratedAndJack");
+ break;
+ case eJackPortConnUnknown:
+ printf("eJackPortConnUnknown");
+ break;
+ }
+ printf("\n");
+}
+
+/*
+* This routine retrieves and parses the KSJACK_DESCRIPTION structure for
+* the provided device ID.
+*/
+static PaError GetJackInformation(int deviceId)
+{
+ PaError err;
+ int i;
+ int jackCount = 0;
+ PaWasapiJackDescription jackDesc;
+
+ err = PaWasapi_GetJackCount(deviceId, &jackCount);
+ if( err != paNoError ) return err;
+
+ fprintf( stderr,"Number of Jacks: %d \n", jackCount );
+
+ for( i = 0; i<jackCount; i++ )
+ {
+ fprintf( stderr,"Jack #%d:\n", i );
+
+ err = PaWasapi_GetJackDescription(deviceId, i, &jackDesc);
+ if( err != paNoError )
+ {
+ fprintf( stderr,"Failed getting description." );
+ continue;
+ }
+ else
+ {
+ printf("Is connected: %s\n",(jackDesc.isConnected)?"true":"false");
+ EnumIJackChannels(jackDesc.channelMapping);
+ EnumIJackConnectionType(jackDesc.connectionType);
+ EnumIJackGeoLocation(jackDesc.geoLocation);
+ EnumIJackGenLocation(jackDesc.genLocation);
+ EnumIJackPortConnection(jackDesc.portConnection);
+ printf("Jack Color: 0x%06X\n", jackDesc.color);
+ printf("\n");
+ }
+ }
+ return 0;
+}
+
+
+/*******************************************************************/
+int main(void);
+int main(void)
+{
+ PaError err;
+ const PaDeviceInfo *device;
+ int i;
+ int jackCount = 0;
+ int isInput = 0;
+
+ printf("PortAudio Test: WASAPI Jack Configuratin");
+ err = Pa_Initialize();
+ if( err != paNoError ) goto error;
+
+ /* Find all WASAPI devices */
+ for( i = 0; i < Pa_GetDeviceCount(); ++i )
+ {
+ device = Pa_GetDeviceInfo(i);
+ if( Pa_GetDeviceInfo(i)->hostApi == Pa_HostApiTypeIdToHostApiIndex(paWASAPI) )
+ {
+ if( device->maxOutputChannels == 0 )
+ {
+ isInput = 1;
+ }
+ printf("------------------------------------------\n");
+ printf("Device: %s",device->name);
+ if(isInput)
+ printf(" (Input) %d Channels\n",device->maxInputChannels);
+ else
+ printf(" (Output) %d Channels\n",device->maxOutputChannels);
+ // Try to see if this WASAPI device can provide Jack information
+ err = GetJackInformation(i);
+ if( err != paNoError ) goto error;
+ }
+ }
+ Pa_Terminate();
+ printf("Test finished.\n");
+ return err;
+
+error:
+ Pa_Terminate();
+ fprintf( stderr, "An error occured while using the portaudio stream\n" );
+ fprintf( stderr, "Error number: %d\n", err );
+ fprintf( stderr, "Error message: %s\n", Pa_GetErrorText( err ) );
+ return err;
+}
-/** @file patest_suggested_vs_streaminfo_latency.c\r
- @ingroup test_src\r
- @brief Print suggested vs. PaStreamInfo reported actual latency\r
- @author Ross Bencina <rossb@audiomulch.com>\r
-\r
- Opens streams with a sequence of suggested latency values \r
- from 0 to 2 seconds in .5ms intervals and gathers the resulting actual \r
- latency values. Output a csv file and graph suggested vs. actual. Run \r
- with framesPerBuffer unspecified, powers of 2 and multiples of 50 and \r
- prime number buffer sizes.\r
-*/\r
-/*\r
- * $Id: patest_sine.c 1368 2008-03-01 00:38:27Z rossb $\r
- *\r
- * This program uses the PortAudio Portable Audio Library.\r
- * For more information see: http://www.portaudio.com/\r
- * Copyright (c) 1999-2000 Ross Bencina and Phil Burk\r
- *\r
- * Permission is hereby granted, free of charge, to any person obtaining\r
- * a copy of this software and associated documentation files\r
- * (the "Software"), to deal in the Software without restriction,\r
- * including without limitation the rights to use, copy, modify, merge,\r
- * publish, distribute, sublicense, and/or sell copies of the Software,\r
- * and to permit persons to whom the Software is furnished to do so,\r
- * subject to the following conditions:\r
- *\r
- * The above copyright notice and this permission notice shall be\r
- * included in all copies or substantial portions of the Software.\r
- *\r
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\r
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\r
- * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\r
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\r
- * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
- */\r
-\r
-/*\r
- * The text above constitutes the entire PortAudio license; however, \r
- * the PortAudio community also makes the following non-binding requests:\r
- *\r
- * Any person wishing to distribute modifications to the Software is\r
- * requested to send the modifications to the original developer so that\r
- * they can be incorporated into the canonical version. It is also \r
- * requested that these non-binding requests be included along with the \r
- * license above.\r
- */\r
-#include <stdio.h>\r
-#include <stdlib.h>\r
-#include <string.h>\r
-#include <math.h>\r
-#include "portaudio.h"\r
-\r
-#define SAMPLE_RATE (44100)\r
-#define FRAMES_PER_BUFFER 2//(128)\r
-#define NUM_CHANNELS (2)\r
-\r
-#define SUGGESTED_LATENCY_START_SECONDS (0.0)\r
-#define SUGGESTED_LATENCY_END_SECONDS (2.0)\r
-#define SUGGESTED_LATENCY_INCREMENT_SECONDS (0.0005) /* half a millisecond increments */\r
-\r
-\r
-/* dummy callback. does nothing. never gets called */\r
-static int patestCallback( const void *inputBuffer, void *outputBuffer,\r
- unsigned long framesPerBuffer,\r
- const PaStreamCallbackTimeInfo* timeInfo,\r
- PaStreamCallbackFlags statusFlags,\r
- void *userData )\r
-{\r
- return paContinue;\r
-}\r
-\r
-/*******************************************************************/\r
-static void usage()\r
-{\r
- int i;\r
- const PaDeviceInfo *deviceInfo;\r
- const char *channelString;\r
-\r
- fprintf( stderr, "PortAudio suggested (requested) vs. resulting (reported) stream latency test\n" );\r
- fprintf( stderr, "Usage: x.exe input-device-index output-device-index sample-rate frames-per-buffer\n" );\r
- fprintf( stderr, "Use -1 for default device index, or use one of these:\n" );\r
- for( i=0; i < Pa_GetDeviceCount(); ++i ){\r
- deviceInfo = Pa_GetDeviceInfo(i);\r
- if( deviceInfo->maxInputChannels > 0 && deviceInfo->maxOutputChannels > 0 )\r
- channelString = "full-duplex";\r
- else if( deviceInfo->maxInputChannels > 0 )\r
- channelString = "input only";\r
- else\r
- channelString = "output only";\r
-\r
- fprintf( stderr, "%d (%s, %s, %s)\n", i, deviceInfo->name, Pa_GetHostApiInfo(deviceInfo->hostApi)->name, channelString );\r
- }\r
- Pa_Terminate();\r
- exit(-1);\r
-}\r
-\r
-int main( int argc, const char* argv[] );\r
-int main( int argc, const char* argv[] )\r
-{\r
- PaStreamParameters inputParameters, outputParameters;\r
- PaStream *stream;\r
- PaError err;\r
- PaTime suggestedLatency;\r
- const PaStreamInfo *streamInfo;\r
- const PaDeviceInfo *deviceInfo;\r
- float sampleRate = SAMPLE_RATE;\r
- int framesPerBuffer = FRAMES_PER_BUFFER;\r
- err = Pa_Initialize();\r
- if( err != paNoError ) goto error;\r
-\r
- if( argc > 1 && strcmp(argv[1],"-h") == 0 )\r
- usage();\r
-\r
- if( argc > 3 ){\r
- sampleRate = atoi(argv[3]);\r
- }\r
-\r
- if( argc > 4 ){\r
- framesPerBuffer = atoi(argv[4]);\r
- }\r
-\r
- printf("# sample rate=%f, frames per buffer=%d\n", (float)sampleRate, framesPerBuffer );\r
-\r
- inputParameters.device = -1;\r
- if( argc > 1 )\r
- inputParameters.device = atoi(argv[1]);\r
- if( inputParameters.device == -1 ){\r
- inputParameters.device = Pa_GetDefaultInputDevice();\r
- if (inputParameters.device == paNoDevice) {\r
- fprintf(stderr,"Error: No default input device available.\n");\r
- goto error;\r
- }\r
- }else{\r
- deviceInfo = Pa_GetDeviceInfo(inputParameters.device);\r
- if( !deviceInfo ){\r
- fprintf(stderr,"Error: Invalid input device index.\n");\r
- usage();\r
- }\r
- if( deviceInfo->maxInputChannels == 0 ){\r
- fprintf(stderr,"Error: Specified input device has no input channels (an output only device?).\n");\r
- usage();\r
- }\r
- }\r
- \r
- inputParameters.channelCount = NUM_CHANNELS;\r
- inputParameters.sampleFormat = paFloat32; /* 32 bit floating point output */\r
- inputParameters.hostApiSpecificStreamInfo = NULL;\r
-\r
- deviceInfo = Pa_GetDeviceInfo(inputParameters.device);\r
- printf( "# using input device id %d (%s, %s)\n", inputParameters.device, deviceInfo->name, Pa_GetHostApiInfo(deviceInfo->hostApi)->name );\r
-\r
-\r
- outputParameters.device = -1;\r
- if( argc > 2 )\r
- outputParameters.device = atoi(argv[2]);\r
- if( outputParameters.device == -1 ){\r
- outputParameters.device = Pa_GetDefaultOutputDevice();\r
- if (outputParameters.device == paNoDevice) {\r
- fprintf(stderr,"Error: No default output device available.\n");\r
- goto error;\r
- }\r
- }else{\r
- deviceInfo = Pa_GetDeviceInfo(outputParameters.device);\r
- if( !deviceInfo ){\r
- fprintf(stderr,"Error: Invalid output device index.\n");\r
- usage();\r
- }\r
- if( deviceInfo->maxOutputChannels == 0 ){\r
- fprintf(stderr,"Error: Specified output device has no output channels (an input only device?).\n");\r
- usage();\r
- }\r
- }\r
-\r
- outputParameters.channelCount = NUM_CHANNELS;\r
- outputParameters.sampleFormat = paFloat32; /* 32 bit floating point output */\r
- outputParameters.hostApiSpecificStreamInfo = NULL;\r
-\r
- deviceInfo = Pa_GetDeviceInfo(outputParameters.device);\r
- printf( "# using output device id %d (%s, %s)\n", outputParameters.device, deviceInfo->name, Pa_GetHostApiInfo(deviceInfo->hostApi)->name );\r
-\r
-\r
- printf( "# suggested latency, half duplex PaStreamInfo::outputLatency, half duplex PaStreamInfo::inputLatency, full duplex PaStreamInfo::outputLatency, full duplex PaStreamInfo::inputLatency\n" );\r
- suggestedLatency = SUGGESTED_LATENCY_START_SECONDS;\r
- while( suggestedLatency <= SUGGESTED_LATENCY_END_SECONDS ){\r
-\r
- outputParameters.suggestedLatency = suggestedLatency;\r
- inputParameters.suggestedLatency = suggestedLatency;\r
-\r
- printf( "%f, ", suggestedLatency );\r
-\r
- /* ------------------------------ output ------------------------------ */\r
-\r
- err = Pa_OpenStream(\r
- &stream,\r
- NULL, /* no input */\r
- &outputParameters,\r
- sampleRate,\r
- framesPerBuffer,\r
- paClipOff, /* we won't output out of range samples so don't bother clipping them */\r
- patestCallback,\r
- 0 );\r
- if( err != paNoError ) goto error;\r
-\r
- streamInfo = Pa_GetStreamInfo( stream );\r
-\r
- printf( "%f,", streamInfo->outputLatency );\r
-\r
- err = Pa_CloseStream( stream );\r
- if( err != paNoError ) goto error;\r
-\r
- /* ------------------------------ input ------------------------------ */\r
-\r
- err = Pa_OpenStream(\r
- &stream,\r
- &inputParameters, \r
- NULL, /* no output */\r
- sampleRate,\r
- framesPerBuffer,\r
- paClipOff, /* we won't output out of range samples so don't bother clipping them */\r
- patestCallback,\r
- 0 );\r
- if( err != paNoError ) goto error;\r
-\r
- streamInfo = Pa_GetStreamInfo( stream );\r
-\r
- printf( "%f,", streamInfo->inputLatency );\r
-\r
- err = Pa_CloseStream( stream );\r
- if( err != paNoError ) goto error;\r
-\r
- /* ------------------------------ full duplex ------------------------------ */\r
-\r
- err = Pa_OpenStream(\r
- &stream,\r
- &inputParameters, \r
- &outputParameters,\r
- sampleRate,\r
- framesPerBuffer,\r
- paClipOff, /* we won't output out of range samples so don't bother clipping them */\r
- patestCallback,\r
- 0 );\r
- if( err != paNoError ) goto error;\r
-\r
- streamInfo = Pa_GetStreamInfo( stream );\r
-\r
- printf( "%f,%f", streamInfo->outputLatency, streamInfo->inputLatency );\r
-\r
- err = Pa_CloseStream( stream );\r
- if( err != paNoError ) goto error;\r
-\r
- /* ------------------------------------------------------------ */\r
-\r
- printf( "\n" );\r
- suggestedLatency += SUGGESTED_LATENCY_INCREMENT_SECONDS;\r
- }\r
-\r
- Pa_Terminate();\r
- printf("# Test finished.\n");\r
- \r
- return err;\r
-error:\r
- Pa_Terminate();\r
- fprintf( stderr, "An error occured while using the portaudio stream\n" );\r
- fprintf( stderr, "Error number: %d\n", err );\r
- fprintf( stderr, "Error message: %s\n", Pa_GetErrorText( err ) );\r
- return err;\r
-}\r
+/** @file patest_suggested_vs_streaminfo_latency.c
+ @ingroup test_src
+ @brief Print suggested vs. PaStreamInfo reported actual latency
+ @author Ross Bencina <rossb@audiomulch.com>
+
+ Opens streams with a sequence of suggested latency values
+ from 0 to 2 seconds in .5ms intervals and gathers the resulting actual
+ latency values. Output a csv file and graph suggested vs. actual. Run
+ with framesPerBuffer unspecified, powers of 2 and multiples of 50 and
+ prime number buffer sizes.
+*/
+/*
+ * $Id: patest_sine.c 1368 2008-03-01 00:38:27Z rossb $
+ *
+ * This program uses the PortAudio Portable Audio Library.
+ * For more information see: http://www.portaudio.com/
+ * Copyright (c) 1999-2000 Ross Bencina and Phil Burk
+ *
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * The text above constitutes the entire PortAudio license; however,
+ * the PortAudio community also makes the following non-binding requests:
+ *
+ * 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. It is also
+ * requested that these non-binding requests be included along with the
+ * license above.
+ */
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <math.h>
+#include "portaudio.h"
+
+#define SAMPLE_RATE (44100)
+#define FRAMES_PER_BUFFER 2//(128)
+#define NUM_CHANNELS (2)
+
+#define SUGGESTED_LATENCY_START_SECONDS (0.0)
+#define SUGGESTED_LATENCY_END_SECONDS (2.0)
+#define SUGGESTED_LATENCY_INCREMENT_SECONDS (0.0005) /* half a millisecond increments */
+
+
+/* dummy callback. does nothing. never gets called */
+static int patestCallback( const void *inputBuffer, void *outputBuffer,
+ unsigned long framesPerBuffer,
+ const PaStreamCallbackTimeInfo* timeInfo,
+ PaStreamCallbackFlags statusFlags,
+ void *userData )
+{
+ return paContinue;
+}
+
+/*******************************************************************/
+static void usage()
+{
+ int i;
+ const PaDeviceInfo *deviceInfo;
+ const char *channelString;
+
+ fprintf( stderr, "PortAudio suggested (requested) vs. resulting (reported) stream latency test\n" );
+ fprintf( stderr, "Usage: x.exe input-device-index output-device-index sample-rate frames-per-buffer\n" );
+ fprintf( stderr, "Use -1 for default device index, or use one of these:\n" );
+ for( i=0; i < Pa_GetDeviceCount(); ++i ){
+ deviceInfo = Pa_GetDeviceInfo(i);
+ if( deviceInfo->maxInputChannels > 0 && deviceInfo->maxOutputChannels > 0 )
+ channelString = "full-duplex";
+ else if( deviceInfo->maxInputChannels > 0 )
+ channelString = "input only";
+ else
+ channelString = "output only";
+
+ fprintf( stderr, "%d (%s, %s, %s)\n", i, deviceInfo->name, Pa_GetHostApiInfo(deviceInfo->hostApi)->name, channelString );
+ }
+ Pa_Terminate();
+ exit(-1);
+}
+
+int main( int argc, const char* argv[] );
+int main( int argc, const char* argv[] )
+{
+ PaStreamParameters inputParameters, outputParameters;
+ PaStream *stream;
+ PaError err;
+ PaTime suggestedLatency;
+ const PaStreamInfo *streamInfo;
+ const PaDeviceInfo *deviceInfo;
+ float sampleRate = SAMPLE_RATE;
+ int framesPerBuffer = FRAMES_PER_BUFFER;
+ err = Pa_Initialize();
+ if( err != paNoError ) goto error;
+
+ if( argc > 1 && strcmp(argv[1],"-h") == 0 )
+ usage();
+
+ if( argc > 3 ){
+ sampleRate = atoi(argv[3]);
+ }
+
+ if( argc > 4 ){
+ framesPerBuffer = atoi(argv[4]);
+ }
+
+ printf("# sample rate=%f, frames per buffer=%d\n", (float)sampleRate, framesPerBuffer );
+
+ inputParameters.device = -1;
+ if( argc > 1 )
+ inputParameters.device = atoi(argv[1]);
+ if( inputParameters.device == -1 ){
+ inputParameters.device = Pa_GetDefaultInputDevice();
+ if (inputParameters.device == paNoDevice) {
+ fprintf(stderr,"Error: No default input device available.\n");
+ goto error;
+ }
+ }else{
+ deviceInfo = Pa_GetDeviceInfo(inputParameters.device);
+ if( !deviceInfo ){
+ fprintf(stderr,"Error: Invalid input device index.\n");
+ usage();
+ }
+ if( deviceInfo->maxInputChannels == 0 ){
+ fprintf(stderr,"Error: Specified input device has no input channels (an output only device?).\n");
+ usage();
+ }
+ }
+
+ inputParameters.channelCount = NUM_CHANNELS;
+ inputParameters.sampleFormat = paFloat32; /* 32 bit floating point output */
+ inputParameters.hostApiSpecificStreamInfo = NULL;
+
+ deviceInfo = Pa_GetDeviceInfo(inputParameters.device);
+ printf( "# using input device id %d (%s, %s)\n", inputParameters.device, deviceInfo->name, Pa_GetHostApiInfo(deviceInfo->hostApi)->name );
+
+
+ outputParameters.device = -1;
+ if( argc > 2 )
+ outputParameters.device = atoi(argv[2]);
+ if( outputParameters.device == -1 ){
+ outputParameters.device = Pa_GetDefaultOutputDevice();
+ if (outputParameters.device == paNoDevice) {
+ fprintf(stderr,"Error: No default output device available.\n");
+ goto error;
+ }
+ }else{
+ deviceInfo = Pa_GetDeviceInfo(outputParameters.device);
+ if( !deviceInfo ){
+ fprintf(stderr,"Error: Invalid output device index.\n");
+ usage();
+ }
+ if( deviceInfo->maxOutputChannels == 0 ){
+ fprintf(stderr,"Error: Specified output device has no output channels (an input only device?).\n");
+ usage();
+ }
+ }
+
+ outputParameters.channelCount = NUM_CHANNELS;
+ outputParameters.sampleFormat = paFloat32; /* 32 bit floating point output */
+ outputParameters.hostApiSpecificStreamInfo = NULL;
+
+ deviceInfo = Pa_GetDeviceInfo(outputParameters.device);
+ printf( "# using output device id %d (%s, %s)\n", outputParameters.device, deviceInfo->name, Pa_GetHostApiInfo(deviceInfo->hostApi)->name );
+
+
+ printf( "# suggested latency, half duplex PaStreamInfo::outputLatency, half duplex PaStreamInfo::inputLatency, full duplex PaStreamInfo::outputLatency, full duplex PaStreamInfo::inputLatency\n" );
+ suggestedLatency = SUGGESTED_LATENCY_START_SECONDS;
+ while( suggestedLatency <= SUGGESTED_LATENCY_END_SECONDS ){
+
+ outputParameters.suggestedLatency = suggestedLatency;
+ inputParameters.suggestedLatency = suggestedLatency;
+
+ printf( "%f, ", suggestedLatency );
+
+ /* ------------------------------ output ------------------------------ */
+
+ err = Pa_OpenStream(
+ &stream,
+ NULL, /* no input */
+ &outputParameters,
+ sampleRate,
+ framesPerBuffer,
+ paClipOff, /* we won't output out of range samples so don't bother clipping them */
+ patestCallback,
+ 0 );
+ if( err != paNoError ) goto error;
+
+ streamInfo = Pa_GetStreamInfo( stream );
+
+ printf( "%f,", streamInfo->outputLatency );
+
+ err = Pa_CloseStream( stream );
+ if( err != paNoError ) goto error;
+
+ /* ------------------------------ input ------------------------------ */
+
+ err = Pa_OpenStream(
+ &stream,
+ &inputParameters,
+ NULL, /* no output */
+ sampleRate,
+ framesPerBuffer,
+ paClipOff, /* we won't output out of range samples so don't bother clipping them */
+ patestCallback,
+ 0 );
+ if( err != paNoError ) goto error;
+
+ streamInfo = Pa_GetStreamInfo( stream );
+
+ printf( "%f,", streamInfo->inputLatency );
+
+ err = Pa_CloseStream( stream );
+ if( err != paNoError ) goto error;
+
+ /* ------------------------------ full duplex ------------------------------ */
+
+ err = Pa_OpenStream(
+ &stream,
+ &inputParameters,
+ &outputParameters,
+ sampleRate,
+ framesPerBuffer,
+ paClipOff, /* we won't output out of range samples so don't bother clipping them */
+ patestCallback,
+ 0 );
+ if( err != paNoError ) goto error;
+
+ streamInfo = Pa_GetStreamInfo( stream );
+
+ printf( "%f,%f", streamInfo->outputLatency, streamInfo->inputLatency );
+
+ err = Pa_CloseStream( stream );
+ if( err != paNoError ) goto error;
+
+ /* ------------------------------------------------------------ */
+
+ printf( "\n" );
+ suggestedLatency += SUGGESTED_LATENCY_INCREMENT_SECONDS;
+ }
+
+ Pa_Terminate();
+ printf("# Test finished.\n");
+
+ return err;
+error:
+ Pa_Terminate();
+ fprintf( stderr, "An error occured while using the portaudio stream\n" );
+ fprintf( stderr, "Error number: %d\n", err );
+ fprintf( stderr, "Error message: %s\n", Pa_GetErrorText( err ) );
+ return err;
+}
-#!/usr/bin/env python\r
-"""\r
-\r
-Run and graph the results of patest_suggested_vs_streaminfo_latency.c\r
-\r
-Requires matplotlib for plotting: http://matplotlib.sourceforge.net/\r
-\r
-"""\r
-import os\r
-from pylab import *\r
-import numpy\r
-from matplotlib.backends.backend_pdf import PdfPages\r
-\r
-testExeName = "PATest.exe" # rename to whatever the compiled patest_suggested_vs_streaminfo_latency.c binary is\r
-dataFileName = "patest_suggested_vs_streaminfo_latency.csv" # code below calls the exe to generate this file\r
-\r
-inputDeviceIndex = -1 # -1 means default\r
-outputDeviceIndex = -1 # -1 means default\r
-sampleRate = 44100\r
-pdfFilenameSuffix = "_wmme"\r
-\r
-pdfFile = PdfPages("patest_suggested_vs_streaminfo_latency_" + str(sampleRate) + pdfFilenameSuffix +".pdf") #output this pdf file\r
-\r
-\r
-def loadCsvData( dataFileName ):\r
- params= ""\r
- inputDevice = ""\r
- outputDevice = ""\r
-\r
- startLines = file(dataFileName).readlines(1024)\r
- for line in startLines:\r
- if "output device" in line:\r
- outputDevice = line.strip(" \t\n\r#")\r
- if "input device" in line:\r
- inputDevice = line.strip(" \t\n\r#")\r
- params = startLines[0].strip(" \t\n\r#")\r
-\r
- data = numpy.loadtxt(dataFileName, delimiter=",", skiprows=4).transpose()\r
-\r
- class R(object): pass\r
- result = R()\r
- result.params = params\r
- for s in params.split(','):\r
- if "sample rate" in s:\r
- result.sampleRate = s\r
-\r
- result.inputDevice = inputDevice\r
- result.outputDevice = outputDevice\r
- result.suggestedLatency = data[0]\r
- result.halfDuplexOutputLatency = data[1]\r
- result.halfDuplexInputLatency = data[2]\r
- result.fullDuplexOutputLatency = data[3]\r
- result.fullDuplexInputLatency = data[4]\r
- return result;\r
-\r
-\r
-def setFigureTitleAndAxisLabels( framesPerBufferString ):\r
- title("PortAudio suggested (requested) vs. resulting (reported) stream latency\n" + framesPerBufferString)\r
- ylabel("PaStreamInfo::{input,output}Latency (s)")\r
- xlabel("Pa_OpenStream suggestedLatency (s)")\r
- grid(True)\r
- legend(loc="upper left")\r
-\r
-def setDisplayRangeSeconds( maxSeconds ):\r
- xlim(0, maxSeconds)\r
- ylim(0, maxSeconds)\r
-\r
-\r
-# run the test with different frames per buffer values:\r
-\r
-compositeTestFramesPerBufferValues = [0]\r
-# powers of two\r
-for i in range (1,11):\r
- compositeTestFramesPerBufferValues.append( pow(2,i) )\r
-\r
-# multiples of 50\r
-for i in range (1,20):\r
- compositeTestFramesPerBufferValues.append( i * 50 )\r
-\r
-# 10ms buffer sizes\r
-compositeTestFramesPerBufferValues.append( 441 )\r
-compositeTestFramesPerBufferValues.append( 882 )\r
-\r
-# large primes\r
-#compositeTestFramesPerBufferValues.append( 39209 )\r
-#compositeTestFramesPerBufferValues.append( 37537 )\r
-#compositeTestFramesPerBufferValues.append( 26437 )\r
-\r
-individualPlotFramesPerBufferValues = [0,64,128,256,512] #output separate plots for these\r
-\r
-isFirst = True \r
-\r
-for framesPerBuffer in compositeTestFramesPerBufferValues:\r
- commandString = testExeName + " " + str(inputDeviceIndex) + " " + str(outputDeviceIndex) + " " + str(sampleRate) + " " + str(framesPerBuffer) + ' > ' + dataFileName\r
- print commandString\r
- os.system(commandString)\r
-\r
- d = loadCsvData(dataFileName)\r
-\r
- if isFirst:\r
- figure(1) # title sheet\r
- gcf().text(0.1, 0.0,\r
- "patest_suggested_vs_streaminfo_latency\n%s\n%s\n%s\n"%(d.inputDevice,d.outputDevice,d.sampleRate))\r
- pdfFile.savefig()\r
- \r
- \r
- figure(2) # composite plot, includes all compositeTestFramesPerBufferValues\r
-\r
- if isFirst:\r
- plot( d.suggestedLatency, d.suggestedLatency, label="Suggested latency" )\r
- \r
- plot( d.suggestedLatency, d.halfDuplexOutputLatency )\r
- plot( d.suggestedLatency, d.halfDuplexInputLatency )\r
- plot( d.suggestedLatency, d.fullDuplexOutputLatency )\r
- plot( d.suggestedLatency, d.fullDuplexInputLatency )\r
-\r
- if framesPerBuffer in individualPlotFramesPerBufferValues: # individual plots\r
- figure( 3 + individualPlotFramesPerBufferValues.index(framesPerBuffer) )\r
-\r
- plot( d.suggestedLatency, d.suggestedLatency, label="Suggested latency" )\r
- plot( d.suggestedLatency, d.halfDuplexOutputLatency, label="Half-duplex output latency" )\r
- plot( d.suggestedLatency, d.halfDuplexInputLatency, label="Half-duplex input latency" )\r
- plot( d.suggestedLatency, d.fullDuplexOutputLatency, label="Full-duplex output latency" )\r
- plot( d.suggestedLatency, d.fullDuplexInputLatency, label="Full-duplex input latency" )\r
-\r
- if framesPerBuffer == 0:\r
- framesPerBufferText = "paFramesPerBufferUnspecified"\r
- else:\r
- framesPerBufferText = str(framesPerBuffer)\r
- setFigureTitleAndAxisLabels( "user frames per buffer: "+str(framesPerBufferText) )\r
- setDisplayRangeSeconds(2.2)\r
- pdfFile.savefig()\r
- setDisplayRangeSeconds(0.1)\r
- setFigureTitleAndAxisLabels( "user frames per buffer: "+str(framesPerBufferText)+" (detail)" )\r
- pdfFile.savefig()\r
-\r
- isFirst = False\r
-\r
-figure(2)\r
-setFigureTitleAndAxisLabels( "composite of frames per buffer values:\n"+str(compositeTestFramesPerBufferValues) )\r
-setDisplayRangeSeconds(2.2)\r
-pdfFile.savefig()\r
-setDisplayRangeSeconds(0.1)\r
-setFigureTitleAndAxisLabels( "composite of frames per buffer values:\n"+str(compositeTestFramesPerBufferValues)+" (detail)" )\r
-pdfFile.savefig()\r
-\r
-pdfFile.close()\r
-\r
-#uncomment this to display interactively, otherwise we just output a pdf\r
-#show()\r
+#!/usr/bin/env python
+"""
+
+Run and graph the results of patest_suggested_vs_streaminfo_latency.c
+
+Requires matplotlib for plotting: http://matplotlib.sourceforge.net/
+
+"""
+import os
+from pylab import *
+import numpy
+from matplotlib.backends.backend_pdf import PdfPages
+
+testExeName = "PATest.exe" # rename to whatever the compiled patest_suggested_vs_streaminfo_latency.c binary is
+dataFileName = "patest_suggested_vs_streaminfo_latency.csv" # code below calls the exe to generate this file
+
+inputDeviceIndex = -1 # -1 means default
+outputDeviceIndex = -1 # -1 means default
+sampleRate = 44100
+pdfFilenameSuffix = "_wmme"
+
+pdfFile = PdfPages("patest_suggested_vs_streaminfo_latency_" + str(sampleRate) + pdfFilenameSuffix +".pdf") #output this pdf file
+
+
+def loadCsvData( dataFileName ):
+ params= ""
+ inputDevice = ""
+ outputDevice = ""
+
+ startLines = file(dataFileName).readlines(1024)
+ for line in startLines:
+ if "output device" in line:
+ outputDevice = line.strip(" \t\n\r#")
+ if "input device" in line:
+ inputDevice = line.strip(" \t\n\r#")
+ params = startLines[0].strip(" \t\n\r#")
+
+ data = numpy.loadtxt(dataFileName, delimiter=",", skiprows=4).transpose()
+
+ class R(object): pass
+ result = R()
+ result.params = params
+ for s in params.split(','):
+ if "sample rate" in s:
+ result.sampleRate = s
+
+ result.inputDevice = inputDevice
+ result.outputDevice = outputDevice
+ result.suggestedLatency = data[0]
+ result.halfDuplexOutputLatency = data[1]
+ result.halfDuplexInputLatency = data[2]
+ result.fullDuplexOutputLatency = data[3]
+ result.fullDuplexInputLatency = data[4]
+ return result;
+
+
+def setFigureTitleAndAxisLabels( framesPerBufferString ):
+ title("PortAudio suggested (requested) vs. resulting (reported) stream latency\n" + framesPerBufferString)
+ ylabel("PaStreamInfo::{input,output}Latency (s)")
+ xlabel("Pa_OpenStream suggestedLatency (s)")
+ grid(True)
+ legend(loc="upper left")
+
+def setDisplayRangeSeconds( maxSeconds ):
+ xlim(0, maxSeconds)
+ ylim(0, maxSeconds)
+
+
+# run the test with different frames per buffer values:
+
+compositeTestFramesPerBufferValues = [0]
+# powers of two
+for i in range (1,11):
+ compositeTestFramesPerBufferValues.append( pow(2,i) )
+
+# multiples of 50
+for i in range (1,20):
+ compositeTestFramesPerBufferValues.append( i * 50 )
+
+# 10ms buffer sizes
+compositeTestFramesPerBufferValues.append( 441 )
+compositeTestFramesPerBufferValues.append( 882 )
+
+# large primes
+#compositeTestFramesPerBufferValues.append( 39209 )
+#compositeTestFramesPerBufferValues.append( 37537 )
+#compositeTestFramesPerBufferValues.append( 26437 )
+
+individualPlotFramesPerBufferValues = [0,64,128,256,512] #output separate plots for these
+
+isFirst = True
+
+for framesPerBuffer in compositeTestFramesPerBufferValues:
+ commandString = testExeName + " " + str(inputDeviceIndex) + " " + str(outputDeviceIndex) + " " + str(sampleRate) + " " + str(framesPerBuffer) + ' > ' + dataFileName
+ print commandString
+ os.system(commandString)
+
+ d = loadCsvData(dataFileName)
+
+ if isFirst:
+ figure(1) # title sheet
+ gcf().text(0.1, 0.0,
+ "patest_suggested_vs_streaminfo_latency\n%s\n%s\n%s\n"%(d.inputDevice,d.outputDevice,d.sampleRate))
+ pdfFile.savefig()
+
+
+ figure(2) # composite plot, includes all compositeTestFramesPerBufferValues
+
+ if isFirst:
+ plot( d.suggestedLatency, d.suggestedLatency, label="Suggested latency" )
+
+ plot( d.suggestedLatency, d.halfDuplexOutputLatency )
+ plot( d.suggestedLatency, d.halfDuplexInputLatency )
+ plot( d.suggestedLatency, d.fullDuplexOutputLatency )
+ plot( d.suggestedLatency, d.fullDuplexInputLatency )
+
+ if framesPerBuffer in individualPlotFramesPerBufferValues: # individual plots
+ figure( 3 + individualPlotFramesPerBufferValues.index(framesPerBuffer) )
+
+ plot( d.suggestedLatency, d.suggestedLatency, label="Suggested latency" )
+ plot( d.suggestedLatency, d.halfDuplexOutputLatency, label="Half-duplex output latency" )
+ plot( d.suggestedLatency, d.halfDuplexInputLatency, label="Half-duplex input latency" )
+ plot( d.suggestedLatency, d.fullDuplexOutputLatency, label="Full-duplex output latency" )
+ plot( d.suggestedLatency, d.fullDuplexInputLatency, label="Full-duplex input latency" )
+
+ if framesPerBuffer == 0:
+ framesPerBufferText = "paFramesPerBufferUnspecified"
+ else:
+ framesPerBufferText = str(framesPerBuffer)
+ setFigureTitleAndAxisLabels( "user frames per buffer: "+str(framesPerBufferText) )
+ setDisplayRangeSeconds(2.2)
+ pdfFile.savefig()
+ setDisplayRangeSeconds(0.1)
+ setFigureTitleAndAxisLabels( "user frames per buffer: "+str(framesPerBufferText)+" (detail)" )
+ pdfFile.savefig()
+
+ isFirst = False
+
+figure(2)
+setFigureTitleAndAxisLabels( "composite of frames per buffer values:\n"+str(compositeTestFramesPerBufferValues) )
+setDisplayRangeSeconds(2.2)
+pdfFile.savefig()
+setDisplayRangeSeconds(0.1)
+setFigureTitleAndAxisLabels( "composite of frames per buffer values:\n"+str(compositeTestFramesPerBufferValues)+" (detail)" )
+pdfFile.savefig()
+
+pdfFile.close()
+
+#uncomment this to display interactively, otherwise we just output a pdf
+#show()
-/** @file patest_timing.c\r
- @ingroup test_src\r
- @brief Play a sine wave for several seconds, and spits out a ton of timing info while it's at it. Based on patest_sine.c\r
- @author Bjorn Roche\r
- @author Ross Bencina <rossb@audiomulch.com>\r
- @author Phil Burk <philburk@softsynth.com>\r
-*/\r
-/*\r
- * $Id: patest_timing.c 578 2003-09-02 04:17:38Z rossbencina $\r
- *\r
- * This program uses the PortAudio Portable Audio Library.\r
- * For more information see: http://www.portaudio.com/\r
- * Copyright (c) 1999-2000 Ross Bencina and Phil Burk\r
- *\r
- * Permission is hereby granted, free of charge, to any person obtaining\r
- * a copy of this software and associated documentation files\r
- * (the "Software"), to deal in the Software without restriction,\r
- * including without limitation the rights to use, copy, modify, merge,\r
- * publish, distribute, sublicense, and/or sell copies of the Software,\r
- * and to permit persons to whom the Software is furnished to do so,\r
- * subject to the following conditions:\r
- *\r
- * The above copyright notice and this permission notice shall be\r
- * included in all copies or substantial portions of the Software.\r
- *\r
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\r
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\r
- * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\r
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\r
- * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
- */\r
-\r
-/*\r
- * The text above constitutes the entire PortAudio license; however, \r
- * the PortAudio community also makes the following non-binding requests:\r
- *\r
- * Any person wishing to distribute modifications to the Software is\r
- * requested to send the modifications to the original developer so that\r
- * they can be incorporated into the canonical version. It is also \r
- * requested that these non-binding requests be included along with the \r
- * license above.\r
- */\r
-\r
-#include <stdio.h>\r
-#include <math.h>\r
-#include "portaudio.h"\r
-\r
-#define NUM_SECONDS (5)\r
-#define SAMPLE_RATE (44100)\r
-#define FRAMES_PER_BUFFER (64)\r
-\r
-#ifndef M_PI\r
-#define M_PI (3.14159265)\r
-#endif\r
-\r
-#define TABLE_SIZE (200)\r
-typedef struct\r
-{\r
- PaStream *stream;\r
- PaTime start;\r
- float sine[TABLE_SIZE];\r
- int left_phase;\r
- int right_phase;\r
-}\r
-paTestData;\r
-\r
-/* This routine will be called by the PortAudio engine when audio is needed.\r
-** It may called at interrupt level on some machines so don't do anything\r
-** that could mess up the system like calling malloc() or free().\r
-*/\r
-static int patestCallback( const void *inputBuffer, void *outputBuffer,\r
- unsigned long framesPerBuffer,\r
- const PaStreamCallbackTimeInfo* timeInfo,\r
- PaStreamCallbackFlags statusFlags,\r
- void *userData )\r
-{\r
- paTestData *data = (paTestData*)userData;\r
- float *out = (float*)outputBuffer;\r
- unsigned long i;\r
-\r
- (void) timeInfo; /* Prevent unused variable warnings. */\r
- (void) statusFlags;\r
- (void) inputBuffer;\r
-\r
- printf( "Timing info given to callback: Adc: %g, Current: %g, Dac: %g\n",\r
- timeInfo->inputBufferAdcTime,\r
- timeInfo->currentTime,\r
- timeInfo->outputBufferDacTime );\r
-\r
- printf( "getStreamTime() returns: %g\n", Pa_GetStreamTime(data->stream) - data->start );\r
- \r
- for( i=0; i<framesPerBuffer; i++ )\r
- {\r
- *out++ = data->sine[data->left_phase]; /* left */\r
- *out++ = data->sine[data->right_phase]; /* right */\r
- data->left_phase += 1;\r
- if( data->left_phase >= TABLE_SIZE ) data->left_phase -= TABLE_SIZE;\r
- data->right_phase += 3; /* higher pitch so we can distinguish left and right. */\r
- if( data->right_phase >= TABLE_SIZE ) data->right_phase -= TABLE_SIZE;\r
- }\r
- \r
- return paContinue;\r
-}\r
-\r
-/*******************************************************************/\r
-int main(void);\r
-int main(void)\r
-{\r
- PaStreamParameters outputParameters;\r
- PaStream *stream;\r
- PaError err;\r
- paTestData data;\r
- int i;\r
-\r
- \r
- printf("PortAudio Test: output sine wave. SR = %d, BufSize = %d\n", SAMPLE_RATE, FRAMES_PER_BUFFER);\r
- \r
- /* initialise sinusoidal wavetable */\r
- for( i=0; i<TABLE_SIZE; i++ )\r
- {\r
- data.sine[i] = (float) sin( ((double)i/(double)TABLE_SIZE) * M_PI * 2. );\r
- }\r
- data.left_phase = data.right_phase = 0;\r
- \r
- err = Pa_Initialize();\r
- if( err != paNoError ) goto error;\r
-\r
- outputParameters.device = Pa_GetDefaultOutputDevice(); /* default output device */\r
- outputParameters.channelCount = 2; /* stereo output */\r
- outputParameters.sampleFormat = paFloat32; /* 32 bit floating point output */\r
- outputParameters.suggestedLatency = Pa_GetDeviceInfo( outputParameters.device )->defaultLowOutputLatency;\r
- outputParameters.hostApiSpecificStreamInfo = NULL;\r
-\r
- err = Pa_OpenStream(\r
- &stream,\r
- NULL, /* no input */\r
- &outputParameters,\r
- SAMPLE_RATE,\r
- FRAMES_PER_BUFFER,\r
- paClipOff, /* we won't output out of range samples so don't bother clipping them */\r
- patestCallback,\r
- &data );\r
- data.stream = stream;\r
- data.start = Pa_GetStreamTime(stream);\r
- if( err != paNoError ) goto error;\r
-\r
- err = Pa_StartStream( stream );\r
- data.start = Pa_GetStreamTime(stream);\r
- if( err != paNoError ) goto error;\r
-\r
- printf("Play for %d seconds.\n", NUM_SECONDS );\r
- Pa_Sleep( NUM_SECONDS * 1000 );\r
-\r
- err = Pa_StopStream( stream );\r
- if( err != paNoError ) goto error;\r
-\r
- err = Pa_CloseStream( stream );\r
- if( err != paNoError ) goto error;\r
-\r
- Pa_Terminate();\r
- printf("Test finished.\n");\r
- printf("The tone should have been heard for about 5 seconds and all the timing info above should report that about 5 seconds elapsed (except Adc, which is undefined since there was no input device opened).\n");\r
- \r
- return err;\r
-error:\r
- Pa_Terminate();\r
- fprintf( stderr, "An error occured while using the portaudio stream\n" );\r
- fprintf( stderr, "Error number: %d\n", err );\r
- fprintf( stderr, "Error message: %s\n", Pa_GetErrorText( err ) );\r
- return err;\r
-}\r
+/** @file patest_timing.c
+ @ingroup test_src
+ @brief Play a sine wave for several seconds, and spits out a ton of timing info while it's at it. Based on patest_sine.c
+ @author Bjorn Roche
+ @author Ross Bencina <rossb@audiomulch.com>
+ @author Phil Burk <philburk@softsynth.com>
+*/
+/*
+ * $Id: patest_timing.c 578 2003-09-02 04:17:38Z rossbencina $
+ *
+ * This program uses the PortAudio Portable Audio Library.
+ * For more information see: http://www.portaudio.com/
+ * Copyright (c) 1999-2000 Ross Bencina and Phil Burk
+ *
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * The text above constitutes the entire PortAudio license; however,
+ * the PortAudio community also makes the following non-binding requests:
+ *
+ * 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. It is also
+ * requested that these non-binding requests be included along with the
+ * license above.
+ */
+
+#include <stdio.h>
+#include <math.h>
+#include "portaudio.h"
+
+#define NUM_SECONDS (5)
+#define SAMPLE_RATE (44100)
+#define FRAMES_PER_BUFFER (64)
+
+#ifndef M_PI
+#define M_PI (3.14159265)
+#endif
+
+#define TABLE_SIZE (200)
+typedef struct
+{
+ PaStream *stream;
+ PaTime start;
+ float sine[TABLE_SIZE];
+ int left_phase;
+ int right_phase;
+}
+paTestData;
+
+/* This routine will be called by the PortAudio engine when audio is needed.
+** It may called at interrupt level on some machines so don't do anything
+** that could mess up the system like calling malloc() or free().
+*/
+static int patestCallback( const void *inputBuffer, void *outputBuffer,
+ unsigned long framesPerBuffer,
+ const PaStreamCallbackTimeInfo* timeInfo,
+ PaStreamCallbackFlags statusFlags,
+ void *userData )
+{
+ paTestData *data = (paTestData*)userData;
+ float *out = (float*)outputBuffer;
+ unsigned long i;
+
+ (void) timeInfo; /* Prevent unused variable warnings. */
+ (void) statusFlags;
+ (void) inputBuffer;
+
+ printf( "Timing info given to callback: Adc: %g, Current: %g, Dac: %g\n",
+ timeInfo->inputBufferAdcTime,
+ timeInfo->currentTime,
+ timeInfo->outputBufferDacTime );
+
+ printf( "getStreamTime() returns: %g\n", Pa_GetStreamTime(data->stream) - data->start );
+
+ for( i=0; i<framesPerBuffer; i++ )
+ {
+ *out++ = data->sine[data->left_phase]; /* left */
+ *out++ = data->sine[data->right_phase]; /* right */
+ data->left_phase += 1;
+ if( data->left_phase >= TABLE_SIZE ) data->left_phase -= TABLE_SIZE;
+ data->right_phase += 3; /* higher pitch so we can distinguish left and right. */
+ if( data->right_phase >= TABLE_SIZE ) data->right_phase -= TABLE_SIZE;
+ }
+
+ return paContinue;
+}
+
+/*******************************************************************/
+int main(void);
+int main(void)
+{
+ PaStreamParameters outputParameters;
+ PaStream *stream;
+ PaError err;
+ paTestData data;
+ int i;
+
+
+ printf("PortAudio Test: output sine wave. SR = %d, BufSize = %d\n", SAMPLE_RATE, FRAMES_PER_BUFFER);
+
+ /* initialise sinusoidal wavetable */
+ for( i=0; i<TABLE_SIZE; i++ )
+ {
+ data.sine[i] = (float) sin( ((double)i/(double)TABLE_SIZE) * M_PI * 2. );
+ }
+ data.left_phase = data.right_phase = 0;
+
+ err = Pa_Initialize();
+ if( err != paNoError ) goto error;
+
+ outputParameters.device = Pa_GetDefaultOutputDevice(); /* default output device */
+ outputParameters.channelCount = 2; /* stereo output */
+ outputParameters.sampleFormat = paFloat32; /* 32 bit floating point output */
+ outputParameters.suggestedLatency = Pa_GetDeviceInfo( outputParameters.device )->defaultLowOutputLatency;
+ outputParameters.hostApiSpecificStreamInfo = NULL;
+
+ err = Pa_OpenStream(
+ &stream,
+ NULL, /* no input */
+ &outputParameters,
+ SAMPLE_RATE,
+ FRAMES_PER_BUFFER,
+ paClipOff, /* we won't output out of range samples so don't bother clipping them */
+ patestCallback,
+ &data );
+ data.stream = stream;
+ data.start = Pa_GetStreamTime(stream);
+ if( err != paNoError ) goto error;
+
+ err = Pa_StartStream( stream );
+ data.start = Pa_GetStreamTime(stream);
+ if( err != paNoError ) goto error;
+
+ printf("Play for %d seconds.\n", NUM_SECONDS );
+ Pa_Sleep( NUM_SECONDS * 1000 );
+
+ err = Pa_StopStream( stream );
+ if( err != paNoError ) goto error;
+
+ err = Pa_CloseStream( stream );
+ if( err != paNoError ) goto error;
+
+ Pa_Terminate();
+ printf("Test finished.\n");
+ printf("The tone should have been heard for about 5 seconds and all the timing info above should report that about 5 seconds elapsed (except Adc, which is undefined since there was no input device opened).\n");
+
+ return err;
+error:
+ Pa_Terminate();
+ fprintf( stderr, "An error occured while using the portaudio stream\n" );
+ fprintf( stderr, "Error number: %d\n", err );
+ fprintf( stderr, "Error message: %s\n", Pa_GetErrorText( err ) );
+ return err;
+}
-/*\r
- * $Id: $\r
- * Portable Audio I/O Library\r
- * Windows MME low level buffer user guided parameters search\r
- *\r
- * Copyright (c) 2010 Ross Bencina\r
- *\r
- * Permission is hereby granted, free of charge, to any person obtaining\r
- * a copy of this software and associated documentation files\r
- * (the "Software"), to deal in the Software without restriction,\r
- * including without limitation the rights to use, copy, modify, merge,\r
- * publish, distribute, sublicense, and/or sell copies of the Software,\r
- * and to permit persons to whom the Software is furnished to do so,\r
- * subject to the following conditions:\r
- *\r
- * The above copyright notice and this permission notice shall be\r
- * included in all copies or substantial portions of the Software.\r
- *\r
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\r
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\r
- * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\r
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\r
- * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
- */\r
-\r
-/*\r
- * The text above constitutes the entire PortAudio license; however, \r
- * the PortAudio community also makes the following non-binding requests:\r
- *\r
- * Any person wishing to distribute modifications to the Software is\r
- * requested to send the modifications to the original developer so that\r
- * they can be incorporated into the canonical version. It is also \r
- * requested that these non-binding requests be included along with the \r
- * license above.\r
- */\r
-\r
-#include <stdio.h>\r
-#include <time.h>\r
-#include <math.h>\r
-\r
-#define _WIN32_WINNT 0x0501 /* for GetNativeSystemInfo */ \r
-#include <windows.h> /* required when using pa_win_wmme.h */\r
-#include <mmsystem.h> /* required when using pa_win_wmme.h */\r
-\r
-#include <conio.h> /* for _getch */\r
-\r
-\r
-#include "portaudio.h"\r
-#include "pa_win_wmme.h"\r
-\r
-\r
-#define DEFAULT_SAMPLE_RATE (44100.)\r
-\r
-#ifndef M_PI\r
-#define M_PI (3.14159265)\r
-#endif\r
-\r
-#define TABLE_SIZE (2048)\r
-\r
-#define CHANNEL_COUNT (2)\r
-\r
-\r
-/* seach parameters. we test all buffer counts in this range */\r
-#define MIN_WMME_BUFFER_COUNT (2)\r
-#define MAX_WMME_BUFFER_COUNT (12)\r
-\r
-\r
-/*******************************************************************/\r
-/* functions to query and print Windows version information */\r
-\r
-typedef BOOL (WINAPI *LPFN_ISWOW64PROCESS) (HANDLE, PBOOL);\r
-\r
-LPFN_ISWOW64PROCESS fnIsWow64Process;\r
-\r
-static BOOL IsWow64()\r
-{\r
- BOOL bIsWow64 = FALSE;\r
-\r
- //IsWow64Process is not available on all supported versions of Windows.\r
- //Use GetModuleHandle to get a handle to the DLL that contains the function\r
- //and GetProcAddress to get a pointer to the function if available.\r
-\r
- fnIsWow64Process = (LPFN_ISWOW64PROCESS) GetProcAddress(\r
- GetModuleHandle(TEXT("kernel32")),"IsWow64Process" );\r
-\r
- if(NULL != fnIsWow64Process)\r
- {\r
- if (!fnIsWow64Process(GetCurrentProcess(),&bIsWow64))\r
- {\r
- //handle error\r
- }\r
- }\r
- return bIsWow64;\r
-}\r
-\r
-static void printWindowsVersionInfo( FILE *fp )\r
-{\r
- OSVERSIONINFOEX osVersionInfoEx;\r
- SYSTEM_INFO systemInfo;\r
- const char *osName = "Unknown";\r
- const char *osProductType = "";\r
- const char *processorArchitecture = "Unknown";\r
-\r
- memset( &osVersionInfoEx, 0, sizeof(OSVERSIONINFOEX) );\r
- osVersionInfoEx.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);\r
- GetVersionEx( &osVersionInfoEx );\r
-\r
- \r
- if( osVersionInfoEx.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS ){\r
- switch( osVersionInfoEx.dwMinorVersion ){\r
- case 0: osName = "Windows 95"; break;\r
- case 10: osName = "Windows 98"; break; // could also be 98SE (I've seen code discriminate based \r
- // on osInfo.Version.Revision.ToString() == "2222A")\r
- case 90: osName = "Windows Me"; break;\r
- }\r
- }else if( osVersionInfoEx.dwPlatformId == VER_PLATFORM_WIN32_NT ){\r
- switch( osVersionInfoEx.dwMajorVersion ){\r
- case 3: osName = "Windows NT 3.51"; break;\r
- case 4: osName = "Windows NT 4.0"; break;\r
- case 5: switch( osVersionInfoEx.dwMinorVersion ){\r
- case 0: osName = "Windows 2000"; break;\r
- case 1: osName = "Windows XP"; break;\r
- case 2:\r
- if( osVersionInfoEx.wSuiteMask & 0x00008000 /*VER_SUITE_WH_SERVER*/ ){\r
- osName = "Windows Home Server";\r
- }else{\r
- if( osVersionInfoEx.wProductType == VER_NT_WORKSTATION ){\r
- osName = "Windows XP Professional x64 Edition (?)";\r
- }else{\r
- if( GetSystemMetrics(/*SM_SERVERR2*/89) == 0 )\r
- osName = "Windows Server 2003";\r
- else\r
- osName = "Windows Server 2003 R2";\r
- }\r
- }break;\r
- }break;\r
- case 6:switch( osVersionInfoEx.dwMinorVersion ){\r
- case 0: \r
- if( osVersionInfoEx.wProductType == VER_NT_WORKSTATION )\r
- osName = "Windows Vista";\r
- else\r
- osName = "Windows Server 2008";\r
- break;\r
- case 1: \r
- if( osVersionInfoEx.wProductType == VER_NT_WORKSTATION )\r
- osName = "Windows 7";\r
- else\r
- osName = "Windows Server 2008 R2";\r
- break;\r
- }break;\r
- }\r
- }\r
-\r
- if(osVersionInfoEx.dwMajorVersion == 4)\r
- {\r
- if(osVersionInfoEx.wProductType == VER_NT_WORKSTATION)\r
- osProductType = "Workstation";\r
- else if(osVersionInfoEx.wProductType == VER_NT_SERVER)\r
- osProductType = "Server";\r
- }\r
- else if(osVersionInfoEx.dwMajorVersion == 5)\r
- {\r
- if(osVersionInfoEx.wProductType == VER_NT_WORKSTATION)\r
- {\r
- if((osVersionInfoEx.wSuiteMask & VER_SUITE_PERSONAL) == VER_SUITE_PERSONAL)\r
- osProductType = "Home Edition"; // Windows XP Home Edition\r
- else\r
- osProductType = "Professional"; // Windows XP / Windows 2000 Professional\r
- }\r
- else if(osVersionInfoEx.wProductType == VER_NT_SERVER)\r
- {\r
- if(osVersionInfoEx.dwMinorVersion == 0) \r
- {\r
- if((osVersionInfoEx.wSuiteMask & VER_SUITE_DATACENTER) == VER_SUITE_DATACENTER)\r
- osProductType = "Datacenter Server"; // Windows 2000 Datacenter Server\r
- else if((osVersionInfoEx.wSuiteMask & VER_SUITE_ENTERPRISE) == VER_SUITE_ENTERPRISE)\r
- osProductType = "Advanced Server"; // Windows 2000 Advanced Server\r
- else\r
- osProductType = "Server"; // Windows 2000 Server\r
- }\r
- }\r
- else\r
- {\r
- if((osVersionInfoEx.wSuiteMask & VER_SUITE_DATACENTER) == VER_SUITE_DATACENTER)\r
- osProductType = "Datacenter Edition"; // Windows Server 2003 Datacenter Edition\r
- else if((osVersionInfoEx.wSuiteMask & VER_SUITE_ENTERPRISE) == VER_SUITE_ENTERPRISE)\r
- osProductType = "Enterprise Edition"; // Windows Server 2003 Enterprise Edition\r
- else if((osVersionInfoEx.wSuiteMask & VER_SUITE_BLADE) == VER_SUITE_BLADE)\r
- osProductType = "Web Edition"; // Windows Server 2003 Web Edition\r
- else\r
- osProductType = "Standard Edition"; // Windows Server 2003 Standard Edition\r
- }\r
- }\r
-\r
- memset( &systemInfo, 0, sizeof(SYSTEM_INFO) );\r
- GetNativeSystemInfo( &systemInfo );\r
-\r
- if( systemInfo.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_INTEL )\r
- processorArchitecture = "x86";\r
- else if( systemInfo.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64 )\r
- processorArchitecture = "x64";\r
- else if( systemInfo.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_IA64 )\r
- processorArchitecture = "Itanium";\r
-\r
-\r
- fprintf( fp, "OS name and edition: %s %s\n", osName, osProductType );\r
- fprintf( fp, "OS version: %d.%d.%d %S\n", \r
- osVersionInfoEx.dwMajorVersion, osVersionInfoEx.dwMinorVersion, \r
- osVersionInfoEx.dwBuildNumber, osVersionInfoEx.szCSDVersion );\r
- fprintf( fp, "Processor architecture: %s\n", processorArchitecture );\r
- fprintf( fp, "WoW64 process: %s\n", IsWow64() ? "Yes" : "No" );\r
-}\r
-\r
-static void printTimeAndDate( FILE *fp )\r
-{\r
- struct tm *local;\r
- time_t t;\r
-\r
- t = time(NULL);\r
- local = localtime(&t);\r
- fprintf(fp, "Local time and date: %s", asctime(local));\r
- local = gmtime(&t);\r
- fprintf(fp, "UTC time and date: %s", asctime(local));\r
-}\r
-\r
-/*******************************************************************/\r
-\r
-typedef struct\r
-{\r
- float sine[TABLE_SIZE];\r
- double phase;\r
- double phaseIncrement;\r
- volatile int fadeIn;\r
- volatile int fadeOut;\r
- double amp;\r
-}\r
-paTestData;\r
-\r
-static paTestData data;\r
-\r
-/* This routine will be called by the PortAudio engine when audio is needed.\r
-** It may called at interrupt level on some machines so don't do anything\r
-** that could mess up the system like calling malloc() or free().\r
-*/\r
-static int patestCallback( const void *inputBuffer, void *outputBuffer,\r
- unsigned long framesPerBuffer,\r
- const PaStreamCallbackTimeInfo* timeInfo,\r
- PaStreamCallbackFlags statusFlags,\r
- void *userData )\r
-{\r
- paTestData *data = (paTestData*)userData;\r
- float *out = (float*)outputBuffer;\r
- unsigned long i,j;\r
-\r
- (void) timeInfo; /* Prevent unused variable warnings. */\r
- (void) statusFlags;\r
- (void) inputBuffer;\r
- \r
- for( i=0; i<framesPerBuffer; i++ )\r
- {\r
- float x = data->sine[(int)data->phase];\r
- data->phase += data->phaseIncrement;\r
- if( data->phase >= TABLE_SIZE ){\r
- data->phase -= TABLE_SIZE;\r
- }\r
-\r
- x *= data->amp;\r
- if( data->fadeIn ){\r
- data->amp += .001;\r
- if( data->amp >= 1. )\r
- data->fadeIn = 0;\r
- }else if( data->fadeOut ){\r
- if( data->amp > 0 )\r
- data->amp -= .001;\r
- }\r
-\r
- for( j = 0; j < CHANNEL_COUNT; ++j ){\r
- *out++ = x;\r
- }\r
- }\r
- \r
- if( data->amp > 0 )\r
- return paContinue;\r
- else\r
- return paComplete;\r
-}\r
-\r
-\r
-#define YES 1\r
-#define NO 0\r
-\r
-\r
-static int playUntilKeyPress( int deviceIndex, float sampleRate, \r
- int framesPerUserBuffer, int framesPerWmmeBuffer, int wmmeBufferCount )\r
-{\r
- PaStreamParameters outputParameters;\r
- PaWinMmeStreamInfo wmmeStreamInfo;\r
- PaStream *stream;\r
- PaError err;\r
- int c;\r
-\r
- outputParameters.device = deviceIndex;\r
- outputParameters.channelCount = CHANNEL_COUNT;\r
- outputParameters.sampleFormat = paFloat32; /* 32 bit floating point processing */\r
- outputParameters.suggestedLatency = 0; /*Pa_GetDeviceInfo( outputParameters.device )->defaultLowOutputLatency;*/\r
- outputParameters.hostApiSpecificStreamInfo = NULL;\r
-\r
- wmmeStreamInfo.size = sizeof(PaWinMmeStreamInfo);\r
- wmmeStreamInfo.hostApiType = paMME; \r
- wmmeStreamInfo.version = 1;\r
- wmmeStreamInfo.flags = paWinMmeUseLowLevelLatencyParameters | paWinMmeDontThrottleOverloadedProcessingThread;\r
- wmmeStreamInfo.framesPerBuffer = framesPerWmmeBuffer;\r
- wmmeStreamInfo.bufferCount = wmmeBufferCount;\r
- outputParameters.hostApiSpecificStreamInfo = &wmmeStreamInfo;\r
-\r
- err = Pa_OpenStream(\r
- &stream,\r
- NULL, /* no input */\r
- &outputParameters,\r
- sampleRate,\r
- framesPerUserBuffer,\r
- paClipOff | paPrimeOutputBuffersUsingStreamCallback, /* we won't output out of range samples so don't bother clipping them */\r
- patestCallback,\r
- &data );\r
- if( err != paNoError ) goto error;\r
-\r
- data.amp = 0;\r
- data.fadeIn = 1;\r
- data.fadeOut = 0;\r
- data.phase = 0;\r
- data.phaseIncrement = 15 + ((rand()%100) / 10); // randomise pitch\r
-\r
- err = Pa_StartStream( stream );\r
- if( err != paNoError ) goto error;\r
-\r
-\r
- do{\r
- printf( "Trying buffer size %d.\nIf it sounds smooth (without clicks or glitches) press 'y', if it sounds bad press 'n' ('q' to quit)\n", framesPerWmmeBuffer );\r
- c = tolower(_getch());\r
- if( c == 'q' ){\r
- Pa_Terminate();\r
- exit(0);\r
- }\r
- }while( c != 'y' && c != 'n' );\r
-\r
- data.fadeOut = 1;\r
- while( Pa_IsStreamActive(stream) == 1 )\r
- Pa_Sleep( 100 );\r
-\r
- err = Pa_StopStream( stream );\r
- if( err != paNoError ) goto error;\r
-\r
- err = Pa_CloseStream( stream );\r
- if( err != paNoError ) goto error;\r
-\r
- return (c == 'y') ? YES : NO;\r
-\r
-error:\r
- return err;\r
-}\r
-\r
-/*******************************************************************/\r
-static void usage( int wmmeHostApiIndex )\r
-{\r
- int i;\r
-\r
- fprintf( stderr, "PortAudio WMME output latency user guided test\n" );\r
- fprintf( stderr, "Usage: x.exe mme-device-index [sampleRate [min-buffer-count max-buffer-count]]\n" );\r
- fprintf( stderr, "Invalid device index. Use one of these:\n" );\r
- for( i=0; i < Pa_GetDeviceCount(); ++i ){\r
-\r
- if( Pa_GetDeviceInfo(i)->hostApi == wmmeHostApiIndex && Pa_GetDeviceInfo(i)->maxOutputChannels > 0 )\r
- fprintf( stderr, "%d (%s)\n", i, Pa_GetDeviceInfo(i)->name );\r
- }\r
- Pa_Terminate();\r
- exit(-1);\r
-}\r
-\r
-/*\r
- ideas: \r
- o- could be testing with 80% CPU load\r
- o- could test with different channel counts\r
-*/\r
-\r
-int main(int argc, char* argv[])\r
-{\r
- PaError err;\r
- int i;\r
- int deviceIndex;\r
- int wmmeBufferCount, wmmeBufferSize, smallestWorkingBufferSize;\r
- int smallestWorkingBufferingLatencyFrames;\r
- int min, max, mid;\r
- int testResult;\r
- FILE *resultsFp;\r
- int wmmeHostApiIndex;\r
- const PaHostApiInfo *wmmeHostApiInfo;\r
- double sampleRate = DEFAULT_SAMPLE_RATE;\r
- int wmmeMinBufferCount = MIN_WMME_BUFFER_COUNT;\r
- int wmmeMaxBufferCount = MAX_WMME_BUFFER_COUNT;\r
-\r
- err = Pa_Initialize();\r
- if( err != paNoError ) goto error;\r
-\r
- wmmeHostApiIndex = Pa_HostApiTypeIdToHostApiIndex( paMME );\r
- wmmeHostApiInfo = Pa_GetHostApiInfo( wmmeHostApiIndex );\r
-\r
- if( argc > 5 )\r
- usage(wmmeHostApiIndex);\r
-\r
- deviceIndex = wmmeHostApiInfo->defaultOutputDevice;\r
- if( argc >= 2 ){\r
- deviceIndex = -1;\r
- if( sscanf( argv[1], "%d", &deviceIndex ) != 1 )\r
- usage(wmmeHostApiIndex);\r
- if( deviceIndex < 0 || deviceIndex >= Pa_GetDeviceCount() || Pa_GetDeviceInfo(deviceIndex)->hostApi != wmmeHostApiIndex ){\r
- usage(wmmeHostApiIndex);\r
- }\r
- }\r
-\r
- printf( "Using device id %d (%s)\n", deviceIndex, Pa_GetDeviceInfo(deviceIndex)->name );\r
-\r
- if( argc >= 3 ){\r
- if( sscanf( argv[2], "%lf", &sampleRate ) != 1 )\r
- usage(wmmeHostApiIndex);\r
- }\r
-\r
- printf( "Testing with sample rate %f.\n", (float)sampleRate );\r
-\r
- if( argc == 4 ){\r
- if( sscanf( argv[3], "%d", &wmmeMinBufferCount ) != 1 )\r
- usage(wmmeHostApiIndex);\r
- wmmeMaxBufferCount = wmmeMinBufferCount;\r
- }\r
-\r
- if( argc == 5 ){\r
- if( sscanf( argv[3], "%d", &wmmeMinBufferCount ) != 1 )\r
- usage(wmmeHostApiIndex);\r
- if( sscanf( argv[4], "%d", &wmmeMaxBufferCount ) != 1 )\r
- usage(wmmeHostApiIndex);\r
- }\r
-\r
- printf( "Testing buffer counts from %d to %d\n", wmmeMinBufferCount, wmmeMaxBufferCount );\r
-\r
-\r
- /* initialise sinusoidal wavetable */\r
- for( i=0; i<TABLE_SIZE; i++ )\r
- {\r
- data.sine[i] = (float) sin( ((double)i/(double)TABLE_SIZE) * M_PI * 2. );\r
- }\r
-\r
- data.phase = 0;\r
-\r
- resultsFp = fopen( "results.txt", "at" );\r
- fprintf( resultsFp, "*** WMME smallest working output buffer sizes\n" );\r
-\r
- printTimeAndDate( resultsFp );\r
- printWindowsVersionInfo( resultsFp );\r
- \r
- fprintf( resultsFp, "audio device: %s\n", Pa_GetDeviceInfo( deviceIndex )->name );\r
- fflush( resultsFp );\r
-\r
- fprintf( resultsFp, "Sample rate: %f\n", (float)sampleRate );\r
- fprintf( resultsFp, "Buffer count, Smallest working buffer size (frames), Smallest working buffering latency (frames), Smallest working buffering latency (Seconds)\n" );\r
-\r
- for( wmmeBufferCount = wmmeMinBufferCount; wmmeBufferCount <= wmmeMaxBufferCount; ++wmmeBufferCount ){\r
- \r
- printf( "Test %d of %d\n", (wmmeBufferCount - wmmeMinBufferCount) + 1, (wmmeMaxBufferCount-wmmeMinBufferCount) + 1 );\r
- printf( "Testing with %d buffers...\n", wmmeBufferCount );\r
-\r
- /*\r
- Binary search after Niklaus Wirth\r
- from http://en.wikipedia.org/wiki/Binary_search_algorithm#The_algorithm\r
- */\r
- min = 1;\r
- max = (int)((sampleRate * .3) / (wmmeBufferCount-1)); //8192; /* we assume that this size works 300ms */\r
- smallestWorkingBufferSize = 0;\r
-\r
- do{\r
- mid = min + ((max - min) / 2);\r
-\r
- wmmeBufferSize = mid;\r
- testResult = playUntilKeyPress( deviceIndex, sampleRate, wmmeBufferSize, wmmeBufferSize, wmmeBufferCount );\r
-\r
- if( testResult == YES ){\r
- max = mid - 1;\r
- smallestWorkingBufferSize = wmmeBufferSize;\r
- }else{\r
- min = mid + 1;\r
- }\r
- \r
- }while( (min <= max) && (testResult == YES || testResult == NO) );\r
-\r
- smallestWorkingBufferingLatencyFrames = smallestWorkingBufferSize * (wmmeBufferCount - 1);\r
-\r
- printf( "Smallest working buffer size for %d buffers is: %d\n", wmmeBufferCount, smallestWorkingBufferSize );\r
- printf( "Corresponding to buffering latency of %d frames, or %f seconds.\n", smallestWorkingBufferingLatencyFrames, smallestWorkingBufferingLatencyFrames / sampleRate );\r
-\r
- fprintf( resultsFp, "%d, %d, %d, %f\n", wmmeBufferCount, smallestWorkingBufferSize, smallestWorkingBufferingLatencyFrames, smallestWorkingBufferingLatencyFrames / sampleRate );\r
- fflush( resultsFp );\r
- }\r
-\r
- fprintf( resultsFp, "###\n" );\r
- fclose( resultsFp );\r
- \r
- Pa_Terminate();\r
- printf("Test finished.\n");\r
- \r
- return err;\r
-error:\r
- Pa_Terminate();\r
- fprintf( stderr, "An error occured while using the portaudio stream\n" );\r
- fprintf( stderr, "Error number: %d\n", err );\r
- fprintf( stderr, "Error message: %s\n", Pa_GetErrorText( err ) );\r
- return err;\r
-}\r
-\r
+/*
+ * $Id: $
+ * Portable Audio I/O Library
+ * Windows MME low level buffer user guided parameters search
+ *
+ * Copyright (c) 2010 Ross Bencina
+ *
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * The text above constitutes the entire PortAudio license; however,
+ * the PortAudio community also makes the following non-binding requests:
+ *
+ * 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. It is also
+ * requested that these non-binding requests be included along with the
+ * license above.
+ */
+
+#include <stdio.h>
+#include <time.h>
+#include <math.h>
+
+#define _WIN32_WINNT 0x0501 /* for GetNativeSystemInfo */
+#include <windows.h> /* required when using pa_win_wmme.h */
+#include <mmsystem.h> /* required when using pa_win_wmme.h */
+
+#include <conio.h> /* for _getch */
+
+
+#include "portaudio.h"
+#include "pa_win_wmme.h"
+
+
+#define DEFAULT_SAMPLE_RATE (44100.)
+
+#ifndef M_PI
+#define M_PI (3.14159265)
+#endif
+
+#define TABLE_SIZE (2048)
+
+#define CHANNEL_COUNT (2)
+
+
+/* seach parameters. we test all buffer counts in this range */
+#define MIN_WMME_BUFFER_COUNT (2)
+#define MAX_WMME_BUFFER_COUNT (12)
+
+
+/*******************************************************************/
+/* functions to query and print Windows version information */
+
+typedef BOOL (WINAPI *LPFN_ISWOW64PROCESS) (HANDLE, PBOOL);
+
+LPFN_ISWOW64PROCESS fnIsWow64Process;
+
+static BOOL IsWow64()
+{
+ BOOL bIsWow64 = FALSE;
+
+ //IsWow64Process is not available on all supported versions of Windows.
+ //Use GetModuleHandle to get a handle to the DLL that contains the function
+ //and GetProcAddress to get a pointer to the function if available.
+
+ fnIsWow64Process = (LPFN_ISWOW64PROCESS) GetProcAddress(
+ GetModuleHandle(TEXT("kernel32")),"IsWow64Process" );
+
+ if(NULL != fnIsWow64Process)
+ {
+ if (!fnIsWow64Process(GetCurrentProcess(),&bIsWow64))
+ {
+ //handle error
+ }
+ }
+ return bIsWow64;
+}
+
+static void printWindowsVersionInfo( FILE *fp )
+{
+ OSVERSIONINFOEX osVersionInfoEx;
+ SYSTEM_INFO systemInfo;
+ const char *osName = "Unknown";
+ const char *osProductType = "";
+ const char *processorArchitecture = "Unknown";
+
+ memset( &osVersionInfoEx, 0, sizeof(OSVERSIONINFOEX) );
+ osVersionInfoEx.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
+ GetVersionEx( &osVersionInfoEx );
+
+
+ if( osVersionInfoEx.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS ){
+ switch( osVersionInfoEx.dwMinorVersion ){
+ case 0: osName = "Windows 95"; break;
+ case 10: osName = "Windows 98"; break; // could also be 98SE (I've seen code discriminate based
+ // on osInfo.Version.Revision.ToString() == "2222A")
+ case 90: osName = "Windows Me"; break;
+ }
+ }else if( osVersionInfoEx.dwPlatformId == VER_PLATFORM_WIN32_NT ){
+ switch( osVersionInfoEx.dwMajorVersion ){
+ case 3: osName = "Windows NT 3.51"; break;
+ case 4: osName = "Windows NT 4.0"; break;
+ case 5: switch( osVersionInfoEx.dwMinorVersion ){
+ case 0: osName = "Windows 2000"; break;
+ case 1: osName = "Windows XP"; break;
+ case 2:
+ if( osVersionInfoEx.wSuiteMask & 0x00008000 /*VER_SUITE_WH_SERVER*/ ){
+ osName = "Windows Home Server";
+ }else{
+ if( osVersionInfoEx.wProductType == VER_NT_WORKSTATION ){
+ osName = "Windows XP Professional x64 Edition (?)";
+ }else{
+ if( GetSystemMetrics(/*SM_SERVERR2*/89) == 0 )
+ osName = "Windows Server 2003";
+ else
+ osName = "Windows Server 2003 R2";
+ }
+ }break;
+ }break;
+ case 6:switch( osVersionInfoEx.dwMinorVersion ){
+ case 0:
+ if( osVersionInfoEx.wProductType == VER_NT_WORKSTATION )
+ osName = "Windows Vista";
+ else
+ osName = "Windows Server 2008";
+ break;
+ case 1:
+ if( osVersionInfoEx.wProductType == VER_NT_WORKSTATION )
+ osName = "Windows 7";
+ else
+ osName = "Windows Server 2008 R2";
+ break;
+ }break;
+ }
+ }
+
+ if(osVersionInfoEx.dwMajorVersion == 4)
+ {
+ if(osVersionInfoEx.wProductType == VER_NT_WORKSTATION)
+ osProductType = "Workstation";
+ else if(osVersionInfoEx.wProductType == VER_NT_SERVER)
+ osProductType = "Server";
+ }
+ else if(osVersionInfoEx.dwMajorVersion == 5)
+ {
+ if(osVersionInfoEx.wProductType == VER_NT_WORKSTATION)
+ {
+ if((osVersionInfoEx.wSuiteMask & VER_SUITE_PERSONAL) == VER_SUITE_PERSONAL)
+ osProductType = "Home Edition"; // Windows XP Home Edition
+ else
+ osProductType = "Professional"; // Windows XP / Windows 2000 Professional
+ }
+ else if(osVersionInfoEx.wProductType == VER_NT_SERVER)
+ {
+ if(osVersionInfoEx.dwMinorVersion == 0)
+ {
+ if((osVersionInfoEx.wSuiteMask & VER_SUITE_DATACENTER) == VER_SUITE_DATACENTER)
+ osProductType = "Datacenter Server"; // Windows 2000 Datacenter Server
+ else if((osVersionInfoEx.wSuiteMask & VER_SUITE_ENTERPRISE) == VER_SUITE_ENTERPRISE)
+ osProductType = "Advanced Server"; // Windows 2000 Advanced Server
+ else
+ osProductType = "Server"; // Windows 2000 Server
+ }
+ }
+ else
+ {
+ if((osVersionInfoEx.wSuiteMask & VER_SUITE_DATACENTER) == VER_SUITE_DATACENTER)
+ osProductType = "Datacenter Edition"; // Windows Server 2003 Datacenter Edition
+ else if((osVersionInfoEx.wSuiteMask & VER_SUITE_ENTERPRISE) == VER_SUITE_ENTERPRISE)
+ osProductType = "Enterprise Edition"; // Windows Server 2003 Enterprise Edition
+ else if((osVersionInfoEx.wSuiteMask & VER_SUITE_BLADE) == VER_SUITE_BLADE)
+ osProductType = "Web Edition"; // Windows Server 2003 Web Edition
+ else
+ osProductType = "Standard Edition"; // Windows Server 2003 Standard Edition
+ }
+ }
+
+ memset( &systemInfo, 0, sizeof(SYSTEM_INFO) );
+ GetNativeSystemInfo( &systemInfo );
+
+ if( systemInfo.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_INTEL )
+ processorArchitecture = "x86";
+ else if( systemInfo.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64 )
+ processorArchitecture = "x64";
+ else if( systemInfo.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_IA64 )
+ processorArchitecture = "Itanium";
+
+
+ fprintf( fp, "OS name and edition: %s %s\n", osName, osProductType );
+ fprintf( fp, "OS version: %d.%d.%d %S\n",
+ osVersionInfoEx.dwMajorVersion, osVersionInfoEx.dwMinorVersion,
+ osVersionInfoEx.dwBuildNumber, osVersionInfoEx.szCSDVersion );
+ fprintf( fp, "Processor architecture: %s\n", processorArchitecture );
+ fprintf( fp, "WoW64 process: %s\n", IsWow64() ? "Yes" : "No" );
+}
+
+static void printTimeAndDate( FILE *fp )
+{
+ struct tm *local;
+ time_t t;
+
+ t = time(NULL);
+ local = localtime(&t);
+ fprintf(fp, "Local time and date: %s", asctime(local));
+ local = gmtime(&t);
+ fprintf(fp, "UTC time and date: %s", asctime(local));
+}
+
+/*******************************************************************/
+
+typedef struct
+{
+ float sine[TABLE_SIZE];
+ double phase;
+ double phaseIncrement;
+ volatile int fadeIn;
+ volatile int fadeOut;
+ double amp;
+}
+paTestData;
+
+static paTestData data;
+
+/* This routine will be called by the PortAudio engine when audio is needed.
+** It may called at interrupt level on some machines so don't do anything
+** that could mess up the system like calling malloc() or free().
+*/
+static int patestCallback( const void *inputBuffer, void *outputBuffer,
+ unsigned long framesPerBuffer,
+ const PaStreamCallbackTimeInfo* timeInfo,
+ PaStreamCallbackFlags statusFlags,
+ void *userData )
+{
+ paTestData *data = (paTestData*)userData;
+ float *out = (float*)outputBuffer;
+ unsigned long i,j;
+
+ (void) timeInfo; /* Prevent unused variable warnings. */
+ (void) statusFlags;
+ (void) inputBuffer;
+
+ for( i=0; i<framesPerBuffer; i++ )
+ {
+ float x = data->sine[(int)data->phase];
+ data->phase += data->phaseIncrement;
+ if( data->phase >= TABLE_SIZE ){
+ data->phase -= TABLE_SIZE;
+ }
+
+ x *= data->amp;
+ if( data->fadeIn ){
+ data->amp += .001;
+ if( data->amp >= 1. )
+ data->fadeIn = 0;
+ }else if( data->fadeOut ){
+ if( data->amp > 0 )
+ data->amp -= .001;
+ }
+
+ for( j = 0; j < CHANNEL_COUNT; ++j ){
+ *out++ = x;
+ }
+ }
+
+ if( data->amp > 0 )
+ return paContinue;
+ else
+ return paComplete;
+}
+
+
+#define YES 1
+#define NO 0
+
+
+static int playUntilKeyPress( int deviceIndex, float sampleRate,
+ int framesPerUserBuffer, int framesPerWmmeBuffer, int wmmeBufferCount )
+{
+ PaStreamParameters outputParameters;
+ PaWinMmeStreamInfo wmmeStreamInfo;
+ PaStream *stream;
+ PaError err;
+ int c;
+
+ outputParameters.device = deviceIndex;
+ outputParameters.channelCount = CHANNEL_COUNT;
+ outputParameters.sampleFormat = paFloat32; /* 32 bit floating point processing */
+ outputParameters.suggestedLatency = 0; /*Pa_GetDeviceInfo( outputParameters.device )->defaultLowOutputLatency;*/
+ outputParameters.hostApiSpecificStreamInfo = NULL;
+
+ wmmeStreamInfo.size = sizeof(PaWinMmeStreamInfo);
+ wmmeStreamInfo.hostApiType = paMME;
+ wmmeStreamInfo.version = 1;
+ wmmeStreamInfo.flags = paWinMmeUseLowLevelLatencyParameters | paWinMmeDontThrottleOverloadedProcessingThread;
+ wmmeStreamInfo.framesPerBuffer = framesPerWmmeBuffer;
+ wmmeStreamInfo.bufferCount = wmmeBufferCount;
+ outputParameters.hostApiSpecificStreamInfo = &wmmeStreamInfo;
+
+ err = Pa_OpenStream(
+ &stream,
+ NULL, /* no input */
+ &outputParameters,
+ sampleRate,
+ framesPerUserBuffer,
+ paClipOff | paPrimeOutputBuffersUsingStreamCallback, /* we won't output out of range samples so don't bother clipping them */
+ patestCallback,
+ &data );
+ if( err != paNoError ) goto error;
+
+ data.amp = 0;
+ data.fadeIn = 1;
+ data.fadeOut = 0;
+ data.phase = 0;
+ data.phaseIncrement = 15 + ((rand()%100) / 10); // randomise pitch
+
+ err = Pa_StartStream( stream );
+ if( err != paNoError ) goto error;
+
+
+ do{
+ printf( "Trying buffer size %d.\nIf it sounds smooth (without clicks or glitches) press 'y', if it sounds bad press 'n' ('q' to quit)\n", framesPerWmmeBuffer );
+ c = tolower(_getch());
+ if( c == 'q' ){
+ Pa_Terminate();
+ exit(0);
+ }
+ }while( c != 'y' && c != 'n' );
+
+ data.fadeOut = 1;
+ while( Pa_IsStreamActive(stream) == 1 )
+ Pa_Sleep( 100 );
+
+ err = Pa_StopStream( stream );
+ if( err != paNoError ) goto error;
+
+ err = Pa_CloseStream( stream );
+ if( err != paNoError ) goto error;
+
+ return (c == 'y') ? YES : NO;
+
+error:
+ return err;
+}
+
+/*******************************************************************/
+static void usage( int wmmeHostApiIndex )
+{
+ int i;
+
+ fprintf( stderr, "PortAudio WMME output latency user guided test\n" );
+ fprintf( stderr, "Usage: x.exe mme-device-index [sampleRate [min-buffer-count max-buffer-count]]\n" );
+ fprintf( stderr, "Invalid device index. Use one of these:\n" );
+ for( i=0; i < Pa_GetDeviceCount(); ++i ){
+
+ if( Pa_GetDeviceInfo(i)->hostApi == wmmeHostApiIndex && Pa_GetDeviceInfo(i)->maxOutputChannels > 0 )
+ fprintf( stderr, "%d (%s)\n", i, Pa_GetDeviceInfo(i)->name );
+ }
+ Pa_Terminate();
+ exit(-1);
+}
+
+/*
+ ideas:
+ o- could be testing with 80% CPU load
+ o- could test with different channel counts
+*/
+
+int main(int argc, char* argv[])
+{
+ PaError err;
+ int i;
+ int deviceIndex;
+ int wmmeBufferCount, wmmeBufferSize, smallestWorkingBufferSize;
+ int smallestWorkingBufferingLatencyFrames;
+ int min, max, mid;
+ int testResult;
+ FILE *resultsFp;
+ int wmmeHostApiIndex;
+ const PaHostApiInfo *wmmeHostApiInfo;
+ double sampleRate = DEFAULT_SAMPLE_RATE;
+ int wmmeMinBufferCount = MIN_WMME_BUFFER_COUNT;
+ int wmmeMaxBufferCount = MAX_WMME_BUFFER_COUNT;
+
+ err = Pa_Initialize();
+ if( err != paNoError ) goto error;
+
+ wmmeHostApiIndex = Pa_HostApiTypeIdToHostApiIndex( paMME );
+ wmmeHostApiInfo = Pa_GetHostApiInfo( wmmeHostApiIndex );
+
+ if( argc > 5 )
+ usage(wmmeHostApiIndex);
+
+ deviceIndex = wmmeHostApiInfo->defaultOutputDevice;
+ if( argc >= 2 ){
+ deviceIndex = -1;
+ if( sscanf( argv[1], "%d", &deviceIndex ) != 1 )
+ usage(wmmeHostApiIndex);
+ if( deviceIndex < 0 || deviceIndex >= Pa_GetDeviceCount() || Pa_GetDeviceInfo(deviceIndex)->hostApi != wmmeHostApiIndex ){
+ usage(wmmeHostApiIndex);
+ }
+ }
+
+ printf( "Using device id %d (%s)\n", deviceIndex, Pa_GetDeviceInfo(deviceIndex)->name );
+
+ if( argc >= 3 ){
+ if( sscanf( argv[2], "%lf", &sampleRate ) != 1 )
+ usage(wmmeHostApiIndex);
+ }
+
+ printf( "Testing with sample rate %f.\n", (float)sampleRate );
+
+ if( argc == 4 ){
+ if( sscanf( argv[3], "%d", &wmmeMinBufferCount ) != 1 )
+ usage(wmmeHostApiIndex);
+ wmmeMaxBufferCount = wmmeMinBufferCount;
+ }
+
+ if( argc == 5 ){
+ if( sscanf( argv[3], "%d", &wmmeMinBufferCount ) != 1 )
+ usage(wmmeHostApiIndex);
+ if( sscanf( argv[4], "%d", &wmmeMaxBufferCount ) != 1 )
+ usage(wmmeHostApiIndex);
+ }
+
+ printf( "Testing buffer counts from %d to %d\n", wmmeMinBufferCount, wmmeMaxBufferCount );
+
+
+ /* initialise sinusoidal wavetable */
+ for( i=0; i<TABLE_SIZE; i++ )
+ {
+ data.sine[i] = (float) sin( ((double)i/(double)TABLE_SIZE) * M_PI * 2. );
+ }
+
+ data.phase = 0;
+
+ resultsFp = fopen( "results.txt", "at" );
+ fprintf( resultsFp, "*** WMME smallest working output buffer sizes\n" );
+
+ printTimeAndDate( resultsFp );
+ printWindowsVersionInfo( resultsFp );
+
+ fprintf( resultsFp, "audio device: %s\n", Pa_GetDeviceInfo( deviceIndex )->name );
+ fflush( resultsFp );
+
+ fprintf( resultsFp, "Sample rate: %f\n", (float)sampleRate );
+ fprintf( resultsFp, "Buffer count, Smallest working buffer size (frames), Smallest working buffering latency (frames), Smallest working buffering latency (Seconds)\n" );
+
+ for( wmmeBufferCount = wmmeMinBufferCount; wmmeBufferCount <= wmmeMaxBufferCount; ++wmmeBufferCount ){
+
+ printf( "Test %d of %d\n", (wmmeBufferCount - wmmeMinBufferCount) + 1, (wmmeMaxBufferCount-wmmeMinBufferCount) + 1 );
+ printf( "Testing with %d buffers...\n", wmmeBufferCount );
+
+ /*
+ Binary search after Niklaus Wirth
+ from http://en.wikipedia.org/wiki/Binary_search_algorithm#The_algorithm
+ */
+ min = 1;
+ max = (int)((sampleRate * .3) / (wmmeBufferCount-1)); //8192; /* we assume that this size works 300ms */
+ smallestWorkingBufferSize = 0;
+
+ do{
+ mid = min + ((max - min) / 2);
+
+ wmmeBufferSize = mid;
+ testResult = playUntilKeyPress( deviceIndex, sampleRate, wmmeBufferSize, wmmeBufferSize, wmmeBufferCount );
+
+ if( testResult == YES ){
+ max = mid - 1;
+ smallestWorkingBufferSize = wmmeBufferSize;
+ }else{
+ min = mid + 1;
+ }
+
+ }while( (min <= max) && (testResult == YES || testResult == NO) );
+
+ smallestWorkingBufferingLatencyFrames = smallestWorkingBufferSize * (wmmeBufferCount - 1);
+
+ printf( "Smallest working buffer size for %d buffers is: %d\n", wmmeBufferCount, smallestWorkingBufferSize );
+ printf( "Corresponding to buffering latency of %d frames, or %f seconds.\n", smallestWorkingBufferingLatencyFrames, smallestWorkingBufferingLatencyFrames / sampleRate );
+
+ fprintf( resultsFp, "%d, %d, %d, %f\n", wmmeBufferCount, smallestWorkingBufferSize, smallestWorkingBufferingLatencyFrames, smallestWorkingBufferingLatencyFrames / sampleRate );
+ fflush( resultsFp );
+ }
+
+ fprintf( resultsFp, "###\n" );
+ fclose( resultsFp );
+
+ Pa_Terminate();
+ printf("Test finished.\n");
+
+ return err;
+error:
+ Pa_Terminate();
+ fprintf( stderr, "An error occured while using the portaudio stream\n" );
+ fprintf( stderr, "Error number: %d\n", err );
+ fprintf( stderr, "Error message: %s\n", Pa_GetErrorText( err ) );
+ return err;
+}
+
-/*\r
- * $Id: $\r
- * Portable Audio I/O Library\r
- * Windows MME low level buffer parameters test\r
- *\r
- * Copyright (c) 2007 Ross Bencina\r
- *\r
- * Permission is hereby granted, free of charge, to any person obtaining\r
- * a copy of this software and associated documentation files\r
- * (the "Software"), to deal in the Software without restriction,\r
- * including without limitation the rights to use, copy, modify, merge,\r
- * publish, distribute, sublicense, and/or sell copies of the Software,\r
- * and to permit persons to whom the Software is furnished to do so,\r
- * subject to the following conditions:\r
- *\r
- * The above copyright notice and this permission notice shall be\r
- * included in all copies or substantial portions of the Software.\r
- *\r
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\r
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\r
- * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\r
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\r
- * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
- */\r
-\r
-/*\r
- * The text above constitutes the entire PortAudio license; however, \r
- * the PortAudio community also makes the following non-binding requests:\r
- *\r
- * Any person wishing to distribute modifications to the Software is\r
- * requested to send the modifications to the original developer so that\r
- * they can be incorporated into the canonical version. It is also \r
- * requested that these non-binding requests be included along with the \r
- * license above.\r
- */\r
-\r
-#include <stdio.h>\r
-#include <math.h>\r
-\r
-#include <windows.h> /* required when using pa_win_wmme.h */\r
-#include <mmsystem.h> /* required when using pa_win_wmme.h */\r
-\r
-#include "portaudio.h"\r
-#include "pa_win_wmme.h"\r
-\r
-#define NUM_SECONDS (6)\r
-#define SAMPLE_RATE (44100)\r
-\r
-#define WMME_FRAMES_PER_BUFFER (440)\r
-#define WMME_BUFFER_COUNT (6)\r
-\r
-#define FRAMES_PER_BUFFER WMME_FRAMES_PER_BUFFER /* hardwire portaudio callback buffer size to WMME buffer size for this test */\r
-\r
-#ifndef M_PI\r
-#define M_PI (3.14159265)\r
-#endif\r
-\r
-#define TABLE_SIZE (2048)\r
-\r
-#define CHANNEL_COUNT (2)\r
-\r
-\r
-typedef struct\r
-{\r
- float sine[TABLE_SIZE];\r
- double phase;\r
-}\r
-paTestData;\r
-\r
-/* This routine will be called by the PortAudio engine when audio is needed.\r
-** It may called at interrupt level on some machines so don't do anything\r
-** that could mess up the system like calling malloc() or free().\r
-*/\r
-static int patestCallback( const void *inputBuffer, void *outputBuffer,\r
- unsigned long framesPerBuffer,\r
- const PaStreamCallbackTimeInfo* timeInfo,\r
- PaStreamCallbackFlags statusFlags,\r
- void *userData )\r
-{\r
- paTestData *data = (paTestData*)userData;\r
- float *out = (float*)outputBuffer;\r
- unsigned long i,j;\r
-\r
- (void) timeInfo; /* Prevent unused variable warnings. */\r
- (void) statusFlags;\r
- (void) inputBuffer;\r
- \r
- for( i=0; i<framesPerBuffer; i++ )\r
- {\r
- float x = data->sine[(int)data->phase];\r
- data->phase += 20;\r
- if( data->phase >= TABLE_SIZE ){\r
- data->phase -= TABLE_SIZE;\r
- }\r
-\r
- for( j = 0; j < CHANNEL_COUNT; ++j ){\r
- *out++ = x;\r
- }\r
- }\r
- \r
- return paContinue;\r
-}\r
-\r
-/*******************************************************************/\r
-int main(int argc, char* argv[])\r
-{\r
- PaStreamParameters outputParameters;\r
- PaWinMmeStreamInfo wmmeStreamInfo;\r
- PaStream *stream;\r
- PaError err;\r
- paTestData data;\r
- int i;\r
- int deviceIndex;\r
-\r
- printf("PortAudio Test: output a sine blip on each channel. SR = %d, BufSize = %d, Chans = %d\n", SAMPLE_RATE, FRAMES_PER_BUFFER, CHANNEL_COUNT);\r
-\r
- err = Pa_Initialize();\r
- if( err != paNoError ) goto error;\r
-\r
- deviceIndex = Pa_GetHostApiInfo( Pa_HostApiTypeIdToHostApiIndex( paMME ) )->defaultOutputDevice;\r
- if( argc == 2 ){\r
- sscanf( argv[1], "%d", &deviceIndex );\r
- }\r
-\r
- printf( "using device id %d (%s)\n", deviceIndex, Pa_GetDeviceInfo(deviceIndex)->name );\r
-\r
- /* initialise sinusoidal wavetable */\r
- for( i=0; i<TABLE_SIZE; i++ )\r
- {\r
- data.sine[i] = (float) sin( ((double)i/(double)TABLE_SIZE) * M_PI * 2. );\r
- }\r
-\r
- data.phase = 0;\r
-\r
- outputParameters.device = deviceIndex;\r
- outputParameters.channelCount = CHANNEL_COUNT;\r
- outputParameters.sampleFormat = paFloat32; /* 32 bit floating point processing */\r
- outputParameters.suggestedLatency = 0; /*Pa_GetDeviceInfo( outputParameters.device )->defaultLowOutputLatency;*/\r
- outputParameters.hostApiSpecificStreamInfo = NULL;\r
-\r
- wmmeStreamInfo.size = sizeof(PaWinMmeStreamInfo);\r
- wmmeStreamInfo.hostApiType = paMME; \r
- wmmeStreamInfo.version = 1;\r
- wmmeStreamInfo.flags = paWinMmeUseLowLevelLatencyParameters | paWinMmeDontThrottleOverloadedProcessingThread;\r
- wmmeStreamInfo.framesPerBuffer = WMME_FRAMES_PER_BUFFER;\r
- wmmeStreamInfo.bufferCount = WMME_BUFFER_COUNT;\r
- outputParameters.hostApiSpecificStreamInfo = &wmmeStreamInfo;\r
- \r
-\r
- if( Pa_IsFormatSupported( 0, &outputParameters, SAMPLE_RATE ) == paFormatIsSupported ){\r
- printf( "Pa_IsFormatSupported reports device will support %d channels.\n", CHANNEL_COUNT );\r
- }else{\r
- printf( "Pa_IsFormatSupported reports device will not support %d channels.\n", CHANNEL_COUNT );\r
- }\r
-\r
- err = Pa_OpenStream(\r
- &stream,\r
- NULL, /* no input */\r
- &outputParameters,\r
- SAMPLE_RATE,\r
- FRAMES_PER_BUFFER,\r
- paClipOff, /* we won't output out of range samples so don't bother clipping them */\r
- patestCallback,\r
- &data );\r
- if( err != paNoError ) goto error;\r
-\r
- err = Pa_StartStream( stream );\r
- if( err != paNoError ) goto error;\r
-\r
- printf("Play for %d seconds.\n", NUM_SECONDS );\r
- Pa_Sleep( NUM_SECONDS * 1000 );\r
-\r
- err = Pa_StopStream( stream );\r
- if( err != paNoError ) goto error;\r
-\r
- err = Pa_CloseStream( stream );\r
- if( err != paNoError ) goto error;\r
-\r
- Pa_Terminate();\r
- printf("Test finished.\n");\r
- \r
- return err;\r
-error:\r
- Pa_Terminate();\r
- fprintf( stderr, "An error occured while using the portaudio stream\n" );\r
- fprintf( stderr, "Error number: %d\n", err );\r
- fprintf( stderr, "Error message: %s\n", Pa_GetErrorText( err ) );\r
- return err;\r
-}\r
-\r
+/*
+ * $Id: $
+ * Portable Audio I/O Library
+ * Windows MME low level buffer parameters test
+ *
+ * Copyright (c) 2007 Ross Bencina
+ *
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * The text above constitutes the entire PortAudio license; however,
+ * the PortAudio community also makes the following non-binding requests:
+ *
+ * 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. It is also
+ * requested that these non-binding requests be included along with the
+ * license above.
+ */
+
+#include <stdio.h>
+#include <math.h>
+
+#include <windows.h> /* required when using pa_win_wmme.h */
+#include <mmsystem.h> /* required when using pa_win_wmme.h */
+
+#include "portaudio.h"
+#include "pa_win_wmme.h"
+
+#define NUM_SECONDS (6)
+#define SAMPLE_RATE (44100)
+
+#define WMME_FRAMES_PER_BUFFER (440)
+#define WMME_BUFFER_COUNT (6)
+
+#define FRAMES_PER_BUFFER WMME_FRAMES_PER_BUFFER /* hardwire portaudio callback buffer size to WMME buffer size for this test */
+
+#ifndef M_PI
+#define M_PI (3.14159265)
+#endif
+
+#define TABLE_SIZE (2048)
+
+#define CHANNEL_COUNT (2)
+
+
+typedef struct
+{
+ float sine[TABLE_SIZE];
+ double phase;
+}
+paTestData;
+
+/* This routine will be called by the PortAudio engine when audio is needed.
+** It may called at interrupt level on some machines so don't do anything
+** that could mess up the system like calling malloc() or free().
+*/
+static int patestCallback( const void *inputBuffer, void *outputBuffer,
+ unsigned long framesPerBuffer,
+ const PaStreamCallbackTimeInfo* timeInfo,
+ PaStreamCallbackFlags statusFlags,
+ void *userData )
+{
+ paTestData *data = (paTestData*)userData;
+ float *out = (float*)outputBuffer;
+ unsigned long i,j;
+
+ (void) timeInfo; /* Prevent unused variable warnings. */
+ (void) statusFlags;
+ (void) inputBuffer;
+
+ for( i=0; i<framesPerBuffer; i++ )
+ {
+ float x = data->sine[(int)data->phase];
+ data->phase += 20;
+ if( data->phase >= TABLE_SIZE ){
+ data->phase -= TABLE_SIZE;
+ }
+
+ for( j = 0; j < CHANNEL_COUNT; ++j ){
+ *out++ = x;
+ }
+ }
+
+ return paContinue;
+}
+
+/*******************************************************************/
+int main(int argc, char* argv[])
+{
+ PaStreamParameters outputParameters;
+ PaWinMmeStreamInfo wmmeStreamInfo;
+ PaStream *stream;
+ PaError err;
+ paTestData data;
+ int i;
+ int deviceIndex;
+
+ printf("PortAudio Test: output a sine blip on each channel. SR = %d, BufSize = %d, Chans = %d\n", SAMPLE_RATE, FRAMES_PER_BUFFER, CHANNEL_COUNT);
+
+ err = Pa_Initialize();
+ if( err != paNoError ) goto error;
+
+ deviceIndex = Pa_GetHostApiInfo( Pa_HostApiTypeIdToHostApiIndex( paMME ) )->defaultOutputDevice;
+ if( argc == 2 ){
+ sscanf( argv[1], "%d", &deviceIndex );
+ }
+
+ printf( "using device id %d (%s)\n", deviceIndex, Pa_GetDeviceInfo(deviceIndex)->name );
+
+ /* initialise sinusoidal wavetable */
+ for( i=0; i<TABLE_SIZE; i++ )
+ {
+ data.sine[i] = (float) sin( ((double)i/(double)TABLE_SIZE) * M_PI * 2. );
+ }
+
+ data.phase = 0;
+
+ outputParameters.device = deviceIndex;
+ outputParameters.channelCount = CHANNEL_COUNT;
+ outputParameters.sampleFormat = paFloat32; /* 32 bit floating point processing */
+ outputParameters.suggestedLatency = 0; /*Pa_GetDeviceInfo( outputParameters.device )->defaultLowOutputLatency;*/
+ outputParameters.hostApiSpecificStreamInfo = NULL;
+
+ wmmeStreamInfo.size = sizeof(PaWinMmeStreamInfo);
+ wmmeStreamInfo.hostApiType = paMME;
+ wmmeStreamInfo.version = 1;
+ wmmeStreamInfo.flags = paWinMmeUseLowLevelLatencyParameters | paWinMmeDontThrottleOverloadedProcessingThread;
+ wmmeStreamInfo.framesPerBuffer = WMME_FRAMES_PER_BUFFER;
+ wmmeStreamInfo.bufferCount = WMME_BUFFER_COUNT;
+ outputParameters.hostApiSpecificStreamInfo = &wmmeStreamInfo;
+
+
+ if( Pa_IsFormatSupported( 0, &outputParameters, SAMPLE_RATE ) == paFormatIsSupported ){
+ printf( "Pa_IsFormatSupported reports device will support %d channels.\n", CHANNEL_COUNT );
+ }else{
+ printf( "Pa_IsFormatSupported reports device will not support %d channels.\n", CHANNEL_COUNT );
+ }
+
+ err = Pa_OpenStream(
+ &stream,
+ NULL, /* no input */
+ &outputParameters,
+ SAMPLE_RATE,
+ FRAMES_PER_BUFFER,
+ paClipOff, /* we won't output out of range samples so don't bother clipping them */
+ patestCallback,
+ &data );
+ if( err != paNoError ) goto error;
+
+ err = Pa_StartStream( stream );
+ if( err != paNoError ) goto error;
+
+ printf("Play for %d seconds.\n", NUM_SECONDS );
+ Pa_Sleep( NUM_SECONDS * 1000 );
+
+ err = Pa_StopStream( stream );
+ if( err != paNoError ) goto error;
+
+ err = Pa_CloseStream( stream );
+ if( err != paNoError ) goto error;
+
+ Pa_Terminate();
+ printf("Test finished.\n");
+
+ return err;
+error:
+ Pa_Terminate();
+ fprintf( stderr, "An error occured while using the portaudio stream\n" );
+ fprintf( stderr, "Error number: %d\n", err );
+ fprintf( stderr, "Error message: %s\n", Pa_GetErrorText( err ) );
+ return err;
+}
+