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 / source / portaudiocpp / CallbackInterface.cxx @ 162:d43aab368df9

History | View | Annotate | Download (719 Bytes)

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