summaryrefslogtreecommitdiff
path: root/portaudio/bindings/cpp/include/portaudiocpp/CppFunCallbackStream.hxx
diff options
context:
space:
mode:
authorsanine <sanine.not@pm.me>2022-08-27 23:52:56 -0500
committersanine <sanine.not@pm.me>2022-08-27 23:52:56 -0500
commita4dd0ad63c00f4dee3b86dfd3075d1d61b2b3180 (patch)
tree13bd5bfa15e6fea2a12f176bae79adf9c6fd0933 /portaudio/bindings/cpp/include/portaudiocpp/CppFunCallbackStream.hxx
parentbde3e4f1bb7b8f8abca0884a7d994ee1c17a66b1 (diff)
add plibsys
Diffstat (limited to 'portaudio/bindings/cpp/include/portaudiocpp/CppFunCallbackStream.hxx')
-rw-r--r--portaudio/bindings/cpp/include/portaudiocpp/CppFunCallbackStream.hxx86
1 files changed, 0 insertions, 86 deletions
diff --git a/portaudio/bindings/cpp/include/portaudiocpp/CppFunCallbackStream.hxx b/portaudio/bindings/cpp/include/portaudiocpp/CppFunCallbackStream.hxx
deleted file mode 100644
index 3f219ee..0000000
--- a/portaudio/bindings/cpp/include/portaudiocpp/CppFunCallbackStream.hxx
+++ /dev/null
@@ -1,86 +0,0 @@
-#ifndef INCLUDED_PORTAUDIO_CPPFUNCALLBACKSTREAM_HXX
-#define INCLUDED_PORTAUDIO_CPPFUNCALLBACKSTREAM_HXX
-
-// ---------------------------------------------------------------------------------------
-
-#include "portaudio.h"
-
-#include "portaudiocpp/CallbackStream.hxx"
-
-// ---------------------------------------------------------------------------------------
-
-// Forward declaration(s):
-namespace portaudio
-{
- class StreamParameters;
-}
-
-// ---------------------------------------------------------------------------------------
-
-// Declaration(s):
-namespace portaudio
-{
-
-
- namespace impl
- {
- extern "C"
- {
- int cppCallbackToPaCallbackAdapter(const void *inputBuffer, void *outputBuffer, unsigned long numFrames,
- const PaStreamCallbackTimeInfo *timeInfo, PaStreamCallbackFlags statusFlags,
- void *userData);
- } // extern "C"
- }
-
- // -----------------------------------------------------------------------------------
-
- //////
- /// @brief Callback stream using a C++ function (either a free function or a static function)
- /// callback.
- //////
- class FunCallbackStream : public CallbackStream
- {
- public:
- typedef int (*CallbackFunPtr)(const void *inputBuffer, void *outputBuffer, unsigned long numFrames,
- const PaStreamCallbackTimeInfo *timeInfo, PaStreamCallbackFlags statusFlags,
- void *userData);
-
- // -------------------------------------------------------------------------------
-
- //////
- /// @brief Simple structure containing a function pointer to the C++ callback function and a
- /// (void) pointer to the user supplied data.
- //////
- struct CppToCCallbackData
- {
- CppToCCallbackData();
- CppToCCallbackData(CallbackFunPtr funPtr, void *userData);
- void init(CallbackFunPtr funPtr, void *userData);
-
- CallbackFunPtr funPtr;
- void *userData;
- };
-
- // -------------------------------------------------------------------------------
-
- FunCallbackStream();
- FunCallbackStream(const StreamParameters &parameters, CallbackFunPtr funPtr, void *userData);
- ~FunCallbackStream();
-
- void open(const StreamParameters &parameters, CallbackFunPtr funPtr, void *userData);
-
- private:
- FunCallbackStream(const FunCallbackStream &); // non-copyable
- FunCallbackStream &operator=(const FunCallbackStream &); // non-copyable
-
- CppToCCallbackData adapterData_;
-
- void open(const StreamParameters &parameters);
- };
-
-
-} // portaudio
-
-// ---------------------------------------------------------------------------------------
-
-#endif // INCLUDED_PORTAUDIO_CPPFUNCALLBACKSTREAM_HXX