Chris@39: #ifndef INCLUDED_PORTAUDIO_CFUNCALLBACKSTREAM_HXX Chris@39: #define INCLUDED_PORTAUDIO_CFUNCALLBACKSTREAM_HXX Chris@39: Chris@39: // --------------------------------------------------------------------------------------- Chris@39: Chris@39: #include "portaudio.h" Chris@39: Chris@39: #include "portaudiocpp/CallbackStream.hxx" Chris@39: Chris@39: // --------------------------------------------------------------------------------------- Chris@39: Chris@39: // Forward declaration(s) Chris@39: namespace portaudio Chris@39: { Chris@39: class StreamParameters; Chris@39: } Chris@39: Chris@39: // --------------------------------------------------------------------------------------- Chris@39: Chris@39: // Declaration(s): Chris@39: namespace portaudio Chris@39: { Chris@39: // ----------------------------------------------------------------------------------- Chris@39: Chris@39: ////// Chris@39: /// @brief Callback stream using a free function with C linkage. It's important that the function Chris@39: /// the passed function pointer points to is declared ``extern "C"''. Chris@39: ////// Chris@39: class CFunCallbackStream : public CallbackStream Chris@39: { Chris@39: public: Chris@39: CFunCallbackStream(); Chris@39: CFunCallbackStream(const StreamParameters ¶meters, PaStreamCallback *funPtr, void *userData); Chris@39: ~CFunCallbackStream(); Chris@39: Chris@39: void open(const StreamParameters ¶meters, PaStreamCallback *funPtr, void *userData); Chris@39: Chris@39: private: Chris@39: CFunCallbackStream(const CFunCallbackStream &); // non-copyable Chris@39: CFunCallbackStream &operator=(const CFunCallbackStream &); // non-copyable Chris@39: }; Chris@39: Chris@39: // ----------------------------------------------------------------------------------- Chris@39: } // portaudio Chris@39: Chris@39: // --------------------------------------------------------------------------------------- Chris@39: Chris@39: #endif // INCLUDED_PORTAUDIO_MEMFUNCALLBACKSTREAM_HXX Chris@39: