X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=RtAudio.h;h=5b71fe88301218179bbe734a55e52cf790dc8dbb;hb=975e28a00024150190e792c66ef72a91da268f2a;hp=3927ae19e7ac3e2e5d5da3246c7dd79c9ab273f7;hpb=bc469fab7b18df4253db52f17726697ae5c9c564;p=rtaudio.git diff --git a/RtAudio.h b/RtAudio.h index 3927ae1..5b71fe8 100644 --- a/RtAudio.h +++ b/RtAudio.h @@ -48,7 +48,11 @@ #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 #include #include -#include /*! \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 > 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& getCompiledApi(); + static const std::vector& getCompiledApis(); //! Return the name of a specified compiled audio API. /*! @@ -416,7 +417,7 @@ class RTAUDIO_DLL_PUBLIC RtAudio If the API is unknown or not compiled, this function will return the empty string. */ - static const std::string& getCompiledApiName( RtAudio::Api api ); + static const std::string getCompiledApiName( RtAudio::Api api ); //! Return the display name of a specified compiled audio API. /*! @@ -424,7 +425,7 @@ class RTAUDIO_DLL_PUBLIC RtAudio If the API is unknown or not compiled, this function will return the empty string. */ - static const std::string& getCompiledApiDisplayName( RtAudio::Api api ); + static const std::string getCompiledApiDisplayName( RtAudio::Api api ); //! Return the compiled audio API having the given name. /*! @@ -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 compiledApis;