Compare commits
2 Commits
6deba2bad2
...
fae8417b2f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fae8417b2f | ||
|
|
e06cc4762d |
@@ -18,3 +18,6 @@ SERVER_PORT=3000
|
||||
|
||||
# Configuration of the local OP25 application
|
||||
OP25_BIN_PATH=""
|
||||
|
||||
# Logfile location config
|
||||
LOG_LOCATION=""
|
||||
@@ -8,20 +8,21 @@ async def load_opus():
|
||||
# Check the system type and load the correct library
|
||||
# Linux ARM AARCH64 running 32bit OS
|
||||
processor = platform.machine()
|
||||
script_dir = os.path.dirname(os.path.abspath(__file__))
|
||||
print("Processor: ", processor)
|
||||
if os.name == 'nt':
|
||||
if processor == "AMD64":
|
||||
opus.load_opus(os.path.join(script_dir, './opus/libopus_amd64.dll'))
|
||||
print(f"Loaded OPUS library for AMD64")
|
||||
opus.load_opus('./opus/libopus_amd64.dll')
|
||||
return "AMD64"
|
||||
else:
|
||||
if processor == "aarch64":
|
||||
opus.load_opus(os.path.join(script_dir, './opus/libopus_aarcch64.so'))
|
||||
print(f"Loaded OPUS library for aarch64")
|
||||
opus.load_opus('./opus/libopus_aarcch64.so')
|
||||
return "aarch64"
|
||||
elif processor == "armv7l":
|
||||
opus.load_opus(os.path.join(script_dir, './opus/libopus_armv7l.so'))
|
||||
print(f"Loaded OPUS library for armv7l")
|
||||
opus.load_opus('./opus/libopus_armv7l.so')
|
||||
return "armv7l"
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user