blob: e7b9f4f598dce8aa1c22a2126d2a58a9c91170aa (
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
"""Mock module for Sphinx autodoc."""
import ctypes
# Monkey-patch ctypes to disable searching for PortAudio
ctypes.util.find_library = lambda _: NotImplemented
class ffi(object):
NULL = NotImplemented
I_AM_FAKE = True # This is used for the documentation of "default"
def dlopen(self, _):
return FakeLibrary()
ffi = ffi()
class FakeLibrary(object):
# from portaudio.h:
paFloat32 = paInt32 = paInt24 = paInt16 = paInt8 = paUInt8 = NotImplemented
paFramesPerBufferUnspecified = 0
def Pa_Initialize(self):
return 0
def Pa_Terminate(self):
return 0
# from stdio.h:
def fopen(*args, **kwargs):
return NotImplemented
def fclose(*args):
pass
|