Audio plugin host https://kx.studio/carla
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

59 lines
1.6KB

  1. #!/bin/env python
  2. import os
  3. from distutils.core import setup, Extension
  4. if hasattr(os, 'uname'):
  5. OSNAME = os.uname()[0]
  6. else:
  7. OSNAME = 'Windows'
  8. define_macros = []
  9. libraries = []
  10. extra_link_args = []
  11. extra_compile_args = ['-I../../../']
  12. sources = ['rtaudiomodule.cpp', '../../../RtAudio.cpp']
  13. if OSNAME == 'Linux':
  14. define_macros=[("__LINUX_ALSA__", ''),
  15. ('__LINUX_JACK__', ''),
  16. ('__LINUX_OSS__', '')]
  17. libraries = ['asound', 'jack', 'pthread']
  18. elif OSNAME == 'Darwin':
  19. define_macros = [('__MACOSX_CORE__', '')]
  20. libraries = ['pthread', 'stdc++']
  21. extra_link_args = ['-framework', 'CoreAudio']
  22. elif OSNAME == 'Windows':
  23. define_macros = [('__WINDOWS_DS__', None),
  24. ('__WINDOWS_ASIO__', None),
  25. ('__LITTLE_ENDIAN__',None),
  26. ('WIN32',None)]
  27. libraries = ['winmm', 'dsound', 'Advapi32','Ole32','User32']
  28. sources += ['../../../include/asio.cpp',
  29. '../../../include/asiodrivers.cpp',
  30. '../../../include/asiolist.cpp',
  31. '../../../include/iasiothiscallresolver.cpp']
  32. extra_compile_args.append('-I../../../include/')
  33. extra_compile_args.append('-EHsc')
  34. audio = Extension('rtaudio',
  35. sources=sources,
  36. libraries=libraries,
  37. define_macros=define_macros,
  38. extra_compile_args = extra_compile_args,
  39. extra_link_args = extra_link_args,
  40. )
  41. setup(name = 'rtaudio',
  42. version = '0.1',
  43. description = 'Python RtAudio interface',
  44. ext_modules = [audio])