annotate src/portaudio_20140130/bindings/cpp/source/portaudiocpp/CallbackInterface.cxx @ 83:ae30d91d2ffe

Replace these with versions built using an older toolset (so as to avoid ABI compatibilities when linking on Ubuntu 14.04 for packaging purposes)
author Chris Cannam
date Fri, 07 Feb 2020 11:51:13 +0000
parents 7ddb4fc30dac
children
rev   line source
Chris@39 1 #include "portaudiocpp/CallbackInterface.hxx"
Chris@39 2
Chris@39 3 namespace portaudio
Chris@39 4 {
Chris@39 5
Chris@39 6 namespace impl
Chris@39 7 {
Chris@39 8
Chris@39 9 //////
Chris@39 10 /// Adapts any CallbackInterface object to a C-callable function (ie this function). A
Chris@39 11 /// pointer to the object should be passed as ``userData'' when setting up the callback.
Chris@39 12 //////
Chris@39 13 int callbackInterfaceToPaCallbackAdapter(const void *inputBuffer, void *outputBuffer, unsigned long numFrames,
Chris@39 14 const PaStreamCallbackTimeInfo *timeInfo, PaStreamCallbackFlags statusFlags, void *userData)
Chris@39 15 {
Chris@39 16 CallbackInterface *cb = static_cast<CallbackInterface *>(userData);
Chris@39 17 return cb->paCallbackFun(inputBuffer, outputBuffer, numFrames, timeInfo, statusFlags);
Chris@39 18 }
Chris@39 19
Chris@39 20
Chris@39 21 } // namespace impl
Chris@39 22
Chris@39 23 } // namespace portaudio
Chris@39 24
Chris@39 25