Good library for realtime audio (both sending and receiving)? [closed] - c++

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I'm thinking about doing realtime audio chatting stuff node.js. However, there currently aren't any good libraries for node for this that I know of. For recording audio, I'd probably open an audio device and read PCM bytes from it - however, I'm not sure about how to go on. I want to have control over the network stuff, e.g. I want to be able to multiplex the traffic through an existing connection, so a library that also handles the network part wouldn't work for me. So, what I think I need:
a C/C++/JavaScript library that is able to do fast (maybe lossy) realtime audio (de-)compression (maybe optimized for compressing human voices)
a C/C++/JavaScript library that can ensure that things stay realtime, e.g. takes care of dropping data after jitters - maybe I could also do this part in JavaScript myself
Does this sound sane? What are good libraries for these things?

I've created a C++ audio library named "Crosstalk".
It's a real-time C++ audio engine that allows you to create and route audio systems in real-time. Basically, the engine takes care of all the audio routing and gives you a simple platform for creating system components (E.g. "Network Input Feed" component connected to a "Low-Pass Filter" connected to a "File Recorder").
It's very easy to use. Here's an example of how to play an mp3 file (These components are provided with the engine):
XtSystem system;
XtMp3Decoder mp3Decoder;
XtAudioDevice audioDevice;
long md = system.addComponent(&mp3Decoder);
long ad = system.addComponent(&audioDevice);
system.connOutToIn(md,0,ad,0);
system.connOutToIn(md,1,ad,1);
mp3Decoder.loadFile("../05 Tchaikovski-Swan Lake-Scene.mp3");
mp3Decoder.play();
You can check out the API documentation and licensing details here: http://www.adaptaudio.com/Crosstalk
Update: Compatibility with free licenses.
Only the demo version of Crosstalk may be used in conjunction with free licensed software, however, commercial use and distribution of Crosstalk is still not allowed. If you wish to use the Crosstalk demo in free software, just mention in your EULA that your program uses a demo version of Crosstalk, and wherever you provide a link to your software, provide a link to: "http://www.adaptaudio.com/Crosstalk", where they may download it themselves.
EDIT (01-12-2012):
Crosstalk has been replaced by an open-source project called "DSPatch". DSPatch is essentially an upgraded version of the routing engine behind Crosstalk that is no longer limited to only audio processing. DSPatch allows you to create and route almost any type of process chain imaginable, and free for personal AND proprietary use :)

Related

Offscreen & embeddable browsers comparison (for use in a game) [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
We've been looking at adding decent browser support to our C++ application; this question is about GUI-independent browser libraries since our project involves 3D rendering and doesn't quite fit a normal GUI.
The two I've seen so far are Berkelium and Awesomium. Both seem to work in a similar way from my quick investigation, rendering to an offscreen-buffer which you blt into your own window/game/anything. Awesomium is proprietary and costs a fair amount ($5k), Berkelium is open-source and free. Has anyone compared these (and other) such tools? Cross-platform is a benefit but not 100% essential.
Take a look at the Chromium Embedded Framework. CEF 3 supports off-screen rendering on all operating systems: Windows/Mac/Linux.
Disclaimer: I created Awesomium. Nevertheless, I will practice the utmost objectivity in my response.
Awesomium does cost a bit of money but it is definitely the best tool for the job, I'll defend my reasons with a bulleted list:
Simple, well-documented API; we've tried our best to keep the API as intuitive and readable as possible. That's really important when you're embedded something as large and complex as an entire browser framework. (Believe me, you don't want to embed WebKit directly-- that's like swallowing the sun.)
Windowless rendering; the library was designed from the outset to be used outside of a standard "windowing framework". We make it really easy to render a WebView to a texture:
void update()
{
if(webView->isDirty())
webView->render()->copyTo(texture, width * bpp, bpp, false);
}
Solid Javascript integration; if you use Awesomium as an HTML GUI renderer for your 3D game, you'll definitely want to take advantage of our Javascript <-> C++ integration. You can call Javascript functions directly from C++ and vice-versa, set callbacks, expose global properties, and more. I wrote up a big guide on my blog here.
Well-supported; we use the money we get from our top-tier commercial licenses to fund support and development of the library. If you need help, please visit http://support.awesomium.com and we'll be glad to lend a hand.
The library is free for non-commercial use and very affordable for indie developers. If you'd like to use Awesomium in your next project and are worried about the price-point, please email me at adam#khrona.com and I'll see if I can't help you out. :-)
Berkelium is really painless to use. I integrated it into my game in 6 days, you can read all about it (and some other options) here: http://www.onemanmmo.com/index.php?cmd=newsitem&comment=news.1.31.0
The only downside is no debug build and 40MB of binaries.

Which API should I use for playing audio on Windows? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
There are many ways of playing sounds on Windows. Which are the differences, advantages and disavantages of each method?
I know there are at least 5 methods:
1991 WinMM.dll/mmsys.dll PlaySound
1995 MCIWnd (as suggested by #casablanca)
1996 DirectSound
1998 WaveOut
1999 ASIO
1999 Windows Media Player ActiveX control?
2005 WASAPI (which is used by XAudio2 - as suggested by #Han)
2007 XAudio2
QSound, then it will fit right in with the rest of your Qt application, and it will work not only on Windows but also on Mac OS X and Linux, as well. It is not uncommon to find a core, platform-specific API that isn't very friendly to developers, and then a myriad of more developer friendly APIs built on top of the core. Using a core API may be negligibly faster, but using the layers on top of these core
APIs is almost always more convenient and maintainable, and protects you from changes to the low-level core.
Edit
From the description of XAudio2:
XAudio2 is a low-level, cross-platform audio API for Microsoft Windows and Xbox 360. It provides a signal processing and mixing foundation for games that is similar to its predecessors, DirectSound and XAudio. For Windows game developers, XAudio2 is the long-awaited replacement for DirectSound.
So, it looks like that would be the API to use if you want a core, platform-specific audio library.
Edit 2
I was a little quick with my first answer... really, it depends on what you want to do. If all you want to do is play an audio file, then QSound is the way to go. If, however, you want to mix and generate audio on the fly, then using a more feature-capable library such as XAudio2 (which is a part of DirectX and is intended for creating sound as part of video games) would be the way to go.
Really depends on what you want to do. For most common scenarios, I've found that the MCIWnd functions work well: they're really easy to use and can play any format for which a codec is installed.
DirectSound is somewhat more difficult to use but gives you much more control over the output; it lets you add special effects and simulate 3D positioning.
The waveOut functions are the lowest level API you can get to and they are a kind of double-edged sword: you get to control exactly what goes out to the speakers, but they accept only raw waveform data, which means you are responsible for all decoding and post-processing of input data. PlaySound essentially provides a nice wrapper around this.

Funding for MathML rendering library [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I have an unfinished MathML rendering library written in C++. I ceased development a few months ago due to lack of time. The library [still] uses the TrueType version (unsupported) of the STIX fonts beta [version 1.0 of the STIX fonts (OpenType Postscript format) has since been released].
Development of this kind of library is a HUGE undertaking and, in fact, requires a number of programmers/developers. In my case, I am doing it alone, and here's my question:
Does anyone of you know of any foundations/philanthropists who may be interested to fund my project in return for open sourcing the code?
The funding will serve as an incentive for me to finish the library - perhaps by taking a sabbatical :p - and, of course, as 'payment' for the intellectual property involved.
I've searched the web, contacted some [e.g., foundations, VCs, angels, etc.], but I either did not get a response (from VCs and angels) or was rejected (one reason is geography since these foundations support only US-based projects).
As an aside, when I search the web for MathML, the results are often outdated. I guess there's not much activity concerning MathML. Yet, I believe this library will be very useful not only to developers but also to anyone who uses math, especially students and teachers. It is useful for e-learning, can be used with desktop apps and web servers (Windows), makes it easy to insert images of formulas in PowerPoint documents, etc.
Any suggestions are most welcome. Thank you.
EDITS: I have finished this library finally without funding, although I don't rule out seeking one.
You can find my new site below with lots of sample formulas; click on the download link to download the SDK.
http://reformath.webnode.com/ (preferred for statistical reason)
http://reformath.weebly.com/ (please use the above link instead)
DON'T forget to provide some feedback - or donations. Thanks!!!!!
Since we've already got open source MathML (Firefox has had it for years) that mean you'd have to do something better than the existing OSS solutions. And at that point, why not work on an existing open source project?
So that leaves commercial apps that may want a closed library for MathML rendering. I would go after companies like the makers of MathCad, Matlab, or any other engineering software that may want to display equations neatly. You should have something that already works for some subset of the things you/they will want it to do. You should also turn yourself into a company before going to those places so they take you seriously and you can license it to multiple customers. Otherwise the most you're likely to get is a job offer where they'd like you to hand over what you've got (for free if they can get you to) and then work on it as an employee - which may be all you want if you love it and hate your day job ;-)
You should probably ask on www-math list, also if you ask there, we can list your application in the software implementations page
http://www.w3.org/Math/Software/

Building VOIP into an application (C++ specifically) [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
Are there existing libraries and frameworks which allow VOIP to be built into a bespoke application without reinventing the wheel? A customer is interested by the possibility for a C++ desktop application and while it's not hugely useful (they could just use skype), it is quite cool.
I believe some technologies like DirectX may have some functionality built in for in-game chat, is that right? What else is there in the form of free/paid 3rd-party libraries?
Well, since Asterisk is open source, that's a good place to start.
Check out Astxx
"The goal of Astxx is to provide a fully functional and easy to use C++
wrapper for Asterisk enabling developers to write Asterisk related software
using the full range of what C++ has to offer. This includes AGI scripts
and accessing the Manager API."
Also IAXClient
"A lightweight cross platform IP telephony client using the IAX protocol, designed for use with the asterisk open source PBX. "
And Asterisk Sockets
"Asterisk Manage API and FAGI C++ Framework. Implemented with high efficient OS independent Sockets wrapper (ACE). Provide C++ API wrappers for Asterisk Manager API and FAGI."
There's also a .NET library
"The Asterisk .NET library consists of a set of C# classes that allow you to easily build applications that interact with an Asterisk PBX Server (1.0/1.2/1.4 version). Both FastAGI and Manager API supported. .NET/Mono compatible."
You might want to consider some form of SIP client which could be used as a basis for a softphone application. Check out the free pjsip library.
For SIP libraries, you should also look at Sofia-SIP and the GNU oSIP library.
As SIP is only use for session initiation, you'll also need a library for audio streaming (an RTP library). I've used and recommend librtp.
You may want to check out VDK: http://www.voipdevkit.com It's not free, but it's multi-platform and allows very easy integration of VoIP in other applications. It offers high-level API, so you don't have to deal with SIP or RTP by yourself.
If you want to develop a Windows C++, vb.NET or C#.Net VOIP app that uses SIP and RTP, check out the LanScape VOIP media engine SDK. Its not just a SIP library or RTP media library – it handles all the VOIP call requirements. This voip sdk is not free or open source. You license it from LS.
We used the LS sdk when we developed our windows VOIP client (softphone) and also use it on our windows voip servers for pstn trunk termination. The v5 sdk they had experienced some bugs but the “Release 6” media engine has worked great for us.
Here’s the link to their site and to the LS voip SDK.
We have been using the sdk for 3-4 years. The free and paid support LS offers is very good. I also have it on good authority that they are going to offer the same sdk on Linux and Mac OS X snow leopard.

What data source could I use for my stock market program? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I would like to make a free open-source C++ application for both Linux and Windows which will create live stock market charts (i.e. they're refreshed frequently).
Please could you give me some pointers on these issues:
What should I use as the data source? Are there free services I can implement? I would like to use the same or similar information as companies like Google.
I'm not sure what GUI toolkit would be best to use, is there one which has charting built in, or would I need to use a specialized library for this?
Some things to note:
This is my first attempt at both cross-platform C++ development, and a GUI application for Linux.
I'm based in the UK, so I'd like to use data sources that provide information for the London stock exchange (LON) as well as NASDAQ, etc.
As of Nov 2014, these links are dead.
Google Finance API: http://code.google.com/apis/finance/
Yahoo! Finance API: http://developer.yahoo.com/finance/
Cross-platform C++ charts w/ Qt: http://www.int.com/products/2d/carnac/chart_component.htm
Assuming the rules in the UK are the same as in the US, you basically have 3-tiered choices.
You can hack together a lame feed from things like Google or Yahoo but you absolutely are not getting every tick, if that is what you are after.
A step up from the obvious internet sources are some of the online brokers. Their data is more reliable and timely but obviously you need an account and they have to offer some kind of API. Check into something like InteractiveBrokers.com. They are mostly java centric but offer a Window's based C++ DLL as well. Several other brokers offer similar APIs but IB is excellent in that it covers a multitude of exchanges including, I believe, London. They also make it relatively easy to transfer currencies if that is a concern.
Lastly you have to go to commercial brokers. You can find them easily enough with a search but be prepared to pay a couple of hundred dollars per month minimum.
I think Mark's suggestion of QT is a good way to go for a GUI. Java tends to be adequate for putting up a grid of running quotes but tends to fail in the charting area, IMO.
You said you wanted "live" market charts. If you mean real-time, you will never get that for free. All the data you see on google etc is delayed, usually at least 15 minutes, and they don't get every tick.
If a delay is not a problem and if you are only interested in daily data, you can easily get historical data for free via simple HTTP request using this historical data API.