How play 3D sound with Qt for game in C++ not in QML?



  • Hello everyone! I'm try write game what uses Qt for some purposes. For playing sound i use OpenAL, but i want to use Qt for playing sound. I look in docs and find QtAudioEngine, but looks like this thing only for QML. How use this thing in C++? Or exist something else?



  • I've been looking at OpenAlSoft for 3d audio:
    http://kcat.strangesoft.net/openal.html



  • But i wanna use Qt solution



  • I am not sure if Qt provides an API for 3d sound, still implementing your own on top of existing Qt classes shouldn't be that hard, provided it is only a matter of multi-channel mixing. If you have to do some extra encoding/decoding you will pretty much have to use a 3rd party library, cause writing your own will be too much overkill.



  • This is very bad if Qt have some already written things for QML but not for C++. Looks like war on two fronts...
    I look on QtAudioEngine QML module and its have exactly what i need, but i wanna use this features on pure C++ and looks like i cant?



  • Pf.. tell me about it, I've been ranting for months about all the new features QML receives exclusively, even thou they are implemented in C++, the native public interfaces are somehow omitted, giving QML an artificial advantage.

    On a side note, it will be considerably easier to make the game in QML, provided of course it is not very complex and performance demanding.

    And last but not least, to me it looks like "you CAN set arbitrary channel count for a QAudioFormat":http://qt-project.org/doc/qt-5.0/qtmultimedia/qaudioformat.html#setChannelCount and use that to create a corresponding QAudioOutput. Also, in the "documentation":http://qt-project.org/doc/qt-5.0/qtmultimedia/multimediaoverview.html, AudioEngine and Sound are listed as C++ classes, even though the entries only expose the QML front end, I guess there is nothing preventing you from opening their implementation and borrowing some ideas - the benefit of open soruce...



  • Oh big thank.
    Damn why need to create two separate islands... why not upgrade Qt c++ part and make things from this part available in QML... oh maybe I somthing dont undestand, but WTF
    [quote author="utcenter" date="1358523510"]Pf.. tell me about it, I've been ranting for months about all the new features QML receives exclusively, even thou they are implemented in C++, the native public interfaces are somehow omitted, giving QML an artificial advantage.

    On a side note, it will be considerably easier to make the game in QML, provided of course it is not very complex and performance demanding.

    And last but not least, to me it looks like "you CAN set arbitrary channel count for a QAudioFormat":http://qt-project.org/doc/qt-5.0/qtmultimedia/qaudioformat.html#setChannelCount and use that to create a corresponding QAudioOutput. Also, in the "documentation":http://qt-project.org/doc/qt-5.0/qtmultimedia/multimediaoverview.html, AudioEngine and Sound are listed as C++ classes, even though the entries only expose the QML front end, I guess there is nothing preventing you from opening their implementation and borrowing some ideas - the benefit of open soruce...[/quote]


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.