Comments (6)
I was trying to look at this but I quickly realized that sounddevice isn't actually a compiled extension which makes it more difficult to debug C issues like this. Is it much more troublesome to make it into a compiled extension?
from python-sounddevice.
I'm not sure if I understand ...
It would be reasonably simple to switch from CFFI's ABI mode to API mode, see http://cffi.readthedocs.io/en/latest/cdef.html.
This would change hardly anything in the implementation, most notably, the callback would still be implemented in Python.
If by "compiled extension" you mean manually writing C code using the Python C API, this would be an insane amount of work. Also, PyAudio already does that: https://people.csail.mit.edu/hubert/pyaudio/.
In this case, the callback would still be written in Python.
If you mean to keep CFFI (in API mode) but implement the callback in C, that's what I'm doing in https://github.com/mgeier/python-rtmixer/.
Finally, if you are talking about using the Python C API and implementing the callback in C, that's what pyo does: https://github.com/belangeo/pyo.
from python-sounddevice.
Sorry about the vagueness, I actually just meant using CFFI in API mode. All this would do is produce some debuggable C code.
from python-sounddevice.
OK. It should be straightforward, but I haven't actually tried it.
Do you want me to make a branch for API mode?
from python-sounddevice.
from python-sounddevice.
Fixed by #75.
from python-sounddevice.
Related Issues (20)
- Enhancement Request: Integrate Playback Status Check into Simple `play`/`stop` API in `sounddevice` HOT 4
- Feature request for loopback of output device. HOT 3
- 设备解码错误?utf-8' codec can't decode byte 0xc2 in position 6: invalid continuation byte HOT 4
- Sounddevice + big dict + OOP = Segfault / Bus Error HOT 11
- Update device list by reloading portaudio dll HOT 1
- Won't be able to import sounddevice due to unknown issue with `libportaudio64bit.dll` HOT 5
- Error opening OutputStream: Unanticipated host error', -9999, (2, 0, 'Failed to load ASIO driver
- Use sounddevice with virtual audio device and minimize latency HOT 1
- Achieving stable latency between calls of "playrec" HOT 8
- sounddevice not recognize all devices?
- Issues with playing concurrently with Youtube HOT 1
- Latency 30mSec HOT 9
- Advice on asynchronous playback HOT 7
- docker node minimal image
- Can I continue recording until the volume drops below a threshold? HOT 4
- Simultaneous audio playback datatype issue HOT 2
- Does sd.wait() block all other threads? HOT 1
- OSERROR portaudio library not found
- Advice on detecting when Sounddevice has stopped playing audio (and using multiple OutputStreams)
- Inconsistent order of channels HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python-sounddevice.