Giter Site home page Giter Site logo

No C API like RtMidi has? about rtaudio HOT 12 CLOSED

thestk avatar thestk commented on June 13, 2024 1
No C API like RtMidi has?

from rtaudio.

Comments (12)

zserge avatar zserge commented on June 13, 2024 1

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:

I would be thankful is someone could review it and give some feedback.

from rtaudio.

radarsat1 avatar radarsat1 commented on June 13, 2024

It's something someone contributed, there has been no similar contribution for RtMidi. Feel free to propose ;)

from rtaudio.

0joshuaolson1 avatar 0joshuaolson1 commented on June 13, 2024

It's RtMidi that apparently has one, but I'll keep that in mind if libsoundio doesn't work out for me!

from rtaudio.

radarsat1 avatar radarsat1 commented on June 13, 2024

Sorry, yeah meant to say RtAudio there !

from rtaudio.

 avatar commented on June 13, 2024

@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.

zserge avatar zserge commented on June 13, 2024

@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.

 avatar commented on June 13, 2024

@zserge Gotcha, that makes sense. Are you going to submit a PR for this?

from rtaudio.

zserge avatar zserge commented on June 13, 2024

@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.

zserge avatar zserge commented on June 13, 2024

@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.

 avatar commented on June 13, 2024

@zserge I'm not one of the maintainers, but hopefully they'll get around to viewing the PR.

from rtaudio.

radarsat1 avatar radarsat1 commented on June 13, 2024

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.

radarsat1 avatar radarsat1 commented on June 13, 2024

Closed in #98

from rtaudio.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.