Catching up before things get into a snarl.
authorwittend99 <wittend99@01035d8c-6547-0410-b346-abe4f91aad63>
Fri, 18 May 2012 02:06:15 +0000 (02:06 +0000)
committerwittend99 <wittend99@01035d8c-6547-0410-b346-abe4f91aad63>
Fri, 18 May 2012 02:06:15 +0000 (02:06 +0000)
git-svn-id: https://svn.code.sf.net/p/freetel/code@475 01035d8c-6547-0410-b346-abe4f91aad63

29 files changed:
fdmdv2/extern/include/portaudiocpp/AsioDeviceAdapter.hxx
fdmdv2/extern/include/portaudiocpp/AutoSystem.hxx
fdmdv2/extern/include/portaudiocpp/BlockingStream.hxx
fdmdv2/extern/include/portaudiocpp/CFunCallbackStream.hxx
fdmdv2/extern/include/portaudiocpp/CallbackInterface.hxx
fdmdv2/extern/include/portaudiocpp/CallbackStream.hxx
fdmdv2/extern/include/portaudiocpp/CppFunCallbackStream.hxx
fdmdv2/extern/include/portaudiocpp/Device.hxx
fdmdv2/extern/include/portaudiocpp/DirectionSpecificStreamParameters.hxx
fdmdv2/extern/include/portaudiocpp/Exception.hxx
fdmdv2/extern/include/portaudiocpp/HostApi.hxx
fdmdv2/extern/include/portaudiocpp/InterfaceCallbackStream.hxx
fdmdv2/extern/include/portaudiocpp/MemFunCallbackStream.hxx
fdmdv2/extern/include/portaudiocpp/PortAudioCpp.hxx
fdmdv2/extern/include/portaudiocpp/SampleDataFormat.hxx
fdmdv2/extern/include/portaudiocpp/Stream.hxx
fdmdv2/extern/include/portaudiocpp/StreamParameters.hxx
fdmdv2/extern/include/portaudiocpp/System.hxx
fdmdv2/extern/include/portaudiocpp/SystemDeviceIterator.hxx
fdmdv2/extern/include/portaudiocpp/SystemHostApiIterator.hxx
fdmdv2/extern/lib/libportaudio.a [new file with mode: 0644]
fdmdv2/extern/lib/libportaudio.la [new file with mode: 0644]
fdmdv2/pa_cppbinding_test/gui.cpp
fdmdv2/pa_cppbinding_test/gui.fbp
fdmdv2/pa_cppbinding_test/gui.h
fdmdv2/pa_cppbinding_test/main.cpp
fdmdv2/pa_cppbinding_test/main.h
fdmdv2/pa_cppbinding_test/pa_cppbinding_test.mk
fdmdv2/pa_cppbinding_test/pa_cppbinding_test.project

index 1964b6a20298aceb1166a445c145665c98b49079..3291457a2a5de12524798b5fd8f102312c8d2d7a 100644 (file)
@@ -4,41 +4,41 @@
 namespace portaudio
 {
 
-       // Forward declaration(s):
-       class Device;
-
-       // Declaration(s):
-       //////
-       /// @brief Adapts the given Device to an ASIO specific extension.
-       ///
-       /// Deleting the AsioDeviceAdapter does not affect the underlaying 
-       /// Device.
-       //////
-       class AsioDeviceAdapter
-       {
-       public:
-               AsioDeviceAdapter(Device &device);
-
-               Device &device();
-
-               long minBufferSize() const;
-               long maxBufferSize() const;
-               long preferredBufferSize() const;
-               long granularity() const;
-
-               void showControlPanel(void *systemSpecific);
-
-               const char *inputChannelName(int channelIndex) const;\r
-               const char *outputChannelName(int channelIndex) const;
-
-       private:
-               Device *device_;
-
-               long minBufferSize_;
-               long maxBufferSize_;
-               long preferredBufferSize_;
-               long granularity_;
-       };
+    // Forward declaration(s):
+    class Device;
+
+    // Declaration(s):
+    //////
+    /// @brief Adapts the given Device to an ASIO specific extension.
+    ///
+    /// Deleting the AsioDeviceAdapter does not affect the underlaying
+    /// Device.
+    //////
+    class AsioDeviceAdapter
+    {
+    public:
+        AsioDeviceAdapter(Device &device);
+
+        Device &device();
+
+        long minBufferSize() const;
+        long maxBufferSize() const;
+        long preferredBufferSize() const;
+        long granularity() const;
+
+        void showControlPanel(void *systemSpecific);
+
+        const char *inputChannelName(int channelIndex) const;\r
+        const char *outputChannelName(int channelIndex) const;
+
+    private:
+        Device *device_;
+
+        long minBufferSize_;
+        long maxBufferSize_;
+        long preferredBufferSize_;
+        long granularity_;
+    };
 }
 
 #endif // INCLUDED_PORTAUDIO_ASIODEVICEADAPTER_HXX
index 16cac5ed502f623a659f596a042b96a49620a5d1..7c5889e5ed8925f81adfa533001cc8d2653e7e46 100644 (file)
@@ -11,48 +11,48 @@ namespace portaudio
 {\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
+    /// @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
index 37fa76652dc19a770f54d8ecd5a2fccd5f61d8f2..9653550f86da42d1e42996313e0b64c4e969dcf0 100644 (file)
@@ -12,28 +12,28 @@ namespace portaudio
 \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 &parameters);\r
-               ~BlockingStream();\r
-\r
-               void open(const StreamParameters &parameters);\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
+    /// @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 &parameters);\r
+        ~BlockingStream();\r
+\r
+        void open(const StreamParameters &parameters);\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
index b3e3b5c1b88a1cd85ffa9b704fbe6a93626a8683..f4d5918db94f2389e1a5565b1f7b90ee0f4378bb 100644 (file)
@@ -12,7 +12,7 @@
 // Forward declaration(s)\r
 namespace portaudio\r
 {\r
-       class StreamParameters;\r
+    class StreamParameters;\r
 }\r
 \r
 // ---------------------------------------------------------------------------------------\r
@@ -20,27 +20,27 @@ namespace portaudio
 // 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 &parameters, PaStreamCallback *funPtr, void *userData);\r
-               ~CFunCallbackStream();\r
-               \r
-               void open(const StreamParameters &parameters, PaStreamCallback *funPtr, void *userData);\r
-\r
-       private:\r
-               CFunCallbackStream(const CFunCallbackStream &); // non-copyable\r
-               CFunCallbackStream &operator=(const CFunCallbackStream &); // non-copyable\r
-       };\r
-\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 &parameters, PaStreamCallback *funPtr, void *userData);\r
+        ~CFunCallbackStream();\r
+\r
+        void open(const StreamParameters &parameters, 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
index d498ec5b780306c655d6c4d5f077edad995a568e..c9236cdd91b9aa46a1ed74881b70f09e94a097a0 100644 (file)
@@ -9,34 +9,34 @@
 \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
+\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
index 0382275e3ac2e3b7add3aa7a314b48d614163d6d..8ee6d4c4c06b38c3efb2974490d45e42963b720b 100644 (file)
@@ -14,23 +14,23 @@ namespace portaudio
 {\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
+    /// @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
index e0c001274dd3f7fb55a80f60ed5b56aad66d5f8e..08d1aabe16eebff2bb7fedb307ce95cb95d42a55 100644 (file)
@@ -12,7 +12,7 @@
 // Forward declaration(s):\r
 namespace portaudio\r
 {\r
-       class StreamParameters;\r
+    class StreamParameters;\r
 }\r
 \r
 // ---------------------------------------------------------------------------------------\r
@@ -22,61 +22,61 @@ namespace portaudio
 {\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 &parameters, CallbackFunPtr funPtr, void *userData);\r
-               ~FunCallbackStream();\r
-\r
-               void open(const StreamParameters &parameters, 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 &parameters);\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 &parameters, CallbackFunPtr funPtr, void *userData);\r
+        ~FunCallbackStream();\r
+\r
+        void open(const StreamParameters &parameters, 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 &parameters);\r
+    };\r
 \r
 \r
 } // portaudio\r
index ffde7aa8e33f54b6b2d2a950c65b00a0f92ce5be..db5018fa3e248b048defc767cb9893338e9515d5 100644 (file)
@@ -14,8 +14,8 @@
 // Forward declaration(s):\r
 namespace portaudio\r
 {\r
-       class System;\r
-       class HostApi;\r
+    class System;\r
+    class HostApi;\r
 }\r
 \r
 // ---------------------------------------------------------------------------------------\r
@@ -24,64 +24,64 @@ namespace portaudio
 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);\r
-               bool operator!=(const Device &rhs);\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
+    /// @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);\r
+        bool operator!=(const Device &rhs);\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
index dd5ae0b90859eaf92982dcf72dc1f1f57f43f1e1..5001149b4a401c53b2f6d5ef8d9bcf962b360869 100644 (file)
@@ -15,7 +15,7 @@
 // Forward declaration(s):\r
 namespace portaudio\r
 {\r
-       class Device;\r
+    class Device;\r
 }\r
 \r
 // ---------------------------------------------------------------------------------------\r
@@ -24,50 +24,50 @@ namespace portaudio
 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
+    /// @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
+        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
+        // 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
+        void setSampleFormat(SampleDataFormat format, bool interleaved = true);\r
+        void setHostApiSpecificSampleFormat(PaSampleFormat format, bool interleaved = true);\r
 \r
-               void setSuggestedLatency(PaTime latency);\r
+        void setSuggestedLatency(PaTime latency);\r
 \r
-               void setHostApiSpecificStreamInfo(void *streamInfo);\r
+        void setHostApiSpecificStreamInfo(void *streamInfo);\r
 \r
-               // Accessor methods:\r
-               PaStreamParameters *paStreamParameters();\r
-               const PaStreamParameters *paStreamParameters() const;\r
+        // Accessor methods:\r
+        PaStreamParameters *paStreamParameters();\r
+        const PaStreamParameters *paStreamParameters() const;\r
 \r
-               Device &device() const;\r
-               int numChannels() const;\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
+        SampleDataFormat sampleFormat() const;\r
+        bool isSampleFormatInterleaved() const;\r
+        bool isSampleFormatHostApiSpecific() const;\r
+        PaSampleFormat hostApiSpecificSampleFormat() const;\r
 \r
-               PaTime suggestedLatency() const;\r
+        PaTime suggestedLatency() const;\r
 \r
-               void *hostApiSpecificStreamInfo() const;\r
-       \r
-       private:\r
-               PaStreamParameters paStreamParameters_;\r
-       };\r
+        void *hostApiSpecificStreamInfo() const;\r
+\r
+    private:\r
+        PaStreamParameters paStreamParameters_;\r
+    };\r
 \r
 \r
 } // namespace portaudio\r
index a70c2f1d6e725edf3b4e659b8a6f2e73ab91f020..96e4ad2f98492f11c47ed395e944d34ef604f891 100644 (file)
 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
+    /// @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
index 899fc42d768198c5d2dd140d38e57b4fa036f911..a51cfe07b16c9af176820c8ea04100b8a101b863 100644 (file)
@@ -12,7 +12,7 @@
 // Forward declaration(s):\r
 namespace portaudio\r
 {\r
-       class Device;\r
+    class Device;\r
 }\r
 \r
 // ---------------------------------------------------------------------------------------\r
@@ -22,50 +22,50 @@ namespace portaudio
 {\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
+    /// @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
index e496dd272a0d7e5c5c89f54597026aebf5bb452a..5e03035bd17a7d438301c31f0a17c37acfe5a6ac 100644 (file)
@@ -12,8 +12,8 @@
 // Forward declaration(s)\r
 namespace portaudio\r
 {\r
-       class StreamParameters;\r
-       class CallbackInterface;\r
+    class StreamParameters;\r
+    class CallbackInterface;\r
 }\r
 \r
 // ---------------------------------------------------------------------------------------\r
@@ -23,23 +23,23 @@ namespace portaudio
 {\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 &parameters, CallbackInterface &instance);\r
-               ~InterfaceCallbackStream();\r
-               \r
-               void open(const StreamParameters &parameters, CallbackInterface &instance);\r
-\r
-       private:\r
-               InterfaceCallbackStream(const InterfaceCallbackStream &); // non-copyable\r
-               InterfaceCallbackStream &operator=(const InterfaceCallbackStream &); // non-copyable\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 &parameters, CallbackInterface &instance);\r
+        ~InterfaceCallbackStream();\r
+\r
+        void open(const StreamParameters &parameters, CallbackInterface &instance);\r
+\r
+    private:\r
+        InterfaceCallbackStream(const InterfaceCallbackStream &); // non-copyable\r
+        InterfaceCallbackStream &operator=(const InterfaceCallbackStream &); // non-copyable\r
+    };\r
 \r
 \r
 } // portaudio\r
index a9e50ca6377ea8c94751857900e6955c8ce9709c..a04c5be3eb38696281a22c64fea6f685abbaf755 100644 (file)
@@ -17,87 +17,87 @@ namespace portaudio
 {\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 &parameters, 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 &parameters, 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 &parameters)\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
+    /// @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 &parameters, 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 &parameters, 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 &parameters)\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
index f11e7fb9f4e4ff601950806567c1b18d2668234f..9b9dfe36b52790866d49fc4d374316dcbc441930 100644 (file)
@@ -6,23 +6,23 @@
 //////\r
 /// @mainpage PortAudioCpp\r
 ///\r
-///    <h1>PortAudioCpp - A Native C++ Binding of PortAudio V19</h1>\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
+///   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
+///   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
 ///   <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
+///     <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
+///   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
 ///   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
+///   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
+///   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
@@ -69,8 +69,8 @@
 //////\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
+/// 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
index a7e25b24136789a8f62983dcedbfcfb2fa5889f3..5224768ba1970e262cb7bf0a5d819446b5934432 100644 (file)
@@ -11,21 +11,21 @@ namespace portaudio
 {\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
+    /// @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
index 8a255ec7684e684b305cc63a47863a2c4ac6e1a1..80c363d0d0b62da1c157b6ca21f046b0f3238079 100644 (file)
@@ -8,7 +8,7 @@
 // Forward declaration(s):\r
 namespace portaudio\r
 {\r
-       class StreamParameters;\r
+    class StreamParameters;\r
 }\r
 \r
 // ---------------------------------------------------------------------------------------\r
@@ -18,61 +18,61 @@ namespace portaudio
 {\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
+    /// @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
index 2b6aa2ef4c39e2a1d6e8509f68a5a28a7dcf80c4..d9b90e9ec3b04810481cbacbca488c792dc5c265 100644 (file)
 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 &parameters);\r
-               void setOutputParameters(const DirectionSpecificStreamParameters &parameters);\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
+    /// @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 &parameters);\r
+        void setOutputParameters(const DirectionSpecificStreamParameters &parameters);\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
index f5fb7132afd4da74f580affd2f188bef2f283b52..014cc20bf69127772c14282a38bfc24fd77eaad7 100644 (file)
@@ -10,9 +10,9 @@
 // Forward declaration(s):\r
 namespace portaudio\r
 {\r
-       class Device;\r
-       class Stream;\r
-       class HostApi;\r
+    class Device;\r
+    class Stream;\r
+    class HostApi;\r
 }\r
 \r
 // ---------------------------------------------------------------------------------------\r
@@ -22,82 +22,82 @@ namespace portaudio
 {\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
+    /// @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
 \r
-               static int version();\r
-               static const char *versionText();\r
+        static int version();\r
+        static const char *versionText();\r
 \r
-               static void initialize();\r
-               static void terminate();\r
+        static void initialize();\r
+        static void terminate();\r
 \r
-               static System &instance();\r
-               static bool exists();\r
+        static System &instance();\r
+        static bool exists();\r
 \r
-               // -------------------------------------------------------------------------------\r
+        // -------------------------------------------------------------------------------\r
 \r
-               // host apis:\r
-               HostApiIterator hostApisBegin();\r
-               HostApiIterator hostApisEnd();\r
+        // host apis:\r
+        HostApiIterator hostApisBegin();\r
+        HostApiIterator hostApisEnd();\r
 \r
-               HostApi &defaultHostApi();\r
+        HostApi &defaultHostApi();\r
 \r
-               HostApi &hostApiByTypeId(PaHostApiTypeId type);\r
-               HostApi &hostApiByIndex(PaHostApiIndex index);\r
+        HostApi &hostApiByTypeId(PaHostApiTypeId type);\r
+        HostApi &hostApiByIndex(PaHostApiIndex index);\r
 \r
-               int hostApiCount();\r
+        int hostApiCount();\r
 \r
-               // -------------------------------------------------------------------------------\r
+        // -------------------------------------------------------------------------------\r
 \r
-               // devices:\r
-               DeviceIterator devicesBegin();\r
-               DeviceIterator devicesEnd();\r
+        // devices:\r
+        DeviceIterator devicesBegin();\r
+        DeviceIterator devicesEnd();\r
 \r
-               Device &defaultInputDevice();\r
-               Device &defaultOutputDevice();\r
+        Device &defaultInputDevice();\r
+        Device &defaultOutputDevice();\r
 \r
-               Device &deviceByIndex(PaDeviceIndex index);\r
+        Device &deviceByIndex(PaDeviceIndex index);\r
 \r
-               int deviceCount();\r
+        int deviceCount();\r
 \r
-               static Device &nullDevice();\r
+        static Device &nullDevice();\r
 \r
-               // -------------------------------------------------------------------------------\r
+        // -------------------------------------------------------------------------------\r
 \r
-               // misc:\r
-               void sleep(long msec);\r
-               int sizeOfSample(PaSampleFormat format);\r
+        // misc:\r
+        void sleep(long msec);\r
+        int sizeOfSample(PaSampleFormat format);\r
 \r
-       private:\r
-               System();\r
-               ~System();\r
+    private:\r
+        System();\r
+        ~System();\r
 \r
-               static System *instance_;\r
-               static int initCount_;\r
+        static System *instance_;\r
+        static int initCount_;\r
 \r
-               static HostApi **hostApis_;\r
-               static Device **devices_;\r
+        static HostApi **hostApis_;\r
+        static Device **devices_;\r
 \r
-               static Device *nullDevice_;\r
-       };\r
+        static Device *nullDevice_;\r
+    };\r
 \r
 \r
 } // namespace portaudio\r
index 613fc3db51a025b48b3e71c25d05741d65efaa05..8dc8ed67f04d6c0f0d9d7a0f239a620067d0d1d9 100644 (file)
@@ -13,8 +13,8 @@
 // Forward declaration(s):\r
 namespace portaudio\r
 {\r
-       class Device;\r
-       class HostApi;\r
+    class Device;\r
+    class HostApi;\r
 }\r
 \r
 // ---------------------------------------------------------------------------------------\r
@@ -23,39 +23,39 @@ namespace portaudio
 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);\r
-               bool operator!=(const DeviceIterator &rhs);\r
-\r
-       private:\r
-               friend class System;\r
-               friend class HostApi;\r
-               Device **ptr_;\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);\r
+        bool operator!=(const DeviceIterator &rhs);\r
+\r
+    private:\r
+        friend class System;\r
+        friend class HostApi;\r
+        Device **ptr_;\r
+    };\r
 \r
 \r
 } // namespace portaudio\r
index b9b13b85eb73571d515839fad201e4d1ab0d4a47..82988776ccbe43e3f49e39135756565435d0ebee 100644 (file)
@@ -13,7 +13,7 @@
 // Forward declaration(s):\r
 namespace portaudio\r
 {\r
-       class HostApi;\r
+    class HostApi;\r
 }\r
 \r
 // ---------------------------------------------------------------------------------------\r
@@ -23,35 +23,35 @@ namespace portaudio
 {\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);\r
-               bool operator!=(const HostApiIterator &rhs);\r
-\r
-       private:\r
-               friend class System;\r
-               HostApi **ptr_;\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);\r
+        bool operator!=(const HostApiIterator &rhs);\r
+\r
+    private:\r
+        friend class System;\r
+        HostApi **ptr_;\r
+    };\r
 \r
 \r
 } // namespace portaudio\r
diff --git a/fdmdv2/extern/lib/libportaudio.a b/fdmdv2/extern/lib/libportaudio.a
new file mode 100644 (file)
index 0000000..e5b3b04
Binary files /dev/null and b/fdmdv2/extern/lib/libportaudio.a differ
diff --git a/fdmdv2/extern/lib/libportaudio.la b/fdmdv2/extern/lib/libportaudio.la
new file mode 100644 (file)
index 0000000..934a213
--- /dev/null
@@ -0,0 +1,41 @@
+# libportaudio.la - a libtool library file
+# Generated by libtool (GNU libtool) 2.4 Debian-2.4-2ubuntu1
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# The name that we can dlopen(3).
+dlname=''
+
+# Names of this library.
+library_names=''
+
+# The name of the static archive.
+old_library='libportaudio.a'
+
+# Linker flags that can not go in dependency_libs.
+inherited_linker_flags=''
+
+# Libraries that this one depends upon.
+dependency_libs=' -lwinmm -lole32 -luuid'
+
+# Names of additional weak libraries provided by this library
+weak_library_names=''
+
+# Version information for libportaudio.
+current=2
+age=0
+revision=0
+
+# Is this an already installed library?
+installed=yes
+
+# Should we warn about portability when linking against -modules?
+shouldnotlink=no
+
+# Files to dlopen/dlpreopen
+dlopen=''
+dlpreopen=''
+
+# Directory that this library needs to be installed in:
+libdir='/usr/local/lib'
index 9fd40a681189e55181acc45f1493d3374cd2f5fc..1a2d09e2fa45faee288065d6a79ea997f3624597 100644 (file)
@@ -26,7 +26,9 @@ MainFrameBase::MainFrameBase( wxWindow* parent, wxWindowID id, const wxString& t
        wxBoxSizer* mainSizer;\r
        mainSizer = new wxBoxSizer( wxVERTICAL );\r
        \r
-       m_panel1 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );\r
+       m_audioInfo = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );\r
+       m_audioInfo->SetMinSize( wxSize( 65,65 ) );\r
+       \r
        wxFlexGridSizer* fgSizer1;\r
        fgSizer1 = new wxFlexGridSizer( 4, 4, 1, 1 );\r
        fgSizer1->AddGrowableCol( 3 );\r
@@ -37,41 +39,61 @@ MainFrameBase::MainFrameBase( wxWindow* parent, wxWindowID id, const wxString& t
        \r
        fgSizer1->Add( 0, 0, 1, wxEXPAND, 5 );\r
        \r
-       m_staticText1 = new wxStaticText( m_panel1, wxID_ANY, _("Input, Output:"), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT );\r
+       m_staticText1 = new wxStaticText( m_audioInfo, wxID_ANY, _("Input, Output:"), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT );\r
        m_staticText1->Wrap( -1 );\r
        fgSizer1->Add( m_staticText1, 1, wxALL|wxEXPAND, 5 );\r
        \r
-       m_comboBox1 = new wxComboBox( m_panel1, wxID_ANY, _("Combo!"), wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); \r
-       fgSizer1->Add( m_comboBox1, 1, wxALL|wxEXPAND, 5 );\r
+       wxBoxSizer* bSizer2;\r
+       bSizer2 = new wxBoxSizer( wxVERTICAL );\r
+       \r
+       bSizer2->SetMinSize( wxSize( 65,65 ) ); \r
+       m_comboBoxLeft = new wxComboBox( m_audioInfo, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, wxCB_SIMPLE ); \r
+       m_comboBoxLeft->SetToolTip( _("Input Audio Interface") );\r
+       m_comboBoxLeft->SetMinSize( wxSize( 65,65 ) );\r
+       \r
+       bSizer2->Add( m_comboBoxLeft, 1, wxALL|wxEXPAND, 5 );\r
+       \r
+       \r
+       fgSizer1->Add( bSizer2, 1, wxEXPAND|wxFIXED_MINSIZE, 5 );\r
+       \r
+       wxBoxSizer* bSizer3;\r
+       bSizer3 = new wxBoxSizer( wxVERTICAL );\r
+       \r
+       bSizer3->SetMinSize( wxSize( 65,65 ) ); \r
+       m_comboBoxRight = new wxComboBox( m_audioInfo, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, wxCB_SIMPLE ); \r
+       m_comboBoxRight->SetToolTip( _("Output Audio Interface") );\r
+       m_comboBoxRight->SetMinSize( wxSize( 65,65 ) );\r
+       \r
+       bSizer3->Add( m_comboBoxRight, 1, wxALL|wxEXPAND, 5 );\r
+       \r
        \r
-       m_comboBox2 = new wxComboBox( m_panel1, wxID_ANY, _("Combo!"), wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); \r
-       fgSizer1->Add( m_comboBox2, 1, wxALL|wxEXPAND, 5 );\r
+       fgSizer1->Add( bSizer3, 1, wxEXPAND, 5 );\r
        \r
        \r
        fgSizer1->Add( 0, 0, 1, wxEXPAND, 5 );\r
        \r
-       m_staticText2 = new wxStaticText( m_panel1, wxID_ANY, _("Behavor:"), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT );\r
+       m_staticText2 = new wxStaticText( m_audioInfo, wxID_ANY, _("Behavor:"), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT );\r
        m_staticText2->Wrap( -1 );\r
-       fgSizer1->Add( m_staticText2, 1, wxALL|wxEXPAND, 5 );\r
+       fgSizer1->Add( m_staticText2, 1, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL|wxEXPAND, 5 );\r
        \r
-       m_gauge1 = new wxGauge( m_panel1, wxID_ANY, 100, wxDefaultPosition, wxDefaultSize, wxGA_HORIZONTAL|wxGA_SMOOTH );\r
+       m_gauge1 = new wxGauge( m_audioInfo, wxID_ANY, 100, wxDefaultPosition, wxDefaultSize, wxGA_HORIZONTAL|wxGA_SMOOTH );\r
        fgSizer1->Add( m_gauge1, 1, wxALL|wxEXPAND, 5 );\r
        \r
-       m_slider1 = new wxSlider( m_panel1, wxID_ANY, 50, 0, 100, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL );\r
+       m_slider1 = new wxSlider( m_audioInfo, wxID_ANY, 50, 0, 100, wxDefaultPosition, wxDefaultSize, wxSL_AUTOTICKS|wxSL_HORIZONTAL|wxSL_SELRANGE|wxSL_TOP );\r
        fgSizer1->Add( m_slider1, 1, wxALL|wxEXPAND, 5 );\r
        \r
        \r
        fgSizer1->Add( 0, 0, 1, wxEXPAND, 5 );\r
        \r
-       m_staticText5 = new wxStaticText( m_panel1, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );\r
+       m_staticText5 = new wxStaticText( m_audioInfo, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );\r
        m_staticText5->Wrap( -1 );\r
        fgSizer1->Add( m_staticText5, 1, wxALL|wxEXPAND, 5 );\r
        \r
-       m_toggleBtn2 = new wxToggleButton( m_panel1, wxID_ANY, _("On / Off"), wxDefaultPosition, wxDefaultSize, 0 );\r
+       m_toggleBtn2 = new wxToggleButton( m_audioInfo, wxID_ANY, _("On / Off"), wxDefaultPosition, wxDefaultSize, 0 );\r
        m_toggleBtn2->SetValue( true ); \r
        fgSizer1->Add( m_toggleBtn2, 1, wxALL|wxEXPAND, 5 );\r
        \r
-       m_toggleBtn3 = new wxToggleButton( m_panel1, wxID_ANY, _("On / Off"), wxDefaultPosition, wxDefaultSize, 0 );\r
+       m_toggleBtn3 = new wxToggleButton( m_audioInfo, wxID_ANY, _("On / Off"), wxDefaultPosition, wxDefaultSize, 0 );\r
        m_toggleBtn3->SetValue( true ); \r
        fgSizer1->Add( m_toggleBtn3, 0, wxALL|wxEXPAND, 5 );\r
        \r
@@ -84,15 +106,15 @@ MainFrameBase::MainFrameBase( wxWindow* parent, wxWindowID id, const wxString& t
        \r
        fgSizer1->Add( 0, 0, 1, 0, 5 );\r
        \r
-       m_button1 = new wxButton( m_panel1, wxID_ANY, _("Exit"), wxDefaultPosition, wxDefaultSize, 0 );\r
+       m_button1 = new wxButton( m_audioInfo, wxID_ANY, _("Exit"), wxDefaultPosition, wxDefaultSize, 0 );\r
        m_button1->SetDefault(); \r
        fgSizer1->Add( m_button1, 0, wxALIGN_BOTTOM|wxALIGN_RIGHT|wxALL, 5 );\r
        \r
        \r
-       m_panel1->SetSizer( fgSizer1 );\r
-       m_panel1->Layout();\r
-       fgSizer1->Fit( m_panel1 );\r
-       mainSizer->Add( m_panel1, 1, wxALL|wxEXPAND, 0 );\r
+       m_audioInfo->SetSizer( fgSizer1 );\r
+       m_audioInfo->Layout();\r
+       fgSizer1->Fit( m_audioInfo );\r
+       mainSizer->Add( m_audioInfo, 1, wxALL|wxEXPAND|wxFIXED_MINSIZE, 0 );\r
        \r
        \r
        this->SetSizer( mainSizer );\r
@@ -104,8 +126,8 @@ MainFrameBase::MainFrameBase( wxWindow* parent, wxWindowID id, const wxString& t
        // Connect Events\r
        this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( MainFrameBase::OnCloseFrame ) );\r
        this->Connect( menuFileExit->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameBase::OnExitClick ) );\r
-       m_comboBox1->Connect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( MainFrameBase::OnComboLeft ), NULL, this );\r
-       m_comboBox2->Connect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( MainFrameBase::OnComboRight ), NULL, this );\r
+       m_comboBoxLeft->Connect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( MainFrameBase::OnComboLeft ), NULL, this );\r
+       m_comboBoxRight->Connect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( MainFrameBase::OnComboRight ), NULL, this );\r
        m_slider1->Connect( wxEVT_SCROLL_TOP, wxScrollEventHandler( MainFrameBase::OnScroll ), NULL, this );\r
        m_slider1->Connect( wxEVT_SCROLL_BOTTOM, wxScrollEventHandler( MainFrameBase::OnScroll ), NULL, this );\r
        m_slider1->Connect( wxEVT_SCROLL_LINEUP, wxScrollEventHandler( MainFrameBase::OnScroll ), NULL, this );\r
@@ -125,8 +147,8 @@ MainFrameBase::~MainFrameBase()
        // Disconnect Events\r
        this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( MainFrameBase::OnCloseFrame ) );\r
        this->Disconnect( wxID_EXIT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameBase::OnExitClick ) );\r
-       m_comboBox1->Disconnect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( MainFrameBase::OnComboLeft ), NULL, this );\r
-       m_comboBox2->Disconnect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( MainFrameBase::OnComboRight ), NULL, this );\r
+       m_comboBoxLeft->Disconnect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( MainFrameBase::OnComboLeft ), NULL, this );\r
+       m_comboBoxRight->Disconnect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( MainFrameBase::OnComboRight ), NULL, this );\r
        m_slider1->Disconnect( wxEVT_SCROLL_TOP, wxScrollEventHandler( MainFrameBase::OnScroll ), NULL, this );\r
        m_slider1->Disconnect( wxEVT_SCROLL_BOTTOM, wxScrollEventHandler( MainFrameBase::OnScroll ), NULL, this );\r
        m_slider1->Disconnect( wxEVT_SCROLL_LINEUP, wxScrollEventHandler( MainFrameBase::OnScroll ), NULL, this );\r
index e63361aac0cf59ac1a61bfae18f15e08cf8f9e59..3b3b63e85b4960dbc890814a5173312723b180e6 100644 (file)
@@ -3,7 +3,7 @@
     <FileVersion major="1" minor="11" />\r
     <object class="Project" expanded="1">\r
         <property name="class_decoration"></property>\r
-        <property name="code_generation">C++</property>\r
+        <property name="code_generation">C++|Python|XRC</property>\r
         <property name="disconnect_events">1</property>\r
         <property name="disconnect_mode">source_name</property>\r
         <property name="disconnect_php_events">0</property>\r
             <event name="OnSetFocus"></event>\r
             <event name="OnSize"></event>\r
             <event name="OnUpdateUI"></event>\r
-            <object class="wxMenuBar" expanded="1">\r
+            <object class="wxMenuBar" expanded="0">\r
                 <property name="BottomDockable">1</property>\r
                 <property name="LeftDockable">1</property>\r
                 <property name="RightDockable">1</property>\r
                 <event name="OnSetFocus"></event>\r
                 <event name="OnSize"></event>\r
                 <event name="OnUpdateUI"></event>\r
-                <object class="wxMenu" expanded="1">\r
+                <object class="wxMenu" expanded="0">\r
                     <property name="label">&amp;File</property>\r
                     <property name="name">m_menuFile</property>\r
                     <property name="permission">protected</property>\r
                 <property name="permission">none</property>\r
                 <object class="sizeritem" expanded="1">\r
                     <property name="border">0</property>\r
-                    <property name="flag">wxALL|wxEXPAND</property>\r
+                    <property name="flag">wxALL|wxEXPAND|wxFIXED_MINSIZE</property>\r
                     <property name="proportion">1</property>\r
                     <object class="wxPanel" expanded="1">\r
                         <property name="BottomDockable">1</property>\r
                         <property name="maximum_size"></property>\r
                         <property name="min_size"></property>\r
                         <property name="minimize_button">0</property>\r
-                        <property name="minimum_size"></property>\r
+                        <property name="minimum_size">65,65</property>\r
                         <property name="moveable">1</property>\r
-                        <property name="name">m_panel1</property>\r
+                        <property name="name">m_audioInfo</property>\r
                         <property name="pane_border">1</property>\r
                         <property name="pane_position"></property>\r
                         <property name="pane_size"></property>\r
                         <property name="resize">Resizable</property>\r
                         <property name="show">1</property>\r
                         <property name="size"></property>\r
-                        <property name="subclass"></property>\r
+                        <property name="subclass"> ;  </property>\r
                         <property name="toolbar_pane">0</property>\r
                         <property name="tooltip"></property>\r
                         <property name="validator_data_type"></property>\r
                             <property name="permission">none</property>\r
                             <property name="rows">4</property>\r
                             <property name="vgap">1</property>\r
-                            <object class="sizeritem" expanded="1">\r
+                            <object class="sizeritem" expanded="0">\r
                                 <property name="border">5</property>\r
                                 <property name="flag">wxEXPAND</property>\r
                                 <property name="proportion">1</property>\r
-                                <object class="spacer" expanded="1">\r
+                                <object class="spacer" expanded="0">\r
                                     <property name="height">0</property>\r
                                     <property name="permission">protected</property>\r
                                     <property name="width">0</property>\r
                                 </object>\r
                             </object>\r
-                            <object class="sizeritem" expanded="1">\r
+                            <object class="sizeritem" expanded="0">\r
                                 <property name="border">5</property>\r
                                 <property name="flag">wxALL|wxEXPAND</property>\r
                                 <property name="proportion">1</property>\r
-                                <object class="wxStaticText" expanded="1">\r
+                                <object class="wxStaticText" expanded="0">\r
                                     <property name="BottomDockable">1</property>\r
                                     <property name="LeftDockable">1</property>\r
                                     <property name="RightDockable">1</property>\r
                             </object>\r
                             <object class="sizeritem" expanded="1">\r
                                 <property name="border">5</property>\r
-                                <property name="flag">wxALL|wxEXPAND</property>\r
+                                <property name="flag">wxEXPAND|wxFIXED_MINSIZE</property>\r
                                 <property name="proportion">1</property>\r
-                                <object class="wxComboBox" expanded="1">\r
-                                    <property name="BottomDockable">1</property>\r
-                                    <property name="LeftDockable">1</property>\r
-                                    <property name="RightDockable">1</property>\r
-                                    <property name="TopDockable">1</property>\r
-                                    <property name="aui_layer"></property>\r
-                                    <property name="aui_name"></property>\r
-                                    <property name="aui_position"></property>\r
-                                    <property name="aui_row"></property>\r
-                                    <property name="best_size"></property>\r
-                                    <property name="bg"></property>\r
-                                    <property name="caption"></property>\r
-                                    <property name="caption_visible">1</property>\r
-                                    <property name="center_pane">0</property>\r
-                                    <property name="choices"></property>\r
-                                    <property name="close_button">1</property>\r
-                                    <property name="context_help"></property>\r
-                                    <property name="context_menu">1</property>\r
-                                    <property name="default_pane">0</property>\r
-                                    <property name="dock">Dock</property>\r
-                                    <property name="dock_fixed">0</property>\r
-                                    <property name="docking">Left</property>\r
-                                    <property name="enabled">1</property>\r
-                                    <property name="fg"></property>\r
-                                    <property name="floatable">1</property>\r
-                                    <property name="font"></property>\r
-                                    <property name="gripper">0</property>\r
-                                    <property name="hidden">0</property>\r
-                                    <property name="id">wxID_ANY</property>\r
-                                    <property name="max_size"></property>\r
-                                    <property name="maximize_button">0</property>\r
-                                    <property name="maximum_size"></property>\r
-                                    <property name="min_size"></property>\r
-                                    <property name="minimize_button">0</property>\r
-                                    <property name="minimum_size"></property>\r
-                                    <property name="moveable">1</property>\r
-                                    <property name="name">m_comboBox1</property>\r
-                                    <property name="pane_border">1</property>\r
-                                    <property name="pane_position"></property>\r
-                                    <property name="pane_size"></property>\r
-                                    <property name="permission">protected</property>\r
-                                    <property name="pin_button">1</property>\r
-                                    <property name="pos"></property>\r
-                                    <property name="resize">Resizable</property>\r
-                                    <property name="selection">-1</property>\r
-                                    <property name="show">1</property>\r
-                                    <property name="size"></property>\r
-                                    <property name="style"></property>\r
-                                    <property name="subclass"></property>\r
-                                    <property name="toolbar_pane">0</property>\r
-                                    <property name="tooltip"></property>\r
-                                    <property name="validator_data_type"></property>\r
-                                    <property name="validator_style">wxFILTER_NONE</property>\r
-                                    <property name="validator_type">wxDefaultValidator</property>\r
-                                    <property name="validator_variable"></property>\r
-                                    <property name="value">Combo!</property>\r
-                                    <property name="window_extra_style"></property>\r
-                                    <property name="window_name"></property>\r
-                                    <property name="window_style"></property>\r
-                                    <event name="OnChar"></event>\r
-                                    <event name="OnCombobox">OnComboLeft</event>\r
-                                    <event name="OnEnterWindow"></event>\r
-                                    <event name="OnEraseBackground"></event>\r
-                                    <event name="OnKeyDown"></event>\r
-                                    <event name="OnKeyUp"></event>\r
-                                    <event name="OnKillFocus"></event>\r
-                                    <event name="OnLeaveWindow"></event>\r
-                                    <event name="OnLeftDClick"></event>\r
-                                    <event name="OnLeftDown"></event>\r
-                                    <event name="OnLeftUp"></event>\r
-                                    <event name="OnMiddleDClick"></event>\r
-                                    <event name="OnMiddleDown"></event>\r
-                                    <event name="OnMiddleUp"></event>\r
-                                    <event name="OnMotion"></event>\r
-                                    <event name="OnMouseEvents"></event>\r
-                                    <event name="OnMouseWheel"></event>\r
-                                    <event name="OnPaint"></event>\r
-                                    <event name="OnRightDClick"></event>\r
-                                    <event name="OnRightDown"></event>\r
-                                    <event name="OnRightUp"></event>\r
-                                    <event name="OnSetFocus"></event>\r
-                                    <event name="OnSize"></event>\r
-                                    <event name="OnText"></event>\r
-                                    <event name="OnTextEnter"></event>\r
-                                    <event name="OnUpdateUI"></event>\r
+                                <object class="wxBoxSizer" expanded="1">\r
+                                    <property name="minimum_size">65,65</property>\r
+                                    <property name="name">bSizer2</property>\r
+                                    <property name="orient">wxVERTICAL</property>\r
+                                    <property name="permission">none</property>\r
+                                    <object class="sizeritem" expanded="0">\r
+                                        <property name="border">5</property>\r
+                                        <property name="flag">wxALL|wxEXPAND</property>\r
+                                        <property name="proportion">1</property>\r
+                                        <object class="wxComboBox" expanded="0">\r
+                                            <property name="BottomDockable">1</property>\r
+                                            <property name="LeftDockable">1</property>\r
+                                            <property name="RightDockable">1</property>\r
+                                            <property name="TopDockable">1</property>\r
+                                            <property name="aui_layer"></property>\r
+                                            <property name="aui_name"></property>\r
+                                            <property name="aui_position"></property>\r
+                                            <property name="aui_row"></property>\r
+                                            <property name="best_size"></property>\r
+                                            <property name="bg"></property>\r
+                                            <property name="caption"></property>\r
+                                            <property name="caption_visible">1</property>\r
+                                            <property name="center_pane">0</property>\r
+                                            <property name="choices"></property>\r
+                                            <property name="close_button">1</property>\r
+                                            <property name="context_help"></property>\r
+                                            <property name="context_menu">1</property>\r
+                                            <property name="default_pane">0</property>\r
+                                            <property name="dock">Dock</property>\r
+                                            <property name="dock_fixed">0</property>\r
+                                            <property name="docking">Left</property>\r
+                                            <property name="enabled">1</property>\r
+                                            <property name="fg"></property>\r
+                                            <property name="floatable">1</property>\r
+                                            <property name="font"></property>\r
+                                            <property name="gripper">0</property>\r
+                                            <property name="hidden">0</property>\r
+                                            <property name="id">wxID_ANY</property>\r
+                                            <property name="max_size"></property>\r
+                                            <property name="maximize_button">0</property>\r
+                                            <property name="maximum_size"></property>\r
+                                            <property name="min_size"></property>\r
+                                            <property name="minimize_button">0</property>\r
+                                            <property name="minimum_size">65,65</property>\r
+                                            <property name="moveable">1</property>\r
+                                            <property name="name">m_comboBoxLeft</property>\r
+                                            <property name="pane_border">1</property>\r
+                                            <property name="pane_position"></property>\r
+                                            <property name="pane_size"></property>\r
+                                            <property name="permission">protected</property>\r
+                                            <property name="pin_button">1</property>\r
+                                            <property name="pos"></property>\r
+                                            <property name="resize">Resizable</property>\r
+                                            <property name="selection">-1</property>\r
+                                            <property name="show">1</property>\r
+                                            <property name="size"></property>\r
+                                            <property name="style">wxCB_SIMPLE</property>\r
+                                            <property name="subclass"></property>\r
+                                            <property name="toolbar_pane">0</property>\r
+                                            <property name="tooltip">Input Audio Interface</property>\r
+                                            <property name="validator_data_type"></property>\r
+                                            <property name="validator_style">wxFILTER_NONE</property>\r
+                                            <property name="validator_type">wxDefaultValidator</property>\r
+                                            <property name="validator_variable"></property>\r
+                                            <property name="value"></property>\r
+                                            <property name="window_extra_style"></property>\r
+                                            <property name="window_name"></property>\r
+                                            <property name="window_style"></property>\r
+                                            <event name="OnChar"></event>\r
+                                            <event name="OnCombobox">OnComboLeft</event>\r
+                                            <event name="OnEnterWindow"></event>\r
+                                            <event name="OnEraseBackground"></event>\r
+                                            <event name="OnKeyDown"></event>\r
+                                            <event name="OnKeyUp"></event>\r
+                                            <event name="OnKillFocus"></event>\r
+                                            <event name="OnLeaveWindow"></event>\r
+                                            <event name="OnLeftDClick"></event>\r
+                                            <event name="OnLeftDown"></event>\r
+                                            <event name="OnLeftUp"></event>\r
+                                            <event name="OnMiddleDClick"></event>\r
+                                            <event name="OnMiddleDown"></event>\r
+                                            <event name="OnMiddleUp"></event>\r
+                                            <event name="OnMotion"></event>\r
+                                            <event name="OnMouseEvents"></event>\r
+                                            <event name="OnMouseWheel"></event>\r
+                                            <event name="OnPaint"></event>\r
+                                            <event name="OnRightDClick"></event>\r
+                                            <event name="OnRightDown"></event>\r
+                                            <event name="OnRightUp"></event>\r
+                                            <event name="OnSetFocus"></event>\r
+                                            <event name="OnSize"></event>\r
+                                            <event name="OnText"></event>\r
+                                            <event name="OnTextEnter"></event>\r
+                                            <event name="OnUpdateUI"></event>\r
+                                        </object>\r
+                                    </object>\r
                                 </object>\r
                             </object>\r
                             <object class="sizeritem" expanded="1">\r
                                 <property name="border">5</property>\r
-                                <property name="flag">wxALL|wxEXPAND</property>\r
+                                <property name="flag">wxEXPAND</property>\r
                                 <property name="proportion">1</property>\r
-                                <object class="wxComboBox" expanded="1">\r
-                                    <property name="BottomDockable">1</property>\r
-                                    <property name="LeftDockable">1</property>\r
-                                    <property name="RightDockable">1</property>\r
-                                    <property name="TopDockable">1</property>\r
-                                    <property name="aui_layer"></property>\r
-                                    <property name="aui_name"></property>\r
-                                    <property name="aui_position"></property>\r
-                                    <property name="aui_row"></property>\r
-                                    <property name="best_size"></property>\r
-                                    <property name="bg"></property>\r
-                                    <property name="caption"></property>\r
-                                    <property name="caption_visible">1</property>\r
-                                    <property name="center_pane">0</property>\r
-                                    <property name="choices"></property>\r
-                                    <property name="close_button">1</property>\r
-                                    <property name="context_help"></property>\r
-                                    <property name="context_menu">1</property>\r
-                                    <property name="default_pane">0</property>\r
-                                    <property name="dock">Dock</property>\r
-                                    <property name="dock_fixed">0</property>\r
-                                    <property name="docking">Left</property>\r
-                                    <property name="enabled">1</property>\r
-                                    <property name="fg"></property>\r
-                                    <property name="floatable">1</property>\r
-                                    <property name="font"></property>\r
-                                    <property name="gripper">0</property>\r
-                                    <property name="hidden">0</property>\r
-                                    <property name="id">wxID_ANY</property>\r
-                                    <property name="max_size"></property>\r
-                                    <property name="maximize_button">0</property>\r
-                                    <property name="maximum_size"></property>\r
-                                    <property name="min_size"></property>\r
-                                    <property name="minimize_button">0</property>\r
-                                    <property name="minimum_size"></property>\r
-                                    <property name="moveable">1</property>\r
-                                    <property name="name">m_comboBox2</property>\r
-                                    <property name="pane_border">1</property>\r
-                                    <property name="pane_position"></property>\r
-                                    <property name="pane_size"></property>\r
-                                    <property name="permission">protected</property>\r
-                                    <property name="pin_button">1</property>\r
-                                    <property name="pos"></property>\r
-                                    <property name="resize">Resizable</property>\r
-                                    <property name="selection">-1</property>\r
-                                    <property name="show">1</property>\r
-                                    <property name="size"></property>\r
-                                    <property name="style"></property>\r
-                                    <property name="subclass"></property>\r
-                                    <property name="toolbar_pane">0</property>\r
-                                    <property name="tooltip"></property>\r
-                                    <property name="validator_data_type"></property>\r
-                                    <property name="validator_style">wxFILTER_NONE</property>\r
-                                    <property name="validator_type">wxDefaultValidator</property>\r
-                                    <property name="validator_variable"></property>\r
-                                    <property name="value">Combo!</property>\r
-                                    <property name="window_extra_style"></property>\r
-                                    <property name="window_name"></property>\r
-                                    <property name="window_style"></property>\r
-                                    <event name="OnChar"></event>\r
-                                    <event name="OnCombobox">OnComboRight</event>\r
-                                    <event name="OnEnterWindow"></event>\r
-                                    <event name="OnEraseBackground"></event>\r
-                                    <event name="OnKeyDown"></event>\r
-                                    <event name="OnKeyUp"></event>\r
-                                    <event name="OnKillFocus"></event>\r
-                                    <event name="OnLeaveWindow"></event>\r
-                                    <event name="OnLeftDClick"></event>\r
-                                    <event name="OnLeftDown"></event>\r
-                                    <event name="OnLeftUp"></event>\r
-                                    <event name="OnMiddleDClick"></event>\r
-                                    <event name="OnMiddleDown"></event>\r
-                                    <event name="OnMiddleUp"></event>\r
-                                    <event name="OnMotion"></event>\r
-                                    <event name="OnMouseEvents"></event>\r
-                                    <event name="OnMouseWheel"></event>\r
-                                    <event name="OnPaint"></event>\r
-                                    <event name="OnRightDClick"></event>\r
-                                    <event name="OnRightDown"></event>\r
-                                    <event name="OnRightUp"></event>\r
-                                    <event name="OnSetFocus"></event>\r
-                                    <event name="OnSize"></event>\r
-                                    <event name="OnText"></event>\r
-                                    <event name="OnTextEnter"></event>\r
-                                    <event name="OnUpdateUI"></event>\r
+                                <object class="wxBoxSizer" expanded="1">\r
+                                    <property name="minimum_size">65,65</property>\r
+                                    <property name="name">bSizer3</property>\r
+                                    <property name="orient">wxVERTICAL</property>\r
+                                    <property name="permission">none</property>\r
+                                    <object class="sizeritem" expanded="0">\r
+                                        <property name="border">5</property>\r
+                                        <property name="flag">wxALL|wxEXPAND</property>\r
+                                        <property name="proportion">1</property>\r
+                                        <object class="wxComboBox" expanded="0">\r
+                                            <property name="BottomDockable">1</property>\r
+                                            <property name="LeftDockable">1</property>\r
+                                            <property name="RightDockable">1</property>\r
+                                            <property name="TopDockable">1</property>\r
+                                            <property name="aui_layer"></property>\r
+                                            <property name="aui_name"></property>\r
+                                            <property name="aui_position"></property>\r
+                                            <property name="aui_row"></property>\r
+                                            <property name="best_size"></property>\r
+                                            <property name="bg"></property>\r
+                                            <property name="caption"></property>\r
+                                            <property name="caption_visible">1</property>\r
+                                            <property name="center_pane">0</property>\r
+                                            <property name="choices"></property>\r
+                                            <property name="close_button">1</property>\r
+                                            <property name="context_help"></property>\r
+                                            <property name="context_menu">1</property>\r
+                                            <property name="default_pane">0</property>\r
+                                            <property name="dock">Dock</property>\r
+                                            <property name="dock_fixed">0</property>\r
+                                            <property name="docking">Left</property>\r
+                                            <property name="enabled">1</property>\r
+                                            <property name="fg"></property>\r
+                                            <property name="floatable">1</property>\r
+                                            <property name="font"></property>\r
+                                            <property name="gripper">0</property>\r
+                                            <property name="hidden">0</property>\r
+                                            <property name="id">wxID_ANY</property>\r
+                                            <property name="max_size"></property>\r
+                                            <property name="maximize_button">0</property>\r
+                                            <property name="maximum_size"></property>\r
+                                            <property name="min_size"></property>\r
+                                            <property name="minimize_button">0</property>\r
+                                            <property name="minimum_size">65,65</property>\r
+                                            <property name="moveable">1</property>\r
+                                            <property name="name">m_comboBoxRight</property>\r
+                                            <property name="pane_border">1</property>\r
+                                            <property name="pane_position"></property>\r
+                                            <property name="pane_size"></property>\r
+                                            <property name="permission">protected</property>\r
+                                            <property name="pin_button">1</property>\r
+                                            <property name="pos"></property>\r
+                                            <property name="resize">Resizable</property>\r
+                                            <property name="selection">-1</property>\r
+                                            <property name="show">1</property>\r
+                                            <property name="size"></property>\r
+                                            <property name="style">wxCB_SIMPLE</property>\r
+                                            <property name="subclass"></property>\r
+                                            <property name="toolbar_pane">0</property>\r
+                                            <property name="tooltip">Output Audio Interface</property>\r
+                                            <property name="validator_data_type"></property>\r
+                                            <property name="validator_style">wxFILTER_NONE</property>\r
+                                            <property name="validator_type">wxDefaultValidator</property>\r
+                                            <property name="validator_variable"></property>\r
+                                            <property name="value"></property>\r
+                                            <property name="window_extra_style"></property>\r
+                                            <property name="window_name"></property>\r
+                                            <property name="window_style"></property>\r
+                                            <event name="OnChar"></event>\r
+                                            <event name="OnCombobox">OnComboRight</event>\r
+                                            <event name="OnEnterWindow"></event>\r
+                                            <event name="OnEraseBackground"></event>\r
+                                            <event name="OnKeyDown"></event>\r
+                                            <event name="OnKeyUp"></event>\r
+                                            <event name="OnKillFocus"></event>\r
+                                            <event name="OnLeaveWindow"></event>\r
+                                            <event name="OnLeftDClick"></event>\r
+                                            <event name="OnLeftDown"></event>\r
+                                            <event name="OnLeftUp"></event>\r
+                                            <event name="OnMiddleDClick"></event>\r
+                                            <event name="OnMiddleDown"></event>\r
+                                            <event name="OnMiddleUp"></event>\r
+                                            <event name="OnMotion"></event>\r
+                                            <event name="OnMouseEvents"></event>\r
+                                            <event name="OnMouseWheel"></event>\r
+                                            <event name="OnPaint"></event>\r
+                                            <event name="OnRightDClick"></event>\r
+                                            <event name="OnRightDown"></event>\r
+                                            <event name="OnRightUp"></event>\r
+                                            <event name="OnSetFocus"></event>\r
+                                            <event name="OnSize"></event>\r
+                                            <event name="OnText"></event>\r
+                                            <event name="OnTextEnter"></event>\r
+                                            <event name="OnUpdateUI"></event>\r
+                                        </object>\r
+                                    </object>\r
                                 </object>\r
                             </object>\r
-                            <object class="sizeritem" expanded="1">\r
+                            <object class="sizeritem" expanded="0">\r
                                 <property name="border">5</property>\r
                                 <property name="flag">wxEXPAND</property>\r
                                 <property name="proportion">1</property>\r
-                                <object class="spacer" expanded="1">\r
+                                <object class="spacer" expanded="0">\r
                                     <property name="height">0</property>\r
                                     <property name="permission">protected</property>\r
                                     <property name="width">0</property>\r
                                 </object>\r
                             </object>\r
-                            <object class="sizeritem" expanded="1">\r
+                            <object class="sizeritem" expanded="0">\r
                                 <property name="border">5</property>\r
-                                <property name="flag">wxALL|wxEXPAND</property>\r
+                                <property name="flag">wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL|wxEXPAND</property>\r
                                 <property name="proportion">1</property>\r
-                                <object class="wxStaticText" expanded="1">\r
+                                <object class="wxStaticText" expanded="0">\r
                                     <property name="BottomDockable">1</property>\r
                                     <property name="LeftDockable">1</property>\r
                                     <property name="RightDockable">1</property>\r
                                     <event name="OnUpdateUI"></event>\r
                                 </object>\r
                             </object>\r
-                            <object class="sizeritem" expanded="1">\r
+                            <object class="sizeritem" expanded="0">\r
                                 <property name="border">5</property>\r
                                 <property name="flag">wxALL|wxEXPAND</property>\r
                                 <property name="proportion">1</property>\r
-                                <object class="wxGauge" expanded="1">\r
+                                <object class="wxGauge" expanded="0">\r
                                     <property name="BottomDockable">1</property>\r
                                     <property name="LeftDockable">1</property>\r
                                     <property name="RightDockable">1</property>\r
                                     <event name="OnUpdateUI"></event>\r
                                 </object>\r
                             </object>\r
-                            <object class="sizeritem" expanded="1">\r
+                            <object class="sizeritem" expanded="0">\r
                                 <property name="border">5</property>\r
                                 <property name="flag">wxALL|wxEXPAND</property>\r
                                 <property name="proportion">1</property>\r
-                                <object class="wxSlider" expanded="1">\r
+                                <object class="wxSlider" expanded="0">\r
                                     <property name="BottomDockable">1</property>\r
                                     <property name="LeftDockable">1</property>\r
                                     <property name="RightDockable">1</property>\r
                                     <property name="resize">Resizable</property>\r
                                     <property name="show">1</property>\r
                                     <property name="size"></property>\r
-                                    <property name="style">wxSL_HORIZONTAL</property>\r
+                                    <property name="style">wxSL_AUTOTICKS|wxSL_HORIZONTAL|wxSL_SELRANGE|wxSL_TOP</property>\r
                                     <property name="subclass"></property>\r
                                     <property name="toolbar_pane">0</property>\r
                                     <property name="tooltip"></property>\r
                                     <event name="OnUpdateUI"></event>\r
                                 </object>\r
                             </object>\r
-                            <object class="sizeritem" expanded="1">\r
+                            <object class="sizeritem" expanded="0">\r
                                 <property name="border">5</property>\r
                                 <property name="flag">wxEXPAND</property>\r
                                 <property name="proportion">1</property>\r
-                                <object class="spacer" expanded="1">\r
+                                <object class="spacer" expanded="0">\r
                                     <property name="height">0</property>\r
                                     <property name="permission">protected</property>\r
                                     <property name="width">0</property>\r
                                 </object>\r
                             </object>\r
-                            <object class="sizeritem" expanded="1">\r
+                            <object class="sizeritem" expanded="0">\r
                                 <property name="border">5</property>\r
                                 <property name="flag">wxALL|wxEXPAND</property>\r
                                 <property name="proportion">1</property>\r
-                                <object class="wxStaticText" expanded="1">\r
+                                <object class="wxStaticText" expanded="0">\r
                                     <property name="BottomDockable">1</property>\r
                                     <property name="LeftDockable">1</property>\r
                                     <property name="RightDockable">1</property>\r
                                     <event name="OnUpdateUI"></event>\r
                                 </object>\r
                             </object>\r
-                            <object class="sizeritem" expanded="1">\r
+                            <object class="sizeritem" expanded="0">\r
                                 <property name="border">5</property>\r
                                 <property name="flag">wxALL|wxEXPAND</property>\r
                                 <property name="proportion">1</property>\r
-                                <object class="wxToggleButton" expanded="1">\r
+                                <object class="wxToggleButton" expanded="0">\r
                                     <property name="BottomDockable">1</property>\r
                                     <property name="LeftDockable">1</property>\r
                                     <property name="RightDockable">1</property>\r
                                     <event name="OnUpdateUI"></event>\r
                                 </object>\r
                             </object>\r
-                            <object class="sizeritem" expanded="1">\r
+                            <object class="sizeritem" expanded="0">\r
                                 <property name="border">5</property>\r
                                 <property name="flag">wxALL|wxEXPAND</property>\r
                                 <property name="proportion">0</property>\r
-                                <object class="wxToggleButton" expanded="1">\r
+                                <object class="wxToggleButton" expanded="0">\r
                                     <property name="BottomDockable">1</property>\r
                                     <property name="LeftDockable">1</property>\r
                                     <property name="RightDockable">1</property>\r
                                     <event name="OnUpdateUI"></event>\r
                                 </object>\r
                             </object>\r
-                            <object class="sizeritem" expanded="1">\r
+                            <object class="sizeritem" expanded="0">\r
                                 <property name="border">5</property>\r
                                 <property name="flag"></property>\r
                                 <property name="proportion">1</property>\r
-                                <object class="spacer" expanded="1">\r
+                                <object class="spacer" expanded="0">\r
                                     <property name="height">0</property>\r
                                     <property name="permission">protected</property>\r
                                     <property name="width">0</property>\r
                                 </object>\r
                             </object>\r
-                            <object class="sizeritem" expanded="1">\r
+                            <object class="sizeritem" expanded="0">\r
                                 <property name="border">5</property>\r
                                 <property name="flag"></property>\r
                                 <property name="proportion">1</property>\r
-                                <object class="spacer" expanded="1">\r
+                                <object class="spacer" expanded="0">\r
                                     <property name="height">0</property>\r
                                     <property name="permission">protected</property>\r
                                     <property name="width">0</property>\r
                                 </object>\r
                             </object>\r
-                            <object class="sizeritem" expanded="1">\r
+                            <object class="sizeritem" expanded="0">\r
                                 <property name="border">5</property>\r
                                 <property name="flag"></property>\r
                                 <property name="proportion">1</property>\r
-                                <object class="spacer" expanded="1">\r
+                                <object class="spacer" expanded="0">\r
                                     <property name="height">0</property>\r
                                     <property name="permission">protected</property>\r
                                     <property name="width">0</property>\r
                                 </object>\r
                             </object>\r
-                            <object class="sizeritem" expanded="1">\r
+                            <object class="sizeritem" expanded="0">\r
                                 <property name="border">5</property>\r
                                 <property name="flag">wxALIGN_BOTTOM|wxALIGN_RIGHT|wxALL</property>\r
                                 <property name="proportion">0</property>\r
-                                <object class="wxButton" expanded="1">\r
+                                <object class="wxButton" expanded="0">\r
                                     <property name="BottomDockable">1</property>\r
                                     <property name="LeftDockable">1</property>\r
                                     <property name="RightDockable">1</property>\r
index 94d27b7dbeb6dc073cd6ae8bc632619322203342..b0fd86e142186890f913b8a5555657b6ec15410d 100644 (file)
 #include <wx/settings.h>\r
 #include <wx/stattext.h>\r
 #include <wx/combobox.h>\r
+#include <wx/sizer.h>\r
 #include <wx/gauge.h>\r
 #include <wx/slider.h>\r
 #include <wx/tglbtn.h>\r
 #include <wx/button.h>\r
-#include <wx/sizer.h>\r
 #include <wx/panel.h>\r
 #include <wx/statusbr.h>\r
 #include <wx/frame.h>\r
@@ -44,10 +44,10 @@ class MainFrameBase : public wxFrame
        protected:\r
                wxMenuBar* m_menuBar;\r
                wxMenu* m_menuFile;\r
-               wxPanel* m_panel1;\r
+               wxPanel* m_audioInfo;\r
                wxStaticText* m_staticText1;\r
-               wxComboBox* m_comboBox1;\r
-               wxComboBox* m_comboBox2;\r
+               wxComboBox* m_comboBoxLeft;\r
+               wxComboBox* m_comboBoxRight;\r
                wxStaticText* m_staticText2;\r
                wxGauge* m_gauge1;\r
                wxSlider* m_slider1;\r
index 89772f2c4d5b0e07c6b748529962138db7def541..24aecd4fb09dfc8c2d3e287b450f5cfb94698a39 100644 (file)
@@ -50,3 +50,184 @@ void MainFrame::OnExitClick(wxCommandEvent& event)
 {\r
     Destroy();\r
 }\r
+\r
+void MainFrame::printSupportedStandardSampleRates(
+        const portaudio::DirectionSpecificStreamParameters &inputParameters,
+        const portaudio::DirectionSpecificStreamParameters &outputParameters)
+{
+    static double STANDARD_SAMPLE_RATES[] = {
+                                                8000.0,
+                                                9600.0,
+                                                11025.0,
+                                                12000.0,
+                                                16000.0,
+                                                22050.0,
+                                                24000.0,
+                                                32000.0,
+                                                44100.0,
+                                                48000.0,
+                                                88200.0,
+                                                96000.0,
+                                                192000.0,
+                                                -1
+                                            }; // negative terminated list
+
+    int printCount = 0;
+
+    for (int i = 0; STANDARD_SAMPLE_RATES[i] > 0; ++i)
+    {
+        portaudio::StreamParameters tmp = portaudio::StreamParameters(inputParameters, outputParameters, STANDARD_SAMPLE_RATES[i], 0, paNoFlag);
+        if (tmp.isSupported())
+        {
+            if (printCount == 0)
+            {
+                std::cout << "    " << STANDARD_SAMPLE_RATES[i]; // 8.2
+                printCount = 1;
+            }
+            else if (printCount == 4)
+            {
+                std::cout << "," << std::endl;
+                std::cout << "    " << STANDARD_SAMPLE_RATES[i]; // 8.2
+                printCount = 1;
+            }
+            else
+            {
+                std::cout << ", " << STANDARD_SAMPLE_RATES[i]; // 8.2
+                ++printCount;
+            }
+        }
+    }
+    if (printCount == 0)
+    {
+        std::cout << "None" << std::endl;
+    }
+    else
+    {
+        std::cout << std::endl;
+    }
+}
+
+int MainFrame::populateAudioInfo()
+{
+
+    try
+    {
+        portaudio::AutoSystem autoSys;
+        portaudio::System &sys = portaudio::System::instance();
+
+        std::cout << "PortAudio version number = " << sys.version() << std::endl;
+        std::cout << "PortAudio version text = '" << sys.versionText() << "'" << std::endl;
+
+        int numDevices = sys.deviceCount();
+        std::cout << "Number of devices = " << numDevices << std::endl;
+
+        for (portaudio::System::DeviceIterator i = sys.devicesBegin(); i != sys.devicesEnd(); ++i)
+        {
+            std::cout << "--------------------------------------- device #" << (*i).index() << std::endl;
+
+            // Mark global and API specific default devices:
+            bool defaultDisplayed = false;
+
+            if ((*i).isSystemDefaultInputDevice())
+            {
+                std::cout << "[ Default Input";
+                defaultDisplayed = true;
+            }
+            else if ((*i).isHostApiDefaultInputDevice())
+            {
+                std::cout << "[ Default " << (*i).hostApi().name() << " Input";
+                defaultDisplayed = true;
+            }
+            if ((*i).isSystemDefaultOutputDevice())
+            {
+                std::cout << (defaultDisplayed ? "," : "[");
+                std::cout << " Default Output";
+                defaultDisplayed = true;
+            }
+            else if ((*i).isHostApiDefaultOutputDevice())
+            {
+                std::cout << (defaultDisplayed ? "," : "[");
+                std::cout << " Default " << (*i).hostApi().name() << " Output";
+                defaultDisplayed = true;
+            }
+            if (defaultDisplayed)
+            {
+                std::cout << " ]" << std::endl;
+            }
+            // Print device info:
+            std::cout << "Name                        = " << (*i).name() << std::endl;
+            std::cout << "Host API                    = " << (*i).hostApi().name() << std::endl;
+            std::cout << "Max inputs = " << (*i).maxInputChannels() << ", Max outputs = " << (*i).maxOutputChannels() << std::endl;
+
+            std::cout << "Default low input latency   = " << (*i).defaultLowInputLatency() << std::endl; // 8.3
+            std::cout << "Default low output latency  = " << (*i).defaultLowOutputLatency() << std::endl; // 8.3
+            std::cout << "Default high input latency  = " << (*i).defaultHighInputLatency() << std::endl; // 8.3
+            std::cout << "Default high output latency = " << (*i).defaultHighOutputLatency() << std::endl; // 8.3
+
+#ifdef WIN32
+            // ASIO specific latency information:
+            if ((*i).hostApi().typeId() == paASIO)
+            {
+                portaudio::AsioDeviceAdapter asioDevice((*i));
+
+                std::cout << "ASIO minimum buffer size    = " << asioDevice.minBufferSize() << std::endl;
+                std::cout << "ASIO maximum buffer size    = " << asioDevice.maxBufferSize() << std::endl;
+                std::cout << "ASIO preferred buffer size  = " << asioDevice.preferredBufferSize() << std::endl;
+
+                if (asioDevice.granularity() == -1)
+                {
+                    std::cout << "ASIO buffer granularity     = power of 2" << std::endl;
+                }
+                else
+                {
+                    std::cout << "ASIO buffer granularity     = " << asioDevice.granularity() << std::endl;
+                }
+            }
+#endif // WIN32
+
+            std::cout << "Default sample rate         = " << (*i).defaultSampleRate() << std::endl; // 8.2
+
+            // Poll for standard sample rates:
+            portaudio::DirectionSpecificStreamParameters inputParameters((*i), (*i).maxInputChannels(), portaudio::INT16, true, 0.0, NULL);
+            portaudio::DirectionSpecificStreamParameters outputParameters((*i), (*i).maxOutputChannels(), portaudio::INT16, true, 0.0, NULL);
+            if (inputParameters.numChannels() > 0)
+            {
+                std::cout << "Supported standard sample rates" << std::endl;
+                std::cout << " for half-duplex 16 bit " << inputParameters.numChannels() << " channel input = " << std::endl;
+                printSupportedStandardSampleRates(inputParameters, portaudio::DirectionSpecificStreamParameters::null());
+            }
+            if (outputParameters.numChannels() > 0)
+            {
+                std::cout << "Supported standard sample rates" << std::endl;
+                std::cout << " for half-duplex 16 bit " << outputParameters.numChannels() << " channel output = " << std::endl;
+                printSupportedStandardSampleRates(portaudio::DirectionSpecificStreamParameters::null(), outputParameters);
+            }
+            if (inputParameters.numChannels() > 0 && outputParameters.numChannels() > 0)
+            {
+                std::cout << "Supported standard sample rates" << std::endl;
+                std::cout << " for full-duplex 16 bit " << inputParameters.numChannels() << " channel input, " << outputParameters.numChannels() << " channel output = " << std::endl;
+                printSupportedStandardSampleRates(inputParameters, outputParameters);
+            }
+        }
+        std::cout << "----------------------------------------------" << 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;
+}
+
+\r
index fe0e9138e18b709442243a406b33efadb12d2025..5684cd664a915e70a2dec5b88b0b90653f627b42 100644 (file)
  * Notes:        Note that all GUI creation code is declared in
  *                 gui.h source file which is generated by wxFormBuilder.
  *********************************************************************/
-
 #ifndef __main__
 #define __main__
 
 // main wxWidgets header file
 #include <wx/wx.h>
 #include <portaudio.h>
-#include <PortAudioCpp.hxx>
+#include "portaudiocpp/PortAudioCpp.hxx"
+#ifdef WIN32
+#include "../extern/include/portaudiocpp/AsioDeviceAdapter.hxx"
+#endif
 
 // gui classes generated by wxFormBuilder
 #include "gui.h"
@@ -49,6 +51,10 @@ class MainFrame : public MainFrameBase
         // protected event handlers
         virtual void OnCloseFrame(wxCloseEvent& event);
         virtual void OnExitClick(wxCommandEvent& event);
+        void printSupportedStandardSampleRates(
+                const portaudio::DirectionSpecificStreamParameters &inputParameters,
+                const portaudio::DirectionSpecificStreamParameters &outputParameters);
+        int populateAudioInfo();
 };
 
 #endif //__main__
index 6d20f74ec71e2685bd875cb7e54f0fe427107090..7c2527c9d8458327d6f247090e8e2567cefd9fc5 100644 (file)
@@ -41,11 +41,11 @@ MakeDirCommand         :=makedir
 CmpOptions             := -O2 -Wall $(shell wx-config --cxxflags --unicode=yes --debug=no) $(Preprocessors)\r
 C_CmpOptions           := -O2 -Wall $(shell wx-config --cxxflags --unicode=yes --debug=no) $(Preprocessors)\r
 LinkOptions            :=  -mwindows -s $(shell wx-config --debug=no --libs --unicode=yes)\r
-IncludePath            :=  $(IncludeSwitch). $(IncludeSwitch)./ $(IncludeSwitch)../extern/include/ $(IncludeSwitch)../pa_cpp_binding/ \r
+IncludePath            :=  $(IncludeSwitch). $(IncludeSwitch)./ $(IncludeSwitch)C:/bin/MinGW/msys/1.0/local/include $(IncludeSwitch)./portaudiocpp \r
 IncludePCH             := \r
 RcIncludePath          := \r
-Libs                   := \r
-LibPath                := $(LibraryPathSwitch). \r
+Libs                   := $(LibrarySwitch)portaudiocpp.la $(LibrarySwitch)portaudio.la \r
+LibPath                := $(LibraryPathSwitch). $(LibraryPathSwitch). $(LibraryPathSwitch)../../extern/lib/ \r
 \r
 \r
 ##\r
index 07b83817196144ec826a4ca6d61fc7b40aa6fa11..066f5a17e9fc2d711d86a7437fcf0a88676d50ef 100644 (file)
@@ -2,7 +2,7 @@
 <CodeLite_Project Name="pa_cppbinding_test" InternalType="GUI">
   <Plugins>
     <Plugin Name="qmake">
-      <![CDATA[00010001N0007Release000000000000]]>
+      <![CDATA[00020001N0005Debug0000000000000001N0007Release000000000000]]>
     </Plugin>
   </Plugins>
   <Description/>
   <VirtualDirectory Name="include">
     <File Name="gui.h"/>
     <File Name="main.h"/>
-    <File Name="../pa_cpp_binding/AsioDeviceAdapter.hxx"/>
-    <File Name="../pa_cpp_binding/AutoSystem.hxx"/>
-    <File Name="../pa_cpp_binding/BlockingStream.hxx"/>
-    <File Name="../pa_cpp_binding/CallbackInterface.hxx"/>
-    <File Name="../pa_cpp_binding/CallbackStream.hxx"/>
-    <File Name="../pa_cpp_binding/CFunCallbackStream.hxx"/>
-    <File Name="../pa_cpp_binding/CppFunCallbackStream.hxx"/>
-    <File Name="../pa_cpp_binding/Device.hxx"/>
-    <File Name="../pa_cpp_binding/DirectionSpecificStreamParameters.hxx"/>
-    <File Name="../pa_cpp_binding/Exception.hxx"/>
-    <File Name="../pa_cpp_binding/HostApi.hxx"/>
-    <File Name="../pa_cpp_binding/InterfaceCallbackStream.hxx"/>
-    <File Name="../pa_cpp_binding/MemFunCallbackStream.hxx"/>
-    <File Name="../pa_cpp_binding/PortAudioCpp.hxx"/>
-    <File Name="../pa_cpp_binding/SampleDataFormat.hxx"/>
-    <File Name="../pa_cpp_binding/Stream.hxx"/>
-    <File Name="../pa_cpp_binding/StreamParameters.hxx"/>
-    <File Name="../pa_cpp_binding/System.hxx"/>
-    <File Name="../pa_cpp_binding/SystemDeviceIterator.hxx"/>
-    <File Name="../pa_cpp_binding/SystemHostApiIterator.hxx"/>
+    <VirtualDirectory Name="cpp_binding">
+      <File Name="../extern/include/portaudiocpp/AsioDeviceAdapter.hxx"/>
+      <File Name="../extern/include/portaudiocpp/AutoSystem.hxx"/>
+      <File Name="../extern/include/portaudiocpp/BlockingStream.hxx"/>
+      <File Name="../extern/include/portaudiocpp/CallbackInterface.hxx"/>
+      <File Name="../extern/include/portaudiocpp/CallbackStream.hxx"/>
+      <File Name="../extern/include/portaudiocpp/CFunCallbackStream.hxx"/>
+      <File Name="../extern/include/portaudiocpp/CppFunCallbackStream.hxx"/>
+      <File Name="../extern/include/portaudiocpp/Device.hxx"/>
+      <File Name="../extern/include/portaudiocpp/DirectionSpecificStreamParameters.hxx"/>
+      <File Name="../extern/include/portaudiocpp/Exception.hxx"/>
+      <File Name="../extern/include/portaudiocpp/HostApi.hxx"/>
+      <File Name="../extern/include/portaudiocpp/InterfaceCallbackStream.hxx"/>
+      <File Name="../extern/include/portaudiocpp/MemFunCallbackStream.hxx"/>
+      <File Name="../extern/include/portaudiocpp/PortAudioCpp.hxx"/>
+      <File Name="../extern/include/portaudiocpp/SampleDataFormat.hxx"/>
+      <File Name="../extern/include/portaudiocpp/Stream.hxx"/>
+      <File Name="../extern/include/portaudiocpp/StreamParameters.hxx"/>
+      <File Name="../extern/include/portaudiocpp/System.hxx"/>
+      <File Name="../extern/include/portaudiocpp/SystemDeviceIterator.hxx"/>
+      <File Name="../extern/include/portaudiocpp/SystemHostApiIterator.hxx"/>
+    </VirtualDirectory>
   </VirtualDirectory>
   <VirtualDirectory Name="resources">
     <File Name="gui.fbp"/>
       <Compiler Options="-g;-O0;-Wall;$(shell wx-config --cxxflags --unicode=yes --debug=yes)" C_Options="-g;-O0;-Wall;$(shell wx-config --cxxflags --unicode=yes --debug=yes)" Required="yes" PreCompiledHeader="" PCHInCommandLine="no" UseDifferentPCHFlags="no" PCHFlags="">
         <Preprocessor Value="__WX__"/>
       </Compiler>
-      <Linker Options="-mwindows;$(shell wx-config --debug=yes --libs --unicode=yes)" Required="yes"/>
+      <Linker Options="-mwindows;$(shell wx-config --debug=yes --libs --unicode=yes)" Required="yes">
+        <LibraryPath Value="../extern/lib"/>
+        <Library Value="libportaudio.dll"/>
+        <Library Value="libportaudiocpp.dll.a"/>
+      </Linker>
       <ResourceCompiler Options="$(shell wx-config --rcflags)" Required="no"/>
       <General OutputFile="$(IntermediateDirectory)/$(ProjectName)" IntermediateDirectory="./Debug" Command="./$(ProjectName)" CommandArguments="" UseSeparateDebugArgs="no" DebugArguments="" WorkingDirectory="$(IntermediateDirectory)" PauseExecWhenProcTerminates="yes"/>
       <Environment EnvVarSetName="&lt;Use Defaults&gt;" DbgSetName="&lt;Use Defaults&gt;">
     <Configuration Name="Release" CompilerType="gnu g++" DebuggerType="GNU gdb debugger" Type="Executable" BuildCmpWithGlobalSettings="append" BuildLnkWithGlobalSettings="append" BuildResWithGlobalSettings="append">
       <Compiler Options="-O2;-Wall;$(shell wx-config --cxxflags --unicode=yes --debug=no)" C_Options="-O2;-Wall;$(shell wx-config --cxxflags --unicode=yes --debug=no)" Required="yes" PreCompiledHeader="" PCHInCommandLine="no" UseDifferentPCHFlags="no" PCHFlags="">
         <IncludePath Value="./"/>
-        <IncludePath Value="../extern/include/"/>
-        <IncludePath Value="../pa_cpp_binding/"/>
+        <IncludePath Value="C:/bin/MinGW/msys/1.0/local/include"/>
+        <IncludePath Value="./portaudiocpp"/>
         <Preprocessor Value="__WX__"/>
       </Compiler>
-      <Linker Options="-mwindows;-s;$(shell wx-config --debug=no --libs --unicode=yes)" Required="yes"/>
+      <Linker Options="-mwindows;-s;$(shell wx-config --debug=no --libs --unicode=yes)" Required="yes">
+        <LibraryPath Value="."/>
+        <LibraryPath Value="../../extern/lib/"/>
+        <Library Value="libportaudiocpp.la"/>
+        <Library Value="libportaudio.la"/>
+      </Linker>
       <ResourceCompiler Options="$(shell wx-config --rcflags)" Required="no"/>
       <General OutputFile="$(IntermediateDirectory)/$(ProjectName)" IntermediateDirectory="./Release" Command="./$(ProjectName)" CommandArguments="" UseSeparateDebugArgs="no" DebugArguments="" WorkingDirectory="$(IntermediateDirectory)" PauseExecWhenProcTerminates="yes"/>
       <Environment EnvVarSetName="&lt;Use Defaults&gt;" DbgSetName="&lt;Use Defaults&gt;">