QIODevice and Phonon
-
Hi Qt Folks,
I am a Qt beginner walking through the tutorials, especially the AudioOutput tutorial.
I was wondering if it is possible to write an "AudioOutput"-like tutorial using Phonon AudioOutput instead of QtMultimedia kit. Looking into Phonon documentation in Qt, it seems possible to use a QIODevice as the media source, so that a "Generator"-like class (as in the QAudioOutput tutorial) would fit. However, I could not make it work.So, my question is: is there any documentation/wiki/tutorial on how to use QIODevice with Phonon?
Thanks in advance
-
As I know phonon is high level OS audio interface in Qt and works only with things like playback an audio file etc.(standard media player functions). And QtMultimedia gives you access to sound card with some methods such as in OpenGL. So if you wanna make standard funcs. in your app. like playback etc. use phonon but if you want to proceed audio data and get access to input and output buffers of your sound card you need to use QtMultimedia classes.
-
Hi,
I understand what you say. My purpose on working with Phonon and/or QtMultimedia is to have an API that gives me i) access to volume control (especially in decibel units) and ii) that makes it possible to work with audio data generator engine that could provide me pure sounds with a desired frequency or white sounds. Of course, I can achieve (i) easily with phonon and (ii) easily with QtMultimedia. Working with a QIODevice in Phonon would give access to both targets in the same API. Another possibility comes with Qt5.0 (as I see in the documentation), where volume control will be available to QAudioOutput.
Any other clues?Thanks again
-
About generator, maybe this is what you need :http://developer.qt.nokia.com/doc/qt-4.8/multimedia-audiooutput.html . So as you see you can create QIODevice based class which will generate frequency or any else.