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