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