gearmulator

Emulation of classic VA synths of the late 90s/2000s that are based on Motorola 56300 family DSPs
Log | Files | Refs | Submodules | README | LICENSE

CallbackInterface.hxx (1457B)


      1 #ifndef INCLUDED_PORTAUDIO_CALLBACKINTERFACE_HXX
      2 #define INCLUDED_PORTAUDIO_CALLBACKINTERFACE_HXX
      3 
      4 // ---------------------------------------------------------------------------------------
      5 
      6 #include "portaudio.h"
      7 
      8 // ---------------------------------------------------------------------------------------
      9 
     10 namespace portaudio
     11 {
     12 	// -----------------------------------------------------------------------------------
     13 
     14 	//////
     15 	/// @brief Interface for an object that's callable as a PortAudioCpp callback object (ie that implements the 
     16 	/// paCallbackFun method).
     17 	//////
     18 	class CallbackInterface
     19 	{
     20 	public:
     21 		virtual ~CallbackInterface() {}
     22 
     23 		virtual int paCallbackFun(const void *inputBuffer, void *outputBuffer, unsigned long numFrames, 
     24 			const PaStreamCallbackTimeInfo *timeInfo, PaStreamCallbackFlags statusFlags) = 0;
     25 	};
     26 
     27 	// -----------------------------------------------------------------------------------
     28 
     29 	namespace impl
     30 	{
     31 		extern "C"
     32 		{
     33 			int callbackInterfaceToPaCallbackAdapter(const void *inputBuffer, void *outputBuffer, unsigned long numFrames, 
     34 				const PaStreamCallbackTimeInfo *timeInfo, PaStreamCallbackFlags statusFlags, 
     35 				void *userData);
     36 		} // extern "C"
     37 	}
     38 
     39 	// -----------------------------------------------------------------------------------
     40 
     41 } // namespace portaudio
     42 
     43 // ---------------------------------------------------------------------------------------
     44 
     45 #endif // INCLUDED_PORTAUDIO_CALLBACKINTERFACE_HXX