Mercurial > hg > sv-dependency-builds
annotate src/portaudio/bindings/cpp/source/portaudiocpp/CallbackInterface.cxx @ 19:891f60ab2af1
Ranlib
author | Chris Cannam |
---|---|
date | Mon, 25 Mar 2013 16:27:30 +0000 |
parents | e13257ea84a4 |
children |
rev | line source |
---|---|
Chris@4 | 1 #include "portaudiocpp/CallbackInterface.hxx" |
Chris@4 | 2 |
Chris@4 | 3 namespace portaudio |
Chris@4 | 4 { |
Chris@4 | 5 |
Chris@4 | 6 namespace impl |
Chris@4 | 7 { |
Chris@4 | 8 |
Chris@4 | 9 ////// |
Chris@4 | 10 /// Adapts any CallbackInterface object to a C-callable function (ie this function). A |
Chris@4 | 11 /// pointer to the object should be passed as ``userData'' when setting up the callback. |
Chris@4 | 12 ////// |
Chris@4 | 13 int callbackInterfaceToPaCallbackAdapter(const void *inputBuffer, void *outputBuffer, unsigned long numFrames, |
Chris@4 | 14 const PaStreamCallbackTimeInfo *timeInfo, PaStreamCallbackFlags statusFlags, void *userData) |
Chris@4 | 15 { |
Chris@4 | 16 CallbackInterface *cb = static_cast<CallbackInterface *>(userData); |
Chris@4 | 17 return cb->paCallbackFun(inputBuffer, outputBuffer, numFrames, timeInfo, statusFlags); |
Chris@4 | 18 } |
Chris@4 | 19 |
Chris@4 | 20 |
Chris@4 | 21 } // namespace impl |
Chris@4 | 22 |
Chris@4 | 23 } // namespace portaudio |
Chris@4 | 24 |
Chris@4 | 25 |