To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.

The primary repository for this project is hosted at https://github.com/sonic-visualiser/sv-dependency-builds .
This repository is a read-only copy which is updated automatically every hour.

Statistics Download as Zip
| Branch: | Tag: | Revision:

root / src / portaudio_20161030_catalina_patch / bindings / cpp / include / portaudiocpp / CallbackInterface.hxx @ 164:9fa11135915a

History | View | Annotate | Download (1.42 KB)

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