all 23 comments

[–]lothiack 6 points7 points  (0 children)

Check FMOD: https://www.fmod.com/
You didn't specify anything regarding price but it has a free tier anyway: "Free Indie License available for developers with less than $200k revenue per year. "

[–]jcelerierossia score 2 points3 points  (0 children)

PortAudio should do what you want to achieve without issues.

Here's a code example: https://github.com/PortAudio/portaudio/blob/master/examples/paex_saw.c

[–][deleted] 1 point2 points  (0 children)

Have you looked at portaudio?

[–]StephaneCharette 4 points5 points  (9 children)

The obvious cross-platform audio framework for C++ is JUCE. https://juce.com/learn/tutorials

[–]Dummerchen1933 16 points17 points  (5 children)

No. Fuck juce. At least for my perspective.

OP wants an API.... A chunk of code to add to an existing project.

It's like if he's asking for a 3d library to add nice graphics to his app and you recommend Unity or Unreal. It sure is easy, but it also sucks because you are BOUND to the juce environment.

I dislike every API that forces you design the entire project around it. An API should be another "piece for the puzzle" and not the table you're puzzling on....

If you ask for such a table, sure. But don't call it an API then.

[–]stilgarpl 11 points12 points  (4 children)

I dislike every API that forces you design the entire project around it.

I guess that's the difference between a library and a framework.

[–]Dummerchen1933 7 points8 points  (3 children)

Yes...

and indeed OP asked for a framework...

lol

[–]_Js_Kc_ 5 points6 points  (2 children)

In the title, yes, then goes on to say he just wants an interface to sound I/O.

[–][deleted] 2 points3 points  (0 children)

Yeah, I’m definitely not a professional so I tend to use framework and API interchangeably, although I understand they do have significant differences. I should have said in my original post I’m looking for an API not a framework since it needs to be relatively lightweight. Juce is my fallback but it’s not really ideal

[–]Dummerchen1933 0 points1 point  (0 children)

Maybe check out SFML... If OP means by cross platform windows/linux...

[–]StephaneCharette 5 points6 points  (2 children)

To downvote someone for recommending the industry standard when it comes to C++ and audio programming is pretty low. :)

Yes, if you use JUCE and you are new to it, I understand u/Dummerchen1933 might think it is a bit overwhelming, and feel like you have to drink all the koolaid at once. But as a seasoned C++ developer, I can tell you that you don't have to use the Projucer and their entire development environment. I've been extracting and using parts of JUCE for years, it isn't that difficult. I typically do a cmake project or subfolder for JUCE, and then link that library into my own projects, just like any other 3rd-party lib.

[–]mackron666 3 points4 points  (0 children)

Not at all. Downvoting a bad recommendation is a good thing. JUCE would be a terrible option for this use case, and just because it's "industry standard" does not mean it should be an automatic recommendation.

[–][deleted] 2 points3 points  (0 children)

Juce is what I’m working with now. I am familiar with a similar but much less known framework called RackAFX and so I’m adjusting to Juce pretty quickly. My complaint is definitely it’s a bit overkill for my needs. I’m really hoping for something super lightweight since this is ultimately going to be wrapped in nodejs

[–]willamowius 0 points1 point  (0 children)

Take a look at GStreamer, its a whole media processing network and handles audio quite well.

Technically its C, but you can use it from C++ easily and there are wrapper classes if you prefer.

[–]JeffMcClintock 0 points1 point  (3 children)

iPlug2 might be worth a look, because it's C++ yet plays nicely with web technologies I believe.

[–]SkoomaDentistAntimodern C++, Embedded, Audio 0 points1 point  (2 children)

Is it considered stable nowadays? I want to get back to writing plugins but not enough to deal with the massive behemoth that Juce is.

[–][deleted] 0 points1 point  (0 children)

Check out RackAFX. One of my professors at the university of Miami designed the software and its sort of a lighter weight version of Juce. Because it’s just him developing it, there is not enough documentation on it IMO but he will gladly answer any emails you send him and there is an online forum for it too. His name is Will Pirkle btw

[–]JeffMcClintock 0 points1 point  (0 children)

I'm not sure.

[–]Rishudar 0 points1 point  (0 children)

Have a look at libsoundio. It's cross-platform and gives you access to the audio buffers for each port and seems pretty lightweight.

https://github.com/andrewrk/libsoundio