summaryrefslogtreecommitdiff
path: root/doc/fake_cffi.py
blob: a88b42d7c40b8a06e88c56f9aabaa718406ec8dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
"""Mock module for Sphinx autodoc."""


class FFI(object):

    NULL = NotImplemented
    I_AM_FAKE = True  # This is used for the documentation of "default"

    def cdef(self, _):
        pass

    def dlopen(self, _):
        return FakePortAudio()


class FakePortAudio(object):

    paFloat32 = paInt32 = paInt24 = paInt16 = paInt8 = paUInt8 = NotImplemented
    paFramesPerBufferUnspecified = 0

    def Pa_Initialize(self):
        return 0

    def Pa_Terminate(self):
        return 0