Chris@55: #ifndef INCLUDED_PORTAUDIO_CALLBACKINTERFACE_HXX Chris@55: #define INCLUDED_PORTAUDIO_CALLBACKINTERFACE_HXX Chris@55: Chris@55: // --------------------------------------------------------------------------------------- Chris@55: Chris@55: #include "portaudio.h" Chris@55: Chris@55: // --------------------------------------------------------------------------------------- Chris@55: Chris@55: namespace portaudio Chris@55: { Chris@55: // ----------------------------------------------------------------------------------- Chris@55: Chris@55: ////// Chris@55: /// @brief Interface for an object that's callable as a PortAudioCpp callback object (ie that implements the Chris@55: /// paCallbackFun method). Chris@55: ////// Chris@55: class CallbackInterface Chris@55: { Chris@55: public: Chris@55: virtual ~CallbackInterface() {} Chris@55: Chris@55: virtual int paCallbackFun(const void *inputBuffer, void *outputBuffer, unsigned long numFrames, Chris@55: const PaStreamCallbackTimeInfo *timeInfo, PaStreamCallbackFlags statusFlags) = 0; Chris@55: }; Chris@55: Chris@55: // ----------------------------------------------------------------------------------- Chris@55: Chris@55: namespace impl Chris@55: { Chris@55: extern "C" Chris@55: { Chris@55: int callbackInterfaceToPaCallbackAdapter(const void *inputBuffer, void *outputBuffer, unsigned long numFrames, Chris@55: const PaStreamCallbackTimeInfo *timeInfo, PaStreamCallbackFlags statusFlags, Chris@55: void *userData); Chris@55: } // extern "C" Chris@55: } Chris@55: Chris@55: // ----------------------------------------------------------------------------------- Chris@55: Chris@55: } // namespace portaudio Chris@55: Chris@55: // --------------------------------------------------------------------------------------- Chris@55: Chris@55: #endif // INCLUDED_PORTAUDIO_CALLBACKINTERFACE_HXX