Sound capture in CPP and Qt - c++

I would like to capture some sound from the microphone in cpp, in order to use it in a Qt application.
So I'm looking for a multi platform library easily integrable in a Qt4 project.

Qt 4.6 introduces a new, low level suite of audio APIs in the QtMultimedia module. You can use QAudioInput to capture raw audio from a microphone.
At present, this API is implemented for Windows, Mac, and Linux (supporting PULSE and ALSA audio subsystems). Support for other platforms, including Symbian in the mobile space, is currently under development.

OpenAL is a good, cross-platform C++ library for capturing audio.

Related

QT 5.8 WebEngine Html 5 Video player support

I have created a Qt 5.8 web engine based application but unfortunately, the video is not playing in the application.
After coming across many forums I found that I need to build QT with flag proprietary-codec
But this solution comes with the warning: When distributing proprietary codec libraries, you must acquire licenses for them.
Unfortunately, I can't use these proprietary codec libraries.
If I use open source codec libraries do I need to compile QT again with some other flag.
Is there any other solution to this approach.
Unfortunately for mp4 file format using proprietary codecs is the only option (i.e. this includes acquiring licenses to distribute and configuring/building Qt with the option you specified already in your question).
From Qt docs:
Qt WebEngine supports the MPEG-4 Part 14 (MP4) file format only if the required proprietary audio and video codecs, such as H.264 and MPEG layer-3 (MP3), have been enabled.

Backends to use for multimedia in Qt5

What are available and reliable multimedia backends to use with Qt5 for media playback on Linux?
I don't know about backends rather than gstreamer for linux, but you can try to integrate QmlVlc project into your code. You can find a demo here. It uses vlc for playing video. I successfully used this project for my purposes under Android. You can also try QtAV, it uses ffmpeg. From my experience it worked on Android as well, but there were issues with hanging UI. It might have needed more work to properly integrate though, but I didn't want to spend time on it, at least it was easy to try.
I know you were not asking for Android libs, but by using on Android I mean native (C++) code, so no Java was used.
you can use Gstreamer Qt bindings

Cross Platform (C/C++) Audio Library for MP3, AAC, WAV

I'm trying to find a cross platform audio library that will have the following abilities (in order of importance):
Full Windows, Mac, Linux support
C / C++ APIs
Free/cheap but commercially viable
MP3 Support
AAC Support
WMA Support
FLAC Support
OGG Support
ARM Linux support would be nice
Open Source
I've found several things like OpenAL, libao, Bass, etc. but they all seem to all either have a limitation of OS, codec or both. For the most part MP3 and AAC support are a must as I'm working on a media player and would like it to support those common formats.
Any suggestions?
You can take a look at GStreamer and FFmpeg.
EDIT:
Since you are willing to use Qt, you should definitely check Qt MultimediaKit, which is a part of the Qt Mobility project. Phonon is fading away because Qt is investing on MultimediaKit to replace it.
This example shows how to do simple audio playback. This example shows how to create a multimedia player. This example shows a more advanced music player, using Qt and QML.
I don't know if you are planning on using a framework like Qt.
This has a library called "Phonon" bundled, which is also really nice.
It is built on the corresponding native media framework, so QuickTime on Mac, Windows Media Player on Windows and GTK+ on Linux.
PulseAudio also looks promising without any framework.
Try out JUCE. It is like Qt in some respects, but much more audio-centric.I've been using it for some years now and it is well maintained and written.

how to play rtsp streamming in QT

I am trying to find a way to play in Qt 4.6 rtsp streaming, that i got from youtube api
can it be done somehow?
Live555 has some very useful libraries on this subject.
Checkout Phonon, multimedia framework for QT.
The most seamless way is to use Phonon.
If you are using Windows, Phonon uses DirectShow as the backend. To utilize this you need a RTSP DirectShow source filter, which you register in Windows. There are commercially available ones and a few open source projects that may have what you need.
For example,
http://sourceforge.net/projects/rtspdirectshow
A good rule of thumb is if you can play it in Windows Media Player (mplayer2.exe, wmplayer.exe), you can play it using Phonon. Currently you would not be able to play a URL containing "rtsp://" in WMP or Phonon is because no DirectShow source filters are installed which support RTSP.

C/C++ library for reading MIDI signals from a USB MIDI device

I want to write C/C++ programs that take input from a MIDI device.
The MIDI device connects to my PC using a USB connector.
I'm looking for a (C/C++ implemented) library that I can use to read the MIDI signals from the MIDI device through the USB port.
I'm happy manipulating the MIDI data once I get it, I just don't want to have to implement the code for its capture.
I'm planning on writing my code using the Bloodshed Dev-C++ IDE on Windows XP.
PortMidi is another open source cross-platform MIDI I/O library worth checking out. On the other hand, if you are working on a sysex type of app, then direct Win32 works easily enough.
Just came across another open source cross-platform framework that includes MIDI support: Juce.
Also, I should note that there isn't anything special about a USB connected MIDI device. It will still be presented as a MIDI device in Windows and you will use standard MIDI APIs (mmsystem) to communicate with it.
[July 2014] I just came across RtMidi that looks to be a nice, compact, open source cross-platform C++ library.
Check out the open source project LMMS. It's a music studio for Linux that includes the ability to use MIDI keyboards with software instruments. If you dig around in source files with 'midi' in the name, you'll probably find what you're looking for.
Maybe the Jack source code may help too. It's a sound driver for Posix compatible systems with a lot of possibilities and supports USB and Firewire audio devices.