Comments (12)
I've started making a C wrapper as a part of my sweet dream to make C+Golang bindings for all three libraries (RtAudio, PortAudio, libsoundio) that would be easy to use. So I've made a C wrapper for RtAudio and amalgamated PortAudio and libsoundio.
Here are the RtAudio wrappers:
- https://github.com/naivesound/audio/blob/master/rtaudio/rtaudio_c.cpp
- https://github.com/naivesound/audio/blob/master/rtaudio/rtaudio_c.h
I would be thankful is someone could review it and give some feedback.
from rtaudio.
It's something someone contributed, there has been no similar contribution for RtMidi. Feel free to propose ;)
from rtaudio.
It's RtMidi that apparently has one, but I'll keep that in mind if libsoundio doesn't work out for me!
from rtaudio.
Sorry, yeah meant to say RtAudio there !
from rtaudio.
@zserge Looks great! Personally, I don't like typedef'ing the pointer and the usage of POSIX suffix _t
in the type names. But that's just me. You should definitely submit a PR.
from rtaudio.
@tay10r I hear you, and I normally don't prefer it either, but this was primarily done for Go bindings, and it looks a bit cleaner for me to write C.rtaudio_device_info_t
than C.struct_rtaudio_device_info
, especially in a language where long line wrapping is not a norm.
from rtaudio.
@zserge Gotcha, that makes sense. Are you going to submit a PR for this?
from rtaudio.
@tay10r Yes, I'm right now working on naivesound/audio library and once I'm confident with my rtaudio/rtmidi bindings (there are a few mislooked points in that, too) - I will make PRs to both.
In fact, on a broader topic - is anyone interested in Go bindings for this? Technically, as the library is only 2 files + 2 C wrapper files, the Go bindings would add one more .go
file to this and people would be able to use it in Go by adding just one import line. It's mostly straightforward and probably I would be happier to put my Go bindings into this official repo rather than keep a separate repo and copy RtAudio sources regularly into it.
Same applies to RtMidi.
from rtaudio.
@tay10r I've made a pull request #98 for C API wrappers. If you give me a green light - I can also make a pull request for Go API wrapper. That hopefully could make this nice little library a bit more popular among modern developers, comparing to the bloated portaudio. I see there are some Python bindings in the repo, so I hope adding Go wrapper should not be a problem for the maintainers.
from rtaudio.
@zserge I'm not one of the maintainers, but hopefully they'll get around to viewing the PR.
from rtaudio.
Hi guys, don't have time atm but keep working, I'll take a look at the PR as soon as I get a chance. Mostly leaving the C API up to people who are motivated, so go for it, I'll merge without too much argument ;)
from rtaudio.
Closed in #98
from rtaudio.
Related Issues (20)
- Stream recording on PulseAudio starts before startStream being called HOT 4
- Question: Is it possible to get the audio data of the outputDevice HOT 2
- Tests fail to compile HOT 2
- meson build fails with non-matching version number HOT 3
- soname version bump for RtAudio-6.0.0 HOT 2
- Missing symbols in version >= 6 HOT 7
- Undefined Reference to pthread_mutex_* in MinGW since 6.0.0 HOT 1
- Unstable ASIO support? HOT 4
- Please set 6.0.1 as latest GitHub release HOT 1
- Is it possible to record the sound from the speaker on MacOSX?
- Could someone provide an example for using RtAudioErrorCallback in constructor?
- fyi: working on a new python-rtaudio project
- Was 6.0.1 retagged? HOT 2
- Incorrect implementation of the amplitude when calculating the output signal
- Build with PulseAudio support fails on macOS: `RtAudio.cpp: error: 'sched_getscheduler' was not declared in this scope` HOT 2
- some tests use signed long instead of int32_t causing issues on 64-bit systems
- Update the changelog HOT 1
- VS2022 deprecation warning for std::code_cvt and friends ... HOT 3
- ALSA error on Linux: RtApiAlsa::probeDeviceInfo: snd_pcm_open (...) error for device (...), Invalid argument.
- Add support for record system audio on macOS
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 rtaudio.