-
Notifications
You must be signed in to change notification settings - Fork 152
switch to cffi out-of-line ABI mode #102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Looks good to me.
I'm on holidays for the next 2.5 weeks, I'll try it afterwards.
Did you also try this on Windows?
|
|
I will test on windows.
|
429fe13 to
a96f3d4
Compare
|
with windows ran the same command: Linux:
Windows: |
|
Sorry for the delay, now I'm back ... I've tried it on macOS, but it produces an error: >>> import sounddevice
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/.../sounddevice.py", line 2646, in <module>
_ignore_stderr()
File "/.../sounddevice.py", line 2638, in _ignore_stderr
stdio.stderr = devnull
ffi.error: symbol 'stderr' not found in library '<None>': dlsym(RTLD_DEFAULT, stderr): symbol not foundIt seems that instead of a |
That's indeed interesting. |
|
Seems unlikely that it's the difference in length..but your guess is as
good as mine.
…On Oct 11, 2017 4:45 AM, "Matthias Geier" ***@***.***> wrote:
interesting side-note: making the same change for the soundfile library
seems to have no impact on its import time
That's indeed interesting.
If I've counted correctly, the soundfile library has about 120 lines of C
code to parse, while sounddevice has more than 300.
Is that the reason or is there something else going on?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#102 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAaVHLxHqoW0JM-4nsErpCf9rPYGUnZ_ks5srI4vgaJpZM4PefmC>
.
|
|
@tgarc Do you want to add the fix for macOS or should I do that? Apart from that, I think this is ready to merge. |
a96f3d4 to
16d054f
Compare
|
I can. But do you think both KeyErrors need to be changed?
…On Oct 14, 2017 10:24 AM, "Matthias Geier" ***@***.***> wrote:
@tgarc <https://github.com/tgarc> Do you want to add the fix for macOS or
should I do that?
Apart from that, I think this is ready to merge.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#102 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAaVHIrY0VdPCSfe5w05HMrTvENU7Rjlks5ssNI9gaJpZM4PefmC>
.
|
switch to out of line mode to improve sounddevice module import time. this adds a separate sounddevice_build.py file that becomes part of the setup.py build process and is only run once at install time rather than everytime the module is imported
16d054f to
0e9187a
Compare
|
Thanks! Yes, I think both should be changed, since theoretically there might be neither |
|
done! |
|
okay I lied, I do see a modest improvement applying this change to the soundfile library as well. I think I just didn't see it on the machine I originally tested on because of other latency issues |
Switching to out-of-line ABI mode (#102) broke this.
Switching to out-of-line ABI mode (bastibe#211) broke this. See also spatialaudio/python-sounddevice#102.
Switching to out-of-line ABI mode (#102) broke this.
|
thanks for merging this! The same changes has now been merged with PySoundFile as well. This dropped my command line application run time (which imports sounddevice and soundfile) down from 130ms to about 50ms. This is a far cry from the <10ms launch times of e.g. aplay (alsa utility for playing audio) but is tolerable for my purposes. Also FYI, if you're ever using |
switch to out of line mode to improve sounddevice module import time.
this adds a separate sounddevice_build.py file that becomes part of
the setup.py build process and is only run once at install time rather
than everytime the module is imported