Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sound capture in CPP and Qt

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.

like image 256
dzen Avatar asked Feb 15 '10 10:02

dzen


People also ask

How do you record audio on QT?

To record audio we simply create a QAudioRecorder object. audioRecorder = new QAudioRecorder(this); And setup the lists as described above. The text on the record and pause buttons are toggled depending on the state of the audioRecorder object.

What is a QT audio file?

A QT file is a movie file saved in the QuickTime File Format (QTFF), a multimedia container format developed by Apple. It contains one or more audio, video, or text (subtitle) tracks and typically uses the MPEG-4 codec for compression. QT files most often store movies and video clips.

What is QT audio engine?

Qt Audio Engine enables developers to organize wave files into discrete Sound with different play variations, group sound controls by AudioCategory categories and define attenuation models and various 3D audio settings all in one place.


2 Answers

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.

like image 117
Gareth Stockwell Avatar answered Oct 05 '22 22:10

Gareth Stockwell


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

like image 24
Håvard S Avatar answered Oct 05 '22 21:10

Håvard S