Mercurial > hg > sv-dependency-builds
comparison src/portaudio/bindings/cpp/source/portaudiocpp/CallbackInterface.cxx @ 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 #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 |