-
Notifications
You must be signed in to change notification settings - Fork 3
/
pyogg-paths.patch
114 lines (108 loc) · 3.15 KB
/
pyogg-paths.patch
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
diff --git a/pyogg/flac.py b/pyogg/flac.py
index d44509e..bd6fd35 100644
--- a/pyogg/flac.py
+++ b/pyogg/flac.py
@@ -49,12 +49,7 @@ __here = os.getcwd()
libflac = None
try:
- names = {
- "Windows": "libFLAC.dll",
- "Darwin": "libFLAC.8.dylib",
- "external": "FLAC"
- }
- libflac = Library.load(names, tests = [lambda lib: hasattr(lib, "FLAC__EntropyCodingMethodTypeString")])
+ libflac = ctypes.CDLL('@flacLibPath@')
except ExternalLibraryError:
pass
except:
diff --git a/pyogg/ogg.py b/pyogg/ogg.py
index 08a944b..1446aa1 100644
--- a/pyogg/ogg.py
+++ b/pyogg/ogg.py
@@ -60,12 +60,7 @@ __here = os.getcwd()
libogg = None
try:
- names = {
- "Windows": "ogg.dll",
- "Darwin": "libogg.0.dylib",
- "external": "ogg"
- }
- libogg = Library.load(names, tests = [lambda lib: hasattr(lib, "oggpack_writeinit")])
+ libogg = ctypes.CDLL('@oggLibPath@')
except ExternalLibraryError:
pass
except:
diff --git a/pyogg/opus.py b/pyogg/opus.py
index 446d0ab..a52eaac 100644
--- a/pyogg/opus.py
+++ b/pyogg/opus.py
@@ -189,12 +189,7 @@ __here = os.getcwd()
libopus = None
try:
- names = {
- "Windows": "opus.dll",
- "Darwin": "libopus.0.dylib",
- "external": "opus"
- }
- libopus = Library.load(names, tests = [lambda lib: hasattr(lib, "opus_encoder_get_size")])
+ libopus = ctypes.CDLL('@opusLibPath@')
except ExternalLibraryError:
pass
except:
@@ -203,12 +198,7 @@ except:
libopusfile = None
try:
- names = {
- "Windows": "opusfile.dll",
- "Darwin": "libopusfile.0.dylib",
- "external": "opusfile"
- }
- libopusfile = Library.load(names, tests = [lambda lib: hasattr(lib, "opus_head_parse")])
+ libopusfile = ctypes.CDLL('@opusFileLibPath@')
except ExternalLibraryError:
pass
except:
diff --git a/pyogg/vorbis.py b/pyogg/vorbis.py
index a8432ba..7301dd3 100644
--- a/pyogg/vorbis.py
+++ b/pyogg/vorbis.py
@@ -52,12 +52,7 @@ __here = os.getcwd()
libvorbis = None
try:
- names = {
- "Windows": "libvorbis.dll",
- "Darwin": "libvorbis.0.dylib",
- "external": "vorbis"
- }
- libvorbis = Library.load(names, tests = [lambda lib: hasattr(lib, "vorbis_info_init")])
+ libvorbis = ctypes.CDLL('@vorbisLibPath@')
except ExternalLibraryError:
pass
except:
@@ -66,12 +61,7 @@ except:
libvorbisfile = None
try:
- names = {
- "Windows": "libvorbisfile.dll",
- "Darwin": "libvorbisfile.3.dylib",
- "external": "vorbisfile"
- }
- libvorbisfile = Library.load(names, tests = [lambda lib: hasattr(lib, "ov_clear")])
+ libvorbisfile = ctypes.CDLL('@vorbisFileLibPath@')
except ExternalLibraryError:
pass
except:
@@ -96,12 +86,7 @@ if libvorbis_is_also_libvorbisenc:
libvorbisenc = libvorbis
else:
try:
- names = {
- "Windows": "libvorbisenc.dll",
- "Darwin": "libvorbisenc.2.dylib",
- "external": "vorbisenc"
- }
- libvorbisenc = Library.load(names, tests = [lambda lib: hasattr(lib, "vorbis_encode_init")])
+ libvorbisenc = ctypes.CDLL('@vorbisEncLibPath@')
except ExternalLibraryError:
pass
except: