make some data extern C and const
[rtaudio.git] / RtAudio.h
index 78d96a91ed4490c873eaaa2336c353a1ad74229a..5b71fe88301218179bbe734a55e52cf790dc8dbb 100644 (file)
--- a/RtAudio.h
+++ b/RtAudio.h
 #define RTAUDIO_VERSION "5.0.0"
 
 #if defined _WIN32 || defined __CYGWIN__
-  #define RTAUDIO_DLL_PUBLIC
+  #if defined(RTAUDIO_EXPORT)
+    #define RTAUDIO_DLL_PUBLIC __declspec(dllexport)
+  #else
+    #define RTAUDIO_DLL_PUBLIC
+  #endif
 #else
   #if __GNUC__ >= 4
     #define RTAUDIO_DLL_PUBLIC __attribute__( (visibility( "default" )) )
@@ -61,7 +65,6 @@
 #include <vector>
 #include <stdexcept>
 #include <iostream>
-#include <map>
 
 /*! \typedef typedef unsigned long RtAudioFormat;
     \brief RtAudio data format type.
@@ -286,12 +289,10 @@ class RTAUDIO_DLL_PUBLIC RtAudio
     WINDOWS_WASAPI, /*!< The Microsoft WASAPI API. */
     WINDOWS_ASIO,   /*!< The Steinberg Audio Stream I/O API. */
     WINDOWS_DS,     /*!< The Microsoft Direct Sound API. */
-    RTAUDIO_DUMMY   /*!< A compilable but non-functional API. */
+    RTAUDIO_DUMMY,  /*!< A compilable but non-functional API. */
+    NUM_APIS        /*!< Number of values in this enum. */
   };
 
-  //! Map string identifiers for APIs to enum identifiers and display names
-  typedef std::map< std::string, std::pair<RtAudio::Api, std::string> > ApiNameMap;
-
   //! The public device information structure for returning queried values.
   struct DeviceInfo {
     bool probed;                  /*!< true if the device capabilities were successfully probed. */
@@ -407,7 +408,7 @@ class RTAUDIO_DLL_PUBLIC RtAudio
     the enumerated list values.  Note that there can be more than one
     API compiled for certain operating systems.
   */
-  static const std::vector<RtAudio::Api>& getCompiledApi();
+  static const std::vector<RtAudio::Api>& getCompiledApis();
 
   //! Return the name of a specified compiled audio API.
   /*!
@@ -618,9 +619,6 @@ class RTAUDIO_DLL_PUBLIC RtAudio
 
  protected:
 
-  //! Storage for API name map
-  static const ApiNameMap apiNames;
-
   //! Storage for compiled API list
   static const std::vector<RtAudio::Api> compiledApis;