Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How play 3D sound with Qt for game in C++ not in QML?
Forum Updated to NodeBB v4.3 + New Features

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

Scheduled Pinned Locked Moved General and Desktop
7 Posts 3 Posters 4.1k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    Hronom
    wrote on last edited by
    #1

    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?

    1 Reply Last reply
    0
    • J Offline
      J Offline
      jsprenkle
      wrote on last edited by
      #2

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

      1 Reply Last reply
      0
      • H Offline
        H Offline
        Hronom
        wrote on last edited by
        #3

        But i wanna use Qt solution

        1 Reply Last reply
        0
        • U Offline
          U Offline
          utcenter
          wrote on last edited by
          #4

          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.

          1 Reply Last reply
          0
          • H Offline
            H Offline
            Hronom
            wrote on last edited by
            #5

            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?

            1 Reply Last reply
            0
            • U Offline
              U Offline
              utcenter
              wrote on last edited by
              #6

              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...

              1 Reply Last reply
              0
              • H Offline
                H Offline
                Hronom
                wrote on last edited by
                #7

                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]

                1 Reply Last reply
                0

                • Login

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Search
                • Get Qt Extensions
                • Unsolved