comparison src/portaudio/bindings/cpp/include/portaudiocpp/CallbackInterface.hxx @ 4:e13257ea84a4

Add bzip2, zlib, liblo, portaudio sources
author Chris Cannam
date Wed, 20 Mar 2013 13:59:52 +0000
parents
children
comparison
equal deleted inserted replaced
3:6c505a35919a 4:e13257ea84a4
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