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