diff options
| author | Matthias Geier <Matthias.Geier@gmail.com> | 2017-10-19 18:34:48 +0200 |
|---|---|---|
| committer | Matthias Geier <Matthias.Geier@gmail.com> | 2017-10-21 09:51:51 +0200 |
| commit | 60dbadd41f33f3e3474926f1c53258f9e9612f3d (patch) | |
| tree | 45fe87fed1433fb77aad36fb0db4a9cf175d4a1b /doc/fake__sounddevice.py | |
| parent | 100abeb812ac3ec59efcad1cb062b462f2e2d2a6 (diff) | |
DOC: fix fake import for API docs
Switching to out-of-line ABI mode (#102) broke this.
Diffstat (limited to 'doc/fake__sounddevice.py')
| -rw-r--r-- | doc/fake__sounddevice.py | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/doc/fake__sounddevice.py b/doc/fake__sounddevice.py new file mode 100644 index 0000000..d72f15f --- /dev/null +++ b/doc/fake__sounddevice.py @@ -0,0 +1,35 @@ +"""Mock module for Sphinx autodoc.""" + + +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 |
