File: fake__jack.py

package info (click to toggle)
python-jack-client 0.5.3-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 356 kB
  • sloc: python: 2,123; makefile: 6
file content (41 lines) | stat: -rw-r--r-- 785 bytes parent folder | download
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
"""Mock module for Sphinx autodoc."""

import ctypes.util

old_find_library = ctypes.util.find_library


def new_find_library(name):
    if 'jack' in name.lower():
        return NotImplemented
    return old_find_library(name)


# Monkey-patch ctypes to disable searching for JACK
ctypes.util.find_library = new_find_library


class Fake(object):

    NULL = NotImplemented

    JackTransportStopped = 0
    JackTransportRolling = 1
    JackTransportStarting = 3
    JackTransportNetStarting = 4

    PropertyCreated = 0
    PropertyChanged = 1
    PropertyDeleted = 2

    JackPositionBBT = 0x10
    JackPositionTimecode = 0x20
    JackBBTFrameOffset = 0x40
    JackAudioVideoRatio = 0x80
    JackVideoFrameOffset = 0x100

    def dlopen(self, _):
        return self


ffi = Fake()