@@ -47,9 +47,16 @@ def process_arch(arch, set_compile_flags=False):
47
47
if arch .find ('arm' ) >= 0 :
48
48
ap_sources = [src for src in ap_sources if src .find ('mips.' ) < 0 and src .find ('sse' ) < 0 ]
49
49
define_macros .append (('WEBRTC_HAS_NEON' , None ))
50
- if set_compile_flags :
51
- extra_compile_args .append ('-mfloat-abi=hard' )
52
- extra_compile_args .append ('-mfpu=neon' )
50
+ if arch .find ('arm64' ) >= 0 :
51
+ define_macros .remove (('WEBRTC_LINUX' , None ))
52
+ define_macros .append (('WEBRTC_MAC' , None ))
53
+ define_macros .append (('WEBRTC_ARCH_ARM64' , None ))
54
+ define_macros .append (('WEBRTC_CLOCK_TYPE_REALTIME' , None ))
55
+ extra_compile_args .clear ()
56
+ else :
57
+ if set_compile_flags :
58
+ extra_compile_args .append ('-mfloat-abi=hard' )
59
+ extra_compile_args .append ('-mfpu=neon' )
53
60
elif arch .find ('aarch64' ) >= 0 :
54
61
ap_sources = [src for src in ap_sources if src .find ('mips.' ) < 0 and src .find ('sse' ) < 0 ]
55
62
define_macros .append (('WEBRTC_HAS_NEON' , None ))
@@ -71,7 +78,6 @@ def process_arch(arch, set_compile_flags=False):
71
78
else :
72
79
process_arch (platform .machine (), set_compile_flags = True )
73
80
74
-
75
81
sources = (
76
82
ap_sources +
77
83
['src/audio_processing_module.cpp' , 'src/webrtc_audio_processing.i' ]
@@ -83,6 +89,7 @@ def process_arch(arch, set_compile_flags=False):
83
89
)
84
90
85
91
92
+
86
93
setup (
87
94
name = 'webrtc_audio_processing' ,
88
95
version = '0.1.3' ,
@@ -128,4 +135,4 @@ def process_arch(arch, set_compile_flags=False):
128
135
package_data = {
129
136
'webrtc_audio_processing' : ['webrtc_audio_processing.py' ]
130
137
}
131
- )
138
+ )
0 commit comments