summaryrefslogtreecommitdiff
path: root/doc/fake_cffi.py
diff options
context:
space:
mode:
Diffstat (limited to 'doc/fake_cffi.py')
-rw-r--r--doc/fake_cffi.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/doc/fake_cffi.py b/doc/fake_cffi.py
new file mode 100644
index 0000000..a88b42d
--- /dev/null
+++ b/doc/fake_cffi.py
@@ -0,0 +1,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