Mercurial > hg > sv-dependency-builds
comparison src/portaudio_20140130/bindings/cpp/source/portaudiocpp/CallbackInterface.cxx @ 124:e3d5853d5918
Current stable PortAudio source
author | Chris Cannam <cannam@all-day-breakfast.com> |
---|---|
date | Tue, 18 Oct 2016 13:11:05 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
123:0cef3a1bd1ae | 124:e3d5853d5918 |
---|---|
1 #include "portaudiocpp/CallbackInterface.hxx" | |
2 | |
3 namespace portaudio | |
4 { | |
5 | |
6 namespace impl | |
7 { | |
8 | |
9 ////// | |
10 /// Adapts any CallbackInterface object to a C-callable function (ie this function). A | |
11 /// pointer to the object should be passed as ``userData'' when setting up the callback. | |
12 ////// | |
13 int callbackInterfaceToPaCallbackAdapter(const void *inputBuffer, void *outputBuffer, unsigned long numFrames, | |
14 const PaStreamCallbackTimeInfo *timeInfo, PaStreamCallbackFlags statusFlags, void *userData) | |
15 { | |
16 CallbackInterface *cb = static_cast<CallbackInterface *>(userData); | |
17 return cb->paCallbackFun(inputBuffer, outputBuffer, numFrames, timeInfo, statusFlags); | |
18 } | |
19 | |
20 | |
21 } // namespace impl | |
22 | |
23 } // namespace portaudio | |
24 | |
25 |