Mercurial > hg > sv-dependency-builds
annotate src/portaudio/bindings/cpp/include/portaudiocpp/CallbackInterface.hxx @ 23:619f715526df sv_v2.1
Update Vamp plugin SDK to 2.5
author | Chris Cannam |
---|---|
date | Thu, 09 May 2013 10:52:46 +0100 |
parents | e13257ea84a4 |
children |
rev | line source |
---|---|
Chris@4 | 1 #ifndef INCLUDED_PORTAUDIO_CALLBACKINTERFACE_HXX |
Chris@4 | 2 #define INCLUDED_PORTAUDIO_CALLBACKINTERFACE_HXX |
Chris@4 | 3 |
Chris@4 | 4 // --------------------------------------------------------------------------------------- |
Chris@4 | 5 |
Chris@4 | 6 #include "portaudio.h" |
Chris@4 | 7 |
Chris@4 | 8 // --------------------------------------------------------------------------------------- |
Chris@4 | 9 |
Chris@4 | 10 namespace portaudio |
Chris@4 | 11 { |
Chris@4 | 12 // ----------------------------------------------------------------------------------- |
Chris@4 | 13 |
Chris@4 | 14 ////// |
Chris@4 | 15 /// @brief Interface for an object that's callable as a PortAudioCpp callback object (ie that implements the |
Chris@4 | 16 /// paCallbackFun method). |
Chris@4 | 17 ////// |
Chris@4 | 18 class CallbackInterface |
Chris@4 | 19 { |
Chris@4 | 20 public: |
Chris@4 | 21 virtual ~CallbackInterface() {} |
Chris@4 | 22 |
Chris@4 | 23 virtual int paCallbackFun(const void *inputBuffer, void *outputBuffer, unsigned long numFrames, |
Chris@4 | 24 const PaStreamCallbackTimeInfo *timeInfo, PaStreamCallbackFlags statusFlags) = 0; |
Chris@4 | 25 }; |
Chris@4 | 26 |
Chris@4 | 27 // ----------------------------------------------------------------------------------- |
Chris@4 | 28 |
Chris@4 | 29 namespace impl |
Chris@4 | 30 { |
Chris@4 | 31 extern "C" |
Chris@4 | 32 { |
Chris@4 | 33 int callbackInterfaceToPaCallbackAdapter(const void *inputBuffer, void *outputBuffer, unsigned long numFrames, |
Chris@4 | 34 const PaStreamCallbackTimeInfo *timeInfo, PaStreamCallbackFlags statusFlags, |
Chris@4 | 35 void *userData); |
Chris@4 | 36 } // extern "C" |
Chris@4 | 37 } |
Chris@4 | 38 |
Chris@4 | 39 // ----------------------------------------------------------------------------------- |
Chris@4 | 40 |
Chris@4 | 41 } // namespace portaudio |
Chris@4 | 42 |
Chris@4 | 43 // --------------------------------------------------------------------------------------- |
Chris@4 | 44 |
Chris@4 | 45 #endif // INCLUDED_PORTAUDIO_CALLBACKINTERFACE_HXX |