Skip to content

Commit

Permalink
Merge branch 'master' of github.com:tyrylu/pyfmodex
Browse files Browse the repository at this point in the history
  • Loading branch information
tyrylu committed Apr 6, 2021
2 parents 21b7b62 + 8fafa05 commit ced5a54
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
15 changes: 13 additions & 2 deletions pyfmodex/fmodex.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,22 @@
from ctypes import *
import os, platform
import os
import platform
import sys

arch = platform.architecture()[0]
if platform.system() == "Windows":
_dll = windll.fmod
try:
_dll = windll.fmod
except Exception as e:
current_directory = os.path.dirname(os.path.realpath(sys.argv[0]))
try:
_dll = CDLL(os.path.join(current_directory, 'fmod'))
except:
raise RuntimeError("Pyfmodex could not find the fmod library")

elif platform.system() == "Linux":
_dll = CDLL("libfmod.so")

elif platform.system() == "Darwin":
if arch == "32bit":
raise RuntimeError("No 32-bit fmod library for Mac Os exists")
Expand Down
1 change: 0 additions & 1 deletion pyfmodex/studio/studio_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ def __init__(self, ptr):

def _call(self, specific_function_suffix, *args):
func_name = "%s_%s" % (self.function_prefix, specific_function_suffix)
print(func_name)
result = getattr(self._lib, func_name)(self._ptr, *args)
ckresult(result)

Expand Down

0 comments on commit ced5a54

Please sign in to comment.