From 6faf4336eb5952b141e1c239d194f5cd70f0a885 Mon Sep 17 00:00:00 2001 From: Gary Scavone Date: Wed, 13 Apr 2011 00:50:38 +0000 Subject: Updates for release 4.0.8, including new python binding, new teststops.cpp program, ALSA "default" flag, and various changes to stopping behavior (GS). --- contrib/python/pyrtaudio/setup.py | 58 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 contrib/python/pyrtaudio/setup.py (limited to 'contrib/python/pyrtaudio/setup.py') diff --git a/contrib/python/pyrtaudio/setup.py b/contrib/python/pyrtaudio/setup.py new file mode 100644 index 0000000..6ad0d4a --- /dev/null +++ b/contrib/python/pyrtaudio/setup.py @@ -0,0 +1,58 @@ +#!/bin/env python + +import os +from distutils.core import setup, Extension + +if hasattr(os, 'uname'): + OSNAME = os.uname()[0] +else: + OSNAME = 'Windows' + + +define_macros = [] +libraries = [] +extra_link_args = [] +extra_compile_args = ['-I../../../'] +sources = ['rtaudiomodule.cpp', '../../../RtAudio.cpp'] + + +if OSNAME == 'Linux': + define_macros=[("__LINUX_ALSA__", ''), + ('__LINUX_JACK__', ''), + ('__LINUX_OSS__', '')] + libraries = ['asound', 'jack', 'pthread'] + +elif OSNAME == 'Darwin': + define_macros = [('__MACOSX_CORE__', '')] + libraries = ['pthread', 'stdc++'] + extra_link_args = ['-framework', 'CoreAudio'] + +elif OSNAME == 'Windows': + define_macros = [('__WINDOWS_DS__', None), + ('__WINDOWS_ASIO__', None), + ('__LITTLE_ENDIAN__',None), + ('WIN32',None)] + libraries = ['winmm', 'dsound', 'Advapi32','Ole32','User32'] + sources += ['../../../include/asio.cpp', + '../../../include/asiodrivers.cpp', + '../../../include/asiolist.cpp', + '../../../include/iasiothiscallresolver.cpp'] + extra_compile_args.append('-I../../../include/') + extra_compile_args.append('-EHsc') + + + +audio = Extension('rtaudio', + sources=sources, + libraries=libraries, + define_macros=define_macros, + extra_compile_args = extra_compile_args, + extra_link_args = extra_link_args, + ) + + +setup(name = 'rtaudio', + version = '0.1', + description = 'Python RtAudio interface', + ext_modules = [audio]) + -- cgit v1.2.3